eco-vue-js 0.8.42 → 0.9.0
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.map +1 -1
- package/dist/components/Form/WFormValidator.vue.js +21 -9
- package/dist/components/Modal/WModalStepper.vue.d.ts +272 -30
- package/dist/components/Modal/WModalStepper.vue.d.ts.map +1 -1
- package/dist/components/Modal/WModalStepper.vue.js +17 -13
- package/dist/components/Tabs/WTabs.vue.d.ts +132 -14
- package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue.js +120 -105
- package/dist/components/Tabs/WTabsItem.vue.d.ts +33 -0
- package/dist/components/Tabs/WTabsItem.vue.d.ts.map +1 -0
- package/dist/components/Tabs/WTabsItem.vue.js +17 -0
- package/dist/components/Tabs/WTabsItem.vue2.js +5 -0
- package/dist/components/Tabs/components/TabItem.vue.d.ts +4 -2
- package/dist/components/Tabs/components/TabItem.vue.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabItem.vue.js +6 -5
- package/dist/components/Tabs/components/TabTitleButton.vue.d.ts +58 -0
- package/dist/components/Tabs/components/TabTitleButton.vue.d.ts.map +1 -0
- package/dist/components/Tabs/components/TabTitleButton.vue.js +123 -0
- package/dist/components/Tabs/components/TabTitleButton.vue2.js +5 -0
- package/dist/imports/componentsPlugin.d.ts +2 -1
- package/dist/imports/componentsPlugin.d.ts.map +1 -1
- package/dist/main.js +1 -0
- package/package.json +4 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WFormValidator.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Form/WFormValidator.vue"],"names":[],"mappings":"
|
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,9 +1,21 @@
|
|
1
1
|
import { defineComponent, inject, useSlots, computed, useTemplateRef, ref, watch, onBeforeMount, onBeforeUnmount, openBlock, createBlock, resolveDynamicComponent } from 'vue';
|
2
2
|
import { useIsInsideTab } from '../Tabs/use/useIsInsideTab.js';
|
3
3
|
import { useTabActiveListener } from '../Tabs/use/useTabActiveListener.js';
|
4
|
-
import
|
4
|
+
import '../Button/WButtonAction.vue.js';
|
5
|
+
import '../Button/WButton.vue.js';
|
6
|
+
import { debounce } from '../../utils/utils.js';
|
7
|
+
import '../Button/WButtonDropdown.vue.js';
|
8
|
+
import '../../utils/supportsPassive.js';
|
9
|
+
import '../Dropdown/utils/DropdownStyle.js';
|
10
|
+
import 'vue-router';
|
11
|
+
import '../../utils/Modal.js';
|
5
12
|
import { wFormTitleUpdater, wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormValidateUpdater, wFormInvalidateUpdater, wFormInitModelUpdater, wFormUnlistener } from './models/injection.js';
|
6
13
|
import { scrollToValidator } from './models/utils.js';
|
14
|
+
import { validateRequired } from '../../utils/validate.js';
|
15
|
+
import '../Input/WInputSuggest.vue.js';
|
16
|
+
import '../Input/WInputDate.vue.js';
|
17
|
+
import '../Link/WLink.vue.js';
|
18
|
+
import '@tanstack/vue-query';
|
7
19
|
|
8
20
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
9
21
|
__name: "WFormValidator",
|
@@ -28,10 +40,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
28
40
|
const unlistener = inject(wFormUnlistener, void 0);
|
29
41
|
const { isInsideTab } = useIsInsideTab();
|
30
42
|
const slots = useSlots();
|
31
|
-
const
|
43
|
+
const componentSlot = computed(() => slots.default?.()[0]);
|
32
44
|
const componentRef = useTemplateRef("component");
|
33
45
|
const modelValue = computed(() => {
|
34
|
-
const props2 =
|
46
|
+
const props2 = componentSlot.value?.props;
|
35
47
|
if (!props2) return void 0;
|
36
48
|
if ("modelValue" in props2) {
|
37
49
|
return props2.modelValue;
|
@@ -42,8 +54,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
42
54
|
return void 0;
|
43
55
|
});
|
44
56
|
const initModelValue = ref();
|
45
|
-
const required = computed(() =>
|
46
|
-
const title = computed(() => props.title ??
|
57
|
+
const required = computed(() => componentSlot.value?.props?.required !== void 0 ? componentSlot.value?.props?.required !== false : void 0);
|
58
|
+
const title = computed(() => props.title ?? componentSlot.value?.props?.title);
|
47
59
|
const errorMessage = ref(null);
|
48
60
|
const hasChanges = ref(false);
|
49
61
|
const hasBeenValidated = ref(false);
|
@@ -149,7 +161,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
149
161
|
const element = componentRef.value.$el;
|
150
162
|
if (element instanceof HTMLDivElement) scrollToValidator(element);
|
151
163
|
};
|
152
|
-
|
164
|
+
const scrollToDebounced = debounce(scrollTo, 300);
|
165
|
+
useTabActiveListener(scrollToDebounced);
|
153
166
|
watch(errorMessage, (value) => {
|
154
167
|
if (value === null) return;
|
155
168
|
if (props.name) {
|
@@ -194,9 +207,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
194
207
|
initModel
|
195
208
|
});
|
196
209
|
return (_ctx, _cache) => {
|
197
|
-
return openBlock(), createBlock(resolveDynamicComponent(
|
198
|
-
|
199
|
-
ref: component,
|
210
|
+
return openBlock(), createBlock(resolveDynamicComponent(componentSlot.value), {
|
211
|
+
ref: "component",
|
200
212
|
"error-message": errorMessage.value,
|
201
213
|
"has-changes": _ctx.noChanges ? void 0 : hasChanges.value,
|
202
214
|
"onUpdate:modelValue": _validateOnUpdate,
|
@@ -4,18 +4,21 @@ declare function __VLS_template(): {
|
|
4
4
|
};
|
5
5
|
refs: {
|
6
6
|
tabs: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
7
|
-
names?: string[] | Record<number, string>;
|
8
|
-
namesForm?: string[] | Record<number, string>;
|
9
|
-
icons?: SVGComponent[] | Record<number, SVGComponent>;
|
10
7
|
customSlots?: import('vue').VNode[];
|
11
8
|
lessTransitions?: boolean;
|
12
9
|
initTab?: number;
|
13
10
|
side?: boolean;
|
14
11
|
disableMinHeight?: boolean;
|
12
|
+
noHeader?: boolean;
|
13
|
+
switchToNew?: boolean;
|
15
14
|
}> & Readonly<{
|
16
15
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
17
|
-
"onUpdate:current"?: ((value:
|
16
|
+
"onUpdate:current"?: ((value: string) => any) | undefined;
|
17
|
+
"onUpdate:current-index"?: ((value: number) => any) | undefined;
|
18
|
+
"onUpdate:current-title"?: ((value: string) => any) | undefined;
|
19
|
+
"onUpdate:tabs-length"?: ((value: number) => any) | undefined;
|
18
20
|
}>, {
|
21
|
+
updateCurrent: (value: string) => void;
|
19
22
|
updateIndex: (value: number) => void;
|
20
23
|
next: () => void;
|
21
24
|
previous: () => void;
|
@@ -26,16 +29,129 @@ declare function __VLS_template(): {
|
|
26
29
|
initModel: (index: number) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["initModel"]>;
|
27
30
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
28
31
|
"update:has-changes": (value: boolean) => any;
|
29
|
-
"update:current": (value:
|
32
|
+
"update:current": (value: string) => any;
|
33
|
+
"update:current-index": (value: number) => any;
|
34
|
+
"update:current-title": (value: string) => any;
|
35
|
+
"update:tabs-length": (value: number) => any;
|
30
36
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
31
37
|
buttonContainer: HTMLDivElement;
|
32
|
-
button:
|
38
|
+
button: (({
|
39
|
+
$: import('vue').ComponentInternalInstance;
|
40
|
+
$data: {};
|
41
|
+
$props: {
|
42
|
+
readonly active: boolean;
|
43
|
+
readonly index: number;
|
44
|
+
readonly hasError: boolean;
|
45
|
+
readonly hasChanges: boolean;
|
46
|
+
readonly title: string;
|
47
|
+
readonly icon: SVGComponent | undefined;
|
48
|
+
readonly side?: boolean | undefined;
|
49
|
+
readonly onClick?: ((value: MouseEvent) => any) | undefined;
|
50
|
+
readonly "onUpdate:indicator-style"?: ((value: import('vue').CSSProperties) => any) | undefined;
|
51
|
+
readonly "onUpdate:scroll-position"?: ((value: {
|
52
|
+
left: number;
|
53
|
+
} | {
|
54
|
+
top: number;
|
55
|
+
}) => any) | undefined;
|
56
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
57
|
+
$attrs: {
|
58
|
+
[x: string]: unknown;
|
59
|
+
};
|
60
|
+
$refs: {
|
61
|
+
[x: string]: unknown;
|
62
|
+
} & {
|
63
|
+
button: HTMLButtonElement;
|
64
|
+
};
|
65
|
+
$slots: Readonly<{
|
66
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
67
|
+
}>;
|
68
|
+
$root: import('vue').ComponentPublicInstance | null;
|
69
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
70
|
+
$host: Element | null;
|
71
|
+
$emit: ((event: "click", value: MouseEvent) => void) & ((event: "update:indicator-style", value: import('vue').CSSProperties) => void) & ((event: "update:scroll-position", value: {
|
72
|
+
left: number;
|
73
|
+
} | {
|
74
|
+
top: number;
|
75
|
+
}) => void);
|
76
|
+
$el: any;
|
77
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
78
|
+
active: boolean;
|
79
|
+
index: number;
|
80
|
+
hasError: boolean;
|
81
|
+
hasChanges: boolean;
|
82
|
+
title: string;
|
83
|
+
icon: SVGComponent | undefined;
|
84
|
+
side?: boolean;
|
85
|
+
}> & Readonly<{
|
86
|
+
onClick?: ((value: MouseEvent) => any) | undefined;
|
87
|
+
"onUpdate:indicator-style"?: ((value: import('vue').CSSProperties) => any) | undefined;
|
88
|
+
"onUpdate:scroll-position"?: ((value: {
|
89
|
+
left: number;
|
90
|
+
} | {
|
91
|
+
top: number;
|
92
|
+
}) => any) | undefined;
|
93
|
+
}>, {
|
94
|
+
update: () => void;
|
95
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
96
|
+
click: (value: MouseEvent) => any;
|
97
|
+
"update:indicator-style": (value: import('vue').CSSProperties) => any;
|
98
|
+
"update:scroll-position": (value: {
|
99
|
+
left: number;
|
100
|
+
} | {
|
101
|
+
top: number;
|
102
|
+
}) => any;
|
103
|
+
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
104
|
+
beforeCreate?: (() => void) | (() => void)[];
|
105
|
+
created?: (() => void) | (() => void)[];
|
106
|
+
beforeMount?: (() => void) | (() => void)[];
|
107
|
+
mounted?: (() => void) | (() => void)[];
|
108
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
109
|
+
updated?: (() => void) | (() => void)[];
|
110
|
+
activated?: (() => void) | (() => void)[];
|
111
|
+
deactivated?: (() => void) | (() => void)[];
|
112
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
113
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
114
|
+
destroyed?: (() => void) | (() => void)[];
|
115
|
+
unmounted?: (() => void) | (() => void)[];
|
116
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
117
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
118
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
119
|
+
};
|
120
|
+
$forceUpdate: () => void;
|
121
|
+
$nextTick: typeof import('vue').nextTick;
|
122
|
+
$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;
|
123
|
+
} & Readonly<{}> & Omit<Readonly<{
|
124
|
+
active: boolean;
|
125
|
+
index: number;
|
126
|
+
hasError: boolean;
|
127
|
+
hasChanges: boolean;
|
128
|
+
title: string;
|
129
|
+
icon: SVGComponent | undefined;
|
130
|
+
side?: boolean;
|
131
|
+
}> & Readonly<{
|
132
|
+
onClick?: ((value: MouseEvent) => any) | undefined;
|
133
|
+
"onUpdate:indicator-style"?: ((value: import('vue').CSSProperties) => any) | undefined;
|
134
|
+
"onUpdate:scroll-position"?: ((value: {
|
135
|
+
left: number;
|
136
|
+
} | {
|
137
|
+
top: number;
|
138
|
+
}) => any) | undefined;
|
139
|
+
}>, "update"> & import('vue').ShallowUnwrapRef<{
|
140
|
+
update: () => void;
|
141
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
142
|
+
$slots: {
|
143
|
+
title?(_: {}): any;
|
144
|
+
suffix?(_: {}): any;
|
145
|
+
right?(_: {}): any;
|
146
|
+
};
|
147
|
+
}) | null)[];
|
33
148
|
tabItem: (({
|
34
149
|
$: import('vue').ComponentInternalInstance;
|
35
150
|
$data: {};
|
36
151
|
$props: {
|
37
|
-
readonly
|
152
|
+
readonly active: boolean;
|
38
153
|
readonly "onUpdate:height"?: ((value: number) => any) | undefined;
|
154
|
+
readonly "onUpdate:active"?: (() => any) | undefined;
|
39
155
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
40
156
|
$attrs: {
|
41
157
|
[x: string]: unknown;
|
@@ -51,16 +167,18 @@ declare function __VLS_template(): {
|
|
51
167
|
$root: import('vue').ComponentPublicInstance | null;
|
52
168
|
$parent: import('vue').ComponentPublicInstance | null;
|
53
169
|
$host: Element | null;
|
54
|
-
$emit: (event: "update:height", value: number) => void;
|
170
|
+
$emit: ((event: "update:height", value: number) => void) & ((event: "update:active") => void);
|
55
171
|
$el: any;
|
56
172
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
57
|
-
|
173
|
+
active: boolean;
|
58
174
|
}> & Readonly<{
|
59
175
|
"onUpdate:height"?: ((value: number) => any) | undefined;
|
176
|
+
"onUpdate:active"?: (() => any) | undefined;
|
60
177
|
}>, {
|
61
178
|
emitHeight: () => void;
|
62
179
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
63
180
|
"update:height": (value: number) => any;
|
181
|
+
"update:active": () => any;
|
64
182
|
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
65
183
|
beforeCreate?: (() => void) | (() => void)[];
|
66
184
|
created?: (() => void) | (() => void)[];
|
@@ -82,9 +200,10 @@ declare function __VLS_template(): {
|
|
82
200
|
$nextTick: typeof import('vue').nextTick;
|
83
201
|
$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;
|
84
202
|
} & Readonly<{}> & Omit<Readonly<{
|
85
|
-
|
203
|
+
active: boolean;
|
86
204
|
}> & Readonly<{
|
87
205
|
"onUpdate:height"?: ((value: number) => any) | undefined;
|
206
|
+
"onUpdate:active"?: (() => any) | undefined;
|
88
207
|
}>, "emitHeight"> & import('vue').ShallowUnwrapRef<{
|
89
208
|
emitHeight: () => void;
|
90
209
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
@@ -179,18 +298,21 @@ declare function __VLS_template(): {
|
|
179
298
|
M: {};
|
180
299
|
Defaults: {};
|
181
300
|
}, Readonly<{
|
182
|
-
names?: string[] | Record<number, string>;
|
183
|
-
namesForm?: string[] | Record<number, string>;
|
184
|
-
icons?: SVGComponent[] | Record<number, SVGComponent>;
|
185
301
|
customSlots?: import('vue').VNode[];
|
186
302
|
lessTransitions?: boolean;
|
187
303
|
initTab?: number;
|
188
304
|
side?: boolean;
|
189
305
|
disableMinHeight?: boolean;
|
306
|
+
noHeader?: boolean;
|
307
|
+
switchToNew?: boolean;
|
190
308
|
}> & Readonly<{
|
191
309
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
192
|
-
"onUpdate:current"?: ((value:
|
310
|
+
"onUpdate:current"?: ((value: string) => any) | undefined;
|
311
|
+
"onUpdate:current-index"?: ((value: number) => any) | undefined;
|
312
|
+
"onUpdate:current-title"?: ((value: string) => any) | undefined;
|
313
|
+
"onUpdate:tabs-length"?: ((value: number) => any) | undefined;
|
193
314
|
}>, {
|
315
|
+
updateCurrent: (value: string) => void;
|
194
316
|
updateIndex: (value: number) => void;
|
195
317
|
next: () => void;
|
196
318
|
previous: () => void;
|
@@ -205,7 +327,6 @@ declare function __VLS_template(): {
|
|
205
327
|
};
|
206
328
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
207
329
|
declare const __VLS_component: import('vue').DefineComponent<{
|
208
|
-
names?: string[];
|
209
330
|
loading?: boolean;
|
210
331
|
disabled?: boolean;
|
211
332
|
disabledNext?: boolean;
|
@@ -220,7 +341,6 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
220
341
|
next: (current: number) => any;
|
221
342
|
"update:current": (value: number) => any;
|
222
343
|
}, string, import('vue').PublicProps, Readonly<{
|
223
|
-
names?: string[];
|
224
344
|
loading?: boolean;
|
225
345
|
disabled?: boolean;
|
226
346
|
disabledNext?: boolean;
|
@@ -233,18 +353,21 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
233
353
|
"onUpdate:current"?: ((value: number) => any) | undefined;
|
234
354
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
235
355
|
tabs: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
236
|
-
names?: string[] | Record<number, string>;
|
237
|
-
namesForm?: string[] | Record<number, string>;
|
238
|
-
icons?: SVGComponent[] | Record<number, SVGComponent>;
|
239
356
|
customSlots?: import('vue').VNode[];
|
240
357
|
lessTransitions?: boolean;
|
241
358
|
initTab?: number;
|
242
359
|
side?: boolean;
|
243
360
|
disableMinHeight?: boolean;
|
361
|
+
noHeader?: boolean;
|
362
|
+
switchToNew?: boolean;
|
244
363
|
}> & Readonly<{
|
245
364
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
246
|
-
"onUpdate:current"?: ((value:
|
365
|
+
"onUpdate:current"?: ((value: string) => any) | undefined;
|
366
|
+
"onUpdate:current-index"?: ((value: number) => any) | undefined;
|
367
|
+
"onUpdate:current-title"?: ((value: string) => any) | undefined;
|
368
|
+
"onUpdate:tabs-length"?: ((value: number) => any) | undefined;
|
247
369
|
}>, {
|
370
|
+
updateCurrent: (value: string) => void;
|
248
371
|
updateIndex: (value: number) => void;
|
249
372
|
next: () => void;
|
250
373
|
previous: () => void;
|
@@ -255,16 +378,129 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
255
378
|
initModel: (index: number) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["initModel"]>;
|
256
379
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
257
380
|
"update:has-changes": (value: boolean) => any;
|
258
|
-
"update:current": (value:
|
381
|
+
"update:current": (value: string) => any;
|
382
|
+
"update:current-index": (value: number) => any;
|
383
|
+
"update:current-title": (value: string) => any;
|
384
|
+
"update:tabs-length": (value: number) => any;
|
259
385
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
260
386
|
buttonContainer: HTMLDivElement;
|
261
|
-
button:
|
387
|
+
button: (({
|
388
|
+
$: import('vue').ComponentInternalInstance;
|
389
|
+
$data: {};
|
390
|
+
$props: {
|
391
|
+
readonly active: boolean;
|
392
|
+
readonly index: number;
|
393
|
+
readonly hasError: boolean;
|
394
|
+
readonly hasChanges: boolean;
|
395
|
+
readonly title: string;
|
396
|
+
readonly icon: SVGComponent | undefined;
|
397
|
+
readonly side?: boolean | undefined;
|
398
|
+
readonly onClick?: ((value: MouseEvent) => any) | undefined;
|
399
|
+
readonly "onUpdate:indicator-style"?: ((value: import('vue').CSSProperties) => any) | undefined;
|
400
|
+
readonly "onUpdate:scroll-position"?: ((value: {
|
401
|
+
left: number;
|
402
|
+
} | {
|
403
|
+
top: number;
|
404
|
+
}) => any) | undefined;
|
405
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
406
|
+
$attrs: {
|
407
|
+
[x: string]: unknown;
|
408
|
+
};
|
409
|
+
$refs: {
|
410
|
+
[x: string]: unknown;
|
411
|
+
} & {
|
412
|
+
button: HTMLButtonElement;
|
413
|
+
};
|
414
|
+
$slots: Readonly<{
|
415
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
416
|
+
}>;
|
417
|
+
$root: import('vue').ComponentPublicInstance | null;
|
418
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
419
|
+
$host: Element | null;
|
420
|
+
$emit: ((event: "click", value: MouseEvent) => void) & ((event: "update:indicator-style", value: import('vue').CSSProperties) => void) & ((event: "update:scroll-position", value: {
|
421
|
+
left: number;
|
422
|
+
} | {
|
423
|
+
top: number;
|
424
|
+
}) => void);
|
425
|
+
$el: any;
|
426
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
427
|
+
active: boolean;
|
428
|
+
index: number;
|
429
|
+
hasError: boolean;
|
430
|
+
hasChanges: boolean;
|
431
|
+
title: string;
|
432
|
+
icon: SVGComponent | undefined;
|
433
|
+
side?: boolean;
|
434
|
+
}> & Readonly<{
|
435
|
+
onClick?: ((value: MouseEvent) => any) | undefined;
|
436
|
+
"onUpdate:indicator-style"?: ((value: import('vue').CSSProperties) => any) | undefined;
|
437
|
+
"onUpdate:scroll-position"?: ((value: {
|
438
|
+
left: number;
|
439
|
+
} | {
|
440
|
+
top: number;
|
441
|
+
}) => any) | undefined;
|
442
|
+
}>, {
|
443
|
+
update: () => void;
|
444
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
445
|
+
click: (value: MouseEvent) => any;
|
446
|
+
"update:indicator-style": (value: import('vue').CSSProperties) => any;
|
447
|
+
"update:scroll-position": (value: {
|
448
|
+
left: number;
|
449
|
+
} | {
|
450
|
+
top: number;
|
451
|
+
}) => any;
|
452
|
+
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
453
|
+
beforeCreate?: (() => void) | (() => void)[];
|
454
|
+
created?: (() => void) | (() => void)[];
|
455
|
+
beforeMount?: (() => void) | (() => void)[];
|
456
|
+
mounted?: (() => void) | (() => void)[];
|
457
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
458
|
+
updated?: (() => void) | (() => void)[];
|
459
|
+
activated?: (() => void) | (() => void)[];
|
460
|
+
deactivated?: (() => void) | (() => void)[];
|
461
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
462
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
463
|
+
destroyed?: (() => void) | (() => void)[];
|
464
|
+
unmounted?: (() => void) | (() => void)[];
|
465
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
466
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
467
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
468
|
+
};
|
469
|
+
$forceUpdate: () => void;
|
470
|
+
$nextTick: typeof import('vue').nextTick;
|
471
|
+
$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;
|
472
|
+
} & Readonly<{}> & Omit<Readonly<{
|
473
|
+
active: boolean;
|
474
|
+
index: number;
|
475
|
+
hasError: boolean;
|
476
|
+
hasChanges: boolean;
|
477
|
+
title: string;
|
478
|
+
icon: SVGComponent | undefined;
|
479
|
+
side?: boolean;
|
480
|
+
}> & Readonly<{
|
481
|
+
onClick?: ((value: MouseEvent) => any) | undefined;
|
482
|
+
"onUpdate:indicator-style"?: ((value: import('vue').CSSProperties) => any) | undefined;
|
483
|
+
"onUpdate:scroll-position"?: ((value: {
|
484
|
+
left: number;
|
485
|
+
} | {
|
486
|
+
top: number;
|
487
|
+
}) => any) | undefined;
|
488
|
+
}>, "update"> & import('vue').ShallowUnwrapRef<{
|
489
|
+
update: () => void;
|
490
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
491
|
+
$slots: {
|
492
|
+
title?(_: {}): any;
|
493
|
+
suffix?(_: {}): any;
|
494
|
+
right?(_: {}): any;
|
495
|
+
};
|
496
|
+
}) | null)[];
|
262
497
|
tabItem: (({
|
263
498
|
$: import('vue').ComponentInternalInstance;
|
264
499
|
$data: {};
|
265
500
|
$props: {
|
266
|
-
readonly
|
501
|
+
readonly active: boolean;
|
267
502
|
readonly "onUpdate:height"?: ((value: number) => any) | undefined;
|
503
|
+
readonly "onUpdate:active"?: (() => any) | undefined;
|
268
504
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
269
505
|
$attrs: {
|
270
506
|
[x: string]: unknown;
|
@@ -280,16 +516,18 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
280
516
|
$root: import('vue').ComponentPublicInstance | null;
|
281
517
|
$parent: import('vue').ComponentPublicInstance | null;
|
282
518
|
$host: Element | null;
|
283
|
-
$emit: (event: "update:height", value: number) => void;
|
519
|
+
$emit: ((event: "update:height", value: number) => void) & ((event: "update:active") => void);
|
284
520
|
$el: any;
|
285
521
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
286
|
-
|
522
|
+
active: boolean;
|
287
523
|
}> & Readonly<{
|
288
524
|
"onUpdate:height"?: ((value: number) => any) | undefined;
|
525
|
+
"onUpdate:active"?: (() => any) | undefined;
|
289
526
|
}>, {
|
290
527
|
emitHeight: () => void;
|
291
528
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
292
529
|
"update:height": (value: number) => any;
|
530
|
+
"update:active": () => any;
|
293
531
|
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
294
532
|
beforeCreate?: (() => void) | (() => void)[];
|
295
533
|
created?: (() => void) | (() => void)[];
|
@@ -311,9 +549,10 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
311
549
|
$nextTick: typeof import('vue').nextTick;
|
312
550
|
$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;
|
313
551
|
} & Readonly<{}> & Omit<Readonly<{
|
314
|
-
|
552
|
+
active: boolean;
|
315
553
|
}> & Readonly<{
|
316
554
|
"onUpdate:height"?: ((value: number) => any) | undefined;
|
555
|
+
"onUpdate:active"?: (() => any) | undefined;
|
317
556
|
}>, "emitHeight"> & import('vue').ShallowUnwrapRef<{
|
318
557
|
emitHeight: () => void;
|
319
558
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
@@ -408,18 +647,21 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
408
647
|
M: {};
|
409
648
|
Defaults: {};
|
410
649
|
}, Readonly<{
|
411
|
-
names?: string[] | Record<number, string>;
|
412
|
-
namesForm?: string[] | Record<number, string>;
|
413
|
-
icons?: SVGComponent[] | Record<number, SVGComponent>;
|
414
650
|
customSlots?: import('vue').VNode[];
|
415
651
|
lessTransitions?: boolean;
|
416
652
|
initTab?: number;
|
417
653
|
side?: boolean;
|
418
654
|
disableMinHeight?: boolean;
|
655
|
+
noHeader?: boolean;
|
656
|
+
switchToNew?: boolean;
|
419
657
|
}> & Readonly<{
|
420
658
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
421
|
-
"onUpdate:current"?: ((value:
|
659
|
+
"onUpdate:current"?: ((value: string) => any) | undefined;
|
660
|
+
"onUpdate:current-index"?: ((value: number) => any) | undefined;
|
661
|
+
"onUpdate:current-title"?: ((value: string) => any) | undefined;
|
662
|
+
"onUpdate:tabs-length"?: ((value: number) => any) | undefined;
|
422
663
|
}>, {
|
664
|
+
updateCurrent: (value: string) => void;
|
423
665
|
updateIndex: (value: number) => void;
|
424
666
|
next: () => void;
|
425
667
|
previous: () => void;
|
@@ -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":"AA8NA,iBAAS,cAAc;;uBAsPI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAyEq+O,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA/D3mP,OAAO,IAA6B;EAEjD;AA0BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;cAnWT,OAAO;eACN,OAAO;mBACH,OAAO;;gBA6BP,IAAI;oBANA,IAAI;;;;;;;;;cAzBb,OAAO;eACN,OAAO;mBACH,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmY2+O,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAlBvnP,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,6 @@ const _hoisted_1 = { class: "h-1 w-full bg-gray-200 dark:bg-gray-700" };
|
|
9
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
10
10
|
__name: "WModalStepper",
|
11
11
|
props: {
|
12
|
-
names: {},
|
13
12
|
loading: { type: Boolean },
|
14
13
|
disabled: { type: Boolean },
|
15
14
|
disabledNext: { type: Boolean }
|
@@ -19,8 +18,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
18
|
const emit = __emit;
|
20
19
|
const slots = useSlots();
|
21
20
|
const tabsRef = useTemplateRef("tabs");
|
22
|
-
const defaultSlots = computed(() => slots.default?.()
|
21
|
+
const defaultSlots = computed(() => slots.default?.() ?? []);
|
22
|
+
const tabsLength = ref(0);
|
23
23
|
const current = ref(0);
|
24
|
+
const currentTitle = ref();
|
24
25
|
const previous = () => {
|
25
26
|
emit("previous", current.value);
|
26
27
|
tabsRef.value?.previous();
|
@@ -45,7 +46,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
45
46
|
return openBlock(), createBlock(_sfc_main$1, { maximized: "" }, {
|
46
47
|
title: withCtx(() => [
|
47
48
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
48
|
-
createTextVNode(toDisplayString(
|
49
|
+
createTextVNode(toDisplayString(currentTitle.value), 1)
|
49
50
|
])
|
50
51
|
]),
|
51
52
|
subtitle: withCtx(() => [
|
@@ -53,7 +54,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
53
54
|
createElementVNode("div", {
|
54
55
|
class: "bg-primary-default dark:bg-primary-dark h-full transition-[width]",
|
55
56
|
style: normalizeStyle({
|
56
|
-
width: 100 * (current.value + 1) /
|
57
|
+
width: 100 * (current.value + 1) / tabsLength.value + "%"
|
57
58
|
})
|
58
59
|
}, null, 4)
|
59
60
|
])
|
@@ -64,9 +65,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
64
65
|
disabled: _ctx.loading || _ctx.disabled,
|
65
66
|
"semantic-type": unref(SemanticType).SECONDARY,
|
66
67
|
class: "w-full",
|
67
|
-
onClick: _cache[
|
68
|
+
onClick: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("close:modal"))
|
68
69
|
}, {
|
69
|
-
default: withCtx(() => _cache[
|
70
|
+
default: withCtx(() => _cache[6] || (_cache[6] = [
|
70
71
|
createTextVNode(" Close ")
|
71
72
|
])),
|
72
73
|
_: 1
|
@@ -77,20 +78,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
77
78
|
class: "w-full",
|
78
79
|
onClick: previous
|
79
80
|
}, {
|
80
|
-
default: withCtx(() => _cache[
|
81
|
+
default: withCtx(() => _cache[7] || (_cache[7] = [
|
81
82
|
createTextVNode(" Back ")
|
82
83
|
])),
|
83
84
|
_: 1
|
84
85
|
}, 8, ["disabled", "semantic-type"])),
|
85
|
-
current.value ===
|
86
|
+
current.value === tabsLength.value - 1 ? (openBlock(), createBlock(_sfc_main$2, {
|
86
87
|
key: 2,
|
87
88
|
"semantic-type": unref(SemanticType).PRIMARY,
|
88
89
|
loading: _ctx.loading,
|
89
90
|
disabled: _ctx.disabled || _ctx.disabledNext,
|
90
91
|
class: "w-full",
|
91
|
-
onClick: _cache[
|
92
|
+
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("submit"))
|
92
93
|
}, {
|
93
|
-
default: withCtx(() => _cache[
|
94
|
+
default: withCtx(() => _cache[8] || (_cache[8] = [
|
94
95
|
createTextVNode(" Submit ")
|
95
96
|
])),
|
96
97
|
_: 1
|
@@ -102,7 +103,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
102
103
|
class: "w-full",
|
103
104
|
onClick: next
|
104
105
|
}, {
|
105
|
-
default: withCtx(() => _cache[
|
106
|
+
default: withCtx(() => _cache[9] || (_cache[9] = [
|
106
107
|
createTextVNode(" Next ")
|
107
108
|
])),
|
108
109
|
_: 1
|
@@ -112,8 +113,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
112
113
|
createVNode(_sfc_main$3, {
|
113
114
|
ref: "tabs",
|
114
115
|
"custom-slots": defaultSlots.value,
|
115
|
-
"
|
116
|
-
"onUpdate:
|
116
|
+
"no-header": "",
|
117
|
+
"onUpdate:currentIndex": _cache[0] || (_cache[0] = ($event) => current.value = $event),
|
118
|
+
"onUpdate:currentTitle": _cache[1] || (_cache[1] = ($event) => currentTitle.value = $event),
|
119
|
+
"onUpdate:hasChanges": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:has-changes", $event)),
|
120
|
+
"onUpdate:tabsLength": _cache[3] || (_cache[3] = ($event) => tabsLength.value = $event)
|
117
121
|
}, null, 8, ["custom-slots"])
|
118
122
|
]),
|
119
123
|
_: 3
|