@winchsa/ui 0.1.62 → 0.1.64
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/components/cards/AppCardActions.d.vue.ts +2 -2
- package/dist/components/cards/AppCardActions.vue.d.ts +2 -2
- package/dist/components/forms/AppLabel.vue +1 -0
- package/dist/components/forms/AttachmentCropperInput.vue +6 -1
- package/dist/components/forms/AttachmentInput.vue +6 -1
- package/dist/components/forms/AutocompleteInput.d.vue.ts +1 -1
- package/dist/components/forms/AutocompleteInput.vue +14 -5
- package/dist/components/forms/AutocompleteInput.vue.d.ts +1 -1
- package/dist/components/forms/LicensePlateInput.d.vue.ts +1 -1
- package/dist/components/forms/LicensePlateInput.vue.d.ts +1 -1
- package/dist/components/forms/ManualDate.d.vue.ts +1 -1
- package/dist/components/forms/ManualDate.vue +1 -0
- package/dist/components/forms/ManualDate.vue.d.ts +1 -1
- package/dist/components/forms/TimePicker.vue +1 -0
- package/package.json +67 -67
|
@@ -15,12 +15,12 @@ type __VLS_Slots = {} & {
|
|
|
15
15
|
default?: (props: typeof __VLS_76) => any;
|
|
16
16
|
};
|
|
17
17
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
|
-
refresh: (hideOverlay: () => void) => any;
|
|
19
18
|
collapsed: (isContentCollapsed: boolean) => any;
|
|
19
|
+
refresh: (hideOverlay: () => void) => any;
|
|
20
20
|
trash: () => any;
|
|
21
21
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
-
onRefresh?: ((hideOverlay: () => void) => any) | undefined;
|
|
23
22
|
onCollapsed?: ((isContentCollapsed: boolean) => any) | undefined;
|
|
23
|
+
onRefresh?: ((hideOverlay: () => void) => any) | undefined;
|
|
24
24
|
onTrash?: (() => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
26
|
title: string;
|
|
@@ -15,12 +15,12 @@ type __VLS_Slots = {} & {
|
|
|
15
15
|
default?: (props: typeof __VLS_76) => any;
|
|
16
16
|
};
|
|
17
17
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
|
-
refresh: (hideOverlay: () => void) => any;
|
|
19
18
|
collapsed: (isContentCollapsed: boolean) => any;
|
|
19
|
+
refresh: (hideOverlay: () => void) => any;
|
|
20
20
|
trash: () => any;
|
|
21
21
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
-
onRefresh?: ((hideOverlay: () => void) => any) | undefined;
|
|
23
22
|
onCollapsed?: ((isContentCollapsed: boolean) => any) | undefined;
|
|
23
|
+
onRefresh?: ((hideOverlay: () => void) => any) | undefined;
|
|
24
24
|
onTrash?: (() => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
26
|
title: string;
|
|
@@ -38,6 +38,7 @@ const LangLabel = computed(() => props.label ? t(props.label) : "");
|
|
|
38
38
|
<VMessages
|
|
39
39
|
v-if="isValid.value === false || errorMessages?.length !== 0"
|
|
40
40
|
class="text-start"
|
|
41
|
+
color="error"
|
|
41
42
|
:messages="[validationErrors.value, errorMessages]"
|
|
42
43
|
:active="isValid.value === false || errorMessages?.length !== 0"
|
|
43
44
|
/>
|
|
@@ -183,7 +183,12 @@ watch(zoomLevel, async (newZoom) => {
|
|
|
183
183
|
:accept="validTypes?.join(',')"
|
|
184
184
|
@change="onImageChanged($event)"
|
|
185
185
|
>
|
|
186
|
-
<VMessages
|
|
186
|
+
<VMessages
|
|
187
|
+
class="mt-1 d-block"
|
|
188
|
+
color="error"
|
|
189
|
+
:messages="validationErrors.value"
|
|
190
|
+
:active="isValid.value === false"
|
|
191
|
+
/>
|
|
187
192
|
</div>
|
|
188
193
|
</VValidation>
|
|
189
194
|
|
|
@@ -109,7 +109,12 @@ const removeImageCopy = (id) => {
|
|
|
109
109
|
@change="onImageChanged($event, validate)"
|
|
110
110
|
>
|
|
111
111
|
|
|
112
|
-
<VMessages
|
|
112
|
+
<VMessages
|
|
113
|
+
class="mt-1 d-block"
|
|
114
|
+
color="error"
|
|
115
|
+
:messages="validationErrors.value"
|
|
116
|
+
:active="isValid.value === false"
|
|
117
|
+
/>
|
|
113
118
|
</div>
|
|
114
119
|
</VValidation>
|
|
115
120
|
</div>
|
|
@@ -80,8 +80,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
|
80
80
|
"onUpdate:model-value"?: ((value: unknown) => any) | undefined;
|
|
81
81
|
}>, {
|
|
82
82
|
isLoading: boolean;
|
|
83
|
-
clearable: boolean;
|
|
84
83
|
hideDetails: boolean;
|
|
84
|
+
clearable: boolean;
|
|
85
85
|
hideSelected: boolean;
|
|
86
86
|
querySearchParam: string;
|
|
87
87
|
descriptionKey: string;
|
|
@@ -52,6 +52,7 @@ const emits = defineEmits(["update:model-value"]);
|
|
|
52
52
|
const defaultOptions = ref(props.options ?? []);
|
|
53
53
|
const displayedOptions = ref(props.options ?? []);
|
|
54
54
|
const loadedValuesHaveBeenSet = ref(false);
|
|
55
|
+
const resolvingMissingValues = ref(false);
|
|
55
56
|
const loading = ref(false);
|
|
56
57
|
const showTeleport = ref(false);
|
|
57
58
|
const search = ref("");
|
|
@@ -60,7 +61,7 @@ const errorState = ref(false);
|
|
|
60
61
|
const isOpen = ref(false);
|
|
61
62
|
const value = computed({
|
|
62
63
|
get() {
|
|
63
|
-
if (props.trackByValue && !loadedValuesHaveBeenSet.value) {
|
|
64
|
+
if (props.trackByValue && (!loadedValuesHaveBeenSet.value || resolvingMissingValues.value)) {
|
|
64
65
|
return props.multiple ? [] : null;
|
|
65
66
|
}
|
|
66
67
|
return props.modelValue;
|
|
@@ -70,6 +71,8 @@ const value = computed({
|
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
73
|
const isLoading = computed(() => props.isLoading || loading.value);
|
|
74
|
+
const hasTrackByValue = computed(() => Array.isArray(props.trackByValue) ? props.trackByValue.length > 0 : !!props.trackByValue);
|
|
75
|
+
const isResolvingSelection = computed(() => hasTrackByValue.value && (!loadedValuesHaveBeenSet.value && loading.value || resolvingMissingValues.value));
|
|
73
76
|
const params = computed(() => buildQueryString(props.params));
|
|
74
77
|
const elementId = computed(() => {
|
|
75
78
|
const attrs = useAttrs();
|
|
@@ -114,7 +117,8 @@ const sharedMultiSelectProps = computed(() => ({
|
|
|
114
117
|
groupLabel: props.groupLabel,
|
|
115
118
|
label: props.itemLabel,
|
|
116
119
|
trackBy: props.trackBy,
|
|
117
|
-
placeholder: hasValue.value ? "" : internalPlaceholder.value || t("inputs.placeholder_select"),
|
|
120
|
+
placeholder: hasValue.value || isResolvingSelection.value ? "" : internalPlaceholder.value || t("inputs.placeholder_select"),
|
|
121
|
+
loading: isResolvingSelection.value,
|
|
118
122
|
showLabels: false,
|
|
119
123
|
clearOnSelect: true,
|
|
120
124
|
showNoOptions: isLoading.value ? false : props.showNoOptions,
|
|
@@ -206,9 +210,14 @@ watch([() => props.trackByValue, defaultOptions], async ([trackByValue, _default
|
|
|
206
210
|
(value2) => !items.some((item) => item?.[props.trackBy] == value2)
|
|
207
211
|
);
|
|
208
212
|
if (missingIds.length > 0 && props.url) {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
213
|
+
resolvingMissingValues.value = true;
|
|
214
|
+
try {
|
|
215
|
+
const fetchedItems = await Promise.all(missingIds.map((id) => getRecords(id)));
|
|
216
|
+
if (fetchedItems.length > 0) {
|
|
217
|
+
items = items.concat(fetchedItems.flat());
|
|
218
|
+
}
|
|
219
|
+
} finally {
|
|
220
|
+
resolvingMissingValues.value = false;
|
|
212
221
|
}
|
|
213
222
|
}
|
|
214
223
|
const optionsToSelect = loadedValues.map((value2) => items.find((item) => item?.[props.trackBy] == value2)).filter(Boolean);
|
|
@@ -80,8 +80,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
|
80
80
|
"onUpdate:model-value"?: ((value: unknown) => any) | undefined;
|
|
81
81
|
}>, {
|
|
82
82
|
isLoading: boolean;
|
|
83
|
-
clearable: boolean;
|
|
84
83
|
hideDetails: boolean;
|
|
84
|
+
clearable: boolean;
|
|
85
85
|
hideSelected: boolean;
|
|
86
86
|
querySearchParam: string;
|
|
87
87
|
descriptionKey: string;
|
|
@@ -17,7 +17,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
18
|
"onUpdate:modelValue"?: ((value: string[] | null) => any) | undefined;
|
|
19
19
|
}>, {
|
|
20
|
-
validateOn: "input" | "submit" | "blur
|
|
20
|
+
validateOn: "input" | "submit" | "blur lazy" | "input lazy" | "lazy" | "lazy blur" | "lazy input" | "lazy submit" | "submit lazy" | "blur";
|
|
21
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
23
23
|
export default _default;
|
|
@@ -17,7 +17,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
18
|
"onUpdate:modelValue"?: ((value: string[] | null) => any) | undefined;
|
|
19
19
|
}>, {
|
|
20
|
-
validateOn: "input" | "submit" | "blur
|
|
20
|
+
validateOn: "input" | "submit" | "blur lazy" | "input lazy" | "lazy" | "lazy blur" | "lazy input" | "lazy submit" | "submit lazy" | "blur";
|
|
21
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
23
23
|
export default _default;
|
|
@@ -16,7 +16,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
16
16
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
17
|
"onUpdate:model-value"?: ((value: string) => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
|
-
validateOn: "input" | "submit" | "blur
|
|
19
|
+
validateOn: "input" | "submit" | "blur lazy" | "input lazy" | "lazy" | "lazy blur" | "lazy input" | "lazy submit" | "submit lazy" | "blur";
|
|
20
20
|
customId: string;
|
|
21
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
@@ -16,7 +16,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
16
16
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
17
|
"onUpdate:model-value"?: ((value: string) => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
|
-
validateOn: "input" | "submit" | "blur
|
|
19
|
+
validateOn: "input" | "submit" | "blur lazy" | "input lazy" | "lazy" | "lazy blur" | "lazy input" | "lazy submit" | "submit lazy" | "blur";
|
|
20
20
|
customId: string;
|
|
21
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
package/package.json
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"dist/*"
|
|
11
|
-
],
|
|
12
|
-
"exports": {
|
|
13
|
-
".": {
|
|
14
|
-
"require": "./dist/index.js",
|
|
15
|
-
"import": "./dist/index.mjs",
|
|
16
|
-
"types": "./dist/index.d.ts"
|
|
2
|
+
"name": "@winchsa/ui",
|
|
3
|
+
"version": "0.1.64",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": false,
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
17
8
|
},
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/*"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"require": "./dist/index.js",
|
|
15
|
+
"import": "./dist/index.mjs",
|
|
16
|
+
"types": "./dist/index.d.ts"
|
|
17
|
+
},
|
|
18
|
+
"./utils": {
|
|
19
|
+
"require": "./dist/utils/index.js",
|
|
20
|
+
"import": "./dist/utils/index.mjs",
|
|
21
|
+
"types": "./dist/utils/index.d.ts"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"module": "./dist/index.mjs",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"dev": "vite",
|
|
28
|
+
"build": "unbuild",
|
|
29
|
+
"lint": "eslint \"**/*.{ts,vue,mjs}\"",
|
|
30
|
+
"lint:fix": "eslint \"**/*.{ts,vue,mjs}\" --fix",
|
|
31
|
+
"bump": "pnpm run build && pnpm version patch"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"@intlify/unplugin-vue-i18n": "^4.0.0",
|
|
35
|
+
"@tanstack/vue-query": "^5.74.5",
|
|
36
|
+
"@vueuse/core": "11.3.0",
|
|
37
|
+
"@vueuse/router": "^13.1.0",
|
|
38
|
+
"ofetch": "^1.4.1",
|
|
39
|
+
"vue": "^3.5.13",
|
|
40
|
+
"vue-i18n": "9.14.5",
|
|
41
|
+
"vue-router": "4.4.5",
|
|
42
|
+
"vue-sonner": "^1.3.0",
|
|
43
|
+
"vue3-perfect-scrollbar": "2.0.0",
|
|
44
|
+
"vuetify": "3.10.11"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@vuepic/vue-datepicker": "^11.0.0",
|
|
48
|
+
"cropperjs": "^1.6.2",
|
|
49
|
+
"print-js": "^1.6.0",
|
|
50
|
+
"v-calendar": "^3.1.2",
|
|
51
|
+
"vue-multiselect": "^3.1.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@tanstack/eslint-plugin-query": "^5.73.3",
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
56
|
+
"@types/node": "^22.12.0",
|
|
57
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
58
|
+
"eslint": "^8.57.1",
|
|
59
|
+
"eslint-import-resolver-typescript": "^4.3.3",
|
|
60
|
+
"eslint-plugin-import": "^2.31.0",
|
|
61
|
+
"eslint-plugin-vue": "^9.32.0",
|
|
62
|
+
"sass": "1.92.1",
|
|
63
|
+
"typescript": "^5.9.3",
|
|
64
|
+
"unbuild": "^3.0.0",
|
|
65
|
+
"vite": "^5.4.21",
|
|
66
|
+
"vite-plugin-vuetify": "^2.1.2",
|
|
67
|
+
"vue-sfc-transformer": "^0.1.16",
|
|
68
|
+
"vue-tsc": "^3.1.1"
|
|
22
69
|
}
|
|
23
|
-
|
|
24
|
-
"main": "./dist/index.js",
|
|
25
|
-
"module": "./dist/index.mjs",
|
|
26
|
-
"peerDependencies": {
|
|
27
|
-
"@intlify/unplugin-vue-i18n": "^4.0.0",
|
|
28
|
-
"@tanstack/vue-query": "^5.74.5",
|
|
29
|
-
"@vueuse/core": "11.3.0",
|
|
30
|
-
"@vueuse/router": "^13.1.0",
|
|
31
|
-
"ofetch": "^1.4.1",
|
|
32
|
-
"vue": "^3.5.13",
|
|
33
|
-
"vue-i18n": "9.14.5",
|
|
34
|
-
"vue-router": "4.4.5",
|
|
35
|
-
"vue-sonner": "^1.3.0",
|
|
36
|
-
"vue3-perfect-scrollbar": "2.0.0",
|
|
37
|
-
"vuetify": "3.10.11"
|
|
38
|
-
},
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"@vuepic/vue-datepicker": "^11.0.0",
|
|
41
|
-
"cropperjs": "^1.6.2",
|
|
42
|
-
"print-js": "^1.6.0",
|
|
43
|
-
"v-calendar": "^3.1.2",
|
|
44
|
-
"vue-multiselect": "^3.1.0"
|
|
45
|
-
},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@tanstack/eslint-plugin-query": "^5.73.3",
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
49
|
-
"@types/node": "^22.12.0",
|
|
50
|
-
"@vitejs/plugin-vue": "^6.0.1",
|
|
51
|
-
"eslint": "^8.57.1",
|
|
52
|
-
"eslint-import-resolver-typescript": "^4.3.3",
|
|
53
|
-
"eslint-plugin-import": "^2.31.0",
|
|
54
|
-
"eslint-plugin-vue": "^9.32.0",
|
|
55
|
-
"sass": "1.92.1",
|
|
56
|
-
"typescript": "^5.9.3",
|
|
57
|
-
"unbuild": "^3.0.0",
|
|
58
|
-
"vite": "^5.4.21",
|
|
59
|
-
"vite-plugin-vuetify": "^2.1.2",
|
|
60
|
-
"vue-sfc-transformer": "^0.1.16",
|
|
61
|
-
"vue-tsc": "^3.1.1"
|
|
62
|
-
},
|
|
63
|
-
"scripts": {
|
|
64
|
-
"dev": "vite",
|
|
65
|
-
"build": "unbuild",
|
|
66
|
-
"lint": "eslint \"**/*.{ts,vue,mjs}\"",
|
|
67
|
-
"lint:fix": "eslint \"**/*.{ts,vue,mjs}\" --fix",
|
|
68
|
-
"bump": "pnpm run build && pnpm version patch"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
70
|
+
}
|