eco-vue-js 0.9.8 → 0.9.10
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.
- package/dist/components/Form/WFormValidator.vue.d.ts +2 -0
- package/dist/components/Form/WFormValidator.vue.d.ts.map +1 -1
- package/dist/components/Form/WFormValidator.vue.js +5 -3
- package/dist/components/Modal/WModalStepper.vue.d.ts +300 -170
- package/dist/components/Modal/WModalStepper.vue.d.ts.map +1 -1
- package/dist/components/Modal/WModalStepper.vue.js +1 -0
- package/dist/components/Tabs/WTabs.vue.d.ts +146 -85
- package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue.js +62 -55
- package/dist/components/Tabs/WTabsStepper.vue.d.ts +294 -170
- package/dist/components/Tabs/WTabsStepper.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabsStepper.vue.js +8 -3
- package/dist/components/Tabs/components/TabItem.vue.d.ts +190 -2
- package/dist/components/Tabs/components/TabItem.vue.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabItem.vue.js +36 -16
- package/dist/components/Tabs/components/TabTitleButton.vue.d.ts +31 -5
- package/dist/components/Tabs/components/TabTitleButton.vue.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabTitleButton.vue.js +118 -62
- package/dist/components/Tabs/types.d.ts +4 -1
- package/dist/components/Tabs/types.d.ts.map +1 -1
- package/dist/utils/useDefaultQuery.d.ts.map +1 -1
- package/dist/utils/useDefaultQuery.js +2 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WModalStepper.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/WModalStepper.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WModalStepper.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/WModalStepper.vue"],"names":[],"mappings":"AA0KA,iBAAS,cAAc;;uBA4PI,GAAG;yBACA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAkEiuS,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4DAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;WAxD12S,OAAO,IAA6B;EAEjD;AAsBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;cA7UT,OAAO;eACN,OAAO;mBACH,OAAO;;gBAqBP,IAAI;oBAJA,IAAI;;;;;;cAnBb,OAAO;eACN,OAAO;mBACH,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDA0W0uS,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wDAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;OAlBt3S,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"}
|
@@ -92,6 +92,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
92
92
|
default: withCtx(() => [
|
93
93
|
createVNode(_sfc_main$4, {
|
94
94
|
ref: "tabsStepper",
|
95
|
+
"no-header": "",
|
95
96
|
"onUpdate:first": _cache[0] || (_cache[0] = ($event) => first.value = $event),
|
96
97
|
"onUpdate:last": _cache[1] || (_cache[1] = ($event) => last.value = $event),
|
97
98
|
"onUpdate:currentTitle": _cache[2] || (_cache[2] = ($event) => currentTitle.value = $event),
|
@@ -7,6 +7,7 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
7
7
|
next: () => void;
|
8
8
|
previous: () => void;
|
9
9
|
validate: (index: number, silent?: boolean | undefined, path?: import('../Form/use/useFormValidateMap').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof WForm>["validate"]>;
|
10
|
+
validateIfNoError: (index: number, silent?: boolean | undefined, path?: import('../Form/use/useFormValidateMap').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof WForm>["validate"]>;
|
10
11
|
invalidate: (index: number, payload: {
|
11
12
|
[x: string]: string | string[] | undefined;
|
12
13
|
}) => ReturnType<ComponentInstance<typeof WForm>["invalidate"]>;
|
@@ -33,8 +34,15 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
33
34
|
readonly index: number;
|
34
35
|
readonly hasError: boolean;
|
35
36
|
readonly hasChanges: boolean;
|
37
|
+
readonly hasValue: boolean;
|
36
38
|
readonly title: string;
|
37
39
|
readonly icon: SVGComponent | undefined;
|
40
|
+
readonly first: boolean;
|
41
|
+
readonly last: boolean;
|
42
|
+
readonly disabled?: boolean | undefined;
|
43
|
+
readonly stepper?: boolean | undefined;
|
44
|
+
readonly showHasValue?: boolean | undefined;
|
45
|
+
readonly noIndicator?: boolean | undefined;
|
38
46
|
readonly side?: boolean | undefined;
|
39
47
|
readonly onClick?: ((value: MouseEvent) => any) | undefined;
|
40
48
|
readonly "onUpdate:indicator-style"?: ((value: CSSProperties) => any) | undefined;
|
@@ -50,7 +58,7 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
50
58
|
$refs: {
|
51
59
|
[x: string]: unknown;
|
52
60
|
} & {
|
53
|
-
|
61
|
+
container: HTMLDivElement;
|
54
62
|
};
|
55
63
|
$slots: Readonly<{
|
56
64
|
[name: string]: import('vue').Slot<any> | undefined;
|
@@ -69,8 +77,15 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
69
77
|
index: number;
|
70
78
|
hasError: boolean;
|
71
79
|
hasChanges: boolean;
|
80
|
+
hasValue: boolean;
|
72
81
|
title: string;
|
73
82
|
icon: SVGComponent | undefined;
|
83
|
+
first: boolean;
|
84
|
+
last: boolean;
|
85
|
+
disabled?: boolean;
|
86
|
+
stepper?: boolean;
|
87
|
+
showHasValue?: boolean;
|
88
|
+
noIndicator?: boolean;
|
74
89
|
side?: boolean;
|
75
90
|
}> & Readonly<{
|
76
91
|
onClick?: ((value: MouseEvent) => any) | undefined;
|
@@ -115,8 +130,15 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
115
130
|
index: number;
|
116
131
|
hasError: boolean;
|
117
132
|
hasChanges: boolean;
|
133
|
+
hasValue: boolean;
|
118
134
|
title: string;
|
119
135
|
icon: SVGComponent | undefined;
|
136
|
+
first: boolean;
|
137
|
+
last: boolean;
|
138
|
+
disabled?: boolean;
|
139
|
+
stepper?: boolean;
|
140
|
+
showHasValue?: boolean;
|
141
|
+
noIndicator?: boolean;
|
120
142
|
side?: boolean;
|
121
143
|
}> & Readonly<{
|
122
144
|
onClick?: ((value: MouseEvent) => any) | undefined;
|
@@ -130,17 +152,32 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
130
152
|
update: () => void;
|
131
153
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
132
154
|
$slots: {
|
133
|
-
title?(_: {
|
134
|
-
|
135
|
-
|
155
|
+
title?(_: {
|
156
|
+
hasChanges: boolean;
|
157
|
+
hasError: boolean;
|
158
|
+
hasValue: boolean;
|
159
|
+
}): any;
|
160
|
+
suffix?(_: {
|
161
|
+
hasChanges: boolean;
|
162
|
+
hasError: boolean;
|
163
|
+
hasValue: boolean;
|
164
|
+
}): any;
|
165
|
+
right?(_: {
|
166
|
+
hasChanges: boolean;
|
167
|
+
hasError: boolean;
|
168
|
+
hasValue: boolean;
|
169
|
+
}): any;
|
136
170
|
};
|
137
171
|
}) | null)[];
|
138
172
|
tabItem: (({
|
139
173
|
$: import('vue').ComponentInternalInstance;
|
140
174
|
$data: {};
|
141
175
|
$props: {
|
176
|
+
readonly name: string;
|
177
|
+
readonly title: string;
|
142
178
|
readonly active: boolean;
|
143
179
|
readonly removable: boolean;
|
180
|
+
readonly "onTab:switch"?: ((value: string) => any) | undefined;
|
144
181
|
readonly "onUpdate:height"?: ((value: number) => any) | undefined;
|
145
182
|
readonly "onUpdate:active"?: (() => any) | undefined;
|
146
183
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
@@ -150,7 +187,93 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
150
187
|
$refs: {
|
151
188
|
[x: string]: unknown;
|
152
189
|
} & {
|
153
|
-
|
190
|
+
form: ({
|
191
|
+
$: import('vue').ComponentInternalInstance;
|
192
|
+
$data: {};
|
193
|
+
$props: {
|
194
|
+
readonly name?: string | undefined;
|
195
|
+
readonly title?: string | undefined;
|
196
|
+
readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
197
|
+
readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
198
|
+
readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
199
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
200
|
+
$attrs: {
|
201
|
+
[x: string]: unknown;
|
202
|
+
};
|
203
|
+
$refs: {
|
204
|
+
[x: string]: unknown;
|
205
|
+
};
|
206
|
+
$slots: Readonly<{
|
207
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
208
|
+
}>;
|
209
|
+
$root: import('vue').ComponentPublicInstance | null;
|
210
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
211
|
+
$host: Element | null;
|
212
|
+
$emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-value", value: boolean | null) => void);
|
213
|
+
$el: any;
|
214
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
215
|
+
name?: string;
|
216
|
+
title?: string;
|
217
|
+
}> & Readonly<{
|
218
|
+
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
219
|
+
"onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
220
|
+
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
221
|
+
}>, {
|
222
|
+
isValid: import('vue').ComputedRef<boolean>;
|
223
|
+
hasChanges: import('vue').ComputedRef<boolean>;
|
224
|
+
hasValue: import('vue').ComputedRef<boolean | null>;
|
225
|
+
validate: (silent?: boolean, path?: import('../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
|
226
|
+
invalidate: (payload: {
|
227
|
+
[x: string]: string | string[] | undefined;
|
228
|
+
}) => void;
|
229
|
+
initModel: () => void;
|
230
|
+
errorMessage: import('vue').ComputedRef<string>;
|
231
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
232
|
+
"update:has-changes": (value: boolean) => any;
|
233
|
+
"update:is-valid": (value: boolean | undefined) => any;
|
234
|
+
"update:has-value": (value: boolean | null) => any;
|
235
|
+
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
236
|
+
beforeCreate?: (() => void) | (() => void)[];
|
237
|
+
created?: (() => void) | (() => void)[];
|
238
|
+
beforeMount?: (() => void) | (() => void)[];
|
239
|
+
mounted?: (() => void) | (() => void)[];
|
240
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
241
|
+
updated?: (() => void) | (() => void)[];
|
242
|
+
activated?: (() => void) | (() => void)[];
|
243
|
+
deactivated?: (() => void) | (() => void)[];
|
244
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
245
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
246
|
+
destroyed?: (() => void) | (() => void)[];
|
247
|
+
unmounted?: (() => void) | (() => void)[];
|
248
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
249
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
250
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
251
|
+
};
|
252
|
+
$forceUpdate: () => void;
|
253
|
+
$nextTick: typeof import('vue').nextTick;
|
254
|
+
$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;
|
255
|
+
} & Readonly<{}> & Omit<Readonly<{
|
256
|
+
name?: string;
|
257
|
+
title?: string;
|
258
|
+
}> & Readonly<{
|
259
|
+
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
260
|
+
"onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
261
|
+
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
262
|
+
}>, "errorMessage" | "hasChanges" | "isValid" | "hasValue" | "validate" | "invalidate" | "initModel"> & import('vue').ShallowUnwrapRef<{
|
263
|
+
isValid: import('vue').ComputedRef<boolean>;
|
264
|
+
hasChanges: import('vue').ComputedRef<boolean>;
|
265
|
+
hasValue: import('vue').ComputedRef<boolean | null>;
|
266
|
+
validate: (silent?: boolean, path?: import('../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
|
267
|
+
invalidate: (payload: {
|
268
|
+
[x: string]: string | string[] | undefined;
|
269
|
+
}) => void;
|
270
|
+
initModel: () => void;
|
271
|
+
errorMessage: import('vue').ComputedRef<string>;
|
272
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
273
|
+
$slots: {
|
274
|
+
default?(_: {}): any;
|
275
|
+
};
|
276
|
+
}) | null;
|
154
277
|
};
|
155
278
|
$slots: Readonly<{
|
156
279
|
[name: string]: import('vue').Slot<any> | undefined;
|
@@ -158,97 +281,32 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
158
281
|
$root: import('vue').ComponentPublicInstance | null;
|
159
282
|
$parent: import('vue').ComponentPublicInstance | null;
|
160
283
|
$host: Element | null;
|
161
|
-
$emit: ((event: "update:height", value: number) => void) & ((event: "update:active") => void);
|
284
|
+
$emit: ((event: "tab:switch", value: string) => void) & ((event: "update:height", value: number) => void) & ((event: "update:active") => void);
|
162
285
|
$el: any;
|
163
286
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
287
|
+
name: string;
|
288
|
+
title: string;
|
164
289
|
active: boolean;
|
165
290
|
removable: boolean;
|
166
291
|
}> & Readonly<{
|
292
|
+
"onTab:switch"?: ((value: string) => any) | undefined;
|
167
293
|
"onUpdate:height"?: ((value: number) => any) | undefined;
|
168
294
|
"onUpdate:active"?: (() => any) | undefined;
|
169
295
|
}>, {
|
170
296
|
emitHeight: () => void;
|
171
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
172
|
-
"update:height": (value: number) => any;
|
173
|
-
"update:active": () => any;
|
174
|
-
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
175
|
-
beforeCreate?: (() => void) | (() => void)[];
|
176
|
-
created?: (() => void) | (() => void)[];
|
177
|
-
beforeMount?: (() => void) | (() => void)[];
|
178
|
-
mounted?: (() => void) | (() => void)[];
|
179
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
180
|
-
updated?: (() => void) | (() => void)[];
|
181
|
-
activated?: (() => void) | (() => void)[];
|
182
|
-
deactivated?: (() => void) | (() => void)[];
|
183
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
184
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
185
|
-
destroyed?: (() => void) | (() => void)[];
|
186
|
-
unmounted?: (() => void) | (() => void)[];
|
187
|
-
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
188
|
-
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
189
|
-
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
190
|
-
};
|
191
|
-
$forceUpdate: () => void;
|
192
|
-
$nextTick: typeof import('vue').nextTick;
|
193
|
-
$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;
|
194
|
-
} & Readonly<{}> & Omit<Readonly<{
|
195
|
-
active: boolean;
|
196
|
-
removable: boolean;
|
197
|
-
}> & Readonly<{
|
198
|
-
"onUpdate:height"?: ((value: number) => any) | undefined;
|
199
|
-
"onUpdate:active"?: (() => any) | undefined;
|
200
|
-
}>, "emitHeight"> & import('vue').ShallowUnwrapRef<{
|
201
|
-
emitHeight: () => void;
|
202
|
-
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
203
|
-
$slots: {
|
204
|
-
default?(_: {}): any;
|
205
|
-
};
|
206
|
-
}) | null)[];
|
207
|
-
form: (({
|
208
|
-
$: import('vue').ComponentInternalInstance;
|
209
|
-
$data: {};
|
210
|
-
$props: {
|
211
|
-
readonly name?: string | undefined;
|
212
|
-
readonly title?: string | undefined;
|
213
|
-
readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
214
|
-
readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
215
|
-
readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
216
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
217
|
-
$attrs: {
|
218
|
-
[x: string]: unknown;
|
219
|
-
};
|
220
|
-
$refs: {
|
221
|
-
[x: string]: unknown;
|
222
|
-
};
|
223
|
-
$slots: Readonly<{
|
224
|
-
[name: string]: import('vue').Slot<any> | undefined;
|
225
|
-
}>;
|
226
|
-
$root: import('vue').ComponentPublicInstance | null;
|
227
|
-
$parent: import('vue').ComponentPublicInstance | null;
|
228
|
-
$host: Element | null;
|
229
|
-
$emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-value", value: boolean | null) => void);
|
230
|
-
$el: any;
|
231
|
-
$options: import('vue').ComponentOptionsBase<Readonly<{
|
232
|
-
name?: string;
|
233
|
-
title?: string;
|
234
|
-
}> & Readonly<{
|
235
|
-
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
236
|
-
"onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
237
|
-
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
238
|
-
}>, {
|
239
297
|
isValid: import('vue').ComputedRef<boolean>;
|
240
298
|
hasChanges: import('vue').ComputedRef<boolean>;
|
241
299
|
hasValue: import('vue').ComputedRef<boolean | null>;
|
300
|
+
errorMessage: import('vue').ComputedRef<string | undefined>;
|
242
301
|
validate: (silent?: boolean, path?: import('../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
|
243
302
|
invalidate: (payload: {
|
244
303
|
[x: string]: string | string[] | undefined;
|
245
304
|
}) => void;
|
246
305
|
initModel: () => void;
|
247
|
-
errorMessage: import('vue').ComputedRef<string>;
|
248
306
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
249
|
-
"
|
250
|
-
"update:
|
251
|
-
"update:
|
307
|
+
"tab:switch": (value: string) => any;
|
308
|
+
"update:height": (value: number) => any;
|
309
|
+
"update:active": () => any;
|
252
310
|
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
253
311
|
beforeCreate?: (() => void) | (() => void)[];
|
254
312
|
created?: (() => void) | (() => void)[];
|
@@ -270,22 +328,25 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
270
328
|
$nextTick: typeof import('vue').nextTick;
|
271
329
|
$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;
|
272
330
|
} & Readonly<{}> & Omit<Readonly<{
|
273
|
-
name
|
274
|
-
title
|
331
|
+
name: string;
|
332
|
+
title: string;
|
333
|
+
active: boolean;
|
334
|
+
removable: boolean;
|
275
335
|
}> & Readonly<{
|
276
|
-
"
|
277
|
-
"onUpdate:
|
278
|
-
"onUpdate:
|
279
|
-
}>, "errorMessage" | "hasChanges" | "isValid" | "hasValue" | "validate" | "invalidate" | "initModel"> & import('vue').ShallowUnwrapRef<{
|
336
|
+
"onTab:switch"?: ((value: string) => any) | undefined;
|
337
|
+
"onUpdate:height"?: ((value: number) => any) | undefined;
|
338
|
+
"onUpdate:active"?: (() => any) | undefined;
|
339
|
+
}>, "errorMessage" | "hasChanges" | "isValid" | "hasValue" | "validate" | "invalidate" | "initModel" | "emitHeight"> & import('vue').ShallowUnwrapRef<{
|
340
|
+
emitHeight: () => void;
|
280
341
|
isValid: import('vue').ComputedRef<boolean>;
|
281
342
|
hasChanges: import('vue').ComputedRef<boolean>;
|
282
343
|
hasValue: import('vue').ComputedRef<boolean | null>;
|
344
|
+
errorMessage: import('vue').ComputedRef<string | undefined>;
|
283
345
|
validate: (silent?: boolean, path?: import('../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
|
284
346
|
invalidate: (payload: {
|
285
347
|
[x: string]: string | string[] | undefined;
|
286
348
|
}) => void;
|
287
349
|
initModel: () => void;
|
288
|
-
errorMessage: import('vue').ComputedRef<string>;
|
289
350
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
290
351
|
$slots: {
|
291
352
|
default?(_: {}): any;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"AAqUA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,SAAS,CAAA;AAEtC,OAAO,EAAC,KAAK,aAAa,EAA6G,MAAM,KAAK,CAAA;AAElJ,OAAO,KAAK,MAAM,6BAA6B,CAAA;;2BAiFjB,MAAM;yBAMR,MAAM;gBAcjB,IAAI;oBAIA,IAAI;sBAUA,MAAM,6GAAqE,UAAU,CAAC,iBAAiB,CAAC,OAAO,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC;+BAIzH,MAAM,6GAAqE,UAAU,CAAC,iBAAiB,CAAC,OAAO,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC;wBAMzI,MAAM;;UAAuE,UAAU,CAAC,iBAAiB,CAAC,OAAO,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC;uBAIvI,MAAM,KAAsE,UAAU,CAAC,iBAAiB,CAAC,OAAO,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA0O1E,GAAG,8CAA8C,GAAG,yBAA0B,GAAE,6DACnI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CADgD,GAAG,8CAA8C,GAAG,yBAA0B,GAAE,6DACnI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCADgD,GAAG,8CAA8C,GAAG,yBAA0B,GAAE,6DACnI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwJpC,wBAeG"}
|
@@ -1,9 +1,19 @@
|
|
1
|
-
import { defineComponent, useSlots, useTemplateRef, computed, ref, inject, watch, onMounted, onUnmounted, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createBlock, unref, createSlots, withCtx, resolveDynamicComponent, mergeProps,
|
2
|
-
import
|
1
|
+
import { defineComponent, useSlots, useTemplateRef, computed, ref, inject, watch, onMounted, onUnmounted, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createBlock, unref, createSlots, withCtx, resolveDynamicComponent, mergeProps, normalizeStyle, createCommentVNode, createVNode, TransitionGroup } from 'vue';
|
2
|
+
import '../Button/WButtonAction.vue.js';
|
3
|
+
import '../Button/WButton.vue.js';
|
3
4
|
import { debounce, throttle } from '../../utils/utils.js';
|
5
|
+
import '../Button/WButtonDropdown.vue.js';
|
6
|
+
import '../../utils/supportsPassive.js';
|
7
|
+
import '../Dropdown/utils/DropdownStyle.js';
|
8
|
+
import 'vue-router';
|
9
|
+
import { wTabItemListener, wTabItemUnlistener } from './models/injection.js';
|
10
|
+
import '../../utils/Modal.js';
|
11
|
+
import '../Input/WInputSuggest.vue.js';
|
12
|
+
import '../Input/WInputDate.vue.js';
|
13
|
+
import '../Link/WLink.vue.js';
|
14
|
+
import '@tanstack/vue-query';
|
4
15
|
import _sfc_main$2 from './components/TabItem.vue.js';
|
5
16
|
import _sfc_main$1 from './components/TabTitleButton.vue.js';
|
6
|
-
import { wTabItemListener, wTabItemUnlistener } from './models/injection.js';
|
7
17
|
|
8
18
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
9
19
|
__name: "WTabs",
|
@@ -15,7 +25,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
25
|
side: { type: Boolean },
|
16
26
|
disableMinHeight: { type: Boolean },
|
17
27
|
noHeader: { type: Boolean },
|
18
|
-
switchToNew: { type: Boolean }
|
28
|
+
switchToNew: { type: Boolean },
|
29
|
+
noIndicator: { type: Boolean },
|
30
|
+
stepper: { type: Boolean },
|
31
|
+
showHasValue: { type: Boolean }
|
19
32
|
},
|
20
33
|
emits: ["update:current", "update:current-index", "update:has-changes", "update:current-title", "update:tabs-length"],
|
21
34
|
setup(__props, { expose: __expose, emit: __emit }) {
|
@@ -48,10 +61,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
48
61
|
const indicatorStyle = ref(void 0);
|
49
62
|
const minHeight = ref(0);
|
50
63
|
const tabItemRef = useTemplateRef("tabItem");
|
51
|
-
const
|
52
|
-
const
|
64
|
+
const currentIsValid = computed(() => tabItemRef.value?.[currentIndex.value]?.isValid ?? true);
|
65
|
+
const hasNoValueFirst = computed(() => {
|
66
|
+
if (!props.stepper) return 0;
|
67
|
+
const index = tabItemRef.value?.findIndex((item) => item?.hasValue === false) ?? 0;
|
68
|
+
if (index === -1) return defaultSlotsKeys.value.length;
|
69
|
+
return index;
|
70
|
+
});
|
53
71
|
const switchOnInvalid = debounce((key) => {
|
54
|
-
if (
|
72
|
+
if (currentIsValid.value !== false) switchTab(key);
|
55
73
|
}, 50);
|
56
74
|
const switchTab = throttle((key) => {
|
57
75
|
if (current.value === key) return;
|
@@ -82,13 +100,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
82
100
|
minHeight.value = value;
|
83
101
|
};
|
84
102
|
const validate = (index, ...args) => {
|
85
|
-
return
|
103
|
+
return tabItemRef.value?.[index]?.validate(...args);
|
104
|
+
};
|
105
|
+
const validateIfNoError = (index, ...args) => {
|
106
|
+
if (tabItemRef.value?.[index]?.errorMessage) return tabItemRef.value?.[index].errorMessage;
|
107
|
+
return tabItemRef.value?.[index]?.validate(...args);
|
86
108
|
};
|
87
109
|
const invalidate = (index, ...args) => {
|
88
|
-
return
|
110
|
+
return tabItemRef.value?.[index]?.invalidate(...args);
|
89
111
|
};
|
90
112
|
const initModel = (index, ...args) => {
|
91
|
-
return
|
113
|
+
return tabItemRef.value?.[index]?.initModel(...args);
|
92
114
|
};
|
93
115
|
const updateIndicator = () => {
|
94
116
|
buttonRef.value?.forEach((item) => item?.update());
|
@@ -97,10 +119,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
97
119
|
if (!buttonContainerRef.value) return;
|
98
120
|
if (props.side) {
|
99
121
|
if (buttonContainerRef.value.scrollHeight <= buttonContainerRef.value.offsetHeight) return;
|
100
|
-
buttonContainerRef.value.scrollTo({ top:
|
122
|
+
buttonContainerRef.value.scrollTo({ top: value.top - buttonContainerRef.value.offsetHeight / 2, behavior: "smooth" });
|
101
123
|
} else {
|
102
124
|
if (buttonContainerRef.value.scrollWidth <= buttonContainerRef.value.offsetWidth) return;
|
103
|
-
buttonContainerRef.value.scrollTo({ left:
|
125
|
+
buttonContainerRef.value.scrollTo({ left: value.left - buttonContainerRef.value.offsetWidth / 2, behavior: "smooth" });
|
104
126
|
}
|
105
127
|
};
|
106
128
|
const tabItemListenerInjected = inject(wTabItemListener, null);
|
@@ -137,6 +159,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
137
159
|
next,
|
138
160
|
previous,
|
139
161
|
validate,
|
162
|
+
validateIfNoError,
|
140
163
|
invalidate,
|
141
164
|
initModel
|
142
165
|
});
|
@@ -152,7 +175,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
152
175
|
ref: "buttonContainer",
|
153
176
|
class: normalizeClass(["no-scrollbar relative snap-x snap-mandatory snap-always overflow-x-auto overscroll-x-contain", {
|
154
177
|
"grid grid-cols-[1fr,auto]": _ctx.side,
|
155
|
-
"flex": !_ctx.side
|
178
|
+
"flex pr-[30%]": !_ctx.side
|
156
179
|
}])
|
157
180
|
}, [
|
158
181
|
(openBlock(true), createElementBlock(Fragment, null, renderList(defaultSlotsAll.value, (slot, index) => {
|
@@ -167,62 +190,54 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
167
190
|
index,
|
168
191
|
title: slot.props?.title,
|
169
192
|
icon: slot.props?.icon,
|
170
|
-
"has-changes": unref(
|
171
|
-
"has-error": unref(
|
193
|
+
"has-changes": unref(tabItemRef)?.[defaultSlots.value.indexOf(slot)]?.hasChanges === true,
|
194
|
+
"has-error": unref(tabItemRef)?.[defaultSlots.value.indexOf(slot)]?.isValid === false,
|
195
|
+
"has-value": unref(tabItemRef)?.[defaultSlots.value.indexOf(slot)]?.hasValue === true,
|
196
|
+
first: defaultSlots.value.indexOf(slot) === 0,
|
197
|
+
last: defaultSlots.value.indexOf(slot) === defaultSlots.value.length - 1,
|
198
|
+
disabled: _ctx.stepper ? defaultSlots.value.indexOf(slot) > hasNoValueFirst.value : false,
|
199
|
+
stepper: _ctx.stepper,
|
200
|
+
"show-has-value": _ctx.showHasValue,
|
172
201
|
side: _ctx.side,
|
173
|
-
|
174
|
-
"col-span-2 grid grid-cols-subgrid": _ctx.side,
|
175
|
-
"grid-cols-[1fr,auto]": !_ctx.side
|
176
|
-
}),
|
202
|
+
"no-indicator": _ctx.noIndicator,
|
177
203
|
"onUpdate:indicatorStyle": _cache[0] || (_cache[0] = ($event) => indicatorStyle.value = $event),
|
178
204
|
"onUpdate:scrollPosition": updateScrollPosition,
|
179
205
|
onClick: ($event) => unref(switchTab)(slot.props?.name)
|
180
206
|
}, createSlots({ _: 2 }, [
|
181
207
|
slot.children?.title ? {
|
182
208
|
name: "title",
|
183
|
-
fn: withCtx(() => [
|
184
|
-
(openBlock(), createBlock(resolveDynamicComponent(slot.children?.title), mergeProps({ ref_for: true },
|
185
|
-
hasError: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.isValid === false,
|
186
|
-
hasChanges: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.hasChanges === true,
|
187
|
-
hasValue: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.hasValue === true
|
188
|
-
}), null, 16))
|
209
|
+
fn: withCtx((scope) => [
|
210
|
+
(openBlock(), createBlock(resolveDynamicComponent(slot.children?.title), mergeProps({ ref_for: true }, scope), null, 16))
|
189
211
|
]),
|
190
212
|
key: "0"
|
191
213
|
} : void 0,
|
192
214
|
slot.children?.suffix ? {
|
193
215
|
name: "suffix",
|
194
|
-
fn: withCtx(() => [
|
195
|
-
(openBlock(), createBlock(resolveDynamicComponent(slot.children?.suffix), mergeProps({ ref_for: true },
|
196
|
-
hasError: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.isValid === false,
|
197
|
-
hasChanges: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.hasChanges === true,
|
198
|
-
hasValue: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.hasValue === true
|
199
|
-
}), null, 16))
|
216
|
+
fn: withCtx((scope) => [
|
217
|
+
(openBlock(), createBlock(resolveDynamicComponent(slot.children?.suffix), mergeProps({ ref_for: true }, scope), null, 16))
|
200
218
|
]),
|
201
219
|
key: "1"
|
202
220
|
} : void 0,
|
203
221
|
slot.children?.right ? {
|
204
222
|
name: "right",
|
205
|
-
fn: withCtx(() => [
|
206
|
-
(openBlock(), createBlock(resolveDynamicComponent(slot.children?.right), mergeProps({ ref_for: true },
|
207
|
-
hasError: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.isValid === false,
|
208
|
-
hasChanges: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.hasChanges === true,
|
209
|
-
hasValue: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.hasValue === true
|
210
|
-
}), null, 16))
|
223
|
+
fn: withCtx((scope) => [
|
224
|
+
(openBlock(), createBlock(resolveDynamicComponent(slot.children?.right), mergeProps({ ref_for: true }, scope), null, 16))
|
211
225
|
]),
|
212
226
|
key: "2"
|
213
227
|
} : void 0
|
214
|
-
]), 1032, ["active", "index", "title", "icon", "has-changes", "has-error", "side", "
|
228
|
+
]), 1032, ["active", "index", "title", "icon", "has-changes", "has-error", "has-value", "first", "last", "disabled", "stepper", "show-has-value", "side", "no-indicator", "onClick"])) : (openBlock(), createBlock(resolveDynamicComponent(slot), { key: 1 }))
|
215
229
|
], 64);
|
216
230
|
}), 128)),
|
217
|
-
|
231
|
+
!_ctx.noIndicator ? (openBlock(), createElementBlock("div", {
|
232
|
+
key: 0,
|
218
233
|
class: normalizeClass(["absolute rounded-sm duration-500", {
|
219
|
-
"bg-primary-default dark:bg-primary-dark":
|
220
|
-
"bg-negative dark:bg-negative-dark":
|
234
|
+
"bg-primary-default dark:bg-primary-dark": currentIsValid.value !== false,
|
235
|
+
"bg-negative dark:bg-negative-dark": currentIsValid.value === false,
|
221
236
|
"transition-[left,width,background-color]": !_ctx.side && indicatorStyle.value !== void 0,
|
222
237
|
"transition-[top,height,background-color]": _ctx.side && indicatorStyle.value !== void 0
|
223
238
|
}]),
|
224
239
|
style: normalizeStyle(indicatorStyle.value)
|
225
|
-
}, null, 6)
|
240
|
+
}, null, 6)) : createCommentVNode("", true)
|
226
241
|
], 2)) : createCommentVNode("", true),
|
227
242
|
defaultSlots.value.some((slot) => slot.children?.default) ? (openBlock(), createElementBlock("div", {
|
228
243
|
key: 1,
|
@@ -241,27 +256,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
241
256
|
ref_for: true,
|
242
257
|
ref: "tabItem",
|
243
258
|
key: slot.props?.name,
|
259
|
+
name: slot.props?.name,
|
260
|
+
title: slot.props?.title,
|
244
261
|
active: slot.props?.name === current.value,
|
245
262
|
removable: slot.props?.removable,
|
263
|
+
"onTab:switch": unref(switchOnInvalid),
|
246
264
|
"onUpdate:height": _cache[1] || (_cache[1] = ($event) => !_ctx.disableMinHeight && updateHeight($event)),
|
247
265
|
"onUpdate:active": ($event) => _ctx.$emit("update:current-title", slot.props?.title)
|
248
266
|
}, {
|
249
267
|
default: withCtx(() => [
|
250
|
-
|
251
|
-
ref_for: true,
|
252
|
-
ref: "form",
|
253
|
-
name: slot.props?.name,
|
254
|
-
title: slot.props?.title,
|
255
|
-
"onUpdate:isValid": ($event) => $event === false && unref(switchOnInvalid)(slot.props?.name)
|
256
|
-
}, {
|
257
|
-
default: withCtx(() => [
|
258
|
-
(openBlock(), createBlock(resolveDynamicComponent(slot)))
|
259
|
-
]),
|
260
|
-
_: 2
|
261
|
-
}, 1032, ["name", "title", "onUpdate:isValid"])
|
268
|
+
(openBlock(), createBlock(resolveDynamicComponent(slot)))
|
262
269
|
]),
|
263
270
|
_: 2
|
264
|
-
}, 1032, ["active", "removable", "onUpdate:active"]);
|
271
|
+
}, 1032, ["name", "title", "active", "removable", "onTab:switch", "onUpdate:active"]);
|
265
272
|
}), 128))
|
266
273
|
]),
|
267
274
|
_: 1
|