eco-vue-js 0.10.84 → 0.10.86
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/WList.vue.js +4 -4
- package/dist/components/List/WListCard.vue.d.ts +161 -2
- package/dist/components/List/WListCard.vue.d.ts.map +1 -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 +1 -1
- package/tailwind-base/plugins/default.ts +1 -0
@@ -11,9 +11,9 @@ declare function __VLS_template(): {
|
|
11
11
|
};
|
12
12
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
13
13
|
declare const __VLS_component: import('vue').DefineComponent<CheckboxProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
14
|
-
"update:
|
14
|
+
"update:model-value": (value: boolean) => any;
|
15
15
|
}, string, import('vue').PublicProps, Readonly<CheckboxProps> & Readonly<{
|
16
|
-
"onUpdate:
|
16
|
+
"onUpdate:model-value"?: ((value: boolean) => any) | undefined;
|
17
17
|
}>, {
|
18
18
|
skeleton: boolean;
|
19
19
|
readonly: boolean;
|
@@ -27,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27
27
|
noMargin: { type: Boolean },
|
28
28
|
lessTransitions: { type: Boolean }
|
29
29
|
},
|
30
|
-
emits: ["update:
|
30
|
+
emits: ["update:model-value"],
|
31
31
|
setup(__props, { emit: __emit }) {
|
32
32
|
const props = __props;
|
33
33
|
const { isReadonly, isDisabled, isSkeleton } = useComponentStates(props);
|
@@ -35,7 +35,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
35
35
|
const elementRef = useTemplateRef("element");
|
36
36
|
const toggle = () => {
|
37
37
|
if (isDisabled.value || isReadonly.value || props.loading || isSkeleton.value) return;
|
38
|
-
emit("update:
|
38
|
+
emit("update:model-value", !props.modelValue);
|
39
39
|
};
|
40
40
|
return (_ctx, _cache) => {
|
41
41
|
return openBlock(), createElementBlock("button", mergeProps({ ref: "element" }, { class: _ctx.$attrs.class, style: _ctx.$attrs.style }, {
|
@@ -8,9 +8,9 @@ type __VLS_Props = {
|
|
8
8
|
skeleton?: boolean;
|
9
9
|
};
|
10
10
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
11
|
-
"update:
|
11
|
+
"update:model-value": (value: DateRange | undefined) => any;
|
12
12
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
13
|
-
"onUpdate:
|
13
|
+
"onUpdate:model-value"?: ((value: DateRange | undefined) => any) | undefined;
|
14
14
|
}>, {
|
15
15
|
skeleton: boolean;
|
16
16
|
readonly: boolean;
|
@@ -18,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
18
|
disabled: { type: Boolean, default: void 0 },
|
19
19
|
skeleton: { type: Boolean, default: void 0 }
|
20
20
|
},
|
21
|
-
emits: ["update:
|
21
|
+
emits: ["update:model-value"],
|
22
22
|
setup(__props, { emit: __emit }) {
|
23
23
|
const props = __props;
|
24
24
|
const { isReadonly, isDisabled, isSkeleton } = useComponentStates(props);
|
@@ -40,7 +40,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
40
40
|
} else {
|
41
41
|
setRange(value);
|
42
42
|
preselectedValue.value = null;
|
43
|
-
emit("update:
|
43
|
+
emit("update:model-value", dateRange.value);
|
44
44
|
dateRange.value = void 0;
|
45
45
|
}
|
46
46
|
};
|
@@ -8,9 +8,9 @@ type __VLS_Props = {
|
|
8
8
|
skeleton?: boolean;
|
9
9
|
};
|
10
10
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
11
|
-
"update:
|
11
|
+
"update:model-value": (value: Date | undefined) => any;
|
12
12
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
13
|
-
"onUpdate:
|
13
|
+
"onUpdate:model-value"?: ((value: Date | undefined) => any) | undefined;
|
14
14
|
}>, {
|
15
15
|
skeleton: boolean;
|
16
16
|
readonly: boolean;
|
@@ -17,7 +17,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
17
|
disabled: { type: Boolean, default: void 0 },
|
18
18
|
skeleton: { type: Boolean, default: void 0 }
|
19
19
|
},
|
20
|
-
emits: ["update:
|
20
|
+
emits: ["update:model-value"],
|
21
21
|
setup(__props, { emit: __emit }) {
|
22
22
|
const props = __props;
|
23
23
|
const { isReadonly, isDisabled, isSkeleton } = useComponentStates(props);
|
@@ -33,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
33
33
|
currentDate.value = value;
|
34
34
|
};
|
35
35
|
const onClickDay = (value) => {
|
36
|
-
emit("update:
|
36
|
+
emit("update:model-value", value);
|
37
37
|
};
|
38
38
|
const firstDay = computed(() => getStartOfWeek(currentDate.value));
|
39
39
|
const lastDay = computed(() => addDay(firstDay.value, 41));
|
@@ -31,10 +31,10 @@ declare function __VLS_template(): {
|
|
31
31
|
};
|
32
32
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
33
33
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
34
|
-
"update:
|
34
|
+
"update:model-value": (value: File[]) => any;
|
35
35
|
"clear:placeholder": () => any;
|
36
36
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
37
|
-
"onUpdate:
|
37
|
+
"onUpdate:model-value"?: ((value: File[]) => any) | undefined;
|
38
38
|
"onClear:placeholder"?: (() => any) | undefined;
|
39
39
|
}>, {
|
40
40
|
skeleton: boolean;
|
@@ -20,7 +20,7 @@ const _hoisted_3 = {
|
|
20
20
|
const _hoisted_4 = ["multiple", "accept"];
|
21
21
|
const _hoisted_5 = {
|
22
22
|
key: 2,
|
23
|
-
class: "grid-cols-
|
23
|
+
class: "grid-cols-fit-44 grid h-full items-center justify-center gap-6"
|
24
24
|
};
|
25
25
|
const _hoisted_6 = {
|
26
26
|
key: 3,
|
@@ -49,7 +49,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
49
49
|
disabled: { type: Boolean, default: void 0 },
|
50
50
|
required: { type: Boolean }
|
51
51
|
},
|
52
|
-
emits: ["update:
|
52
|
+
emits: ["update:model-value", "clear:placeholder"],
|
53
53
|
setup(__props, { emit: __emit }) {
|
54
54
|
const props = __props;
|
55
55
|
const emit = __emit;
|
@@ -60,19 +60,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
60
60
|
const containerHeight = ref(void 0);
|
61
61
|
const isActive = ref(false);
|
62
62
|
const updateModelValue = () => {
|
63
|
-
emit("update:
|
63
|
+
emit("update:model-value", inputRef.value?.files?.length ? Array.from(inputRef.value.files) : []);
|
64
64
|
};
|
65
65
|
const setIsActive = (value) => {
|
66
66
|
isActive.value = value;
|
67
67
|
};
|
68
68
|
const onDrop = (event) => {
|
69
69
|
setIsActive(false);
|
70
|
-
emit("update:
|
70
|
+
emit("update:model-value", event.dataTransfer?.files?.length ? Array.from(event.dataTransfer.files) : []);
|
71
71
|
};
|
72
72
|
const unselectFile = (index) => {
|
73
73
|
const newFiles = props.modelValue.slice();
|
74
74
|
newFiles.splice(index, 1);
|
75
|
-
emit("update:
|
75
|
+
emit("update:model-value", newFiles);
|
76
76
|
if (newFiles.length === 0 && inputRef.value) inputRef.value.value = "";
|
77
77
|
};
|
78
78
|
const preventDefaults = (e) => {
|
@@ -83,7 +83,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
83
83
|
}
|
84
84
|
);
|
85
85
|
const unlistenerInjected = inject(wFormUnlistener, void 0);
|
86
|
-
const unlistener = (key) => {
|
86
|
+
const unlistener = (value, key) => {
|
87
87
|
titleMap.unlistener(key);
|
88
88
|
errorMessageMap.unlistener(key);
|
89
89
|
hasChangesMap.unlistener(key);
|
@@ -92,7 +92,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
92
92
|
validateMap.unlistener(key);
|
93
93
|
invalidateMap.unlistener(key);
|
94
94
|
initModelMap.unlistener(key);
|
95
|
-
if (!props.name) unlistenerInjected?.(key);
|
95
|
+
if (!props.name) unlistenerInjected?.(void 0, key);
|
96
96
|
};
|
97
97
|
provide(wFormUnlistener, unlistener);
|
98
98
|
watch(errorMessageMap.map, () => emit("update:is-valid", isValid.value));
|
@@ -101,7 +101,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
101
101
|
watch(hasShownMap.value, (value) => emit("update:has-shown", value));
|
102
102
|
onBeforeUnmount(() => {
|
103
103
|
if (props.name) {
|
104
|
-
unlistenerInjected?.(props.name);
|
104
|
+
unlistenerInjected?.(void 0, props.name);
|
105
105
|
}
|
106
106
|
emit("update:is-valid", void 0);
|
107
107
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WFormValidator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/WFormValidator.vue"],"names":[],"mappings":"AAaA;
|
1
|
+
{"version":3,"file":"WFormValidator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/WFormValidator.vue"],"names":[],"mappings":"AAaA;AAiSA,OAAO,EAAC,KAAK,KAAK,EAAmG,MAAM,KAAK,CAAA;AAUhI,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,CAAA;IACpC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AA6QF,iBAAS,cAAc;WAuDT,OAAO,IAA6B;;iBA5DvC,MAAM,KAAK,EAAE;;iBAAb,MAAM,KAAK,EAAE;;;;;;EAiEvB;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;wBAtGC,MAAM;qBAtFN,IAAI;;;;;;;;;;;;;;;OAsMxB,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,7 +2,7 @@ import { defineComponent, inject, useSlots, computed, useTemplateRef, ref, watch
|
|
2
2
|
import { useIsInsideTab } from '../Tabs/use/useIsInsideTab.js';
|
3
3
|
import { useTabActiveListener } from '../Tabs/use/useTabActiveListener.js';
|
4
4
|
import { debounce } from '../../utils/utils.js';
|
5
|
-
import { validateRequired } from '../../utils/validate.js';
|
5
|
+
import { validateRequired, validateForbiddenRegexp, validateRequiredSymbols } from '../../utils/validate.js';
|
6
6
|
import { wFormTitleUpdater, wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormHasValueUpdater, wFormHasShownUpdater, wFormValidateUpdater, wFormInvalidateUpdater, wFormInitModelUpdater, wFormUnlistener } from './models/injection.js';
|
7
7
|
import { scrollToValidator } from './models/utils.js';
|
8
8
|
|
@@ -78,41 +78,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
78
78
|
return modelValue.value !== void 0 && modelValue.value !== null && modelValue.value !== "" && modelValue.value !== false;
|
79
79
|
});
|
80
80
|
const _hasValue = computed(() => mandatory.value && hasValueExact.value === false ? null : hasValueExact.value);
|
81
|
-
const requiredSymbols = computed(() => props.requiredSymbols?.split("") ?? []);
|
82
81
|
const _validate = (value) => {
|
83
82
|
const requiredMessage = required.value ? validateRequired(value) : void 0;
|
84
83
|
if (requiredMessage) return requiredMessage;
|
85
|
-
if (props.forbiddenRegexp && typeof value === "string")
|
86
|
-
|
87
|
-
if (match?.length) {
|
88
|
-
const message2 = "The following symbols are not allowed: " + match.filter((item, index) => match.indexOf(item) === index).map((item) => {
|
89
|
-
switch (item) {
|
90
|
-
case " ":
|
91
|
-
return "whitespace";
|
92
|
-
case "\n":
|
93
|
-
return "line break";
|
94
|
-
default:
|
95
|
-
return `" ${item} "`;
|
96
|
-
}
|
97
|
-
}).join(", ");
|
98
|
-
return message2;
|
99
|
-
}
|
100
|
-
}
|
101
|
-
if (props.requiredSymbols && typeof value === "string") {
|
102
|
-
const match = requiredSymbols.value.filter((item) => !value.includes(item)).map((item) => {
|
103
|
-
switch (item) {
|
104
|
-
case " ":
|
105
|
-
return "whitespace";
|
106
|
-
case "\n":
|
107
|
-
return "line break";
|
108
|
-
case " ":
|
109
|
-
return "tabulation";
|
110
|
-
default:
|
111
|
-
return `${item}`;
|
112
|
-
}
|
113
|
-
}).join(", ");
|
114
|
-
if (match.length) return "Please include the required symbols: " + match;
|
115
|
-
}
|
84
|
+
if (props.forbiddenRegexp && typeof value === "string") return validateForbiddenRegexp(props.forbiddenRegexp, value);
|
85
|
+
if (props.requiredSymbols && typeof value === "string") return validateRequiredSymbols(props.requiredSymbols, value);
|
116
86
|
let message;
|
117
87
|
if (props.validate instanceof Array) {
|
118
88
|
message = props.validate.map((cb) => cb(value)).filter((item) => item).join(", ") || void 0;
|
@@ -177,24 +147,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
177
147
|
};
|
178
148
|
watch(errorMessage, (value) => {
|
179
149
|
if (value === null) return;
|
180
|
-
if (props.name) errorMessageUpdater?.(props.name
|
150
|
+
if (props.name) errorMessageUpdater?.(value, props.name);
|
181
151
|
emit("update:is-valid", !value);
|
182
152
|
});
|
183
153
|
watch(hasChanges, (value) => {
|
184
154
|
if (value) wasChanged.value = true;
|
185
|
-
if (props.name) hasChangesUpdater?.(props.name
|
155
|
+
if (props.name) hasChangesUpdater?.(value, props.name);
|
186
156
|
emit("update:has-changes", value);
|
187
157
|
});
|
188
158
|
watch(_hasValue, (value) => {
|
189
|
-
if (props.name) hasValueUpdater?.(props.name
|
159
|
+
if (props.name) hasValueUpdater?.(value, props.name);
|
190
160
|
emit("update:has-value", value);
|
191
161
|
}, { immediate: true });
|
192
162
|
watch(isErrorShown, (value) => {
|
193
|
-
if (props.name) hasShownUpdater?.(props.name
|
163
|
+
if (props.name) hasShownUpdater?.(value, props.name);
|
194
164
|
emit("update:has-shown", value);
|
195
165
|
});
|
196
166
|
watch(title, (value) => {
|
197
|
-
if (props.name) titleUpdater?.(props.name
|
167
|
+
if (props.name) titleUpdater?.(value, props.name);
|
198
168
|
}, { immediate: true });
|
199
169
|
watch(required, () => {
|
200
170
|
doValidate();
|
@@ -205,13 +175,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
205
175
|
onBeforeMount(() => {
|
206
176
|
if (props.name) {
|
207
177
|
initModel();
|
208
|
-
validateUpdater?.(props.name
|
209
|
-
invalidateUpdater?.(props.name
|
210
|
-
initModelUpdater?.(props.name
|
178
|
+
validateUpdater?.(doValidate, props.name);
|
179
|
+
invalidateUpdater?.(invalidate, props.name);
|
180
|
+
initModelUpdater?.(initModel, props.name);
|
211
181
|
}
|
212
182
|
});
|
213
183
|
onBeforeUnmount(() => {
|
214
|
-
if (props.name) unlistener?.(props.name);
|
184
|
+
if (props.name) unlistener?.(void 0, props.name);
|
215
185
|
});
|
216
186
|
__expose({
|
217
187
|
validateOnUpdate() {
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { ValidatePath } from './utils';
|
2
2
|
import { InjectionKey } from 'vue';
|
3
|
-
export declare const wFormTitleUpdater: InjectionKey<(
|
4
|
-
export declare const wFormErrorMessageUpdater: InjectionKey<(
|
5
|
-
export declare const wFormHasChangesUpdater: InjectionKey<(
|
6
|
-
export declare const wFormHasValueUpdater: InjectionKey<(
|
7
|
-
export declare const wFormHasShownUpdater: InjectionKey<(
|
8
|
-
export declare const wFormValidateUpdater: InjectionKey<(
|
9
|
-
export declare const wFormInvalidateUpdater: InjectionKey<(
|
10
|
-
export declare const wFormInitModelUpdater: InjectionKey<(
|
11
|
-
export declare const wFormUnlistener: InjectionKey<(key: string) => void>;
|
3
|
+
export declare const wFormTitleUpdater: InjectionKey<(value: string | undefined, key: string) => void>;
|
4
|
+
export declare const wFormErrorMessageUpdater: InjectionKey<(value: string | undefined, key: string) => void>;
|
5
|
+
export declare const wFormHasChangesUpdater: InjectionKey<(value: boolean, key: string) => void>;
|
6
|
+
export declare const wFormHasValueUpdater: InjectionKey<(value: boolean | null, key: string) => void>;
|
7
|
+
export declare const wFormHasShownUpdater: InjectionKey<(value: boolean, key: string) => void>;
|
8
|
+
export declare const wFormValidateUpdater: InjectionKey<(value: (silent?: boolean, path?: ValidatePath) => string | undefined, key: string) => void>;
|
9
|
+
export declare const wFormInvalidateUpdater: InjectionKey<(value: (messages: Record<string, string | string[] | undefined>) => void, key: string) => void>;
|
10
|
+
export declare const wFormInitModelUpdater: InjectionKey<(value: () => void, key: string) => void>;
|
11
|
+
export declare const wFormUnlistener: InjectionKey<(value: undefined, key: string) => void>;
|
12
12
|
//# sourceMappingURL=injection.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"injection.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/models/injection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,KAAK,CAAA;AAErC,eAAO,MAAM,iBAAiB,EAAkC,YAAY,CAAC,CAAC,
|
1
|
+
{"version":3,"file":"injection.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/models/injection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,KAAK,CAAA;AAErC,eAAO,MAAM,iBAAiB,EAAkC,YAAY,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG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
1
1
|
import { InjectionKey, Ref } from 'vue';
|
2
|
-
export declare const useFormValueMap: <Value, ValueGetter extends Ref<Value> | ((map: Ref<Record<string, Value>>) => Value) | ((map: Ref<Record<string, Value>>) => Ref<Value>)>(injectionKey: InjectionKey<(
|
2
|
+
export declare const useFormValueMap: <Value, ValueGetter extends Ref<Value> | ((map: Ref<Record<string, Value>>) => Value) | ((map: Ref<Record<string, Value>>) => Ref<Value>)>(injectionKey: InjectionKey<(value: Value, key: string) => void>, name: Ref<string | undefined>, valueGetter: ValueGetter, immediate?: boolean) => {
|
3
3
|
unlistener(key: string): void;
|
4
4
|
map: Ref<Record<string, Value>>;
|
5
5
|
value: ValueGetter extends () => unknown ? ReturnType<ValueGetter> : Ref<Value>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useFormValueMap.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/use/useFormValueMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAE,KAAK,GAAG,EAAoD,MAAM,KAAK,CAAA;AAElG,eAAO,MAAM,eAAe,GAAI,KAAK,EAAE,WAAW,SAAS,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,EACtK,cAAc,YAAY,CAAC,CAAC,
|
1
|
+
{"version":3,"file":"useFormValueMap.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/use/useFormValueMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAE,KAAK,GAAG,EAAoD,MAAM,KAAK,CAAA;AAElG,eAAO,MAAM,eAAe,GAAI,KAAK,EAAE,WAAW,SAAS,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,EACtK,cAAc,YAAY,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,EAC/D,MAAM,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,EAC7B,aAAa,WAAW,EACxB,mBAAgB,KACf;IACD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;IAC/B,KAAK,EAAE,WAAW,SAAS,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAA;CAoChF,CAAA"}
|
@@ -2,10 +2,10 @@ import { ref, provide, inject, isRef, watch, onBeforeMount } from 'vue';
|
|
2
2
|
|
3
3
|
const useFormValueMap = (injectionKey, name, valueGetter, immediate = true) => {
|
4
4
|
const map = ref({});
|
5
|
-
const updater = (
|
5
|
+
const updater = (value2, key) => {
|
6
6
|
if (value2 === null || value2 === void 0) unlistener(key);
|
7
7
|
else map.value[key] = value2;
|
8
|
-
if (!name.value) updaterInjected?.(
|
8
|
+
if (!name.value) updaterInjected?.(value2, key);
|
9
9
|
};
|
10
10
|
const unlistener = (key) => {
|
11
11
|
if (key in map.value) delete map.value[key];
|
@@ -15,11 +15,11 @@ const useFormValueMap = (injectionKey, name, valueGetter, immediate = true) => {
|
|
15
15
|
const value = isRef(valueGetter) ? valueGetter : valueGetter(map);
|
16
16
|
if (isRef(value)) {
|
17
17
|
watch(value, (value2) => {
|
18
|
-
if (name.value) updaterInjected?.(name.value
|
18
|
+
if (name.value) updaterInjected?.(value2, name.value);
|
19
19
|
}, { immediate });
|
20
20
|
} else {
|
21
21
|
onBeforeMount(() => {
|
22
|
-
if (name.value) updaterInjected?.(
|
22
|
+
if (name.value) updaterInjected?.(value, name.value);
|
23
23
|
});
|
24
24
|
}
|
25
25
|
return {
|
@@ -16,6 +16,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
16
|
hideOptionIcon: { type: Boolean },
|
17
17
|
createdData: {},
|
18
18
|
selectOnClose: { type: Boolean },
|
19
|
+
emptyValue: {},
|
19
20
|
mobileTitle: {},
|
20
21
|
persist: { type: Boolean },
|
21
22
|
closeOnClear: { type: Boolean },
|
@@ -54,7 +55,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
54
55
|
mandatory: { type: Boolean },
|
55
56
|
noMargin: { type: Boolean },
|
56
57
|
allowCopy: { type: Boolean },
|
57
|
-
emptyValue: {},
|
58
58
|
leftError: { type: Boolean },
|
59
59
|
filterField: {},
|
60
60
|
filterValue: {},
|
@@ -9,6 +9,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
9
|
searchModel: { type: Boolean },
|
10
10
|
previewData: {},
|
11
11
|
createdData: {},
|
12
|
+
emptyValue: {},
|
12
13
|
useQueryFnOptions: {},
|
13
14
|
useQueryFnPrefix: {},
|
14
15
|
queryParamsOptions: {},
|
@@ -59,7 +60,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
59
60
|
mandatory: { type: Boolean },
|
60
61
|
noMargin: { type: Boolean },
|
61
62
|
allowCopy: { type: Boolean },
|
62
|
-
emptyValue: {},
|
63
63
|
leftError: { type: Boolean },
|
64
64
|
filterField: {},
|
65
65
|
filterValue: {},
|
@@ -8,6 +8,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
allowClear: { type: Boolean },
|
9
9
|
searchModel: { type: Boolean },
|
10
10
|
createdData: {},
|
11
|
+
emptyValue: {},
|
11
12
|
valueGetter: {},
|
12
13
|
searchFn: {},
|
13
14
|
useQueryFnDefault: {},
|
@@ -55,7 +56,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
55
56
|
mandatory: { type: Boolean },
|
56
57
|
noMargin: { type: Boolean },
|
57
58
|
allowCopy: { type: Boolean },
|
58
|
-
emptyValue: {},
|
59
59
|
leftError: { type: Boolean },
|
60
60
|
filterField: {},
|
61
61
|
filterValue: {},
|
@@ -6,6 +6,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "WFormAsyncSelectStringified",
|
7
7
|
props: {
|
8
8
|
divider: {},
|
9
|
+
emptyValue: {},
|
9
10
|
valueGetter: {},
|
10
11
|
searchFn: {},
|
11
12
|
useQueryFnDefault: {},
|
@@ -55,7 +56,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
55
56
|
mandatory: { type: Boolean },
|
56
57
|
noMargin: { type: Boolean },
|
57
58
|
allowCopy: { type: Boolean },
|
58
|
-
emptyValue: {},
|
59
59
|
leftError: { type: Boolean },
|
60
60
|
filterField: {},
|
61
61
|
filterValue: {},
|
@@ -20,7 +20,7 @@ declare const _default: <Type extends InputType = "text">(__VLS_props: NonNullab
|
|
20
20
|
right?(_: {}): any;
|
21
21
|
};
|
22
22
|
emit: {
|
23
|
-
(e: "update:
|
23
|
+
(e: "update:model-value", value: (Type extends "number" ? number : string) | undefined): void;
|
24
24
|
(e: "keypress:enter", value: KeyboardEvent): void;
|
25
25
|
(e: "keypress:up", value: KeyboardEvent): void;
|
26
26
|
(e: "keypress:down", value: KeyboardEvent): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue"],"names":[],"mappings":"AA0MA;AA+aA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,SAAS,CAAA;yBAYtB,IAAI,SAAS,SAAS,GAAG,MAAM,EAC/C,aAAa,WAAW,CAAC,OAAO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;wBACH,GAAG;uBACJ,GAAG;wBACF,GAAG;uBACJ,GAAG;uBACH,GAAG;;;YA3kBzB,oBAAoB,SAAS,4CAAa,SAAS,GAAG,IAAI;YAC1D,gBAAgB,SAAS,aAAa,GAAG,IAAI;YAC7C,aAAa,SAAS,aAAa,GAAG,IAAI;YAC1C,eAAe,SAAS,aAAa,GAAG,IAAI;YAC5C,iBAAiB,SAAS,aAAa,GAAG,IAAI;YAC9C,oBAAoB,SAAS,aAAa,GAAG,IAAI;YACjD,aAAa,GAAG,IAAI;YACpB,OAAO,SAAS,UAAU,GAAG,SAAS,GAAG,IAAI;YAC7C,MAAM,SAAS,UAAU,GAAG,IAAI;YAChC,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,WAAW,SAAS,UAAU,GAAG,IAAI;YACrC,cAAc,SAAS,UAAU,GAAG,IAAI;YACxC,cAAc,SAAS,KAAK,GAAG,IAAI;YACnC,OAAO,GAAG,IAAI;;EA+mBhB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAnpBzE,wBAmpB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -55,7 +55,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
55
55
|
subgrid: { type: Boolean },
|
56
56
|
seamless: { type: Boolean }
|
57
57
|
},
|
58
|
-
emits: ["update:
|
58
|
+
emits: ["update:model-value", "keypress:enter", "keypress:up", "keypress:down", "keypress:delete", "keypress:backspace", "click:clear", "focus", "blur", "click", "mousedown", "click:suffix", "select:input", "paste"],
|
59
59
|
setup(__props, { expose: __expose, emit: __emit }) {
|
60
60
|
const props = __props;
|
61
61
|
const emit = __emit;
|
@@ -67,9 +67,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
67
67
|
const updateModelValue = (value) => {
|
68
68
|
if (props.loading || isDisabled.value || isReadonly.value || props.unclickable) return;
|
69
69
|
if (props.type === "number") {
|
70
|
-
emit("update:
|
70
|
+
emit("update:model-value", typeof value === "string" && value.length ? Number.parseFloat(value) : void 0);
|
71
71
|
} else {
|
72
|
-
emit("update:
|
72
|
+
emit("update:model-value", value);
|
73
73
|
}
|
74
74
|
};
|
75
75
|
const handleBackspace = (event) => {
|
@@ -268,7 +268,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
268
268
|
}])
|
269
269
|
}, [
|
270
270
|
createElementVNode("div", {
|
271
|
-
class: normalizeClass(["flex gap-[--w-input-gap,0.25rem]", {
|
271
|
+
class: normalizeClass(["w-skeleton-w-32 flex gap-[--w-input-gap,0.25rem]", {
|
272
272
|
"[&:not(:has(.w-option-has-bg))]:-px--w-option-padding": !_ctx.icon && !_ctx.textarea,
|
273
273
|
"flex-wrap": !_ctx.noWrap
|
274
274
|
}])
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { InputAsyncProps } from './types';
|
2
2
|
declare const _default: <Type extends InputType = "text">(__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:
|
5
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:
|
4
|
+
readonly "onUpdate:model-value"?: ((value: (Type extends "number" ? number : string) | undefined) => any) | undefined;
|
5
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:model-value"> & InputAsyncProps<Type> & Partial<{}>> & import('vue').PublicProps;
|
6
6
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
7
7
|
attrs: any;
|
8
8
|
slots: {
|
@@ -10,7 +10,7 @@ declare const _default: <Type extends InputType = "text">(__VLS_props: NonNullab
|
|
10
10
|
subtitle?(_: {}): any;
|
11
11
|
right?(_: {}): any;
|
12
12
|
};
|
13
|
-
emit: (e: "update:
|
13
|
+
emit: (e: "update:model-value", value: (Type extends "number" ? number : string) | undefined) => void;
|
14
14
|
}>) => import('vue').VNode & {
|
15
15
|
__ctx?: Awaited<typeof __VLS_setup>;
|
16
16
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInputAsync.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputAsync.vue"],"names":[],"mappings":"AAwFA;AAoPA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;yBAa3B,IAAI,SAAS,SAAS,GAAG,MAAM,EAC/C,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;WAyYO,mBAAmB,CAAC;;
|
1
|
+
{"version":3,"file":"WInputAsync.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputAsync.vue"],"names":[],"mappings":"AAwFA;AAoPA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;yBAa3B,IAAI,SAAS,SAAS,GAAG,MAAM,EAC/C,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;WAyYO,mBAAmB,CAAC;;kLAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;uBAlDiB,GAAG;0BACA,GAAG;uBACN,GAAG;;cA3UzB,oBAAoB,SAAS,4CAAa,SAAS,KAAG,IAAI;EA+X5D,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AApZzE,wBAoZ4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -64,7 +64,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
64
64
|
subgrid: { type: Boolean },
|
65
65
|
seamless: { type: Boolean }
|
66
66
|
},
|
67
|
-
emits: ["update:
|
67
|
+
emits: ["update:model-value"],
|
68
68
|
setup(__props, { emit: __emit }) {
|
69
69
|
const props = __props;
|
70
70
|
const emit = __emit;
|
@@ -125,7 +125,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
125
125
|
if (isDisabled.value || isReadonly.value || props.loading) return;
|
126
126
|
if (errorMessageValue.value) return;
|
127
127
|
if (props.placeholderSecure) inputRef.value?.blur();
|
128
|
-
emit("update:
|
128
|
+
emit("update:model-value", newValue);
|
129
129
|
if (!props.placeholderSecure) saved.value = true;
|
130
130
|
};
|
131
131
|
const handleEnterPress = (event) => {
|
@@ -141,7 +141,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
141
141
|
if (canSave.value) emitUpdateModelValue(value.value);
|
142
142
|
};
|
143
143
|
const saveDebounced = () => {
|
144
|
-
if (canSave.value) emit("update:
|
144
|
+
if (canSave.value) emit("update:model-value", value.value);
|
145
145
|
timeout.value = null;
|
146
146
|
};
|
147
147
|
const updateModelValueDebounced = () => {
|
@@ -32,7 +32,7 @@ declare const _default: <Type extends InputType = "text">(__VLS_props: NonNullab
|
|
32
32
|
}) => VNode[];
|
33
33
|
};
|
34
34
|
emit: {
|
35
|
-
(e: "update:
|
35
|
+
(e: "update:model-value", event: Type extends "number" ? number : string): void;
|
36
36
|
(e: "keypress:enter", event: KeyboardEvent): void;
|
37
37
|
(e: "keypress:up", event: KeyboardEvent): void;
|
38
38
|
(e: "keypress:down", event: KeyboardEvent): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInputSuggest.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputSuggest.vue"],"names":[],"mappings":"AA6GA;AAsNA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAC,KAAK,KAAK,EAAgC,MAAM,KAAK,CAAA;yBAa5C,IAAI,SAAS,SAAS,GAAG,MAAM,EAC/C,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;WA+YO,mBAAmB,CAAC,2CAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;;;;;;MAAsB,GAAG,IAAI;WACpE,GAAG;;gBAxTD,MAAM,IAAI;mBACP,MAAM,IAAI;iBACZ,CAAC,KAAK,EAAE;YAAC,WAAW,CAAC,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
|
67
67
|
bottom: { type: Boolean }
|
68
68
|
},
|
69
|
-
emits: ["update:
|
69
|
+
emits: ["update:model-value", "keypress:enter", "keypress:up", "keypress:down", "keypress:delete", "open", "close", "click:clear", "focus", "blur"],
|
70
70
|
setup(__props, { expose: __expose, emit: __emit }) {
|
71
71
|
const props = __props;
|
72
72
|
const emit = __emit;
|
@@ -131,7 +131,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
131
131
|
"cursor-not-allowed": unref(isDisabled) && !unref(isReadonly),
|
132
132
|
"mb-3": unref(isMobile) && !toggleScope?.unclickable
|
133
133
|
},
|
134
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => !_ctx.loading && _ctx.$emit("update:
|
134
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => !_ctx.loading && _ctx.$emit("update:model-value", $event)),
|
135
135
|
"onKeypress:enter": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("keypress:enter", $event)),
|
136
136
|
"onKeypress:up": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("keypress:up", $event)),
|
137
137
|
"onKeypress:down": _cache[3] || (_cache[3] = ($event) => _ctx.$emit("keypress:down", $event)),
|
@@ -143,10 +143,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
143
143
|
class: normalizeClass({
|
144
144
|
"w-card": unref(isGrid),
|
145
145
|
"w-list": !unref(isGrid),
|
146
|
-
"[--w-list-right:calc(var(--w-list-padding,1rem)*2+1.25em
|
147
|
-
"[--w-list-right
|
148
|
-
"[--w-list-left:calc(var(--w-list-padding,1rem)*2+1.25em+
|
149
|
-
"[--w-list-left
|
146
|
+
"[--w-list-right:calc(var(--w-list-padding,1rem)*2+1.25em)]": _ctx.menu,
|
147
|
+
"[--w-list-right:--w-list-header-rounded,1rem]": !_ctx.menu,
|
148
|
+
"[--w-list-left:calc(var(--w-list-padding,1rem)*2+1.25em+1px)]": allowSelect.value,
|
149
|
+
"[--w-list-left:--w-list-header-rounded,1rem)": !allowSelect.value
|
150
150
|
}),
|
151
151
|
style: normalizeStyle([stylesWidth.value, stylesFixed.value])
|
152
152
|
}, [
|