eco-vue-js 0.9.2 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts +3 -139
  2. package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts.map +1 -1
  3. package/dist/components/Form/WForm.vue.d.ts +4 -0
  4. package/dist/components/Form/WForm.vue.d.ts.map +1 -1
  5. package/dist/components/Form/WForm.vue.js +7 -1
  6. package/dist/components/Form/WFormValidator.vue.d.ts +3 -1
  7. package/dist/components/Form/WFormValidator.vue.d.ts.map +1 -1
  8. package/dist/components/Form/WFormValidator.vue.js +15 -3
  9. package/dist/components/Form/models/injection.d.ts +1 -0
  10. package/dist/components/Form/models/injection.d.ts.map +1 -1
  11. package/dist/components/Form/models/injection.js +2 -1
  12. package/dist/components/Form/use/useFormHasValueMap.d.ts +6 -0
  13. package/dist/components/Form/use/useFormHasValueMap.d.ts.map +1 -0
  14. package/dist/components/Form/use/useFormHasValueMap.js +31 -0
  15. package/dist/components/FormAsync/WFormAsyncButtonGroup.vue.d.ts +2 -2
  16. package/dist/components/HeaderBar/WHeaderBar.vue.d.ts +1 -4
  17. package/dist/components/HeaderBar/WHeaderBar.vue.d.ts.map +1 -1
  18. package/dist/components/Input/WInputDate.vue.d.ts +2 -12
  19. package/dist/components/Input/WInputDate.vue.d.ts.map +1 -1
  20. package/dist/components/Input/WInputOptions.vue.d.ts +1 -1
  21. package/dist/components/Modal/WModalStepper.vue.d.ts +3 -690
  22. package/dist/components/Modal/WModalStepper.vue.d.ts.map +1 -1
  23. package/dist/components/Modal/WModalStepper.vue.js +7 -5
  24. package/dist/components/Select/WSelectAsyncSingle.vue.d.ts +4 -4
  25. package/dist/components/Select/WSelectSingle.vue.d.ts +4 -4
  26. package/dist/components/Select/WSelectStringified.vue.d.ts +4 -4
  27. package/dist/components/Tabs/WTabs.vue.d.ts +3 -259
  28. package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
  29. package/dist/components/Tabs/WTabs.vue.js +87 -67
  30. package/dist/components/Tabs/WTabsItem.vue.d.ts +9 -6
  31. package/dist/components/Tabs/WTabsItem.vue.d.ts.map +1 -1
  32. package/dist/components/Tabs/WTabsItem.vue.js +2 -1
  33. package/dist/components/Tabs/WTabsStepper.vue.d.ts +18 -307
  34. package/dist/components/Tabs/WTabsStepper.vue.d.ts.map +1 -1
  35. package/dist/components/Tabs/WTabsStepper.vue.js +8 -8
  36. package/dist/components/Tabs/components/TabItem.vue.d.ts.map +1 -1
  37. package/dist/components/Tabs/components/TabItem.vue.js +8 -6
  38. package/dist/components/Tabs/components/TabTitleButton.vue.d.ts.map +1 -1
  39. package/dist/components/Tabs/components/TabTitleButton.vue.js +4 -4
  40. package/dist/components/Tabs/types.d.ts +5 -0
  41. package/dist/components/Tabs/types.d.ts.map +1 -1
  42. package/package.json +1 -1
@@ -4,81 +4,11 @@ declare function __VLS_template(): {
4
4
  toggle?(_: {
5
5
  unclickable: boolean;
6
6
  }): any;
7
- content?(_: {
8
- left: string;
9
- right: string;
10
- istop: boolean;
11
- }): any;
7
+ content?(_: any): any;
12
8
  };
13
9
  refs: {
14
10
  container: HTMLDivElement;
15
- dropdown: ({
16
- $: import('vue').ComponentInternalInstance;
17
- $data: {};
18
- $props: {
19
- readonly maxHeight: number;
20
- readonly maxWidth: number;
21
- readonly horizontalAlign: import('../../main').HorizontalAlign;
22
- readonly parentElement: Element;
23
- readonly updateAlign?: boolean | undefined;
24
- readonly emitUpdate?: boolean | undefined;
25
- readonly "onUpdate:rect"?: (() => any) | undefined;
26
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
27
- $attrs: {
28
- [x: string]: unknown;
29
- };
30
- $refs: {
31
- [x: string]: unknown;
32
- } & {
33
- dropdown: HTMLDivElement;
34
- };
35
- $slots: Readonly<{
36
- [name: string]: import('vue').Slot<any> | undefined;
37
- }>;
38
- $root: import('vue').ComponentPublicInstance | null;
39
- $parent: import('vue').ComponentPublicInstance | null;
40
- $host: Element | null;
41
- $emit: (event: "update:rect") => void;
42
- $el: any;
43
- $options: import('vue').ComponentOptionsBase<Readonly<import('../Dropdown/types').DropdownProps> & Readonly<{
44
- "onUpdate:rect"?: (() => any) | undefined;
45
- }>, {
46
- update: () => void;
47
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
48
- "update:rect": () => any;
49
- }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
50
- beforeCreate?: (() => void) | (() => void)[];
51
- created?: (() => void) | (() => void)[];
52
- beforeMount?: (() => void) | (() => void)[];
53
- mounted?: (() => void) | (() => void)[];
54
- beforeUpdate?: (() => void) | (() => void)[];
55
- updated?: (() => void) | (() => void)[];
56
- activated?: (() => void) | (() => void)[];
57
- deactivated?: (() => void) | (() => void)[];
58
- beforeDestroy?: (() => void) | (() => void)[];
59
- beforeUnmount?: (() => void) | (() => void)[];
60
- destroyed?: (() => void) | (() => void)[];
61
- unmounted?: (() => void) | (() => void)[];
62
- renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
63
- renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
64
- errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
65
- };
66
- $forceUpdate: () => void;
67
- $nextTick: typeof import('vue').nextTick;
68
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
69
- } & Readonly<{}> & Omit<Readonly<import('../Dropdown/types').DropdownProps> & Readonly<{
70
- "onUpdate:rect"?: (() => any) | undefined;
71
- }>, "update"> & import('vue').ShallowUnwrapRef<{
72
- update: () => void;
73
- }> & {} & import('vue').ComponentCustomProperties & {} & {
74
- $slots: {
75
- default?(_: {
76
- left: string;
77
- right: string;
78
- istop: boolean;
79
- }): any;
80
- };
81
- }) | null;
11
+ dropdown: any;
82
12
  };
83
13
  attrs: Partial<{}>;
84
14
  };
@@ -91,73 +21,7 @@ declare const __VLS_component: import('vue').DefineComponent<DropdownMenuProps,
91
21
  "onUpdate:rect"?: (() => any) | undefined;
92
22
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
93
23
  container: HTMLDivElement;
94
- dropdown: ({
95
- $: import('vue').ComponentInternalInstance;
96
- $data: {};
97
- $props: {
98
- readonly maxHeight: number;
99
- readonly maxWidth: number;
100
- readonly horizontalAlign: import('../../main').HorizontalAlign;
101
- readonly parentElement: Element;
102
- readonly updateAlign?: boolean | undefined;
103
- readonly emitUpdate?: boolean | undefined;
104
- readonly "onUpdate:rect"?: (() => any) | undefined;
105
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
106
- $attrs: {
107
- [x: string]: unknown;
108
- };
109
- $refs: {
110
- [x: string]: unknown;
111
- } & {
112
- dropdown: HTMLDivElement;
113
- };
114
- $slots: Readonly<{
115
- [name: string]: import('vue').Slot<any> | undefined;
116
- }>;
117
- $root: import('vue').ComponentPublicInstance | null;
118
- $parent: import('vue').ComponentPublicInstance | null;
119
- $host: Element | null;
120
- $emit: (event: "update:rect") => void;
121
- $el: any;
122
- $options: import('vue').ComponentOptionsBase<Readonly<import('../Dropdown/types').DropdownProps> & Readonly<{
123
- "onUpdate:rect"?: (() => any) | undefined;
124
- }>, {
125
- update: () => void;
126
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
127
- "update:rect": () => any;
128
- }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
129
- beforeCreate?: (() => void) | (() => void)[];
130
- created?: (() => void) | (() => void)[];
131
- beforeMount?: (() => void) | (() => void)[];
132
- mounted?: (() => void) | (() => void)[];
133
- beforeUpdate?: (() => void) | (() => void)[];
134
- updated?: (() => void) | (() => void)[];
135
- activated?: (() => void) | (() => void)[];
136
- deactivated?: (() => void) | (() => void)[];
137
- beforeDestroy?: (() => void) | (() => void)[];
138
- beforeUnmount?: (() => void) | (() => void)[];
139
- destroyed?: (() => void) | (() => void)[];
140
- unmounted?: (() => void) | (() => void)[];
141
- renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
142
- renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
143
- errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
144
- };
145
- $forceUpdate: () => void;
146
- $nextTick: typeof import('vue').nextTick;
147
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
148
- } & Readonly<{}> & Omit<Readonly<import('../Dropdown/types').DropdownProps> & Readonly<{
149
- "onUpdate:rect"?: (() => any) | undefined;
150
- }>, "update"> & import('vue').ShallowUnwrapRef<{
151
- update: () => void;
152
- }> & {} & import('vue').ComponentCustomProperties & {} & {
153
- $slots: {
154
- default?(_: {
155
- left: string;
156
- right: string;
157
- istop: boolean;
158
- }): any;
159
- };
160
- }) | null;
24
+ dropdown: any;
161
25
  }, any>;
162
26
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
163
27
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"WDropdownMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/WDropdownMenu.vue"],"names":[],"mappings":"AAqEA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAoC9C,iBAAS,cAAc;;;;YAyFK,GAAG;;;;;YACD,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAuDsthB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;WA5C/1hB,OAAO,IAA6B;EAEjD;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA6BkuhB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;OAlB32hB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WDropdownMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/WDropdownMenu.vue"],"names":[],"mappings":"AAqEA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAoC9C,iBAAS,cAAc;;;;YAyFK,GAAG;0BACD,GAAG;;;;;;WAWnB,OAAO,IAA6B;EAEjD;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;OAWnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -11,6 +11,8 @@ declare const __VLS_component: import('vue').DefineComponent<{
11
11
  title?: string;
12
12
  }, {
13
13
  isValid: import('vue').ComputedRef<boolean>;
14
+ hasChanges: import('vue').ComputedRef<boolean>;
15
+ hasValue: import('vue').ComputedRef<boolean | null>;
14
16
  validate: (silent?: boolean, path?: import('./use/useFormValidateMap').ValidatePath) => string | undefined;
15
17
  invalidate: (payload: {
16
18
  [x: string]: string | string[] | undefined;
@@ -20,12 +22,14 @@ declare const __VLS_component: import('vue').DefineComponent<{
20
22
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
21
23
  "update:has-changes": (value: boolean) => any;
22
24
  "update:is-valid": (value: boolean | undefined) => any;
25
+ "update:has-value": (value: boolean | null) => any;
23
26
  }, string, import('vue').PublicProps, Readonly<{
24
27
  name?: string;
25
28
  title?: string;
26
29
  }> & Readonly<{
27
30
  "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
28
31
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
32
+ "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
29
33
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
30
34
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
31
35
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"WForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Form/WForm.vue"],"names":[],"mappings":"AAuJA,iBAAS,cAAc;;yBA0BM,GAAG;;;WASlB,OAAO,IAA6B;EAEjD;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;WArHZ,MAAM;YACL,MAAM;;;;;;;;;;;;;WADP,MAAM;YACL,MAAM;;;;kFA+Hd,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Form/WForm.vue"],"names":[],"mappings":"AA0KA,iBAAS,cAAc;;yBA0BM,GAAG;;;WASlB,OAAO,IAA6B;EAEjD;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;WAhIZ,MAAM;YACL,MAAM;;;;;;;;;;;;;;;;WADP,MAAM;YACL,MAAM;;;;;kFA2Id,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2,6 +2,7 @@ import { defineComponent, toRef, provide, inject, watch, onBeforeUnmount, openBl
2
2
  import { wFormUnlistener } from './models/injection.js';
3
3
  import { useFormErrorMessageMap } from './use/useFormErrorMessageMap.js';
4
4
  import { useFormHasChangesMap } from './use/useFormHasChangesMap.js';
5
+ import { useFormHasValueMap } from './use/useFormHasValueMap.js';
5
6
  import { useFormInitModelMap } from './use/useFormInitModelMap.js';
6
7
  import { useFormInvalidateMap } from './use/useFormInvalidateMap.js';
7
8
  import { useFormTitleMap } from './use/useFormTitleMap.js';
@@ -13,7 +14,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
13
14
  name: {},
14
15
  title: {}
15
16
  },
16
- emits: ["update:is-valid", "update:has-changes"],
17
+ emits: ["update:is-valid", "update:has-changes", "update:has-value"],
17
18
  setup(__props, { expose: __expose, emit: __emit }) {
18
19
  const props = __props;
19
20
  const emit = __emit;
@@ -21,6 +22,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
22
  const { titleGetter, titleMapUnlistener } = useFormTitleMap(name, toRef(props, "title"));
22
23
  const { errorMessageMapUnlistener, isValid, errorMessage, errorMessageMap } = useFormErrorMessageMap(name, titleGetter);
23
24
  const { hasChangesMapUnlistener, hasChanges } = useFormHasChangesMap(name);
25
+ const { hasValueMapUnlistener, hasValue } = useFormHasValueMap(name);
24
26
  const { validateMapUnlistener, validate } = useFormValidateMap(name, titleGetter, (value) => emit("update:is-valid", value));
25
27
  const { invalidateMapUnlistener, invalidate } = useFormInvalidateMap(name);
26
28
  const { initModelMapUnlistener, initModel } = useFormInitModelMap(name);
@@ -28,6 +30,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
30
  titleMapUnlistener(key);
29
31
  errorMessageMapUnlistener(key);
30
32
  hasChangesMapUnlistener(key);
33
+ hasValueMapUnlistener(key);
31
34
  validateMapUnlistener(key);
32
35
  invalidateMapUnlistener(key);
33
36
  initModelMapUnlistener(key);
@@ -36,6 +39,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
36
39
  const unlistenerInjected = inject(wFormUnlistener, void 0);
37
40
  watch(errorMessageMap, () => emit("update:is-valid", isValid.value));
38
41
  watch(hasChanges, (value) => emit("update:has-changes", value));
42
+ watch(hasValue, (value) => emit("update:has-value", value));
39
43
  onBeforeUnmount(() => {
40
44
  if (props.name) {
41
45
  unlistenerInjected?.(props.name);
@@ -44,6 +48,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
48
  });
45
49
  __expose({
46
50
  isValid,
51
+ hasChanges,
52
+ hasValue,
47
53
  validate,
48
54
  invalidate,
49
55
  initModel,
@@ -5,7 +5,7 @@ declare function __VLS_template(): {
5
5
  default: () => void;
6
6
  };
7
7
  refs: {
8
- component: unknown;
8
+ component: any;
9
9
  };
10
10
  attrs: Partial<{}>;
11
11
  };
@@ -24,6 +24,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
24
24
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
25
25
  "update:has-changes": (value: boolean) => any;
26
26
  "update:is-valid": (value: boolean) => any;
27
+ "update:has-value": (value: boolean | null) => any;
27
28
  }, string, import('vue').PublicProps, Readonly<{
28
29
  name?: string;
29
30
  title?: string;
@@ -34,6 +35,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
34
35
  }> & Readonly<{
35
36
  "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
36
37
  "onUpdate:is-valid"?: ((value: boolean) => any) | undefined;
38
+ "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
37
39
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
38
40
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
39
41
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"WFormValidator.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Form/WFormValidator.vue"],"names":[],"mappings":"AAsjBA,iBAAS,cAAc;;iBAXZ,MAAM,IAAI;;iBAAV,MAAM,IAAI;;;;;WA0GP,OAAO,IAA6B;EAEjD;AAmBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;WAnYZ,MAAM;YACL,MAAM;eACH,UAAU,GAAG,UAAU,EAAE;sBAClB,MAAM;sBACN,MAAM;gBACZ,OAAO;;;wBA8OC,MAAM;qBAjEN,IAAI;;;;;WAlLjB,MAAM;YACL,MAAM;eACH,UAAU,GAAG,UAAU,EAAE;sBAClB,MAAM;sBACN,MAAM;gBACZ,OAAO;;;;kFAyYnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WFormValidator.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Form/WFormValidator.vue"],"names":[],"mappings":"AA2lBA,iBAAS,cAAc;;iBAZZ,MAAM,IAAI;;iBAAV,MAAM,IAAI;;;;;WA2GP,OAAO,IAA6B;EAEjD;AAoBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;WAvZZ,MAAM;YACL,MAAM;eACH,UAAU,GAAG,UAAU,EAAE;sBAClB,MAAM;sBACN,MAAM;gBACZ,OAAO;;;wBAgQC,MAAM;qBAzEN,IAAI;;;;;;WA5LjB,MAAM;YACL,MAAM;eACH,UAAU,GAAG,UAAU,EAAE;sBAClB,MAAM;sBACN,MAAM;gBACZ,OAAO;;;;;kFA8ZnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -9,7 +9,7 @@ import '../../utils/supportsPassive.js';
9
9
  import '../Dropdown/utils/DropdownStyle.js';
10
10
  import 'vue-router';
11
11
  import '../../utils/Modal.js';
12
- import { wFormTitleUpdater, wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormValidateUpdater, wFormInvalidateUpdater, wFormInitModelUpdater, wFormUnlistener } from './models/injection.js';
12
+ import { wFormTitleUpdater, wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormHasValueUpdater, wFormValidateUpdater, wFormInvalidateUpdater, wFormInitModelUpdater, wFormUnlistener } from './models/injection.js';
13
13
  import { scrollToValidator } from './models/utils.js';
14
14
  import { validateRequired } from '../../utils/validate.js';
15
15
  import '../Input/WInputSuggest.vue.js';
@@ -27,13 +27,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
27
  requiredSymbols: {},
28
28
  noChanges: { type: Boolean }
29
29
  },
30
- emits: ["update:has-changes", "update:is-valid"],
30
+ emits: ["update:has-changes", "update:has-value", "update:is-valid"],
31
31
  setup(__props, { expose: __expose, emit: __emit }) {
32
32
  const props = __props;
33
33
  const emit = __emit;
34
34
  const titleUpdater = inject(wFormTitleUpdater, void 0);
35
35
  const errorMessageUpdater = inject(wFormErrorMessageUpdater, void 0);
36
36
  const hasChangesUpdater = inject(wFormHasChangesUpdater, void 0);
37
+ const hasValueUpdater = inject(wFormHasValueUpdater, void 0);
37
38
  const validateUpdater = inject(wFormValidateUpdater, void 0);
38
39
  const invalidateUpdater = inject(wFormInvalidateUpdater, void 0);
39
40
  const initModelUpdater = inject(wFormInitModelUpdater, void 0);
@@ -59,12 +60,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
60
  const errorMessage = ref(null);
60
61
  const hasChanges = ref(false);
61
62
  const hasBeenValidated = ref(false);
63
+ const hasValue = computed(() => {
64
+ if (!required.value) return null;
65
+ if (Array.isArray(modelValue.value)) return modelValue.value.length !== 0;
66
+ return modelValue.value !== void 0 && modelValue.value !== null && modelValue.value !== "";
67
+ });
62
68
  const requiredSymbols = computed(() => props.requiredSymbols?.split("") ?? []);
63
69
  const _updateHasChanges = (value) => {
64
70
  if (initModelValue.value === void 0) {
65
71
  hasChanges.value = value !== void 0 && value !== "";
66
72
  } else {
67
- if (value instanceof Array && initModelValue.value instanceof Array) {
73
+ if (Array.isArray(value) && Array.isArray(initModelValue.value)) {
68
74
  const oldValue = initModelValue.value;
69
75
  const newValue = value;
70
76
  hasChanges.value = newValue.length !== oldValue.length || newValue.some((item) => !oldValue.includes(item));
@@ -176,6 +182,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
176
182
  }
177
183
  emit("update:has-changes", value);
178
184
  });
185
+ watch(hasValue, (value) => {
186
+ if (props.name) {
187
+ hasValueUpdater?.(props.name, value);
188
+ }
189
+ emit("update:has-value", value);
190
+ }, { immediate: true });
179
191
  watch(title, (value) => {
180
192
  if (props.name) {
181
193
  titleUpdater?.(props.name, value);
@@ -2,6 +2,7 @@ import { InjectionKey } from 'vue';
2
2
  export declare const wFormTitleUpdater: InjectionKey<(key: string, value: string | undefined) => void>;
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
+ export declare const wFormHasValueUpdater: InjectionKey<(key: string, value: boolean | null) => void>;
5
6
  export declare const wFormValidateUpdater: InjectionKey<(key: string, value: () => string | undefined) => void>;
6
7
  export declare const wFormInvalidateUpdater: InjectionKey<(key: string, value: (messages: Record<string, string | string[] | undefined>) => void) => void>;
7
8
  export declare const wFormInitModelUpdater: InjectionKey<(key: string, value: () => void) => void>;
@@ -1 +1 @@
1
- {"version":3,"file":"injection.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/models/injection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,KAAK,CAAA;AAErC,eAAO,MAAM,iBAAiB,EAAkC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,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
+ {"version":3,"file":"injection.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/models/injection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,KAAK,CAAA;AAErC,eAAO,MAAM,iBAAiB,EAAkC,YAAY,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,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,OAAO,GAAG,IAAI,KAAK,IAAI,CAAC,CAAA;AAEhI,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,9 +1,10 @@
1
1
  const wFormTitleUpdater = Symbol("wFormTitleUpdater");
2
2
  const wFormErrorMessageUpdater = Symbol("wFormErrorMessageUpdater");
3
3
  const wFormHasChangesUpdater = Symbol("wFormHasChangesUpdater");
4
+ const wFormHasValueUpdater = Symbol("wFormHasValueUpdater");
4
5
  const wFormValidateUpdater = Symbol("wFormValidateUpdater");
5
6
  const wFormInvalidateUpdater = Symbol("wFormValidateUpdater");
6
7
  const wFormInitModelUpdater = Symbol("wFormInitModelUpdater");
7
8
  const wFormUnlistener = Symbol("wFormUnlistener");
8
9
 
9
- export { wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormInitModelUpdater, wFormInvalidateUpdater, wFormTitleUpdater, wFormUnlistener, wFormValidateUpdater };
10
+ export { wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormHasValueUpdater, wFormInitModelUpdater, wFormInvalidateUpdater, wFormTitleUpdater, wFormUnlistener, wFormValidateUpdater };
@@ -0,0 +1,6 @@
1
+ import { Ref } from 'vue';
2
+ export declare const useFormHasValueMap: (name: Ref<string | undefined>) => {
3
+ hasValueMapUnlistener: (key: string) => void;
4
+ hasValue: import('vue').ComputedRef<boolean | null>;
5
+ };
6
+ //# sourceMappingURL=useFormHasValueMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFormHasValueMap.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/use/useFormHasValueMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,GAAG,EAAwC,MAAM,KAAK,CAAA;AAInE,eAAO,MAAM,kBAAkB,SAAU,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC;iCAe1B,MAAM;;CAkB3C,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { ref, computed, provide, inject, watch } from 'vue';
2
+ import { wFormHasValueUpdater } from '../models/injection.js';
3
+
4
+ const useFormHasValueMap = (name) => {
5
+ const hasValueMap = ref({});
6
+ const hasValue = computed(() => {
7
+ const items = Object.values(hasValueMap.value);
8
+ if (items.length === 0) return null;
9
+ return items.length !== 0 && items.every((value) => value);
10
+ });
11
+ const hasValueMapUpdater = (key, value) => {
12
+ if (value === null) hasValueMapUnlistener(key);
13
+ else hasValueMap.value[key] = value;
14
+ };
15
+ const hasValueMapUnlistener = (key) => {
16
+ if (key in hasValueMap.value) delete hasValueMap.value[key];
17
+ };
18
+ provide(wFormHasValueUpdater, hasValueMapUpdater);
19
+ const hasValueUpdaterInjected = inject(wFormHasValueUpdater, void 0);
20
+ watch(hasValue, (value) => {
21
+ if (name.value) {
22
+ hasValueUpdaterInjected?.(name.value, value);
23
+ }
24
+ }, { immediate: true });
25
+ return {
26
+ hasValueMapUnlistener,
27
+ hasValue
28
+ };
29
+ };
30
+
31
+ export { useFormHasValueMap };
@@ -7,8 +7,8 @@ declare const _default: <Model, FieldType extends string | number | boolean | nu
7
7
  attrs: any;
8
8
  slots: {
9
9
  option?(_: {
10
- option: FieldType | Entity | (ValueGetter extends undefined ? FieldType : Entity);
11
- selected: boolean;
10
+ option: any;
11
+ selected: any;
12
12
  }): any;
13
13
  };
14
14
  emit: {};
@@ -5,10 +5,7 @@ declare function __VLS_template(): {
5
5
  search?(_: {}): any;
6
6
  };
7
7
  refs: {
8
- input: import('vue').ShallowUnwrapRef<{
9
- focus: () => void;
10
- blur: () => void;
11
- }> | null;
8
+ input: any;
12
9
  };
13
10
  attrs: Partial<{}>;
14
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WHeaderBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HeaderBar/WHeaderBar.vue"],"names":[],"mappings":"AA0OA,iBAAS,cAAc;;uBA2OI,GAAG;wBACD,GAAG;wBACH,GAAG;;;;;;;;WAUlB,OAAO,IAA6B;EAEjD;AAsBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;YArVT,MAAM;aACL,MAAM;oBACC,OAAO;oBACP,MAAM;;;;YAHd,MAAM;aACL,MAAM;oBACC,OAAO;oBACP,MAAM;;;;WAHd,MAAM;YACL,MAAM;mBAEC,MAAM;6EA4VxB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WHeaderBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HeaderBar/WHeaderBar.vue"],"names":[],"mappings":"AA0OA,iBAAS,cAAc;;uBA2OI,GAAG;wBACD,GAAG;wBACH,GAAG;;;;;WAUlB,OAAO,IAA6B;EAEjD;AAsBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;YArVT,MAAM;aACL,MAAM;oBACC,OAAO;oBACP,MAAM;;;;YAHd,MAAM;aACL,MAAM;oBACC,OAAO;oBACP,MAAM;;;;WAHd,MAAM;YACL,MAAM;mBAEC,MAAM;6EA4VxB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -7,12 +7,7 @@ declare function __VLS_template(): {
7
7
  right?(_: {}): any;
8
8
  };
9
9
  refs: {
10
- inputComponent: import('vue').ShallowUnwrapRef<{
11
- focus: () => void;
12
- blur: () => void;
13
- close: () => void;
14
- updateDropdown: () => void;
15
- }> | null;
10
+ inputComponent: any;
16
11
  };
17
12
  attrs: Partial<{}>;
18
13
  };
@@ -29,12 +24,7 @@ declare const __VLS_component: import('vue').DefineComponent<InputDateProps, {},
29
24
  minDate: Date;
30
25
  maxDate: Date;
31
26
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
32
- inputComponent: import('vue').ShallowUnwrapRef<{
33
- focus: () => void;
34
- blur: () => void;
35
- close: () => void;
36
- updateDropdown: () => void;
37
- }> | null;
27
+ inputComponent: any;
38
28
  }, any>;
39
29
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
40
30
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"WInputDate.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Input/WInputDate.vue"],"names":[],"mappings":"AAgHA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAO3C,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAA;AAuEvD,iBAAS,cAAc;;uBAiJK,GAAG;0BACA,GAAG;uBACN,GAAG;;;;;;;;;;WAUjB,OAAO,IAA6B;EAEjD;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;OAWnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WInputDate.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Input/WInputDate.vue"],"names":[],"mappings":"AAgHA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAO3C,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAA;AAuEvD,iBAAS,cAAc;;uBAiJK,GAAG;0BACA,GAAG;uBACN,GAAG;;;;;WAUjB,OAAO,IAA6B;EAEjD;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;OAWnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -18,7 +18,7 @@ declare const _default: <Type extends InputType = "text", Option extends Record<
18
18
  right?(_: {}): any;
19
19
  option?(_: {
20
20
  option: Option;
21
- selected: boolean;
21
+ selected: any;
22
22
  model: boolean;
23
23
  }): any;
24
24
  };