eco-vue-js 0.9.3 → 0.9.5
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/WForm.vue.d.ts +4 -0
- package/dist/components/Form/WForm.vue.d.ts.map +1 -1
- package/dist/components/Form/WForm.vue.js +7 -1
- 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 +15 -3
- package/dist/components/Form/models/injection.d.ts +1 -0
- package/dist/components/Form/models/injection.d.ts.map +1 -1
- package/dist/components/Form/models/injection.js +2 -1
- package/dist/components/Form/use/useFormHasValueMap.d.ts +6 -0
- package/dist/components/Form/use/useFormHasValueMap.d.ts.map +1 -0
- package/dist/components/Form/use/useFormHasValueMap.js +31 -0
- package/dist/components/Modal/WModalStepper.vue.d.ts +20 -4
- package/dist/components/Modal/WModalStepper.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue.d.ts +14 -6
- package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue.js +78 -60
- package/dist/components/Tabs/WTabsItem.vue.d.ts +9 -6
- package/dist/components/Tabs/WTabsItem.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabsItem.vue.js +2 -1
- package/dist/components/Tabs/WTabsStepper.vue.d.ts +20 -4
- package/dist/components/Tabs/WTabsStepper.vue.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabItem.vue.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabItem.vue.js +8 -6
- package/dist/components/Tabs/components/TabTitleButton.vue.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabTitleButton.vue.js +4 -4
- package/dist/components/Tabs/types.d.ts +5 -0
- package/dist/components/Tabs/types.d.ts.map +1 -1
- package/package.json +11 -11
@@ -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":"
|
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,
|
@@ -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":"
|
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
|
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 @@
|
|
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 };
|
@@ -237,6 +237,7 @@ declare function __VLS_template(): {
|
|
237
237
|
readonly title?: string | undefined;
|
238
238
|
readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
239
239
|
readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
240
|
+
readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
240
241
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
241
242
|
$attrs: {
|
242
243
|
[x: string]: unknown;
|
@@ -250,7 +251,7 @@ declare function __VLS_template(): {
|
|
250
251
|
$root: import('vue').ComponentPublicInstance | null;
|
251
252
|
$parent: import('vue').ComponentPublicInstance | null;
|
252
253
|
$host: Element | null;
|
253
|
-
$emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void);
|
254
|
+
$emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-value", value: boolean | null) => void);
|
254
255
|
$el: any;
|
255
256
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
256
257
|
name?: string;
|
@@ -258,8 +259,11 @@ declare function __VLS_template(): {
|
|
258
259
|
}> & Readonly<{
|
259
260
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
260
261
|
"onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
262
|
+
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
261
263
|
}>, {
|
262
264
|
isValid: import('vue').ComputedRef<boolean>;
|
265
|
+
hasChanges: import('vue').ComputedRef<boolean>;
|
266
|
+
hasValue: import('vue').ComputedRef<boolean | null>;
|
263
267
|
validate: (silent?: boolean, path?: import('../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
|
264
268
|
invalidate: (payload: {
|
265
269
|
[x: string]: string | string[] | undefined;
|
@@ -269,6 +273,7 @@ declare function __VLS_template(): {
|
|
269
273
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
270
274
|
"update:has-changes": (value: boolean) => any;
|
271
275
|
"update:is-valid": (value: boolean | undefined) => any;
|
276
|
+
"update:has-value": (value: boolean | null) => any;
|
272
277
|
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
273
278
|
beforeCreate?: (() => void) | (() => void)[];
|
274
279
|
created?: (() => void) | (() => void)[];
|
@@ -295,8 +300,11 @@ declare function __VLS_template(): {
|
|
295
300
|
}> & Readonly<{
|
296
301
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
297
302
|
"onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
298
|
-
|
303
|
+
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
304
|
+
}>, "errorMessage" | "hasChanges" | "isValid" | "hasValue" | "validate" | "invalidate" | "initModel"> & import('vue').ShallowUnwrapRef<{
|
299
305
|
isValid: import('vue').ComputedRef<boolean>;
|
306
|
+
hasChanges: import('vue').ComputedRef<boolean>;
|
307
|
+
hasValue: import('vue').ComputedRef<boolean | null>;
|
300
308
|
validate: (silent?: boolean, path?: import('../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
|
301
309
|
invalidate: (payload: {
|
302
310
|
[x: string]: string | string[] | undefined;
|
@@ -653,6 +661,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
653
661
|
readonly title?: string | undefined;
|
654
662
|
readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
655
663
|
readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
664
|
+
readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
656
665
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
657
666
|
$attrs: {
|
658
667
|
[x: string]: unknown;
|
@@ -666,7 +675,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
666
675
|
$root: import('vue').ComponentPublicInstance | null;
|
667
676
|
$parent: import('vue').ComponentPublicInstance | null;
|
668
677
|
$host: Element | null;
|
669
|
-
$emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void);
|
678
|
+
$emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-value", value: boolean | null) => void);
|
670
679
|
$el: any;
|
671
680
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
672
681
|
name?: string;
|
@@ -674,8 +683,11 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
674
683
|
}> & Readonly<{
|
675
684
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
676
685
|
"onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
686
|
+
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
677
687
|
}>, {
|
678
688
|
isValid: import('vue').ComputedRef<boolean>;
|
689
|
+
hasChanges: import('vue').ComputedRef<boolean>;
|
690
|
+
hasValue: import('vue').ComputedRef<boolean | null>;
|
679
691
|
validate: (silent?: boolean, path?: import('../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
|
680
692
|
invalidate: (payload: {
|
681
693
|
[x: string]: string | string[] | undefined;
|
@@ -685,6 +697,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
685
697
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
686
698
|
"update:has-changes": (value: boolean) => any;
|
687
699
|
"update:is-valid": (value: boolean | undefined) => any;
|
700
|
+
"update:has-value": (value: boolean | null) => any;
|
688
701
|
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
689
702
|
beforeCreate?: (() => void) | (() => void)[];
|
690
703
|
created?: (() => void) | (() => void)[];
|
@@ -711,8 +724,11 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
711
724
|
}> & Readonly<{
|
712
725
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
713
726
|
"onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
714
|
-
|
727
|
+
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
728
|
+
}>, "errorMessage" | "hasChanges" | "isValid" | "hasValue" | "validate" | "invalidate" | "initModel"> & import('vue').ShallowUnwrapRef<{
|
715
729
|
isValid: import('vue').ComputedRef<boolean>;
|
730
|
+
hasChanges: import('vue').ComputedRef<boolean>;
|
731
|
+
hasValue: import('vue').ComputedRef<boolean | null>;
|
716
732
|
validate: (silent?: boolean, path?: import('../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
|
717
733
|
invalidate: (payload: {
|
718
734
|
[x: string]: string | string[] | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WModalStepper.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/WModalStepper.vue"],"names":[],"mappings":"AAyKA,iBAAS,cAAc;;uBA4PI,GAAG;yBACA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAkEqxS,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG
|
1
|
+
{"version":3,"file":"WModalStepper.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/WModalStepper.vue"],"names":[],"mappings":"AAyKA,iBAAS,cAAc;;uBA4PI,GAAG;yBACA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAkEqxS,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;WAxD95S,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDA0W8xS,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;OAlB16S,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,5 +1,5 @@
|
|
1
1
|
import { TabsProps } from './types';
|
2
|
-
import { CSSProperties
|
2
|
+
import { CSSProperties } from 'vue';
|
3
3
|
import { default as WForm } from '../Form/WForm.vue';
|
4
4
|
declare const _default: import('vue').DefineComponent<TabsProps, {
|
5
5
|
updateCurrent: (value: string) => void;
|
@@ -108,7 +108,7 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
108
108
|
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
109
109
|
};
|
110
110
|
$forceUpdate: () => void;
|
111
|
-
$nextTick: typeof nextTick;
|
111
|
+
$nextTick: typeof import('vue').nextTick;
|
112
112
|
$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;
|
113
113
|
} & Readonly<{}> & Omit<Readonly<{
|
114
114
|
active: boolean;
|
@@ -189,7 +189,7 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
189
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
190
|
};
|
191
191
|
$forceUpdate: () => void;
|
192
|
-
$nextTick: typeof nextTick;
|
192
|
+
$nextTick: typeof import('vue').nextTick;
|
193
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
194
|
} & Readonly<{}> & Omit<Readonly<{
|
195
195
|
active: boolean;
|
@@ -212,6 +212,7 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
212
212
|
readonly title?: string | undefined;
|
213
213
|
readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
214
214
|
readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
215
|
+
readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
215
216
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
216
217
|
$attrs: {
|
217
218
|
[x: string]: unknown;
|
@@ -225,7 +226,7 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
225
226
|
$root: import('vue').ComponentPublicInstance | null;
|
226
227
|
$parent: import('vue').ComponentPublicInstance | null;
|
227
228
|
$host: Element | null;
|
228
|
-
$emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void);
|
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);
|
229
230
|
$el: any;
|
230
231
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
231
232
|
name?: string;
|
@@ -233,8 +234,11 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
233
234
|
}> & Readonly<{
|
234
235
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
235
236
|
"onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
237
|
+
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
236
238
|
}>, {
|
237
239
|
isValid: import('vue').ComputedRef<boolean>;
|
240
|
+
hasChanges: import('vue').ComputedRef<boolean>;
|
241
|
+
hasValue: import('vue').ComputedRef<boolean | null>;
|
238
242
|
validate: (silent?: boolean, path?: import('../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
|
239
243
|
invalidate: (payload: {
|
240
244
|
[x: string]: string | string[] | undefined;
|
@@ -244,6 +248,7 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
244
248
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
245
249
|
"update:has-changes": (value: boolean) => any;
|
246
250
|
"update:is-valid": (value: boolean | undefined) => any;
|
251
|
+
"update:has-value": (value: boolean | null) => any;
|
247
252
|
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
248
253
|
beforeCreate?: (() => void) | (() => void)[];
|
249
254
|
created?: (() => void) | (() => void)[];
|
@@ -262,7 +267,7 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
262
267
|
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
263
268
|
};
|
264
269
|
$forceUpdate: () => void;
|
265
|
-
$nextTick: typeof nextTick;
|
270
|
+
$nextTick: typeof import('vue').nextTick;
|
266
271
|
$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;
|
267
272
|
} & Readonly<{}> & Omit<Readonly<{
|
268
273
|
name?: string;
|
@@ -270,8 +275,11 @@ declare const _default: import('vue').DefineComponent<TabsProps, {
|
|
270
275
|
}> & Readonly<{
|
271
276
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
272
277
|
"onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
273
|
-
|
278
|
+
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
279
|
+
}>, "errorMessage" | "hasChanges" | "isValid" | "hasValue" | "validate" | "invalidate" | "initModel"> & import('vue').ShallowUnwrapRef<{
|
274
280
|
isValid: import('vue').ComputedRef<boolean>;
|
281
|
+
hasChanges: import('vue').ComputedRef<boolean>;
|
282
|
+
hasValue: import('vue').ComputedRef<boolean | null>;
|
275
283
|
validate: (silent?: boolean, path?: import('../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
|
276
284
|
invalidate: (payload: {
|
277
285
|
[x: string]: string | string[] | undefined;
|
@@ -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":"AA+TA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,SAAS,CAAA;AAEtC,OAAO,EAAC,KAAK,aAAa,EAA6G,MAAM,KAAK,CAAA;AAElJ,OAAO,KAAK,MAAM,6BAA6B,CAAA;;2BAsEjB,MAAM;yBAMR,MAAM;gBAcjB,IAAI;oBAIA,IAAI;sBAUA,MAAM,6GAAqE,UAAU,CAAC,iBAAiB,CAAC,OAAO,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC;wBAIhI,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAsP9I,GAAR,8CAA8C,GAAG,yBAAyB,GAAG,6DACvE,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCADA,GAAR,8CAA8C,GAAG,yBAAyB,GAAG,6DACvE,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCADA,GAAR,8CAA8C,GAAG,yBAAyB,GAAG,6DACvE,GAAE;;;;;;;;;;;;;;;;;;;;;;;;AA6LhB,wBAeG"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { defineComponent, useSlots, useTemplateRef, computed, ref,
|
1
|
+
import { defineComponent, useSlots, useTemplateRef, computed, ref, inject, watch, onMounted, onUnmounted, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createBlock, unref, createSlots, withCtx, resolveDynamicComponent, mergeProps, createElementVNode, normalizeStyle, createCommentVNode, createVNode, TransitionGroup } from 'vue';
|
2
2
|
import _sfc_main$3 from '../Form/WForm.vue.js';
|
3
|
-
import {
|
3
|
+
import { debounce, throttle } from '../../utils/utils.js';
|
4
4
|
import _sfc_main$2 from './components/TabItem.vue.js';
|
5
5
|
import _sfc_main$1 from './components/TabTitleButton.vue.js';
|
6
6
|
import { wTabItemListener, wTabItemUnlistener } from './models/injection.js';
|
@@ -30,9 +30,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
30
30
|
else return [];
|
31
31
|
});
|
32
32
|
};
|
33
|
-
const
|
33
|
+
const isTabItem = (slot) => {
|
34
|
+
return slot.type instanceof Object && "__name" in slot.type && slot.type.__name === "WTabsItem";
|
35
|
+
};
|
36
|
+
const defaultSlotsAll = computed(() => {
|
34
37
|
return unwrapSlots(defaultSlotsRaw.value);
|
35
38
|
});
|
39
|
+
const defaultSlots = computed(() => {
|
40
|
+
return defaultSlotsAll.value.filter(isTabItem);
|
41
|
+
});
|
36
42
|
const defaultSlotsKeys = computed(() => defaultSlots.value.map((item) => item.props?.name));
|
37
43
|
const current = ref(defaultSlotsKeys.value[props.initTab ?? 0]);
|
38
44
|
const currentIndex = computed(() => defaultSlotsKeys.value.indexOf(current.value));
|
@@ -42,15 +48,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
42
48
|
const minHeight = ref(0);
|
43
49
|
const tabItemRef = useTemplateRef("tabItem");
|
44
50
|
const formRef = useTemplateRef("form");
|
45
|
-
const
|
46
|
-
const
|
47
|
-
|
48
|
-
|
49
|
-
isValidMap[key] = value;
|
50
|
-
nextTick().then(() => {
|
51
|
-
if (value === false && isValidMap[current.value] !== false) switchTab(key);
|
52
|
-
});
|
53
|
-
};
|
51
|
+
const currentIsValud = computed(() => formRef.value?.[defaultSlotsKeys.value.indexOf(current.value)]?.isValid);
|
52
|
+
const switchOnInvalid = debounce((key) => {
|
53
|
+
if (currentIsValud.value !== false) switchTab(key);
|
54
|
+
}, 50);
|
54
55
|
const switchTab = throttle((key) => {
|
55
56
|
if (current.value === key) return;
|
56
57
|
updateCurrent(key);
|
@@ -109,9 +110,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
109
110
|
watch(currentIndex, (value) => {
|
110
111
|
emit("update:current-index", value);
|
111
112
|
}, { immediate: true });
|
112
|
-
watch(hasChanges, (value) => {
|
113
|
-
emit("update:has-changes", value);
|
114
|
-
}, { immediate: true });
|
115
113
|
watch(defaultSlotsKeys, (newValue, oldValue) => {
|
116
114
|
const newIndex = newValue.findIndex((item) => !oldValue.includes(item));
|
117
115
|
if (props.switchToNew && newIndex !== -1) {
|
@@ -151,53 +149,74 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
151
149
|
!_ctx.noHeader ? (openBlock(), createElementBlock("div", {
|
152
150
|
key: 0,
|
153
151
|
ref: "buttonContainer",
|
154
|
-
class: normalizeClass(["no-scrollbar relative
|
155
|
-
"
|
152
|
+
class: normalizeClass(["no-scrollbar relative snap-x snap-mandatory snap-always overflow-x-auto overscroll-x-contain", {
|
153
|
+
"grid grid-cols-[1fr,auto]": _ctx.side,
|
154
|
+
"flex": !_ctx.side
|
156
155
|
}])
|
157
156
|
}, [
|
158
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
159
|
-
return openBlock(),
|
160
|
-
key: slot.props?.name
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
} :
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
157
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(defaultSlotsAll.value, (slot, index) => {
|
158
|
+
return openBlock(), createElementBlock(Fragment, {
|
159
|
+
key: slot.props?.name
|
160
|
+
}, [
|
161
|
+
isTabItem(slot) ? (openBlock(), createBlock(_sfc_main$1, {
|
162
|
+
key: 0,
|
163
|
+
ref_for: true,
|
164
|
+
ref: "button",
|
165
|
+
active: current.value === slot.props?.name,
|
166
|
+
index,
|
167
|
+
title: slot.props?.title,
|
168
|
+
icon: slot.props?.icon,
|
169
|
+
"has-changes": unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.hasChanges === true,
|
170
|
+
"has-error": unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.isValid === false,
|
171
|
+
side: _ctx.side,
|
172
|
+
class: normalizeClass({
|
173
|
+
"col-span-2 grid grid-cols-subgrid": _ctx.side,
|
174
|
+
"grid-cols-[1fr,auto]": !_ctx.side
|
175
|
+
}),
|
176
|
+
"onUpdate:indicatorStyle": _cache[0] || (_cache[0] = ($event) => indicatorStyle.value = $event),
|
177
|
+
"onUpdate:scrollPosition": updateScrollPosition,
|
178
|
+
onClick: ($event) => unref(switchTab)(slot.props?.name)
|
179
|
+
}, createSlots({ _: 2 }, [
|
180
|
+
slot.children?.title ? {
|
181
|
+
name: "title",
|
182
|
+
fn: withCtx(() => [
|
183
|
+
(openBlock(), createBlock(resolveDynamicComponent(slot.children?.title), mergeProps({ ref_for: true }, {
|
184
|
+
hasError: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.isValid === false,
|
185
|
+
hasChanges: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.hasChanges === true,
|
186
|
+
hasValue: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.hasValue === true
|
187
|
+
}), null, 16))
|
188
|
+
]),
|
189
|
+
key: "0"
|
190
|
+
} : void 0,
|
191
|
+
slot.children?.suffix ? {
|
192
|
+
name: "suffix",
|
193
|
+
fn: withCtx(() => [
|
194
|
+
(openBlock(), createBlock(resolveDynamicComponent(slot.children?.suffix), mergeProps({ ref_for: true }, {
|
195
|
+
hasError: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.isValid === false,
|
196
|
+
hasChanges: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.hasChanges === true,
|
197
|
+
hasValue: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.hasValue === true
|
198
|
+
}), null, 16))
|
199
|
+
]),
|
200
|
+
key: "1"
|
201
|
+
} : void 0,
|
202
|
+
slot.children?.right ? {
|
203
|
+
name: "right",
|
204
|
+
fn: withCtx(() => [
|
205
|
+
(openBlock(), createBlock(resolveDynamicComponent(slot.children?.right), mergeProps({ ref_for: true }, {
|
206
|
+
hasError: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.isValid === false,
|
207
|
+
hasChanges: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.hasChanges === true,
|
208
|
+
hasValue: unref(formRef)?.[defaultSlots.value.indexOf(slot)]?.hasValue === true
|
209
|
+
}), null, 16))
|
210
|
+
]),
|
211
|
+
key: "2"
|
212
|
+
} : void 0
|
213
|
+
]), 1032, ["active", "index", "title", "icon", "has-changes", "has-error", "side", "class", "onClick"])) : (openBlock(), createBlock(resolveDynamicComponent(slot), { key: 1 }))
|
214
|
+
], 64);
|
196
215
|
}), 128)),
|
197
216
|
createElementVNode("div", {
|
198
217
|
class: normalizeClass(["absolute rounded-sm duration-500", {
|
199
|
-
"bg-primary-default dark:bg-primary-dark":
|
200
|
-
"bg-negative dark:bg-negative-dark":
|
218
|
+
"bg-primary-default dark:bg-primary-dark": currentIsValud.value !== false,
|
219
|
+
"bg-negative dark:bg-negative-dark": currentIsValud.value === false,
|
201
220
|
"transition-[left,width,background-color]": !_ctx.side && indicatorStyle.value !== void 0,
|
202
221
|
"transition-[top,height,background-color]": _ctx.side && indicatorStyle.value !== void 0
|
203
222
|
}]),
|
@@ -232,14 +251,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
232
251
|
ref: "form",
|
233
252
|
name: slot.props?.name,
|
234
253
|
title: slot.props?.title,
|
235
|
-
"onUpdate:isValid": ($event) =>
|
236
|
-
"onUpdate:hasChanges": ($event) => hasChangesMap[slot.props?.name] = $event
|
254
|
+
"onUpdate:isValid": ($event) => $event === false && unref(switchOnInvalid)(slot.props?.name)
|
237
255
|
}, {
|
238
256
|
default: withCtx(() => [
|
239
257
|
(openBlock(), createBlock(resolveDynamicComponent(slot)))
|
240
258
|
]),
|
241
259
|
_: 2
|
242
|
-
}, 1032, ["name", "title", "onUpdate:isValid"
|
260
|
+
}, 1032, ["name", "title", "onUpdate:isValid"])
|
243
261
|
]),
|
244
262
|
_: 2
|
245
263
|
}, 1032, ["active", "removable", "onUpdate:active"]);
|
@@ -1,14 +1,15 @@
|
|
1
|
+
import { TabsItemScopedProps } from './types';
|
1
2
|
declare function __VLS_template(): {
|
2
3
|
slots: Readonly<{
|
3
4
|
default?: () => void;
|
4
|
-
title?: () => void;
|
5
|
-
suffix?: () => void;
|
6
|
-
right?: () => void;
|
5
|
+
title?: (props: TabsItemScopedProps) => void;
|
6
|
+
suffix?: (props: TabsItemScopedProps) => void;
|
7
|
+
right?: (props: TabsItemScopedProps) => void;
|
7
8
|
}> & {
|
8
9
|
default?: () => void;
|
9
|
-
title?: () => void;
|
10
|
-
suffix?: () => void;
|
11
|
-
right?: () => void;
|
10
|
+
title?: (props: TabsItemScopedProps) => void;
|
11
|
+
suffix?: (props: TabsItemScopedProps) => void;
|
12
|
+
right?: (props: TabsItemScopedProps) => void;
|
12
13
|
};
|
13
14
|
refs: {};
|
14
15
|
attrs: Partial<{}>;
|
@@ -20,12 +21,14 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
20
21
|
icon?: SVGComponent;
|
21
22
|
disabled?: boolean;
|
22
23
|
removable?: boolean;
|
24
|
+
divided?: boolean;
|
23
25
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
24
26
|
title: string;
|
25
27
|
name: string;
|
26
28
|
icon?: SVGComponent;
|
27
29
|
disabled?: boolean;
|
28
30
|
removable?: boolean;
|
31
|
+
divided?: boolean;
|
29
32
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
30
33
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
31
34
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WTabsItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabsItem.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WTabsItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabsItem.vue"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAA;AAyBhD,iBAAS,cAAc;;kBAVX,MAAM,IAAI;gBACZ,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI;iBACnC,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI;gBACrC,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI;;kBAHlC,MAAM,IAAI;gBACZ,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI;iBACnC,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI;gBACrC,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI;;;WAsChC,OAAO,IAA6B;EAEjD;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;WA9DZ,MAAM;UACP,MAAM;WACL,YAAY;eACR,OAAO;gBACN,OAAO;cACT,OAAO;;WALV,MAAM;UACP,MAAM;WACL,YAAY;eACR,OAAO;gBACN,OAAO;cACT,OAAO;iGA+DjB,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"}
|
@@ -215,6 +215,7 @@ declare function __VLS_template(): {
|
|
215
215
|
readonly title?: string | undefined;
|
216
216
|
readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
217
217
|
readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
218
|
+
readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
218
219
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
219
220
|
$attrs: {
|
220
221
|
[x: string]: unknown;
|
@@ -228,7 +229,7 @@ declare function __VLS_template(): {
|
|
228
229
|
$root: import('vue').ComponentPublicInstance | null;
|
229
230
|
$parent: import('vue').ComponentPublicInstance | null;
|
230
231
|
$host: Element | null;
|
231
|
-
$emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void);
|
232
|
+
$emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-value", value: boolean | null) => void);
|
232
233
|
$el: any;
|
233
234
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
234
235
|
name?: string;
|
@@ -236,8 +237,11 @@ declare function __VLS_template(): {
|
|
236
237
|
}> & Readonly<{
|
237
238
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
238
239
|
"onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
240
|
+
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
239
241
|
}>, {
|
240
242
|
isValid: import('vue').ComputedRef<boolean>;
|
243
|
+
hasChanges: import('vue').ComputedRef<boolean>;
|
244
|
+
hasValue: import('vue').ComputedRef<boolean | null>;
|
241
245
|
validate: (silent?: boolean, path?: import('../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
|
242
246
|
invalidate: (payload: {
|
243
247
|
[x: string]: string | string[] | undefined;
|
@@ -247,6 +251,7 @@ declare function __VLS_template(): {
|
|
247
251
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
248
252
|
"update:has-changes": (value: boolean) => any;
|
249
253
|
"update:is-valid": (value: boolean | undefined) => any;
|
254
|
+
"update:has-value": (value: boolean | null) => any;
|
250
255
|
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
251
256
|
beforeCreate?: (() => void) | (() => void)[];
|
252
257
|
created?: (() => void) | (() => void)[];
|
@@ -273,8 +278,11 @@ declare function __VLS_template(): {
|
|
273
278
|
}> & Readonly<{
|
274
279
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
275
280
|
"onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
276
|
-
|
281
|
+
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
282
|
+
}>, "errorMessage" | "hasChanges" | "isValid" | "hasValue" | "validate" | "invalidate" | "initModel"> & import('vue').ShallowUnwrapRef<{
|
277
283
|
isValid: import('vue').ComputedRef<boolean>;
|
284
|
+
hasChanges: import('vue').ComputedRef<boolean>;
|
285
|
+
hasValue: import('vue').ComputedRef<boolean | null>;
|
278
286
|
validate: (silent?: boolean, path?: import('../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
|
279
287
|
invalidate: (payload: {
|
280
288
|
[x: string]: string | string[] | undefined;
|
@@ -545,6 +553,7 @@ declare const __VLS_component: import('vue').DefineComponent<TabsStepperProps, {
|
|
545
553
|
readonly title?: string | undefined;
|
546
554
|
readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
547
555
|
readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
556
|
+
readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
548
557
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
549
558
|
$attrs: {
|
550
559
|
[x: string]: unknown;
|
@@ -558,7 +567,7 @@ declare const __VLS_component: import('vue').DefineComponent<TabsStepperProps, {
|
|
558
567
|
$root: import('vue').ComponentPublicInstance | null;
|
559
568
|
$parent: import('vue').ComponentPublicInstance | null;
|
560
569
|
$host: Element | null;
|
561
|
-
$emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void);
|
570
|
+
$emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-value", value: boolean | null) => void);
|
562
571
|
$el: any;
|
563
572
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
564
573
|
name?: string;
|
@@ -566,8 +575,11 @@ declare const __VLS_component: import('vue').DefineComponent<TabsStepperProps, {
|
|
566
575
|
}> & Readonly<{
|
567
576
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
568
577
|
"onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
578
|
+
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
569
579
|
}>, {
|
570
580
|
isValid: import('vue').ComputedRef<boolean>;
|
581
|
+
hasChanges: import('vue').ComputedRef<boolean>;
|
582
|
+
hasValue: import('vue').ComputedRef<boolean | null>;
|
571
583
|
validate: (silent?: boolean, path?: import('../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
|
572
584
|
invalidate: (payload: {
|
573
585
|
[x: string]: string | string[] | undefined;
|
@@ -577,6 +589,7 @@ declare const __VLS_component: import('vue').DefineComponent<TabsStepperProps, {
|
|
577
589
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
578
590
|
"update:has-changes": (value: boolean) => any;
|
579
591
|
"update:is-valid": (value: boolean | undefined) => any;
|
592
|
+
"update:has-value": (value: boolean | null) => any;
|
580
593
|
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
581
594
|
beforeCreate?: (() => void) | (() => void)[];
|
582
595
|
created?: (() => void) | (() => void)[];
|
@@ -603,8 +616,11 @@ declare const __VLS_component: import('vue').DefineComponent<TabsStepperProps, {
|
|
603
616
|
}> & Readonly<{
|
604
617
|
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
605
618
|
"onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
|
606
|
-
|
619
|
+
"onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
|
620
|
+
}>, "errorMessage" | "hasChanges" | "isValid" | "hasValue" | "validate" | "invalidate" | "initModel"> & import('vue').ShallowUnwrapRef<{
|
607
621
|
isValid: import('vue').ComputedRef<boolean>;
|
622
|
+
hasChanges: import('vue').ComputedRef<boolean>;
|
623
|
+
hasValue: import('vue').ComputedRef<boolean | null>;
|
608
624
|
validate: (silent?: boolean, path?: import('../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
|
609
625
|
invalidate: (payload: {
|
610
626
|
[x: string]: string | string[] | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WTabsStepper.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabsStepper.vue"],"names":[],"mappings":"AAgFA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAA;AAmF7C,iBAAS,cAAc;;yBA4HO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAoE6xd,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG
|
1
|
+
{"version":3,"file":"WTabsStepper.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabsStepper.vue"],"names":[],"mappings":"AAgFA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAA;AAmF7C,iBAAS,cAAc;;yBA4HO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAoE6xd,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA1Dt6d,OAAO,IAA6B;EAEjD;AAoBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;gBA3MJ,IAAI;oBAJA,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAkPqyd,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAlBl7d,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 +1 @@
|
|
1
|
-
{"version":3,"file":"TabItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/components/TabItem.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"TabItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/components/TabItem.vue"],"names":[],"mappings":"AAwGA,iBAAS,cAAc;;yBAuCM,GAAG;;;;;WAUlB,OAAO,IAA6B;EAEjD;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;YA7GX,OAAO;eACJ,OAAO;;sBAaG,IAAI;;;;;YAdjB,OAAO;eACJ,OAAO;;;;;;OAwHlB,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,4 +1,4 @@
|
|
1
|
-
import { defineComponent, useTemplateRef, watch, nextTick,
|
1
|
+
import { defineComponent, useTemplateRef, watch, nextTick, openBlock, createBlock, KeepAlive, withDirectives, createElementBlock, renderSlot, vShow, createCommentVNode } from 'vue';
|
2
2
|
import { useTabItemActiveListener } from '../use/useTabItemActiveListener.js';
|
3
3
|
|
4
4
|
const _hoisted_1 = {
|
@@ -31,11 +31,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
31
31
|
emitHeight
|
32
32
|
});
|
33
33
|
return (_ctx, _cache) => {
|
34
|
-
return
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
return openBlock(), createBlock(KeepAlive, null, [
|
35
|
+
!_ctx.removable || _ctx.active ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
|
36
|
+
renderSlot(_ctx.$slots, "default")
|
37
|
+
], 512)), [
|
38
|
+
[vShow, _ctx.active]
|
39
|
+
]) : createCommentVNode("", true)
|
40
|
+
], 1024);
|
39
41
|
};
|
40
42
|
}
|
41
43
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TabTitleButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/components/TabTitleButton.vue"],"names":[],"mappings":"AA8IA,OAAO,EAAC,KAAK,aAAa,EAA6C,MAAM,KAAK,CAAA;AA0FlF,iBAAS,cAAc;;
|
1
|
+
{"version":3,"file":"TabTitleButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/components/TabTitleButton.vue"],"names":[],"mappings":"AA8IA,OAAO,EAAC,KAAK,aAAa,EAA6C,MAAM,KAAK,CAAA;AA0FlF,iBAAS,cAAc;;uBA2HI,GAAG;wBACD,GAAG;uBACJ,GAAG;;;;;WAUjB,OAAO,IAA6B;EAEjD;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;YA5OX,OAAO;WACR,MAAM;cACH,OAAO;gBACL,OAAO;WACZ,MAAM;UACP,YAAY,GAAG,SAAS;WACvB,OAAO;;;;;;;cA+O8B,MAAM;;aAAU,MAAM;;;YArP1D,OAAO;WACR,MAAM;cACH,OAAO;gBACL,OAAO;WACZ,MAAM;UACP,YAAY,GAAG,SAAS;WACvB,OAAO;;;;;cA+O8B,MAAM;;aAAU,MAAM;;;;OAIlE,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"}
|
@@ -66,7 +66,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
66
66
|
return (_ctx, _cache) => {
|
67
67
|
return openBlock(), createElementBlock("button", {
|
68
68
|
ref: "button",
|
69
|
-
class: "text-description grid cursor-pointer select-none snap-center
|
69
|
+
class: "text-description grid cursor-pointer select-none snap-center font-semibold outline-none transition-colors duration-500",
|
70
70
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
71
71
|
}, [
|
72
72
|
createElementVNode("div", {
|
@@ -94,9 +94,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
94
94
|
]),
|
95
95
|
_: 1
|
96
96
|
})) : createCommentVNode("", true),
|
97
|
-
createTextVNode(" " + toDisplayString(_ctx.title)
|
98
|
-
|
99
|
-
|
97
|
+
createTextVNode(" " + toDisplayString(_ctx.title), 1)
|
98
|
+
]),
|
99
|
+
renderSlot(_ctx.$slots, "suffix")
|
100
100
|
], 2)),
|
101
101
|
createVNode(Transition, {
|
102
102
|
"enter-active-class": "transition-opacity",
|
@@ -9,4 +9,9 @@ export interface TabsProps {
|
|
9
9
|
switchToNew?: boolean;
|
10
10
|
}
|
11
11
|
export type TabsStepperProps = Omit<TabsProps, 'switchToNew' | 'noHeader' | 'side'>;
|
12
|
+
export type TabsItemScopedProps = {
|
13
|
+
hasError: boolean;
|
14
|
+
hasChanges: boolean;
|
15
|
+
hasValue: boolean;
|
16
|
+
};
|
12
17
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,KAAK,CAAA;AAE9B,MAAM,WAAW,SAAS;IACxB,WAAW,CAAC,EAAE,KAAK,EAAE,CAAA;IACrB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,EAAE,aAAa,GAAG,UAAU,GAAG,MAAM,CAAC,CAAA"}
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,KAAK,CAAA;AAE9B,MAAM,WAAW,SAAS;IACxB,WAAW,CAAC,EAAE,KAAK,EAAE,CAAA;IACrB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,EAAE,aAAa,GAAG,UAAU,GAAG,MAAM,CAAC,CAAA;AAEnF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA"}
|
package/package.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
"type": "git",
|
5
5
|
"url": "https://github.com/rsmple/eco-vue-js.git"
|
6
6
|
},
|
7
|
-
"version": "0.9.
|
7
|
+
"version": "0.9.5",
|
8
8
|
"scripts": {
|
9
9
|
"build": "run-p type-check \"build-only {@}\" --",
|
10
10
|
"preview": "vite preview",
|
@@ -17,13 +17,13 @@
|
|
17
17
|
},
|
18
18
|
"dependencies": {
|
19
19
|
"@stylistic/eslint-plugin-ts": "2.11.0",
|
20
|
-
"@tanstack/eslint-plugin-query": "5.
|
21
|
-
"@vue/eslint-config-typescript": "14.1.
|
22
|
-
"eslint-import-resolver-typescript": "3.
|
20
|
+
"@tanstack/eslint-plugin-query": "5.62.1",
|
21
|
+
"@vue/eslint-config-typescript": "14.1.4",
|
22
|
+
"eslint-import-resolver-typescript": "3.7.0",
|
23
23
|
"eslint-plugin-import": "2.31.0",
|
24
24
|
"eslint-plugin-tailwindcss": "3.17.5",
|
25
25
|
"eslint-plugin-unused-imports": "4.1.4",
|
26
|
-
"eslint-plugin-vue": "9.
|
26
|
+
"eslint-plugin-vue": "9.32.0"
|
27
27
|
},
|
28
28
|
"peerDependencies": {
|
29
29
|
"@tanstack/vue-query": ">=5.59.0",
|
@@ -33,20 +33,20 @@
|
|
33
33
|
"devDependencies": {
|
34
34
|
"@tsconfig/node22": "22.0.0",
|
35
35
|
"@types/jsdom": "21.1.7",
|
36
|
-
"@types/node": "22.
|
36
|
+
"@types/node": "22.10.1",
|
37
37
|
"@types/postcss-import": "14.0.3",
|
38
|
-
"@vitejs/plugin-vue": "5.2.
|
39
|
-
"@vue/tsconfig": "0.
|
38
|
+
"@vitejs/plugin-vue": "5.2.1",
|
39
|
+
"@vue/tsconfig": "0.7.0",
|
40
40
|
"autoprefixer": "10.4.20",
|
41
|
-
"eslint": "9.
|
41
|
+
"eslint": "9.16.0",
|
42
42
|
"jsdom": "25.0.1",
|
43
43
|
"npm-run-all2": "7.0.1",
|
44
44
|
"path": "0.12.7",
|
45
45
|
"postcss": "8.4.49",
|
46
46
|
"postcss-import": "16.1.0",
|
47
|
-
"tailwindcss": "3.4.
|
47
|
+
"tailwindcss": "3.4.16",
|
48
48
|
"typescript": "5.6.3",
|
49
|
-
"vite": "
|
49
|
+
"vite": "6.0.2",
|
50
50
|
"vite-plugin-dts": "4.3.0",
|
51
51
|
"vite-svg-loader": "5.1.0",
|
52
52
|
"vue-tsc": "2.1.10"
|