eco-vue-js 0.11.6 → 0.11.8

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.
Files changed (31) hide show
  1. package/dist/components/FormAsync/WFormAsyncInput.vue.js +1 -1
  2. package/dist/components/FormAsync/WFormAsyncSelect.vue.js +1 -1
  3. package/dist/components/FormAsync/WFormAsyncSelectInfiniteSingle.vue.js +1 -1
  4. package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.js +1 -1
  5. package/dist/components/FormAsync/WFormAsyncSelectStringified.vue.js +1 -1
  6. package/dist/components/Input/WInput.vue.d.ts +10 -1
  7. package/dist/components/Input/WInput.vue.d.ts.map +1 -1
  8. package/dist/components/Input/WInput.vue.js +17 -6
  9. package/dist/components/Input/WInputAsync.vue.js +1 -1
  10. package/dist/components/Input/WInputDate.vue.d.ts +16 -4
  11. package/dist/components/Input/WInputDate.vue.d.ts.map +1 -1
  12. package/dist/components/Input/WInputDate.vue.js +1 -1
  13. package/dist/components/Input/WInputOptions.vue.js +1 -1
  14. package/dist/components/Input/WInputSuggest.vue.d.ts +11 -3
  15. package/dist/components/Input/WInputSuggest.vue.d.ts.map +1 -1
  16. package/dist/components/Input/WInputSuggest.vue.js +21 -14
  17. package/dist/components/Input/components/ContentEditable.vue.d.ts +9 -2
  18. package/dist/components/Input/components/ContentEditable.vue.d.ts.map +1 -1
  19. package/dist/components/Input/components/ContentEditable.vue.js +63 -38
  20. package/dist/components/Input/types.d.ts +5 -1
  21. package/dist/components/Input/types.d.ts.map +1 -1
  22. package/dist/components/Select/WSelect.vue.d.ts +2 -0
  23. package/dist/components/Select/WSelect.vue.d.ts.map +1 -1
  24. package/dist/components/Select/WSelect.vue.js +2 -1
  25. package/dist/components/Select/WSelectAsync.vue.js +1 -1
  26. package/dist/components/Select/WSelectAsyncSingle.vue.js +1 -1
  27. package/dist/components/Select/WSelectSingle.vue.d.ts +7 -1
  28. package/dist/components/Select/WSelectSingle.vue.d.ts.map +1 -1
  29. package/dist/components/Select/WSelectSingle.vue.js +16 -5
  30. package/dist/components/Select/WSelectStringified.vue.js +1 -1
  31. 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,9 +1,15 @@
1
- import { InputProps } from './types';
1
+ import { InputProps, WrapSelection } 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<any & InputProps<Type> & Partial<{}>> & import('vue').PublicProps;
4
4
  expose(exposed: import('vue').ShallowUnwrapRef<{
5
5
  focus: () => void;
6
6
  blur: () => void;
7
+ wrapSelection: (value: WrapSelection) => void;
8
+ setCaret: (indexStart: number, indexEnd?: number) => void;
9
+ getSelectionOffsets: () => {
10
+ start: number;
11
+ end: number;
12
+ } | undefined;
7
13
  fieldRef: import('vue').ComputedRef<HTMLDivElement | null | undefined>;
8
14
  scrollToInput: () => void;
9
15
  }>): void;
@@ -15,6 +21,9 @@ declare const _default: <Type extends InputType = "text">(__VLS_props: NonNullab
15
21
  prefix?(_: {
16
22
  modelValue: (Type extends "number" ? number : string) | undefined;
17
23
  }): any;
24
+ toolbar?(_: {
25
+ wrapSelection: (value: WrapSelection) => void;
26
+ }): any;
18
27
  before?(_: {
19
28
  modelValue: (Type extends "number" ? number : string) | undefined;
20
29
  }): any;
@@ -1 +1 @@
1
- {"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue"],"names":[],"mappings":"AA+NA;AAqcA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,SAAS,CAAA;yBAatB,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,WAA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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"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, useTemplateRef, ref, watch, nextTick, onMounted, onBeforeUnmount, computed, createBlock, openBlock, mergeProps, createSlots, withCtx, renderSlot, unref, createElementVNode, normalizeClass, createElementBlock, createCommentVNode, toDisplayString, resolveDynamicComponent, normalizeProps, guardReactiveProps, withModifiers, withKeys } from 'vue';
1
+ import { defineComponent, useTemplateRef, ref, watch, nextTick, onMounted, onBeforeUnmount, computed, createBlock, openBlock, mergeProps, createSlots, withCtx, renderSlot, unref, createElementVNode, normalizeClass, createElementBlock, createCommentVNode, toDisplayString, normalizeProps, guardReactiveProps, resolveDynamicComponent, withModifiers, withKeys } from 'vue';
2
2
  import _sfc_main$1 from '../FieldWrapper/WFieldWrapper.vue.js';
3
3
  import { useTabActiveListener } from '../Tabs/use/useTabActiveListener.js';
4
4
  import { Notify } from '../../utils/Notify.js';
@@ -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 },
@@ -166,15 +166,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
166
166
  if (!contentRef.value || !inputRef.value) return;
167
167
  contentRef.value.scrollTo({ left: contentRef.value.scrollWidth - inputRef.value.offsetWidth - 40 });
168
168
  };
169
+ const wrapSelection = (value) => inputRef.value && "wrapSelection" in inputRef.value ? inputRef.value.wrapSelection(value) : void 0;
170
+ const setCaret = (indexStart, indexEnd) => inputRef.value && "setCaret" in inputRef.value ? inputRef.value.setCaret(indexStart, indexEnd) : void 0;
171
+ const getSelectionOffsets = () => inputRef.value && "getSelectionOffsets" in inputRef.value ? inputRef.value.getSelectionOffsets() : void 0;
169
172
  let timeout;
170
173
  const autofocusDebounced = () => {
171
174
  if (timeout) clearTimeout(timeout);
175
+ if (props.autofocus === 0) {
176
+ focus();
177
+ return;
178
+ }
172
179
  timeout = setTimeout(() => {
173
- if (props.autofocus) focus();
180
+ if (props.autofocus !== false && props.autofocus !== void 0) focus();
174
181
  timeout = void 0;
175
- }, 250);
182
+ }, typeof props.autofocus === "number" ? props.autofocus : 250);
176
183
  };
177
- if (props.autofocus) {
184
+ if (props.autofocus !== false && props.autofocus !== void 0) {
178
185
  useTabActiveListener(autofocusDebounced);
179
186
  }
180
187
  watch(() => props.autofocus, (value) => {
@@ -182,7 +189,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
182
189
  nextTick(focus);
183
190
  });
184
191
  onMounted(() => {
185
- if (props.autofocus) autofocusDebounced();
192
+ if (props.autofocus !== false && props.autofocus !== void 0) autofocusDebounced();
186
193
  });
187
194
  onBeforeUnmount(() => {
188
195
  if (timeout) {
@@ -193,6 +200,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
193
200
  __expose({
194
201
  focus,
195
202
  blur,
203
+ wrapSelection,
204
+ setCaret,
205
+ getSelectionOffsets,
196
206
  fieldRef: computed(() => fieldWrapperRef.value?.fieldRef),
197
207
  scrollToInput
198
208
  });
@@ -255,6 +265,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
255
265
  }]),
256
266
  onClick: focus
257
267
  }, [
268
+ renderSlot(_ctx.$slots, "toolbar", normalizeProps(guardReactiveProps({ wrapSelection }))),
258
269
  _ctx.icon ? (openBlock(), createElementBlock("div", {
259
270
  key: 0,
260
271
  class: normalizeClass(["flex h-full w-[--w-input-height,2.75rem] select-none items-center justify-center", {
@@ -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 },
@@ -10,10 +10,16 @@ declare function __VLS_template(): {
10
10
  refs: {
11
11
  inputComponent: import('vue').ShallowUnwrapRef<{
12
12
  focus: () => void;
13
- blur: () => void;
13
+ blur: () => void | undefined;
14
14
  close: () => void;
15
15
  updateDropdown: () => void;
16
- scrollToInput: () => void;
16
+ scrollToInput: () => void | undefined;
17
+ wrapSelection: (value: import('./types').WrapSelection) => void | undefined;
18
+ setCaret: (indexStart: number, indexEnd?: number) => void | undefined;
19
+ getSelectionOffsets: () => {
20
+ start: number;
21
+ end: number;
22
+ } | undefined;
17
23
  }> | null;
18
24
  };
19
25
  rootEl: any;
@@ -34,10 +40,16 @@ declare const __VLS_component: import('vue').DefineComponent<InputDateProps, {},
34
40
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
35
41
  inputComponent: import('vue').ShallowUnwrapRef<{
36
42
  focus: () => void;
37
- blur: () => void;
43
+ blur: () => void | undefined;
38
44
  close: () => void;
39
45
  updateDropdown: () => void;
40
- scrollToInput: () => void;
46
+ scrollToInput: () => void | undefined;
47
+ wrapSelection: (value: import('./types').WrapSelection) => void | undefined;
48
+ setCaret: (indexStart: number, indexEnd?: number) => void | undefined;
49
+ getSelectionOffsets: () => {
50
+ start: number;
51
+ end: number;
52
+ } | undefined;
41
53
  }> | null;
42
54
  }, any>;
43
55
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1 +1 @@
1
- {"version":3,"file":"WInputDate.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputDate.vue"],"names":[],"mappings":"AAiDA;AAmHA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAO3C,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAA;AAuEvD,iBAAS,cAAc;WA6HT,OAAO,IAA6B;;uBAbtB,GAAG;0BACA,GAAG;uBACN,GAAG;;;;;;;;;;;;EAgB9B;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;OASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WInputDate.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputDate.vue"],"names":[],"mappings":"AAiDA;AAmHA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAO3C,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAA;AAuEvD,iBAAS,cAAc;WA6HT,OAAO,IAA6B;;uBAbtB,GAAG;0BACA,GAAG;uBACN,GAAG;;;;;;;;;;;;;;;;;;EAgB9B;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;OASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -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 },
@@ -1,19 +1,26 @@
1
- import { InputSuggestProps } from './types';
1
+ import { InputSuggestProps, WrapSelection } from './types';
2
2
  import { VNode } from 'vue';
3
3
  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<{
4
4
  props: __VLS_PrettifyLocal<any & InputSuggestProps<Type> & Partial<{}>> & import('vue').PublicProps;
5
5
  expose(exposed: import('vue').ShallowUnwrapRef<{
6
6
  focus: () => void;
7
- blur: () => void;
7
+ blur: () => void | undefined;
8
8
  close: () => void;
9
9
  updateDropdown: () => void;
10
- scrollToInput: () => void;
10
+ scrollToInput: () => void | undefined;
11
+ wrapSelection: (value: WrapSelection) => void | undefined;
12
+ setCaret: (indexStart: number, indexEnd?: number) => void | undefined;
13
+ getSelectionOffsets: () => {
14
+ start: number;
15
+ end: number;
16
+ } | undefined;
11
17
  }>): void;
12
18
  attrs: any;
13
19
  slots: Readonly<{
14
20
  title?: () => void;
15
21
  bottom?: () => void;
16
22
  subtitle?: () => void;
23
+ toolbar?: () => void;
17
24
  prefix?: (props: {
18
25
  unclickable?: boolean | null;
19
26
  }) => void;
@@ -23,6 +30,7 @@ declare const _default: <Type extends InputType = "text">(__VLS_props: NonNullab
23
30
  title?: () => void;
24
31
  bottom?: () => void;
25
32
  subtitle?: () => void;
33
+ toolbar?: () => void;
26
34
  prefix?: (props: {
27
35
  unclickable?: boolean | null;
28
36
  }) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"WInputSuggest.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputSuggest.vue"],"names":[],"mappings":"AA+GA;AA2NA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAC,KAAK,KAAK,EAAgC,MAAM,KAAK,CAAA;yBAe5C,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;WA8YO,mBAAmB,CAAC,2CAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;;;;;;MAAsB,GAAG,IAAI;WACpE,GAAG;;gBAvTD,MAAM,IAAI;iBACT,MAAM,IAAI;mBACR,MAAM,IAAI;iBACZ,CAAC,KAAK,EAAE;YAAC,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;SAAC,KAAK,IAAI;gBAChD,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;kBACpC,MAAM,KAAK,EAAE;;gBALf,MAAM,IAAI;iBACT,MAAM,IAAI;mBACR,MAAM,IAAI;iBACZ,CAAC,KAAK,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W,CAAC,CAAA;CAAE;AAvazE,wBAua4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, useTemplateRef, computed, createBlock, openBlock, resolveDynamicComponent, unref, mergeProps, createSlots, withCtx, createVNode, createCommentVNode, normalizeClass, renderSlot } from 'vue';
1
+ import { defineComponent, ref, useTemplateRef, computed, createBlock, openBlock, resolveDynamicComponent, unref, mergeProps, createSlots, withCtx, createVNode, createCommentVNode, normalizeClass, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
2
2
  import _sfc_main$1 from '../BottomSheet/WBottomSheet.vue.js';
3
3
  import _sfc_main$2 from '../DropdownMenu/WDropdownMenu.vue.js';
4
4
  import _sfc_main$4 from '../InfiniteList/WInfiniteListScrollingElement.vue.js';
@@ -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 },
@@ -92,21 +92,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
92
92
  if (isMobile.value) open();
93
93
  inputRef.value?.focus();
94
94
  };
95
- const blur = () => {
96
- inputRef.value?.blur();
97
- };
98
- const scrollToInput = () => {
99
- inputRef.value?.scrollToInput();
100
- };
101
- const updateDropdown = () => {
102
- if (dropdownMenuRef.value && "updateDropdown" in dropdownMenuRef.value) dropdownMenuRef.value.updateDropdown();
103
- };
95
+ const blur = () => inputRef.value?.blur();
96
+ const scrollToInput = () => inputRef.value?.scrollToInput();
97
+ const wrapSelection = (value) => inputRef.value?.wrapSelection(value);
98
+ const setCaret = (indexStart, indexEnd) => inputRef.value?.setCaret(indexStart, indexEnd);
99
+ const getSelectionOffsets = () => inputRef.value?.getSelectionOffsets();
100
+ const updateDropdown = () => dropdownMenuRef.value && "updateDropdown" in dropdownMenuRef.value ? dropdownMenuRef.value.updateDropdown() : void 0;
104
101
  __expose({
105
102
  focus,
106
103
  blur,
107
104
  close,
108
105
  updateDropdown,
109
- scrollToInput
106
+ scrollToInput,
107
+ wrapSelection,
108
+ setCaret,
109
+ getSelectionOffsets
110
110
  });
111
111
  return (_ctx, _cache) => {
112
112
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.static ? InputSuggestStatic : unref(isMobile) ? _sfc_main$1 : _sfc_main$2), mergeProps({ ref: "dropdownMenu" }, _ctx.static ? void 0 : unref(isMobile) ? {
@@ -180,20 +180,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
180
180
  ]),
181
181
  key: "1"
182
182
  } : void 0,
183
+ _ctx.$slots.toolbar ? {
184
+ name: "toolbar",
185
+ fn: withCtx((scope) => [
186
+ renderSlot(_ctx.$slots, "toolbar", normalizeProps(guardReactiveProps(scope)))
187
+ ]),
188
+ key: "2"
189
+ } : void 0,
183
190
  _ctx.$slots.bottom || _ctx.static && _ctx.$slots.content ? {
184
191
  name: "bottom",
185
192
  fn: withCtx(() => [
186
193
  renderSlot(_ctx.$slots, "content"),
187
194
  renderSlot(_ctx.$slots, "bottom")
188
195
  ]),
189
- key: "2"
196
+ key: "3"
190
197
  } : void 0,
191
198
  _ctx.$slots.right ? {
192
199
  name: "right",
193
200
  fn: withCtx(() => [
194
201
  renderSlot(_ctx.$slots, "right")
195
202
  ]),
196
- key: "3"
203
+ key: "4"
197
204
  } : void 0
198
205
  ]), 1040, ["class", "onFocus", "onBlur", "onClick", "onClick:suffix"])
199
206
  ]),
@@ -1,11 +1,18 @@
1
+ import { WrapSelection } from '../types';
1
2
  type __VLS_Props = {
2
3
  value: string;
3
- placeholder?: string;
4
- maxLength?: number;
4
+ placeholder: string;
5
+ maxLength: number;
5
6
  };
6
7
  declare const _default: import('vue').DefineComponent<__VLS_Props, {
7
8
  focus: () => void;
8
9
  blur: () => void;
10
+ wrapSelection: (value: WrapSelection) => void;
11
+ setCaret: (indexStart: number, indexEnd?: number) => void;
12
+ getSelectionOffsets: () => {
13
+ start: number;
14
+ end: number;
15
+ };
9
16
  offsetWidth: number;
10
17
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
11
18
  blur: (value: FocusEvent) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/components/ContentEditable.vue"],"names":[],"mappings":"AAoBA;AA2JA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;;;;;;;;;;;;;;;;;;AAgMF,wBAUG"}
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,13 @@ 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);
17
+ const insertParagraph = (e) => {
18
+ if (e.inputType === "insertParagraph") {
19
+ e.preventDefault();
20
+ insertPlain("\n");
21
+ }
22
+ };
16
23
  const onInput = (e) => {
17
24
  e.stopImmediatePropagation();
18
25
  if (!(e.target instanceof HTMLDivElement)) return;
@@ -33,59 +40,67 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
40
  const text = (e.clipboardData?.getData("text/plain") || await navigator.clipboard.readText()).replace(/\r\n?/g, "\n");
34
41
  insertPlain(text);
35
42
  };
36
- const onKeyDown = (e) => {
37
- if (e.key === "Enter") {
38
- e.preventDefault();
39
- insertPlain("\n");
40
- } else {
41
- emit("keydown", e);
42
- }
43
- };
44
43
  const insertPlain = (text) => {
45
44
  const root = elementRef.value;
46
45
  if (!root) return;
47
- const { start, end } = getSelectionOffsets(root);
46
+ const { start, end } = getSelectionOffsets();
48
47
  const next = (props.value ?? "").slice(0, start) + text + ((props.value ?? "").slice(end) || " ");
49
48
  const caretAfter = start + text.length;
50
49
  emit("update:model-value", next);
51
- nextTick(() => setCaretByCharIndex(root, caretAfter));
50
+ nextTick(() => setCaret(caretAfter));
52
51
  };
53
- const getSelectionOffsets = (root) => {
52
+ const getSelectionOffsets = () => {
54
53
  const selection = window.getSelection();
55
- if (!selection || selection.rangeCount === 0) return { start: 0, end: 0 };
54
+ if (!elementRef.value || !selection || selection.rangeCount === 0) return { start: 0, end: 0 };
56
55
  const range = selection.getRangeAt(0);
57
56
  const pre = range.cloneRange();
58
- pre.selectNodeContents(root);
57
+ pre.selectNodeContents(elementRef.value);
59
58
  pre.setEnd(range.startContainer, range.startOffset);
60
59
  const start = pre.toString().length;
61
60
  const selected = range.toString().length;
62
61
  return { start, end: start + selected };
63
62
  };
64
- const setCaretByCharIndex = (root, index) => {
65
- if (!root.firstChild) root.appendChild(document.createTextNode(""));
66
- const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT, null);
67
- let node, pos = index;
63
+ const getNodeOffset = (index) => {
64
+ if (!elementRef.value || index === void 0) return void 0;
65
+ if (!elementRef.value.firstChild) elementRef.value.appendChild(document.createTextNode(""));
66
+ const walker = document.createTreeWalker(elementRef.value, NodeFilter.SHOW_TEXT, null);
67
+ let node, offset = index;
68
68
  while (node = walker.nextNode()) {
69
69
  const len = node.nodeValue?.length ?? 0;
70
- if (pos <= len) {
71
- const r2 = document.createRange();
72
- r2.setStart(node, pos);
73
- r2.collapse(true);
74
- const selection2 = window.getSelection();
75
- selection2?.removeAllRanges();
76
- selection2?.addRange(r2);
77
- return;
78
- }
79
- pos -= len;
70
+ if (offset <= len) return { node, offset };
71
+ offset -= len;
80
72
  }
81
- const last = root.lastChild;
82
- if (!last) return;
83
- const r = document.createRange();
84
- r.setStart(last, last.nodeType === Node.TEXT_NODE && last.nodeValue ? last.nodeValue.length : last.childNodes.length);
85
- r.collapse(true);
73
+ const last = elementRef.value.lastChild;
74
+ if (!last) return void 0;
75
+ return { node: last, offset: last.nodeType === Node.TEXT_NODE && last.nodeValue ? last.nodeValue.length : last.childNodes.length };
76
+ };
77
+ const setCaret = (indexStart, indexEnd) => {
78
+ const start = getNodeOffset(indexStart);
79
+ if (start === void 0) return;
80
+ const range = document.createRange();
81
+ range.setStart(start.node, start.offset);
82
+ const end = getNodeOffset(indexEnd);
83
+ if (end !== void 0) range.setEnd(end.node, end.offset);
84
+ else range.collapse(true);
86
85
  const selection = window.getSelection();
87
86
  selection?.removeAllRanges();
88
- selection?.addRange(r);
87
+ selection?.addRange(range);
88
+ };
89
+ let offsetsOld = null;
90
+ const wrapSelection = (value) => {
91
+ const root = elementRef.value;
92
+ if (!root) return;
93
+ let offsets = getSelectionOffsets();
94
+ if (focused.value || !offsetsOld) offsetsOld = offsets;
95
+ else offsets = offsetsOld;
96
+ const currentText = props.value ?? "";
97
+ const selectedText = currentText.slice(offsets.start, offsets.end);
98
+ const beforeSelection = currentText.slice(0, offsets.start);
99
+ const afterSelection = currentText.slice(offsets.end);
100
+ const newText = beforeSelection + (value.start || "") + selectedText + (value.end || "") + afterSelection;
101
+ const cursorPosition = offsets.start + (value.end ? (value.start?.length ?? 0) + selectedText.length : 0);
102
+ emit("update:model-value", newText);
103
+ nextTick(() => setCaret(cursorPosition));
89
104
  };
90
105
  const focus = () => {
91
106
  elementRef.value?.focus();
@@ -96,6 +111,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
96
111
  __expose({
97
112
  focus,
98
113
  blur,
114
+ wrapSelection,
115
+ setCaret,
116
+ getSelectionOffsets,
99
117
  get offsetWidth() {
100
118
  return elementRef.value?.offsetWidth ?? 0;
101
119
  }
@@ -109,12 +127,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
109
127
  spellcheck: "false",
110
128
  textContent: _ctx.value,
111
129
  placeholder: _ctx.placeholder,
112
- class: "whitespace-pre empty:before:pointer-events-none empty:before:text-gray-400 empty:before:[content:attr(placeholder)] dark:empty:before:text-gray-500",
130
+ class: "relative whitespace-pre empty:before:pointer-events-none empty:before:text-gray-400 empty:before:[content:attr(placeholder)] dark:empty:before:text-gray-500",
113
131
  onInput,
132
+ onBeforeinput: insertParagraph,
114
133
  onPaste,
115
- onKeydown: onKeyDown,
116
- onFocus: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("focus", $event)),
117
- onBlur: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("blur", $event))
134
+ onKeydown: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("keydown", $event)),
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
+ })
118
143
  }, null, 40, _hoisted_1);
119
144
  };
120
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;
@@ -56,4 +56,8 @@ export interface InputDateProps extends Omit<InputSuggestProps<'text'>, 'modelVa
56
56
  minDate?: Date;
57
57
  maxDate?: Date;
58
58
  }
59
+ export type WrapSelection = {
60
+ start?: string;
61
+ end?: string;
62
+ };
59
63
  //# sourceMappingURL=types.d.ts.map
@@ -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,CAAC,IAAI,SAAS,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS,CAAA;IAClE,IAAI,CAAC,EAAE,IAAI,CAAA;IAEX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;IAC7B,SAAS,CAAC,EAAE,O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B,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/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B,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 },
@@ -2,10 +2,12 @@ import { SelectOptionComponent, SelectOptionProps, SelectSingleProps } from './t
2
2
  import { VNode } from 'vue';
3
3
  declare const _default: <Model extends number | string, Data extends DefaultData, QueryParamsOptions, 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<{
4
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
5
+ readonly onBlur?: ((value: FocusEvent) => any) | undefined;
6
+ readonly onFocus?: ((value: FocusEvent | undefined) => any) | undefined;
5
7
  readonly "onUpdate:model-value"?: ((value: AllowClear extends true ? Model | null : Model) => any) | undefined;
6
8
  readonly "onInit-model"?: (() => any) | undefined;
7
9
  readonly "onUpdate:query-options-error"?: ((value: string | undefined) => any) | undefined;
8
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:model-value" | "onInit-model" | "onUpdate:query-options-error"> & SelectSingleProps<Model, Data, QueryParamsOptions, OptionComponent, AllowClear> & Partial<{}>> & import('vue').PublicProps;
10
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onFocus" | "onBlur" | "onUpdate:model-value" | "onInit-model" | "onUpdate:query-options-error"> & SelectSingleProps<Model, Data, QueryParamsOptions, OptionComponent, AllowClear> & Partial<{}>> & import('vue').PublicProps;
9
11
  expose(exposed: import('vue').ShallowUnwrapRef<{
10
12
  blur: () => void;
11
13
  }>): void;
@@ -14,17 +16,21 @@ declare const _default: <Model extends number | string, Data extends DefaultData
14
16
  title?: () => VNode[];
15
17
  subtitle?: () => VNode[];
16
18
  right?: () => VNode[];
19
+ prefix?: () => VNode[];
17
20
  option?: (props: PartialNot<SelectOptionProps<Data>>) => VNode[];
18
21
  }> & {
19
22
  title?: () => VNode[];
20
23
  subtitle?: () => VNode[];
21
24
  right?: () => VNode[];
25
+ prefix?: () => VNode[];
22
26
  option?: (props: PartialNot<SelectOptionProps<Data>>) => VNode[];
23
27
  };
24
28
  emit: {
25
29
  (e: "update:model-value", value: AllowClear extends true ? Model | null : Model): void;
26
30
  (e: "update:query-options-error", value: string | undefined): void;
27
31
  (e: "init-model"): void;
32
+ (e: "focus", value: FocusEvent | undefined): void;
33
+ (e: "blur", value: FocusEvent): void;
28
34
  };
29
35
  }>) => import('vue').VNode & {
30
36
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -1 +1 @@
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,C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AK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA3OzE,wBA2O4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,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 },
@@ -76,7 +76,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
76
76
  queryParamsOptions: {},
77
77
  options: {}
78
78
  },
79
- emits: ["update:model-value", "update:query-options-error", "init-model"],
79
+ emits: ["update:model-value", "update:query-options-error", "init-model", "focus", "blur"],
80
80
  setup(__props, { expose: __expose, emit: __emit }) {
81
81
  const props = __props;
82
82
  const emit = __emit;
@@ -107,9 +107,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
107
107
  class: _ctx.$attrs.class,
108
108
  onSelect: _cache[0] || (_cache[0] = ($event) => updateModelValue($event)),
109
109
  onUnselect: _cache[1] || (_cache[1] = ($event) => updateModelValue(_ctx.allowClear ? null : $event)),
110
- onFocus: _cache[2] || (_cache[2] = ($event) => _ctx.searchModel && typeof _ctx.modelValue === "string" ? unref(selectComponentRef)?.setSearch(_ctx.modelValue) : void 0),
111
- "onUpdate:queryOptionsError": _cache[3] || (_cache[3] = ($event) => _ctx.$emit("update:query-options-error", $event)),
112
- onInitModel: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("init-model"))
110
+ onFocus: _cache[2] || (_cache[2] = ($event) => {
111
+ _ctx.searchModel && typeof _ctx.modelValue === "string" ? unref(selectComponentRef)?.setSearch(_ctx.modelValue) : void 0;
112
+ _ctx.$emit("focus", $event);
113
+ }),
114
+ onBlur: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("blur", $event)),
115
+ "onUpdate:queryOptionsError": _cache[4] || (_cache[4] = ($event) => _ctx.$emit("update:query-options-error", $event)),
116
+ onInitModel: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("init-model"))
113
117
  }), createSlots({ _: 2 }, [
114
118
  _ctx.$slots.title ? {
115
119
  name: "title",
@@ -138,6 +142,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
138
142
  renderSlot(_ctx.$slots, "right")
139
143
  ]),
140
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"
141
152
  } : void 0
142
153
  ]), 1040, ["class"]);
143
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 },
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rsmple/eco-vue-js.git"
6
6
  },
7
- "version": "0.11.6",
7
+ "version": "0.11.8",
8
8
  "dependencies": {
9
9
  "@stylistic/eslint-plugin": "5.2.3",
10
10
  "@tanstack/eslint-plugin-query": "5.83.1",