eco-vue-js 0.8.2 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. package/dist/components/Form/WForm.vue.d.ts +1 -1
  2. package/dist/components/Form/models/injection.d.ts +1 -1
  3. package/dist/components/Form/models/injection.d.ts.map +1 -1
  4. package/dist/components/Form/use/useFormInvalidateMap.d.ts +1 -1
  5. package/dist/components/Form/use/useFormInvalidateMap.d.ts.map +1 -1
  6. package/dist/components/FormAsync/WFormAsyncSelect.vue.d.ts +26 -0
  7. package/dist/components/FormAsync/WFormAsyncSelect.vue.d.ts.map +1 -0
  8. package/dist/components/FormAsync/WFormAsyncSelect.vue.js +143 -0
  9. package/dist/components/FormAsync/WFormAsyncSelect.vue2.js +5 -0
  10. package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.d.ts +2 -2
  11. package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.d.ts.map +1 -1
  12. package/dist/components/FormAsync/types.d.ts +34 -2
  13. package/dist/components/FormAsync/types.d.ts.map +1 -1
  14. package/dist/components/Modal/WModalStepper.vue.d.ts +2 -2
  15. package/dist/components/Select/WSelect.vue.d.ts +1 -0
  16. package/dist/components/Select/WSelect.vue.d.ts.map +1 -1
  17. package/dist/components/Select/WSelect.vue.js +8 -2
  18. package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -1
  19. package/dist/components/Select/WSelectAsync.vue.js +4 -5
  20. package/dist/components/Select/WSelectAsyncSingle.vue.js +2 -2
  21. package/dist/components/Select/WSelectSingle.vue.d.ts +1 -4
  22. package/dist/components/Select/WSelectSingle.vue.d.ts.map +1 -1
  23. package/dist/components/Select/WSelectSingle.vue.js +3 -5
  24. package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts.map +1 -1
  25. package/dist/components/Select/components/SelectAsyncPrefix.vue.js +1 -3
  26. package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts.map +1 -1
  27. package/dist/components/Select/components/SelectAsyncPrefixPage.vue.js +0 -2
  28. package/dist/components/Select/types.d.ts +2 -4
  29. package/dist/components/Select/types.d.ts.map +1 -1
  30. package/dist/components/Tabs/WTabs.vue.d.ts +1 -1
  31. package/dist/imports/componentsPlugin.d.ts +2 -1
  32. package/dist/imports/componentsPlugin.d.ts.map +1 -1
  33. package/dist/main.js +1 -0
  34. package/dist/types/global.d.ts +1 -1
  35. package/dist/utils/api.d.ts +9 -5
  36. package/dist/utils/api.d.ts.map +1 -1
  37. package/dist/utils/api.js +2 -2
  38. package/dist/utils/useDefaultQuery.d.ts +4 -1
  39. package/dist/utils/useDefaultQuery.d.ts.map +1 -1
  40. package/package.json +4 -1
@@ -13,7 +13,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
13
13
  isValid: import('vue').ComputedRef<boolean>;
14
14
  validate: (silent?: boolean, path?: import('./use/useFormValidateMap').ValidatePath) => string | undefined;
15
15
  invalidate: (payload: {
16
- [x: string]: string | string[];
16
+ [x: string]: string | string[] | undefined;
17
17
  }) => void;
18
18
  initModel: () => void;
19
19
  errorMessage: import('vue').ComputedRef<string>;
@@ -3,7 +3,7 @@ export declare const wFormTitleUpdater: InjectionKey<(key: string, value: string
3
3
  export declare const wFormErrorMessageUpdater: InjectionKey<(key: string, value: string | undefined) => void>;
4
4
  export declare const wFormHasChangesUpdater: InjectionKey<(key: string, value: boolean) => void>;
5
5
  export declare const wFormValidateUpdater: InjectionKey<(key: string, value: () => string | undefined) => void>;
6
- export declare const wFormInvalidateUpdater: InjectionKey<(key: string, value: (messages: Record<string, string | string[]>) => void) => void>;
6
+ export declare const wFormInvalidateUpdater: InjectionKey<(key: string, value: (messages: Record<string, string | string[] | undefined>) => void) => void>;
7
7
  export declare const wFormInitModelUpdater: InjectionKey<(key: string, value: () => void) => void>;
8
8
  export declare const wFormUnlistener: InjectionKey<(key: string) => void>;
9
9
  //# sourceMappingURL=injection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"injection.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/models/injection.ts"],"names":[],"mappings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KAAK,IAAI,CAAC,CAAA;AAE9H,eAAO,MAAM,wBAAwB,EAAyC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,CAAA;AAE5I,eAAO,MAAM,sBAAsB,EAAuC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC,CAAA;AAE7H,eAAO,MAAM,oBAAoB,EAAqC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,CAAA;AAE1I,eAAO,MAAM,sBAAsB,EAAqC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,KAAK,IAAI,KAAK,IAAI,CAAC,CAAA;AAErL,eAAO,MAAM,qBAAqB,EAAsC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC,CAAA;AAE9H,eAAO,MAAM,eAAe,EAAgC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { Ref } from 'vue';
2
- type InvalidatePayload = Record<string, string | string[]>;
2
+ type InvalidatePayload = Record<string, string | string[] | undefined>;
3
3
  export declare const useFormInvalidateMap: (name: Ref<string | undefined>) => {
4
4
  invalidateMapUnlistener: (key: string) => void;
5
5
  invalidate: (payload: InvalidatePayload) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useFormInvalidateMap.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/use/useFormInvalidateMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,GAAG,EAAC,MAAM,KAAK,CAAA;AAIjE,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAA;AAE1D,eAAO,MAAM,oBAAoB,SAAU,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC;mCAO1B,MAAM;0BAIf,iBAAiB,KAAG,IAAI;CAoBtD,CAAA"}
1
+ {"version":3,"file":"useFormInvalidateMap.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/use/useFormInvalidateMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,GAAG,EAAC,MAAM,KAAK,CAAA;AAIjE,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAA;AAEtE,eAAO,MAAM,oBAAoB,SAAU,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC;mCAO1B,MAAM;0BAIf,iBAAiB,KAAG,IAAI;CAoBtD,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { FormAsyncSelectProps } from './types';
2
+ import { SelectOptionComponent } from '../Select/types';
3
+ declare const _default: <Model, FieldType extends string | number, QueryParams, Data extends DefaultData, OptionComponent extends SelectOptionComponent<Data>>(__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
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
5
+ readonly onSuccess?: ((value: Model) => any) | undefined;
6
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{
7
+ onSuccess?: ((value: Model) => any) | undefined;
8
+ }>, never>, "onSuccess"> & FormAsyncSelectProps<Model, FieldType, QueryParams, Data, OptionComponent>> & import('vue').PublicProps;
9
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
10
+ attrs: any;
11
+ slots: {
12
+ title?(_: {}): any;
13
+ subtitle?(_: {}): any;
14
+ right?(_: {}): any;
15
+ };
16
+ emit: (e: "success", value: Model) => void;
17
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
18
+ [key: string]: any;
19
+ }> & {
20
+ __ctx?: Awaited<typeof __VLS_setup>;
21
+ };
22
+ export default _default;
23
+ type __VLS_PrettifyLocal<T> = {
24
+ [K in keyof T]: T[K];
25
+ } & {};
26
+ //# sourceMappingURL=WFormAsyncSelect.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WFormAsyncSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/FormAsync/WFormAsyncSelect.vue"],"names":[],"mappings":"AA+GA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;yBAQnD,KAAK,EAAE,SAAS,SAAS,MAAM,GAAG,MAAM,EAAE,WAAW,EAAE,IAAI,SAAS,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,eACvI,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;WA0MxD,mBAAmB,CAAC;;;;yGAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;uBAlCc,GAAG;0BACA,GAAG;uBACL,GAAG;;cAnKzB,SAAS,SAAS,KAAK,KAAG,IAAI;;;;YAwMQ,OAAO,CAAC,OAAO,WAAW,CAAC;;AApNvE,wBAoN4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -0,0 +1,143 @@
1
+ import { defineComponent, toRef, ref, computed, onBeforeUnmount, openBlock, createBlock, mergeProps, unref, createSlots, withCtx, renderSlot } from 'vue';
2
+ import _sfc_main$1 from '../Select/WSelect.vue.js';
3
+ import { get, set } from '../../utils/utils.js';
4
+ import { Notify } from '../../utils/Notify.js';
5
+ import { handleApiError } from '../../utils/api.js';
6
+ import { Modal } from '../../utils/Modal.js';
7
+
8
+ const _sfc_main = /* @__PURE__ */ defineComponent({
9
+ __name: "WFormAsyncSelect",
10
+ props: {
11
+ useQueryFn: {},
12
+ noParams: { type: Boolean },
13
+ queryParams: {},
14
+ queryEnabled: { type: Boolean },
15
+ field: {},
16
+ apiMethod: { type: Function },
17
+ confimGetter: { type: Function },
18
+ useQueryFnOptions: {},
19
+ valueGetter: { type: Function },
20
+ searchFn: { type: Function },
21
+ emptyStub: {},
22
+ disableClear: { type: Boolean },
23
+ hidePrefix: { type: Boolean },
24
+ allowCreate: { type: Boolean },
25
+ hideOptionIcon: { type: Boolean },
26
+ mobileTitle: {},
27
+ persist: { type: Boolean },
28
+ type: {},
29
+ textarea: { type: Boolean },
30
+ resize: { type: Boolean },
31
+ placeholder: {},
32
+ icon: {},
33
+ size: {},
34
+ maxLength: {},
35
+ name: {},
36
+ autocomplete: {},
37
+ autofocus: { type: Boolean },
38
+ readonly: { type: Boolean },
39
+ disabledActions: { type: Boolean },
40
+ loading: { type: Boolean },
41
+ spellcheck: { type: Boolean },
42
+ customBackspaceHandle: { type: Boolean },
43
+ textSecure: { type: Boolean },
44
+ placeholderSecure: { type: Boolean },
45
+ allowPaste: { type: Boolean },
46
+ title: {},
47
+ description: {},
48
+ errorMessage: {},
49
+ tooltipText: {},
50
+ mono: { type: Boolean },
51
+ hasChanges: { type: Boolean },
52
+ skeleton: { type: Boolean },
53
+ disabled: { type: Boolean },
54
+ required: { type: Boolean },
55
+ noMargin: { type: Boolean },
56
+ allowCopy: { type: Boolean },
57
+ teleport: { type: Boolean },
58
+ noZIndex: { type: Boolean },
59
+ maxHeight: {},
60
+ maxWidth: {},
61
+ horizontalAlign: {},
62
+ optionComponent: {},
63
+ optionComponentProps: {}
64
+ },
65
+ emits: ["success"],
66
+ setup(__props, { emit: __emit }) {
67
+ const props = __props;
68
+ const emit = __emit;
69
+ const { data, setData, isLoadingError } = props.noParams === true ? props.useQueryFn({ enabled: toRef(props, "queryEnabled") }) : props.useQueryFn(toRef(props, "queryParams"), { enabled: toRef(props, "queryEnabled") });
70
+ const submitting = ref(false);
71
+ const modelValue = computed(() => get(data.value ?? {}, props.field) ?? []);
72
+ const save = (value, isSelect) => {
73
+ if (submitting.value) return;
74
+ submitting.value = true;
75
+ return props.apiMethod(set(
76
+ {},
77
+ props.field,
78
+ isSelect ? [...modelValue.value, value] : modelValue.value.filter((item) => item !== value)
79
+ )).then((response) => {
80
+ setData(response.data);
81
+ Notify.success({ title: "Saved" });
82
+ emit("success", response.data);
83
+ }).catch((error) => handleApiError(error, void 0, props.field)).finally(() => {
84
+ submitting.value = false;
85
+ });
86
+ };
87
+ let closeModal = null;
88
+ const showModal = (value, isSelect) => {
89
+ closeModal?.();
90
+ const confirmProps = props.confimGetter?.(value, isSelect);
91
+ if (!confirmProps) {
92
+ save(value, isSelect);
93
+ return;
94
+ }
95
+ closeModal = Modal.addConfirm({
96
+ ...confirmProps,
97
+ onAccept: () => {
98
+ return save(value, isSelect);
99
+ }
100
+ }, () => closeModal = null);
101
+ };
102
+ onBeforeUnmount(() => {
103
+ closeModal?.();
104
+ closeModal = null;
105
+ });
106
+ return (_ctx, _cache) => {
107
+ return openBlock(), createBlock(_sfc_main$1, mergeProps({
108
+ ...props,
109
+ modelValue: modelValue.value,
110
+ skeleton: _ctx.skeleton || !unref(data),
111
+ disabled: _ctx.disabled || unref(isLoadingError),
112
+ loading: _ctx.loading || submitting.value
113
+ }, {
114
+ onSelect: _cache[0] || (_cache[0] = ($event) => showModal($event, true)),
115
+ onUnselect: _cache[1] || (_cache[1] = ($event) => showModal($event, false))
116
+ }), createSlots({ _: 2 }, [
117
+ _ctx.$slots.title ? {
118
+ name: "title",
119
+ fn: withCtx(() => [
120
+ renderSlot(_ctx.$slots, "title")
121
+ ]),
122
+ key: "0"
123
+ } : void 0,
124
+ _ctx.$slots.subtitle ? {
125
+ name: "subtitle",
126
+ fn: withCtx(() => [
127
+ renderSlot(_ctx.$slots, "subtitle")
128
+ ]),
129
+ key: "1"
130
+ } : void 0,
131
+ _ctx.$slots.right ? {
132
+ name: "right",
133
+ fn: withCtx(() => [
134
+ renderSlot(_ctx.$slots, "right")
135
+ ]),
136
+ key: "2"
137
+ } : void 0
138
+ ]), 1040);
139
+ };
140
+ }
141
+ });
142
+
143
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './WFormAsyncSelect.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -1,11 +1,11 @@
1
- import { FormAsyncSelectProps } from './types';
1
+ import { FormAsyncSelectSingleProps } from './types';
2
2
  import { SelectOptionComponent } from '../Select/types';
3
3
  declare const _default: <Model, FieldType extends string | number, QueryParams, 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<{
4
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
5
5
  readonly onSuccess?: ((value: Model) => any) | undefined;
6
6
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{
7
7
  onSuccess?: ((value: Model) => any) | undefined;
8
- }>, never>, "onSuccess"> & FormAsyncSelectProps<Model, FieldType, QueryParams, Data, OptionComponent, AllowClear>> & import('vue').PublicProps;
8
+ }>, never>, "onSuccess"> & FormAsyncSelectSingleProps<Model, FieldType, QueryParams, Data, OptionComponent, AllowClear>> & import('vue').PublicProps;
9
9
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
10
10
  attrs: any;
11
11
  slots: {
@@ -1 +1 @@
1
- {"version":3,"file":"WFormAsyncSelectSingle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/FormAsync/WFormAsyncSelectSingle.vue"],"names":[],"mappings":"AA0GA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;yBAQnD,KAAK,EAAE,SAAS,SAAS,MAAM,GAAG,MAAM,EAAE,WAAW,EAAE,IAAI,SAAS,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EAAE,UAAU,SAAS,OAAO,uBACnK,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;WA8LxD,mBAAmB,CAAC;;;;qHAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;uBAlCc,GAAG;0BACA,GAAG;uBACN,GAAG;;cAvJxB,SAAS,SAAS,KAAK,KAAG,IAAI;;;;YA4LQ,OAAO,CAAC,OAAO,WAAW,CAAC;;AAxMvE,wBAwM4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"WFormAsyncSelectSingle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/FormAsync/WFormAsyncSelectSingle.vue"],"names":[],"mappings":"AA0GA,OAAO,KAAK,EAAC,0BAA0B,EAAC,MAAM,SAAS,CAAA;AACvD,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;yBAQnD,KAAK,EAAE,SAAS,SAAS,MAAM,GAAG,MAAM,EAAE,WAAW,EAAE,IAAI,SAAS,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EAAE,UAAU,SAAS,OAAO,uBACnK,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;WA8LxD,mBAAmB,CAAC;;;;2HAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;uBAlCc,GAAG;0BACA,GAAG;uBACN,GAAG;;cAvJxB,SAAS,SAAS,KAAK,KAAG,IAAI;;;;YA4LQ,OAAO,CAAC,OAAO,WAAW,CAAC;;AAxMvE,wBAwM4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -1,7 +1,10 @@
1
1
  import { InputAsyncProps } from '../Input/types';
2
2
  import { ToggleProps } from '../Toggle/types';
3
- import { SelectOptionComponent, SelectSingleProps } from '../Select/types';
3
+ import { SelectOptionComponent, SelectProps, SelectSingleProps } from '../Select/types';
4
4
  import { ButtonGroupProps } from '../Button/types';
5
+ /**
6
+ * Input
7
+ */
5
8
  interface FormAsyncInputBaseProps<Model, FieldType extends string | number> extends Omit<InputAsyncProps<FieldType extends number ? 'number' : Exclude<InputType, 'number'>>, 'modelValue' | 'placeholderSecure'> {
6
9
  queryEnabled?: boolean;
7
10
  field: keyof ObjectPaths<Model, FieldType, true>;
@@ -19,6 +22,9 @@ interface FormAsyncInputPropsWithoutParams<Model, FieldType extends string | num
19
22
  queryParams?: never;
20
23
  }
21
24
  export type FormAsyncInputProps<Model, FieldType extends string | number, QueryParams> = FormAsyncInputPropsWithParams<Model, FieldType, QueryParams> | FormAsyncInputPropsWithoutParams<Model, FieldType>;
25
+ /**
26
+ * Toggle
27
+ */
22
28
  interface FormAsyncToggleBaseProps<Model, FieldType extends boolean | null> extends Omit<ToggleProps<FieldType>, 'modelValue'> {
23
29
  queryEnabled?: boolean;
24
30
  field: keyof ObjectPaths<Model, FieldType, true>;
@@ -38,6 +44,29 @@ interface FormAsyncTogglePropsWithoutParams<Model, FieldType extends boolean | n
38
44
  queryParams?: never;
39
45
  }
40
46
  export type FormAsyncToggleProps<Model, FieldType extends boolean | null, QueryParams> = FormAsyncTogglePropsWithParams<Model, FieldType, QueryParams> | FormAsyncTogglePropsWithoutParams<Model, FieldType>;
47
+ /**
48
+ * Select
49
+ */
50
+ interface FormAsyncSelectBaseProps<Model, FieldType extends string | number, Data extends DefaultData, OptionComponent extends SelectOptionComponent<Data>> extends Omit<SelectProps<FieldType, Data, OptionComponent>, 'modelValue'> {
51
+ queryEnabled?: boolean;
52
+ field: keyof ObjectPaths<Model, FieldType[], true>;
53
+ apiMethod: (payload: PartialNested<Model>) => Promise<RequestResponse<Model>>;
54
+ confimGetter?: (value: FieldType, isSelect: boolean) => ConfirmProps | undefined;
55
+ }
56
+ interface FormAsyncSelectPropsWithParams<Model, FieldType extends string | number, QueryParams, Data extends DefaultData, OptionComponent extends SelectOptionComponent<Data>> extends FormAsyncSelectBaseProps<Model, FieldType, Data, OptionComponent> {
57
+ useQueryFn: UseQueryWithParams<Model, QueryParams>;
58
+ noParams?: never;
59
+ queryParams: QueryParams;
60
+ }
61
+ interface FormAsyncSelectPropsWithoutParams<Model, FieldType extends string | number, Data extends DefaultData, OptionComponent extends SelectOptionComponent<Data>> extends FormAsyncSelectBaseProps<Model, FieldType, Data, OptionComponent> {
62
+ useQueryFn: UseQueryEmpty<Model>;
63
+ noParams: true;
64
+ queryParams?: never;
65
+ }
66
+ export type FormAsyncSelectProps<Model, FieldType extends string | number, QueryParams, Data extends DefaultData, OptionComponent extends SelectOptionComponent<Data>> = FormAsyncSelectPropsWithParams<Model, FieldType, QueryParams, Data, OptionComponent> | FormAsyncSelectPropsWithoutParams<Model, FieldType, Data, OptionComponent>;
67
+ /**
68
+ * SelectSingle
69
+ */
41
70
  interface FormAsyncSelectSingleBaseProps<Model, FieldType extends string | number, Data extends DefaultData, OptionComponent extends SelectOptionComponent<Data>, AllowClear extends boolean = false> extends Omit<SelectSingleProps<FieldType, Data, OptionComponent, AllowClear>, 'modelValue'> {
42
71
  queryEnabled?: boolean;
43
72
  field: keyof ObjectPaths<Model, FieldType, true>;
@@ -54,7 +83,10 @@ interface FormAsyncSelectSinglePropsWithoutParams<Model, FieldType extends strin
54
83
  noParams: true;
55
84
  queryParams?: never;
56
85
  }
57
- export type FormAsyncSelectProps<Model, FieldType extends string | number, QueryParams, Data extends DefaultData, OptionComponent extends SelectOptionComponent<Data>, AllowClear extends boolean = false> = FormAsyncSelectSinglePropsWithParams<Model, FieldType, QueryParams, Data, OptionComponent, AllowClear> | FormAsyncSelectSinglePropsWithoutParams<Model, FieldType, Data, OptionComponent, AllowClear>;
86
+ export type FormAsyncSelectSingleProps<Model, FieldType extends string | number, QueryParams, Data extends DefaultData, OptionComponent extends SelectOptionComponent<Data>, AllowClear extends boolean = false> = FormAsyncSelectSinglePropsWithParams<Model, FieldType, QueryParams, Data, OptionComponent, AllowClear> | FormAsyncSelectSinglePropsWithoutParams<Model, FieldType, Data, OptionComponent, AllowClear>;
87
+ /**
88
+ * ButtonGroup
89
+ */
58
90
  interface FormAsyncButtonGroupBaseProps<Model, FieldType extends string | number | boolean | null, Entity extends Record<string, unknown>, ValueGetter extends {
59
91
  fn(value: Entity): FieldType;
60
92
  }['fn'] | undefined = undefined> extends Omit<ButtonGroupProps<FieldType, Entity, ValueGetter>, 'modelValue' | 'loading'> {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/FormAsync/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,0BAA0B,CAAA;AAC7D,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAA;AAC1D,OAAO,KAAK,EAAC,qBAAqB,EAAE,iBAAiB,EAAC,MAAM,2BAA2B,CAAA;AACvF,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAA;AAErD,UAAU,uBAAuB,CAAC,KAAK,EAAE,SAAS,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,IAAI,CAAC,eAAe,CAAC,SAAS,SAAS,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,EAAE,YAAY,GAAG,mBAAmB,CAAC;IAC/M,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,KAAK,EAAE,MAAM,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;IAChD,SAAS,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAA;IAC7E,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,YAA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,EAAE,aAAa,CAAC,KAAK,CAAC,CAAA;IAChC,QAAQ,EAAE,IAAI,CAAA;IACd,WAAW,CAAC,EAAE,KAAK,CAAA;CACpB;AAED,MAAM,MAAM,yBAAyB,CACnC,KAAK,EACL,SAAS,SAAS,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,EAClD,WAAW,EACX,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,WAAW,SAAS;IAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,SAAS,IAC9E,mCAAmC,CAAC,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG,sCAAsC,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,CAAA"}
@@ -19,7 +19,7 @@ declare function __VLS_template(): {
19
19
  previous: () => void;
20
20
  validate: (index: number, silent?: boolean | undefined, path?: import('../Form/use/useFormValidateMap').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["validate"]>;
21
21
  invalidate: (index: number, payload: {
22
- [x: string]: string | string[];
22
+ [x: string]: string | string[] | undefined;
23
23
  }) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["invalidate"]>;
24
24
  initModel: (index: number) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["initModel"]>;
25
25
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
@@ -58,7 +58,7 @@ declare function __VLS_template(): {
58
58
  previous: () => void;
59
59
  validate: (index: number, silent?: boolean | undefined, path?: import('../Form/use/useFormValidateMap').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["validate"]>;
60
60
  invalidate: (index: number, payload: {
61
- [x: string]: string | string[];
61
+ [x: string]: string | string[] | undefined;
62
62
  }) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["invalidate"]>;
63
63
  initModel: (index: number) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["initModel"]>;
64
64
  }, {}, {}, {}, {}> | null;
@@ -16,6 +16,7 @@ declare const _default: <Model extends number | string, Data extends DefaultData
16
16
  expose(exposed: import('vue').ShallowUnwrapRef<{
17
17
  focus: () => void;
18
18
  blur: () => void;
19
+ setSearch: (value: string) => void;
19
20
  }>): void;
20
21
  attrs: any;
21
22
  slots: Readonly<{
@@ -1 +1 @@
1
- {"version":3,"file":"WSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelect.vue"],"names":[],"mappings":"AAgVA,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;WA0lBxD,mBAAmB,CAAC;;;;;;;;;;;;iIAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;;;MAAsB,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;SACf,KAAK,IAAI;gBACF,MAAM,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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;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;;;YA/Kd,QAAQ,QAAQ,KAAK,GAAG,IAAI;YAC5B,UAAU,QAAQ,KAAK,GAAG,IAAI;YAC9B,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,MAAM,SAAS,UAAU,GAAG,IAAI;;;;;YA4lBM,OAAO,CAAC,OAAO,WAAW,CAAC;;AA5mBvE,wBA4mB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -71,7 +71,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
71
71
  const cursor = ref(-1);
72
72
  const isCursorLocked = ref(false);
73
73
  const search = ref("");
74
- const { data, isLoading } = props.useQueryFnOptions();
74
+ const { data, isLoading } = props.useQueryFnOptions({
75
+ enabled: computed(() => !props.disabled)
76
+ });
75
77
  const filteredOptions = computed(() => !data.value ? [] : search.value === "" ? data.value : data.value.filter((option) => props.searchFn(option, search.value)));
76
78
  const lastIndex = computed(() => props.allowCreate ? filteredOptions.value.length : filteredOptions.value.length - 1);
77
79
  const isMobile = getIsMobile();
@@ -155,13 +157,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
155
157
  const blur = () => {
156
158
  input.value?.blur();
157
159
  };
160
+ const setSearch = (value) => {
161
+ search.value = value;
162
+ };
158
163
  watch(toRef(props, "modelValue"), async () => {
159
164
  await nextTick();
160
165
  input.value?.updateDropdown();
161
166
  });
162
167
  __expose({
163
168
  focus,
164
- blur
169
+ blur,
170
+ setSearch
165
171
  });
166
172
  return (_ctx, _cache) => {
167
173
  return openBlock(), createBlock(_sfc_main$1, mergeProps({
@@ -1 +1 @@
1
- {"version":3,"file":"WSelectAsync.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectAsync.vue"],"names":[],"mappings":"AAiPA,OAAO,KAAK,EAAC,gBAAgB,EAAE,qBAAqB,EAA6B,MAAM,SAAS,CAAA;yBAG/E,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,eAC5H,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;WA8fxD,mBAAmB,CAAC;;;;;;;;;;oJAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;;;MAAsB,GAAG,IAAI;WACpE,GAAG;;gBAlZH,MAAM,IAAI;mBACP,MAAM,IAAI;gBACb,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;iBACrC,CAAC,KAAK,E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AAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -11,11 +11,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  useQueryFnOptions: {},
12
12
  useQueryFnPrefix: {},
13
13
  isInvalidPage: {},
14
- queryParams: {},
14
+ queryParamsOptions: {},
15
+ searchField: {},
15
16
  previewData: {},
16
17
  createdData: {},
17
18
  valueQueryKey: { default: "id__in" },
18
- queryOptions: {},
19
19
  modelValue: {},
20
20
  valueGetter: { type: Function, default: (data) => data.id },
21
21
  emptyStub: { default: "No match" },
@@ -188,7 +188,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
188
188
  ref: list,
189
189
  "model-value": _ctx.modelValue,
190
190
  "use-query-fn": _ctx.useQueryFnOptions,
191
- "query-params": { ..._ctx.queryParams, search: search.value },
191
+ "query-params": { ..._ctx.queryParamsOptions, [_ctx.searchField ?? "search"]: search.value },
192
192
  "is-invalid-page": _ctx.isInvalidPage,
193
193
  loading: _ctx.loading || isFetchingPrefix.value,
194
194
  disabled: isDisabled.value,
@@ -196,7 +196,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
196
196
  "allow-create": _ctx.allowCreate && search.value !== "",
197
197
  "hide-option-icon": _ctx.hideOptionIcon,
198
198
  "value-getter": _ctx.valueGetter,
199
- "query-options": _ctx.queryOptions,
200
199
  onSelect: select,
201
200
  onUnselect: unselect,
202
201
  "onCreate:option": create,
@@ -219,7 +218,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
219
218
  ])
220
219
  ]),
221
220
  _: 3
222
- }, 8, ["model-value", "use-query-fn", "query-params", "is-invalid-page", "loading", "disabled", "empty-stub", "allow-create", "hide-option-icon", "value-getter", "query-options"])
221
+ }, 8, ["model-value", "use-query-fn", "query-params", "is-invalid-page", "loading", "disabled", "empty-stub", "allow-create", "hide-option-icon", "value-getter"])
223
222
  ]),
224
223
  _: 2
225
224
  }, [
@@ -13,9 +13,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
13
13
  useQueryFnOptions: {},
14
14
  useQueryFnPrefix: {},
15
15
  isInvalidPage: { type: Function },
16
- queryParams: {},
16
+ queryParamsOptions: {},
17
+ searchField: {},
17
18
  valueQueryKey: {},
18
- queryOptions: {},
19
19
  valueGetter: { type: Function },
20
20
  emptyStub: {},
21
21
  hidePrefix: { type: Boolean },
@@ -3,12 +3,10 @@ declare const _default: <Model extends number | string, Data extends DefaultData
3
3
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
4
  readonly "onUpdate:modelValue"?: ((value: AllowClear extends true ? Model | null : Model) => any) | undefined;
5
5
  readonly "onCreate:option"?: ((value: string) => any) | undefined;
6
- readonly "onUpdate:search"?: ((value: string) => any) | undefined;
7
6
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{
8
7
  "onUpdate:modelValue"?: ((value: AllowClear extends true ? Model | null : Model) => any) | undefined;
9
8
  "onCreate:option"?: ((value: string) => any) | undefined;
10
- "onUpdate:search"?: ((value: string) => any) | undefined;
11
- }>, never>, "onUpdate:modelValue" | "onCreate:option" | "onUpdate:search"> & SelectSingleProps<Model, Data, OptionComponent, AllowClear>> & import('vue').PublicProps;
9
+ }>, never>, "onUpdate:modelValue" | "onCreate:option"> & SelectSingleProps<Model, Data, OptionComponent, AllowClear>> & import('vue').PublicProps;
12
10
  expose(exposed: import('vue').ShallowUnwrapRef<{
13
11
  blur: () => void;
14
12
  }>): void;
@@ -25,7 +23,6 @@ declare const _default: <Model extends number | string, Data extends DefaultData
25
23
  };
26
24
  emit: {
27
25
  (e: "update:modelValue", value: AllowClear extends true ? Model | null : Model): void;
28
- (e: "update:search", value: string): void;
29
26
  (e: "create:option", value: string): void;
30
27
  };
31
28
  }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
@@ -1 +1 @@
1
- {"version":3,"file":"WSelectSingle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectSingle.vue"],"names":[],"mappings":"AA+FA,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;WAwOxD,mBAAmB,CAAC;;;;;;;;4IAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;;MAAsB,GAAG,IAAI;WACpE,GAAG;;uBAtCe,GAAG;0BACA,GAAG;;;;;YACL,GAAG;uBACJ,GAAG;;;YA5LzB,mBAAmB,0DAAoB,IAAI;YAC3C,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;;YAkOC,OAAO,CAAC,OAAO,WAAW,CAAC;;AAlPvE,wBAkP4E;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":"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"}
@@ -54,7 +54,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54
54
  optionComponent: {},
55
55
  optionComponentProps: {}
56
56
  },
57
- emits: ["update:modelValue", "update:search", "create:option"],
57
+ emits: ["update:modelValue", "create:option"],
58
58
  setup(__props, { expose: __expose, emit: __emit }) {
59
59
  const props = __props;
60
60
  const emit = __emit;
@@ -69,7 +69,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
69
69
  };
70
70
  const blur = () => {
71
71
  selectComponent.value?.blur();
72
- emit("update:search", "");
73
72
  };
74
73
  watch(toRef(props, "modelValue"), blur);
75
74
  __expose({
@@ -88,9 +87,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
88
87
  class: _ctx.$attrs.class,
89
88
  onSelect: _cache[0] || (_cache[0] = ($event) => updateModelValue($event)),
90
89
  onUnselect: _cache[1] || (_cache[1] = ($event) => updateModelValue(_ctx.allowClear ? null : $event)),
91
- "onUpdate:search": _cache[2] || (_cache[2] = ($event) => emit("update:search", $event)),
92
- "onCreate:option": _cache[3] || (_cache[3] = ($event) => createOption($event)),
93
- onFocus: _cache[4] || (_cache[4] = ($event) => _ctx.searchModel && typeof _ctx.modelValue === "string" ? _ctx.$emit("update:search", _ctx.modelValue) : void 0)
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)
94
92
  }), createSlots({
95
93
  option: withCtx(({ option, selected, model }) => [
96
94
  renderSlot(_ctx.$slots, "option", {
@@ -1 +1 @@
1
- {"version":3,"file":"SelectAsyncPrefix.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/components/SelectAsyncPrefix.vue"],"names":[],"mappings":"AAuFA,OAAO,KAAK,EAAC,sBAAsB,EAAE,qBAAqB,EAA6B,MAAM,UAAU,CAAA;yBAGtF,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,eAC5H,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;WAkLxD,mBAAmB,CAAC;;;;;;;;+IAAyD,CAAC,4BAA2B;oBAChG,OAAO,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,mBAAmB,CAAC;;;;;;;;+IAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;kBA7JD,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,KAAK,IAAI;;kBAAjE,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,KAAK,IAAI;;;YAdvE,UAAU,SAAS,KAAK,GAAG,IAAI;YAC/B,iBAAiB,SAAS,OAAO,GAAG,IAAI;YACxC,mBAAmB,SAAS,KAAK,EAAE,GAAG,IAAI;;;;;YA8KJ,OAAO,CAAC,OAAO,WAAW,CAAC;;AA5LvE,wBA4L4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -20,7 +20,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  createdData: {},
21
21
  valueGetter: { type: Function },
22
22
  valueQueryKey: {},
23
- queryOptions: {},
24
23
  optionComponent: {},
25
24
  optionComponentProps: {}
26
25
  },
@@ -49,7 +48,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
49
48
  "preview-data": _ctx.previewData,
50
49
  "created-data": _ctx.createdData,
51
50
  "value-getter": _ctx.valueGetter,
52
- "query-options": _ctx.queryOptions,
53
51
  onUnselect: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("unselect", $event)),
54
52
  "onUpdate:fetching": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:fetching", $event))
55
53
  }, {
@@ -61,7 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
61
59
  })
62
60
  ]),
63
61
  _: 3
64
- }, 8, ["use-query-fn", "query-params", "option-component", "option-component-props", "disable-clear", "loading", "disabled", "preview-data", "created-data", "value-getter", "query-options"]),
62
+ }, 8, ["use-query-fn", "query-params", "option-component", "option-component-props", "disable-clear", "loading", "disabled", "preview-data", "created-data", "value-getter"]),
65
63
  _ctx.modelValue.length > PAGE_LENGTH ? (openBlock(), createElementBlock("div", _hoisted_1, [
66
64
  createElementVNode("div", null, "... " + toDisplayString(unref(numberFormatter).format(_ctx.modelValue.length)) + " items", 1),
67
65
  !_ctx.disableClear && !_ctx.disabled ? (openBlock(), createElementBlock("button", {
@@ -1 +1 @@
1
- {"version":3,"file":"SelectAsyncPrefixPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/components/SelectAsyncPrefixPage.vue"],"names":[],"mappings":"AA6GA,OAAO,KAAK,EAAC,0BAA0B,EAAE,qBAAqB,EAA6B,MAAM,UAAU,CAAA;yBAG1F,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,eAC5H,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;WAyLxD,mBAAmB,CAAC;;;;;;;;oJAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;kBAlJD,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,KAA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,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,KAAK,IAAI;;kBAAjE,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,KAAK,IAAI;;;YAjCvE,UAAU,SAAS,KAAK,GAAG,IAAI;YAC/B,oBAAoB,SAAS,MAAM,GAAG,IAAI;YAC1C,iBAAiB,SAAS,OAAO,GAAG,IAAI;;;;;YAsLF,OAAO,CAAC,OAAO,WAAW,CAAC;;AAlMvE,wBAkM4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -14,7 +14,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  previewData: {},
15
15
  createdData: {},
16
16
  valueGetter: { type: Function },
17
- queryOptions: {},
18
17
  optionComponent: {},
19
18
  optionComponentProps: {}
20
19
  },
@@ -24,7 +23,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
23
  const emit = __emit;
25
24
  const queryEnabled = computed(() => !props.previewData);
26
25
  const { data, isFetching } = props.useQueryFn(toRef(props, "queryParams"), {
27
- ...props.queryOptions ?? {},
28
26
  enabled: queryEnabled,
29
27
  refetchInterval: false,
30
28
  refetchOnMount: false,
@@ -38,11 +38,11 @@ export interface SelectAsyncProps<Model extends number | string, Data extends De
38
38
  useQueryFnOptions: UseQueryPaginated<Data, QueryParams>;
39
39
  useQueryFnPrefix?: UseQueryPaginated<Data, QueryParams>;
40
40
  isInvalidPage: (error: unknown) => boolean;
41
- queryParams: QueryParams;
41
+ queryParamsOptions: QueryParams;
42
+ searchField?: keyof QueryParams;
42
43
  previewData?: Data[];
43
44
  createdData?: Data[];
44
45
  valueQueryKey?: string;
45
- queryOptions?: Partial<Parameters<UseQueryPaginated<Data, QueryParams>>[1]>;
46
46
  }
47
47
  export interface SelectAsyncPrefixProps<Model extends number | string, Data extends DefaultData, QueryParams, OptionComponent extends SelectOptionComponent<Data>> extends SelectOptionComponentProps<Data, OptionComponent> {
48
48
  useQueryFn: UseQueryPaginated<Data, QueryParams>;
@@ -54,7 +54,6 @@ export interface SelectAsyncPrefixProps<Model extends number | string, Data exte
54
54
  createdData?: Data[];
55
55
  valueGetter: (value: Data) => Model;
56
56
  valueQueryKey: string;
57
- queryOptions?: Partial<Parameters<UseQueryPaginated<Data, QueryParams>>[1]>;
58
57
  }
59
58
  export interface SelectAsyncPrefixPageProps<Model extends number | string, Data extends DefaultData, QueryParams, OptionComponent extends SelectOptionComponent<Data>> extends SelectOptionComponentProps<Data, OptionComponent> {
60
59
  useQueryFn: UseQueryPaginated<Data, QueryParams>;
@@ -65,7 +64,6 @@ export interface SelectAsyncPrefixPageProps<Model extends number | string, Data
65
64
  previewData?: Data[];
66
65
  createdData?: Data[];
67
66
  valueGetter: (value: Data) => Model;
68
- queryOptions?: Partial<Parameters<UseQueryPaginated<Data, QueryParams>>[1]>;
69
67
  }
70
68
  export interface SelectAsyncSingleProps<Model extends number | string, Data extends DefaultData, QueryParams, OptionComponent extends SelectOptionComponent<Data>, AllowClear extends boolean> extends Omit<SelectAsyncProps<Model, Data, QueryParams, OptionComponent>, 'modelValue' | 'disableClear' | 'previewData' | 'createdData'> {
71
69
  modelValue: Model | null;
@@ -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,C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AM,WAAW,sBAAsB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EAAE,UAAU,SAAS,OAAO,CAC3L,SAAQ,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,CAAC,EAAE,YAAY,GAAG,cAAc,GAAG,aAAa,GAAG,aAAa,CAAC;IACxI,UAAU,EAAE,KAAK,GAAG,IAAI,CAAA;IACxB,UAAU,CAAC,EAAE,OAAO,GAAG,UAAU,CAAA;IACjC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,IAAI,CAAA;IAClB,WAAW,CAAC,EAAE,IAAI,CAAA;CACnB"}
@@ -13,7 +13,7 @@ declare const _default: import('vue').DefineComponent<{
13
13
  previous: () => void;
14
14
  validate: (index: number, silent?: boolean | undefined, path?: import('../Form/use/useFormValidateMap').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof WForm>["validate"]>;
15
15
  invalidate: (index: number, payload: {
16
- [x: string]: string | string[];
16
+ [x: string]: string | string[] | undefined;
17
17
  }) => ReturnType<ComponentInstance<typeof WForm>["invalidate"]>;
18
18
  initModel: (index: number) => ReturnType<ComponentInstance<typeof WForm>["initModel"]>;
19
19
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
@@ -27,6 +27,7 @@ import { default as WForm } from '../components/Form/WForm.vue';
27
27
  import { default as WFormValidator } from '../components/Form/WFormValidator.vue';
28
28
  import { default as WFormAsyncButtonGroup } from '../components/FormAsync/WFormAsyncButtonGroup.vue';
29
29
  import { default as WFormAsyncInput } from '../components/FormAsync/WFormAsyncInput.vue';
30
+ import { default as WFormAsyncSelect } from '../components/FormAsync/WFormAsyncSelect.vue';
30
31
  import { default as WFormAsyncSelectSingle } from '../components/FormAsync/WFormAsyncSelectSingle.vue';
31
32
  import { default as WFormAsyncToggle } from '../components/FormAsync/WFormAsyncToggle.vue';
32
33
  import { default as WHeaderBar } from '../components/HeaderBar/WHeaderBar.vue';
@@ -72,5 +73,5 @@ declare const _default: {
72
73
  install: (app: App | any) => void;
73
74
  };
74
75
  export default _default;
75
- export { WActionsBar, WBottomSheet, WButton, WButtonAction, WButtonCopy, WButtonDropdown, WButtonGroup, WButtonMore, WButtonMoreItem, WButtonSelection, WButtonSelectionAction, WCheckbox, WChip, WClickOutside, WCounter, WDatePicker, WDatePickerSingle, WDropdown, WDropdownMenu, WExpansion, WExpansionItem, WFieldWrapper, WFilePicker, WFilterWrapper, WForm, WFormValidator, WFormAsyncButtonGroup, WFormAsyncInput, WFormAsyncSelectSingle, WFormAsyncToggle, WHeaderBar, WImageViewer, WInfiniteList, WInfiniteListPages, WInfoCard, WInfoCardNegative, WInput, WInputAsync, WInputDate, WInputOptions, WInputSuggest, WLink, WLinkArrow, WList, WListCard, WListCardField, WListHeader, WListHeaderItem, WMenuItem, WModal, WModalStepper, WModalWrapper, WNavBar, WNavItem, WNavItemExpand, WNavItemTransition, WNotify, WSelect, WSelectAsync, WSelectAsyncList, WSelectAsyncSingle, WSelectSingle, WSkeleton, WSpinner, WTabs, WTabsColumns, WToggle, WTooltip, WTooltipContainer, };
76
+ export { WActionsBar, WBottomSheet, WButton, WButtonAction, WButtonCopy, WButtonDropdown, WButtonGroup, WButtonMore, WButtonMoreItem, WButtonSelection, WButtonSelectionAction, WCheckbox, WChip, WClickOutside, WCounter, WDatePicker, WDatePickerSingle, WDropdown, WDropdownMenu, WExpansion, WExpansionItem, WFieldWrapper, WFilePicker, WFilterWrapper, WForm, WFormValidator, WFormAsyncButtonGroup, WFormAsyncInput, WFormAsyncSelect, WFormAsyncSelectSingle, WFormAsyncToggle, WHeaderBar, WImageViewer, WInfiniteList, WInfiniteListPages, WInfoCard, WInfoCardNegative, WInput, WInputAsync, WInputDate, WInputOptions, WInputSuggest, WLink, WLinkArrow, WList, WListCard, WListCardField, WListHeader, WListHeaderItem, WMenuItem, WModal, WModalStepper, WModalWrapper, WNavBar, WNavItem, WNavItemExpand, WNavItemTransition, WNotify, WSelect, WSelectAsync, WSelectAsyncList, WSelectAsyncSingle, WSelectSingle, WSkeleton, WSpinner, WTabs, WTabsColumns, WToggle, WTooltip, WTooltipContainer, };
76
77
  //# sourceMappingURL=componentsPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"componentsPlugin.d.ts","sourceRoot":"","sources":["../../src/imports/componentsPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AAE5B,OAAO,WAAW,MAAM,yCAAyC,CAAA;AACjE,OAAO,YAAY,MAAM,2CAA2C,CAAA;AACpE,OAAO,OAAO,MAAM,iCAAiC,CAAA;AACrD,OAAO,aAAa,MAAM,uCAAuC,CAAA;AACjE,OAAO,WAAW,MAAM,qCAAqC,CAAA;AAC7D,OAAO,eAAe,MAAM,yCAAyC,CAAA;AACrE,OAAO,YAAY,MAAM,sCAAsC,CAAA;AAC/D,OAAO,WAAW,MAAM,qCAAqC,CAAA;AAC7D,OAAO,eAAe,MAAM,yCAAyC,CAAA;AACrE,OAAO,gBAAgB,MAAM,0CAA0C,CAAA;AACvE,OAAO,sBAAsB,MAAM,gDAAgD,CAAA;AACnF,OAAO,SAAS,MAAM,qCAAqC,CAAA;AAC3D,OAAO,KAAK,MAAM,6BAA6B,CAAA;AAC/C,OAAO,aAAa,MAAM,6CAA6C,CAAA;AACvE,OAAO,QAAQ,MAAM,mCAAmC,CAAA;AACxD,OAAO,WAAW,MAAM,yCAAyC,CAAA;AACjE,OAAO,iBAAiB,MAAM,+CAA+C,CAAA;AAC7E,OAAO,SAAS,MAAM,qCAAqC,CAAA;AAC3D,OAAO,aAAa,MAAM,6CAA6C,CAAA;AACvE,OAAO,UAAU,MAAM,uCAAuC,CAAA;AAC9D,OAAO,cAAc,MAAM,2CAA2C,CAAA;AACtE,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AM,EACN,WAAW,EACX,UAAU,EACV,aAAa,EACb,aAAa,EACb,KAAK,EACL,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,EACd,WAAW,EACX,eAAe,EACf,SAAS,EACT,MAAM,EACN,aAAa,EACb,aAAa,EACb,OAAO,EACP,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,OAAO,EACP,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,iBAAiB,GAClB,CAAA"}
package/dist/main.js CHANGED
@@ -30,6 +30,7 @@ export { default as WForm } from './components/Form/WForm.vue.js';
30
30
  export { default as WFormValidator } from './components/Form/WFormValidator.vue.js';
31
31
  export { default as WFormAsyncButtonGroup } from './components/FormAsync/WFormAsyncButtonGroup.vue.js';
32
32
  export { default as WFormAsyncInput } from './components/FormAsync/WFormAsyncInput.vue.js';
33
+ export { default as WFormAsyncSelect } from './components/FormAsync/WFormAsyncSelect.vue.js';
33
34
  export { default as WFormAsyncSelectSingle } from './components/FormAsync/WFormAsyncSelectSingle.vue.js';
34
35
  export { default as WFormAsyncToggle } from './components/FormAsync/WFormAsyncToggle.vue.js';
35
36
  export { default as WHeaderBar } from './components/HeaderBar/WHeaderBar.vue.js';
@@ -128,7 +128,7 @@ declare type UnionToTuple<
128
128
  declare type ObjectKeys<O> = UnionToTuple<keyof O>
129
129
 
130
130
  declare type PartialNested<T> = {
131
- [P in keyof T]?: (T[P] extends object ? PartialNested<T[P]> : T[P]) | undefined
131
+ [P in keyof T]?: (T[P] extends Array ? T[P] : T[P] extends object ? PartialNested<T[P]> : T[P]) | undefined
132
132
  }
133
133
 
134
134
  declare type Flatten<T> =
@@ -1,15 +1,19 @@
1
1
  import { default as WForm } from '../components/Form/WForm.vue';
2
2
  import { default as WFormValidator } from '../components/Form/WFormValidator.vue';
3
- export declare class ApiError<Response, Data extends RequestData = RequestData> extends Error {
4
- readonly response: RequestResponse<Response, Data>;
5
- constructor(response: RequestResponse<Response, Data>);
3
+ type ErrorResponse<Response> = {
4
+ [Key in 'detail' | 'non_field_errors' | keyof Response]?: Key extends 'detail' ? string : string[];
5
+ };
6
+ export declare class ApiError<Data extends RequestData = NonNullable<unknown>, ErrorData = ErrorResponse<Data>> extends Error {
7
+ readonly response: RequestResponse<ErrorData, Data>;
8
+ constructor(response: RequestResponse<ErrorData, Data>);
6
9
  }
7
- export declare class ApiErrorCancel<Response, Data extends RequestData = RequestData> extends ApiError<Response, Data> {
8
- constructor(response: RequestResponse<Response, Data>);
10
+ export declare class ApiErrorCancel<Data extends RequestData = NonNullable<unknown>> extends ApiError<Data, undefined> {
11
+ constructor(response: RequestResponse<undefined, Data>);
9
12
  }
10
13
  export declare const handleApiError: <Error>(error: Error, form?: {
11
14
  invalidate: ComponentInstance<typeof WForm>["invalidate"];
12
15
  }, field?: string, formValidator?: {
13
16
  invalidate: ComponentInstance<typeof WFormValidator>["invalidate"];
14
17
  }) => Promise<Error>;
18
+ export {};
15
19
  //# sourceMappingURL=api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/utils/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,6BAA6B,CAAA;AACpD,OAAO,KAAK,cAAc,MAAM,sCAAsC,CAAA;AAItE,qBAAa,QAAQ,CAAC,QAAQ,EAAE,IAAI,SAAS,WAAW,GAAG,WAAW,CAAE,SAAQ,KAAK;aACvD,QAAQ,EAAE,eAAe,CAAC,QAAQ,EAAE,IAAI,CAAC;gBAAzC,QAAQ,EAAE,eAAe,CAAC,QAAQ,EAAE,IAAI,CAAC;CAGtE;AAED,qBAAa,cAAc,CAAC,QAAQ,EAAE,IAAI,SAAS,WAAW,GAAG,WAAW,CAAE,SAAQ,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;gBAChG,QAAQ,EAAE,eAAe,CAAC,Q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E;IAAC,UAAU,EAAE,iBAAiB,CAAC,OAAO,cAAc,CAAC,CAAC,YAAY,CAAC,CAAA;CAAC,KACnF,OAAO,CAAC,KAAK,CAgBf,CAAA"}
package/dist/utils/api.js CHANGED
@@ -14,12 +14,12 @@ class ApiErrorCancel extends ApiError {
14
14
  }
15
15
  const handleApiError = (error, form, field, formValidator) => {
16
16
  if (error instanceof ApiError && !(error instanceof ApiErrorCancel)) {
17
- const caption = error.response?.data?.detail ?? error.response?.data?.non_field_errors?.join(", ") ?? (field ? get(error.response?.data, field)?.join(", ") : void 0);
17
+ const caption = error.response?.data?.detail ?? error.response?.data?.non_field_errors?.join(", ") ?? (field ? get(error.response?.data ?? {}, field)?.join(", ") : void 0);
18
18
  Notify.error({
19
19
  title: "Error",
20
20
  caption: typeof caption === "string" && caption.length < 200 ? caption : void 0
21
21
  });
22
- if (formValidator && caption.length < 200) formValidator.invalidate(caption);
22
+ if (formValidator && caption && caption.length < 200) formValidator.invalidate(caption);
23
23
  if (error.response?.data instanceof Object) form?.invalidate(error.response.data);
24
24
  }
25
25
  return Promise.reject(error);
@@ -1,7 +1,10 @@
1
1
  import { QueryClient, UseQueryReturnType, QueryKey } from '@tanstack/vue-query';
2
2
  import { ApiError } from './api';
3
3
  type Params = Parameters<QueryClient['setQueriesData']>;
4
- export declare const useDefaultQuery: <TQueryFnData = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: import('@tanstack/vue-query').UseQueryOptions<TQueryFnData, ApiError<TQueryFnData, RequestData>, TData, TQueryFnData, TQueryKey>, queryClient?: QueryClient | undefined) => UseQueryReturnType<TData, ApiError<TQueryFnData>> & {
4
+ export declare const useDefaultQuery: <TQueryFnData = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: import('@tanstack/vue-query').UseQueryOptions<TQueryFnData, ApiError<{}, {
5
+ detail?: string | undefined;
6
+ non_field_errors?: string[] | undefined;
7
+ }>, TData, TQueryFnData, TQueryKey>, queryClient?: QueryClient | undefined) => UseQueryReturnType<TData, ApiError> & {
5
8
  setData: (updater: TQueryFnData, options?: Params[2]) => ReturnType<QueryClient["setQueriesData"]>;
6
9
  };
7
10
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"useDefaultQuery.d.ts","sourceRoot":"","sources":["../../src/utils/useDefaultQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,WAAW,EAAE,KAAK,kBAAkB,EAAE,KAAK,QAAQ,EAAC,MAAM,qBAAqB,CAAA;AACtH,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAA;AAEnC,KAAK,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAA;AAEvD,eAAO,MAAM,eAAe,GAC1B,YAAY,YACZ,KAAK,iBACL,SAAS,SAAS,QAAQ,kMAEsE,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC,GAAG;IAClJ,OAAO,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAA;CAUrG,CAAA"}
1
+ {"version":3,"file":"useDefaultQuery.d.ts","sourceRoot":"","sources":["../../src/utils/useDefaultQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,WAAW,EAAE,KAAK,kBAAkB,EAAE,KAAK,QAAQ,EAAC,MAAM,qBAAqB,CAAA;AACtH,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAA;AAEnC,KAAK,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAA;AAEvD,eAAO,MAAM,eAAe,GAC1B,YAAY,YACZ,KAAK,iBACL,SAAS,SAAS,QAAQ;;;+EAEwD,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG;IACtH,OAAO,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAA;CAUrG,CAAA"}
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.2",
7
+ "version": "0.8.4",
8
8
  "scripts": {
9
9
  "dev": "vite",
10
10
  "build": "run-p type-check build-only",
@@ -219,6 +219,9 @@
219
219
  "./dist/components/FormAsync/WFormAsyncInput.vue": {
220
220
  "import": "./dist/components/FormAsync/WFormAsyncInput.vue.js"
221
221
  },
222
+ "./dist/components/FormAsync/WFormAsyncSelect.vue": {
223
+ "import": "./dist/components/FormAsync/WFormAsyncSelect.vue.js"
224
+ },
222
225
  "./dist/components/FormAsync/WFormAsyncSelectSingle.vue": {
223
226
  "import": "./dist/components/FormAsync/WFormAsyncSelectSingle.vue.js"
224
227
  },