eco-vue-js 0.3.84 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/dist/components/Button/WButtonGroup.vue.d.ts.map +1 -1
  2. package/dist/components/Button/WButtonSelection.vue.d.ts +4 -9
  3. package/dist/components/Button/WButtonSelection.vue.d.ts.map +1 -1
  4. package/dist/components/Button/WButtonSelection.vue.js +51 -6
  5. package/dist/components/Button/WButtonSelectionAction.vue.js +15 -15
  6. package/dist/components/Form/WFormValidator.vue.js +3 -3
  7. package/dist/components/Form/models/utils.d.ts.map +1 -1
  8. package/dist/components/HeaderBar/WHeaderBar.vue.d.ts +1 -1
  9. package/dist/components/InfiniteList/WInfiniteList.vue.d.ts +13 -10
  10. package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
  11. package/dist/components/InfiniteList/WInfiniteList.vue.js +4 -2
  12. package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts +13 -10
  13. package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts.map +1 -1
  14. package/dist/components/InfiniteList/WInfiniteListPages.vue.js +4 -2
  15. package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts +13 -10
  16. package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -1
  17. package/dist/components/InfiniteList/components/InfiniteListPage.vue.js +6 -4
  18. package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.d.ts +13 -10
  19. package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.d.ts.map +1 -1
  20. package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.js +6 -5
  21. package/dist/components/Input/WInputOptions.vue.d.ts.map +1 -1
  22. package/dist/components/Select/WSelect.vue.d.ts +3 -3
  23. package/dist/components/Select/WSelect.vue.d.ts.map +1 -1
  24. package/dist/components/Select/WSelectAsync.vue.d.ts +34 -25
  25. package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -1
  26. package/dist/components/Select/WSelectAsync.vue.js +20 -15
  27. package/dist/components/Select/WSelectAsyncList.vue.d.ts +28 -22
  28. package/dist/components/Select/WSelectAsyncList.vue.d.ts.map +1 -1
  29. package/dist/components/Select/WSelectAsyncList.vue.js +8 -6
  30. package/dist/components/Select/WSelectAsyncSingle.vue.d.ts +22 -16
  31. package/dist/components/Select/WSelectAsyncSingle.vue.d.ts.map +1 -1
  32. package/dist/components/Select/WSelectAsyncSingle.vue.js +7 -3
  33. package/dist/components/Select/WSelectSingle.vue.d.ts +3 -3
  34. package/dist/components/Select/WSelectSingle.vue.d.ts.map +1 -1
  35. package/dist/components/Select/components/SelectAsyncList.vue.d.ts +25 -22
  36. package/dist/components/Select/components/SelectAsyncList.vue.d.ts.map +1 -1
  37. package/dist/components/Select/components/SelectAsyncList.vue.js +34 -32
  38. package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts +22 -16
  39. package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts.map +1 -1
  40. package/dist/components/Select/components/SelectAsyncPrefix.vue.js +8 -5
  41. package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts +10 -7
  42. package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts.map +1 -1
  43. package/dist/components/Select/components/SelectAsyncPrefixPage.vue.js +5 -4
  44. package/dist/components/Select/components/SelectOption.vue.d.ts +149 -62
  45. package/dist/components/Select/components/SelectOption.vue.d.ts.map +1 -1
  46. package/dist/components/Tabs/WTabs.vue.js +2 -2
  47. package/dist/components/Toggle/WToggle.vue.d.ts.map +1 -1
  48. package/dist/types/global.d.ts +5 -0
  49. package/package.json +12 -12
@@ -1,12 +1,13 @@
1
1
  import { type Component } from 'vue';
2
- declare const _default: <Data extends DefaultData>(__VLS_props: {
2
+ declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
3
3
  required?: boolean | undefined;
4
+ search: string;
4
5
  title?: string | undefined;
5
6
  disabled?: boolean | undefined;
6
7
  loading?: boolean | undefined;
7
- search: string;
8
- "onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
9
- modelValue: number | null;
8
+ "onUpdate:modelValue"?: ((value: Model | null) => any) | undefined;
9
+ modelValue: Model | null;
10
+ valueGetter?: ((data: Data) => Model) | undefined;
10
11
  icon?: SVGComponent | undefined;
11
12
  readonly?: boolean | undefined;
12
13
  skeleton?: boolean | undefined;
@@ -34,18 +35,19 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
34
35
  "onCreate:option"?: ((value: string) => any) | undefined;
35
36
  allowCreate?: boolean | undefined;
36
37
  previewData?: Data | undefined;
38
+ valueQueryKey?: string | undefined;
37
39
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
38
40
  attrs: any;
39
41
  slots: {
40
42
  option?(_: {
41
- option: DefaultData | null;
43
+ option: Data | null;
42
44
  selected: boolean;
43
45
  model: boolean;
44
46
  }): any;
45
47
  right?(_: {}): any;
46
48
  };
47
49
  emit: {
48
- (e: 'update:modelValue', value: number | null): void;
50
+ (e: 'update:modelValue', value: Model | null): void;
49
51
  (e: 'update:search', value: string): void;
50
52
  (e: 'create:option', value: string): void;
51
53
  };
@@ -54,12 +56,13 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
54
56
  }>) => void) | undefined, __VLS_setup?: Promise<{
55
57
  props: {
56
58
  required?: boolean | undefined;
59
+ search: string;
57
60
  title?: string | undefined;
58
61
  disabled?: boolean | undefined;
59
62
  loading?: boolean | undefined;
60
- search: string;
61
- "onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
62
- modelValue: number | null;
63
+ "onUpdate:modelValue"?: ((value: Model | null) => any) | undefined;
64
+ modelValue: Model | null;
65
+ valueGetter?: ((data: Data) => Model) | undefined;
63
66
  icon?: SVGComponent | undefined;
64
67
  readonly?: boolean | undefined;
65
68
  skeleton?: boolean | undefined;
@@ -87,6 +90,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
87
90
  "onCreate:option"?: ((value: string) => any) | undefined;
88
91
  allowCreate?: boolean | undefined;
89
92
  previewData?: Data | undefined;
93
+ valueQueryKey?: string | undefined;
90
94
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
91
95
  expose(exposed: import("vue").ShallowUnwrapRef<{
92
96
  blur: () => void;
@@ -94,14 +98,14 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
94
98
  attrs: any;
95
99
  slots: {
96
100
  option?(_: {
97
- option: DefaultData | null;
101
+ option: Data | null;
98
102
  selected: boolean;
99
103
  model: boolean;
100
104
  }): any;
101
105
  right?(_: {}): any;
102
106
  };
103
107
  emit: {
104
- (e: 'update:modelValue', value: number | null): void;
108
+ (e: 'update:modelValue', value: Model | null): void;
105
109
  (e: 'update:search', value: string): void;
106
110
  (e: 'create:option', value: string): void;
107
111
  };
@@ -111,12 +115,13 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
111
115
  __ctx?: {
112
116
  props: {
113
117
  required?: boolean | undefined;
118
+ search: string;
114
119
  title?: string | undefined;
115
120
  disabled?: boolean | undefined;
116
121
  loading?: boolean | undefined;
117
- search: string;
118
- "onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
119
- modelValue: number | null;
122
+ "onUpdate:modelValue"?: ((value: Model | null) => any) | undefined;
123
+ modelValue: Model | null;
124
+ valueGetter?: ((data: Data) => Model) | undefined;
120
125
  icon?: SVGComponent | undefined;
121
126
  readonly?: boolean | undefined;
122
127
  skeleton?: boolean | undefined;
@@ -144,6 +149,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
144
149
  "onCreate:option"?: ((value: string) => any) | undefined;
145
150
  allowCreate?: boolean | undefined;
146
151
  previewData?: Data | undefined;
152
+ valueQueryKey?: string | undefined;
147
153
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
148
154
  expose(exposed: import("vue").ShallowUnwrapRef<{
149
155
  blur: () => void;
@@ -151,14 +157,14 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
151
157
  attrs: any;
152
158
  slots: {
153
159
  option?(_: {
154
- option: DefaultData | null;
160
+ option: Data | null;
155
161
  selected: boolean;
156
162
  model: boolean;
157
163
  }): any;
158
164
  right?(_: {}): any;
159
165
  };
160
166
  emit: {
161
- (e: 'update:modelValue', value: number | null): void;
167
+ (e: 'update:modelValue', value: Model | null): void;
162
168
  (e: 'update:search', value: string): void;
163
169
  (e: 'create:option', value: string): void;
164
170
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WSelectAsyncSingle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectAsyncSingle.vue"],"names":[],"mappings":"AAuDA;AAEA,OAAO,EAA8B,KAAK,SAAS,EAAC,MAAM,KAAK,CAAA;;;;;;YAsNrD,MAAM;;gBADF,MAAM,GAAG,IAAI;;;;;;;;;;;;;iBAIZ,WAAW;;2BADD,OAAO,KAAK,OAAO;;;;;;;;;;;;;;WA+BrC,GAAG;;;;;;YAzDmB,GAAG;uBACJ,GAAG;;;YAtJzB,mBAAmB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;YAChD,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;OA2M4B,IAAI;;;;;;gBAhCjE,MAAM;;oBADF,MAAM,GAAG,IAAI;;;;;;;;;;;;;qBAIZ,WAAW;;+BADD,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;SA8B2B,IAAI;WACpE,GAAG;;;;;;YAzDmB,GAAG;uBACJ,GAAG;;;YAtJzB,mBAAmB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;YAChD,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;;;;;;;;oBA2KjC,MAAM;;wBADF,MAAM,GAAG,IAAI;;;;;;;;;;;;;yBAIZ,WAAW;;mCADD,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;aA8B2B,IAAI;eACpE,GAAG;;;;;;gBAzDmB,GAAG;2BACJ,GAAG;;;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OAAO;;;;;wBAQL,IAAI;;;;;;;;;;;;aAwB4B,IAAI;eACpE,GAAG;;;;;;gBA3DmB,GAAG;2BACJ,GAAG;;;gBAtJzB,mBAAmB,SAAS,KAAK,GAAG,IAAI,GAAG,IAAI;gBAC/C,eAAe,SAAS,MAAM,GAAG,IAAI;gBACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;AAzC3C,wBA4P2E"}
@@ -30,7 +30,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
30
30
  mono: { type: Boolean },
31
31
  allowClear: { type: Boolean },
32
32
  previewData: {},
33
- hideOptionIcon: { type: Boolean }
33
+ hideOptionIcon: { type: Boolean },
34
+ valueGetter: { type: Function },
35
+ valueQueryKey: {}
34
36
  },
35
37
  emits: ["update:modelValue", "update:search", "create:option"],
36
38
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -84,9 +86,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
84
86
  "disable-clear": !_ctx.allowClear,
85
87
  "preview-data": _ctx.previewData ? [_ctx.previewData] : void 0,
86
88
  "hide-option-icon": _ctx.hideOptionIcon,
89
+ "value-getter": _ctx.valueGetter,
90
+ "value-query-key": _ctx.valueQueryKey,
87
91
  "hide-prefix": "",
88
92
  onSelect: _cache[0] || (_cache[0] = ($event) => updateModelValue($event)),
89
- onUnselect: _cache[1] || (_cache[1] = ($event) => updateModelValue(_ctx.allowClear ? null : $event)),
93
+ onUnselect: _cache[1] || (_cache[1] = ($event) => _ctx.allowClear && updateModelValue(null)),
90
94
  "onUpdate:search": _cache[2] || (_cache[2] = ($event) => emit("update:search", $event)),
91
95
  "onCreate:option": _cache[3] || (_cache[3] = ($event) => createOption($event))
92
96
  }, createSlots({
@@ -106,7 +110,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
106
110
  ]),
107
111
  key: "0"
108
112
  } : void 0
109
- ]), 1032, ["model-value", "search", "title", "mobile-title", "description", "loading", "max-search-length", "empty-stub", "query-params", "use-query-fn", "is-invalid-page", "option-component", "readonly", "disabled", "skeleton", "allow-create", "error-message", "has-changes", "placeholder", "search-size", "required", "no-margin", "icon", "mono", "disable-clear", "preview-data", "hide-option-icon"])
113
+ ]), 1032, ["model-value", "search", "title", "mobile-title", "description", "loading", "max-search-length", "empty-stub", "query-params", "use-query-fn", "is-invalid-page", "option-component", "readonly", "disabled", "skeleton", "allow-create", "error-message", "has-changes", "placeholder", "search-size", "required", "no-margin", "icon", "mono", "disable-clear", "preview-data", "hide-option-icon", "value-getter", "value-query-key"])
110
114
  ]);
111
115
  };
112
116
  }
@@ -1,10 +1,10 @@
1
1
  import { type Component } from 'vue';
2
2
  declare const _default: <Item extends string | number = string>(__VLS_props: {
3
3
  required?: boolean | undefined;
4
+ search: string;
4
5
  title?: string | undefined;
5
6
  disabled?: boolean | undefined;
6
7
  loading?: boolean | undefined;
7
- search: string;
8
8
  "onUpdate:modelValue"?: ((value: Item | null) => any) | undefined;
9
9
  modelValue: Item | null;
10
10
  icon?: SVGComponent | undefined;
@@ -51,10 +51,10 @@ declare const _default: <Item extends string | number = string>(__VLS_props: {
51
51
  }>) => void) | undefined, __VLS_setup?: Promise<{
52
52
  props: {
53
53
  required?: boolean | undefined;
54
+ search: string;
54
55
  title?: string | undefined;
55
56
  disabled?: boolean | undefined;
56
57
  loading?: boolean | undefined;
57
- search: string;
58
58
  "onUpdate:modelValue"?: ((value: Item | null) => any) | undefined;
59
59
  modelValue: Item | null;
60
60
  icon?: SVGComponent | undefined;
@@ -105,10 +105,10 @@ declare const _default: <Item extends string | number = string>(__VLS_props: {
105
105
  __ctx?: {
106
106
  props: {
107
107
  required?: boolean | undefined;
108
+ search: string;
108
109
  title?: string | undefined;
109
110
  disabled?: boolean | undefined;
110
111
  loading?: boolean | undefined;
111
- search: string;
112
112
  "onUpdate:modelValue"?: ((value: Item | null) => any) | undefined;
113
113
  modelValue: Item | null;
114
114
  icon?: SVGComponent | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"WSelectSingle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectSingle.vue"],"names":[],"mappings":"AAoDA;AAEA,OAAO,EAA8B,KAAK,SAAS,EAAC,MAAM,KAAK,CAAA;;;;;;YAmNrD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA8BT,GAAG;;;;;;YAtDmB,GAAG;uBACJ,GAAG;;;YAtJzB,mBAAmB,uBAAuB,IAAI;YAC9C,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;OAwM4B,IAAI;;;;;;gBA7BjE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA6BuD,IAAI;WACpE,GAAG;;;;;;YAtDmB,GAAG;uBACJ,GAAG;;;YAtJzB,mBAAmB,uBAAuB,IAAI;YAC9C,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;;;;;;;;oBA2KjC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA6BuD,IAAI;eACpE,GAAG;;;;;;gBAtDmB,GAAG;2BACJ,GAAG;;;gBAtJzB,mBAAmB,uBAAuB,IAAI;gBAC9C,eAAe,SAAS,MAAM,GAAG,IAAI;gBACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;AApC3C,wBAkP2E"}
1
+ {"version":3,"file":"WSelectSingle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectSingle.vue"],"names":[],"mappings":"AAoDA;AAEA,OAAO,EAA8B,KAAK,SAAS,EAAC,MAAM,KAAK,CAAA;;;YAmNrD,MAAM;;;;;gBADF,IAAI,GAAG,IAAI;;;;;;;;;;;;;;;aAEd,IAAI,EAAE;;;gBAOsB,IAAI;;;;;;;;WAsBpC,GAAG;;;;;;YAtDmB,GAAG;uBACJ,GAAG;;;YAtJzB,mBAAmB,SAAS,IAAI,GAAG,IAAI,GAAG,IAAI;YAC9C,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;OAwM4B,IAAI;;;gBA7BjE,MAAM;;;;;oBADF,IAAI,GAAG,IAAI;;;;;;;;;;;;;;;iBAEd,IAAI,EAAE;;;oBAOsB,IAAI;;;;;;;;;;SAqB4B,IAAI;WACpE,GAAG;;;;;;YAtDmB,GAAG;uBACJ,GAAG;;;YAtJzB,mBAAmB,SAAS,IAAI,GAAG,IAAI,GAAG,IAAI;YAC9C,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;;;;;oBA2KjC,MAAM;;;;;wBADF,IAAI,GAAG,IAAI;;;;;;;;;;;;;;;qBAEd,IAAI,EAAE;;;wBAOsB,IAAI;;;;;;;;;;aAqB4B,IAAI;eACpE,GAAG;;;;;;gBAtDmB,GAAG;2BACJ,GAAG;;;gBAtJzB,mBAAmB,SAAS,IAAI,GAAG,IAAI,GAAG,IAAI;gBAC9C,eAAe,SAAS,MAAM,GAAG,IAAI;gBACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;AApC3C,wBAkP2E"}
@@ -1,11 +1,12 @@
1
- declare const _default: <Data extends DefaultData>(__VLS_props: {
2
- onSelect?: ((value: number) => any) | undefined;
1
+ declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
2
+ onSelect?: ((value: Model) => any) | undefined;
3
3
  transition?: boolean | undefined;
4
4
  disabled?: boolean | undefined;
5
5
  loading?: boolean | undefined;
6
- "onUpdate:modelValue"?: ((value: number[]) => any) | undefined;
7
- modelValue: number[];
8
- onUnselect?: ((value: number) => any) | undefined;
6
+ "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
7
+ modelValue: Model[];
8
+ valueGetter: (data: Data) => Model;
9
+ onUnselect?: ((value: Model) => any) | undefined;
9
10
  scrollingElement?: Element | null | undefined;
10
11
  queryParams: QueryParams;
11
12
  selectOnly?: boolean | undefined;
@@ -35,10 +36,10 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
35
36
  }) => void) | undefined;
36
37
  };
37
38
  emit: {
38
- (e: 'select', value: number): void;
39
- (e: 'unselect', value: number): void;
39
+ (e: 'select', value: Model): void;
40
+ (e: 'unselect', value: Model): void;
40
41
  (e: 'update:count', value: number): void;
41
- (e: 'update:modelValue', value: number[]): void;
42
+ (e: 'update:modelValue', value: Model[]): void;
42
43
  (e: 'create:option'): void;
43
44
  };
44
45
  } | undefined, __VLS_expose?: ((exposed: import("vue").ShallowUnwrapRef<{
@@ -47,13 +48,14 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
47
48
  selectCursor: () => void;
48
49
  }>) => void) | undefined, __VLS_setup?: Promise<{
49
50
  props: {
50
- onSelect?: ((value: number) => any) | undefined;
51
+ onSelect?: ((value: Model) => any) | undefined;
51
52
  transition?: boolean | undefined;
52
53
  disabled?: boolean | undefined;
53
54
  loading?: boolean | undefined;
54
- "onUpdate:modelValue"?: ((value: number[]) => any) | undefined;
55
- modelValue: number[];
56
- onUnselect?: ((value: number) => any) | undefined;
55
+ "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
56
+ modelValue: Model[];
57
+ valueGetter: (data: Data) => Model;
58
+ onUnselect?: ((value: Model) => any) | undefined;
57
59
  scrollingElement?: Element | null | undefined;
58
60
  queryParams: QueryParams;
59
61
  selectOnly?: boolean | undefined;
@@ -88,10 +90,10 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
88
90
  }) => void) | undefined;
89
91
  };
90
92
  emit: {
91
- (e: 'select', value: number): void;
92
- (e: 'unselect', value: number): void;
93
+ (e: 'select', value: Model): void;
94
+ (e: 'unselect', value: Model): void;
93
95
  (e: 'update:count', value: number): void;
94
- (e: 'update:modelValue', value: number[]): void;
96
+ (e: 'update:modelValue', value: Model[]): void;
95
97
  (e: 'create:option'): void;
96
98
  };
97
99
  }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -99,13 +101,14 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
99
101
  }> & {
100
102
  __ctx?: {
101
103
  props: {
102
- onSelect?: ((value: number) => any) | undefined;
104
+ onSelect?: ((value: Model) => any) | undefined;
103
105
  transition?: boolean | undefined;
104
106
  disabled?: boolean | undefined;
105
107
  loading?: boolean | undefined;
106
- "onUpdate:modelValue"?: ((value: number[]) => any) | undefined;
107
- modelValue: number[];
108
- onUnselect?: ((value: number) => any) | undefined;
108
+ "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
109
+ modelValue: Model[];
110
+ valueGetter: (data: Data) => Model;
111
+ onUnselect?: ((value: Model) => any) | undefined;
109
112
  scrollingElement?: Element | null | undefined;
110
113
  queryParams: QueryParams;
111
114
  selectOnly?: boolean | undefined;
@@ -140,10 +143,10 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
140
143
  }) => void) | undefined;
141
144
  };
142
145
  emit: {
143
- (e: 'select', value: number): void;
144
- (e: 'unselect', value: number): void;
146
+ (e: 'select', value: Model): void;
147
+ (e: 'unselect', value: Model): void;
145
148
  (e: 'update:count', value: number): void;
146
- (e: 'update:modelValue', value: number[]): void;
149
+ (e: 'update:modelValue', value: Model[]): void;
147
150
  (e: 'create:option'): void;
148
151
  };
149
152
  } | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectAsyncList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/components/SelectAsyncList.vue"],"names":[],"mappings":"AA0FA;;;;;;;gBAoac,MAAM,EAAE;;;iBAEP,WAAW;;;;;2BACD,OAAO,KAAK,OAAO;;;;;;;;WAmBrC,GAAG;;;;sBApU0C,OAAO;sBAAY,OAAO;cAAM,IAAI;;;;sBAApC,OAAO;sBAAY,OAAO;cAAM,IAAI;;;YArFlF,QAAQ,SAAS,MAAM,GAAG,IAAI;YAC9B,UAAU,SAAS,MAAM,GAAG,IAAI;YAChC,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,mBAAmB,SAAS,MAAM,EAAE,GAAG,IAAI;YAC3C,eAAe,GAAG,IA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AC,KAAK,IAAI;;+BAApE;gBAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAA;aAAC,KAAK,IAAI;;;gBArFlF,QAAQ,SAAS,KAAK,GAAG,IAAI;gBAC7B,UAAU,SAAS,KAAK,GAAG,IAAI;gBAC/B,cAAc,SAAS,MAAM,GAAG,IAAI;gBACpC,mBAAmB,SAAS,KAAK,EAAE,GAAG,IAAI;gBAC1C,eAAe,GAAG,IAAI;;;;AA9B5B,wBA8a2E"}
@@ -22,7 +22,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
22
  selectOnly: { type: Boolean },
23
23
  unselectOnly: { type: Boolean },
24
24
  allowCreate: { type: Boolean },
25
- hideOptionIcon: { type: Boolean }
25
+ hideOptionIcon: { type: Boolean },
26
+ valueGetter: { type: Function }
26
27
  },
27
28
  emits: ["select", "unselect", "update:count", "update:modelValue", "create:option"],
28
29
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -32,12 +33,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
33
  const cursorPrevious = ref(void 0);
33
34
  const cursorNext = ref(void 0);
34
35
  const isCursorLocked = ref(false);
35
- const loadingOptionId = ref(void 0);
36
+ const loadingOption = ref(void 0);
36
37
  const firstItem = ref();
37
38
  const lastItem = ref();
38
39
  const count = ref(0);
39
- const setLoadingOptionId = (value) => {
40
- loadingOptionId.value = value;
40
+ const setLoadingOption = (value) => {
41
+ loadingOption.value = value;
41
42
  };
42
43
  const unlockCursor = debounce(() => {
43
44
  isCursorLocked.value = false;
@@ -51,9 +52,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
51
52
  return;
52
53
  cursor.value = value;
53
54
  };
54
- const updateCursors = (previous, next) => {
55
- cursorPrevious.value = previous;
56
- cursorNext.value = next;
55
+ const updateCursors = (event) => {
56
+ cursorPrevious.value = event.previous;
57
+ cursorNext.value = event.next;
57
58
  };
58
59
  const cursorUp = () => {
59
60
  if (props.disabled || cursorPrevious.value === void 0)
@@ -75,8 +76,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
75
76
  emit("create:option");
76
77
  return;
77
78
  }
78
- if (cursor.value > 0) {
79
- setLoadingOptionId(cursor.value);
79
+ if (cursor.value) {
80
+ setLoadingOption(cursor.value);
80
81
  if (props.modelValue.includes(cursor.value))
81
82
  emit("unselect", cursor.value);
82
83
  else
@@ -101,6 +102,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
101
102
  "empty-stub": _ctx.emptyStub,
102
103
  "select-only": _ctx.selectOnly,
103
104
  "unselect-only": _ctx.unselectOnly,
105
+ "value-getter": _ctx.valueGetter,
104
106
  "hide-page-title": "",
105
107
  "header-top-ignore": "",
106
108
  "min-height": "",
@@ -112,15 +114,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
112
114
  }, {
113
115
  default: withCtx(({ item, skeleton, previous, next, first, last, resetting }) => [
114
116
  createVNode(_sfc_main$2, {
115
- "is-selected": !skeleton && _ctx.modelValue.includes(item.id),
116
- "is-cursor": !skeleton && item.id === cursor.value,
117
- loading: _ctx.loading && loadingOptionId.value === item.id,
117
+ "is-selected": !skeleton && _ctx.modelValue.includes(_ctx.valueGetter(item)),
118
+ "is-cursor": !skeleton && _ctx.valueGetter(item) === cursor.value,
119
+ loading: _ctx.loading && loadingOption.value === _ctx.valueGetter(item),
118
120
  skeleton,
119
121
  scroll: isCursorLocked.value,
120
122
  first,
121
123
  last,
122
- previous: first && props.allowCreate ? null : previous?.id,
123
- next: last && props.allowCreate ? null : next?.id,
124
+ previous: first && props.allowCreate ? null : previous ? _ctx.valueGetter(previous) : void 0,
125
+ next: last && props.allowCreate ? null : next ? _ctx.valueGetter(next) : void 0,
124
126
  "is-no-cursor": cursor.value === void 0,
125
127
  "hide-option-icon": _ctx.hideOptionIcon,
126
128
  class: normalizeClass({
@@ -128,21 +130,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
128
130
  "pb-4": !_ctx.noPadding && last && !_ctx.allowCreate
129
131
  }),
130
132
  onSelect: ($event) => {
131
- _ctx.$emit("select", item.id);
132
- setLoadingOptionId(item.id);
133
+ _ctx.$emit("select", _ctx.valueGetter(item));
134
+ setLoadingOption(_ctx.valueGetter(item));
133
135
  },
134
136
  onUnselect: ($event) => {
135
- _ctx.$emit("unselect", item.id);
136
- setLoadingOptionId(item.id);
137
+ _ctx.$emit("unselect", _ctx.valueGetter(item));
138
+ setLoadingOption(_ctx.valueGetter(item));
137
139
  },
138
- onMouseenter: ($event) => !skeleton && setCursor(item.id),
139
- "onUpdate:cursor": ($event) => setCursor(item.id),
140
- "onUpdate:isCursor": ($event) => updateCursors($event.previous, $event.next),
140
+ onMouseenter: ($event) => !skeleton && setCursor(_ctx.valueGetter(item)),
141
+ "onUpdate:cursor": ($event) => setCursor(_ctx.valueGetter(item)),
142
+ "onUpdate:isCursor": updateCursors,
141
143
  "onUpdate:previous": _cache[0] || (_cache[0] = ($event) => cursorPrevious.value = $event),
142
144
  "onUpdate:next": _cache[1] || (_cache[1] = ($event) => cursorNext.value = $event),
143
- onUnmounted: ($event) => resetting ? cursor.value = void 0 : cursor.value = next?.id,
144
- "onUpdate:first": ($event) => firstItem.value = item.id,
145
- "onUpdate:last": ($event) => lastItem.value = item.id
145
+ onUnmounted: ($event) => resetting ? cursor.value = void 0 : cursor.value = next ? _ctx.valueGetter(next) : void 0,
146
+ "onUpdate:first": ($event) => firstItem.value = _ctx.valueGetter(item),
147
+ "onUpdate:last": ($event) => lastItem.value = _ctx.valueGetter(item)
146
148
  }, {
147
149
  default: withCtx(({ selected }) => [
148
150
  renderSlot(_ctx.$slots, "default", {
@@ -152,15 +154,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
152
154
  })
153
155
  ]),
154
156
  _: 2
155
- }, 1032, ["is-selected", "is-cursor", "loading", "skeleton", "scroll", "first", "last", "previous", "next", "is-no-cursor", "hide-option-icon", "class", "onSelect", "onUnselect", "onMouseenter", "onUpdate:cursor", "onUpdate:isCursor", "onUnmounted", "onUpdate:first", "onUpdate:last"])
157
+ }, 1032, ["is-selected", "is-cursor", "loading", "skeleton", "scroll", "first", "last", "previous", "next", "is-no-cursor", "hide-option-icon", "class", "onSelect", "onUnselect", "onMouseenter", "onUpdate:cursor", "onUnmounted", "onUpdate:first", "onUpdate:last"])
156
158
  ]),
157
159
  _: 3
158
- }, 8, ["use-query-fn", "query-params", "is-invalid-page", "scrolling-element", "transition", "exclude-params", "selected", "empty-stub", "select-only", "unselect-only"]),
160
+ }, 8, ["use-query-fn", "query-params", "is-invalid-page", "scrolling-element", "transition", "exclude-params", "selected", "empty-stub", "select-only", "unselect-only", "value-getter"]),
159
161
  _ctx.allowCreate ? (openBlock(), createBlock(_sfc_main$2, {
160
162
  key: 0,
161
163
  "is-selected": false,
162
164
  "is-cursor": cursor.value === null,
163
- loading: _ctx.loading && loadingOptionId.value === null,
165
+ loading: _ctx.loading && loadingOption.value === null,
164
166
  scroll: isCursorLocked.value,
165
167
  previous: lastItem.value,
166
168
  next: firstItem.value,
@@ -172,12 +174,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
172
174
  "onUpdate:cursor": _cache[5] || (_cache[5] = ($event) => setCursor(null)),
173
175
  onSelect: _cache[6] || (_cache[6] = ($event) => {
174
176
  _ctx.$emit("create:option");
175
- setLoadingOptionId(null);
177
+ setLoadingOption(null);
176
178
  }),
177
- "onUpdate:isCursor": _cache[7] || (_cache[7] = ($event) => updateCursors($event.previous, $event.next)),
178
- "onUpdate:previous": _cache[8] || (_cache[8] = ($event) => cursorPrevious.value = $event),
179
- "onUpdate:next": _cache[9] || (_cache[9] = ($event) => cursorNext.value = $event),
180
- onUnmounted: _cache[10] || (_cache[10] = ($event) => cursor.value = void 0)
179
+ "onUpdate:isCursor": updateCursors,
180
+ "onUpdate:previous": _cache[7] || (_cache[7] = ($event) => cursorPrevious.value = $event),
181
+ "onUpdate:next": _cache[8] || (_cache[8] = ($event) => cursorNext.value = $event),
182
+ onUnmounted: _cache[9] || (_cache[9] = ($event) => cursor.value = void 0)
181
183
  }, {
182
184
  default: withCtx(() => [
183
185
  _hoisted_2,
@@ -1,10 +1,11 @@
1
1
  import { type Component } from 'vue';
2
- declare const _default: <Data extends DefaultData>(__VLS_props: {
2
+ declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
3
3
  disabled?: boolean | undefined;
4
4
  loading?: boolean | undefined;
5
- "onUpdate:modelValue"?: ((value: number[]) => any) | undefined;
6
- modelValue: number[];
7
- onUnselect?: ((value: number) => any) | undefined;
5
+ "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
6
+ modelValue: Model[];
7
+ valueGetter: (value: Data) => Model;
8
+ onUnselect?: ((value: Model) => any) | undefined;
8
9
  useQueryFn: UsePaginatedQuery<Data>;
9
10
  optionComponent?: Component<{
10
11
  option: Data;
@@ -14,6 +15,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
14
15
  disableClear?: boolean | undefined;
15
16
  "onUpdate:fetching"?: ((value: boolean) => any) | undefined;
16
17
  previewData?: Data[] | undefined;
18
+ valueQueryKey: string;
17
19
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
18
20
  attrs: any;
19
21
  slots: Readonly<{
@@ -28,17 +30,18 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
28
30
  }) => void) | undefined;
29
31
  };
30
32
  emit: {
31
- (e: 'unselect', value: number): void;
33
+ (e: 'unselect', value: Model): void;
32
34
  (e: 'update:fetching', value: boolean): void;
33
- (e: 'update:modelValue', value: number[]): void;
35
+ (e: 'update:modelValue', value: Model[]): void;
34
36
  };
35
37
  } | undefined, __VLS_expose?: ((exposed: import('vue').ShallowUnwrapRef<{}>) => void) | undefined, __VLS_setup?: Promise<{
36
38
  props: {
37
39
  disabled?: boolean | undefined;
38
40
  loading?: boolean | undefined;
39
- "onUpdate:modelValue"?: ((value: number[]) => any) | undefined;
40
- modelValue: number[];
41
- onUnselect?: ((value: number) => any) | undefined;
41
+ "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
42
+ modelValue: Model[];
43
+ valueGetter: (value: Data) => Model;
44
+ onUnselect?: ((value: Model) => any) | undefined;
42
45
  useQueryFn: UsePaginatedQuery<Data>;
43
46
  optionComponent?: Component<{
44
47
  option: Data;
@@ -48,6 +51,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
48
51
  disableClear?: boolean | undefined;
49
52
  "onUpdate:fetching"?: ((value: boolean) => any) | undefined;
50
53
  previewData?: Data[] | undefined;
54
+ valueQueryKey: string;
51
55
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
52
56
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
53
57
  attrs: any;
@@ -63,9 +67,9 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
63
67
  }) => void) | undefined;
64
68
  };
65
69
  emit: {
66
- (e: 'unselect', value: number): void;
70
+ (e: 'unselect', value: Model): void;
67
71
  (e: 'update:fetching', value: boolean): void;
68
- (e: 'update:modelValue', value: number[]): void;
72
+ (e: 'update:modelValue', value: Model[]): void;
69
73
  };
70
74
  }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
71
75
  [key: string]: any;
@@ -74,9 +78,10 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
74
78
  props: {
75
79
  disabled?: boolean | undefined;
76
80
  loading?: boolean | undefined;
77
- "onUpdate:modelValue"?: ((value: number[]) => any) | undefined;
78
- modelValue: number[];
79
- onUnselect?: ((value: number) => any) | undefined;
81
+ "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
82
+ modelValue: Model[];
83
+ valueGetter: (value: Data) => Model;
84
+ onUnselect?: ((value: Model) => any) | undefined;
80
85
  useQueryFn: UsePaginatedQuery<Data>;
81
86
  optionComponent?: Component<{
82
87
  option: Data;
@@ -86,6 +91,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
86
91
  disableClear?: boolean | undefined;
87
92
  "onUpdate:fetching"?: ((value: boolean) => any) | undefined;
88
93
  previewData?: Data[] | undefined;
94
+ valueQueryKey: string;
89
95
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
90
96
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
91
97
  attrs: any;
@@ -101,9 +107,9 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
101
107
  }) => void) | undefined;
102
108
  };
103
109
  emit: {
104
- (e: 'unselect', value: number): void;
110
+ (e: 'unselect', value: Model): void;
105
111
  (e: 'update:fetching', value: boolean): void;
106
- (e: 'update:modelValue', value: number[]): void;
112
+ (e: 'update:modelValue', value: Model[]): void;
107
113
  };
108
114
  } | undefined;
109
115
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SelectAsyncPrefix.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/components/SelectAsyncPrefix.vue"],"names":[],"mappings":"AA0CA;AAEA,OAAO,EAAuB,KAAK,SAAS,EAAkB,MAAM,KAAK,CAAA;;;;;gBAkN3D,MAAM,EAAE;;;;;;;;;;;;WAaf,GAAG;;;;sBAxLmC,OAAO;cAAM,IAAI;;;;sBAAjB,OAAO;cAAM,IAAI;;;YAdxD,UAAU,SAAS,MAAM,GAAG,IAAI;YAChC,iBAAiB,SAAS,OAAO,GAAG,IAAI;YACxC,mBAAmB,SAAS,MAAM,EAAE,GAAG,IAAI;;yCAmMjC,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,KAAG,IAAI;;;;;oBAZ3C,MAAM,EAAE;;;;;;;;;;;;oBAYN,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;;sBAxLmC,OAAO;cAAM,IAAI;;;;sBAAjB,OAAO;cAAM,IAAI;;;YAdxD,UAAU,SAAS,MAAM,GAAG,IAAI;YAChC,iBAAiB,SAAS,OAA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AAG,IAAI;WAClD,GAAG;;2BA1LU;YAAC,MAAM,EAAE,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;2BAA1C;YAAC,MAAM,EAAE,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;;YAdxD,UAAU,SAAS,KAAK,GAAG,IAAI;YAC/B,iBAAiB,SAAS,OAAO,GAAG,IAAI;YACxC,mBAAmB,SAAS,KAAK,EAAE,GAAG,IAAI;;;;;;;;;;wBAuLlC,KAAK,EAAE;iCAME,IAAI,KAAK,KAAK;;wBAPvB,kBAAkB,IAAI,CAAC;;wBAIE,IAAI;;;;;;;2BAI1B,MAAM;;wBAOP,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;eAClD,GAAG;;+BA1LU;gBAAC,MAAM,EAAE,IAAI,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAA;aAAC,KAAK,IAAI;;+BAA1C;gBAAC,MAAM,EAAE,IAAI,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAA;aAAC,KAAK,IAAI;;;gBAdxD,UAAU,SAAS,KAAK,GAAG,IAAI;gBAC/B,iBAAiB,SAAS,OAAO,GAAG,IAAI;gBACxC,mBAAmB,SAAS,KAAK,EAAE,GAAG,IAAI;;;;AAvBhD,wBAkO2E"}
@@ -17,14 +17,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
17
  loading: { type: Boolean },
18
18
  optionComponent: {},
19
19
  disableClear: { type: Boolean },
20
- previewData: {}
20
+ previewData: {},
21
+ valueGetter: { type: Function },
22
+ valueQueryKey: {}
21
23
  },
22
24
  emits: ["unselect", "update:fetching", "update:modelValue"],
23
25
  setup(__props, { emit: __emit }) {
24
26
  const props = __props;
25
27
  const emit = __emit;
26
28
  const hasFetching = ref(false);
27
- const idInString = computed(() => props.modelValue.slice(0, PAGE_LENGTH).join(","));
29
+ const valueInString = computed(() => props.modelValue.slice(0, PAGE_LENGTH).join(","));
28
30
  watch(hasFetching, (value) => {
29
31
  emit("update:fetching", value);
30
32
  }, { immediate: true });
@@ -32,15 +34,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
34
  emit("update:fetching", false);
33
35
  });
34
36
  return (_ctx, _cache) => {
35
- return idInString.value.length !== 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
37
+ return valueInString.value.length !== 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
36
38
  createVNode(_sfc_main$1, {
37
39
  "use-query-fn": _ctx.useQueryFn,
38
- "query-params": { page: 1, id__in: idInString.value },
40
+ "query-params": { page: 1, [_ctx.valueQueryKey]: valueInString.value },
39
41
  "option-component": _ctx.optionComponent,
40
42
  "disable-clear": _ctx.disableClear,
41
43
  loading: _ctx.loading,
42
44
  disabled: _ctx.disabled,
43
45
  "preview-data": _ctx.previewData,
46
+ "value-getter": _ctx.valueGetter,
44
47
  onUnselect: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("unselect", $event)),
45
48
  "onUpdate:fetching": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:fetching", $event))
46
49
  }, {
@@ -51,7 +54,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
51
54
  })
52
55
  ]),
53
56
  _: 3
54
- }, 8, ["use-query-fn", "query-params", "option-component", "disable-clear", "loading", "disabled", "preview-data"]),
57
+ }, 8, ["use-query-fn", "query-params", "option-component", "disable-clear", "loading", "disabled", "preview-data", "value-getter"]),
55
58
  _ctx.modelValue.length > PAGE_LENGTH ? (openBlock(), createElementBlock("div", _hoisted_1, [
56
59
  createElementVNode("div", null, "... " + toDisplayString(unref(numberFormatter).format(_ctx.modelValue.length)) + " items", 1),
57
60
  !_ctx.disableClear && !_ctx.disabled ? (openBlock(), createElementBlock("button", {