@ramathibodi/nuxt-commons 4.0.13 → 4.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/runtime/components/dialog/ImportResult.d.vue.ts +28 -0
- package/dist/runtime/components/dialog/ImportResult.vue +122 -0
- package/dist/runtime/components/dialog/ImportResult.vue.d.ts +28 -0
- package/dist/runtime/components/form/Birthdate.vue +7 -0
- package/dist/runtime/components/form/CheckboxGroup.d.vue.ts +1 -1
- package/dist/runtime/components/form/CheckboxGroup.vue +47 -46
- package/dist/runtime/components/form/CheckboxGroup.vue.d.ts +1 -1
- package/dist/runtime/components/form/Date.d.vue.ts +8 -1
- package/dist/runtime/components/form/Date.vue +9 -2
- package/dist/runtime/components/form/Date.vue.d.ts +8 -1
- package/dist/runtime/components/form/Time.d.vue.ts +1 -1
- package/dist/runtime/components/form/Time.vue +2 -1
- package/dist/runtime/components/form/Time.vue.d.ts +1 -1
- package/dist/runtime/components/model/Table.d.vue.ts +27 -18
- package/dist/runtime/components/model/Table.vue +12 -0
- package/dist/runtime/components/model/Table.vue.d.ts +27 -18
- package/dist/runtime/components/model/iterator.d.vue.ts +33 -24
- package/dist/runtime/components/model/iterator.vue +12 -0
- package/dist/runtime/components/model/iterator.vue.d.ts +33 -24
- package/dist/runtime/composables/api.d.ts +7 -0
- package/dist/runtime/composables/api.js +3 -2
- package/dist/runtime/composables/apiModel.d.ts +11 -2
- package/dist/runtime/composables/apiModel.js +10 -9
- package/dist/runtime/composables/apiModelOperation.d.ts +17 -3
- package/dist/runtime/composables/apiModelOperation.js +6 -6
- package/dist/runtime/composables/graphql.d.ts +3 -3
- package/dist/runtime/composables/graphql.js +6 -6
- package/dist/runtime/composables/graphqlModel.d.ts +11 -2
- package/dist/runtime/composables/graphqlModel.js +8 -8
- package/dist/runtime/composables/graphqlOperation.d.ts +2 -1
- package/dist/runtime/composables/graphqlOperation.js +3 -3
- package/dist/runtime/composables/importProgress.d.ts +25 -1
- package/dist/runtime/composables/importProgress.js +84 -4
- package/dist/runtime/types/graphqlOperation.d.ts +12 -1
- package/package.json +1 -1
- package/templates/.codegen/plugin-schema-object.cjs +10 -13
package/dist/module.json
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ImportError } from '../../composables/importProgress.js';
|
|
2
|
+
/**
|
|
3
|
+
* Public props accepted by DialogImportResult.
|
|
4
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
5
|
+
*/
|
|
6
|
+
interface DialogImportResultProps {
|
|
7
|
+
modelValue: boolean;
|
|
8
|
+
errors: ImportError[];
|
|
9
|
+
total: number;
|
|
10
|
+
failed: number;
|
|
11
|
+
isImporting?: boolean;
|
|
12
|
+
title?: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const __VLS_export: import("vue").DefineComponent<DialogImportResultProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
16
|
+
"update:modelValue": (value: boolean) => any;
|
|
17
|
+
retry: (index: number) => any;
|
|
18
|
+
"retry-all": () => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<DialogImportResultProps> & Readonly<{
|
|
20
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
21
|
+
onRetry?: ((index: number) => any) | undefined;
|
|
22
|
+
"onRetry-all"?: (() => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
title: string;
|
|
25
|
+
isImporting: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, watch } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
modelValue: { type: Boolean, required: true },
|
|
5
|
+
errors: { type: Array, required: true },
|
|
6
|
+
total: { type: Number, required: true },
|
|
7
|
+
failed: { type: Number, required: true },
|
|
8
|
+
isImporting: { type: Boolean, required: false, default: false },
|
|
9
|
+
title: { type: String, required: false, default: "\u0E19\u0E33\u0E40\u0E02\u0E49\u0E32\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27" },
|
|
10
|
+
color: { type: String, required: false }
|
|
11
|
+
});
|
|
12
|
+
const emit = defineEmits(["update:modelValue", "retry-all", "retry"]);
|
|
13
|
+
const dialogVisible = ref(props.modelValue);
|
|
14
|
+
watch(() => props.modelValue, (newValue) => {
|
|
15
|
+
dialogVisible.value = newValue;
|
|
16
|
+
});
|
|
17
|
+
watch(() => dialogVisible.value, (newValue) => {
|
|
18
|
+
emit("update:modelValue", newValue);
|
|
19
|
+
});
|
|
20
|
+
const chipColor = (t) => t === "server" ? "error" : t === "unknown" ? "grey" : "warning";
|
|
21
|
+
const pretty = (v) => {
|
|
22
|
+
try {
|
|
23
|
+
return typeof v === "string" ? v : JSON.stringify(v, null, 2);
|
|
24
|
+
} catch {
|
|
25
|
+
return String(v);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<v-dialog
|
|
32
|
+
v-model="dialogVisible"
|
|
33
|
+
persistent
|
|
34
|
+
scrollable
|
|
35
|
+
max-width="700"
|
|
36
|
+
>
|
|
37
|
+
<v-card :color="props.color">
|
|
38
|
+
<v-card-title class="d-flex align-center">
|
|
39
|
+
<span>{{ props.title }} {{ props.failed }} / {{ props.total }}</span>
|
|
40
|
+
<v-spacer />
|
|
41
|
+
<v-btn
|
|
42
|
+
color="primary"
|
|
43
|
+
variant="tonal"
|
|
44
|
+
prepend-icon="mdi mdi-refresh"
|
|
45
|
+
:loading="props.isImporting"
|
|
46
|
+
:disabled="props.isImporting || props.errors.length === 0"
|
|
47
|
+
@click="emit('retry-all')"
|
|
48
|
+
>
|
|
49
|
+
Retry all failed
|
|
50
|
+
</v-btn>
|
|
51
|
+
</v-card-title>
|
|
52
|
+
|
|
53
|
+
<v-progress-linear
|
|
54
|
+
v-if="props.isImporting"
|
|
55
|
+
indeterminate
|
|
56
|
+
color="primary"
|
|
57
|
+
height="6"
|
|
58
|
+
/>
|
|
59
|
+
|
|
60
|
+
<v-card-text>
|
|
61
|
+
<v-expansion-panels multiple>
|
|
62
|
+
<v-expansion-panel
|
|
63
|
+
v-for="err in props.errors"
|
|
64
|
+
:key="err.index"
|
|
65
|
+
>
|
|
66
|
+
<v-expansion-panel-title>
|
|
67
|
+
<div
|
|
68
|
+
class="d-flex align-center"
|
|
69
|
+
style="gap: 8px; width: 100%"
|
|
70
|
+
>
|
|
71
|
+
<span class="text-medium-emphasis">#{{ err.index + 1 }}</span>
|
|
72
|
+
<v-chip
|
|
73
|
+
:color="chipColor(err.errorType)"
|
|
74
|
+
size="small"
|
|
75
|
+
label
|
|
76
|
+
>
|
|
77
|
+
{{ err.errorType }}
|
|
78
|
+
</v-chip>
|
|
79
|
+
<span class="text-truncate">{{ err.message }}</span>
|
|
80
|
+
<v-spacer />
|
|
81
|
+
<v-btn
|
|
82
|
+
icon="mdi mdi-refresh"
|
|
83
|
+
size="small"
|
|
84
|
+
variant="text"
|
|
85
|
+
:disabled="props.isImporting"
|
|
86
|
+
@click.stop="emit('retry', err.index)"
|
|
87
|
+
/>
|
|
88
|
+
</div>
|
|
89
|
+
</v-expansion-panel-title>
|
|
90
|
+
<v-expansion-panel-text>
|
|
91
|
+
<div class="text-caption text-medium-emphasis mb-1">
|
|
92
|
+
Data
|
|
93
|
+
</div>
|
|
94
|
+
<pre class="import-result-pre">{{ pretty(err.item) }}</pre>
|
|
95
|
+
<template v-if="err.detail !== void 0">
|
|
96
|
+
<div class="text-caption text-medium-emphasis mb-1 mt-2">
|
|
97
|
+
Detail
|
|
98
|
+
</div>
|
|
99
|
+
<pre class="import-result-pre">{{ pretty(err.detail) }}</pre>
|
|
100
|
+
</template>
|
|
101
|
+
</v-expansion-panel-text>
|
|
102
|
+
</v-expansion-panel>
|
|
103
|
+
</v-expansion-panels>
|
|
104
|
+
</v-card-text>
|
|
105
|
+
|
|
106
|
+
<v-card-actions>
|
|
107
|
+
<v-spacer />
|
|
108
|
+
<v-btn
|
|
109
|
+
variant="text"
|
|
110
|
+
:disabled="props.isImporting"
|
|
111
|
+
@click="dialogVisible = false"
|
|
112
|
+
>
|
|
113
|
+
ปิด
|
|
114
|
+
</v-btn>
|
|
115
|
+
</v-card-actions>
|
|
116
|
+
</v-card>
|
|
117
|
+
</v-dialog>
|
|
118
|
+
</template>
|
|
119
|
+
|
|
120
|
+
<style scoped>
|
|
121
|
+
.import-result-pre{background:rgba(0,0,0,.04);border-radius:4px;font-size:12px;margin:0;padding:8px;white-space:pre-wrap;word-break:break-word}
|
|
122
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ImportError } from '../../composables/importProgress.js';
|
|
2
|
+
/**
|
|
3
|
+
* Public props accepted by DialogImportResult.
|
|
4
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
5
|
+
*/
|
|
6
|
+
interface DialogImportResultProps {
|
|
7
|
+
modelValue: boolean;
|
|
8
|
+
errors: ImportError[];
|
|
9
|
+
total: number;
|
|
10
|
+
failed: number;
|
|
11
|
+
isImporting?: boolean;
|
|
12
|
+
title?: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const __VLS_export: import("vue").DefineComponent<DialogImportResultProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
16
|
+
"update:modelValue": (value: boolean) => any;
|
|
17
|
+
retry: (index: number) => any;
|
|
18
|
+
"retry-all": () => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<DialogImportResultProps> & Readonly<{
|
|
20
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
21
|
+
onRetry?: ((index: number) => any) | undefined;
|
|
22
|
+
"onRetry-all"?: (() => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
title: string;
|
|
25
|
+
isImporting: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
@@ -43,6 +43,9 @@ const computedRules = computed(() => {
|
|
|
43
43
|
return ["DateHappen"];
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
47
|
+
const birthdateYearRange = computed(() => [currentYear - 120, currentYear]);
|
|
48
|
+
const maxBirthdate = /* @__PURE__ */ new Date();
|
|
46
49
|
const dobFormat = computed(() => {
|
|
47
50
|
let displayFormat = void 0;
|
|
48
51
|
if (dobPrecisionSelected.value == "yearMonth") {
|
|
@@ -64,6 +67,10 @@ const dobFormat = computed(() => {
|
|
|
64
67
|
:flow="props.flow"
|
|
65
68
|
:format="dobFormat"
|
|
66
69
|
:rules="computedRules"
|
|
70
|
+
:year-range="birthdateYearRange"
|
|
71
|
+
:max-date="maxBirthdate"
|
|
72
|
+
reverse-years
|
|
73
|
+
eager
|
|
67
74
|
>
|
|
68
75
|
<template #append="{ isReadonly, isDisabled, activatorProps, toggleMenuOpen }">
|
|
69
76
|
<span
|
|
@@ -13,7 +13,7 @@ interface Props extends /* @vue-ignore */ InstanceType<typeof VCheckbox['$props'
|
|
|
13
13
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
14
14
|
inline: boolean;
|
|
15
15
|
}>>, {
|
|
16
|
-
validate: () => boolean
|
|
16
|
+
validate: () => Promise<boolean>;
|
|
17
17
|
reset: () => void;
|
|
18
18
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
19
|
"update:modelValue": (...args: any[]) => void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref, watch, computed } from "vue";
|
|
2
|
+
import { ref, watch, computed, nextTick } from "vue";
|
|
3
3
|
import { VCheckbox } from "vuetify/components/VCheckbox";
|
|
4
|
-
import {
|
|
4
|
+
import { VInput } from "vuetify/components/VInput";
|
|
5
|
+
import { filter, head, reject } from "lodash-es";
|
|
5
6
|
const props = defineProps({
|
|
6
7
|
items: { type: Array, required: true },
|
|
7
8
|
label: { type: String, required: false },
|
|
@@ -12,26 +13,20 @@ const props = defineProps({
|
|
|
12
13
|
const emit = defineEmits(["update:modelValue"]);
|
|
13
14
|
const values = ref([]);
|
|
14
15
|
const valuesOther = ref();
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
touched.value = true;
|
|
21
|
-
return !computedRules.value;
|
|
16
|
+
const inputRef = ref();
|
|
17
|
+
const validationValue = computed(() => values.value.length ? values.value : null);
|
|
18
|
+
const validate = async () => {
|
|
19
|
+
const errors = await inputRef.value?.validate() ?? [];
|
|
20
|
+
return errors.length === 0;
|
|
22
21
|
};
|
|
23
22
|
const reset = () => {
|
|
24
|
-
|
|
23
|
+
inputRef.value?.resetValidation();
|
|
25
24
|
};
|
|
26
25
|
defineExpose({ validate, reset });
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return join(rules, ",");
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
const showError = computed(() => touched.value && !!computedRules.value);
|
|
26
|
+
const onInteract = async () => {
|
|
27
|
+
await nextTick();
|
|
28
|
+
inputRef.value?.validate();
|
|
29
|
+
};
|
|
35
30
|
const computedOther = computed(() => {
|
|
36
31
|
const itemOther = filter(props.items, { value: "other" });
|
|
37
32
|
return head(itemOther);
|
|
@@ -59,33 +54,39 @@ watch(props.modelValue, () => {
|
|
|
59
54
|
</script>
|
|
60
55
|
|
|
61
56
|
<template>
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
:value="item.value"
|
|
68
|
-
density="compact"
|
|
69
|
-
hide-details
|
|
70
|
-
:error="showError"
|
|
71
|
-
:="$attrs"
|
|
72
|
-
:label="item.label"
|
|
73
|
-
@update:model-value="onUserInput"
|
|
74
|
-
/>
|
|
75
|
-
</div>
|
|
76
|
-
<v-text-field
|
|
77
|
-
v-if="computedOther"
|
|
78
|
-
v-model="valuesOther"
|
|
79
|
-
hide-details
|
|
80
|
-
:error="showError"
|
|
81
|
-
:="$attrs"
|
|
82
|
-
:label="computedOther.label"
|
|
83
|
-
@update:model-value="onUserInput"
|
|
84
|
-
/>
|
|
85
|
-
<label
|
|
86
|
-
v-if="showError"
|
|
87
|
-
class="text-error text-subtitle-2 ml-1"
|
|
57
|
+
<v-input
|
|
58
|
+
ref="inputRef"
|
|
59
|
+
:model-value="validationValue"
|
|
60
|
+
:rules="props.rules"
|
|
61
|
+
hide-details="auto"
|
|
88
62
|
>
|
|
89
|
-
{
|
|
90
|
-
|
|
63
|
+
<template #default="{ isValid }">
|
|
64
|
+
<div class="w-100">
|
|
65
|
+
<label class="text-body-1 opacity-60">{{ props.label }}</label>
|
|
66
|
+
<div :class="`d-flex ${inline ? 'flex-row' : 'flex-column'}`">
|
|
67
|
+
<v-checkbox
|
|
68
|
+
v-for="item in computeItems"
|
|
69
|
+
:key="item.value"
|
|
70
|
+
v-model="values"
|
|
71
|
+
:value="item.value"
|
|
72
|
+
density="compact"
|
|
73
|
+
hide-details
|
|
74
|
+
:error="isValid === false"
|
|
75
|
+
:="$attrs"
|
|
76
|
+
:label="item.label"
|
|
77
|
+
@update:model-value="onInteract"
|
|
78
|
+
/>
|
|
79
|
+
</div>
|
|
80
|
+
<v-text-field
|
|
81
|
+
v-if="computedOther"
|
|
82
|
+
v-model="valuesOther"
|
|
83
|
+
hide-details
|
|
84
|
+
:error="isValid === false"
|
|
85
|
+
:="$attrs"
|
|
86
|
+
:label="computedOther.label"
|
|
87
|
+
@update:model-value="onInteract"
|
|
88
|
+
/>
|
|
89
|
+
</div>
|
|
90
|
+
</template>
|
|
91
|
+
</v-input>
|
|
91
92
|
</template>
|
|
@@ -13,7 +13,7 @@ interface Props extends /* @vue-ignore */ InstanceType<typeof VCheckbox['$props'
|
|
|
13
13
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
14
14
|
inline: boolean;
|
|
15
15
|
}>>, {
|
|
16
|
-
validate: () => boolean
|
|
16
|
+
validate: () => Promise<boolean>;
|
|
17
17
|
reset: () => void;
|
|
18
18
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
19
|
"update:modelValue": (...args: any[]) => void;
|
|
@@ -12,6 +12,9 @@ interface Props extends /* @vue-ignore */ InstanceType<typeof VTextField['$props
|
|
|
12
12
|
flow?: ('month' | 'year' | 'calendar' | 'time' | 'minutes' | 'hours' | 'seconds')[];
|
|
13
13
|
rules?: typeof VTextField['rules'];
|
|
14
14
|
defaultDate?: boolean | string;
|
|
15
|
+
yearRange?: [number, number];
|
|
16
|
+
reverseYears?: boolean;
|
|
17
|
+
eager?: boolean;
|
|
15
18
|
}
|
|
16
19
|
declare function resetDatePicker(): void;
|
|
17
20
|
declare function toggleMenuOpen(trigger: string): void;
|
|
@@ -42,11 +45,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
42
45
|
pickerOnly: boolean;
|
|
43
46
|
flow: () => never[];
|
|
44
47
|
defaultDate: boolean;
|
|
48
|
+
reverseYears: boolean;
|
|
49
|
+
eager: boolean;
|
|
45
50
|
}>>, {
|
|
46
51
|
reset: typeof resetDatePicker;
|
|
47
52
|
validate: typeof validate;
|
|
48
53
|
resetValidation: typeof resetValidation;
|
|
49
|
-
isValid: boolean | null | undefined
|
|
54
|
+
isValid: import("vue").ComputedRef<boolean | null | undefined>;
|
|
50
55
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
56
|
"update:modelValue": (...args: any[]) => void;
|
|
52
57
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
@@ -55,6 +60,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
55
60
|
pickerOnly: boolean;
|
|
56
61
|
flow: () => never[];
|
|
57
62
|
defaultDate: boolean;
|
|
63
|
+
reverseYears: boolean;
|
|
64
|
+
eager: boolean;
|
|
58
65
|
}>>> & Readonly<{
|
|
59
66
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
60
67
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -17,7 +17,10 @@ const props = defineProps({
|
|
|
17
17
|
pickerOnly: { type: Boolean, required: false, default: false },
|
|
18
18
|
flow: { type: Array, required: false, default: () => [] },
|
|
19
19
|
rules: { type: null, required: false },
|
|
20
|
-
defaultDate: { type: [Boolean, String], required: false, default: false }
|
|
20
|
+
defaultDate: { type: [Boolean, String], required: false, default: false },
|
|
21
|
+
yearRange: { type: Array, required: false },
|
|
22
|
+
reverseYears: { type: Boolean, required: false, default: false },
|
|
23
|
+
eager: { type: Boolean, required: false, default: false }
|
|
21
24
|
});
|
|
22
25
|
const emit = defineEmits(["update:modelValue"]);
|
|
23
26
|
const computedRules = computed(() => {
|
|
@@ -157,11 +160,12 @@ function validate() {
|
|
|
157
160
|
function resetValidation() {
|
|
158
161
|
textFieldRef.value?.resetValidation();
|
|
159
162
|
}
|
|
163
|
+
const isValid = computed(() => textFieldRef.value?.isValid);
|
|
160
164
|
defineExpose({
|
|
161
165
|
reset: resetDatePicker,
|
|
162
166
|
validate,
|
|
163
167
|
resetValidation,
|
|
164
|
-
isValid
|
|
168
|
+
isValid
|
|
165
169
|
});
|
|
166
170
|
</script>
|
|
167
171
|
|
|
@@ -169,6 +173,7 @@ defineExpose({
|
|
|
169
173
|
<v-menu
|
|
170
174
|
v-model="isMenuOpen"
|
|
171
175
|
:open-on-click="false"
|
|
176
|
+
:eager="props.eager"
|
|
172
177
|
>
|
|
173
178
|
<template #activator="{ props: activatorProps }">
|
|
174
179
|
<v-text-field
|
|
@@ -203,6 +208,8 @@ defineExpose({
|
|
|
203
208
|
:flow="datepickerFlow"
|
|
204
209
|
:min-date="props.minDate"
|
|
205
210
|
:max-date="props.maxDate"
|
|
211
|
+
:year-range="props.yearRange"
|
|
212
|
+
:reverse-years="props.reverseYears"
|
|
206
213
|
auto-apply
|
|
207
214
|
inline
|
|
208
215
|
:locale="datepickerLocale"
|
|
@@ -12,6 +12,9 @@ interface Props extends /* @vue-ignore */ InstanceType<typeof VTextField['$props
|
|
|
12
12
|
flow?: ('month' | 'year' | 'calendar' | 'time' | 'minutes' | 'hours' | 'seconds')[];
|
|
13
13
|
rules?: typeof VTextField['rules'];
|
|
14
14
|
defaultDate?: boolean | string;
|
|
15
|
+
yearRange?: [number, number];
|
|
16
|
+
reverseYears?: boolean;
|
|
17
|
+
eager?: boolean;
|
|
15
18
|
}
|
|
16
19
|
declare function resetDatePicker(): void;
|
|
17
20
|
declare function toggleMenuOpen(trigger: string): void;
|
|
@@ -42,11 +45,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
42
45
|
pickerOnly: boolean;
|
|
43
46
|
flow: () => never[];
|
|
44
47
|
defaultDate: boolean;
|
|
48
|
+
reverseYears: boolean;
|
|
49
|
+
eager: boolean;
|
|
45
50
|
}>>, {
|
|
46
51
|
reset: typeof resetDatePicker;
|
|
47
52
|
validate: typeof validate;
|
|
48
53
|
resetValidation: typeof resetValidation;
|
|
49
|
-
isValid: boolean | null | undefined
|
|
54
|
+
isValid: import("vue").ComputedRef<boolean | null | undefined>;
|
|
50
55
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
56
|
"update:modelValue": (...args: any[]) => void;
|
|
52
57
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
@@ -55,6 +60,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
55
60
|
pickerOnly: boolean;
|
|
56
61
|
flow: () => never[];
|
|
57
62
|
defaultDate: boolean;
|
|
63
|
+
reverseYears: boolean;
|
|
64
|
+
eager: boolean;
|
|
58
65
|
}>>> & Readonly<{
|
|
59
66
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
60
67
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -17,7 +17,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
17
17
|
reset: typeof reset;
|
|
18
18
|
validate: typeof validate;
|
|
19
19
|
resetValidation: typeof resetValidation;
|
|
20
|
-
isValid: boolean | null | undefined
|
|
20
|
+
isValid: import("vue").ComputedRef<boolean | null | undefined>;
|
|
21
21
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
22
|
"update:modelValue": (...args: any[]) => void;
|
|
23
23
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
@@ -96,11 +96,12 @@ function validate() {
|
|
|
96
96
|
function resetValidation() {
|
|
97
97
|
textFieldRef.value?.resetValidation();
|
|
98
98
|
}
|
|
99
|
+
const isValid = computed(() => textFieldRef.value?.isValid);
|
|
99
100
|
defineExpose({
|
|
100
101
|
reset,
|
|
101
102
|
validate,
|
|
102
103
|
resetValidation,
|
|
103
|
-
isValid
|
|
104
|
+
isValid
|
|
104
105
|
});
|
|
105
106
|
</script>
|
|
106
107
|
|
|
@@ -17,7 +17,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
17
17
|
reset: typeof reset;
|
|
18
18
|
validate: typeof validate;
|
|
19
19
|
resetValidation: typeof resetValidation;
|
|
20
|
-
isValid: boolean | null | undefined
|
|
20
|
+
isValid: import("vue").ComputedRef<boolean | null | undefined>;
|
|
21
21
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
22
|
"update:modelValue": (...args: any[]) => void;
|
|
23
23
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
@@ -43,9 +43,9 @@ declare var __VLS_8: {
|
|
|
43
43
|
operation: {
|
|
44
44
|
openDialog: typeof openDialog;
|
|
45
45
|
openDialogReadonly: typeof openDialogReadonly;
|
|
46
|
-
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
|
|
46
|
+
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
47
47
|
importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
|
|
48
|
-
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
48
|
+
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
49
49
|
deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
50
50
|
reload: (() => Promise<void> | undefined) | (() => Promise<void>);
|
|
51
51
|
setSearch: ((keyword: string) => void) | ((keyword: string) => void);
|
|
@@ -76,9 +76,9 @@ declare var __VLS_8: {
|
|
|
76
76
|
operation: {
|
|
77
77
|
openDialog: typeof openDialog;
|
|
78
78
|
openDialogReadonly: typeof openDialogReadonly;
|
|
79
|
-
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
|
|
79
|
+
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
80
80
|
importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
|
|
81
|
-
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
81
|
+
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
82
82
|
deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
83
83
|
reload: (() => Promise<void> | undefined) | (() => Promise<void>);
|
|
84
84
|
setSearch: ((keyword: string) => void) | ((keyword: string) => void);
|
|
@@ -97,9 +97,9 @@ declare var __VLS_8: {
|
|
|
97
97
|
operation: {
|
|
98
98
|
openDialog: typeof openDialog;
|
|
99
99
|
openDialogReadonly: typeof openDialogReadonly;
|
|
100
|
-
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
|
|
100
|
+
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
101
101
|
importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
|
|
102
|
-
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
102
|
+
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
103
103
|
deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
104
104
|
reload: (() => Promise<void> | undefined) | (() => Promise<void>);
|
|
105
105
|
setSearch: ((keyword: string) => void) | ((keyword: string) => void);
|
|
@@ -117,9 +117,9 @@ declare var __VLS_8: {
|
|
|
117
117
|
operation: {
|
|
118
118
|
openDialog: typeof openDialog;
|
|
119
119
|
openDialogReadonly: typeof openDialogReadonly;
|
|
120
|
-
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
|
|
120
|
+
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
121
121
|
importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
|
|
122
|
-
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
122
|
+
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
123
123
|
deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
124
124
|
reload: (() => Promise<void> | undefined) | (() => Promise<void>);
|
|
125
125
|
setSearch: ((keyword: string) => void) | ((keyword: string) => void);
|
|
@@ -137,9 +137,9 @@ declare var __VLS_8: {
|
|
|
137
137
|
operation: {
|
|
138
138
|
openDialog: typeof openDialog;
|
|
139
139
|
openDialogReadonly: typeof openDialogReadonly;
|
|
140
|
-
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
|
|
140
|
+
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
141
141
|
importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
|
|
142
|
-
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
142
|
+
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
143
143
|
deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
144
144
|
reload: (() => Promise<void> | undefined) | (() => Promise<void>);
|
|
145
145
|
setSearch: ((keyword: string) => void) | ((keyword: string) => void);
|
|
@@ -157,9 +157,9 @@ declare var __VLS_8: {
|
|
|
157
157
|
operation: {
|
|
158
158
|
openDialog: typeof openDialog;
|
|
159
159
|
openDialogReadonly: typeof openDialogReadonly;
|
|
160
|
-
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
|
|
160
|
+
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
161
161
|
importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
|
|
162
|
-
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
162
|
+
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
163
163
|
deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
164
164
|
reload: (() => Promise<void> | undefined) | (() => Promise<void>);
|
|
165
165
|
setSearch: ((keyword: string) => void) | ((keyword: string) => void);
|
|
@@ -234,9 +234,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
234
234
|
operation: import("vue").Ref<{
|
|
235
235
|
openDialog: typeof openDialog;
|
|
236
236
|
openDialogReadonly: typeof openDialogReadonly;
|
|
237
|
-
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
|
|
237
|
+
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
238
238
|
importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
|
|
239
|
-
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
239
|
+
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
240
240
|
deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
241
241
|
reload: (() => Promise<void> | undefined) | (() => Promise<void>);
|
|
242
242
|
setSearch: ((keyword: string) => void) | ((keyword: string) => void);
|
|
@@ -252,9 +252,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
252
252
|
}, {
|
|
253
253
|
openDialog: typeof openDialog;
|
|
254
254
|
openDialogReadonly: typeof openDialogReadonly;
|
|
255
|
-
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
|
|
255
|
+
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
256
256
|
importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
|
|
257
|
-
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
257
|
+
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
258
258
|
deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
259
259
|
reload: (() => Promise<void> | undefined) | (() => Promise<void>);
|
|
260
260
|
setSearch: ((keyword: string) => void) | ((keyword: string) => void);
|
|
@@ -270,9 +270,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
270
270
|
} | {
|
|
271
271
|
openDialog: typeof openDialog;
|
|
272
272
|
openDialogReadonly: typeof openDialogReadonly;
|
|
273
|
-
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
|
|
273
|
+
createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
274
274
|
importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
|
|
275
|
-
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
275
|
+
updateItem: ((item: Record<string, any>, callback?: FormDialogCallback, idempotencySalt?: string | number) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean, idempotencySalt?: string | number) => Promise<any>);
|
|
276
276
|
deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
|
|
277
277
|
reload: (() => Promise<void> | undefined) | (() => Promise<void>);
|
|
278
278
|
setSearch: ((keyword: string) => void) | ((keyword: string) => void);
|
|
@@ -296,12 +296,19 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
296
296
|
failed: import("vue").Ref<number, number>;
|
|
297
297
|
errors: import("vue").Ref<{
|
|
298
298
|
index: number;
|
|
299
|
+
item: any;
|
|
300
|
+
errorType: import("#imports").ImportErrorType;
|
|
299
301
|
message: string;
|
|
302
|
+
detail?: any;
|
|
300
303
|
}[], import("#imports").ImportError[] | {
|
|
301
304
|
index: number;
|
|
305
|
+
item: any;
|
|
306
|
+
errorType: import("#imports").ImportErrorType;
|
|
302
307
|
message: string;
|
|
308
|
+
detail?: any;
|
|
303
309
|
}[]>;
|
|
304
310
|
percent: import("vue").ComputedRef<number>;
|
|
311
|
+
resultVisible: import("vue").Ref<boolean, boolean>;
|
|
305
312
|
reset: () => void;
|
|
306
313
|
run: <T = any>(items: T[], worker: import("#imports").ImportWorker<T>, options?: {
|
|
307
314
|
concurrency
|
|
@@ -311,6 +318,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
311
318
|
*/
|
|
312
319
|
?: number;
|
|
313
320
|
}) => Promise<import("#imports").ImportSummary>;
|
|
321
|
+
retry: (indices?: number[]) => Promise<import("#imports").ImportSummary>;
|
|
322
|
+
dismissResult: () => void;
|
|
314
323
|
};
|
|
315
324
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
316
325
|
delete: (...args: any[]) => void;
|