-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from lukashornych/dev
Release: uniqueness types support, complex properties framework for prop. tables, more detailed filterable flag, tooltips in explorer
- Loading branch information
Showing
16 changed files
with
416 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<script setup lang="ts"> | ||
import { ComplexFlagValue, KeywordValue, Property, PropertyValue } from '@/model/properties-table' | ||
import VMarkdown from '@/components/base/VMarkdown.vue' | ||
const props = defineProps<{ | ||
property: Property, | ||
propertyValue: PropertyValue | PropertyValue[] | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<VChipGroup | ||
v-if="Array.isArray(propertyValue)" | ||
dense | ||
> | ||
<template v-if="propertyValue.length > 0"> | ||
<template v-for="item in propertyValue" :key="item.value.toString()"> | ||
<VPropertyTableValue :property="property" :propertyValue="item" /> | ||
</template> | ||
</template> | ||
<template v-else> | ||
<span class="text-disabled font-weight-light font-italic"> | ||
<empty> | ||
</span> | ||
</template> | ||
</VChipGroup> | ||
|
||
<template v-else> | ||
<!-- missing actual value --> | ||
<span | ||
v-if="propertyValue.value == undefined" | ||
class="text-disabled font-weight-light font-italic" | ||
> | ||
<empty> | ||
</span> | ||
|
||
<!-- actual value is string --> | ||
<div v-else-if="typeof propertyValue.value === 'string'"> | ||
<VMarkdown :source="propertyValue.value.toString()"/> | ||
</div> | ||
|
||
<!-- actual value is boolean --> | ||
<VCheckbox | ||
v-else-if="typeof propertyValue.value === 'boolean'" | ||
:model-value="propertyValue.value" | ||
disabled | ||
density="compact" | ||
hide-details | ||
class="flex-grow-0" | ||
@click="propertyValue.action?.(undefined)" | ||
/> | ||
|
||
<!-- actual value is keyword --> | ||
<VChip | ||
v-else-if="propertyValue.value instanceof KeywordValue" | ||
:variant="propertyValue.action ? 'outlined' : 'plain'" | ||
dense | ||
@click="propertyValue.action?.(propertyValue.value.value)" | ||
> | ||
{{ propertyValue.value.value }} | ||
</VChip> | ||
|
||
<!-- actual value is complex flag --> | ||
<VChip | ||
v-else-if="propertyValue.value instanceof ComplexFlagValue" | ||
prepend-icon="mdi-check" | ||
:variant="propertyValue.action ? 'outlined' : 'plain'" | ||
dense | ||
@click="propertyValue.action?.(propertyValue.value.value)" | ||
> | ||
{{ propertyValue.value.value }} | ||
|
||
<VTooltip v-if="propertyValue.value.description" activator="parent"> | ||
{{ propertyValue.value.description }} | ||
</VTooltip> | ||
</VChip> | ||
|
||
<!-- actual value is something else (number) --> | ||
<span v-else> | ||
{{ propertyValue.value.toString() }} | ||
</span> | ||
|
||
<!-- side note for the value --> | ||
<div v-if="propertyValue.note"> | ||
<span> | ||
<VIcon icon="mdi-alert-outline" color="warning" /> | ||
<VTooltip activator="parent"> | ||
<span>{{ propertyValue.note }}</span> | ||
</VTooltip> | ||
</span> | ||
</div> | ||
</template> | ||
|
||
</template> | ||
|
||
<style lang="scss" scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 81 additions & 15 deletions
96
src/components/lab/editor/schema-viewer/LabEditorSchemaViewerAttribute.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/components/lab/editor/schema-viewer/LabEditorSchemaViewerContainer.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.