eco-vue-js 0.9.22 → 0.9.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts.map +1 -1
  2. package/dist/components/FieldWrapper/WFieldWrapper.vue.js +5 -4
  3. package/dist/components/FieldWrapper/components/FilterButton.vue.d.ts +4 -2
  4. package/dist/components/FieldWrapper/components/FilterButton.vue.d.ts.map +1 -1
  5. package/dist/components/FieldWrapper/components/FilterButton.vue.js +9 -3
  6. package/dist/components/Form/WForm.vue.d.ts +13 -8
  7. package/dist/components/Form/WForm.vue.d.ts.map +1 -1
  8. package/dist/components/Form/WForm.vue.js +86 -32
  9. package/dist/components/Form/WFormValidator.vue.d.ts +3 -2
  10. package/dist/components/Form/WFormValidator.vue.d.ts.map +1 -1
  11. package/dist/components/Form/WFormValidator.vue.js +4 -0
  12. package/dist/components/Form/models/injection.d.ts +2 -1
  13. package/dist/components/Form/models/injection.d.ts.map +1 -1
  14. package/dist/components/Form/models/utils.d.ts +3 -0
  15. package/dist/components/Form/models/utils.d.ts.map +1 -1
  16. package/dist/components/Form/models/utils.js +1 -6
  17. package/dist/components/Form/use/useFormValueMap.d.ts +7 -0
  18. package/dist/components/Form/use/useFormValueMap.d.ts.map +1 -0
  19. package/dist/components/Form/use/useFormValueMap.js +36 -0
  20. package/dist/components/List/WListCard.vue.d.ts +1 -1
  21. package/dist/components/Modal/WModalStepper.vue.d.ts +761 -471
  22. package/dist/components/Modal/WModalStepper.vue.d.ts.map +1 -1
  23. package/dist/components/Tabs/WTabs.vue.d.ts +567 -45
  24. package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
  25. package/dist/components/Tabs/WTabs.vue.js +147 -129
  26. package/dist/components/Tabs/WTabsColumns.vue.d.ts +4 -2
  27. package/dist/components/Tabs/WTabsColumns.vue.d.ts.map +1 -1
  28. package/dist/components/Tabs/WTabsItem.vue.d.ts +2 -18
  29. package/dist/components/Tabs/WTabsItem.vue.d.ts.map +1 -1
  30. package/dist/components/Tabs/components/TabItem.vue.d.ts +51 -43
  31. package/dist/components/Tabs/components/TabItem.vue.d.ts.map +1 -1
  32. package/dist/components/Tabs/components/TabItem.vue.js +2 -15
  33. package/dist/components/Tabs/types.d.ts +10 -0
  34. package/dist/components/Tabs/types.d.ts.map +1 -1
  35. package/package.json +1 -1
  36. package/dist/components/Form/use/useFormErrorMessageMap.d.ts +0 -8
  37. package/dist/components/Form/use/useFormErrorMessageMap.d.ts.map +0 -1
  38. package/dist/components/Form/use/useFormErrorMessageMap.js +0 -32
  39. package/dist/components/Form/use/useFormHasChangesMap.d.ts +0 -6
  40. package/dist/components/Form/use/useFormHasChangesMap.d.ts.map +0 -1
  41. package/dist/components/Form/use/useFormHasChangesMap.js +0 -27
  42. package/dist/components/Form/use/useFormHasValueMap.d.ts +0 -6
  43. package/dist/components/Form/use/useFormHasValueMap.d.ts.map +0 -1
  44. package/dist/components/Form/use/useFormHasValueMap.js +0 -31
  45. package/dist/components/Form/use/useFormInitModelMap.d.ts +0 -6
  46. package/dist/components/Form/use/useFormInitModelMap.d.ts.map +0 -1
  47. package/dist/components/Form/use/useFormInitModelMap.js +0 -31
  48. package/dist/components/Form/use/useFormInvalidateMap.d.ts +0 -8
  49. package/dist/components/Form/use/useFormInvalidateMap.d.ts.map +0 -1
  50. package/dist/components/Form/use/useFormInvalidateMap.js +0 -32
  51. package/dist/components/Form/use/useFormTitleMap.d.ts +0 -6
  52. package/dist/components/Form/use/useFormTitleMap.d.ts.map +0 -1
  53. package/dist/components/Form/use/useFormTitleMap.js +0 -29
  54. package/dist/components/Form/use/useFormValidateMap.d.ts +0 -9
  55. package/dist/components/Form/use/useFormValidateMap.d.ts.map +0 -1
  56. package/dist/components/Form/use/useFormValidateMap.js +0 -39
@@ -1 +1 @@
1
- {"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabs.vue"],"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AAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,4 +1,5 @@
1
- import { defineComponent, useSlots, useTemplateRef, computed, ref, inject, watch, onMounted, onUnmounted, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createBlock, unref, createSlots, withCtx, resolveDynamicComponent, mergeProps, normalizeStyle, createCommentVNode, createVNode, TransitionGroup } from 'vue';
1
+ import { defineComponent, useSlots, useTemplateRef, computed, ref, inject, watch, onMounted, onUnmounted, openBlock, createBlock, normalizeClass, withCtx, createElementBlock, Fragment, renderList, unref, createSlots, resolveDynamicComponent, mergeProps, normalizeStyle, createCommentVNode, createVNode, TransitionGroup } from 'vue';
2
+ import _sfc_main$1 from '../Form/WForm.vue.js';
2
3
  import '../Button/WButtonAction.vue.js';
3
4
  import '../Button/WButton.vue.js';
4
5
  import { getIsMobile } from '../../utils/mobile.js';
@@ -14,12 +15,13 @@ import '../Input/WInputSuggest.vue.js';
14
15
  import '../Input/WInputDate.vue.js';
15
16
  import '../Link/WLink.vue.js';
16
17
  import '@tanstack/vue-query';
17
- import _sfc_main$2 from './components/TabItem.vue.js';
18
- import _sfc_main$1 from './components/TabTitleButton.vue.js';
18
+ import _sfc_main$3 from './components/TabItem.vue.js';
19
+ import _sfc_main$2 from './components/TabTitleButton.vue.js';
19
20
 
20
21
  const _sfc_main = /* @__PURE__ */ defineComponent({
21
22
  __name: "WTabs",
22
23
  props: {
24
+ name: {},
23
25
  customSlots: {},
24
26
  lessTransitions: { type: Boolean },
25
27
  initTab: {},
@@ -38,7 +40,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
38
40
  const props = __props;
39
41
  const emit = __emit;
40
42
  const slots = useSlots();
41
- const containerRef = useTemplateRef("container");
43
+ const formRef = useTemplateRef("form");
42
44
  const buttonContainerRef = useTemplateRef("buttonContainer");
43
45
  const defaultSlotsRaw = computed(() => props.customSlots ?? slots.default?.() ?? []);
44
46
  const unwrapSlots = (slots2) => {
@@ -57,7 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
57
59
  const defaultSlots = computed(() => {
58
60
  return defaultSlotsAll.value.filter(isTabItem);
59
61
  });
60
- const defaultSlotsKeys = computed(() => defaultSlots.value.map((item) => item.props?.name));
62
+ const defaultSlotsKeys = computed(() => defaultSlots.value.map((item) => item.props.name));
61
63
  const current = ref(props.initTab ?? (props.initTabIndex !== void 0 ? defaultSlotsKeys.value[props.initTabIndex] : defaultSlots.value.find((slot) => !!slot.props?.init)?.props?.name ?? defaultSlotsKeys.value[0]));
62
64
  const currentIndex = computed(() => defaultSlotsKeys.value.indexOf(current.value));
63
65
  const isDirect = ref(true);
@@ -65,10 +67,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
65
67
  const indicatorStyle = ref(void 0);
66
68
  const minHeight = ref(0);
67
69
  const tabItemRef = useTemplateRef("tabItem");
68
- const currentIsValid = computed(() => tabItemRef.value?.[currentIndex.value]?.isValid ?? true);
70
+ const currentIsValid = computed(() => typeof formRef.value?.errorMessageMap[current.value] !== "string");
69
71
  const hasNoValueFirst = computed(() => {
70
72
  if (!props.stepper) return 0;
71
- const index = tabItemRef.value?.findIndex((item) => item?.hasValue === false) ?? 0;
73
+ const index = defaultSlotsKeys.value.findIndex((item) => formRef.value?.hasValueMap[item] === false);
72
74
  if (index === -1) return defaultSlotsKeys.value.length;
73
75
  return index;
74
76
  });
@@ -97,7 +99,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
97
99
  timeout = null;
98
100
  }
99
101
  timeout = setTimeout(() => {
100
- containerRef.value?.scrollTo({ left: document.documentElement.offsetWidth, behavior: "smooth" });
102
+ formRef.value?.$el?.scrollTo({ left: document.documentElement.offsetWidth, behavior: "smooth" });
101
103
  timeout = null;
102
104
  }, 300);
103
105
  };
@@ -108,8 +110,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
108
110
  current.value = value;
109
111
  scrollToTabContent();
110
112
  }, 100);
111
- const next = () => {
112
- const errorMessage = validateIfNoError(currentIndex.value);
113
+ const next = (update = false) => {
114
+ const errorMessage = update ? validate(current.value) : validateIfNoError(current.value);
113
115
  if (errorMessage) {
114
116
  Notify.warn({ title: "Form contains invalid values", caption: errorMessage.length < 200 ? errorMessage : void 0 });
115
117
  return;
@@ -119,22 +121,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
119
121
  const previous = () => {
120
122
  switchTab(defaultSlotsKeys.value[currentIndex.value - 1]);
121
123
  };
124
+ const jump = (name, update = false) => {
125
+ const valid = defaultSlotsKeys.value.slice(currentIndex.value, defaultSlotsKeys.value.indexOf(name)).every((item) => {
126
+ const errorMessage = update ? validate(item) : validateIfNoError(item);
127
+ if (errorMessage) {
128
+ Notify.warn({ title: "Form contains invalid values", caption: errorMessage.length < 200 ? errorMessage : void 0 });
129
+ return false;
130
+ }
131
+ return true;
132
+ });
133
+ if (valid) return switchTab(name);
134
+ };
122
135
  const updateHeight = (value) => {
123
136
  if (minHeight.value >= value) return;
124
137
  minHeight.value = value;
125
138
  };
126
- const validate = (index, ...args) => {
127
- return tabItemRef.value?.[index]?.validate(...args);
139
+ const validate = (name, ...args) => {
140
+ return formRef.value?.validateMap[name]?.(...args);
128
141
  };
129
- const validateIfNoError = (index, ...args) => {
130
- if (tabItemRef.value?.[index]?.errorMessage) return tabItemRef.value?.[index].errorMessage;
131
- return tabItemRef.value?.[index]?.validate(...args);
142
+ const validateIfNoError = (name, ...args) => {
143
+ if (formRef.value?.errorMessageMap[name]) return formRef.value.errorMessageMap[name];
144
+ return formRef.value?.validateMap[name]?.(...args);
132
145
  };
133
- const invalidate = (index, ...args) => {
134
- return tabItemRef.value?.[index]?.invalidate(...args);
146
+ const invalidate = (name, ...args) => {
147
+ return formRef.value?.invalidateMap[name]?.(...args);
135
148
  };
136
- const initModel = (index, ...args) => {
137
- return tabItemRef.value?.[index]?.initModel(...args);
149
+ const initModel = (name, ...args) => {
150
+ return formRef.value?.initModelMap[name]?.(...args);
138
151
  };
139
152
  const updateIndicator = () => {
140
153
  buttonRef.value?.forEach((item) => item?.update());
@@ -194,128 +207,133 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
194
207
  updateIndex,
195
208
  next,
196
209
  previous,
210
+ jump,
197
211
  validate,
198
212
  validateIfNoError,
199
213
  invalidate,
200
214
  initModel
201
215
  });
202
216
  return (_ctx, _cache) => {
203
- return openBlock(), createElementBlock("div", {
204
- ref: "container",
217
+ return openBlock(), createBlock(_sfc_main$1, {
218
+ ref: "form",
219
+ name: _ctx.name,
205
220
  class: normalizeClass(["grid gap-4", {
206
221
  "grid grid-cols-1": !_ctx.side,
207
222
  "sm-not:grid-cols-[repeat(2,100vw)] sm-not:snap-x sm-not:snap-mandatory sm-not:snap-always sm-not:overflow-x-auto sm-not:overscroll-x-contain grid grid-cols-[auto,1fr] items-start": _ctx.side
208
223
  }])
209
- }, [
210
- !_ctx.noHeader ? (openBlock(), createElementBlock("div", {
211
- key: 0,
212
- ref: "buttonContainer",
213
- class: normalizeClass(["relative", {
214
- "sm-not:snap-start grid grid-cols-[1fr,auto]": _ctx.side,
215
- "no-scrollbar sm-not:-pl--inner-margin flex snap-x snap-mandatory snap-always overflow-x-auto overscroll-x-contain pr-[50%]": !_ctx.side
216
- }])
217
- }, [
218
- (openBlock(true), createElementBlock(Fragment, null, renderList(defaultSlotsAll.value, (slot, index) => {
219
- return openBlock(), createElementBlock(Fragment, {
220
- key: slot.props?.name
221
- }, [
222
- isTabItem(slot) ? (openBlock(), createBlock(_sfc_main$1, {
223
- key: 0,
224
- ref_for: true,
225
- ref: "button",
226
- active: current.value === slot.props?.name,
227
- index,
228
- title: slot.props?.title,
229
- icon: slot.props?.icon,
230
- "has-changes": unref(tabItemRef)?.[defaultSlots.value.indexOf(slot)]?.hasChanges === true,
231
- "has-error": unref(tabItemRef)?.[defaultSlots.value.indexOf(slot)]?.isValid === false,
232
- "has-value": unref(tabItemRef)?.[defaultSlots.value.indexOf(slot)]?.hasValue === true,
233
- first: defaultSlots.value.indexOf(slot) === 0,
234
- last: defaultSlots.value.indexOf(slot) === defaultSlots.value.length - 1,
235
- disabled: _ctx.stepper ? defaultSlots.value.indexOf(slot) > hasNoValueFirst.value : false,
236
- stepper: _ctx.stepper,
237
- "show-has-value": _ctx.showHasValue,
238
- side: _ctx.side,
239
- class: normalizeClass({
240
- "snap-center": !_ctx.side
241
- }),
242
- "onUpdate:indicatorStyle": _cache[0] || (_cache[0] = ($event) => indicatorStyle.value = $event),
243
- "onUpdate:scrollPosition": updateScrollPosition,
244
- onClick: ($event) => unref(switchTab)(slot.props?.name)
245
- }, createSlots({ _: 2 }, [
246
- slot.children?.title ? {
247
- name: "title",
248
- fn: withCtx((scope) => [
249
- (openBlock(), createBlock(resolveDynamicComponent(slot.children?.title), mergeProps({ ref_for: true }, scope), null, 16))
250
- ]),
251
- key: "0"
252
- } : void 0,
253
- slot.children?.suffix ? {
254
- name: "suffix",
255
- fn: withCtx((scope) => [
256
- (openBlock(), createBlock(resolveDynamicComponent(slot.children?.suffix), mergeProps({ ref_for: true }, scope), null, 16))
257
- ]),
258
- key: "1"
259
- } : void 0,
260
- slot.children?.right ? {
261
- name: "right",
262
- fn: withCtx((scope) => [
263
- (openBlock(), createBlock(resolveDynamicComponent(slot.children?.right), mergeProps({ ref_for: true }, scope), null, 16))
264
- ]),
265
- key: "2"
266
- } : void 0
267
- ]), 1032, ["active", "index", "title", "icon", "has-changes", "has-error", "has-value", "first", "last", "disabled", "stepper", "show-has-value", "side", "class", "onClick"])) : (openBlock(), createBlock(resolveDynamicComponent(slot), { key: 1 }))
268
- ], 64);
269
- }), 128)),
270
- !_ctx.stepper ? (openBlock(), createElementBlock("div", {
224
+ }, {
225
+ default: withCtx(() => [
226
+ !_ctx.noHeader ? (openBlock(), createElementBlock("div", {
271
227
  key: 0,
272
- class: normalizeClass(["absolute rounded-sm duration-500", {
273
- "bg-primary-default dark:bg-primary-dark": currentIsValid.value !== false,
274
- "bg-negative dark:bg-negative-dark": currentIsValid.value === false,
275
- "transition-[left,width,background-color]": !_ctx.side && indicatorStyle.value !== void 0,
276
- "transition-[top,height,background-color]": _ctx.side && indicatorStyle.value !== void 0
277
- }]),
278
- style: normalizeStyle(indicatorStyle.value)
279
- }, null, 6)) : createCommentVNode("", true)
280
- ], 2)) : createCommentVNode("", true),
281
- defaultSlots.value.some((slot) => slot.children?.default) ? (openBlock(), createElementBlock("div", {
282
- key: 1,
283
- class: normalizeClass(["relative h-full transition-[min-height] duration-300", {
284
- "sm-not:snap-start": _ctx.side
285
- }]),
286
- style: normalizeStyle({ minHeight: minHeight.value ? minHeight.value + "px" : "auto", "--direction-factor": isDirect.value ? "1" : "-1" })
287
- }, [
288
- createVNode(TransitionGroup, {
289
- "enter-active-class": "transition-[transform,opacity] duration-[250ms] w-full",
290
- "leave-active-class": "transition-[transform,opacity] duration-[250ms] w-full absolute top-0",
291
- "enter-from-class": _ctx.lessTransitions || _ctx.side ? "opacity-0" : "opacity-0 translate-x-[calc((100%+var(--inner-margin))*var(--direction-factor))]",
292
- "leave-to-class": _ctx.lessTransitions || _ctx.side ? "opacity-0" : "opacity-0 translate-x-[calc((100%+var(--inner-margin))*var(--direction-factor)*-1)]"
293
- }, {
294
- default: withCtx(() => [
295
- (openBlock(true), createElementBlock(Fragment, null, renderList(defaultSlots.value, (slot) => {
296
- return openBlock(), createBlock(_sfc_main$2, {
228
+ ref: "buttonContainer",
229
+ class: normalizeClass(["relative", {
230
+ "sm-not:snap-start grid grid-cols-[1fr,auto]": _ctx.side,
231
+ "no-scrollbar sm-not:-pl--inner-margin flex snap-x snap-mandatory snap-always overflow-x-auto overscroll-x-contain pr-[50%]": !_ctx.side
232
+ }])
233
+ }, [
234
+ (openBlock(true), createElementBlock(Fragment, null, renderList(defaultSlotsAll.value, (slot, index) => {
235
+ return openBlock(), createElementBlock(Fragment, {
236
+ key: slot.props?.name
237
+ }, [
238
+ isTabItem(slot) ? (openBlock(), createBlock(_sfc_main$2, {
239
+ key: 0,
297
240
  ref_for: true,
298
- ref: "tabItem",
299
- key: slot.props?.name,
300
- name: slot.props?.name,
301
- title: slot.props?.title,
302
- active: slot.props?.name === current.value,
303
- removable: slot.props?.removable,
304
- "onTab:switch": _cache[1] || (_cache[1] = ($event) => !_ctx.noSwitchOnInvalid && unref(switchOnInvalid)($event)),
305
- "onUpdate:height": _cache[2] || (_cache[2] = ($event) => !_ctx.disableMinHeight && updateHeight($event)),
306
- "onUpdate:active": ($event) => _ctx.$emit("update:current-title", slot.props?.title)
307
- }, {
308
- default: withCtx(() => [
309
- (openBlock(), createBlock(resolveDynamicComponent(slot)))
310
- ]),
311
- _: 2
312
- }, 1032, ["name", "title", "active", "removable", "onUpdate:active"]);
313
- }), 128))
314
- ]),
315
- _: 1
316
- }, 8, ["enter-from-class", "leave-to-class"])
317
- ], 6)) : createCommentVNode("", true)
318
- ], 2);
241
+ ref: "button",
242
+ active: current.value === slot.props.name,
243
+ index,
244
+ title: slot.props.title,
245
+ icon: slot.props.icon,
246
+ "has-changes": unref(formRef)?.hasChangesMap[slot.props.name] === true,
247
+ "has-error": typeof unref(formRef)?.errorMessageMap[slot.props.name] === "string",
248
+ "has-value": unref(formRef)?.hasValueMap[slot.props.name] === true,
249
+ first: defaultSlots.value.indexOf(slot) === 0,
250
+ last: defaultSlots.value.indexOf(slot) === defaultSlots.value.length - 1,
251
+ disabled: _ctx.stepper ? defaultSlots.value.indexOf(slot) > hasNoValueFirst.value : false,
252
+ stepper: _ctx.stepper,
253
+ "show-has-value": _ctx.showHasValue,
254
+ side: _ctx.side,
255
+ class: normalizeClass({
256
+ "snap-center": !_ctx.side
257
+ }),
258
+ "onUpdate:indicatorStyle": _cache[0] || (_cache[0] = ($event) => indicatorStyle.value = $event),
259
+ "onUpdate:scrollPosition": updateScrollPosition,
260
+ onClick: ($event) => unref(switchTab)(slot.props?.name)
261
+ }, createSlots({ _: 2 }, [
262
+ slot.children?.title ? {
263
+ name: "title",
264
+ fn: withCtx((scope) => [
265
+ (openBlock(), createBlock(resolveDynamicComponent(slot.children?.title), mergeProps({ ref_for: true }, scope), null, 16))
266
+ ]),
267
+ key: "0"
268
+ } : void 0,
269
+ slot.children?.suffix ? {
270
+ name: "suffix",
271
+ fn: withCtx((scope) => [
272
+ (openBlock(), createBlock(resolveDynamicComponent(slot.children?.suffix), mergeProps({ ref_for: true }, scope), null, 16))
273
+ ]),
274
+ key: "1"
275
+ } : void 0,
276
+ slot.children?.right ? {
277
+ name: "right",
278
+ fn: withCtx((scope) => [
279
+ (openBlock(), createBlock(resolveDynamicComponent(slot.children?.right), mergeProps({ ref_for: true }, scope), null, 16))
280
+ ]),
281
+ key: "2"
282
+ } : void 0
283
+ ]), 1032, ["active", "index", "title", "icon", "has-changes", "has-error", "has-value", "first", "last", "disabled", "stepper", "show-has-value", "side", "class", "onClick"])) : (openBlock(), createBlock(resolveDynamicComponent(slot), { key: 1 }))
284
+ ], 64);
285
+ }), 128)),
286
+ !_ctx.stepper ? (openBlock(), createElementBlock("div", {
287
+ key: 0,
288
+ class: normalizeClass(["absolute rounded-sm duration-500", {
289
+ "bg-primary-default dark:bg-primary-dark": currentIsValid.value !== false,
290
+ "bg-negative dark:bg-negative-dark": currentIsValid.value === false,
291
+ "transition-[left,width,background-color]": !_ctx.side && indicatorStyle.value !== void 0,
292
+ "transition-[top,height,background-color]": _ctx.side && indicatorStyle.value !== void 0
293
+ }]),
294
+ style: normalizeStyle(indicatorStyle.value)
295
+ }, null, 6)) : createCommentVNode("", true)
296
+ ], 2)) : createCommentVNode("", true),
297
+ defaultSlots.value.some((slot) => slot.children?.default) ? (openBlock(), createElementBlock("div", {
298
+ key: 1,
299
+ class: normalizeClass(["relative h-full transition-[min-height] duration-300", {
300
+ "sm-not:snap-start": _ctx.side
301
+ }]),
302
+ style: normalizeStyle({ minHeight: minHeight.value ? minHeight.value + "px" : "auto", "--direction-factor": isDirect.value ? "1" : "-1" })
303
+ }, [
304
+ createVNode(TransitionGroup, {
305
+ "enter-active-class": "transition-[transform,opacity] duration-[250ms] w-full",
306
+ "leave-active-class": "transition-[transform,opacity] duration-[250ms] w-full absolute top-0",
307
+ "enter-from-class": _ctx.lessTransitions || _ctx.side ? "opacity-0" : "opacity-0 translate-x-[calc((100%+var(--inner-margin))*var(--direction-factor))]",
308
+ "leave-to-class": _ctx.lessTransitions || _ctx.side ? "opacity-0" : "opacity-0 translate-x-[calc((100%+var(--inner-margin))*var(--direction-factor)*-1)]"
309
+ }, {
310
+ default: withCtx(() => [
311
+ (openBlock(true), createElementBlock(Fragment, null, renderList(defaultSlots.value, (slot) => {
312
+ return openBlock(), createBlock(_sfc_main$3, {
313
+ ref_for: true,
314
+ ref: "tabItem",
315
+ key: slot.props.name,
316
+ name: slot.props.name,
317
+ title: slot.props.title,
318
+ active: slot.props.name === current.value,
319
+ removable: slot.props.removable ?? false,
320
+ "onTab:switch": _cache[1] || (_cache[1] = ($event) => !_ctx.noSwitchOnInvalid && unref(switchOnInvalid)($event)),
321
+ "onUpdate:height": _cache[2] || (_cache[2] = ($event) => !_ctx.disableMinHeight && updateHeight($event)),
322
+ "onUpdate:active": ($event) => _ctx.$emit("update:current-title", slot.props?.title)
323
+ }, {
324
+ default: withCtx(() => [
325
+ (openBlock(), createBlock(resolveDynamicComponent(slot)))
326
+ ]),
327
+ _: 2
328
+ }, 1032, ["name", "title", "active", "removable", "onUpdate:active"]);
329
+ }), 128))
330
+ ]),
331
+ _: 1
332
+ }, 8, ["enter-from-class", "leave-to-class"])
333
+ ], 6)) : createCommentVNode("", true)
334
+ ]),
335
+ _: 1
336
+ }, 8, ["name", "class"]);
319
337
  };
320
338
  }
321
339
  });
@@ -1,6 +1,8 @@
1
1
  declare function __VLS_template(): {
2
- slots: {
3
- default?(_: {}): any;
2
+ slots: Readonly<{
3
+ default: () => [];
4
+ }> & {
5
+ default: () => [];
4
6
  };
5
7
  refs: {};
6
8
  attrs: Partial<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"WTabsColumns.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabsColumns.vue"],"names":[],"mappings":"AAuCA,iBAAS,cAAc;;yBA+CM,GAAG;;;WASlB,OAAO,IAA6B;EAEjD;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WTabsColumns.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabsColumns.vue"],"names":[],"mappings":"AA+CA,iBAAS,cAAc;;iBAPZ,MAAM,EAAE;;iBAAR,MAAM,EAAE;;;WA4DL,OAAO,IAA6B;EAEjD;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,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 { TabsItemScopedProps } from './types';
1
+ import { TabsItemProps, TabsItemScopedProps } from './types';
2
2
  declare function __VLS_template(): {
3
3
  slots: Readonly<{
4
4
  default?: () => void;
@@ -15,23 +15,7 @@ declare function __VLS_template(): {
15
15
  attrs: Partial<{}>;
16
16
  };
17
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
- declare const __VLS_component: import('vue').DefineComponent<{
19
- title: string;
20
- name: string;
21
- icon?: SVGComponent;
22
- disabled?: boolean;
23
- removable?: boolean;
24
- divided?: boolean;
25
- init?: boolean;
26
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
27
- title: string;
28
- name: string;
29
- icon?: SVGComponent;
30
- disabled?: boolean;
31
- removable?: boolean;
32
- divided?: boolean;
33
- init?: boolean;
34
- }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
+ declare const __VLS_component: import('vue').DefineComponent<TabsItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TabsItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
35
19
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
36
20
  export default _default;
37
21
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1 +1 @@
1
- {"version":3,"file":"WTabsItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabsItem.vue"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAA;AA0BhD,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,QA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KAEV,CAAA;CACD,CAAC"}
@@ -39,14 +39,18 @@ declare function __VLS_template(): {
39
39
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
40
40
  }>, {
41
41
  isValid: import('vue').ComputedRef<boolean>;
42
- hasChanges: import('vue').ComputedRef<boolean>;
43
- hasValue: import('vue').ComputedRef<boolean | null>;
44
- validate: (silent?: boolean, path?: import('../../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
45
- invalidate: (payload: {
46
- [x: string]: string | string[] | undefined;
47
- }) => void;
48
- initModel: () => void;
49
- errorMessage: import('vue').ComputedRef<string>;
42
+ hasChanges: import('vue').Ref<boolean, boolean>;
43
+ hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
44
+ hasValue: import('vue').Ref<boolean | null, boolean | null>;
45
+ hasValueMap: import('vue').Ref<Record<string, boolean | null>, Record<string, boolean | null>>;
46
+ validate: import('vue').Ref<(silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined, (silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined>;
47
+ validateMap: import('vue').Ref<Record<string, (silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined>, Record<string, (silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined>>;
48
+ invalidate: import('vue').Ref<(messages: Record<string, string | string[] | undefined>) => void, (messages: Record<string, string | string[] | undefined>) => void>;
49
+ invalidateMap: import('vue').Ref<Record<string, (messages: Record<string, string | string[] | undefined>) => void>, Record<string, (messages: Record<string, string | string[] | undefined>) => void>>;
50
+ initModel: import('vue').Ref<() => void, () => void>;
51
+ initModelMap: import('vue').Ref<Record<string, () => void>, Record<string, () => void>>;
52
+ errorMessage: import('vue').Ref<string | undefined, string | undefined>;
53
+ errorMessageMap: import('vue').Ref<Record<string, string | undefined>, Record<string, string | undefined>>;
50
54
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
51
55
  "update:has-changes": (value: boolean) => any;
52
56
  "update:is-valid": (value: boolean | undefined) => any;
@@ -79,16 +83,20 @@ declare function __VLS_template(): {
79
83
  "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
80
84
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
81
85
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
82
- }>, "errorMessage" | "hasChanges" | "isValid" | "hasValue" | "validate" | "invalidate" | "initModel"> & import('vue').ShallowUnwrapRef<{
86
+ }>, "errorMessage" | "hasChanges" | "hasChangesMap" | "isValid" | "hasValue" | "hasValueMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
83
87
  isValid: import('vue').ComputedRef<boolean>;
84
- hasChanges: import('vue').ComputedRef<boolean>;
85
- hasValue: import('vue').ComputedRef<boolean | null>;
86
- validate: (silent?: boolean, path?: import('../../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
87
- invalidate: (payload: {
88
- [x: string]: string | string[] | undefined;
89
- }) => void;
90
- initModel: () => void;
91
- errorMessage: import('vue').ComputedRef<string>;
88
+ hasChanges: import('vue').Ref<boolean, boolean>;
89
+ hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
90
+ hasValue: import('vue').Ref<boolean | null, boolean | null>;
91
+ hasValueMap: import('vue').Ref<Record<string, boolean | null>, Record<string, boolean | null>>;
92
+ validate: import('vue').Ref<(silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined, (silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined>;
93
+ validateMap: import('vue').Ref<Record<string, (silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined>, Record<string, (silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined>>;
94
+ invalidate: import('vue').Ref<(messages: Record<string, string | string[] | undefined>) => void, (messages: Record<string, string | string[] | undefined>) => void>;
95
+ invalidateMap: import('vue').Ref<Record<string, (messages: Record<string, string | string[] | undefined>) => void>, Record<string, (messages: Record<string, string | string[] | undefined>) => void>>;
96
+ initModel: import('vue').Ref<() => void, () => void>;
97
+ initModelMap: import('vue').Ref<Record<string, () => void>, Record<string, () => void>>;
98
+ errorMessage: import('vue').Ref<string | undefined, string | undefined>;
99
+ errorMessageMap: import('vue').Ref<Record<string, string | undefined>, Record<string, string | undefined>>;
92
100
  }> & {} & import('vue').ComponentCustomProperties & {} & {
93
101
  $slots: {
94
102
  default?(_: {}): any;
@@ -105,15 +113,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
105
113
  removable: boolean;
106
114
  }, {
107
115
  emitHeight: () => void;
108
- isValid: import('vue').ComputedRef<boolean>;
109
- hasChanges: import('vue').ComputedRef<boolean>;
110
- hasValue: import('vue').ComputedRef<boolean | null>;
111
- errorMessage: import('vue').ComputedRef<string | undefined>;
112
- validate: (silent?: boolean, path?: import('../../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
113
- invalidate: (payload: {
114
- [x: string]: string | string[] | undefined;
115
- }) => void;
116
- initModel: () => void;
116
+ name: import('vue').Ref<string, string>;
117
117
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
118
118
  "tab:switch": (value: string) => any;
119
119
  "update:height": (value: number) => any;
@@ -163,14 +163,18 @@ declare const __VLS_component: import('vue').DefineComponent<{
163
163
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
164
164
  }>, {
165
165
  isValid: import('vue').ComputedRef<boolean>;
166
- hasChanges: import('vue').ComputedRef<boolean>;
167
- hasValue: import('vue').ComputedRef<boolean | null>;
168
- validate: (silent?: boolean, path?: import('../../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
169
- invalidate: (payload: {
170
- [x: string]: string | string[] | undefined;
171
- }) => void;
172
- initModel: () => void;
173
- errorMessage: import('vue').ComputedRef<string>;
166
+ hasChanges: import('vue').Ref<boolean, boolean>;
167
+ hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
168
+ hasValue: import('vue').Ref<boolean | null, boolean | null>;
169
+ hasValueMap: import('vue').Ref<Record<string, boolean | null>, Record<string, boolean | null>>;
170
+ validate: import('vue').Ref<(silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined, (silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined>;
171
+ validateMap: import('vue').Ref<Record<string, (silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined>, Record<string, (silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined>>;
172
+ invalidate: import('vue').Ref<(messages: Record<string, string | string[] | undefined>) => void, (messages: Record<string, string | string[] | undefined>) => void>;
173
+ invalidateMap: import('vue').Ref<Record<string, (messages: Record<string, string | string[] | undefined>) => void>, Record<string, (messages: Record<string, string | string[] | undefined>) => void>>;
174
+ initModel: import('vue').Ref<() => void, () => void>;
175
+ initModelMap: import('vue').Ref<Record<string, () => void>, Record<string, () => void>>;
176
+ errorMessage: import('vue').Ref<string | undefined, string | undefined>;
177
+ errorMessageMap: import('vue').Ref<Record<string, string | undefined>, Record<string, string | undefined>>;
174
178
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
175
179
  "update:has-changes": (value: boolean) => any;
176
180
  "update:is-valid": (value: boolean | undefined) => any;
@@ -203,16 +207,20 @@ declare const __VLS_component: import('vue').DefineComponent<{
203
207
  "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
204
208
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
205
209
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
206
- }>, "errorMessage" | "hasChanges" | "isValid" | "hasValue" | "validate" | "invalidate" | "initModel"> & import('vue').ShallowUnwrapRef<{
210
+ }>, "errorMessage" | "hasChanges" | "hasChangesMap" | "isValid" | "hasValue" | "hasValueMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
207
211
  isValid: import('vue').ComputedRef<boolean>;
208
- hasChanges: import('vue').ComputedRef<boolean>;
209
- hasValue: import('vue').ComputedRef<boolean | null>;
210
- validate: (silent?: boolean, path?: import('../../Form/use/useFormValidateMap').ValidatePath) => string | undefined;
211
- invalidate: (payload: {
212
- [x: string]: string | string[] | undefined;
213
- }) => void;
214
- initModel: () => void;
215
- errorMessage: import('vue').ComputedRef<string>;
212
+ hasChanges: import('vue').Ref<boolean, boolean>;
213
+ hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
214
+ hasValue: import('vue').Ref<boolean | null, boolean | null>;
215
+ hasValueMap: import('vue').Ref<Record<string, boolean | null>, Record<string, boolean | null>>;
216
+ validate: import('vue').Ref<(silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined, (silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined>;
217
+ validateMap: import('vue').Ref<Record<string, (silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined>, Record<string, (silent?: boolean, path?: import('../../Form/models/utils').ValidatePath) => string | undefined>>;
218
+ invalidate: import('vue').Ref<(messages: Record<string, string | string[] | undefined>) => void, (messages: Record<string, string | string[] | undefined>) => void>;
219
+ invalidateMap: import('vue').Ref<Record<string, (messages: Record<string, string | string[] | undefined>) => void>, Record<string, (messages: Record<string, string | string[] | undefined>) => void>>;
220
+ initModel: import('vue').Ref<() => void, () => void>;
221
+ initModelMap: import('vue').Ref<Record<string, () => void>, Record<string, () => void>>;
222
+ errorMessage: import('vue').Ref<string | undefined, string | undefined>;
223
+ errorMessageMap: import('vue').Ref<Record<string, string | undefined>, Record<string, string | undefined>>;
216
224
  }> & {} & import('vue').ComponentCustomProperties & {} & {
217
225
  $slots: {
218
226
  default?(_: {}): any;
@@ -1 +1 @@
1
- {"version":3,"file":"TabItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/components/TabItem.vue"],"names":[],"mappings":"AA0EA,OAAO,EAAW,QAAQ,EAAwB,MAAM,KAAK,CAAA;AAiF7D,iBAAS,cAAc;;yBA6DM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA0DgvjB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;WAhDx3jB,OAAO,IAA6B;EAEjD;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;UAhKb,MAAM;WACL,MAAM;YACL,OAAO;eACJ,OAAO;;sBAuBG,IAAI;;;;;;;;;;;;;;;UA1BnB,MAAM;WACL,MAAM;YACL,OAAO;eACJ,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA4L4vjB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;OAlBp4jB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"TabItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/components/TabItem.vue"],"names":[],"mappings":"AA2DA,OAAO,EAAC,QAAQ,EAA+B,MAAM,KAAK,CAAA;AA4D1D,iBAAS,cAAc;;yBA6DM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA0D4qmB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAhDpzmB,OAAO,IAA6B;EAEjD;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;UA3Ib,MAAM;WACL,MAAM;YACL,OAAO;eACJ,OAAO;;sBAcG,IAAI;;;;;;;UAjBnB,MAAM;WACL,MAAM;YACL,OAAO;eACJ,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAuKwrmB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAlBh0mB,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, computed, watch, nextTick, withDirectives, openBlock, createBlock, withCtx, renderSlot, vShow, createCommentVNode } from 'vue';
1
+ import { defineComponent, useTemplateRef, watch, nextTick, toRef, withDirectives, openBlock, createBlock, withCtx, renderSlot, vShow, createCommentVNode } from 'vue';
2
2
  import _sfc_main$1 from '../../Form/WForm.vue.js';
3
3
  import { useTabItemActiveListener } from '../use/useTabItemActiveListener.js';
4
4
 
@@ -16,13 +16,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
16
  const emit = __emit;
17
17
  const { callListeners } = useTabItemActiveListener();
18
18
  const formRef = useTemplateRef("form");
19
- const isValid = computed(() => formRef.value?.isValid ?? true);
20
- const hasChanges = computed(() => formRef.value?.hasChanges ?? false);
21
- const hasValue = computed(() => formRef.value?.hasValue ?? null);
22
- const errorMessage = computed(() => formRef.value?.errorMessage);
23
- const validate = (...args) => formRef.value?.validate(...args);
24
- const invalidate = (...args) => formRef.value?.invalidate(...args);
25
- const initModel = () => formRef.value?.initModel();
26
19
  const emitHeight = () => {
27
20
  if (!formRef.value) return;
28
21
  emit("update:height", formRef.value.$el.offsetHeight);
@@ -35,13 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35
28
  }, { immediate: true });
36
29
  __expose({
37
30
  emitHeight,
38
- isValid,
39
- hasChanges,
40
- hasValue,
41
- errorMessage,
42
- validate,
43
- invalidate,
44
- initModel
31
+ name: toRef(props, "name")
45
32
  });
46
33
  return (_ctx, _cache) => {
47
34
  return !_ctx.removable || _ctx.active ? withDirectives((openBlock(), createBlock(_sfc_main$1, {