eco-vue-js 0.10.35 → 0.10.37

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 (110) hide show
  1. package/dist/components/ActionsBar/WActionsBar.vue.d.ts +1 -0
  2. package/dist/components/ActionsBar/WActionsBar.vue.d.ts.map +1 -1
  3. package/dist/components/ActionsBar/WActionsBar.vue.js +4 -3
  4. package/dist/components/Button/WButtonAction.vue.d.ts +1 -0
  5. package/dist/components/Button/WButtonAction.vue.d.ts.map +1 -1
  6. package/dist/components/Button/WButtonAction.vue.js +17 -6
  7. package/dist/components/Button/WButtonDropdown.vue.js +0 -2
  8. package/dist/components/Button/WButtonMore.vue.d.ts.map +1 -1
  9. package/dist/components/Button/WButtonMore.vue.js +0 -1
  10. package/dist/components/Button/WButtonSelection.vue.js +1 -1
  11. package/dist/components/Dropdown/WDropdown.vue.d.ts +6 -11
  12. package/dist/components/Dropdown/WDropdown.vue.d.ts.map +1 -1
  13. package/dist/components/Dropdown/WDropdown.vue.js +1 -1
  14. package/dist/components/Dropdown/types.d.ts +9 -0
  15. package/dist/components/Dropdown/types.d.ts.map +1 -1
  16. package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts +18 -32
  17. package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts.map +1 -1
  18. package/dist/components/DropdownMenu/WDropdownMenu.vue.js +5 -9
  19. package/dist/components/DropdownMenu/types.d.ts +0 -2
  20. package/dist/components/DropdownMenu/types.d.ts.map +1 -1
  21. package/dist/components/Form/WForm.vue.d.ts +4 -0
  22. package/dist/components/Form/WForm.vue.d.ts.map +1 -1
  23. package/dist/components/Form/WForm.vue.js +11 -2
  24. package/dist/components/Form/WFormValidator.vue.d.ts +2 -0
  25. package/dist/components/Form/WFormValidator.vue.d.ts.map +1 -1
  26. package/dist/components/Form/WFormValidator.vue.js +24 -25
  27. package/dist/components/Form/models/injection.d.ts +1 -0
  28. package/dist/components/Form/models/injection.d.ts.map +1 -1
  29. package/dist/components/Form/models/injection.js +2 -1
  30. package/dist/components/Form/use/useFormValueMap.d.ts.map +1 -1
  31. package/dist/components/Form/use/useFormValueMap.js +2 -6
  32. package/dist/components/FormAsync/WFormAsyncSelect.vue.js +0 -2
  33. package/dist/components/FormAsync/WFormAsyncSelectInfiniteSingle.vue.js +0 -2
  34. package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.js +0 -2
  35. package/dist/components/FormAsync/WFormAsyncSelectStringified.vue.js +0 -2
  36. package/dist/components/FormAsync/WFormAsyncToggle.vue.d.ts +3 -1
  37. package/dist/components/FormAsync/WFormAsyncToggle.vue.d.ts.map +1 -1
  38. package/dist/components/FormAsync/WFormAsyncToggle.vue.js +10 -2
  39. package/dist/components/InfiniteList/WInfiniteList.vue.d.ts +0 -1
  40. package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
  41. package/dist/components/InfiniteList/WInfiniteList.vue.js +2 -5
  42. package/dist/components/InfiniteList/WInfiniteListScrollingElement.vue.d.ts +25 -0
  43. package/dist/components/InfiniteList/WInfiniteListScrollingElement.vue.d.ts.map +1 -0
  44. package/dist/components/InfiniteList/WInfiniteListScrollingElement.vue.js +23 -0
  45. package/dist/components/InfiniteList/WInfiniteListScrollingElement.vue2.js +5 -0
  46. package/dist/components/InfiniteList/WInfiniteListWrapper.vue.d.ts +0 -1
  47. package/dist/components/InfiniteList/WInfiniteListWrapper.vue.d.ts.map +1 -1
  48. package/dist/components/InfiniteList/WInfiniteListWrapper.vue.js +8 -5
  49. package/dist/components/InfiniteList/components/InfiniteListButton.vue.js +1 -1
  50. package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts +0 -1
  51. package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -1
  52. package/dist/components/InfiniteList/components/InfiniteListPage.vue.js +5 -4
  53. package/dist/components/InfiniteList/components/InfiniteListPages.vue.d.ts +0 -1
  54. package/dist/components/InfiniteList/components/InfiniteListPages.vue.d.ts.map +1 -1
  55. package/dist/components/InfiniteList/components/InfiniteListPages.vue.js +7 -8
  56. package/dist/components/InfiniteList/components/InfiniteListScroll.vue.d.ts +3 -6
  57. package/dist/components/InfiniteList/components/InfiniteListScroll.vue.d.ts.map +1 -1
  58. package/dist/components/InfiniteList/components/InfiniteListScroll.vue.js +8 -10
  59. package/dist/components/InfiniteList/models/injection.d.ts +3 -0
  60. package/dist/components/InfiniteList/models/injection.d.ts.map +1 -0
  61. package/dist/components/InfiniteList/models/injection.js +3 -0
  62. package/dist/components/InfiniteList/use/useInfiniteListHeader.d.ts +1 -1
  63. package/dist/components/InfiniteList/use/useInfiniteListHeader.d.ts.map +1 -1
  64. package/dist/components/InfiniteList/use/useInfiniteListHeader.js +5 -3
  65. package/dist/components/Input/WInput.vue.js +1 -1
  66. package/dist/components/Input/WInputDate.vue.js +0 -2
  67. package/dist/components/Input/WInputOptions.vue.js +0 -2
  68. package/dist/components/Input/WInputSuggest.vue.d.ts.map +1 -1
  69. package/dist/components/Input/WInputSuggest.vue.js +17 -18
  70. package/dist/components/List/WListCard.vue.d.ts.map +1 -1
  71. package/dist/components/List/WListCard.vue.js +5 -5
  72. package/dist/components/List/WListHeader.vue.js +4 -4
  73. package/dist/components/MenuItem/WMenuItem.vue.d.ts.map +1 -1
  74. package/dist/components/MenuItem/WMenuItem.vue.js +3 -3
  75. package/dist/components/Modal/WModal.vue.d.ts.map +1 -1
  76. package/dist/components/Modal/WModal.vue.js +5 -1
  77. package/dist/components/Modal/WModalImport.vue.js +2 -2
  78. package/dist/components/Modal/WModalStepper.vue.d.ts +40 -8
  79. package/dist/components/Modal/WModalStepper.vue.d.ts.map +1 -1
  80. package/dist/components/Modal/WModalWrapper.vue.d.ts +8 -2
  81. package/dist/components/Modal/WModalWrapper.vue.d.ts.map +1 -1
  82. package/dist/components/Modal/WModalWrapper.vue.js +35 -21
  83. package/dist/components/Modal/models/injection.d.ts +4 -0
  84. package/dist/components/Modal/models/injection.d.ts.map +1 -0
  85. package/dist/components/Modal/models/injection.js +4 -0
  86. package/dist/components/Progress/WProgressStriped.vue.js +2 -2
  87. package/dist/components/Select/WSelect.vue.js +0 -2
  88. package/dist/components/Select/WSelectAsync.vue.js +0 -2
  89. package/dist/components/Select/WSelectAsyncList.vue.d.ts.map +1 -1
  90. package/dist/components/Select/WSelectAsyncList.vue.js +41 -41
  91. package/dist/components/Select/WSelectAsyncSingle.vue.js +0 -2
  92. package/dist/components/Select/WSelectSingle.vue.js +0 -2
  93. package/dist/components/Select/WSelectStringified.vue.js +0 -2
  94. package/dist/components/Select/components/SelectAsyncList.vue.d.ts +0 -1
  95. package/dist/components/Select/components/SelectAsyncList.vue.d.ts.map +1 -1
  96. package/dist/components/Select/components/SelectAsyncList.vue.js +1 -3
  97. package/dist/components/Tabs/WTabs.vue.d.ts +48 -24
  98. package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
  99. package/dist/components/Tabs/WTabs.vue.js +2 -2
  100. package/dist/components/Tabs/components/TabItem.vue.d.ts +20 -4
  101. package/dist/components/Tabs/components/TabItem.vue.d.ts.map +1 -1
  102. package/dist/components/Toggle/WToggle.vue.d.ts +3 -1
  103. package/dist/components/Toggle/WToggle.vue.d.ts.map +1 -1
  104. package/dist/components/Toggle/WToggle.vue.js +10 -6
  105. package/dist/imports/componentsPlugin.d.ts +2 -1
  106. package/dist/imports/componentsPlugin.d.ts.map +1 -1
  107. package/dist/main.js +1 -0
  108. package/package.json +4 -1
  109. package/tailwind-base/plugins/default.ts +11 -18
  110. package/tailwind-base/theme/sizes.ts +5 -0
@@ -2,6 +2,7 @@ import { Component, VNode } from 'vue';
2
2
  type __VLS_Props = {
3
3
  filter?: Component;
4
4
  bottom?: Component;
5
+ textFilter?: string;
5
6
  };
6
7
  declare function __VLS_template(): {
7
8
  attrs: Partial<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"WActionsBar.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionsBar/WActionsBar.vue"],"names":[],"mappings":"AAs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0HvB;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -31,7 +31,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
31
31
  __name: "WActionsBar",
32
32
  props: {
33
33
  filter: {},
34
- bottom: {}
34
+ bottom: {},
35
+ textFilter: {}
35
36
  },
36
37
  setup(__props) {
37
38
  const props = __props;
@@ -83,13 +84,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
83
84
  _ctx.$slots.top && (hasFilter.value || _ctx.bottom || _ctx.$slots.bottom) ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("", true),
84
85
  hasFilter.value ? (openBlock(), createBlock(_sfc_main$1, {
85
86
  key: 1,
86
- title: "Filters",
87
+ title: _ctx.textFilter ?? "Filters",
87
88
  icon: markRaw(unref(IconFilter)),
88
89
  active: isOpen.value,
89
90
  count: filterCount.value,
90
91
  "semantic-type": unref(SemanticType).PRIMARY,
91
92
  onClick: toggle
92
- }, null, 8, ["icon", "active", "count", "semantic-type"])) : createCommentVNode("", true),
93
+ }, null, 8, ["title", "icon", "active", "count", "semantic-type"])) : createCommentVNode("", true),
93
94
  renderSlot(_ctx.$slots, "bottom", {}, () => [
94
95
  _ctx.bottom ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.bottom), { key: 0 })) : createCommentVNode("", true)
95
96
  ])
@@ -10,6 +10,7 @@ interface Props extends Partial<LinkProps> {
10
10
  disabled?: boolean;
11
11
  skeleton?: boolean;
12
12
  tooltipText?: string;
13
+ titleText?: boolean;
13
14
  }
14
15
  declare function __VLS_template(): {
15
16
  attrs: Partial<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"WButtonAction.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonAction.vue"],"names":[],"mappings":"AAwDA;AAAA,OAwGO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAU5C,OAAO,EAAC,YAAY,EAA+B,MAAM,sBAAsB,CAAA;AAE/E,UAAU,KAAM,SAAQ,OAAO,CAAC,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,QAAQ,GAAG,GAAG,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAmCD,iBAAS,cAAc;WAiIT,OAAO,IAA6B;;sBAVvB,GAAG;;;;EAe7B;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;WAjMX,MAAM;eAvHE,YAAY;UAmHrB,YAAY;SAGb,QAAQ,GAAG,GAAG;kBAEL,YAAY;iBAGb,MAAM;6EAsMpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WButtonAction.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonAction.vue"],"names":[],"mappings":"AAsEA;AAAA,OAuHO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAU5C,OAAO,EAAC,YAAY,EAA+B,MAAM,sBAAsB,CAAA;AAE/E,UAAU,KAAM,SAAQ,OAAO,CAAC,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,QAAQ,GAAG,GAAG,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAmCD,iBAAS,cAAc;WAqJT,OAAO,IAA6B;;sBAVvB,GAAG;;;;EAe7B;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;WAtNX,MAAM;eAtIE,YAAY;UAkIrB,YAAY;SAGb,QAAQ,GAAG,GAAG;kBAEL,YAAY;iBAGb,MAAM;6EA2NpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,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, createBlock, openBlock, resolveDynamicComponent, unref, mergeProps, withCtx, createElementBlock, createCommentVNode, normalizeClass, withDirectives, renderSlot, vShow } from 'vue';
1
+ import { defineComponent, createBlock, openBlock, resolveDynamicComponent, unref, mergeProps, withCtx, createElementBlock, createCommentVNode, normalizeClass, withDirectives, renderSlot, vShow, Fragment, createTextVNode, toDisplayString } from 'vue';
2
2
  import { RouterLink } from 'vue-router';
3
3
  import _sfc_main$1 from '../Counter/WCounter.vue.js';
4
4
  import _sfc_main$2 from '../Shine/WShine.vue.js';
@@ -19,6 +19,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
19
19
  disabled: { type: Boolean },
20
20
  skeleton: { type: Boolean },
21
21
  tooltipText: { default: void 0 },
22
+ titleText: { type: Boolean },
22
23
  to: { default: void 0 }
23
24
  },
24
25
  emits: ["click"],
@@ -27,7 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
28
  const isBackdrop = useIsBackdrop();
28
29
  return (_ctx, _cache) => {
29
30
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.to !== void 0 ? _ctx.disabled || _ctx.skeleton ? "a" : unref(RouterLink) : _ctx.tag), mergeProps(_ctx.to !== void 0 && !_ctx.disabled && !_ctx.skeleton ? { to: _ctx.to } : void 0, {
30
- class: ["w-ripple-trigger group block h-[3.25rem] w-full px-1 py-0.5", {
31
+ class: ["w-ripple-trigger group grid w-full grid-cols-1 py-1", {
31
32
  "cursor-not-allowed opacity-50": _ctx.disabled,
32
33
  "cursor-progress": _ctx.skeleton
33
34
  }],
@@ -37,10 +38,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
37
38
  default: withCtx(() => [
38
39
  _ctx.skeleton ? (openBlock(), createBlock(WSkeleton, {
39
40
  key: 0,
40
- class: "w-skeleton-w-full w-skeleton-h-auto w-skeleton-rounded-full aspect-square"
41
+ class: "w-skeleton-w-auto w-skeleton-h-auto w-skeleton-rounded-full mx-1 aspect-square"
41
42
  })) : (openBlock(), createElementBlock("div", {
42
43
  key: 1,
43
- class: normalizeClass(["relative grid aspect-square w-full select-none items-center justify-center gap-1 rounded-full bg-[200%_auto] [background-position:right]", {
44
+ class: normalizeClass(["relative mx-1 grid aspect-square select-none items-center justify-center gap-1 rounded-full bg-[200%_auto] [background-position:right]", {
44
45
  "w-ripple w-ripple-hover cursor-pointer": !_ctx.disabled && !_ctx.skeleton,
45
46
  "text-primary dark:text-primary-dark": _ctx.active && _ctx.semanticType === unref(SemanticType).SECONDARY,
46
47
  [unref(semanticTypeBackgroundMap)[_ctx.semanticType]]: true
@@ -64,9 +65,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
65
  ]),
65
66
  !_ctx.disabled && !unref(isBackdrop) ? (openBlock(), createBlock(_sfc_main$2, { key: 1 })) : createCommentVNode("", true)
66
67
  ], 2)),
67
- _ctx.tooltipText || _ctx.title ? (openBlock(), createBlock(_sfc_main$3, {
68
+ _ctx.titleText ? (openBlock(), createElementBlock("div", {
68
69
  key: 2,
69
- text: _ctx.tooltipText ?? _ctx.title,
70
+ class: normalizeClass(["text-3xs mt-1 text-center", {
71
+ "self-center": !_ctx.skeleton
72
+ }])
73
+ }, [
74
+ _ctx.skeleton ? (openBlock(), createBlock(WSkeleton, { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
75
+ createTextVNode(toDisplayString(_ctx.title), 1)
76
+ ], 64))
77
+ ], 2)) : createCommentVNode("", true),
78
+ _ctx.tooltipText || !_ctx.titleText && _ctx.title ? (openBlock(), createBlock(_sfc_main$3, {
79
+ key: 3,
80
+ text: _ctx.tooltipText ?? (_ctx.titleText ? void 0 : _ctx.title),
70
81
  left: ""
71
82
  }, null, 8, ["text"])) : createCommentVNode("", true)
72
83
  ]),
@@ -15,8 +15,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  disabled: { type: Boolean },
16
16
  tooltipText: {},
17
17
  teleport: { type: Boolean },
18
- noZIndex: { type: Boolean },
19
- zIndex: {},
20
18
  parentElement: {},
21
19
  horizontalAlign: { default: HorizontalAlign.LEFT_INNER },
22
20
  maxHeight: { default: 200 },
@@ -1 +1 @@
1
- {"version":3,"file":"WButtonMore.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonMore.vue"],"names":[],"mappings":"A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CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -48,7 +48,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
48
48
  "max-width": 320,
49
49
  "horizontal-align": _ctx.anchor ? unref(HorizontalAlign).RIGHT_INNER : unref(HorizontalAlign).LEFT_INNER,
50
50
  "update-align": false,
51
- "z-index": 1,
52
51
  "parent-element": _ctx.anchor,
53
52
  teleport: ""
54
53
  }, {
@@ -7,7 +7,7 @@ import _sfc_main$3 from './WButtonSelectionAction.vue.js';
7
7
  import _sfc_main$4 from './WButtonSelectionState.vue.js';
8
8
  import _sfc_main$2 from '../ClickOutside/WClickOutside.vue.js';
9
9
 
10
- const _hoisted_1 = { class: "sm:left-inner sm:w-inner grid w-full grid-cols-[1fr,auto] pb-3 sm:sticky" };
10
+ const _hoisted_1 = { class: "sm:-left--left-inner sm:-w--width-inner grid w-full grid-cols-[1fr,auto] pb-3 sm:sticky" };
11
11
  const _hoisted_2 = { class: "flex" };
12
12
  const _hoisted_3 = { class: "text-primary dark:text-primary-dark font-semibold" };
13
13
  const _hoisted_4 = { class: "sm-not:text-xs" };
@@ -1,16 +1,11 @@
1
- import { DropdownProps } from './types';
1
+ import { DropdownDefaultSlotScope, DropdownProps } from './types';
2
+ import { VNode } from 'vue';
2
3
  declare function __VLS_template(): {
3
4
  attrs: Partial<{}>;
4
- slots: {
5
- default?(_: {
6
- left: string;
7
- right: string;
8
- top: string;
9
- bottom: string;
10
- isTop: boolean;
11
- isLeft: boolean;
12
- isRight: boolean;
13
- }): any;
5
+ slots: Readonly<{
6
+ default: (props: DropdownDefaultSlotScope) => VNode[];
7
+ }> & {
8
+ default: (props: DropdownDefaultSlotScope) => VNode[];
14
9
  };
15
10
  refs: {
16
11
  dropdown: HTMLDivElement;
@@ -1 +1 @@
1
- {"version":3,"file":"WDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/WDropdown.vue"],"names":[],"mappings":"AAqBA;AA8IA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,SAAS,CAAA;AA8H1C,iBAAS,cAAc;WAwCT,OAAO,IAA6B;;;;;;;;;;YAXrB,GAAG;;;;;;EAgB/B;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;kBAUnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/WDropdown.vue"],"names":[],"mappings":"AAqBA;AAkJA,OAAO,KAAK,EAAC,wBAAwB,EAAE,aAAa,EAAC,MAAM,SAAS,CAAA;AAEpE,OAAO,EAAC,KAAK,KAAK,EAAyF,MAAM,KAAK,CAAA;AAgItH,iBAAS,cAAc;WAqCT,OAAO,IAA6B;;iBArDvC,CAAC,KAAK,EAAE,wBAAwB,KAAK,KAAK,EAAE;;iBAA5C,CAAC,KAAK,EAAE,wBAAwB,KAAK,KAAK,EAAE;;;;;;EA0DtD;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;kBAUnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -68,7 +68,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
68
68
  onMounted(() => {
69
69
  if (!isClientSide || !dropdownRef.value) return;
70
70
  domListenerContainer = new DOMListenerContainer(
71
- [document, window, ...getAllScrollParents(dropdownRef.value)],
71
+ [document, window, ...getAllScrollParents(props.parentElement)],
72
72
  ["scroll", "touchmove", "resize"],
73
73
  () => {
74
74
  if (requestAnimationFrameId) window.cancelAnimationFrame(requestAnimationFrameId);
@@ -7,4 +7,13 @@ export interface DropdownProps {
7
7
  updateAlign?: boolean;
8
8
  emitUpdate?: boolean;
9
9
  }
10
+ export type DropdownDefaultSlotScope = {
11
+ left: string;
12
+ right: string;
13
+ top: string;
14
+ bottom: string;
15
+ isTop: boolean;
16
+ isLeft: boolean;
17
+ isRight: boolean;
18
+ };
10
19
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAA;AAE5D,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,eAAe,CAAA;IAChC,aAAa,EAAE,OAAO,CAAA;IACtB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAA;AAE5D,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,eAAe,CAAA;IAChC,aAAa,EAAE,OAAO,CAAA;IACtB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,OAAO,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA"}
@@ -1,19 +1,17 @@
1
1
  import { DropdownMenuProps } from './types';
2
+ import { DropdownDefaultSlotScope } from '../Dropdown/types';
3
+ import { VNode } from 'vue';
2
4
  declare function __VLS_template(): {
3
5
  attrs: Partial<{}>;
4
- slots: {
5
- content?(_: {
6
- left: string;
7
- right: string;
8
- top: string;
9
- bottom: string;
10
- isTop: boolean;
11
- isLeft: boolean;
12
- isRight: boolean;
13
- }): any;
6
+ slots: Readonly<{
7
+ toggle?: () => VNode[];
8
+ content?: (props: DropdownDefaultSlotScope) => VNode[];
9
+ }> & {
10
+ toggle?: () => VNode[];
11
+ content?: (props: DropdownDefaultSlotScope) => VNode[];
14
12
  };
15
13
  refs: {
16
- container: any;
14
+ container: unknown;
17
15
  dropdown: ({
18
16
  $: import('vue').ComponentInternalInstance;
19
17
  $data: {};
@@ -73,16 +71,10 @@ declare function __VLS_template(): {
73
71
  }>, "update"> & import('vue').ShallowUnwrapRef<{
74
72
  update: () => void;
75
73
  }> & {} & import('vue').ComponentCustomProperties & {} & {
76
- $slots: {
77
- default?(_: {
78
- left: string;
79
- right: string;
80
- top: string;
81
- bottom: string;
82
- isTop: boolean;
83
- isLeft: boolean;
84
- isRight: boolean;
85
- }): any;
74
+ $slots: Readonly<{
75
+ default: (props: DropdownDefaultSlotScope) => VNode[];
76
+ }> & {
77
+ default: (props: DropdownDefaultSlotScope) => VNode[];
86
78
  };
87
79
  }) | null;
88
80
  };
@@ -96,7 +88,7 @@ declare const __VLS_component: import('vue').DefineComponent<DropdownMenuProps,
96
88
  }, string, import('vue').PublicProps, Readonly<DropdownMenuProps> & Readonly<{
97
89
  "onUpdate:rect"?: (() => any) | undefined;
98
90
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
99
- container: any;
91
+ container: unknown;
100
92
  dropdown: ({
101
93
  $: import('vue').ComponentInternalInstance;
102
94
  $data: {};
@@ -156,16 +148,10 @@ declare const __VLS_component: import('vue').DefineComponent<DropdownMenuProps,
156
148
  }>, "update"> & import('vue').ShallowUnwrapRef<{
157
149
  update: () => void;
158
150
  }> & {} & import('vue').ComponentCustomProperties & {} & {
159
- $slots: {
160
- default?(_: {
161
- left: string;
162
- right: string;
163
- top: string;
164
- bottom: string;
165
- isTop: boolean;
166
- isLeft: boolean;
167
- isRight: boolean;
168
- }): any;
151
+ $slots: Readonly<{
152
+ default: (props: DropdownDefaultSlotScope) => VNode[];
153
+ }> & {
154
+ default: (props: DropdownDefaultSlotScope) => VNode[];
169
155
  };
170
156
  }) | null;
171
157
  }, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"WDropdownMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/DropdownMenu/WDropdownMenu.vue"],"names":[],"mappings":"AAoCA;AAAA,OA+DO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAgC9C,iBAAS,cAAc;WAuGT,OAAO,IAA6B;;;;;;;;;;YAbpB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAsDujkB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;EApC7skB;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAwBmkkB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC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;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,13 +1,12 @@
1
- import { defineComponent, useTemplateRef, computed, createElementBlock, openBlock, Fragment, createBlock, resolveDynamicComponent, mergeProps, Teleport, createCommentVNode, normalizeStyle, normalizeClass, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
1
+ import { defineComponent, inject, useTemplateRef, computed, createElementBlock, openBlock, Fragment, createBlock, resolveDynamicComponent, mergeProps, Teleport, createCommentVNode, normalizeStyle, unref, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
2
2
  import _sfc_main$1 from '../Dropdown/WDropdown.vue.js';
3
+ import { wBaseZInfex } from '../Modal/models/injection.js';
3
4
 
4
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
6
  __name: "WDropdownMenu",
6
7
  props: {
7
8
  isOpen: { type: Boolean },
8
9
  teleport: { type: Boolean },
9
- noZIndex: { type: Boolean },
10
- zIndex: {},
11
10
  parentElement: {},
12
11
  maxHeight: {},
13
12
  maxWidth: {},
@@ -17,6 +16,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
16
  },
18
17
  emits: ["update:rect"],
19
18
  setup(__props, { expose: __expose }) {
19
+ const baseZInfex = inject(wBaseZInfex, 0);
20
20
  const containerRef = useTemplateRef("container");
21
21
  const dropdownRef = useTemplateRef("dropdown");
22
22
  const element = computed(() => containerRef.value instanceof HTMLElement ? containerRef.value : containerRef.value?.$el);
@@ -41,18 +41,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
41
41
  "max-height": _ctx.maxHeight,
42
42
  "max-width": _ctx.maxWidth,
43
43
  "emit-update": _ctx.emitUpdate,
44
- class: normalizeClass({
45
- "z-[2]": !_ctx.teleport && !_ctx.noZIndex,
46
- "z-30": _ctx.teleport && !_ctx.noZIndex
47
- }),
48
- style: normalizeStyle({ zIndex: _ctx.zIndex }),
44
+ style: normalizeStyle({ zIndex: _ctx.teleport ? unref(baseZInfex) + 2 : 2 }),
49
45
  "onUpdate:rect": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:rect"))
50
46
  }, {
51
47
  default: withCtx((defaultScope) => [
52
48
  renderSlot(_ctx.$slots, "content", normalizeProps(guardReactiveProps(defaultScope)))
53
49
  ]),
54
50
  _: 3
55
- }, 8, ["parent-element", "horizontal-align", "update-align", "max-height", "max-width", "emit-update", "class", "style"])) : createCommentVNode("", true)
51
+ }, 8, ["parent-element", "horizontal-align", "update-align", "max-height", "max-width", "emit-update", "style"])) : createCommentVNode("", true)
56
52
  ], 8, ["disabled"]))
57
53
  ], 64);
58
54
  };
@@ -2,8 +2,6 @@ import { DropdownProps } from '../Dropdown/types';
2
2
  export interface DropdownMenuProps extends Omit<DropdownProps, 'parentElement'> {
3
3
  isOpen: boolean;
4
4
  teleport?: boolean;
5
- noZIndex?: boolean;
6
- zIndex?: number;
7
5
  parentElement?: DropdownProps['parentElement'];
8
6
  }
9
7
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/DropdownMenu/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,aAAa,EAAE,eAAe,CAAC;IAC7E,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAA;CAC/C"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/DropdownMenu/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,aAAa,EAAE,eAAe,CAAC;IAC7E,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAA;CAC/C"}
@@ -19,6 +19,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
19
19
  hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
20
20
  hasValue: import('vue').Ref<boolean | null, boolean | null>;
21
21
  hasValueMap: import('vue').Ref<Record<string, boolean | null>, Record<string, boolean | null>>;
22
+ hasShown: import('vue').Ref<boolean, boolean>;
23
+ hasShownMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
22
24
  validate: import('vue').Ref<(silent?: boolean, path?: ValidatePath) => string | undefined, (silent?: boolean, path?: ValidatePath) => string | undefined>;
23
25
  validateMap: import('vue').Ref<Record<string, (silent?: boolean, path?: ValidatePath) => string | undefined>, Record<string, (silent?: boolean, path?: ValidatePath) => string | undefined>>;
24
26
  invalidate: import('vue').Ref<(messages: Record<string, string | string[] | undefined>) => void, (messages: Record<string, string | string[] | undefined>) => void>;
@@ -31,10 +33,12 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
31
33
  "update:is-valid": (value: boolean | undefined) => any;
32
34
  "update:has-changes": (value: boolean) => any;
33
35
  "update:has-value": (value: boolean | null) => any;
36
+ "update:has-shown": (value: boolean) => any;
34
37
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
35
38
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
36
39
  "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
37
40
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
41
+ "onUpdate:has-shown"?: ((value: boolean) => any) | undefined;
38
42
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
39
43
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
40
44
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"WForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/WForm.vue"],"names":[],"mappings":"AAKA;AAkKA,OAAO,EAAC,KAAK,YAAY,EAAiB,MAAM,gBAAgB,CAAA;AAGhE,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AA2JF,iBAAS,cAAc;WA6BT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;kFASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/WForm.vue"],"names":[],"mappings":"AAKA;AA8KA,OAAO,EAAC,KAAK,YAAY,EAAiB,MAAM,gBAAgB,CAAA;AAGhE,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AAyKF,iBAAS,cAAc;WA6BT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;kFASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, toRef, computed, provide, inject, watch, onBeforeUnmount, createBlock, openBlock, resolveDynamicComponent, withCtx, renderSlot } from 'vue';
2
2
  import _sfc_main$1 from '../EmptyComponent/WEmptyComponent.vue.js';
3
- import { wFormTitleUpdater, wFormUnlistener, wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormHasValueUpdater, wFormInitModelUpdater, wFormInvalidateUpdater, wFormValidateUpdater } from './models/injection.js';
3
+ import { wFormTitleUpdater, wFormUnlistener, wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormHasValueUpdater, wFormHasShownUpdater, wFormInitModelUpdater, wFormInvalidateUpdater, wFormValidateUpdater } from './models/injection.js';
4
4
  import { compileMessage } from './models/utils.js';
5
5
  import { useFormValueMap } from './use/useFormValueMap.js';
6
6
 
@@ -11,7 +11,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  title: {},
12
12
  noTag: { type: Boolean }
13
13
  },
14
- emits: ["update:is-valid", "update:has-changes", "update:has-value"],
14
+ emits: ["update:is-valid", "update:has-changes", "update:has-value", "update:has-shown"],
15
15
  setup(__props, { expose: __expose, emit: __emit }) {
16
16
  const props = __props;
17
17
  const emit = __emit;
@@ -40,6 +40,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
40
  return items.length !== 0 && items.every((value) => value);
41
41
  })
42
42
  );
43
+ const hasShownMap = useFormValueMap(
44
+ wFormHasShownUpdater,
45
+ name,
46
+ (map) => computed(() => Object.values(map.value).some((value) => value))
47
+ );
43
48
  const validateMap = useFormValueMap(
44
49
  wFormValidateUpdater,
45
50
  name,
@@ -81,6 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
81
86
  errorMessageMap.unlistener(key);
82
87
  hasChangesMap.unlistener(key);
83
88
  hasValueMap.unlistener(key);
89
+ hasShownMap.unlistener(key);
84
90
  validateMap.unlistener(key);
85
91
  invalidateMap.unlistener(key);
86
92
  initModelMap.unlistener(key);
@@ -90,6 +96,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
90
96
  watch(errorMessageMap.map, () => emit("update:is-valid", isValid.value));
91
97
  watch(hasChangesMap.value, (value) => emit("update:has-changes", value));
92
98
  watch(hasValueMap.value, (value) => emit("update:has-value", value));
99
+ watch(hasShownMap.value, (value) => emit("update:has-shown", value));
93
100
  onBeforeUnmount(() => {
94
101
  if (props.name) {
95
102
  unlistenerInjected?.(props.name);
@@ -102,6 +109,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
102
109
  hasChangesMap: hasChangesMap.map,
103
110
  hasValue: hasValueMap.value,
104
111
  hasValueMap: hasValueMap.map,
112
+ hasShown: hasShownMap.value,
113
+ hasShownMap: hasShownMap.map,
105
114
  validate: validateMap.value,
106
115
  validateMap: validateMap.map,
107
116
  invalidate: invalidateMap.value,
@@ -29,11 +29,13 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
29
29
  "update:is-valid": (value: boolean) => any;
30
30
  "update:has-changes": (value: boolean) => any;
31
31
  "update:has-value": (value: boolean | null) => any;
32
+ "update:has-shown": (value: boolean) => any;
32
33
  invalidate: (value: Record<string, string | string[] | undefined>) => any;
33
34
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
34
35
  "onUpdate:is-valid"?: ((value: boolean) => any) | undefined;
35
36
  "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
36
37
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
38
+ "onUpdate:has-shown"?: ((value: boolean) => any) | undefined;
37
39
  onInvalidate?: ((value: Record<string, string | string[] | undefined>) => any) | undefined;
38
40
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
39
41
  component: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"WFormValidator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/WFormValidator.vue"],"names":[],"mappings":"AAYA;AAsTA,OAAO,EAAC,KAAK,KAAK,EAAyF,MAAM,KAAK,CAAA;AAUtH,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,CAAA;IACpC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAiSF,iBAAS,cAAc;WAmDT,OAAO,IAA6B;;iBAxDvC,MAAM,KAAK,EAAE;;iBAAb,MAAM,KAAK,EAAE;;;;;;EA6DvB;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;wBA9FC,MAAM;qBA5EN,IAAI;;;;;;;;;;;;;OAoLxB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WFormValidator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/WFormValidator.vue"],"names":[],"mappings":"AAaA;AA2TA,OAAO,EAAC,KAAK,KAAK,EAAyF,MAAM,KAAK,CAAA;AAUtH,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,CAAA;IACpC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAuSF,iBAAS,cAAc;WAyDT,OAAO,IAA6B;;iBA9DvC,MAAM,KAAK,EAAE;;iBAAb,MAAM,KAAK,EAAE;;;;;;EAmEvB;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;wBAvGC,MAAM;qBA7EN,IAAI;;;;;;;;;;;;;;;OA8LxB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -3,7 +3,7 @@ import { useIsInsideTab } from '../Tabs/use/useIsInsideTab.js';
3
3
  import { useTabActiveListener } from '../Tabs/use/useTabActiveListener.js';
4
4
  import { debounce } from '../../utils/utils.js';
5
5
  import { validateRequired } from '../../utils/validate.js';
6
- import { wFormTitleUpdater, wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormHasValueUpdater, wFormValidateUpdater, wFormInvalidateUpdater, wFormInitModelUpdater, wFormUnlistener } from './models/injection.js';
6
+ import { wFormTitleUpdater, wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormHasValueUpdater, wFormHasShownUpdater, wFormValidateUpdater, wFormInvalidateUpdater, wFormInitModelUpdater, wFormUnlistener } from './models/injection.js';
7
7
  import { scrollToValidator } from './models/utils.js';
8
8
 
9
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -17,7 +17,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
17
  noChanges: { type: Boolean },
18
18
  hasValue: { type: Boolean }
19
19
  },
20
- emits: ["update:has-changes", "update:has-value", "update:is-valid", "invalidate"],
20
+ emits: ["update:has-changes", "update:has-value", "update:has-shown", "update:is-valid", "invalidate"],
21
21
  setup(__props, { expose: __expose, emit: __emit }) {
22
22
  const props = __props;
23
23
  const emit = __emit;
@@ -25,6 +25,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  const errorMessageUpdater = inject(wFormErrorMessageUpdater, void 0);
26
26
  const hasChangesUpdater = inject(wFormHasChangesUpdater, void 0);
27
27
  const hasValueUpdater = inject(wFormHasValueUpdater, void 0);
28
+ const hasShownUpdater = inject(wFormHasShownUpdater, void 0);
28
29
  const validateUpdater = inject(wFormValidateUpdater, void 0);
29
30
  const invalidateUpdater = inject(wFormInvalidateUpdater, void 0);
30
31
  const initModelUpdater = inject(wFormInitModelUpdater, void 0);
@@ -45,6 +46,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
45
46
  return void 0;
46
47
  });
47
48
  const initModelValue = ref();
49
+ const isErrorShown = ref(false);
48
50
  const required = computed(() => componentSlot.value?.props?.required !== void 0 ? componentSlot.value?.props?.required !== false : void 0);
49
51
  const mandatory = computed(() => componentSlot.value?.props?.mandatory !== void 0 ? componentSlot.value?.props?.mandatory !== false : void 0);
50
52
  const skeleton = computed(() => componentSlot.value?.props?.skeleton !== void 0 ? componentSlot.value?.props?.skeleton !== false : void 0);
@@ -64,7 +66,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
66
  }
65
67
  }
66
68
  });
67
- const hasBeenValidated = ref(false);
68
69
  const hasValueExact = computed(() => {
69
70
  if (props.hasValue) return true;
70
71
  if (!required.value && !mandatory.value) return null;
@@ -118,7 +119,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
118
119
  const validateOnUpdate = (value) => {
119
120
  const message = _validate(value);
120
121
  errorMessage.value = message;
121
- hasBeenValidated.value = true;
122
+ if (!message) isErrorShown.value = false;
122
123
  return message;
123
124
  };
124
125
  const _validateOnUpdate = (value) => {
@@ -138,9 +139,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
138
139
  const doValidate = (silent, path) => {
139
140
  if (props.name && path && !path[props.name]) return;
140
141
  const message = _validate(modelValue.value);
142
+ errorMessage.value = message;
141
143
  if (!silent) {
142
- errorMessage.value = message;
143
- hasBeenValidated.value = true;
144
+ isErrorShown.value = true;
144
145
  if (!isInsideTab) scrollTo();
145
146
  }
146
147
  return message;
@@ -153,41 +154,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
153
154
  else if (message instanceof Array) errorMessage.value = message.join(", ");
154
155
  };
155
156
  const initModel = () => {
157
+ isErrorShown.value = false;
156
158
  initModelValue.value = modelValue.value;
159
+ validateOnUpdate(modelValue.value);
157
160
  };
158
161
  const scrollTo = () => {
159
162
  if (!errorMessage.value) return;
160
- const element = componentRef.value.$el;
163
+ const element = componentRef.value?.$el;
161
164
  if (element instanceof HTMLDivElement) scrollToValidator(element);
162
165
  };
163
166
  const scrollToDebounced = debounce(scrollTo, 300);
164
167
  useTabActiveListener(scrollToDebounced);
165
168
  watch(errorMessage, (value) => {
166
169
  if (value === null) return;
167
- if (props.name) {
168
- errorMessageUpdater?.(props.name, value);
169
- }
170
+ if (props.name) errorMessageUpdater?.(props.name, value);
170
171
  emit("update:is-valid", !value);
171
172
  });
172
173
  watch(hasChanges, (value) => {
173
- if (props.name) {
174
- hasChangesUpdater?.(props.name, value);
175
- }
174
+ if (props.name) hasChangesUpdater?.(props.name, value);
176
175
  emit("update:has-changes", value);
177
176
  });
178
177
  watch(_hasValue, (value) => {
179
- if (props.name) {
180
- hasValueUpdater?.(props.name, value);
181
- }
178
+ if (props.name) hasValueUpdater?.(props.name, value);
182
179
  emit("update:has-value", value);
183
180
  }, { immediate: true });
181
+ watch(isErrorShown, (value) => {
182
+ if (props.name) hasShownUpdater?.(props.name, value);
183
+ emit("update:has-shown", value);
184
+ });
184
185
  watch(title, (value) => {
185
- if (props.name) {
186
- titleUpdater?.(props.name, value);
187
- }
186
+ if (props.name) titleUpdater?.(props.name, value);
188
187
  }, { immediate: true });
189
188
  watch(required, () => {
190
- if (hasBeenValidated.value) doValidate();
189
+ doValidate();
191
190
  });
192
191
  watch(skeleton, (value) => {
193
192
  if (!value) initModel();
@@ -201,12 +200,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
201
200
  }
202
201
  });
203
202
  onBeforeUnmount(() => {
204
- if (props.name) {
205
- unlistener?.(props.name);
206
- }
203
+ if (props.name) unlistener?.(props.name);
207
204
  });
208
205
  __expose({
209
206
  validateOnUpdate() {
207
+ isErrorShown.value = true;
210
208
  return validateOnUpdate(modelValue.value);
211
209
  },
212
210
  invalidate(message) {
@@ -217,12 +215,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
217
215
  return (_ctx, _cache) => {
218
216
  return openBlock(), createBlock(resolveDynamicComponent(componentSlot.value), {
219
217
  ref: "component",
220
- "error-message": errorMessage.value,
218
+ "error-message": isErrorShown.value ? errorMessage.value : void 0,
221
219
  "has-changes": _ctx.noChanges ? void 0 : hasChanges.value,
222
220
  "onUpdate:modelValue": _validateOnUpdate,
223
221
  onSelect: _validateOnSelect,
224
222
  onUnselect: _validateOnUnselect,
225
- onInitModel: initModel
223
+ onInitModel: initModel,
224
+ onBlur: _cache[0] || (_cache[0] = ($event) => isErrorShown.value = true)
226
225
  }, null, 40, ["error-message", "has-changes"]);
227
226
  };
228
227
  }
@@ -4,6 +4,7 @@ export declare const wFormTitleUpdater: InjectionKey<(key: string, value: string
4
4
  export declare const wFormErrorMessageUpdater: InjectionKey<(key: string, value: string | undefined) => void>;
5
5
  export declare const wFormHasChangesUpdater: InjectionKey<(key: string, value: boolean) => void>;
6
6
  export declare const wFormHasValueUpdater: InjectionKey<(key: string, value: boolean | null) => void>;
7
+ export declare const wFormHasShownUpdater: InjectionKey<(key: string, value: boolean) => void>;
7
8
  export declare const wFormValidateUpdater: InjectionKey<(key: string, value: (silent?: boolean, path?: ValidatePath) => string | undefined) => void>;
8
9
  export declare const wFormInvalidateUpdater: InjectionKey<(key: string, value: (messages: Record<string, string | string[] | undefined>) => void) => void>;
9
10
  export declare const wFormInitModelUpdater: InjectionKey<(key: string, value: () => void) => void>;