eco-vue-js 0.10.85 → 0.10.87
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/Checkbox/WCheckbox.vue.d.ts +2 -2
- package/dist/components/Checkbox/WCheckbox.vue.js +2 -2
- package/dist/components/DatePicker/WDatePicker.vue.d.ts +2 -2
- package/dist/components/DatePicker/WDatePicker.vue.js +2 -2
- package/dist/components/DatePicker/WDatePickerSingle.vue.d.ts +2 -2
- package/dist/components/DatePicker/WDatePickerSingle.vue.js +2 -2
- package/dist/components/FilePicker/WFilePicker.vue.d.ts +2 -2
- package/dist/components/FilePicker/WFilePicker.vue.js +5 -5
- package/dist/components/Form/WForm.vue.js +3 -3
- package/dist/components/Form/WFormValidator.vue.d.ts.map +1 -1
- package/dist/components/Form/WFormValidator.vue.js +12 -42
- package/dist/components/Form/models/injection.d.ts +9 -9
- package/dist/components/Form/models/injection.d.ts.map +1 -1
- package/dist/components/Form/use/useFormValueMap.d.ts +1 -1
- package/dist/components/Form/use/useFormValueMap.d.ts.map +1 -1
- package/dist/components/Form/use/useFormValueMap.js +4 -4
- package/dist/components/FormAsync/WFormAsyncSelect.vue.js +1 -1
- package/dist/components/FormAsync/WFormAsyncSelectInfiniteSingle.vue.js +1 -1
- package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.js +1 -1
- package/dist/components/FormAsync/WFormAsyncSelectStringified.vue.js +1 -1
- package/dist/components/Input/WInput.vue.d.ts +1 -1
- package/dist/components/Input/WInput.vue.d.ts.map +1 -1
- package/dist/components/Input/WInput.vue.js +4 -4
- package/dist/components/Input/WInputAsync.vue.d.ts +3 -3
- package/dist/components/Input/WInputAsync.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputAsync.vue.js +3 -3
- package/dist/components/Input/WInputSuggest.vue.d.ts +1 -1
- package/dist/components/Input/WInputSuggest.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputSuggest.vue.js +2 -2
- package/dist/components/List/WListCard.vue.d.ts +161 -2
- package/dist/components/List/WListCard.vue.d.ts.map +1 -1
- package/dist/components/List/components/HeaderSettingsModeButton.vue.d.ts +5 -1
- package/dist/components/List/components/HeaderSettingsModeButton.vue.d.ts.map +1 -1
- package/dist/components/List/components/HeaderSettingsModeButton.vue.js +3 -1
- package/dist/components/Select/WSelect.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelect.vue.js +11 -11
- package/dist/components/Select/WSelectAsync.vue.d.ts +3 -3
- package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsync.vue.js +12 -12
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts +3 -3
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsyncSingle.vue.js +5 -4
- package/dist/components/Select/WSelectSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectSingle.vue.js +3 -2
- package/dist/components/Select/WSelectStringified.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectStringified.vue.js +24 -4
- package/dist/components/Select/components/SelectAsyncList.vue.d.ts +3 -3
- package/dist/components/Select/components/SelectAsyncList.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncList.vue.js +1 -1
- package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts +5 -3
- package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncPrefix.vue.js +3 -7
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts +2 -0
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.js +3 -2
- package/dist/components/Select/components/SelectOptionPrefix.vue.d.ts +2 -0
- package/dist/components/Select/components/SelectOptionPrefix.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectOptionPrefix.vue.js +6 -3
- package/dist/components/Select/types.d.ts +10 -5
- package/dist/components/Select/types.d.ts.map +1 -1
- package/dist/components/Skeleton/WSkeleton.vue.js +1 -1
- package/dist/components/Toggle/WToggle.vue.d.ts +3 -3
- package/dist/components/Toggle/WToggle.vue.d.ts.map +1 -1
- package/dist/components/Toggle/WToggle.vue.js +2 -2
- package/dist/main.js +1 -1
- package/dist/utils/validate.d.ts +2 -0
- package/dist/utils/validate.d.ts.map +1 -1
- package/dist/utils/validate.js +32 -1
- package/package.json +4 -4
- package/tailwind-base/plugins/default.ts +1 -0
@@ -17,7 +17,94 @@ type __VLS_Props = {
|
|
17
17
|
allowSelect: boolean;
|
18
18
|
allowSelectHover: boolean;
|
19
19
|
};
|
20
|
-
declare function __VLS_template():
|
20
|
+
declare function __VLS_template(): {
|
21
|
+
attrs: Partial<{}>;
|
22
|
+
slots: {
|
23
|
+
default?(_: {
|
24
|
+
toggle: () => void;
|
25
|
+
isOpen: boolean;
|
26
|
+
validate: (silent?: boolean, path?: import('../Form/models/utils').ValidatePath) => string | undefined;
|
27
|
+
beforeClass: Record<string, boolean | undefined>;
|
28
|
+
}): any;
|
29
|
+
more?(_: {}): any;
|
30
|
+
more?(_: {}): any;
|
31
|
+
expansion?(_: {}): any;
|
32
|
+
};
|
33
|
+
refs: {
|
34
|
+
container: HTMLDivElement;
|
35
|
+
form: unknown;
|
36
|
+
more: ({
|
37
|
+
$: import('vue').ComponentInternalInstance;
|
38
|
+
$data: {};
|
39
|
+
$props: {
|
40
|
+
readonly icon?: SVGComponent | undefined;
|
41
|
+
readonly disabled?: boolean | undefined;
|
42
|
+
readonly anchor?: import('../Dropdown/types').DropdownProps["parentElement"] | undefined;
|
43
|
+
readonly onClose?: (() => any) | undefined;
|
44
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
45
|
+
$attrs: {
|
46
|
+
[x: string]: unknown;
|
47
|
+
};
|
48
|
+
$refs: {
|
49
|
+
[x: string]: unknown;
|
50
|
+
};
|
51
|
+
$slots: Readonly<{
|
52
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
53
|
+
}>;
|
54
|
+
$root: import('vue').ComponentPublicInstance | null;
|
55
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
56
|
+
$host: Element | null;
|
57
|
+
$emit: (event: "close") => void;
|
58
|
+
$el: HTMLButtonElement;
|
59
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
60
|
+
icon?: SVGComponent;
|
61
|
+
disabled?: boolean;
|
62
|
+
anchor?: import('../Dropdown/types').DropdownProps["parentElement"];
|
63
|
+
}> & Readonly<{
|
64
|
+
onClose?: (() => any) | undefined;
|
65
|
+
}>, {
|
66
|
+
open: () => void;
|
67
|
+
isOpen: Readonly<import('vue').Ref<boolean, boolean>>;
|
68
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
69
|
+
close: () => any;
|
70
|
+
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
71
|
+
beforeCreate?: (() => void) | (() => void)[];
|
72
|
+
created?: (() => void) | (() => void)[];
|
73
|
+
beforeMount?: (() => void) | (() => void)[];
|
74
|
+
mounted?: (() => void) | (() => void)[];
|
75
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
76
|
+
updated?: (() => void) | (() => void)[];
|
77
|
+
activated?: (() => void) | (() => void)[];
|
78
|
+
deactivated?: (() => void) | (() => void)[];
|
79
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
80
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
81
|
+
destroyed?: (() => void) | (() => void)[];
|
82
|
+
unmounted?: (() => void) | (() => void)[];
|
83
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
84
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
85
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
86
|
+
};
|
87
|
+
$forceUpdate: () => void;
|
88
|
+
$nextTick: typeof import('vue').nextTick;
|
89
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
90
|
+
} & Readonly<{}> & Omit<Readonly<{
|
91
|
+
icon?: SVGComponent;
|
92
|
+
disabled?: boolean;
|
93
|
+
anchor?: import('../Dropdown/types').DropdownProps["parentElement"];
|
94
|
+
}> & Readonly<{
|
95
|
+
onClose?: (() => any) | undefined;
|
96
|
+
}>, "isOpen" | "open"> & import('vue').ShallowUnwrapRef<{
|
97
|
+
open: () => void;
|
98
|
+
isOpen: Readonly<import('vue').Ref<boolean, boolean>>;
|
99
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
100
|
+
$slots: {
|
101
|
+
default?(_: {}): any;
|
102
|
+
};
|
103
|
+
}) | null;
|
104
|
+
anchor: HTMLDivElement;
|
105
|
+
};
|
106
|
+
rootEl: any;
|
107
|
+
};
|
21
108
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
22
109
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
23
110
|
"toggle:selected": () => any;
|
@@ -27,7 +114,79 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
27
114
|
"onToggle:selected"?: (() => any) | undefined;
|
28
115
|
"onHover:selected"?: (() => any) | undefined;
|
29
116
|
"onClick:action"?: (() => any) | undefined;
|
30
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false,
|
117
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
118
|
+
container: HTMLDivElement;
|
119
|
+
form: unknown;
|
120
|
+
more: ({
|
121
|
+
$: import('vue').ComponentInternalInstance;
|
122
|
+
$data: {};
|
123
|
+
$props: {
|
124
|
+
readonly icon?: SVGComponent | undefined;
|
125
|
+
readonly disabled?: boolean | undefined;
|
126
|
+
readonly anchor?: import('../Dropdown/types').DropdownProps["parentElement"] | undefined;
|
127
|
+
readonly onClose?: (() => any) | undefined;
|
128
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
129
|
+
$attrs: {
|
130
|
+
[x: string]: unknown;
|
131
|
+
};
|
132
|
+
$refs: {
|
133
|
+
[x: string]: unknown;
|
134
|
+
};
|
135
|
+
$slots: Readonly<{
|
136
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
137
|
+
}>;
|
138
|
+
$root: import('vue').ComponentPublicInstance | null;
|
139
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
140
|
+
$host: Element | null;
|
141
|
+
$emit: (event: "close") => void;
|
142
|
+
$el: HTMLButtonElement;
|
143
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
144
|
+
icon?: SVGComponent;
|
145
|
+
disabled?: boolean;
|
146
|
+
anchor?: import('../Dropdown/types').DropdownProps["parentElement"];
|
147
|
+
}> & Readonly<{
|
148
|
+
onClose?: (() => any) | undefined;
|
149
|
+
}>, {
|
150
|
+
open: () => void;
|
151
|
+
isOpen: Readonly<import('vue').Ref<boolean, boolean>>;
|
152
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
153
|
+
close: () => any;
|
154
|
+
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
155
|
+
beforeCreate?: (() => void) | (() => void)[];
|
156
|
+
created?: (() => void) | (() => void)[];
|
157
|
+
beforeMount?: (() => void) | (() => void)[];
|
158
|
+
mounted?: (() => void) | (() => void)[];
|
159
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
160
|
+
updated?: (() => void) | (() => void)[];
|
161
|
+
activated?: (() => void) | (() => void)[];
|
162
|
+
deactivated?: (() => void) | (() => void)[];
|
163
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
164
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
165
|
+
destroyed?: (() => void) | (() => void)[];
|
166
|
+
unmounted?: (() => void) | (() => void)[];
|
167
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
168
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
169
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
170
|
+
};
|
171
|
+
$forceUpdate: () => void;
|
172
|
+
$nextTick: typeof import('vue').nextTick;
|
173
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
174
|
+
} & Readonly<{}> & Omit<Readonly<{
|
175
|
+
icon?: SVGComponent;
|
176
|
+
disabled?: boolean;
|
177
|
+
anchor?: import('../Dropdown/types').DropdownProps["parentElement"];
|
178
|
+
}> & Readonly<{
|
179
|
+
onClose?: (() => any) | undefined;
|
180
|
+
}>, "isOpen" | "open"> & import('vue').ShallowUnwrapRef<{
|
181
|
+
open: () => void;
|
182
|
+
isOpen: Readonly<import('vue').Ref<boolean, boolean>>;
|
183
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
184
|
+
$slots: {
|
185
|
+
default?(_: {}): any;
|
186
|
+
};
|
187
|
+
}) | null;
|
188
|
+
anchor: HTMLDivElement;
|
189
|
+
}, any>;
|
31
190
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
32
191
|
export default _default;
|
33
192
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WListCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/List/WListCard.vue"],"names":[],"mappings":"AAoMA;
|
1
|
+
{"version":3,"file":"WListCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/List/WListCard.vue"],"names":[],"mappings":"AAoMA;AAyRA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAgB5C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,MAAM,EAAE,OAAO,GAAG,SAAS,CAAA;IAC3B,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,SAAS,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,SAAS,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,WAAW,EAAE,OAAO,GAAG,SAAS,CAAA;IAChC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,IAAI,EAAE,OAAO,CAAA;IACb,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;IAC/B,SAAS,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IAEjB,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,gBAAgB,EAAE,OAAO,CAAA;CAC1B,CAAC;AAmDF,iBAAS,cAAc;WA0YT,OAAO,IAA6B;;;;;;;YAjBpB,GAAG;sBACN,GAAG;sBACH,GAAG;2BACE,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA5Gd,GAAG,8CAEM,GAAG,yBACZ,GAAG,6DACnB,GAAG;;;;;;;;;;;;;;;;;;EA2HP;AA6BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA7JA,GAAG,8CAEM,GAAG,yBACZ,GAAG,6DACnB,GAAG;;;;;;;;;;;;;;;;OAiKN,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
@@ -2,6 +2,10 @@ type __VLS_Props = {
|
|
2
2
|
icon: SVGComponent;
|
3
3
|
active: boolean;
|
4
4
|
};
|
5
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
6
|
+
click: (value: MouseEvent) => any;
|
7
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
8
|
+
onClick?: ((value: MouseEvent) => any) | undefined;
|
9
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
6
10
|
export default _default;
|
7
11
|
//# sourceMappingURL=HeaderSettingsModeButton.vue.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"HeaderSettingsModeButton.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/components/HeaderSettingsModeButton.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"HeaderSettingsModeButton.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/components/HeaderSettingsModeButton.vue"],"names":[],"mappings":"AAeA;AA2BA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,YAAY,CAAA;IAClB,MAAM,EAAE,OAAO,CAAA;CAChB,CAAC;;;;;;AA6DF,wBAQG"}
|
@@ -6,13 +6,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
icon: {},
|
7
7
|
active: { type: Boolean }
|
8
8
|
},
|
9
|
+
emits: ["click"],
|
9
10
|
setup(__props) {
|
10
11
|
return (_ctx, _cache) => {
|
11
12
|
return openBlock(), createElementBlock("button", {
|
12
13
|
class: normalizeClass(["w-ripple w-ripple-hover relative flex justify-center rounded-2xl p-4", {
|
13
14
|
"text-primary dark:text-primary-dark bg-primary/10 dark:bg-primary-dark/10": _ctx.active,
|
14
15
|
"text-description": !_ctx.active
|
15
|
-
}])
|
16
|
+
}]),
|
17
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
16
18
|
}, [
|
17
19
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { class: "square-6" }))
|
18
20
|
], 2);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelect.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelect.vue"],"names":[],"mappings":"AA+KA;AA0cA,OAAO,KAAK,EAAC,qBAAqB,EAA8B,iBAAiB,EAAE,WAAW,EAAC,MAAM,SAAS,CAAA;yBAc7F,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,kBAAkB,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EAChJ,aA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sfc_main = /* @__PURE__ */ defineComponent({
|
|
32
32
|
hideOptionIcon: { type: Boolean },
|
33
33
|
createdData: {},
|
34
34
|
selectOnClose: { type: Boolean },
|
35
|
+
emptyValue: {},
|
35
36
|
mobileTitle: {},
|
36
37
|
persist: { type: Boolean },
|
37
38
|
closeOnClear: { type: Boolean },
|
@@ -70,7 +71,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
70
71
|
mandatory: { type: Boolean },
|
71
72
|
noMargin: { type: Boolean },
|
72
73
|
allowCopy: { type: Boolean },
|
73
|
-
emptyValue: {},
|
74
74
|
leftError: { type: Boolean },
|
75
75
|
filterField: {},
|
76
76
|
filterValue: {},
|
@@ -101,8 +101,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
101
101
|
const search = ref("");
|
102
102
|
const isModelValueSearch = computed(() => !!search.value && props.modelValue.includes(search.value));
|
103
103
|
const searchPrepared = computed(() => isModelValueSearch.value ? "" : search.value.trim().toLocaleLowerCase());
|
104
|
-
const
|
105
|
-
const { data, isLoading, error: queryError } = props.useQueryFnOptions ? props.queryParamsOptions === void 0 ? props.useQueryFnOptions({ enabled }) : props.useQueryFnOptions(toRef(props, "queryParamsOptions"), { enabled }) : {
|
104
|
+
const { data, isLoading, error: queryError } = props.useQueryFnOptions ? props.queryParamsOptions === void 0 ? props.useQueryFnOptions() : props.useQueryFnOptions(toRef(props, "queryParamsOptions")) : {
|
106
105
|
data: toRef(props, "options"),
|
107
106
|
isLoading: ref(false),
|
108
107
|
error: ref(void 0)
|
@@ -228,7 +227,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
228
227
|
search.value = value;
|
229
228
|
};
|
230
229
|
if (props.useQueryFnDefault) {
|
231
|
-
const { data: defaultData } = props.useQueryFnDefault({ enabled });
|
230
|
+
const { data: defaultData } = props.useQueryFnDefault({ enabled: computed(() => !props.disabled) });
|
232
231
|
watch(defaultData, (value) => {
|
233
232
|
if (value && props.modelValue.length === 0) {
|
234
233
|
select(props.valueGetter(value));
|
@@ -260,10 +259,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
260
259
|
return openBlock(), createBlock(_sfc_main$1, mergeProps({ ref: "input" }, {
|
261
260
|
...props,
|
262
261
|
modelValue: search.value,
|
263
|
-
hideInput: _ctx.modelValue.length === 0 ? false : unref(isMobile) ? !focused.value : !isOpen.value,
|
264
262
|
loading: _ctx.loading || unref(isLoading) || loadingCreate.value,
|
263
|
+
hideInput: _ctx.modelValue.length === 0 && !_ctx.emptyValue ? false : unref(isMobile) ? !focused.value : !isOpen.value,
|
265
264
|
filterValue: _ctx.filterValue === void 0 ? _ctx.modelValue : _ctx.filterValue,
|
266
|
-
placeholder: _ctx.
|
265
|
+
placeholder: _ctx.emptyValue ? void 0 : _ctx.placeholder,
|
266
|
+
emptyValue: void 0
|
267
267
|
}, {
|
268
268
|
class: _ctx.$attrs.class,
|
269
269
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => !_ctx.loading && !unref(isLoading) && (search.value = $event ?? "")),
|
@@ -283,7 +283,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
283
283
|
})
|
284
284
|
}), createSlots({
|
285
285
|
prefix: withCtx(({ unclickable }) => [
|
286
|
-
(_ctx.hidePrefix ? unref(isMobile) ? unclickable || !focused.value : !isOpen.value : true) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.modelValue, (value, index) => {
|
286
|
+
(_ctx.hidePrefix ? unref(isMobile) ? unclickable || !focused.value : !isOpen.value : true) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(!_ctx.emptyValue || _ctx.modelValue.length !== 0 ? _ctx.modelValue : _ctx.emptyValue, (value, index) => {
|
287
287
|
return openBlock(), createBlock(_sfc_main$3, {
|
288
288
|
key: value,
|
289
289
|
option: optionsWithCreated.value.find((item) => _ctx.valueGetter(item) === value),
|
@@ -293,8 +293,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
293
293
|
loading: _ctx.loading || unref(isLoading),
|
294
294
|
disabled: unref(isDisabled),
|
295
295
|
readonly: unref(isReadonly),
|
296
|
-
"disable-clear": _ctx.disableClear || unref(isReadonly) || _ctx.seamless && !focused.value,
|
296
|
+
"disable-clear": _ctx.disableClear || unref(isReadonly) || _ctx.seamless && !focused.value || _ctx.modelValue.length === 0,
|
297
297
|
search: value,
|
298
|
+
skeleton: optionsWithCreated.value.length === 0,
|
298
299
|
class: normalizeClass({
|
299
300
|
"cursor-pointer": !unref(isDisabled) && !unref(isReadonly),
|
300
301
|
"cursor-not-allowed opacity-50": unref(isDisabled)
|
@@ -307,13 +308,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
307
308
|
renderSlot(_ctx.$slots, "option", mergeProps({ ref_for: true }, optionScope, {
|
308
309
|
selected: true,
|
309
310
|
model: true,
|
310
|
-
index
|
311
|
-
skeleton: false
|
311
|
+
index
|
312
312
|
}))
|
313
313
|
]),
|
314
314
|
key: "0"
|
315
315
|
} : void 0
|
316
|
-
]), 1032, ["option", "option-component", "option-component-props", "index", "loading", "disabled", "readonly", "disable-clear", "search", "class", "onUnselect"]);
|
316
|
+
]), 1032, ["option", "option-component", "option-component-props", "index", "loading", "disabled", "readonly", "disable-clear", "search", "skeleton", "class", "onUnselect"]);
|
317
317
|
}), 128)) : createCommentVNode("", true)
|
318
318
|
]),
|
319
319
|
content: withCtx(() => [
|
@@ -4,10 +4,10 @@ declare const _default: <Model extends number | string, Data extends DefaultData
|
|
4
4
|
readonly onSelect?: ((item: Model) => any) | undefined;
|
5
5
|
readonly onBlur?: ((value: FocusEvent) => any) | undefined;
|
6
6
|
readonly onFocus?: ((value: FocusEvent) => any) | undefined;
|
7
|
-
readonly "onUpdate:
|
7
|
+
readonly "onUpdate:model-value"?: ((value: Model[]) => any) | undefined;
|
8
8
|
readonly onUnselect?: ((item: Model) => any) | undefined;
|
9
9
|
readonly "onInit-model"?: (() => any) | undefined;
|
10
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onFocus" | "onBlur" | "onSelect" | "
|
10
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onFocus" | "onBlur" | "onSelect" | "onUnselect" | "onUpdate:model-value" | "onInit-model"> & SelectAsyncProps<Model, Data, QueryParams, OptionComponent> & Partial<{}>> & import('vue').PublicProps;
|
11
11
|
expose(exposed: import('vue').ShallowUnwrapRef<{
|
12
12
|
focus: () => void;
|
13
13
|
blur: () => void;
|
@@ -28,7 +28,7 @@ declare const _default: <Model extends number | string, Data extends DefaultData
|
|
28
28
|
emit: {
|
29
29
|
(e: "select", item: Model): void;
|
30
30
|
(e: "unselect", item: Model): void;
|
31
|
-
(e: "update:
|
31
|
+
(e: "update:model-value", value: Model[]): void;
|
32
32
|
(e: "init-model"): void;
|
33
33
|
(e: "focus", value: FocusEvent): void;
|
34
34
|
(e: "blur", value: FocusEvent): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelectAsync.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsync.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WSelectAsync.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsync.vue"],"names":[],"mappings":"AA8HA;AAyTA,OAAO,KAAK,EAAC,gBAAgB,EAAE,qBAAqB,EAA8B,iBAAiB,EAAC,MAAM,SAAS,CAAA;yBAYlG,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EACzI,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG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
|
27
27
|
selectOnClose: { type: Boolean },
|
28
|
+
emptyValue: {},
|
28
29
|
mobileTitle: {},
|
29
30
|
persist: { type: Boolean },
|
30
31
|
closeOnClear: { type: Boolean },
|
@@ -63,7 +64,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
63
64
|
mandatory: { type: Boolean },
|
64
65
|
noMargin: { type: Boolean },
|
65
66
|
allowCopy: { type: Boolean },
|
66
|
-
emptyValue: {},
|
67
67
|
leftError: { type: Boolean },
|
68
68
|
filterField: {},
|
69
69
|
filterValue: {},
|
@@ -78,7 +78,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
78
78
|
optionComponent: {},
|
79
79
|
optionComponentProps: {}
|
80
80
|
},
|
81
|
-
emits: ["select", "unselect", "update:
|
81
|
+
emits: ["select", "unselect", "update:model-value", "init-model", "focus", "blur"],
|
82
82
|
setup(__props, { expose: __expose, emit: __emit }) {
|
83
83
|
const props = __props;
|
84
84
|
const emit = __emit;
|
@@ -93,10 +93,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
93
93
|
const loadingCreate = ref(false);
|
94
94
|
const isDisabledComputed = computed(() => props.loading || isReadonly.value || isDisabled.value);
|
95
95
|
const isModelValueSearch = computed(() => !!search.value && props.modelValue.includes(search.value));
|
96
|
-
const enabled = computed(() => !props.disabled);
|
97
96
|
const queryParams = computed(() => ({ ...props.queryParamsOptions, [props.searchField ?? "search"]: search.value }));
|
98
97
|
const queryParamsFirstPage = computed(() => ({ ...queryParams.value, page: 1 }));
|
99
|
-
const { data: firstPageData } = props.useQueryFnOptions(queryParamsFirstPage
|
98
|
+
const { data: firstPageData } = props.useQueryFnOptions(queryParamsFirstPage);
|
100
99
|
const hasSearchOption = computed(() => {
|
101
100
|
if (props.createdData?.some((option) => props.valueGetter(option) === search.value)) return true;
|
102
101
|
return firstPageData.value?.results.some((option) => props.valueGetter(option) === search.value);
|
@@ -148,7 +147,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
148
147
|
};
|
149
148
|
const updateSelected = (value) => {
|
150
149
|
if (isDisabledComputed.value) return;
|
151
|
-
emit("update:
|
150
|
+
emit("update:model-value", value);
|
152
151
|
search.value = "";
|
153
152
|
};
|
154
153
|
const focus = () => {
|
@@ -165,7 +164,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
165
164
|
search.value = value;
|
166
165
|
};
|
167
166
|
if (props.useQueryFnDefault) {
|
168
|
-
const { data: defaultData } = props.useQueryFnDefault({ enabled });
|
167
|
+
const { data: defaultData } = props.useQueryFnDefault({ enabled: computed(() => !props.disabled) });
|
169
168
|
watch(defaultData, (value) => {
|
170
169
|
if (value && props.modelValue.length === 0) {
|
171
170
|
select(props.valueGetter(value));
|
@@ -188,9 +187,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
188
187
|
...props,
|
189
188
|
modelValue: search.value,
|
190
189
|
loading: _ctx.loading || isFetchingPrefix.value || loadingCreate.value,
|
191
|
-
hideInput: unref(isMobile) ? !focused.value : !isOpen.value,
|
190
|
+
hideInput: _ctx.modelValue.length === 0 && !_ctx.emptyValue ? false : unref(isMobile) ? !focused.value : !isOpen.value,
|
192
191
|
filterValue: _ctx.filterValue === void 0 ? _ctx.modelValue : _ctx.filterValue,
|
193
|
-
placeholder: _ctx.
|
192
|
+
placeholder: _ctx.emptyValue ? void 0 : _ctx.placeholder,
|
193
|
+
emptyValue: void 0
|
194
194
|
}, {
|
195
195
|
class: _ctx.$attrs.class,
|
196
196
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => !_ctx.loading && !isFetchingPrefix.value && (search.value = $event ?? "")),
|
@@ -213,12 +213,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
213
213
|
(_ctx.hidePrefix ? unref(isMobile) ? unclickable || !focused.value : !isOpen.value : true) ? (openBlock(), createBlock(_sfc_main$3, {
|
214
214
|
key: 0,
|
215
215
|
"use-query-fn": _ctx.useQueryFnPrefix ?? _ctx.useQueryFnOptions,
|
216
|
-
"model-value": _ctx.modelValue,
|
216
|
+
"model-value": !_ctx.emptyValue || _ctx.modelValue.length !== 0 ? _ctx.modelValue : _ctx.emptyValue,
|
217
217
|
disabled: unref(isDisabled),
|
218
218
|
loading: _ctx.loading || isFetchingPrefix.value,
|
219
219
|
"option-component": _ctx.optionComponent,
|
220
220
|
"option-component-props": _ctx.optionComponentProps,
|
221
|
-
"disable-clear": _ctx.disableClear || unref(isReadonly) || _ctx.seamless && !focused.value,
|
221
|
+
"disable-clear": _ctx.disableClear || unref(isReadonly) || _ctx.seamless && !focused.value || _ctx.modelValue.length === 0,
|
222
222
|
"preview-data": _ctx.previewData,
|
223
223
|
"created-data": _ctx.createdData,
|
224
224
|
"value-getter": _ctx.valueGetter,
|
@@ -233,13 +233,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
233
233
|
}, createSlots({ _: 2 }, [
|
234
234
|
_ctx.$slots.option ? {
|
235
235
|
name: "option",
|
236
|
-
fn: withCtx(({ option, index }) => [
|
236
|
+
fn: withCtx(({ option, index, skeleton: skeletonOption }) => [
|
237
237
|
renderSlot(_ctx.$slots, "option", {
|
238
238
|
option,
|
239
239
|
index,
|
240
240
|
selected: true,
|
241
241
|
model: true,
|
242
|
-
skeleton:
|
242
|
+
skeleton: skeletonOption,
|
243
243
|
search: void 0
|
244
244
|
})
|
245
245
|
]),
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { SelectAsyncSingleProps, SelectOptionComponent, SelectOptionProps } from './types';
|
2
2
|
declare const _default: <Model extends number | string, Data extends DefaultData, QueryParams, OptionComponent extends SelectOptionComponent<Data>, AllowClear extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
4
|
-
readonly "onUpdate:
|
4
|
+
readonly "onUpdate:model-value"?: ((value: AllowClear extends true ? Model | null : Model) => any) | undefined;
|
5
5
|
readonly "onInit-model"?: (() => any) | undefined;
|
6
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:
|
6
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:model-value" | "onInit-model"> & SelectAsyncSingleProps<Model, Data, QueryParams, OptionComponent, AllowClear> & Partial<{}>> & import('vue').PublicProps;
|
7
7
|
expose(exposed: import('vue').ShallowUnwrapRef<{
|
8
8
|
blur: () => void;
|
9
9
|
}>): void;
|
@@ -20,7 +20,7 @@ declare const _default: <Model extends number | string, Data extends DefaultData
|
|
20
20
|
option?: (props: PartialNot<SelectOptionProps<Data>>) => void;
|
21
21
|
};
|
22
22
|
emit: {
|
23
|
-
(e: "update:
|
23
|
+
(e: "update:model-value", value: AllowClear extends true ? Model | null : Model): void;
|
24
24
|
(e: "init-model"): void;
|
25
25
|
};
|
26
26
|
}>) => import('vue').VNode & {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelectAsyncSingle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsyncSingle.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WSelectAsyncSingle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsyncSingle.vue"],"names":[],"mappings":"AAoDA;AAyGA,OAAO,KAAK,EAAC,sBAAsB,EAAE,qBAAqB,EAAE,iBAAiB,EAAC,MAAM,SAAS,CAAA;yBAM5E,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EAAE,UAAU,SAAS,OAAO,GAAG,KAAK,EAC7K,aA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
+
emptyValue: {},
|
13
14
|
useQueryFnOptions: {},
|
14
15
|
useQueryFnPrefix: {},
|
15
16
|
queryParamsOptions: {},
|
@@ -60,7 +61,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
60
61
|
mandatory: { type: Boolean },
|
61
62
|
noMargin: { type: Boolean },
|
62
63
|
allowCopy: { type: Boolean },
|
63
|
-
emptyValue: {},
|
64
64
|
leftError: { type: Boolean },
|
65
65
|
filterField: {},
|
66
66
|
filterValue: {},
|
@@ -75,14 +75,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
75
75
|
optionComponent: {},
|
76
76
|
optionComponentProps: {}
|
77
77
|
},
|
78
|
-
emits: ["update:
|
78
|
+
emits: ["update:model-value", "init-model"],
|
79
79
|
setup(__props, { expose: __expose, emit: __emit }) {
|
80
80
|
const props = __props;
|
81
81
|
const emit = __emit;
|
82
82
|
const selectComponentRef = useTemplateRef("selectComponent");
|
83
83
|
const arrayValue = computed(() => props.modelValue ? [props.modelValue] : []);
|
84
84
|
const updateModelValue = (value) => {
|
85
|
-
emit("update:
|
85
|
+
emit("update:model-value", value);
|
86
86
|
};
|
87
87
|
const blur = () => {
|
88
88
|
selectComponentRef.value?.blur();
|
@@ -100,7 +100,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
100
100
|
createdData: _ctx.createdData ? [_ctx.createdData] : void 0,
|
101
101
|
hidePrefix: true,
|
102
102
|
filterValue: _ctx.filterValue === void 0 ? _ctx.modelValue : _ctx.filterValue,
|
103
|
-
selectOnClose: props.searchModel ? props.searchModel : props.selectOnClose
|
103
|
+
selectOnClose: props.searchModel ? props.searchModel : props.selectOnClose,
|
104
|
+
emptyValue: props.emptyValue !== void 0 && props.emptyValue !== null ? [props.emptyValue] : void 0
|
104
105
|
}, {
|
105
106
|
class: _ctx.$attrs.class,
|
106
107
|
onSelect: _cache[0] || (_cache[0] = ($event) => updateModelValue($event)),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelectSingle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectSingle.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WSelectSingle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectSingle.vue"],"names":[],"mappings":"AAoDA;AA4GA,OAAO,KAAK,EAAC,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAExF,OAAO,EAAC,KAAK,KAAK,EAAyC,MAAM,KAAK,CAAA;yBAIrD,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,kBAAkB,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EAAE,UAAU,SAAS,OAAO,GAAG,KAAK,EACpL,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WA8MO,mBAAmB,CAAC;;;;8RAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;;MAAsB,GAAG,IAAI;WACpE,GAAG;;gBAlKD,MAAM,KAAK,EAAE;mBACV,MAAM,KAAK,EAAE;gBAChB,MAAM,KAAK,EAAE;iBACZ,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,EAAE;;gBAHxD,MAAM,KAAK,EAAE;mBACV,MAAM,KAAK,EAAE;gBAChB,MAAM,KAAK,EAAE;iBACZ,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,EAAE;;;YAjC5D,oBAAoB,0DAAoB,IAAI;YAC5C,4BAA4B,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC9D,YAAY,GAAG,IAAI;;EAkMrB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAzNzE,wBAyN4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -9,6 +9,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
9
|
allowClear: { type: Boolean },
|
10
10
|
searchModel: { type: Boolean },
|
11
11
|
createdData: {},
|
12
|
+
emptyValue: {},
|
12
13
|
valueGetter: {},
|
13
14
|
searchFn: {},
|
14
15
|
useQueryFnDefault: {},
|
@@ -56,7 +57,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
56
57
|
mandatory: { type: Boolean },
|
57
58
|
noMargin: { type: Boolean },
|
58
59
|
allowCopy: { type: Boolean },
|
59
|
-
emptyValue: {},
|
60
60
|
leftError: { type: Boolean },
|
61
61
|
filterField: {},
|
62
62
|
filterValue: {},
|
@@ -99,7 +99,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
99
99
|
createdData: _ctx.createdData ? [_ctx.createdData] : void 0,
|
100
100
|
hidePrefix: true,
|
101
101
|
filterValue: _ctx.filterValue === void 0 ? _ctx.modelValue : _ctx.filterValue,
|
102
|
-
selectOnClose: props.searchModel ? props.searchModel : props.selectOnClose
|
102
|
+
selectOnClose: props.searchModel ? props.searchModel : props.selectOnClose,
|
103
|
+
emptyValue: props.emptyValue !== void 0 && props.emptyValue !== null ? [props.emptyValue] : void 0
|
103
104
|
}, {
|
104
105
|
class: _ctx.$attrs.class,
|
105
106
|
onSelect: _cache[0] || (_cache[0] = ($event) => updateModelValue($event)),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelectStringified.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectStringified.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WSelectStringified.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectStringified.vue"],"names":[],"mappings":"AAgDA;AAuIA,OAAO,KAAK,EAAC,qBAAqB,EAAE,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,SAAS,CAAA;AAE7F,OAAO,EAAC,KAAK,KAAK,EAA2B,MAAM,KAAK,CAAA;yBAIvC,KAAK,SAAS,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,kBAAkB,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EACvI,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAkOO,mBAAmB,CAAC;;;;uRAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;;MAAsB,GAAG,IAAI;WACpE,GAAG;;gBAvJD,MAAM,KAAK,EAAE;mBACV,MAAM,KAAK,EAAE;gBAChB,MAAM,KAAK,EAAE;iBACZ,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,EAAE;;gBAHxD,MAAM,KAAK,EAAE;mBACV,MAAM,KAAK,EAAE;gBAChB,MAAM,KAAK,EAAE;iBACZ,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,EAAE;;;YAlE5D,oBAAoB,SAAS,KAAK,GAAG,IAAI;YACzC,4BAA4B,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC9D,YAAY,GAAG,IAAI;;EAwNrB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA7OzE,wBA6O4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -7,6 +7,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
props: {
|
8
8
|
modelValue: {},
|
9
9
|
divider: {},
|
10
|
+
emptyValue: {},
|
10
11
|
valueGetter: {},
|
11
12
|
searchFn: {},
|
12
13
|
useQueryFnDefault: {},
|
@@ -56,7 +57,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
56
57
|
mandatory: { type: Boolean },
|
57
58
|
noMargin: { type: Boolean },
|
58
59
|
allowCopy: { type: Boolean },
|
59
|
-
emptyValue: {},
|
60
60
|
leftError: { type: Boolean },
|
61
61
|
filterField: {},
|
62
62
|
filterValue: {},
|
@@ -79,14 +79,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
79
79
|
const props = __props;
|
80
80
|
const emit = __emit;
|
81
81
|
const selectComponentRef = useTemplateRef("selectComponent");
|
82
|
-
const
|
82
|
+
const decodeValue = (value) => {
|
83
|
+
if (!value) return [];
|
84
|
+
if (props.divider !== "json") return value.split(props.divider).filter((item, index, arr) => item !== "" && arr.indexOf(item) === index);
|
85
|
+
const result = [];
|
86
|
+
try {
|
87
|
+
const parsed = JSON.parse(value);
|
88
|
+
if (!Array.isArray(parsed)) return result;
|
89
|
+
for (const item in parsed) {
|
90
|
+
if (typeof item === "string" && item !== "" && !result.includes(item)) result.push(item);
|
91
|
+
}
|
92
|
+
return result;
|
93
|
+
} catch {
|
94
|
+
return result;
|
95
|
+
}
|
96
|
+
};
|
97
|
+
const encodeValue = (value) => {
|
98
|
+
return props.divider === "json" ? JSON.stringify(value) : value.join(props.divider);
|
99
|
+
};
|
100
|
+
const arrayValue = computed(() => decodeValue(props.modelValue));
|
101
|
+
const arrayValueEmpty = computed(() => props.emptyValue ? decodeValue(props.emptyValue) : void 0);
|
83
102
|
const updateModelValue = (value, isSelect) => {
|
84
103
|
const valueList = value.split(props.divider);
|
85
104
|
let newValue;
|
86
105
|
if (isSelect) {
|
87
106
|
newValue = [...arrayValue.value, ...valueList].filter((item, index, arr) => item !== "" && arr.indexOf(item) === index).join(props.divider);
|
88
107
|
} else {
|
89
|
-
newValue = arrayValue.value.filter((item) => !valueList.includes(item))
|
108
|
+
newValue = encodeValue(arrayValue.value.filter((item) => !valueList.includes(item)));
|
90
109
|
}
|
91
110
|
if (newValue === props.modelValue) return;
|
92
111
|
emit("update:model-value", newValue);
|
@@ -102,7 +121,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
102
121
|
...props,
|
103
122
|
modelValue: arrayValue.value,
|
104
123
|
filterValue: _ctx.filterValue === void 0 ? arrayValue.value : _ctx.filterValue,
|
105
|
-
createdData: _ctx.createOption ? arrayValue.value.map(_ctx.createOption) : void 0
|
124
|
+
createdData: _ctx.createOption ? arrayValue.value.map(_ctx.createOption) : void 0,
|
125
|
+
emptyValue: arrayValueEmpty.value
|
106
126
|
}, {
|
107
127
|
class: _ctx.$attrs.class,
|
108
128
|
onSelect: _cache[0] || (_cache[0] = ($event) => updateModelValue($event, true)),
|