eco-vue-js 0.8.4 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,10 +18,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  useQueryFnOptions: {},
19
19
  valueGetter: { type: Function },
20
20
  searchFn: { type: Function },
21
+ useQueryFnDefault: {},
21
22
  emptyStub: {},
22
23
  disableClear: { type: Boolean },
23
24
  hidePrefix: { type: Boolean },
24
- allowCreate: { type: Boolean },
25
+ createOption: { type: Function },
25
26
  hideOptionIcon: { type: Boolean },
26
27
  mobileTitle: {},
27
28
  persist: { type: Boolean },
@@ -20,9 +20,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  useQueryFnOptions: {},
21
21
  valueGetter: { type: Function },
22
22
  searchFn: { type: Function },
23
+ useQueryFnDefault: {},
23
24
  emptyStub: {},
24
25
  hidePrefix: { type: Boolean },
25
- allowCreate: { type: Boolean },
26
+ createOption: { type: Function },
26
27
  hideOptionIcon: { type: Boolean },
27
28
  mobileTitle: {},
28
29
  persist: { type: Boolean },
@@ -5,14 +5,12 @@ declare const _default: <Model extends number | string, Data extends DefaultData
5
5
  readonly onBlur?: ((value: FocusEvent) => any) | undefined;
6
6
  readonly onFocus?: ((value: FocusEvent) => any) | undefined;
7
7
  readonly onUnselect?: ((item: Model) => any) | undefined;
8
- readonly "onCreate:option"?: ((value: string) => any) | undefined;
9
8
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{
10
9
  onSelect?: ((item: Model) => any) | undefined;
11
10
  onBlur?: ((value: FocusEvent) => any) | undefined;
12
11
  onFocus?: ((value: FocusEvent) => any) | undefined;
13
12
  onUnselect?: ((item: Model) => any) | undefined;
14
- "onCreate:option"?: ((value: string) => any) | undefined;
15
- }>, never>, "onFocus" | "onBlur" | "onSelect" | "onUnselect" | "onCreate:option"> & SelectProps<Model, Data, OptionComponent>> & import('vue').PublicProps;
13
+ }>, never>, "onFocus" | "onBlur" | "onSelect" | "onUnselect"> & SelectProps<Model, Data, OptionComponent>> & import('vue').PublicProps;
16
14
  expose(exposed: import('vue').ShallowUnwrapRef<{
17
15
  focus: () => void;
18
16
  blur: () => void;
@@ -43,7 +41,6 @@ declare const _default: <Model extends number | string, Data extends DefaultData
43
41
  emit: {
44
42
  (e: "select", item: Model): void;
45
43
  (e: "unselect", item: Model): void;
46
- (e: "create:option", value: string): void;
47
44
  (e: "focus", value: FocusEvent): void;
48
45
  (e: "blur", value: FocusEvent): void;
49
46
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelect.vue"],"names":[],"mappings":"AAuVA,OAAO,KAAK,EAAC,WAAW,EAAE,qBAAqB,EAA6B,MAAM,SAAS,CAAA;yBAG1E,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,eAC/G,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAkmBxD,mBAAmB,CAAC;;;;;;;;;;;;iIAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;;;2BAzcvB,MAAM,KAAG,IAAI;MAycgC,GAAG,IAAI;WACpE,GAAG;;gBApbH,MAAM,IAAI;mBACP,MAAM,IAAI;iBACZ,CAAC,KAAK,EAAE;YACf,MAAM,EAAE,IAAI,GAAG,MAAM,CAAA;YACrB,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,QAAQ,EAAE,OAAO,CAAA;YACjB,KAAK,EAAE,OAAO,CAAA;SAC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,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;;;2BAhdvB,MAAM,KAAG,IAAI;MAgdgC,GAAG,IAAI;WACpE,GAAG;;gBAnbH,MAAM,IAAI;mBACP,MAAM,IAAI;iBACZ,CAAC,KAAK,EAAE;YACf,MAAM,EAAE,IAAI,GAAG,MAAM,CAAA;YACrB,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,QAAQ,EAAE,OAAO,CAAA;YACjB,KAAK,EAAE,OAAO,CAAA;SACf,KAAK,IAAI;gBACF,MAAM,IAAI;;gBARV,MAAM,IAAI;mBACP,MAAM,IAAI;iBACZ,CAAC,KAAK,EAAE;YACf,MAAM,EAAE,IAAI,GAAG,MAAM,CAAA;YACrB,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,QAAQ,EAAE,OAAO,CAAA;YACjB,KAAK,EAAE,OAAO,CAAA;SACf,KAAK,IAAI;gBACF,MAAM,IAAI;;;YA9Ld,QAAQ,QAAQ,KAAK,GAAG,IAAI;YAC5B,UAAU,QAAQ,KAAK,GAAG,IAAI;YAC9B,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,MAAM,SAAS,UAAU,GAAG,IAAI;;;;;YA2mBM,OAAO,CAAC,OAAO,WAAW,CAAC;;AA1nBvE,wBA0nB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -18,10 +18,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  useQueryFnOptions: {},
19
19
  valueGetter: { type: Function },
20
20
  searchFn: { type: Function },
21
+ useQueryFnDefault: {},
21
22
  emptyStub: {},
22
23
  disableClear: { type: Boolean },
23
24
  hidePrefix: { type: Boolean },
24
- allowCreate: { type: Boolean },
25
+ createOption: { type: Function },
25
26
  hideOptionIcon: { type: Boolean },
26
27
  mobileTitle: {},
27
28
  persist: { type: Boolean },
@@ -62,7 +63,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
62
63
  optionComponent: {},
63
64
  optionComponentProps: {}
64
65
  },
65
- emits: ["select", "unselect", "create:option", "focus", "blur"],
66
+ emits: ["select", "unselect", "focus", "blur"],
66
67
  setup(__props, { expose: __expose, emit: __emit }) {
67
68
  const props = __props;
68
69
  const emit = __emit;
@@ -71,14 +72,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
71
72
  const cursor = ref(-1);
72
73
  const isCursorLocked = ref(false);
73
74
  const search = ref("");
74
- const { data, isLoading } = props.useQueryFnOptions({
75
- enabled: computed(() => !props.disabled)
76
- });
77
- const filteredOptions = computed(() => !data.value ? [] : search.value === "" ? data.value : data.value.filter((option) => props.searchFn(option, search.value)));
78
- const lastIndex = computed(() => props.allowCreate ? filteredOptions.value.length : filteredOptions.value.length - 1);
75
+ const searchPrepared = computed(() => search.value.trim().toLocaleLowerCase());
76
+ const enabled = computed(() => !props.disabled);
77
+ const { data, isLoading } = props.useQueryFnOptions({ enabled });
78
+ const filteredOptions = computed(() => !data.value ? [] : searchPrepared.value === "" ? data.value : data.value.filter((option) => props.searchFn(option, searchPrepared.value)));
79
+ const lastIndex = computed(() => props.createOption ? filteredOptions.value.length : filteredOptions.value.length - 1);
79
80
  const isMobile = getIsMobile();
80
81
  const focused = ref(false);
81
82
  const loadingOptionIndex = ref(null);
83
+ const loadingCreate = ref(false);
82
84
  const isDisabled = computed(() => props.loading || props.readonly || props.disabled);
83
85
  const prefixList = computed(() => props.modelValue.map((value) => data.value?.find((item) => props.valueGetter(item) === value)).filter((item) => item !== void 0));
84
86
  const close = () => {
@@ -144,12 +146,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
144
146
  emit("unselect", item);
145
147
  search.value = "";
146
148
  };
147
- const createOption = (item) => {
149
+ const createOption = async (value) => {
148
150
  if (isDisabled.value) return;
149
- if (!props.allowCreate) return;
150
- setLoadingOptionIndex(filteredOptions.value.length);
151
- emit("create:option", item);
152
- search.value = "";
151
+ if (!props.createOption) return;
152
+ loadingCreate.value = true;
153
+ const option = await props.createOption(value);
154
+ if (option) {
155
+ setLoadingOptionIndex(filteredOptions.value.length);
156
+ select(props.valueGetter(option));
157
+ search.value = "";
158
+ }
159
+ loadingCreate.value = false;
153
160
  };
154
161
  const focus = () => {
155
162
  input.value?.focus();
@@ -160,6 +167,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
160
167
  const setSearch = (value) => {
161
168
  search.value = value;
162
169
  };
170
+ if (props.useQueryFnDefault) {
171
+ const { data: defaultData } = props.useQueryFnDefault({ enabled });
172
+ watch(defaultData, (value) => {
173
+ if (value && props.modelValue.length === 0) select(props.valueGetter(value));
174
+ }, { immediate: true });
175
+ }
163
176
  watch(toRef(props, "modelValue"), async () => {
164
177
  await nextTick();
165
178
  input.value?.updateDropdown();
@@ -177,7 +190,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
177
190
  ...props,
178
191
  modelValue: search.value,
179
192
  hideInput: _ctx.modelValue.length === 0 ? false : unref(isMobile) ? !focused.value : !isOpen.value,
180
- loading: _ctx.loading || unref(isLoading)
193
+ loading: _ctx.loading || unref(isLoading) || loadingCreate.value
181
194
  }, {
182
195
  class: _ctx.$attrs.class,
183
196
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => !_ctx.loading && !unref(isLoading) && (search.value = $event ?? "")),
@@ -263,11 +276,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
263
276
  _: 2
264
277
  }, 1032, ["is-selected", "is-cursor", "loading", "scroll", "hide-option-icon", "onSelect", "onUnselect", "onMouseenter"]);
265
278
  }), 128)),
266
- _ctx.allowCreate && search.value !== "" ? (openBlock(), createBlock(_sfc_main$3, {
279
+ createOption && search.value !== "" ? (openBlock(), createBlock(_sfc_main$3, {
267
280
  key: 1,
268
281
  "is-selected": false,
269
282
  "is-cursor": cursor.value === filteredOptions.value.length,
270
- loading: loadingOptionIndex.value === filteredOptions.value.length && _ctx.loading,
283
+ loading: (loadingCreate.value || loadingOptionIndex.value === filteredOptions.value.length) && _ctx.loading,
271
284
  scroll: isCursorLocked.value,
272
285
  "hide-option-icon": _ctx.hideOptionIcon,
273
286
  class: "first:pt-4 last:pb-4",
@@ -4,13 +4,11 @@ declare const _default: <Model extends number | string, Data extends DefaultData
4
4
  readonly onSelect?: ((item: Model) => any) | undefined;
5
5
  readonly "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
6
6
  readonly onUnselect?: ((item: Model) => any) | undefined;
7
- readonly "onCreate:option"?: ((value: string) => any) | undefined;
8
7
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{
9
8
  onSelect?: ((item: Model) => any) | undefined;
10
9
  "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
11
10
  onUnselect?: ((item: Model) => any) | undefined;
12
- "onCreate:option"?: ((value: string) => any) | undefined;
13
- }>, never>, "onSelect" | "onUpdate:modelValue" | "onUnselect" | "onCreate:option"> & SelectAsyncProps<Model, Data, QueryParams, OptionComponent>> & import('vue').PublicProps;
11
+ }>, never>, "onSelect" | "onUpdate:modelValue" | "onUnselect"> & SelectAsyncProps<Model, Data, QueryParams, OptionComponent>> & import('vue').PublicProps;
14
12
  expose(exposed: import('vue').ShallowUnwrapRef<{
15
13
  focus: () => void;
16
14
  blur: () => void;
@@ -43,7 +41,6 @@ declare const _default: <Model extends number | string, Data extends DefaultData
43
41
  (e: "select", item: Model): void;
44
42
  (e: "unselect", item: Model): void;
45
43
  (e: "update:modelValue", value: Model[]): void;
46
- (e: "create:option", value: string): void;
47
44
  };
48
45
  }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
49
46
  [key: string]: any;
@@ -1 +1 @@
1
- {"version":3,"file":"WSelectAsync.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectAsync.vue"],"names":[],"mappings":"AAgPA,OAAO,KAAK,EAAC,gBAAgB,EAAE,qBA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QAAQ,EAAE,OAAO,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;gBAH7G,MAAM,IAAI;mBACP,MAAM,IAAI;gBACb,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;iBACrC,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;;YAnHjH,QAAQ,QAAQ,KAAK,GAAG,IAAI;YAC5B,UAAU,QAAQ,KAAK,GAAG,IAAI;YAC9B,mBAAmB,SAAS,KAAK,EAAE,GAAG,IAAI;;;;;YAogBJ,OAAO,CAAC,OAAO,WAAW,CAAC;;AAzhBvE,wBAyhB4E;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, computed, openBlock, createBlock, mergeProps, unref, withModifiers, createSlots, withCtx, renderSlot, createCommentVNode, createVNode, resolveDynamicComponent, nextTick } from 'vue';
1
+ import { defineComponent, ref, computed, watch, openBlock, createBlock, mergeProps, unref, withModifiers, createSlots, withCtx, renderSlot, createCommentVNode, createVNode, resolveDynamicComponent, nextTick } from 'vue';
2
2
  import { getIsMobile } from '../../utils/mobile.js';
3
3
  import _sfc_main$1 from '../Input/WInputSuggest.vue.js';
4
4
  import _sfc_main$2 from './components/SelectAsyncPrefix.vue.js';
@@ -18,10 +18,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  valueQueryKey: { default: "id__in" },
19
19
  modelValue: {},
20
20
  valueGetter: { type: Function, default: (data) => data.id },
21
+ useQueryFnDefault: {},
21
22
  emptyStub: { default: "No match" },
22
23
  disableClear: { type: Boolean },
23
24
  hidePrefix: { type: Boolean },
24
- allowCreate: { type: Boolean },
25
+ createOption: {},
25
26
  hideOptionIcon: { type: Boolean },
26
27
  mobileTitle: {},
27
28
  persist: { type: Boolean },
@@ -62,7 +63,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
62
63
  optionComponent: {},
63
64
  optionComponentProps: {}
64
65
  },
65
- emits: ["select", "unselect", "update:modelValue", "create:option"],
66
+ emits: ["select", "unselect", "update:modelValue"],
66
67
  setup(__props, { expose: __expose, emit: __emit }) {
67
68
  const props = __props;
68
69
  const emit = __emit;
@@ -73,7 +74,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
73
74
  const focused = ref(false);
74
75
  const isFetchingPrefix = ref(false);
75
76
  const search = ref("");
77
+ const loadingCreate = ref(false);
76
78
  const isDisabled = computed(() => props.loading || props.readonly || props.disabled);
79
+ const enabled = computed(() => !props.disabled);
77
80
  const close = () => {
78
81
  isOpen.value = false;
79
82
  focused.value = false;
@@ -101,10 +104,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
101
104
  emit("unselect", item);
102
105
  search.value = "";
103
106
  };
104
- const create = () => {
107
+ const create = async () => {
105
108
  if (isDisabled.value) return;
106
- emit("create:option", search.value);
107
- search.value = "";
109
+ if (!props.createOption) return;
110
+ loadingCreate.value = true;
111
+ const option = await props.createOption(search.value);
112
+ if (option) {
113
+ select(props.valueGetter(option));
114
+ search.value = "";
115
+ }
116
+ loadingCreate.value = false;
108
117
  };
109
118
  const updateSelected = (value) => {
110
119
  if (isDisabled.value) return;
@@ -121,6 +130,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
121
130
  await nextTick();
122
131
  input.value?.updateDropdown();
123
132
  };
133
+ if (props.useQueryFnDefault) {
134
+ const { data: defaultData } = props.useQueryFnDefault({ enabled });
135
+ watch(defaultData, (value) => {
136
+ if (value && props.modelValue.length === 0) select(props.valueGetter(value));
137
+ }, { immediate: true });
138
+ }
124
139
  __expose({
125
140
  focus,
126
141
  blur
@@ -132,7 +147,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
132
147
  }, {
133
148
  ...props,
134
149
  modelValue: search.value,
135
- loading: _ctx.loading || isFetchingPrefix.value,
150
+ loading: _ctx.loading || isFetchingPrefix.value || loadingCreate.value,
136
151
  hideInput: unref(isMobile) ? !focused.value : !isOpen.value
137
152
  }, {
138
153
  class: _ctx.$attrs.class,
@@ -193,9 +208,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
193
208
  loading: _ctx.loading || isFetchingPrefix.value,
194
209
  disabled: isDisabled.value,
195
210
  "empty-stub": _ctx.emptyStub,
196
- "allow-create": _ctx.allowCreate && search.value !== "",
211
+ "allow-create": _ctx.createOption && search.value !== "",
197
212
  "hide-option-icon": _ctx.hideOptionIcon,
198
213
  "value-getter": _ctx.valueGetter,
214
+ "loading-create": loadingCreate.value,
199
215
  onSelect: select,
200
216
  onUnselect: unselect,
201
217
  "onCreate:option": create,
@@ -218,7 +234,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
218
234
  ])
219
235
  ]),
220
236
  _: 3
221
- }, 8, ["model-value", "use-query-fn", "query-params", "is-invalid-page", "loading", "disabled", "empty-stub", "allow-create", "hide-option-icon", "value-getter"])
237
+ }, 8, ["model-value", "use-query-fn", "query-params", "is-invalid-page", "loading", "disabled", "empty-stub", "allow-create", "hide-option-icon", "value-getter", "loading-create"])
222
238
  ]),
223
239
  _: 2
224
240
  }, [
@@ -2,11 +2,9 @@ import { SelectAsyncSingleProps, SelectOptionComponent } from './types';
2
2
  declare const _default: <Model extends number | string, Data extends DefaultData, QueryParams, OptionComponent extends SelectOptionComponent<Data>, AllowClear extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
3
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
4
  readonly "onUpdate:modelValue"?: ((value: AllowClear extends true ? Model | null : Model) => any) | undefined;
5
- readonly "onCreate:option"?: ((value: string) => any) | undefined;
6
5
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{
7
6
  "onUpdate:modelValue"?: ((value: AllowClear extends true ? Model | null : Model) => any) | undefined;
8
- "onCreate:option"?: ((value: string) => any) | undefined;
9
- }>, never>, "onUpdate:modelValue" | "onCreate:option"> & SelectAsyncSingleProps<Model, Data, QueryParams, OptionComponent, AllowClear>> & import('vue').PublicProps;
7
+ }>, never>, "onUpdate:modelValue"> & SelectAsyncSingleProps<Model, Data, QueryParams, OptionComponent, AllowClear>> & import('vue').PublicProps;
10
8
  expose(exposed: import('vue').ShallowUnwrapRef<{
11
9
  blur: () => void;
12
10
  }>): void;
@@ -21,10 +19,7 @@ declare const _default: <Model extends number | string, Data extends DefaultData
21
19
  }): any;
22
20
  right?(_: {}): any;
23
21
  };
24
- emit: {
25
- (e: "update:modelValue", value: AllowClear extends true ? Model | null : Model): void;
26
- (e: "create:option", value: string): void;
27
- };
22
+ emit: (e: "update:modelValue", value: AllowClear extends true ? Model | null : Model) => void;
28
23
  }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
29
24
  [key: string]: any;
30
25
  }> & {
@@ -1 +1 @@
1
- {"version":3,"file":"WSelectAsyncSingle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectAsyncSingle.vue"],"names":[],"mappings":"AA2FA,OAAO,KAAK,EAAC,sBAAsB,EAAE,qBAAqB,EAAC,MAAM,SAAS,CAAA;yBAGzD,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS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,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAsLxD,mBAAmB,CAAC;;;;sHAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;;MAAsB,GAAG,IAAI;WACpE,GAAG;;uBAlCc,GAAG;0BACC,GAAG;;;;;YACL,GAAG;uBACJ,GAAG;;cA9IzB,mBAAmB,4DAAoB,IAAI;;;;YAkLL,OAAO,CAAC,OAAO,WAAW,CAAC;;AAhMvE,wBAgM4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -17,9 +17,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
17
  searchField: {},
18
18
  valueQueryKey: {},
19
19
  valueGetter: { type: Function },
20
+ useQueryFnDefault: {},
20
21
  emptyStub: {},
21
22
  hidePrefix: { type: Boolean },
22
- allowCreate: { type: Boolean },
23
+ createOption: { type: Function },
23
24
  hideOptionIcon: { type: Boolean },
24
25
  mobileTitle: {},
25
26
  persist: { type: Boolean },
@@ -60,7 +61,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
61
  optionComponent: {},
61
62
  optionComponentProps: {}
62
63
  },
63
- emits: ["update:modelValue", "create:option"],
64
+ emits: ["update:modelValue"],
64
65
  setup(__props, { expose: __expose, emit: __emit }) {
65
66
  const props = __props;
66
67
  const emit = __emit;
@@ -69,9 +70,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
69
70
  const updateModelValue = (value) => {
70
71
  emit("update:modelValue", value);
71
72
  };
72
- const createOption = (value) => {
73
- emit("create:option", value);
74
- };
75
73
  const blur = () => {
76
74
  selectComponent.value?.blur();
77
75
  };
@@ -93,8 +91,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
93
91
  }, {
94
92
  class: _ctx.$attrs.class,
95
93
  onSelect: _cache[0] || (_cache[0] = ($event) => updateModelValue($event)),
96
- onUnselect: _cache[1] || (_cache[1] = ($event) => _ctx.allowClear && updateModelValue(null)),
97
- "onCreate:option": _cache[2] || (_cache[2] = ($event) => createOption($event))
94
+ onUnselect: _cache[1] || (_cache[1] = ($event) => _ctx.allowClear && updateModelValue(null))
98
95
  }), createSlots({
99
96
  option: withCtx(({ option, selected, model }) => [
100
97
  renderSlot(_ctx.$slots, "option", {
@@ -2,11 +2,9 @@ import { SelectSingleProps, SelectOptionComponent } from './types';
2
2
  declare const _default: <Model extends number | string, Data extends DefaultData, OptionComponent extends SelectOptionComponent<Data>, AllowClear extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
3
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
4
  readonly "onUpdate:modelValue"?: ((value: AllowClear extends true ? Model | null : Model) => any) | undefined;
5
- readonly "onCreate:option"?: ((value: string) => any) | undefined;
6
5
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{
7
6
  "onUpdate:modelValue"?: ((value: AllowClear extends true ? Model | null : Model) => any) | undefined;
8
- "onCreate:option"?: ((value: string) => any) | undefined;
9
- }>, never>, "onUpdate:modelValue" | "onCreate:option"> & SelectSingleProps<Model, Data, OptionComponent, AllowClear>> & import('vue').PublicProps;
7
+ }>, never>, "onUpdate:modelValue"> & SelectSingleProps<Model, Data, OptionComponent, AllowClear>> & import('vue').PublicProps;
10
8
  expose(exposed: import('vue').ShallowUnwrapRef<{
11
9
  blur: () => void;
12
10
  }>): void;
@@ -21,10 +19,7 @@ declare const _default: <Model extends number | string, Data extends DefaultData
21
19
  }): any;
22
20
  right?(_: {}): any;
23
21
  };
24
- emit: {
25
- (e: "update:modelValue", value: AllowClear extends true ? Model | null : Model): void;
26
- (e: "create:option", value: string): void;
27
- };
22
+ emit: (e: "update:modelValue", value: AllowClear extends true ? Model | null : Model) => void;
28
23
  }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
29
24
  [key: string]: any;
30
25
  }> & {
@@ -1 +1 @@
1
- {"version":3,"file":"WSelectSingle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectSingle.vue"],"names":[],"mappings":"AA4FA,OAAO,KAAK,EAAC,iBAAiB,EAAE,qBAAqB,EAAC,MAAM,SAAS,CAAA;yBAGpD,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EAAE,UAAU,SAAS,OAAO,uBAC3I,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAsNxD,mBAAmB,CAAC;;;;;;wHAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;;MAAsB,GAAG,IAAI;WACpE,GAAG;;uBApCe,GAAG;0BACA,GAAG;;;;;YACL,GAAG;uBACJ,GAAG;;;YA5KzB,mBAAmB,0DAAoB,IAAI;YAC3C,eAAe,SAAS,MAAM,GAAG,IAAI;;;;;YAiNC,OAAO,CAAC,OAAO,WAAW,CAAC;;AAhOvE,wBAgO4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"WSelectSingle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectSingle.vue"],"names":[],"mappings":"AAsFA,OAAO,KAAK,EAAC,iBAAiB,EAAE,qBAAqB,EAAC,MAAM,SAAS,CAAA;yBAGpD,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EAAE,UAAU,SAAS,OAAO,uBAC3I,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAiMxD,mBAAmB,CAAC;;;;oGAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;;MAAsB,GAAG,IAAI;WACpE,GAAG;;uBAlCe,GAAG;0BACA,GAAG;;;;;YACL,GAAG;uBACJ,GAAG;;cAzJzB,mBAAmB,4DAAoB,IAAI;;;;YA6LL,OAAO,CAAC,OAAO,WAAW,CAAC;;AA3MvE,wBA2M4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -11,9 +11,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  useQueryFnOptions: {},
12
12
  valueGetter: { type: Function },
13
13
  searchFn: { type: Function },
14
+ useQueryFnDefault: {},
14
15
  emptyStub: {},
15
16
  hidePrefix: { type: Boolean },
16
- allowCreate: { type: Boolean },
17
+ createOption: { type: Function },
17
18
  hideOptionIcon: { type: Boolean },
18
19
  mobileTitle: {},
19
20
  persist: { type: Boolean },
@@ -54,7 +55,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54
55
  optionComponent: {},
55
56
  optionComponentProps: {}
56
57
  },
57
- emits: ["update:modelValue", "create:option"],
58
+ emits: ["update:modelValue"],
58
59
  setup(__props, { expose: __expose, emit: __emit }) {
59
60
  const props = __props;
60
61
  const emit = __emit;
@@ -64,9 +65,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
65
  emit("update:modelValue", value);
65
66
  blur();
66
67
  };
67
- const createOption = (value) => {
68
- emit("create:option", value);
69
- };
70
68
  const blur = () => {
71
69
  selectComponent.value?.blur();
72
70
  };
@@ -87,8 +85,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
87
85
  class: _ctx.$attrs.class,
88
86
  onSelect: _cache[0] || (_cache[0] = ($event) => updateModelValue($event)),
89
87
  onUnselect: _cache[1] || (_cache[1] = ($event) => updateModelValue(_ctx.allowClear ? null : $event)),
90
- "onCreate:option": _cache[2] || (_cache[2] = ($event) => createOption($event)),
91
- onFocus: _cache[3] || (_cache[3] = ($event) => _ctx.searchModel && typeof _ctx.modelValue === "string" ? selectComponent.value?.setSearch(_ctx.modelValue) : void 0)
88
+ onFocus: _cache[2] || (_cache[2] = ($event) => _ctx.searchModel && typeof _ctx.modelValue === "string" ? selectComponent.value?.setSearch(_ctx.modelValue) : void 0)
92
89
  }), createSlots({
93
90
  option: withCtx(({ option, selected, model }) => [
94
91
  renderSlot(_ctx.$slots, "option", {
@@ -29,6 +29,7 @@ declare const _default: <Model extends number | string, Data extends DefaultData
29
29
  hideOptionIcon?: boolean;
30
30
  valueGetter: (data: Data) => Model;
31
31
  queryOptions?: Partial<Parameters<UseQueryPaginated<Data, QueryParams>>[1]>;
32
+ loadingCreate?: boolean;
32
33
  }> & import('vue').PublicProps;
33
34
  expose(exposed: import('vue').ShallowUnwrapRef<{
34
35
  cursorUp: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectAsyncList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/components/SelectAsyncList.vue"],"names":[],"mappings":"yBAwNiB,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,eACvE,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA6fxD,mBAAmB,CAAC;;;;;;;;;;;;;oBAzfhB,KAAK,EAAE;oBACP,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC;qBACnC,WAAW;uBACT,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO;2BACvB,OAAO,GAAG,IAAI;kBACvB,OAAO;mBACN,OAAO;qBACL,OAAO;wBACJ,CAAC,MAAM,WAAW,CAAC,EAAE;oBACzB,OAAO;oBACP,MAAM;qBACL,OAAO;uBACL,OAAO;sBACR,OAAO;yBACJ,OAAO;qBACX,CAAC,IAAI,EAAE,IAAI,KAAK,KAAK;uBACnB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAyeU,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;;;;MAAsB,GAAG,IAAI;WACpE,GAAG;;kBAjZD,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;kBAA5E,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,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AAO;sBACR,OAAO;yBACJ,OAAO;qBACX,CAAC,IAAI,EAAE,IAAI,KAAK,KAAK;uBACnB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;wBAC3D,OAAO;KAye8D,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;;;;MAAsB,GAAG,IAAI;WACpE,GAAG;;kBAjZD,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;kBAA5E,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;;YArFlF,QAAQ,SAAS,KAAK,GAAG,IAAI;YAC7B,UAAU,SAAS,KAAK,GAAG,IAAI;YAC/B,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,mBAAmB,SAAS,KAAK,EAAE,GAAG,IAAI;YAC1C,eAAe,GAAG,IAAI;;;;;YAuegB,OAAO,CAAC,OAAO,WAAW,CAAC;;AAxgBvE,wBAwgB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -22,7 +22,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
22
  allowCreate: { type: Boolean },
23
23
  hideOptionIcon: { type: Boolean },
24
24
  valueGetter: { type: Function },
25
- queryOptions: {}
25
+ queryOptions: {},
26
+ loadingCreate: { type: Boolean }
26
27
  },
27
28
  emits: ["select", "unselect", "update:count", "update:modelValue", "create:option"],
28
29
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -158,7 +159,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
158
159
  key: 0,
159
160
  "is-selected": false,
160
161
  "is-cursor": cursor.value === null,
161
- loading: _ctx.loading && loadingOption.value === null,
162
+ loading: _ctx.loading && (_ctx.loadingCreate || loadingOption.value === null),
162
163
  scroll: isCursorLocked.value,
163
164
  previous: lastItem.value,
164
165
  next: firstItem.value,
@@ -16,10 +16,11 @@ export interface SelectProps<Model extends number | string, Data extends Default
16
16
  useQueryFnOptions: UseQueryEmpty<Data[]>;
17
17
  valueGetter: (value: Data) => Model;
18
18
  searchFn: (option: Data, search: string) => boolean;
19
+ useQueryFnDefault?: UseQueryEmpty<Data>;
19
20
  emptyStub?: string;
20
21
  disableClear?: boolean;
21
22
  hidePrefix?: boolean;
22
- allowCreate?: boolean;
23
+ createOption?: (search: string) => (Data | undefined) | Promise<Data | undefined>;
23
24
  hideOptionIcon?: boolean;
24
25
  }
25
26
  export interface SelectPrefixProps<Data extends DefaultData, OptionComponent extends SelectOptionComponent<Data>> extends SelectOptionComponentProps<Data, OptionComponent> {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Select/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,0BAA0B,CAAA;AAC/D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,KAAK,CAAA;AAElC,MAAM,MAAM,iBAAiB,CAAC,MAAM,IAAI;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAC,CAAA;AAE7G,MAAM,MAAM,qBAAqB,CAAC,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAA;AAEhF,MAAM,WAAW,0BAA0B,CAAC,MAAM,EAAE,eAAe,SAAS,qBAAqB,CAAC,MAAM,CAA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,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,IAAI,CAAA;IAClB,WAAW,CAAC,EAAE,IAAI,CAAA;CACnB"}
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.8.4",
7
+ "version": "0.8.6",
8
8
  "scripts": {
9
9
  "dev": "vite",
10
10
  "build": "run-p type-check build-only",