quasar-ui-danx 0.3.11 → 0.3.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/dist/danx.es.js +172 -167
  2. package/dist/danx.es.js.map +1 -1
  3. package/dist/danx.umd.js +5 -5
  4. package/dist/danx.umd.js.map +1 -1
  5. package/dist/style.css +1 -1
  6. package/package.json +1 -1
  7. package/src/components/ActionTable/ActionMenu.vue +7 -7
  8. package/src/components/ActionTable/ActionTable.vue +33 -29
  9. package/src/components/ActionTable/ActionTableColumn.vue +37 -15
  10. package/src/components/ActionTable/ActionTableHeaderColumn.vue +9 -9
  11. package/src/components/ActionTable/Columns/ColumnListItem.vue +33 -10
  12. package/src/components/ActionTable/Columns/ColumnSettingsDialog.vue +23 -19
  13. package/src/components/ActionTable/Columns/TitleColumnFormat.vue +5 -3
  14. package/src/components/ActionTable/Columns/VisibleColumnsToggleButtons.vue +24 -22
  15. package/src/components/ActionTable/EmptyTableState.vue +4 -2
  16. package/src/components/ActionTable/Filters/CollapsableFiltersSidebar.vue +9 -9
  17. package/src/components/ActionTable/Filters/FilterFieldItem.vue +7 -5
  18. package/src/components/ActionTable/Filters/FilterFieldList.vue +21 -21
  19. package/src/components/ActionTable/Filters/FilterListToggle.vue +13 -10
  20. package/src/components/ActionTable/Filters/FilterToolbarLayout.vue +14 -7
  21. package/src/components/ActionTable/Filters/FilterableField.vue +75 -70
  22. package/src/components/ActionTable/Form/Fields/BooleanField.vue +9 -9
  23. package/src/components/ActionTable/Form/Fields/ConfirmPasswordField.vue +7 -7
  24. package/src/components/ActionTable/Form/Fields/DateField.vue +4 -4
  25. package/src/components/ActionTable/Form/Fields/DateRangeField.vue +9 -9
  26. package/src/components/ActionTable/Form/Fields/DateTimeField.vue +13 -10
  27. package/src/components/ActionTable/Form/Fields/DateTimePicker.vue +36 -14
  28. package/src/components/ActionTable/Form/Fields/EditableDiv.vue +3 -3
  29. package/src/components/ActionTable/Form/Fields/FieldLabel.vue +2 -2
  30. package/src/components/ActionTable/Form/Fields/FileUploadButton.vue +23 -20
  31. package/src/components/ActionTable/Form/Fields/InlineDateTimeField.vue +10 -10
  32. package/src/components/ActionTable/Form/Fields/IntegerField.vue +6 -6
  33. package/src/components/ActionTable/Form/Fields/LabeledInput.vue +20 -17
  34. package/src/components/ActionTable/Form/Fields/MultiFileField.vue +35 -35
  35. package/src/components/ActionTable/Form/Fields/MultiKeywordField.vue +15 -15
  36. package/src/components/ActionTable/Form/Fields/NewPasswordField.vue +4 -4
  37. package/src/components/ActionTable/Form/Fields/NumberField.vue +11 -11
  38. package/src/components/ActionTable/Form/Fields/NumberRangeField.vue +11 -11
  39. package/src/components/ActionTable/Form/Fields/SelectDrawer.vue +38 -33
  40. package/src/components/ActionTable/Form/Fields/SelectField.vue +37 -35
  41. package/src/components/ActionTable/Form/Fields/SelectWithChildrenField.vue +19 -15
  42. package/src/components/ActionTable/Form/Fields/SingleFileField.vue +29 -28
  43. package/src/components/ActionTable/Form/Fields/TextField.vue +22 -22
  44. package/src/components/ActionTable/Form/RenderedForm.vue +5 -1
  45. package/src/components/ActionTable/TableSummaryRow.vue +15 -15
  46. package/src/components/AuditHistory/AuditHistoryItem.vue +12 -6
  47. package/src/components/AuditHistory/AuditHistoryItemValue.vue +6 -6
  48. package/src/components/DragAndDrop/HandleDraggable.vue +21 -21
  49. package/src/components/DragAndDrop/ListItemDraggable.vue +19 -15
  50. package/src/components/PanelsDrawer/PanelsDrawer.vue +18 -11
  51. package/src/components/PanelsDrawer/PanelsDrawerPanels.vue +9 -5
  52. package/src/components/PanelsDrawer/PanelsDrawerTabs.vue +18 -13
  53. package/src/components/Utility/Buttons/ExportButton.vue +5 -1
  54. package/src/components/Utility/Buttons/RefreshButton.vue +2 -2
  55. package/src/components/Utility/Controls/PreviousNextControls.vue +8 -8
  56. package/src/components/Utility/Dialogs/ConfirmDialog.vue +32 -29
  57. package/src/components/Utility/Dialogs/FullScreenDialog.vue +12 -9
  58. package/src/components/Utility/Dialogs/FullscreenCarouselDialog.vue +30 -26
  59. package/src/components/Utility/Dialogs/InfoDialog.vue +25 -22
  60. package/src/components/Utility/Dialogs/InputDialog.vue +7 -7
  61. package/src/components/Utility/Files/FilePreview.vue +64 -47
  62. package/src/components/Utility/Files/SvgImg.vue +7 -4
  63. package/src/components/Utility/Formats/GpsCoordinatesFormat.vue +11 -3
  64. package/src/components/Utility/Layouts/CollapsableSidebar.vue +15 -15
  65. package/src/components/Utility/Layouts/ContentDrawer.vue +8 -8
  66. package/src/components/Utility/Popovers/InteractiveTooltip.vue +7 -7
  67. package/src/components/Utility/Popovers/PopoverMenu.vue +21 -21
  68. package/src/components/Utility/Tabs/BadgeTab.vue +9 -7
  69. package/src/components/Utility/Tools/ActionVnode.vue +5 -5
  70. package/src/components/Utility/Tools/RenderComponent.vue +11 -9
  71. package/src/components/Utility/Transitions/StaggeredListTransition.vue +7 -7
@@ -1,58 +1,58 @@
1
1
  <template>
2
2
  <div
3
- class="max-w-full relative overflow-auto"
4
- :class="{'p-4 border rounded border-gray-300': !readonly}"
5
- @dragover.prevent
6
- @drop.prevent="onDrop"
3
+ class="max-w-full relative overflow-auto"
4
+ :class="{'p-4 border rounded border-gray-300': !readonly}"
5
+ @dragover.prevent
6
+ @drop.prevent="onDrop"
7
7
  >
8
8
  <FieldLabel
9
- :field="field"
10
- :show-name="showName"
11
- class="text-sm font-semibold"
9
+ :field="field"
10
+ :show-name="showName"
11
+ class="text-sm font-semibold"
12
12
  />
13
13
  <div
14
- v-if="!disable && !readonly"
15
- class="text-sm my-2"
14
+ v-if="!disable && !readonly"
15
+ class="text-sm my-2"
16
16
  >
17
17
  <a
18
- class="text-blue-600"
19
- @click="$refs.file.click()"
18
+ class="text-blue-600"
19
+ @click="$refs.file.click()"
20
20
  >Upload</a>
21
21
  <a
22
- v-if="uploadedFiles.length > 0"
23
- class="ml-3 text-red-900"
24
- @click="clearUploadedFiles"
22
+ v-if="uploadedFiles.length > 0"
23
+ class="ml-3 text-red-900"
24
+ @click="clearUploadedFiles"
25
25
  >Clear</a>
26
26
  <input
27
- ref="file"
28
- class="hidden"
29
- type="file"
30
- multiple
31
- @change="onFilesSelected"
32
- />
27
+ ref="file"
28
+ class="hidden"
29
+ type="file"
30
+ multiple
31
+ @change="onFilesSelected"
32
+ >
33
33
  </div>
34
34
 
35
35
  <div class="max-w-[50em] flex items-stretch justify-start">
36
36
  <FilePreview
37
- v-for="file in uploadedFiles"
38
- :key="'file-upload-' + file.id"
39
- class="w-32 m-2 cursor-pointer bg-gray-200"
40
- :class="{'border border-dashed border-blue-600': !uploadedFiles.length}"
41
- :image="file"
42
- :related-files="uploadedFiles"
43
- downloadable
44
- :removable="!readonly && !disable"
45
- @remove="onRemove(file)"
37
+ v-for="file in uploadedFiles"
38
+ :key="'file-upload-' + file.id"
39
+ class="w-32 m-2 cursor-pointer bg-gray-200"
40
+ :class="{'border border-dashed border-blue-600': !uploadedFiles.length}"
41
+ :image="file"
42
+ :related-files="uploadedFiles"
43
+ downloadable
44
+ :removable="!readonly && !disable"
45
+ @remove="onRemove(file)"
46
46
  />
47
47
  <FilePreview
48
- v-if="!disable && !readonly"
49
- class="w-32 m-2 cursor-pointer border border-dashed border-blue-600"
50
- disabled
51
- @click="$refs.file.click()"
48
+ v-if="!disable && !readonly"
49
+ class="w-32 m-2 cursor-pointer border border-dashed border-blue-600"
50
+ disabled
51
+ @click="$refs.file.click()"
52
52
  />
53
53
  <div
54
- v-if="readonly && uploadedFiles.length === 0"
55
- class="p-1"
54
+ v-if="readonly && uploadedFiles.length === 0"
55
+ class="p-1"
56
56
  >
57
57
  --
58
58
  </div>
@@ -1,23 +1,23 @@
1
1
  <template>
2
2
  <div>
3
3
  <SelectField
4
- v-model="selectedFieldName"
5
- :label="undefined"
6
- :options="field.options"
7
- class="mb-2"
8
- @update:model-value="onChange"
4
+ v-model="selectedFieldName"
5
+ :label="undefined"
6
+ :options="field.options"
7
+ class="mb-2"
8
+ @update:model-value="onChange"
9
9
  />
10
10
  <TextField
11
- v-model="textInput"
12
- :field="field"
13
- :no-label="!field.label"
14
- label-class="text-xs font-bold text-zinc-800"
15
- parent-class="tight-label"
16
- input-class="!py-0"
17
- dense
18
- type="textarea"
19
- :debounce="500"
20
- @update:model-value="onChange"
11
+ v-model="textInput"
12
+ :field="field"
13
+ :no-label="!field.label"
14
+ label-class="text-xs font-bold text-zinc-800"
15
+ parent-class="tight-label"
16
+ input-class="!py-0"
17
+ dense
18
+ type="textarea"
19
+ :debounce="500"
20
+ @update:model-value="onChange"
21
21
  />
22
22
  </div>
23
23
  </template>
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <LabeledInput
3
- type="password"
4
- v-bind="props"
5
- :rules="rules"
6
- @update:model-value="$emit('update:model-value', $event)"
3
+ type="password"
4
+ v-bind="props"
5
+ :rules="rules"
6
+ @update:model-value="$emit('update:model-value', $event)"
7
7
  />
8
8
  </template>
9
9
 
@@ -1,19 +1,19 @@
1
1
  <template>
2
2
  <QInput
3
- :model-value="numberVal"
4
- :data-testid="'number-field-' + fieldOptions.id"
5
- :placeholder="fieldOptions.placeholder"
6
- outlined
7
- dense
8
- inputmode="numeric"
9
- :input-class="{[inputClass]: true, 'text-right bg-white': !hidePrependLabel, 'text-right !text-xs text-black font-normal': hidePrependLabel}"
10
- :class="{'no-prepend-icon w-32 max-w-full': hidePrependLabel, 'prepend-label': !hidePrependLabel}"
11
- @update:model-value="onInput"
3
+ :model-value="numberVal"
4
+ :data-testid="'number-field-' + fieldOptions.id"
5
+ :placeholder="fieldOptions.placeholder"
6
+ outlined
7
+ dense
8
+ inputmode="numeric"
9
+ :input-class="{[inputClass]: true, 'text-right bg-white': !hidePrependLabel, 'text-right !text-xs text-black font-normal': hidePrependLabel}"
10
+ :class="{'no-prepend-icon w-32 max-w-full': hidePrependLabel, 'prepend-label': !hidePrependLabel}"
11
+ @update:model-value="onInput"
12
12
  >
13
13
  <template #prepend>
14
14
  <FieldLabel
15
- :field="fieldOptions"
16
- :show-name="showName"
15
+ :field="fieldOptions"
16
+ :show-name="showName"
17
17
  />
18
18
  </template>
19
19
  </QInput>
@@ -1,15 +1,15 @@
1
1
  <template>
2
2
  <div>
3
3
  <div
4
- v-if="label"
5
- class="font-bold text-xs mb-2"
4
+ v-if="label"
5
+ class="font-bold text-xs mb-2"
6
6
  >
7
7
  {{ label }}
8
8
  </div>
9
9
  <div class="flex items-center flex-nowrap cursor-pointer">
10
10
  <component
11
- :is="previewIcon"
12
- class="w-5 text-blue-600"
11
+ :is="previewIcon"
12
+ class="w-5 text-blue-600"
13
13
  />
14
14
  <div class="text-sm ml-3 hover:text-blue-600 whitespace-nowrap">
15
15
  <template v-if="range">
@@ -22,15 +22,15 @@
22
22
  </div>
23
23
  <QPopupProxy>
24
24
  <NumberField
25
- v-model="range.from"
26
- :field="minField"
27
- @update:model-value="onSave"
25
+ v-model="range.from"
26
+ :field="minField"
27
+ @update:model-value="onSave"
28
28
  />
29
29
  <NumberField
30
- v-model="range.to"
31
- class="mt-2"
32
- :field="maxField"
33
- @update:model-value="onSave"
30
+ v-model="range.to"
31
+ class="mt-2"
32
+ :field="maxField"
33
+ @update:model-value="onSave"
34
34
  />
35
35
  </QPopupProxy>
36
36
  </div>
@@ -1,49 +1,52 @@
1
1
  <template>
2
2
  <div>
3
3
  <ContentDrawer
4
- v-model:show="showDrawer"
5
- content-class=""
6
- position="bottom"
7
- :title="'Filter ' + label"
4
+ v-model:show="showDrawer"
5
+ content-class=""
6
+ position="bottom"
7
+ :title="'Filter ' + label"
8
8
  >
9
9
  <div
10
- v-for="option in formattedOptions"
11
- :key="'select-drawer-' + option.value"
12
- :data-dusk="'drawer-opt-' + option.value"
13
- class="cursor-pointer hover:bg-slate-200 px-8 py-3 flex items-center border-b border-slate-200"
14
- @click="toggleSelect(option)"
10
+ v-for="option in formattedOptions"
11
+ :key="'select-drawer-' + option.value"
12
+ :data-dusk="'drawer-opt-' + option.value"
13
+ class="cursor-pointer hover:bg-slate-200 px-8 py-3 flex items-center border-b border-slate-200"
14
+ @click="toggleSelect(option)"
15
15
  >
16
16
  <QCheckbox
17
- @click.stop="toggleSelect(option)"
18
- :model-value="isSelected(option)"
19
- class="mr-2"
17
+ :model-value="isSelected(option)"
18
+ class="mr-2"
19
+ @click.stop="toggleSelect(option)"
20
20
  />
21
21
  <slot
22
- name="option"
23
- :opt="option"
24
- >{{ option.label }}
22
+ name="option"
23
+ :opt="option"
24
+ >
25
+ {{ option.label }}
25
26
  </slot>
26
27
  </div>
27
28
  </ContentDrawer>
28
29
 
29
30
  <QChip
30
- ref="select"
31
- outline
32
- clickable
33
- size="16px"
34
- @click="showDrawer = true"
31
+ ref="select"
32
+ outline
33
+ clickable
34
+ size="16px"
35
+ @click="showDrawer = true"
35
36
  >
36
37
  <slot name="selected">
37
- <slot name="label">{{ label }}:&nbsp;</slot>
38
+ <slot name="label">
39
+ {{ label }}:&nbsp;
40
+ </slot>
38
41
  <template v-if="modelValue && modelValue.length > 0">
39
42
  <slot name="selection">
40
43
  <template v-if="multiple">
41
44
  {{ getOptionLabel(modelValue[0]) }}
42
45
  <template
43
- v-if="modelValue.length > 1"
44
- >+ {{ modelValue.length - 1 }}
45
- </template
46
+ v-if="modelValue.length > 1"
46
47
  >
48
+ + {{ modelValue.length - 1 }}
49
+ </template>
47
50
  </template>
48
51
  <template v-else>
49
52
  {{ getOptionLabel(modelValue) }}
@@ -51,7 +54,9 @@
51
54
  </slot>
52
55
  </template>
53
56
  <template v-else>
54
- <slot name="placeholder">{{ placeholder }}</slot>
57
+ <slot name="placeholder">
58
+ {{ placeholder }}
59
+ </slot>
55
60
  </template>
56
61
  </slot>
57
62
  </QChip>
@@ -85,14 +90,14 @@ const props = defineProps({
85
90
 
86
91
  const showDrawer = ref(false);
87
92
  const formattedOptions = computed(() =>
88
- props.options.map((opt) =>
89
- typeof opt === "string"
90
- ? {
91
- label: opt,
92
- value: opt
93
- }
94
- : opt
95
- )
93
+ props.options.map((opt) =>
94
+ typeof opt === "string"
95
+ ? {
96
+ label: opt,
97
+ value: opt
98
+ }
99
+ : opt
100
+ )
96
101
  );
97
102
 
98
103
  function getOptionValue(option) {
@@ -1,50 +1,51 @@
1
1
  <template>
2
2
  <div>
3
3
  <QSelect
4
- ref="selectField"
5
- v-bind="$props"
6
- :model-value="selectedValue"
7
- outlined
8
- hide-dropdown-icon
9
- dense
10
- emit-value
11
- :use-input="filterable"
12
- :hide-selected="filterable && isShowing && !$props.multiple"
13
- :input-debounce="100"
14
- :options="filteredOptions"
15
- option-label="label"
16
- option-value="value"
17
- placeholder=""
18
- :input-class="{'is-hidden': !isShowing, [inputClass]: true}"
19
- class="max-w-full"
20
- @filter="onFilter"
21
- @clear="onClear"
22
- @popup-show="onShow"
23
- @popup-hide="onHide"
24
- @update:model-value="onUpdate"
4
+ ref="selectField"
5
+ v-bind="$props"
6
+ :model-value="selectedValue"
7
+ outlined
8
+ hide-dropdown-icon
9
+ dense
10
+ emit-value
11
+ :use-input="filterable"
12
+ :hide-selected="filterable && isShowing && !$props.multiple"
13
+ :input-debounce="100"
14
+ :options="filteredOptions"
15
+ option-label="label"
16
+ option-value="value"
17
+ placeholder=""
18
+ :input-class="{'is-hidden': !isShowing, [inputClass]: true}"
19
+ class="max-w-full"
20
+ @filter="onFilter"
21
+ @clear="onClear"
22
+ @popup-show="onShow"
23
+ @popup-hide="onHide"
24
+ @update:model-value="onUpdate"
25
25
  >
26
26
  <template #append>
27
27
  <DropDownIcon
28
- class="w-4 transition"
29
- :class="isShowing ? 'rotate-180' : ''"
28
+ class="w-4 transition"
29
+ :class="isShowing ? 'rotate-180' : ''"
30
30
  />
31
31
  </template>
32
32
  <template #selected>
33
33
  <div
34
- v-if="$props.multiple"
35
- class="flex gap-y-1 overflow-hidden"
36
- :class="{'flex-nowrap gap-y-0': chipLimit === 1, [selectionClass]: true}"
34
+ v-if="$props.multiple"
35
+ class="flex gap-y-1 overflow-hidden"
36
+ :class="{'flex-nowrap gap-y-0': chipLimit === 1, [selectionClass]: true}"
37
37
  >
38
38
  <template v-if="chipOptions.length > 0">
39
39
  <QChip
40
- v-for="chipOption in chipOptions"
41
- :key="'selected-' + chipOption.label"
42
- class="!mr-1"
43
- >{{ chipOption.label }}
40
+ v-for="chipOption in chipOptions"
41
+ :key="'selected-' + chipOption.label"
42
+ class="!mr-1"
43
+ >
44
+ {{ chipOption.label }}
44
45
  </QChip>
45
46
  <QChip
46
- v-if="selectedOptions.length > chipOptions.length"
47
- class="!mr-1"
47
+ v-if="selectedOptions.length > chipOptions.length"
48
+ class="!mr-1"
48
49
  >
49
50
  +{{ selectedOptions.length - chipOptions.length }}
50
51
  </QChip>
@@ -54,9 +55,10 @@
54
55
  </template>
55
56
  </div>
56
57
  <div
57
- v-else
58
- :class="selectionClass"
59
- >{{ selectedLabel }}
58
+ v-else
59
+ :class="selectionClass"
60
+ >
61
+ {{ selectedLabel }}
60
62
  </div>
61
63
  </template>
62
64
  </QSelect>
@@ -1,28 +1,32 @@
1
1
  <template>
2
2
  <div>
3
3
  <template v-if="!loading && !options.length">
4
- <div class="text-zinc-500">No options available</div>
4
+ <div class="text-zinc-500">
5
+ No options available
6
+ </div>
5
7
  </template>
6
8
  <SelectField
7
- v-model="selectedOption"
8
- :options="options"
9
- :label="label"
10
- :placeholder="placeholder"
11
- :option-value="opt => opt"
12
- :loading="loading"
13
- @update:model-value="onSelectOption"
9
+ v-model="selectedOption"
10
+ :options="options"
11
+ :label="label"
12
+ :placeholder="placeholder"
13
+ :option-value="opt => opt"
14
+ :loading="loading"
15
+ @update:model-value="onSelectOption"
14
16
  />
15
17
  <div v-if="selectedOption">
16
18
  <QCheckbox
17
- v-for="child in selectedOption.children"
18
- :key="child.id"
19
- :model-value="selectedChildren.includes(child.id)"
20
- :field="child"
21
- class="mt-3"
22
- @update:model-value="onSelectChild(child)"
19
+ v-for="child in selectedOption.children"
20
+ :key="child.id"
21
+ :model-value="selectedChildren.includes(child.id)"
22
+ :field="child"
23
+ class="mt-3"
24
+ @update:model-value="onSelectChild(child)"
23
25
  >
24
26
  <div>{{ child.label }}</div>
25
- <div class="text-xs text-zinc-500">{{ child.name }}</div>
27
+ <div class="text-xs text-zinc-500">
28
+ {{ child.name }}
29
+ </div>
26
30
  </QCheckbox>
27
31
  </div>
28
32
  </div>
@@ -1,48 +1,49 @@
1
1
  <template>
2
2
  <div
3
- class="max-w-full relative overflow-auto"
4
- :class="{'p-4 border rounded border-gray-300 text-center': !readonly}"
5
- @dragover.prevent
6
- @drop.prevent="onDrop"
3
+ class="max-w-full relative overflow-auto"
4
+ :class="{'p-4 border rounded border-gray-300 text-center': !readonly}"
5
+ @dragover.prevent
6
+ @drop.prevent="onDrop"
7
7
  >
8
8
  <FieldLabel
9
- :field="field"
10
- :show-name="showName"
11
- class="text-sm font-semibold"
9
+ :field="field"
10
+ :show-name="showName"
11
+ class="text-sm font-semibold"
12
12
  />
13
13
  <div
14
- v-if="!disable && !readonly"
15
- class="text-sm mt-2"
14
+ v-if="!disable && !readonly"
15
+ class="text-sm mt-2"
16
16
  >
17
17
  <a
18
- class="text-blue-600"
19
- @click="$refs.file.click()"
18
+ class="text-blue-600"
19
+ @click="$refs.file.click()"
20
20
  >Upload</a>
21
21
  <a
22
- v-if="uploadedFile"
23
- class="ml-3 text-red-900"
24
- @click="clearUploadedFile"
22
+ v-if="uploadedFile"
23
+ class="ml-3 text-red-900"
24
+ @click="clearUploadedFile"
25
25
  >Clear</a>
26
26
  <input
27
- ref="file"
28
- class="hidden"
29
- type="file"
30
- @change="onFileSelected"
31
- />
27
+ ref="file"
28
+ class="hidden"
29
+ type="file"
30
+ @change="onFileSelected"
31
+ >
32
32
  </div>
33
33
 
34
34
  <FilePreview
35
- v-if="!readonly || uploadedFile"
36
- class="w-32 cursor-pointer mt-2"
37
- :class="{'border border-dashed border-blue-600': !uploadedFile, 'mx-auto': !readonly}"
38
- :image="uploadedFile"
39
- downloadable
40
- @click="!disable && $refs.file.click()"
35
+ v-if="!readonly || uploadedFile"
36
+ class="w-32 cursor-pointer mt-2"
37
+ :class="{'border border-dashed border-blue-600': !uploadedFile, 'mx-auto': !readonly}"
38
+ :image="uploadedFile"
39
+ downloadable
40
+ @click="!disable && $refs.file.click()"
41
41
  />
42
42
  <div
43
- v-else-if="readonly"
44
- class="py-1"
45
- >--
43
+ v-else-if="readonly"
44
+ class="py-1"
45
+ >
46
+ --
46
47
  </div>
47
48
  </div>
48
49
  </template>
@@ -1,36 +1,36 @@
1
1
  <template>
2
2
  <div>
3
3
  <QInput
4
- v-if="!readonly"
5
- :data-dusk="'text-field-' + field?.id"
6
- :data-testid="'text-field-' + field?.id"
7
- :placeholder="field?.placeholder"
8
- outlined
9
- dense
10
- :disable="disabled"
11
- :label-slot="!noLabel"
12
- :input-class="inputClass"
13
- :class="parentClass"
14
- stack-label
15
- :type="type"
16
- :model-value="modelValue"
17
- :debounce="debounce"
18
- @keydown.enter="$emit('submit')"
19
- @update:model-value="$emit('update:model-value', $event)"
4
+ v-if="!readonly"
5
+ :data-dusk="'text-field-' + field?.id"
6
+ :data-testid="'text-field-' + field?.id"
7
+ :placeholder="field?.placeholder"
8
+ outlined
9
+ dense
10
+ :disable="disabled"
11
+ :label-slot="!noLabel"
12
+ :input-class="inputClass"
13
+ :class="parentClass"
14
+ stack-label
15
+ :type="type"
16
+ :model-value="modelValue"
17
+ :debounce="debounce"
18
+ @keydown.enter="$emit('submit')"
19
+ @update:model-value="$emit('update:model-value', $event)"
20
20
  >
21
21
  <template #label>
22
22
  <FieldLabel
23
- :field="field"
24
- :label="label"
25
- :show-name="showName"
26
- :class="labelClass"
23
+ :field="field"
24
+ :label="label"
25
+ :show-name="showName"
26
+ :class="labelClass"
27
27
  />
28
28
  </template>
29
29
  </QInput>
30
30
  <div v-if="readonly">
31
31
  <LabelValueBlock
32
- :label="label || field.label"
33
- :value="modelValue"
32
+ :label="label || field.label"
33
+ :value="modelValue"
34
34
  />
35
35
  </div>
36
36
  </div>
@@ -137,6 +137,10 @@ const props = defineProps({
137
137
  disable: Boolean,
138
138
  readonly: Boolean,
139
139
  saving: Boolean,
140
+ emptyValue: {
141
+ type: [String, Number, Boolean],
142
+ default: undefined
143
+ },
140
144
  canModifyVariations: Boolean
141
145
  });
142
146
 
@@ -186,7 +190,7 @@ function onInput(name, value) {
186
190
  const newFieldResponse = {
187
191
  name,
188
192
  variation: currentVariation.value || "",
189
- value
193
+ value: value === undefined ? props.emptyValue : value
190
194
  };
191
195
  const newValues = replace(props.values, fieldResponse, newFieldResponse, true);
192
196
  emit("update:values", newValues);