eco-vue-js 0.11.7 → 0.11.9
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/FormAsync/WFormAsyncInput.vue.js +1 -1
- 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.map +1 -1
- package/dist/components/Input/WInput.vue.js +12 -8
- package/dist/components/Input/WInputAsync.vue.js +1 -1
- package/dist/components/Input/WInputDate.vue.js +1 -1
- package/dist/components/Input/WInputOptions.vue.js +1 -1
- package/dist/components/Input/WInputSuggest.vue.js +1 -1
- package/dist/components/Input/components/ContentEditable.vue.d.ts +2 -2
- package/dist/components/Input/components/ContentEditable.vue.d.ts.map +1 -1
- package/dist/components/Input/components/ContentEditable.vue.js +18 -8
- package/dist/components/Input/types.d.ts +1 -1
- package/dist/components/Input/types.d.ts.map +1 -1
- package/dist/components/Select/WSelect.vue.d.ts +2 -0
- package/dist/components/Select/WSelect.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelect.vue.js +2 -1
- package/dist/components/Select/WSelectAsync.vue.js +1 -1
- package/dist/components/Select/WSelectAsyncSingle.vue.js +1 -1
- package/dist/components/Select/WSelectSingle.vue.d.ts +2 -0
- package/dist/components/Select/WSelectSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectSingle.vue.js +8 -1
- package/dist/components/Select/WSelectStringified.vue.js +1 -1
- package/eslint/rules/ui-kit-imports.js +2 -0
- package/package.json +1 -1
@@ -21,7 +21,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
21
|
max: {},
|
22
22
|
name: {},
|
23
23
|
autocomplete: {},
|
24
|
-
autofocus: { type: Boolean },
|
24
|
+
autofocus: { type: [Boolean, Number] },
|
25
25
|
readonly: { type: Boolean, default: void 0 },
|
26
26
|
unclickable: { type: [Boolean, null] },
|
27
27
|
disabledActions: { type: Boolean },
|
@@ -33,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
33
33
|
max: {},
|
34
34
|
name: {},
|
35
35
|
autocomplete: {},
|
36
|
-
autofocus: { type: Boolean },
|
36
|
+
autofocus: { type: [Boolean, Number] },
|
37
37
|
readonly: { type: Boolean, default: void 0 },
|
38
38
|
disabledActions: { type: Boolean },
|
39
39
|
loading: { type: Boolean },
|
@@ -38,7 +38,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
38
38
|
max: {},
|
39
39
|
name: {},
|
40
40
|
autocomplete: {},
|
41
|
-
autofocus: { type: Boolean },
|
41
|
+
autofocus: { type: [Boolean, Number] },
|
42
42
|
readonly: { type: Boolean, default: void 0 },
|
43
43
|
disabledActions: { type: Boolean },
|
44
44
|
loading: { type: Boolean },
|
@@ -34,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
34
34
|
max: {},
|
35
35
|
name: {},
|
36
36
|
autocomplete: {},
|
37
|
-
autofocus: { type: Boolean },
|
37
|
+
autofocus: { type: [Boolean, Number] },
|
38
38
|
readonly: { type: Boolean, default: void 0 },
|
39
39
|
disabledActions: { type: Boolean },
|
40
40
|
loading: { type: Boolean },
|
@@ -34,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
34
34
|
max: {},
|
35
35
|
name: {},
|
36
36
|
autocomplete: {},
|
37
|
-
autofocus: { type: Boolean },
|
37
|
+
autofocus: { type: [Boolean, Number] },
|
38
38
|
readonly: { type: Boolean, default: void 0 },
|
39
39
|
disabledActions: { type: Boolean },
|
40
40
|
loading: { type: Boolean },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue"],"names":[],"mappings":"AAoOA;
|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AAG,IAAI;YACjC,WAAW,SAAS,UAAU,GAAG,IAAI;YACrC,cAAc,SAAS,UAAU,GAAG,IAAI;YACxC,cAAc,SAAS,KAAK,GAAG,IAAI;YACnC,OAAO,GAAG,IAAI;;EA0pBhB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA9rBzE,wBA8rB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -24,7 +24,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
24
24
|
max: {},
|
25
25
|
name: {},
|
26
26
|
autocomplete: { default: "off" },
|
27
|
-
autofocus: { type: Boolean },
|
27
|
+
autofocus: { type: [Boolean, Number] },
|
28
28
|
readonly: { type: Boolean, default: void 0 },
|
29
29
|
unclickable: { type: [Boolean, null] },
|
30
30
|
disabledActions: { type: Boolean },
|
@@ -172,20 +172,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
172
172
|
let timeout;
|
173
173
|
const autofocusDebounced = () => {
|
174
174
|
if (timeout) clearTimeout(timeout);
|
175
|
+
if (props.autofocus === 0) {
|
176
|
+
focus();
|
177
|
+
return;
|
178
|
+
}
|
175
179
|
timeout = setTimeout(() => {
|
176
|
-
if (props.autofocus) focus();
|
180
|
+
if (props.autofocus !== false && props.autofocus !== void 0) focus();
|
177
181
|
timeout = void 0;
|
178
|
-
}, 250);
|
182
|
+
}, typeof props.autofocus === "number" ? props.autofocus : 250);
|
179
183
|
};
|
180
|
-
if (props.autofocus) {
|
184
|
+
if (props.autofocus !== false && props.autofocus !== void 0) {
|
181
185
|
useTabActiveListener(autofocusDebounced);
|
182
186
|
}
|
183
187
|
watch(() => props.autofocus, (value) => {
|
184
|
-
if (
|
185
|
-
nextTick(
|
188
|
+
if (value === false || value === void 0) return;
|
189
|
+
nextTick(autofocusDebounced);
|
186
190
|
});
|
187
191
|
onMounted(() => {
|
188
|
-
if (props.autofocus) autofocusDebounced();
|
192
|
+
if (props.autofocus !== false && props.autofocus !== void 0) autofocusDebounced();
|
189
193
|
});
|
190
194
|
onBeforeUnmount(() => {
|
191
195
|
if (timeout) {
|
@@ -250,7 +254,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
250
254
|
name: "field",
|
251
255
|
fn: withCtx(({ id, setFocused, focused }) => [
|
252
256
|
createElementVNode("div", {
|
253
|
-
class: normalizeClass(["relative grid min-h-[--w-input-min-height,var(--w-input-height,2.75rem)] grid-cols-[auto,1fr,auto] overflow-hidden rounded-[--w-input-rounded,0.75rem] border border-solid", {
|
257
|
+
class: normalizeClass(["relative isolate grid min-h-[--w-input-min-height,var(--w-input-height,2.75rem)] grid-cols-[auto,1fr,auto] overflow-hidden rounded-[--w-input-rounded,0.75rem] border border-solid", {
|
254
258
|
"focus-within:border-primary dark:focus-within:border-primary-dark focus-within:outline-primary/20 dark:focus-within:outline-primary-dark/20 focus-within:outline focus-within:outline-2": !unref(isDisabled) && !unref(isReadonly) && !_ctx.unclickable,
|
255
259
|
"cursor-text": !unref(isDisabled),
|
256
260
|
"border-negative dark:border-negative-dark": _ctx.errorMessage,
|
@@ -30,7 +30,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
30
30
|
max: {},
|
31
31
|
name: {},
|
32
32
|
autocomplete: {},
|
33
|
-
autofocus: { type: Boolean },
|
33
|
+
autofocus: { type: [Boolean, Number] },
|
34
34
|
readonly: { type: Boolean, default: void 0 },
|
35
35
|
unclickable: { type: [Boolean, null] },
|
36
36
|
disabledActions: { type: Boolean },
|
@@ -27,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27
27
|
max: {},
|
28
28
|
name: {},
|
29
29
|
autocomplete: {},
|
30
|
-
autofocus: { type: Boolean },
|
30
|
+
autofocus: { type: [Boolean, Number] },
|
31
31
|
readonly: { type: Boolean, default: void 0 },
|
32
32
|
disabledActions: { type: Boolean },
|
33
33
|
loading: { type: Boolean },
|
@@ -33,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
33
33
|
max: {},
|
34
34
|
name: {},
|
35
35
|
autocomplete: {},
|
36
|
-
autofocus: { type: Boolean },
|
36
|
+
autofocus: { type: [Boolean, Number] },
|
37
37
|
readonly: { type: Boolean, default: void 0 },
|
38
38
|
disabledActions: { type: Boolean },
|
39
39
|
loading: { type: Boolean },
|
@@ -30,7 +30,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
30
30
|
max: {},
|
31
31
|
name: {},
|
32
32
|
autocomplete: {},
|
33
|
-
autofocus: { type: Boolean },
|
33
|
+
autofocus: { type: [Boolean, Number] },
|
34
34
|
readonly: { type: Boolean, default: void 0 },
|
35
35
|
disabledActions: { type: Boolean },
|
36
36
|
loading: { type: Boolean },
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { WrapSelection } from '../types';
|
2
2
|
type __VLS_Props = {
|
3
3
|
value: string;
|
4
|
-
placeholder
|
5
|
-
maxLength
|
4
|
+
placeholder: string;
|
5
|
+
maxLength: number;
|
6
6
|
};
|
7
7
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
8
8
|
focus: () => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ContentEditable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/components/ContentEditable.vue"],"names":[],"mappings":"AAqBA;
|
1
|
+
{"version":3,"file":"ContentEditable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/components/ContentEditable.vue"],"names":[],"mappings":"AAqBA;AAyLA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,UAAU,CAAA;AAI3C,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAC;;;;2BAkH4B,aAAa,KAAG,IAAI;2BAnBpB,MAAM,aAAa,MAAM;;;;;;;;;;;;;;;;;;;AAqIvD,wBAUG"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, useTemplateRef, createElementBlock, openBlock, nextTick } from 'vue';
|
1
|
+
import { defineComponent, useTemplateRef, ref, createElementBlock, openBlock, nextTick } from 'vue';
|
2
2
|
|
3
3
|
const _hoisted_1 = ["textContent", "placeholder"];
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
@@ -13,6 +13,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
13
|
const props = __props;
|
14
14
|
const emit = __emit;
|
15
15
|
const elementRef = useTemplateRef("element");
|
16
|
+
const focused = ref(false);
|
16
17
|
const insertParagraph = (e) => {
|
17
18
|
if (e.inputType === "insertParagraph") {
|
18
19
|
e.preventDefault();
|
@@ -85,16 +86,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
85
86
|
selection?.removeAllRanges();
|
86
87
|
selection?.addRange(range);
|
87
88
|
};
|
89
|
+
let offsetsOld = null;
|
88
90
|
const wrapSelection = (value) => {
|
89
91
|
const root = elementRef.value;
|
90
92
|
if (!root) return;
|
91
|
-
|
93
|
+
let offsets = getSelectionOffsets();
|
94
|
+
if (focused.value || !offsetsOld) offsetsOld = offsets;
|
95
|
+
else offsets = offsetsOld;
|
92
96
|
const currentText = props.value ?? "";
|
93
|
-
const selectedText = currentText.slice(start, end);
|
94
|
-
const beforeSelection = currentText.slice(0, start);
|
95
|
-
const afterSelection = currentText.slice(end);
|
97
|
+
const selectedText = currentText.slice(offsets.start, offsets.end);
|
98
|
+
const beforeSelection = currentText.slice(0, offsets.start);
|
99
|
+
const afterSelection = currentText.slice(offsets.end);
|
96
100
|
const newText = beforeSelection + (value.start || "") + selectedText + (value.end || "") + afterSelection;
|
97
|
-
const cursorPosition = start + (value.start?.length ?? 0) +
|
101
|
+
const cursorPosition = offsets.start + (value.end ? (value.start?.length ?? 0) + selectedText.length : 0);
|
98
102
|
emit("update:model-value", newText);
|
99
103
|
nextTick(() => setCaret(cursorPosition));
|
100
104
|
};
|
@@ -128,8 +132,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
128
132
|
onBeforeinput: insertParagraph,
|
129
133
|
onPaste,
|
130
134
|
onKeydown: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("keydown", $event)),
|
131
|
-
onFocus: _cache[1] || (_cache[1] = ($event) =>
|
132
|
-
|
135
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => {
|
136
|
+
_ctx.$emit("focus", $event);
|
137
|
+
focused.value = true;
|
138
|
+
}),
|
139
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => {
|
140
|
+
_ctx.$emit("blur", $event);
|
141
|
+
focused.value = false;
|
142
|
+
})
|
133
143
|
}, null, 40, _hoisted_1);
|
134
144
|
};
|
135
145
|
}
|
@@ -15,7 +15,7 @@ export interface InputProps<Type extends InputType> extends Omit<FieldWrapperPro
|
|
15
15
|
max?: number;
|
16
16
|
name?: string;
|
17
17
|
autocomplete?: 'off' | string;
|
18
|
-
autofocus?: boolean;
|
18
|
+
autofocus?: boolean | number;
|
19
19
|
readonly?: boolean;
|
20
20
|
unclickable?: boolean | null;
|
21
21
|
disabledActions?: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,KAAK,CAAA;AAElC,MAAM,WAAW,UAAU,CAAC,IAAI,SAAS,SAAS,CAAE,SAAQ,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC;IAC/F,UAAU,CAAC,EAAE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;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,iBAAiB,CAAC,IAAI,SAAS,SAAS,EAAE,MAAM,CAAE,SAAQ,iBAAiB,CAAC,IAAI,CAAC;IAChG,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAA;IAChF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,SAAS,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAC,CAAC,CAAA;CACnF;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;IACnF,UAAU,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IAC7B,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,OAAO,CAAC,EAAE,IAAI,CAAA;CACf;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA"}
|
@@ -19,11 +19,13 @@ declare const _default: <Model extends number | string, Data extends DefaultData
|
|
19
19
|
subtitle?: () => void;
|
20
20
|
option?: (props: PartialNot<SelectOptionProps<Data>>) => void;
|
21
21
|
right?: () => void;
|
22
|
+
prefix?: () => void;
|
22
23
|
}> & {
|
23
24
|
title?: () => void;
|
24
25
|
subtitle?: () => void;
|
25
26
|
option?: (props: PartialNot<SelectOptionProps<Data>>) => void;
|
26
27
|
right?: () => void;
|
28
|
+
prefix?: () => void;
|
27
29
|
};
|
28
30
|
emit: {
|
29
31
|
(e: "select", item: Model): void;
|
@@ -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":"AAmLA;AA+cA,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,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;WA6rBO,mBAAmB,CAAC;;;;;;;sSAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;;;2BAlerB,MAAM,KAAG,IAAI;MAke8B,GAAG,IAAI;WACpE,GAAG;;gBApbD,MAAM,IAAI;mBACP,MAAM,IAAI;iBACZ,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI;gBACrD,MAAM,IAAI;iBACT,MAAM,IAAI;;gBAJX,MAAM,IAAI;mBACP,MAAM,IAAI;iBACZ,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI;gBACrD,MAAM,IAAI;iBACT,MAAM,IAAI;;;YAjQf,QAAQ,QAAQ,KAAK,GAAG,IAAI;YAC5B,UAAU,QAAQ,KAAK,GAAG,IAAI;YAC9B,OAAO,SAAS,UAAU,GAAG,SAAS,GAAG,IAAI;YAC7C,MAAM,SAAS,UAAU,GAAG,IAAI;YAChC,4BAA4B,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC9D,YAAY,GAAG,IAAI;;EAgrBrB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAxsBzE,wBAwsB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -50,7 +50,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
50
50
|
max: {},
|
51
51
|
name: {},
|
52
52
|
autocomplete: {},
|
53
|
-
autofocus: { type: Boolean },
|
53
|
+
autofocus: { type: [Boolean, Number] },
|
54
54
|
readonly: { type: Boolean, default: void 0 },
|
55
55
|
disabledActions: { type: Boolean },
|
56
56
|
loading: { type: Boolean },
|
@@ -286,6 +286,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
286
286
|
})
|
287
287
|
}), createSlots({
|
288
288
|
prefix: withCtx(({ unclickable }) => [
|
289
|
+
renderSlot(_ctx.$slots, "prefix"),
|
289
290
|
(_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) => {
|
290
291
|
return openBlock(), createBlock(_sfc_main$3, {
|
291
292
|
key: value,
|
@@ -42,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
42
42
|
max: {},
|
43
43
|
name: {},
|
44
44
|
autocomplete: {},
|
45
|
-
autofocus: { type: Boolean },
|
45
|
+
autofocus: { type: [Boolean, Number] },
|
46
46
|
readonly: { type: Boolean, default: void 0 },
|
47
47
|
disabledActions: { type: Boolean },
|
48
48
|
loading: { type: Boolean },
|
@@ -39,7 +39,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
39
39
|
max: {},
|
40
40
|
name: {},
|
41
41
|
autocomplete: {},
|
42
|
-
autofocus: { type: Boolean },
|
42
|
+
autofocus: { type: [Boolean, Number] },
|
43
43
|
readonly: { type: Boolean, default: void 0 },
|
44
44
|
disabledActions: { type: Boolean },
|
45
45
|
loading: { type: Boolean },
|
@@ -16,11 +16,13 @@ declare const _default: <Model extends number | string, Data extends DefaultData
|
|
16
16
|
title?: () => VNode[];
|
17
17
|
subtitle?: () => VNode[];
|
18
18
|
right?: () => VNode[];
|
19
|
+
prefix?: () => VNode[];
|
19
20
|
option?: (props: PartialNot<SelectOptionProps<Data>>) => VNode[];
|
20
21
|
}> & {
|
21
22
|
title?: () => VNode[];
|
22
23
|
subtitle?: () => VNode[];
|
23
24
|
right?: () => VNode[];
|
25
|
+
prefix?: () => VNode[];
|
24
26
|
option?: (props: PartialNot<SelectOptionProps<Data>>) => VNode[];
|
25
27
|
};
|
26
28
|
emit: {
|
@@ -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":"AA4DA;AAuHA,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,SAA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AAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -35,7 +35,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
35
35
|
max: {},
|
36
36
|
name: {},
|
37
37
|
autocomplete: {},
|
38
|
-
autofocus: { type: Boolean },
|
38
|
+
autofocus: { type: [Boolean, Number] },
|
39
39
|
readonly: { type: Boolean, default: void 0 },
|
40
40
|
disabledActions: { type: Boolean },
|
41
41
|
loading: { type: Boolean },
|
@@ -142,6 +142,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
142
142
|
renderSlot(_ctx.$slots, "right")
|
143
143
|
]),
|
144
144
|
key: "3"
|
145
|
+
} : void 0,
|
146
|
+
_ctx.$slots.prefix ? {
|
147
|
+
name: "prefix",
|
148
|
+
fn: withCtx(() => [
|
149
|
+
renderSlot(_ctx.$slots, "prefix")
|
150
|
+
]),
|
151
|
+
key: "4"
|
145
152
|
} : void 0
|
146
153
|
]), 1040, ["class"]);
|
147
154
|
};
|
@@ -35,7 +35,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
35
35
|
max: {},
|
36
36
|
name: {},
|
37
37
|
autocomplete: {},
|
38
|
-
autofocus: { type: Boolean },
|
38
|
+
autofocus: { type: [Boolean, Number] },
|
39
39
|
readonly: { type: Boolean, default: void 0 },
|
40
40
|
disabledActions: { type: Boolean },
|
41
41
|
loading: { type: Boolean },
|
@@ -29,6 +29,8 @@ export default {
|
|
29
29
|
if (importedName.startsWith('W')) {
|
30
30
|
const path = keys.find(item => item.includes(importedName))
|
31
31
|
|
32
|
+
if (!path) return
|
33
|
+
|
32
34
|
const replacementImport = `import ${ importedName } from 'eco-vue-js${ path.substring(1) }'`
|
33
35
|
|
34
36
|
context.report({
|