quasar-ui-danx 0.2.15 → 0.2.17
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/danx.es.js +2 -2
- package/dist/danx.es.js.map +1 -1
- package/dist/danx.umd.js +1 -1
- package/dist/danx.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ActionTable/ActionMenu.vue +4 -4
- package/src/components/ActionTable/ActionTable.vue +12 -12
- package/src/components/ActionTable/ActionTableColumn.vue +11 -11
- package/src/components/ActionTable/Columns/ColumnListItem.vue +2 -2
- package/src/components/ActionTable/Columns/ColumnSettingsDialog.vue +8 -8
- package/src/components/ActionTable/Columns/TitleColumnFormat.vue +1 -1
- package/src/components/ActionTable/Columns/VisibleColumnsToggleButtons.vue +7 -7
- package/src/components/ActionTable/EmptyTableState.vue +4 -4
- package/src/components/ActionTable/Filters/CollapsableFiltersSidebar.vue +3 -3
- package/src/components/ActionTable/Filters/FilterFieldList.vue +6 -6
- package/src/components/ActionTable/Filters/FilterListToggle.vue +3 -3
- package/src/components/ActionTable/Filters/FilterToolbarLayout.vue +3 -3
- package/src/components/ActionTable/Filters/FilterableField.vue +6 -6
- package/src/components/ActionTable/Form/Fields/BooleanField.vue +4 -4
- package/src/components/ActionTable/Form/Fields/ConfirmPasswordField.vue +7 -7
- package/src/components/ActionTable/Form/Fields/DateField.vue +6 -6
- package/src/components/ActionTable/Form/Fields/DateRangeField.vue +13 -13
- package/src/components/ActionTable/Form/Fields/DateTimeField.vue +6 -6
- package/src/components/ActionTable/Form/Fields/DateTimePicker.vue +6 -6
- package/src/components/ActionTable/Form/Fields/EditableDiv.vue +3 -3
- package/src/components/ActionTable/Form/Fields/FieldLabel.vue +2 -2
- package/src/components/ActionTable/Form/Fields/FileUploadButton.vue +15 -15
- package/src/components/ActionTable/Form/Fields/InlineDateTimeField.vue +7 -7
- package/src/components/ActionTable/Form/Fields/IntegerField.vue +2 -2
- package/src/components/ActionTable/Form/Fields/LabeledInput.vue +2 -2
- package/src/components/ActionTable/Form/Fields/MultiFileField.vue +6 -6
- package/src/components/ActionTable/Form/Fields/MultiKeywordField.vue +8 -8
- package/src/components/ActionTable/Form/Fields/NewPasswordField.vue +6 -6
- package/src/components/ActionTable/Form/Fields/NumberField.vue +20 -20
- package/src/components/ActionTable/Form/Fields/NumberRangeField.vue +20 -20
- package/src/components/ActionTable/Form/Fields/SelectDrawer.vue +8 -8
- package/src/components/ActionTable/Form/Fields/SelectField.vue +36 -36
- package/src/components/ActionTable/Form/Fields/SelectWithChildrenField.vue +9 -9
- package/src/components/ActionTable/Form/Fields/SingleFileField.vue +6 -6
- package/src/components/ActionTable/Form/Fields/TextField.vue +15 -15
- package/src/components/ActionTable/Form/Fields/WysiwygField.vue +4 -4
- package/src/components/ActionTable/Form/RenderedForm.vue +5 -5
- package/src/components/ActionTable/TableSummaryRow.vue +8 -8
- package/src/components/ActionTable/listControls.ts +5 -5
- package/src/components/ActionTable/listHelpers.ts +1 -1
- package/src/components/ActionTable/tableColumns.ts +24 -1
- package/src/components/AuditHistory/AuditHistoryItem.vue +4 -4
- package/src/components/AuditHistory/AuditHistoryItemValue.vue +10 -10
- package/src/components/DragAndDrop/HandleDraggable.vue +8 -8
- package/src/components/DragAndDrop/ListItemDraggable.vue +8 -8
- package/src/components/DragAndDrop/dragAndDrop.ts +219 -219
- package/src/components/DragAndDrop/listDragAndDrop.ts +4 -4
- package/src/components/PanelsDrawer/PanelsDrawer.vue +8 -8
- package/src/components/PanelsDrawer/PanelsDrawerPanels.vue +1 -1
- package/src/components/PanelsDrawer/PanelsDrawerTabs.vue +4 -4
- package/src/components/Utility/Buttons/ExportButton.vue +4 -4
- package/src/components/Utility/Buttons/RefreshButton.vue +2 -2
- package/src/components/Utility/Controls/PreviousNextControls.vue +2 -2
- package/src/components/Utility/Dialogs/ConfirmDialog.vue +14 -14
- package/src/components/Utility/Dialogs/FullScreenDialog.vue +8 -8
- package/src/components/Utility/Dialogs/FullscreenCarouselDialog.vue +11 -11
- package/src/components/Utility/Dialogs/InfoDialog.vue +12 -12
- package/src/components/Utility/Dialogs/InputDialog.vue +5 -5
- package/src/components/Utility/Files/FilePreview.vue +10 -10
- package/src/components/Utility/Formats/GpsCoordinatesFormat.vue +4 -4
- package/src/components/Utility/Formats/IconWithTextFormat.vue +2 -2
- package/src/components/Utility/Formats/LabelValueFormat.vue +2 -2
- package/src/components/Utility/Layouts/CollapsableSidebar.vue +15 -15
- package/src/components/Utility/Layouts/ContentDrawer.vue +6 -6
- package/src/components/Utility/Popovers/InteractiveTooltip.vue +4 -4
- package/src/components/Utility/Popovers/PopoverMenu.vue +49 -49
- package/src/components/Utility/Tabs/BadgeTab.vue +1 -1
- package/src/components/Utility/Tabs/IndicatorTab.vue +3 -3
- package/src/components/Utility/Tools/ActionVnode.vue +3 -3
- package/src/components/Utility/Tools/RenderComponent.vue +3 -3
- package/src/components/Utility/Transitions/StaggeredListTransition.vue +3 -3
- package/src/helpers/array.ts +16 -16
- package/src/helpers/storage.ts +5 -5
- package/src/helpers/utils.ts +1 -1
- package/src/index.common.js +1 -2
- package/src/index.esm.js +1 -1
- package/src/index.umd.js +2 -2
- package/src/svg/CaretDownIcon.svg +1 -1
- package/src/svg/DragHandleDotsIcon.svg +3 -3
- package/src/svg/DragHandleIcon.svg +3 -3
- package/src/svg/FilterIcon.svg +5 -5
- package/src/svg/ImageIcon.svg +27 -27
- package/src/svg/PdfIcon.svg +5 -5
- package/src/svg/SkipNextIcon.svg +3 -3
- package/src/svg/SkipPreviousIcon.svg +3 -3
- package/src/svg/TrashIcon.svg +12 -12
- package/src/svg/WarningIcon.svg +3 -3
- package/src/svg/XIcon.svg +15 -15
- package/src/vue-plugin.js +5 -5
- package/vite.config.js +7 -0
@@ -16,20 +16,20 @@
|
|
16
16
|
:show-name="showName"
|
17
17
|
/>
|
18
18
|
</template>
|
19
|
-
|
19
|
+
</QInput>
|
20
20
|
</template>
|
21
21
|
|
22
22
|
<script setup>
|
23
|
-
import { useDebounceFn } from
|
24
|
-
import { computed, nextTick, ref, watch } from
|
25
|
-
import { fNumber } from
|
26
|
-
import FieldLabel from
|
23
|
+
import { useDebounceFn } from "@vueuse/core";
|
24
|
+
import { computed, nextTick, ref, watch } from "vue";
|
25
|
+
import { fNumber } from "../../../../helpers";
|
26
|
+
import FieldLabel from "./FieldLabel";
|
27
27
|
|
28
|
-
const emit = defineEmits([
|
28
|
+
const emit = defineEmits(["update:model-value", "update"]);
|
29
29
|
const props = defineProps({
|
30
30
|
modelValue: {
|
31
31
|
type: [String, Number],
|
32
|
-
default:
|
32
|
+
default: ""
|
33
33
|
},
|
34
34
|
precision: {
|
35
35
|
type: Number,
|
@@ -45,7 +45,7 @@ const props = defineProps({
|
|
45
45
|
},
|
46
46
|
inputClass: {
|
47
47
|
type: String,
|
48
|
-
default:
|
48
|
+
default: ""
|
49
49
|
},
|
50
50
|
delay: {
|
51
51
|
type: Number,
|
@@ -59,47 +59,47 @@ const props = defineProps({
|
|
59
59
|
const numberVal = ref(format(props.modelValue));
|
60
60
|
watch(() => props.modelValue, () => numberVal.value = format(props.modelValue));
|
61
61
|
|
62
|
-
const fieldOptions = computed(() => props.field || { label: props.label ||
|
62
|
+
const fieldOptions = computed(() => props.field || { label: props.label || "", placeholder: "", id: "" });
|
63
63
|
|
64
64
|
function format(number) {
|
65
|
-
if (!number && number !== 0 && number !==
|
65
|
+
if (!number && number !== 0 && number !== "0") return number;
|
66
66
|
|
67
|
-
const minimumFractionDigits = Math.min(props.precision, (
|
67
|
+
const minimumFractionDigits = Math.min(props.precision, ("" + number).split(".")[1]?.length || 0);
|
68
68
|
let options = {
|
69
69
|
minimumFractionDigits
|
70
70
|
};
|
71
71
|
|
72
72
|
if (props.currency) {
|
73
73
|
options = {
|
74
|
-
style:
|
75
|
-
currency:
|
74
|
+
style: "currency",
|
75
|
+
currency: "USD",
|
76
76
|
minimumFractionDigits
|
77
77
|
};
|
78
78
|
}
|
79
79
|
return fNumber(number, options);
|
80
80
|
}
|
81
81
|
|
82
|
-
const onUpdateDebounced = useDebounceFn((val) => emit(
|
82
|
+
const onUpdateDebounced = useDebounceFn((val) => emit("update", val), props.delay);
|
83
83
|
|
84
84
|
function onInput(value) {
|
85
|
-
let number =
|
85
|
+
let number = "";
|
86
86
|
|
87
87
|
// Prevent invalid characters
|
88
88
|
if (value.match(/[^\d.,$]/)) {
|
89
89
|
const oldVal = numberVal.value;
|
90
90
|
// XXX: To get QInput to show only the value we want
|
91
|
-
numberVal.value +=
|
91
|
+
numberVal.value += " ";
|
92
92
|
return nextTick(() => numberVal.value = oldVal);
|
93
93
|
}
|
94
94
|
|
95
|
-
if (value !==
|
96
|
-
value = value.replace(/[^\d.]/g,
|
95
|
+
if (value !== "") {
|
96
|
+
value = value.replace(/[^\d.]/g, "");
|
97
97
|
number = Number(value);
|
98
98
|
numberVal.value = format(number);
|
99
99
|
}
|
100
100
|
|
101
|
-
number = number ===
|
102
|
-
emit(
|
101
|
+
number = number === "" ? undefined : number;
|
102
|
+
emit("update:model-value", number);
|
103
103
|
|
104
104
|
// Delay the change event, so we only see the value after the user has finished
|
105
105
|
onUpdateDebounced(number);
|
@@ -37,14 +37,14 @@
|
|
37
37
|
</template>
|
38
38
|
|
39
39
|
<script setup>
|
40
|
-
import { CurrencyDollarIcon as CurrencyIcon, HashtagIcon as NumberIcon } from
|
41
|
-
import { useDebounceFn } from
|
42
|
-
import { computed, ref, watch } from
|
43
|
-
import { fCurrency, fNumber, fPercent } from
|
44
|
-
import { PercentIcon } from
|
45
|
-
import NumberField from
|
40
|
+
import { CurrencyDollarIcon as CurrencyIcon, HashtagIcon as NumberIcon } from "@heroicons/vue/outline";
|
41
|
+
import { useDebounceFn } from "@vueuse/core";
|
42
|
+
import { computed, ref, watch } from "vue";
|
43
|
+
import { fCurrency, fNumber, fPercent } from "../../../../helpers";
|
44
|
+
import { PercentIcon } from "../../../../svg";
|
45
|
+
import NumberField from "./NumberField";
|
46
46
|
|
47
|
-
const emit = defineEmits([
|
47
|
+
const emit = defineEmits(["update:model-value"]);
|
48
48
|
const props = defineProps({
|
49
49
|
modelValue: {
|
50
50
|
type: Object,
|
@@ -68,28 +68,28 @@ const props = defineProps({
|
|
68
68
|
|
69
69
|
const symbol = computed(() => {
|
70
70
|
if (props.currency) {
|
71
|
-
return
|
71
|
+
return "$";
|
72
72
|
} else if (props.percent) {
|
73
|
-
return
|
73
|
+
return "%";
|
74
74
|
} else {
|
75
|
-
return
|
75
|
+
return "";
|
76
76
|
}
|
77
77
|
});
|
78
78
|
const minField = computed(() => {
|
79
79
|
return {
|
80
|
-
id:
|
81
|
-
name:
|
82
|
-
label:
|
83
|
-
placeholder:
|
80
|
+
id: "min-field",
|
81
|
+
name: "from",
|
82
|
+
label: "Min" + symbol.value,
|
83
|
+
placeholder: "0"
|
84
84
|
};
|
85
85
|
});
|
86
86
|
|
87
87
|
const maxField = computed(() => {
|
88
88
|
return {
|
89
|
-
id:
|
90
|
-
name:
|
91
|
-
label:
|
92
|
-
placeholder:
|
89
|
+
id: "max-field",
|
90
|
+
name: "to",
|
91
|
+
label: "Max" + symbol.value,
|
92
|
+
placeholder: "No Limit"
|
93
93
|
};
|
94
94
|
});
|
95
95
|
|
@@ -112,7 +112,7 @@ setRange(props.modelValue || { from: undefined, to: undefined });
|
|
112
112
|
* @returns {string}
|
113
113
|
*/
|
114
114
|
function formatNum(num) {
|
115
|
-
if (num === undefined) return
|
115
|
+
if (num === undefined) return "No Limit";
|
116
116
|
if (props.currency) {
|
117
117
|
return fCurrency(num);
|
118
118
|
}
|
@@ -134,7 +134,7 @@ const onSave = useDebounceFn(() => {
|
|
134
134
|
from: (range.value.from ? range.value.from * multiplier : undefined),
|
135
135
|
to: (range.value.to ? range.value.to * multiplier : undefined)
|
136
136
|
};
|
137
|
-
emit(
|
137
|
+
emit("update:model-value", newVal);
|
138
138
|
}
|
139
139
|
}, props.debounce);
|
140
140
|
</script>
|
@@ -53,15 +53,15 @@
|
|
53
53
|
<slot name="placeholder">{{ placeholder }}</slot>
|
54
54
|
</template>
|
55
55
|
</slot>
|
56
|
-
|
56
|
+
</QChip>
|
57
57
|
</div>
|
58
58
|
</template>
|
59
59
|
|
60
60
|
<script setup>
|
61
|
-
import { computed, ref } from
|
62
|
-
import { ContentDrawer } from
|
61
|
+
import { computed, ref } from "vue";
|
62
|
+
import { ContentDrawer } from "../../../Utility";
|
63
63
|
|
64
|
-
const emit = defineEmits([
|
64
|
+
const emit = defineEmits(["update:modelValue"]);
|
65
65
|
const props = defineProps({
|
66
66
|
modelValue: {
|
67
67
|
type: [Object, String, Array, null],
|
@@ -74,18 +74,18 @@ const props = defineProps({
|
|
74
74
|
multiple: Boolean,
|
75
75
|
label: {
|
76
76
|
type: String,
|
77
|
-
default:
|
77
|
+
default: "Select"
|
78
78
|
},
|
79
79
|
placeholder: {
|
80
80
|
type: String,
|
81
|
-
default:
|
81
|
+
default: "All"
|
82
82
|
}
|
83
83
|
});
|
84
84
|
|
85
85
|
const showDrawer = ref(false);
|
86
86
|
const formattedOptions = computed(() =>
|
87
87
|
props.options.map((opt) =>
|
88
|
-
typeof opt ===
|
88
|
+
typeof opt === "string"
|
89
89
|
? {
|
90
90
|
label: opt,
|
91
91
|
value: opt
|
@@ -131,6 +131,6 @@ function toggleSelect(option) {
|
|
131
131
|
}
|
132
132
|
}
|
133
133
|
|
134
|
-
emit(
|
134
|
+
emit("update:modelValue", selection);
|
135
135
|
}
|
136
136
|
</script>
|
@@ -41,13 +41,13 @@
|
|
41
41
|
:key="'selected-' + chipOption.label"
|
42
42
|
class="!mr-1"
|
43
43
|
>{{ chipOption.label }}
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
44
|
+
</QChip>
|
45
|
+
<QChip
|
46
|
+
v-if="selectedOptions.length > chipOptions.length"
|
47
|
+
class="!mr-1"
|
48
|
+
>
|
49
|
+
+{{ selectedOptions.length - chipOptions.length }}
|
50
|
+
</QChip>
|
51
51
|
</template>
|
52
52
|
<template v-else>
|
53
53
|
{{ placeholder }}
|
@@ -59,15 +59,15 @@
|
|
59
59
|
>{{ selectedLabel }}
|
60
60
|
</div>
|
61
61
|
</template>
|
62
|
-
|
62
|
+
</QSelect>
|
63
63
|
</div>
|
64
64
|
</template>
|
65
65
|
<script setup>
|
66
|
-
import { ChevronDownIcon as DropDownIcon } from
|
67
|
-
import { QSelect } from
|
68
|
-
import { computed, isRef, nextTick, ref } from
|
66
|
+
import { ChevronDownIcon as DropDownIcon } from "@heroicons/vue/outline";
|
67
|
+
import { QSelect } from "quasar";
|
68
|
+
import { computed, isRef, nextTick, ref } from "vue";
|
69
69
|
|
70
|
-
const emit = defineEmits([
|
70
|
+
const emit = defineEmits(["update:model-value", "search", "update"]);
|
71
71
|
const props = defineProps({
|
72
72
|
...QSelect.props,
|
73
73
|
modelValue: {
|
@@ -76,7 +76,7 @@ const props = defineProps({
|
|
76
76
|
},
|
77
77
|
placeholder: {
|
78
78
|
type: String,
|
79
|
-
default:
|
79
|
+
default: ""
|
80
80
|
},
|
81
81
|
selectionLabel: {
|
82
82
|
type: String,
|
@@ -88,11 +88,11 @@ const props = defineProps({
|
|
88
88
|
},
|
89
89
|
inputClass: {
|
90
90
|
type: String,
|
91
|
-
default:
|
91
|
+
default: ""
|
92
92
|
},
|
93
93
|
selectionClass: {
|
94
94
|
type: String,
|
95
|
-
default:
|
95
|
+
default: ""
|
96
96
|
},
|
97
97
|
options: {
|
98
98
|
type: Array,
|
@@ -148,10 +148,10 @@ const selectedValue = computed(() => {
|
|
148
148
|
if (props.multiple) {
|
149
149
|
const arrVal = Array.isArray(props.modelValue) ? props.modelValue : [];
|
150
150
|
return arrVal.map((v) => {
|
151
|
-
return v === null ?
|
151
|
+
return v === null ? "__null__" : v;
|
152
152
|
}) || [];
|
153
153
|
} else {
|
154
|
-
return props.modelValue === null ?
|
154
|
+
return props.modelValue === null ? "__null__" : props.modelValue;
|
155
155
|
}
|
156
156
|
});
|
157
157
|
|
@@ -165,7 +165,7 @@ const selectedOptions = computed(() => {
|
|
165
165
|
values = (values || values === 0) ? [values] : [];
|
166
166
|
}
|
167
167
|
return computedOptions.value.filter((o) => {
|
168
|
-
return values.includes(o.value) || values.map(v => typeof v ===
|
168
|
+
return values.includes(o.value) || values.map(v => typeof v === "object" && v.id).includes(o.value?.id);
|
169
169
|
});
|
170
170
|
});
|
171
171
|
|
@@ -175,10 +175,10 @@ const selectedOptions = computed(() => {
|
|
175
175
|
* @type {ComputedRef<unknown>}
|
176
176
|
*/
|
177
177
|
const selectedLabel = computed(() => {
|
178
|
-
if (props.filterable && isShowing.value) return
|
178
|
+
if (props.filterable && isShowing.value) return "";
|
179
179
|
|
180
180
|
if (!selectedOptions.value || selectedOptions.value.length === 0) {
|
181
|
-
return props.placeholder ||
|
181
|
+
return props.placeholder || "(Select Option)";
|
182
182
|
}
|
183
183
|
return selectedOptions.value[0].selectionLabel;
|
184
184
|
});
|
@@ -197,13 +197,13 @@ const chipOptions = computed(() => {
|
|
197
197
|
* @returns {*|string}
|
198
198
|
*/
|
199
199
|
function resolveLabel(option) {
|
200
|
-
if (typeof option ===
|
200
|
+
if (typeof option === "string") {
|
201
201
|
return option;
|
202
202
|
}
|
203
|
-
if (typeof props.optionLabel ===
|
203
|
+
if (typeof props.optionLabel === "string") {
|
204
204
|
return option[props.optionLabel];
|
205
205
|
}
|
206
|
-
if (typeof props.optionLabel ===
|
206
|
+
if (typeof props.optionLabel === "function") {
|
207
207
|
return props.optionLabel(option);
|
208
208
|
}
|
209
209
|
return option?.label;
|
@@ -216,13 +216,13 @@ function resolveLabel(option) {
|
|
216
216
|
* @returns {*|{default: null, type: String | StringConstructor}|string}
|
217
217
|
*/
|
218
218
|
function resolveSelectionLabel(option) {
|
219
|
-
if (typeof option ===
|
219
|
+
if (typeof option === "string") {
|
220
220
|
return option;
|
221
221
|
}
|
222
|
-
if (typeof props.selectionLabel ===
|
222
|
+
if (typeof props.selectionLabel === "string") {
|
223
223
|
return option[props.selectionLabel];
|
224
224
|
}
|
225
|
-
if (typeof props.selectionLabel ===
|
225
|
+
if (typeof props.selectionLabel === "function") {
|
226
226
|
return props.selectionLabel(option);
|
227
227
|
}
|
228
228
|
return option?.selectionLabel || option?.label;
|
@@ -234,17 +234,17 @@ function resolveSelectionLabel(option) {
|
|
234
234
|
* @returns {string|*|string}
|
235
235
|
*/
|
236
236
|
function resolveValue(option) {
|
237
|
-
if (typeof option ===
|
237
|
+
if (typeof option === "string") {
|
238
238
|
return option;
|
239
239
|
}
|
240
240
|
let value = option.value;
|
241
|
-
if (typeof props.optionValue ===
|
241
|
+
if (typeof props.optionValue === "string") {
|
242
242
|
value = option[props.optionValue];
|
243
|
-
} else if (typeof props.optionValue ===
|
243
|
+
} else if (typeof props.optionValue === "function") {
|
244
244
|
value = props.optionValue(option);
|
245
245
|
}
|
246
246
|
// Note the __null__ special case here. See the onUpdate function for more details
|
247
|
-
return value === null ?
|
247
|
+
return value === null ? "__null__" : value;
|
248
248
|
}
|
249
249
|
|
250
250
|
/**
|
@@ -255,13 +255,13 @@ function resolveValue(option) {
|
|
255
255
|
*/
|
256
256
|
function onUpdate(value) {
|
257
257
|
if (Array.isArray(value)) {
|
258
|
-
value = value.map((v) => v ===
|
258
|
+
value = value.map((v) => v === "__null__" ? null : v);
|
259
259
|
}
|
260
260
|
|
261
|
-
value = value ===
|
261
|
+
value = value === "__null__" ? null : value;
|
262
262
|
|
263
|
-
emit(
|
264
|
-
emit(
|
263
|
+
emit("update", value);
|
264
|
+
emit("update:model-value", value);
|
265
265
|
}
|
266
266
|
|
267
267
|
/** XXX: This tells us when we should apply the filter. QSelect likes to trigger a new filter everytime you open the dropdown
|
@@ -295,8 +295,8 @@ async function onFilter(val, update) {
|
|
295
295
|
* See the onUpdate function for more details
|
296
296
|
*/
|
297
297
|
function onClear() {
|
298
|
-
emit(
|
299
|
-
emit(
|
298
|
+
emit("update:model-value", undefined);
|
299
|
+
emit("update", undefined);
|
300
300
|
}
|
301
301
|
|
302
302
|
/**
|
@@ -23,16 +23,16 @@
|
|
23
23
|
>
|
24
24
|
<div>{{ child.label }}</div>
|
25
25
|
<div class="text-xs text-gray-silver">{{ child.name }}</div>
|
26
|
-
|
26
|
+
</QCheckbox>
|
27
27
|
</div>
|
28
28
|
</div>
|
29
29
|
</template>
|
30
30
|
<script setup>
|
31
|
-
import { ref, watch } from
|
32
|
-
import { remove } from
|
33
|
-
import SelectField from
|
31
|
+
import { ref, watch } from "vue";
|
32
|
+
import { remove } from "../../../../helpers";
|
33
|
+
import SelectField from "./SelectField";
|
34
34
|
|
35
|
-
const emit = defineEmits([
|
35
|
+
const emit = defineEmits(["update:model-value"]);
|
36
36
|
const props = defineProps({
|
37
37
|
modelValue: {
|
38
38
|
type: Array,
|
@@ -40,11 +40,11 @@ const props = defineProps({
|
|
40
40
|
},
|
41
41
|
label: {
|
42
42
|
type: String,
|
43
|
-
default:
|
43
|
+
default: "Selection"
|
44
44
|
},
|
45
45
|
placeholder: {
|
46
46
|
type: String,
|
47
|
-
default:
|
47
|
+
default: "Select an option"
|
48
48
|
},
|
49
49
|
options: {
|
50
50
|
type: Array,
|
@@ -68,11 +68,11 @@ function onSelectChild(child) {
|
|
68
68
|
} else {
|
69
69
|
selectedChildren.value.push(child.id);
|
70
70
|
}
|
71
|
-
emit(
|
71
|
+
emit("update:model-value", selectedChildren.value.length > 0 ? selectedChildren.value : undefined);
|
72
72
|
}
|
73
73
|
function onSelectOption() {
|
74
74
|
selectedChildren.value = [];
|
75
|
-
emit(
|
75
|
+
emit("update:model-value", undefined);
|
76
76
|
}
|
77
77
|
watch(() => props.modelValue, (value) => {
|
78
78
|
selectedOption.value = resolveSelectedOption();
|
@@ -48,12 +48,12 @@
|
|
48
48
|
</template>
|
49
49
|
|
50
50
|
<script setup>
|
51
|
-
import { onMounted } from
|
52
|
-
import { useSingleFileUpload } from
|
53
|
-
import { FilePreview } from
|
54
|
-
import FieldLabel from
|
51
|
+
import { onMounted } from "vue";
|
52
|
+
import { useSingleFileUpload } from "../../../../helpers";
|
53
|
+
import { FilePreview } from "../../../Utility";
|
54
|
+
import FieldLabel from "./FieldLabel";
|
55
55
|
|
56
|
-
const emit = defineEmits([
|
56
|
+
const emit = defineEmits(["update:model-value"]);
|
57
57
|
const props = defineProps({
|
58
58
|
modelValue: {
|
59
59
|
type: [Object, String],
|
@@ -68,7 +68,7 @@ const props = defineProps({
|
|
68
68
|
readonly: Boolean
|
69
69
|
});
|
70
70
|
const { onComplete, onDrop, onFileSelected, uploadedFile, onClear } = useSingleFileUpload();
|
71
|
-
onComplete(() => emit(
|
71
|
+
onComplete(() => emit("update:model-value", uploadedFile.value));
|
72
72
|
|
73
73
|
onMounted(() => {
|
74
74
|
if (props.modelValue) {
|
@@ -26,25 +26,25 @@
|
|
26
26
|
:class="labelClass"
|
27
27
|
/>
|
28
28
|
</template>
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
29
|
+
</QInput>
|
30
|
+
<div v-if="readonly">
|
31
|
+
<LabelValueBlock
|
32
|
+
:label="label || field.label"
|
33
|
+
:value="modelValue"
|
34
|
+
/>
|
35
|
+
</div>
|
36
36
|
</div>
|
37
37
|
</template>
|
38
38
|
|
39
39
|
<script setup>
|
40
|
-
import FieldLabel from
|
41
|
-
import LabelValueBlock from
|
40
|
+
import FieldLabel from "./FieldLabel";
|
41
|
+
import LabelValueBlock from "./LabelValueBlock";
|
42
42
|
|
43
|
-
defineEmits([
|
43
|
+
defineEmits(["update:model-value", "submit"]);
|
44
44
|
defineProps({
|
45
45
|
modelValue: {
|
46
46
|
type: [String, Number],
|
47
|
-
default:
|
47
|
+
default: ""
|
48
48
|
},
|
49
49
|
field: {
|
50
50
|
type: Object,
|
@@ -52,7 +52,7 @@ defineProps({
|
|
52
52
|
},
|
53
53
|
type: {
|
54
54
|
type: String,
|
55
|
-
default:
|
55
|
+
default: "text"
|
56
56
|
},
|
57
57
|
label: {
|
58
58
|
type: String,
|
@@ -60,15 +60,15 @@ defineProps({
|
|
60
60
|
},
|
61
61
|
labelClass: {
|
62
62
|
type: String,
|
63
|
-
default:
|
63
|
+
default: "text-sm text-gray-shadow"
|
64
64
|
},
|
65
65
|
parentClass: {
|
66
66
|
type: String,
|
67
|
-
default:
|
67
|
+
default: ""
|
68
68
|
},
|
69
69
|
inputClass: {
|
70
70
|
type: String,
|
71
|
-
default:
|
71
|
+
default: ""
|
72
72
|
},
|
73
73
|
noLabel: Boolean,
|
74
74
|
showName: Boolean,
|
@@ -24,11 +24,11 @@
|
|
24
24
|
</template>
|
25
25
|
|
26
26
|
<script setup>
|
27
|
-
import { default as TinyMceEditor } from
|
28
|
-
import { apiKey } from
|
29
|
-
import FieldLabel from
|
27
|
+
import { default as TinyMceEditor } from "@tinymce/tinymce-vue";
|
28
|
+
import { apiKey } from "../../../../vendor/tinymce-config";
|
29
|
+
import FieldLabel from "./FieldLabel";
|
30
30
|
|
31
|
-
defineEmits([
|
31
|
+
defineEmits(["update:model-value"]);
|
32
32
|
defineProps({
|
33
33
|
modelValue: {
|
34
34
|
type: [String, Number],
|
@@ -20,7 +20,7 @@
|
|
20
20
|
</div>
|
21
21
|
</template>
|
22
22
|
<script setup>
|
23
|
-
import { reactive } from
|
23
|
+
import { reactive } from "vue";
|
24
24
|
import {
|
25
25
|
BooleanField,
|
26
26
|
DateField,
|
@@ -31,9 +31,9 @@ import {
|
|
31
31
|
SingleFileField,
|
32
32
|
TextField,
|
33
33
|
WysiwygField
|
34
|
-
} from
|
34
|
+
} from "./Fields";
|
35
35
|
|
36
|
-
const emit = defineEmits([
|
36
|
+
const emit = defineEmits(["update:values"]);
|
37
37
|
const props = defineProps({
|
38
38
|
values: {
|
39
39
|
type: Object,
|
@@ -65,12 +65,12 @@ const mappedFields = props.fields.map((field) => ({
|
|
65
65
|
placeholder: `Enter ${field.label}`,
|
66
66
|
...field,
|
67
67
|
component: FORM_FIELD_MAP[field.type],
|
68
|
-
default: field.type ===
|
68
|
+
default: field.type === "BOOLEAN" ? false : ""
|
69
69
|
}));
|
70
70
|
|
71
71
|
const fieldValues = reactive(props.values || {});
|
72
72
|
|
73
73
|
function onInput(key, value) {
|
74
|
-
emit(
|
74
|
+
emit("update:values", { ...fieldValues, [key]: value });
|
75
75
|
}
|
76
76
|
</script>
|
@@ -41,21 +41,21 @@
|
|
41
41
|
</QTr>
|
42
42
|
</template>
|
43
43
|
<script setup>
|
44
|
-
import { XCircleIcon as ClearIcon } from
|
45
|
-
import { QSpinner, QTd, QTr } from
|
46
|
-
import { computed } from
|
47
|
-
import { fNumber } from
|
44
|
+
import { XCircleIcon as ClearIcon } from "@heroicons/vue/solid";
|
45
|
+
import { QSpinner, QTd, QTr } from "quasar";
|
46
|
+
import { computed } from "vue";
|
47
|
+
import { fNumber } from "../../helpers";
|
48
48
|
|
49
|
-
defineEmits([
|
49
|
+
defineEmits(["clear"]);
|
50
50
|
const props = defineProps({
|
51
51
|
loading: Boolean,
|
52
52
|
label: {
|
53
53
|
type: String,
|
54
|
-
default:
|
54
|
+
default: "Rows"
|
55
55
|
},
|
56
56
|
selectedLabel: {
|
57
57
|
type: String,
|
58
|
-
default:
|
58
|
+
default: "Selected"
|
59
59
|
},
|
60
60
|
selectedCount: {
|
61
61
|
type: Number,
|
@@ -86,7 +86,7 @@ const summaryColumns = computed(() => {
|
|
86
86
|
|
87
87
|
function formatValue(column) {
|
88
88
|
const value = props.summary[column.name];
|
89
|
-
if (value === undefined) return
|
89
|
+
if (value === undefined) return "";
|
90
90
|
|
91
91
|
if (column.format) {
|
92
92
|
return column.format(value);
|
@@ -4,11 +4,11 @@ import { getFilterFromUrl } from "./listHelpers";
|
|
4
4
|
|
5
5
|
interface ListActionsOptions {
|
6
6
|
listRoute: Function;
|
7
|
-
summaryRoute?: Function;
|
8
|
-
filterFieldOptionsRoute?: Function;
|
9
|
-
moreRoute?: Function;
|
10
|
-
itemDetailsRoute?: Function;
|
11
|
-
urlPattern?: RegExp;
|
7
|
+
summaryRoute?: Function | null;
|
8
|
+
filterFieldOptionsRoute?: Function | null;
|
9
|
+
moreRoute?: Function | null;
|
10
|
+
itemDetailsRoute?: Function | null;
|
11
|
+
urlPattern?: RegExp | null;
|
12
12
|
filterDefaults?: Record<string, any>;
|
13
13
|
refreshFilters?: boolean;
|
14
14
|
}
|