@web-utils/form-ui 1.0.0-beta94 → 1.0.0-beta96

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 (228) hide show
  1. package/address-input/index.d.ts +2 -2
  2. package/awesome-button/index.d.ts +6 -4
  3. package/capsule-tab/index.d.ts +2 -2
  4. package/card/index.d.ts +2 -2
  5. package/chunks/{n1KViU9y2.mjs → 7mLGHDva2.mjs} +12 -9
  6. package/chunks/{6dpdFLpv2.mjs → BJsEGC-v2.mjs} +35 -44
  7. package/chunks/{Cv1iIzzy2.mjs → BanS-yUY2.mjs} +1 -1
  8. package/chunks/{BZw-uhPj.mjs → C23Qaggp.mjs} +27 -26
  9. package/chunks/{JUkvPXqc.mjs → CZxWWk4N.mjs} +8 -8
  10. package/chunks/{BKdkhZkk2.mjs → D7kTwnJK2.mjs} +1 -1
  11. package/chunks/{C6l7TFPU.mjs → D8C17D2k.mjs} +7 -7
  12. package/chunks/{DRkvaPr32.mjs → DIQto0dy2.mjs} +11 -8
  13. package/chunks/{DngNYJVa2.mjs → DzfHfYvS2.mjs} +1 -1
  14. package/chunks/{5BOS55Lv2.mjs → NYkLWtyw2.mjs} +1 -1
  15. package/chunks/{BpZ0yk642.mjs → Y3LG5Oyd2.mjs} +23 -18
  16. package/chunks/{DFJMTSc7.mjs → bPnQPTY0.mjs} +1 -1
  17. package/chunks/{-d4DuTH12.mjs → dgRz6V6p2.mjs} +1 -1
  18. package/chunks/qIca9lDu2.mjs +108 -0
  19. package/chunks/{BTVXdtOG.mjs → sl7eKGeX.mjs} +121 -110
  20. package/chunks/{D6B1lNKn2.mjs → v2GLQDzI2.mjs} +18 -18
  21. package/code-mirror-editor/index.d.ts +2 -2
  22. package/confirm-button/index.d.ts +121 -1
  23. package/confirmable/index.d.ts +92 -1
  24. package/context-menu/index.d.ts +3 -3
  25. package/count-up/index.d.ts +3 -3
  26. package/custom-scrollbar/index.d.ts +2 -2
  27. package/data-box/index.d.ts +2 -2
  28. package/data-card/index.d.ts +2 -2
  29. package/data-card-text/index.d.ts +2 -2
  30. package/data-display/index.d.ts +2 -2
  31. package/data-icons/index.d.ts +2 -2
  32. package/data-imgtext/index.d.ts +2 -2
  33. package/data-operatext/index.d.ts +2 -2
  34. package/data-panel/index.d.ts +2 -2
  35. package/data-pay/index.d.ts +2 -2
  36. package/data-price/index.d.ts +2 -2
  37. package/data-progress/index.d.ts +2 -2
  38. package/data-rotate/index.d.ts +2 -2
  39. package/data-table-picker/index.d.ts +2 -2
  40. package/data-table-picker/index.mjs +1 -1
  41. package/data-tabs/index.d.ts +2 -2
  42. package/dialog-form/index.d.ts +1 -1
  43. package/dialog-form/index.mjs +1 -1
  44. package/dict-render/index.d.ts +2 -2
  45. package/e-charts/index.d.ts +2 -2
  46. package/easy-popup/index.d.ts +3 -3
  47. package/editable-progress/index.d.ts +2 -2
  48. package/editable-tree/index.d.ts +4 -4
  49. package/element-dialog/index.d.ts +294 -16
  50. package/flex-box/index.d.ts +2 -2
  51. package/flex-column/index.d.ts +2 -2
  52. package/flex-item/index.d.ts +2 -2
  53. package/flex-row/index.d.ts +2 -2
  54. package/flex-scroll-area/index.d.ts +1 -1
  55. package/flex-scroller/index.d.ts +2 -2
  56. package/flow-designer/index.d.ts +6 -6
  57. package/flow-viewer/index.d.ts +2 -2
  58. package/form-button/index.d.ts +92 -1
  59. package/form-cascader/index.d.ts +9 -7
  60. package/form-cascader/index.mjs +1 -1
  61. package/form-checkbox/index.d.ts +8 -6
  62. package/form-checkbox-group/index.d.ts +372 -1
  63. package/form-checkbox-group/index.mjs +1 -1
  64. package/form-date-picker/index.d.ts +10 -8
  65. package/form-holder/index.d.ts +2 -2
  66. package/form-image/index.d.ts +7 -5
  67. package/form-input/index.d.ts +11 -9
  68. package/form-input/index.mjs +1 -1
  69. package/form-input-cron-expression/index.d.ts +8 -6
  70. package/form-input-email/index.d.ts +8 -8
  71. package/form-input-email/index.mjs +1 -1
  72. package/form-input-id-card/index.d.ts +8 -8
  73. package/form-input-id-card/index.mjs +1 -1
  74. package/form-input-number/index.d.ts +11 -9
  75. package/form-input-number/index.mjs +1 -1
  76. package/form-input-phone-number/index.d.ts +8 -8
  77. package/form-input-phone-number/index.mjs +1 -1
  78. package/form-input-tag/index.d.ts +8 -6
  79. package/form-input-time/index.d.ts +10 -8
  80. package/form-item/index.d.ts +5 -5
  81. package/form-item-config-provider/index.d.ts +3 -3
  82. package/form-item-group/index.d.ts +6 -4
  83. package/form-radio-group/index.d.ts +15 -13
  84. package/form-radio-group/index.mjs +1 -1
  85. package/form-rate/index.d.ts +8 -6
  86. package/form-row/index.d.ts +2 -2
  87. package/form-select/index.d.ts +11 -9
  88. package/form-select/index.mjs +1 -1
  89. package/form-slider/index.d.ts +9 -7
  90. package/form-switch/index.d.ts +8 -6
  91. package/form-table/index.d.ts +10 -6
  92. package/form-table/index.mjs +1 -1
  93. package/form-table-plus/index.d.ts +10 -8
  94. package/form-table-plus/index.mjs +1 -1
  95. package/form-text/index.d.ts +7 -5
  96. package/form-textarea/index.d.ts +8 -8
  97. package/form-textarea/index.mjs +1 -1
  98. package/form-time-select/index.d.ts +8 -6
  99. package/form-tree-select/index.d.ts +10 -8
  100. package/form-tree-select-multiple/index.d.ts +10 -8
  101. package/form-view/index.d.ts +4 -4
  102. package/fy-array/index.d.ts +266 -3
  103. package/fy-cascader/index.d.ts +266 -3
  104. package/fy-checkbox/index.d.ts +266 -3
  105. package/fy-curd/index.d.ts +13 -10
  106. package/fy-curd/index.mjs +1 -1
  107. package/fy-date/index.d.ts +266 -3
  108. package/fy-dynamic/index.d.ts +266 -3
  109. package/fy-dynamic/index.mjs +1 -1
  110. package/fy-empty/index.d.ts +2 -2
  111. package/fy-form/index.d.ts +9 -9
  112. package/fy-form/index.mjs +1 -1
  113. package/fy-input/index.d.ts +266 -3
  114. package/fy-input-color/index.d.ts +266 -3
  115. package/fy-input-icon/index.d.ts +266 -3
  116. package/fy-input-map/index.d.ts +266 -3
  117. package/fy-input-number/index.d.ts +266 -3
  118. package/fy-input-table/index.d.ts +266 -3
  119. package/fy-input-table/index.mjs +1 -1
  120. package/fy-input-tree/index.d.ts +267 -4
  121. package/fy-radio/index.d.ts +266 -3
  122. package/fy-rate/index.d.ts +266 -3
  123. package/fy-select/index.d.ts +267 -4
  124. package/fy-slider/index.d.ts +266 -3
  125. package/fy-switch/index.d.ts +266 -3
  126. package/fy-tabs/index.d.ts +2 -2
  127. package/fy-time/index.d.ts +731 -4
  128. package/fy-title/index.d.ts +266 -3
  129. package/fy-tree/index.d.ts +2 -2
  130. package/fy-tree/index.mjs +1 -1
  131. package/fy-u-editor/index.d.ts +3 -3
  132. package/fy-upload/index.d.ts +267 -4
  133. package/guide-steps/index.d.ts +2 -2
  134. package/helper/form-item.d.ts +1 -1
  135. package/helper/input.d.ts +18 -12
  136. package/highlight-j-s/index.d.ts +2 -2
  137. package/icon-temp/index.d.ts +2 -2
  138. package/image-cropper/index.d.ts +354 -1
  139. package/image-preview/index.d.ts +2 -2
  140. package/image-viewer/index.d.ts +2 -2
  141. package/index.mjs +16 -16
  142. package/input-number-range/index.d.ts +2 -2
  143. package/json-editor/index.d.ts +2 -2
  144. package/keyboard/index.d.ts +2 -2
  145. package/loading-view/index.d.ts +2 -2
  146. package/monaco-editor/index.d.ts +2 -2
  147. package/name-avatar/index.d.ts +2 -2
  148. package/package.json +3 -4
  149. package/page-index/index.d.ts +2 -2
  150. package/page-index-top/index.d.ts +2 -2
  151. package/page-skeleton/index.d.ts +2 -2
  152. package/page-skeleton-new/index.d.ts +2 -2
  153. package/pageable-table/index.d.ts +4 -4
  154. package/pageable-table/index.mjs +1 -1
  155. package/photo-swipe/index.d.ts +2 -2
  156. package/props/col.d.ts +1 -1
  157. package/props/form-item.d.ts +1 -1
  158. package/props/input-number.d.ts +1 -1
  159. package/props/input-number.mjs +5 -1
  160. package/props/input.d.ts +1 -1
  161. package/props/input.mjs +3 -2
  162. package/props/textarea.d.ts +1 -1
  163. package/props/textarea.mjs +1 -1
  164. package/sign-panel/index.d.ts +2 -2
  165. package/split-pane/index.d.ts +4 -4
  166. package/stateful/index.d.ts +5 -3
  167. package/sub-table/index.d.ts +4 -2
  168. package/sub-table/index.mjs +1 -1
  169. package/sub-table-plus/index.d.ts +4 -2
  170. package/sub-table-plus/index.mjs +1 -1
  171. package/table-column/index.d.ts +3 -3
  172. package/table-column-def/index.d.ts +4 -4
  173. package/table-view/index.d.ts +7 -4
  174. package/table-view/index.mjs +13 -18
  175. package/tag-render/index.d.ts +2 -2
  176. package/text-ellipsis/index.d.ts +3 -3
  177. package/toolbar/index.d.ts +4 -4
  178. package/toolbar-button/index.d.ts +5 -5
  179. package/vue/directives/chat-drag.d.ts +2 -0
  180. package/vue/directives/chat-drag.mjs +12 -0
  181. package/vue/directives/click-outside.d.ts +10 -0
  182. package/vue/directives/click-outside.mjs +36 -0
  183. package/vue/directives/dialog-drag.d.ts +2 -0
  184. package/vue/directives/dialog-drag.mjs +15 -0
  185. package/vue/directives/drag-move.d.ts +10 -0
  186. package/vue/directives/drag-move.mjs +27 -0
  187. package/vue/directives/fix-fixed-column-height.d.ts +7 -0
  188. package/vue/directives/fix-fixed-column-height.mjs +20 -0
  189. package/vue/directives/index.d.ts +7 -0
  190. package/vue/directives/index.mjs +8 -0
  191. package/vue/directives/resize.d.ts +2 -0
  192. package/vue/directives/resize.mjs +12 -0
  193. package/vue/directives/scroll-bottom.d.ts +5 -0
  194. package/vue/directives/scroll-bottom.mjs +6 -0
  195. package/vue/hooks/index.d.ts +3 -0
  196. package/vue/hooks/index.mjs +4 -0
  197. package/vue/hooks/useDictionary.d.ts +60 -0
  198. package/{hook → vue/hooks}/useDictionary.mjs +2 -2
  199. package/vue/hooks/useEventBus.d.ts +1 -0
  200. package/vue/hooks/useEventBus.mjs +20 -0
  201. package/{hook → vue/hooks}/useVisibilityChange.mjs +1 -1
  202. package/vue/index.d.ts +3 -0
  203. package/vue/index.mjs +83 -0
  204. package/vue/mixin/bus.d.ts +5 -0
  205. package/vue/mixin/bus.mjs +33 -0
  206. package/vue/mixin/dialog.d.ts +38 -0
  207. package/vue/mixin/dialog.mjs +2 -0
  208. package/vue/mixin/index.d.ts +6 -0
  209. package/vue/mixin/index.mjs +7 -0
  210. package/vue/mixin/message.d.ts +2 -0
  211. package/vue/mixin/message.mjs +27 -0
  212. package/vue/mixin/multi-items.d.ts +43 -0
  213. package/vue/mixin/multi-items.mjs +70 -0
  214. package/vue/mixin/page.d.ts +28 -0
  215. package/vue/mixin/page.mjs +38 -0
  216. package/vue/mixin/resize-mixin.d.ts +15 -0
  217. package/vue/mixin/resize-mixin.mjs +24 -0
  218. package/vue-cron/index.d.ts +3 -3
  219. package/vue-qr-code/index.d.ts +2 -2
  220. package/vue-tags-input/index.d.ts +3 -3
  221. package/vue-tree-select/index.d.ts +13 -13
  222. package/vue-video-player/index.d.ts +2 -2
  223. package/watermark/index.d.ts +3 -3
  224. package/web-types.json +1 -1
  225. package/year-calendar/index.d.ts +2 -2
  226. package/chunks/DML17Idh2.mjs +0 -108
  227. package/hook/useDictionary.d.ts +0 -3
  228. /package/{hook → vue/hooks}/useVisibilityChange.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  import { toolbarContextKey } from '../../constants';
2
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
3
3
  searchable: BooleanConstructor;
4
4
  refreshable: BooleanConstructor;
5
5
  buttons: {
@@ -31,7 +31,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
31
31
  getSearchButton(): any;
32
32
  getRefreshButton(): any;
33
33
  getSettingsButton(): any;
34
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
34
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
35
35
  searchable: BooleanConstructor;
36
36
  refreshable: BooleanConstructor;
37
37
  buttons: {
@@ -53,7 +53,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
53
53
  buttons: unknown[];
54
54
  emitter: string;
55
55
  }, {}, {}, {}, string, () => {
56
- [toolbarContextKey]: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
56
+ [toolbarContextKey]: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
57
57
  searchable: BooleanConstructor;
58
58
  refreshable: BooleanConstructor;
59
59
  buttons: {
@@ -97,7 +97,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
97
97
  C: {};
98
98
  M: {};
99
99
  Defaults: {};
100
- }, Readonly<import('vue').ExtractPropTypes<{
100
+ }, Readonly<globalThis.ExtractPropTypes<{
101
101
  searchable: BooleanConstructor;
102
102
  refreshable: BooleanConstructor;
103
103
  buttons: {
@@ -1,4 +1,4 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
1
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
2
  size: {
3
3
  type: StringConstructor;
4
4
  default: string;
@@ -81,7 +81,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
81
81
  title: StringConstructor;
82
82
  cancelButtonText: StringConstructor;
83
83
  confirmButtonText: StringConstructor;
84
- }>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
84
+ }>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
85
85
  size: {
86
86
  type: StringConstructor;
87
87
  default: string;
@@ -167,10 +167,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
167
167
  }>> & Readonly<{}>, {
168
168
  disabled: boolean;
169
169
  type: string;
170
- primary: boolean;
170
+ plain: boolean;
171
171
  size: string;
172
+ primary: boolean;
172
173
  loading: boolean;
173
- plain: boolean;
174
174
  autofocus: boolean;
175
175
  round: boolean;
176
176
  nativeType: string;
@@ -181,9 +181,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
181
181
  loadable: boolean;
182
182
  warning: boolean;
183
183
  confirm: boolean;
184
- dark: boolean;
185
184
  bg: boolean;
186
185
  dashed: boolean;
186
+ dark: boolean;
187
187
  autoInsertSpace: boolean;
188
188
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
189
189
  export default _default;
@@ -0,0 +1,2 @@
1
+ import { ObjectDirective } from 'vue';
2
+ export declare const chatDrag: ObjectDirective;
@@ -0,0 +1,12 @@
1
+ import { drag as e } from "@web-utils/core";
2
+ //#region src/vue/directives/chat-drag.ts
3
+ function t(t) {
4
+ let n = t.querySelector(".chat-toolbar");
5
+ n && e(t, n);
6
+ }
7
+ var n = {
8
+ mounted: (e) => t(e),
9
+ updated: (e) => t(e)
10
+ };
11
+ //#endregion
12
+ export { n as chatDrag };
@@ -0,0 +1,10 @@
1
+ import { ObjectDirective } from 'vue';
2
+ /**
3
+ * v-clickoutside
4
+ * @desc 点击元素外面才会触发的事件
5
+ * @example
6
+ * ```vue
7
+ * <div v-element-clickoutside="handleClose">
8
+ * ```
9
+ */
10
+ export declare const clickOutside: ObjectDirective<Node, () => void>;
@@ -0,0 +1,36 @@
1
+ //#region src/vue/directives/click-outside.ts
2
+ var e = /* @__PURE__ */ new Map();
3
+ function t(e, t) {
4
+ let n = [];
5
+ return Array.isArray(t.arg) ? n = t.arg : n.push(t.arg), function(r, i) {
6
+ var a;
7
+ let o = (a = t.instance) == null ? void 0 : a.popperRef, s = r.target, c = i == null ? void 0 : i.target, l = !t || !t.instance, u = !s || !c, d = e.contains(s) || e.contains(c), f = e === s, p = n.length && n.some((e) => e == null ? void 0 : e.contains(s)) || n.length && n.includes(c), m = o && (o.contains(s) || o.contains(c));
8
+ l || u || d || f || p || m || t.value(r, i);
9
+ };
10
+ }
11
+ var n = {
12
+ mounted(n, r) {
13
+ let i = (t) => {
14
+ e.get(n).mousedownEvent = t;
15
+ }, a = (t) => {
16
+ let { documentHandler: r, mousedownEvent: i } = e.get(n);
17
+ r(t, i);
18
+ };
19
+ e.set(n, {
20
+ mouseDownHandler: i,
21
+ mouseUpHandler: a,
22
+ documentHandler: t(n, r),
23
+ bindingFn: r.value
24
+ }), document.addEventListener("mousedown", i), document.addEventListener("mouseup", a);
25
+ },
26
+ updated(n, r) {
27
+ let i = e.get(n);
28
+ i.documentHandler = t(n, r), i.bindingFn = r.value;
29
+ },
30
+ unmounted(t) {
31
+ let { mouseDownHandler: n, mouseUpHandler: r } = e.get(t);
32
+ document.removeEventListener("mousedown", n), document.removeEventListener("mouseup", r), e.delete(t);
33
+ }
34
+ };
35
+ //#endregion
36
+ export { n as clickOutside };
@@ -0,0 +1,2 @@
1
+ import { ObjectDirective } from 'vue';
2
+ export declare const dialogDrag: ObjectDirective;
@@ -0,0 +1,15 @@
1
+ import { drag as e, hasOwn as t } from "@web-utils/core";
2
+ //#region src/vue/directives/dialog-drag.ts
3
+ function n(n, r) {
4
+ let i = n.querySelector(".el-dialog__header"), a = n.querySelector(".el-dialog");
5
+ if (i) {
6
+ var o, s;
7
+ r.arg ? i.style.cssText += ";cursor:default;" : i.style.cssText += ";cursor:move;", e(a, i, t(r.value, "limit") ? (o = r.value) == null ? void 0 : o.limit : !0, { onMove: (s = r.value) == null ? void 0 : s.onMove });
8
+ }
9
+ }
10
+ var r = {
11
+ mounted: (e, t) => n(e, t),
12
+ updated: (e, t) => n(e, t)
13
+ };
14
+ //#endregion
15
+ export { r as dialogDrag };
@@ -0,0 +1,10 @@
1
+ import { ObjectDirective } from 'vue';
2
+ declare global {
3
+ interface HTMLElement {
4
+ dragMoveId?: any;
5
+ }
6
+ }
7
+ export type DragMoveHTMLElement = HTMLElement & {
8
+ drag_move_id?: number;
9
+ };
10
+ export declare const dragMove: ObjectDirective;
@@ -0,0 +1,27 @@
1
+ import { dragMove as e, off as t, on as n } from "@web-utils/core";
2
+ //#region src/vue/directives/drag-move.ts
3
+ var r = 1, i = "drag_move_id", a = {}, o = (e) => {
4
+ let n = e[i], r = a[n];
5
+ r && (delete a[n], delete e[i], t(e, "mousedown", r));
6
+ }, s = (t, o) => {
7
+ if (!t) return;
8
+ let s = r++;
9
+ t[i] = s;
10
+ let c = (t) => e(t, {
11
+ ...o.value,
12
+ fullScreen: o.arg
13
+ });
14
+ a[s] = c, n(t, "mousedown", c);
15
+ }, c = {
16
+ mounted: (e, t) => {
17
+ s(e, t);
18
+ },
19
+ updated: (e, t) => {
20
+ e && (o(e), s(e, t));
21
+ },
22
+ unmounted: (e) => {
23
+ o(e);
24
+ }
25
+ };
26
+ //#endregion
27
+ export { c as dragMove };
@@ -0,0 +1,7 @@
1
+ import { ObjectDirective } from 'vue';
2
+ declare global {
3
+ interface HTMLElement {
4
+ calculated?: any;
5
+ }
6
+ }
7
+ export declare const fixFixedColumnHeight: ObjectDirective;
@@ -0,0 +1,20 @@
1
+ import { getComputedHeight as e } from "@web-utils/core";
2
+ //#region src/vue/directives/fix-fixed-column-height.ts
3
+ var t = { updated(t, n, r) {
4
+ let { layout: i } = r.component;
5
+ if (i.scrollX && !t.calculated) {
6
+ let n = t.querySelector(".el-table__fixed");
7
+ if (n) {
8
+ let t = e(n);
9
+ n.style.height = `${t - i.gutterWidth}px`;
10
+ }
11
+ let r = t.querySelector(".el-table__fixed-right");
12
+ if (r) {
13
+ let t = e(r);
14
+ r.style.height = `${t - i.gutterWidth}px`;
15
+ }
16
+ t.calculated = !0;
17
+ }
18
+ } };
19
+ //#endregion
20
+ export { t as fixFixedColumnHeight };
@@ -0,0 +1,7 @@
1
+ export * from './chat-drag';
2
+ export * from './click-outside';
3
+ export * from './dialog-drag';
4
+ export * from './drag-move';
5
+ export * from './fix-fixed-column-height';
6
+ export * from './resize';
7
+ export * from './scroll-bottom';
@@ -0,0 +1,8 @@
1
+ import { chatDrag as e } from "./chat-drag.mjs";
2
+ import { clickOutside as t } from "./click-outside.mjs";
3
+ import { dialogDrag as n } from "./dialog-drag.mjs";
4
+ import { dragMove as r } from "./drag-move.mjs";
5
+ import { fixFixedColumnHeight as i } from "./fix-fixed-column-height.mjs";
6
+ import { resize as a } from "./resize.mjs";
7
+ import { scrollBottom as o } from "./scroll-bottom.mjs";
8
+ export { e as chatDrag, t as clickOutside, n as dialogDrag, r as dragMove, i as fixFixedColumnHeight, a as resize, o as scrollBottom };
@@ -0,0 +1,2 @@
1
+ import { ObjectDirective } from 'vue';
2
+ export declare const resize: ObjectDirective;
@@ -0,0 +1,12 @@
1
+ import { elementResizeDetectorMaker as e } from "@web-utils/integrations/element-resize-detector";
2
+ //#region src/vue/directives/resize.ts
3
+ var t = e(), n = {
4
+ mounted(e, n) {
5
+ n.value && t.listenTo(e, n.value);
6
+ },
7
+ unmounted(e, n) {
8
+ t.uninstall(e);
9
+ }
10
+ };
11
+ //#endregion
12
+ export { n as resize };
@@ -0,0 +1,5 @@
1
+ import { ObjectDirective } from 'vue';
2
+ /**
3
+ * 发送消息后滚动到底部
4
+ */
5
+ export declare const scrollBottom: ObjectDirective;
@@ -0,0 +1,6 @@
1
+ //#region src/vue/directives/scroll-bottom.ts
2
+ var e = { mounted(e) {
3
+ e.scrollTop = e.scrollHeight - e.clientHeight;
4
+ } };
5
+ //#endregion
6
+ export { e as scrollBottom };
@@ -0,0 +1,3 @@
1
+ export * from './use-dictionary';
2
+ export * from './use-event-bus';
3
+ export * from './use-visibility-change';
@@ -0,0 +1,4 @@
1
+ import { useVisibilityChange as e } from "./useVisibilityChange.mjs";
2
+ import { useDictionary as t } from "./useDictionary.mjs";
3
+ import { useEventBus as n } from "./useEventBus.mjs";
4
+ export { t as useDictionary, n as useEventBus, e as useVisibilityChange };
@@ -0,0 +1,60 @@
1
+ import { DictItem } from '../../api';
2
+ export declare const useDictionary: (props: Record<string, any>) => {
3
+ dictItems: globalThis.Ref<{
4
+ id: string;
5
+ dictId: string;
6
+ label: string;
7
+ dictType: string;
8
+ description: string;
9
+ sortOrder: number;
10
+ createBy: string;
11
+ updateBy: string;
12
+ createTime: string;
13
+ updateTime: string;
14
+ remarks: null;
15
+ delFlag: string;
16
+ value: string;
17
+ }[] | readonly {
18
+ id: string;
19
+ dictId: string;
20
+ label: string;
21
+ dictType: string;
22
+ description: string;
23
+ sortOrder: number;
24
+ createBy: string;
25
+ updateBy: string;
26
+ createTime: string;
27
+ updateTime: string;
28
+ remarks: null;
29
+ delFlag: string;
30
+ value: string;
31
+ }[] | null, DictItem[] | readonly DictItem[] | {
32
+ id: string;
33
+ dictId: string;
34
+ label: string;
35
+ dictType: string;
36
+ description: string;
37
+ sortOrder: number;
38
+ createBy: string;
39
+ updateBy: string;
40
+ createTime: string;
41
+ updateTime: string;
42
+ remarks: null;
43
+ delFlag: string;
44
+ value: string;
45
+ }[] | readonly {
46
+ id: string;
47
+ dictId: string;
48
+ label: string;
49
+ dictType: string;
50
+ description: string;
51
+ sortOrder: number;
52
+ createBy: string;
53
+ updateBy: string;
54
+ createTime: string;
55
+ updateTime: string;
56
+ remarks: null;
57
+ delFlag: string;
58
+ value: string;
59
+ }[] | null>;
60
+ };
@@ -1,6 +1,6 @@
1
- import { getDictData as e } from "../helper/dictionary.mjs";
1
+ import { getDictData as e } from "../../helper/dictionary.mjs";
2
2
  import { ref as t, watchEffect as n } from "vue";
3
- //#region src/hook/useDictionary.ts
3
+ //#region src/vue/hooks/useDictionary.ts
4
4
  var r = (r) => {
5
5
  let i = t([]);
6
6
  return n(async () => {
@@ -0,0 +1 @@
1
+ export declare const useEventBus: (event: string | Record<string, () => void>, cb: (...args: any[]) => void) => void;
@@ -0,0 +1,20 @@
1
+ import { onBeforeMount as e, onBeforeUnmount as t } from "vue";
2
+ import { emitter as n, isObject as r } from "@web-utils/core";
3
+ //#region src/vue/hooks/useEventBus.ts
4
+ var i = (i, a) => {
5
+ e(() => {
6
+ if (a) n.on(i, a);
7
+ else if (r(i)) {
8
+ let e = i;
9
+ for (let t in e) n.on(t, e[t]);
10
+ }
11
+ }), t(() => {
12
+ if (a) n.off(i, a);
13
+ else if (r(i)) {
14
+ let e = i;
15
+ for (let t in e) n.off(t, e[t]);
16
+ }
17
+ });
18
+ };
19
+ //#endregion
20
+ export { i as useEventBus };
@@ -1,5 +1,5 @@
1
1
  import { onBeforeMount as e, onBeforeUnmount as t } from "vue";
2
- //#region src/hook/useVisibilityChange.ts
2
+ //#region src/vue/hooks/useVisibilityChange.ts
3
3
  var n = ({ onPageHidden: n, onPageVisible: r } = {}) => {
4
4
  let i = () => {
5
5
  document.hidden ? n == null || n() : r == null || r();
package/vue/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './directives';
2
+ export * from './hooks';
3
+ export * from './mixin';
package/vue/index.mjs ADDED
@@ -0,0 +1,83 @@
1
+ import { bus as e, eventBusPlugin as t } from "./mixin/bus.mjs";
2
+ import { chatDrag as n } from "./directives/chat-drag.mjs";
3
+ import { clickOutside as r } from "./directives/click-outside.mjs";
4
+ import { useVisibilityChange as i } from "./hooks/useVisibilityChange.mjs";
5
+ import { dialogDrag as a } from "./directives/dialog-drag.mjs";
6
+ import { dragMove as o } from "./directives/drag-move.mjs";
7
+ import { fixFixedColumnHeight as s } from "./directives/fix-fixed-column-height.mjs";
8
+ import { resize as c } from "./directives/resize.mjs";
9
+ import { scrollBottom as l } from "./directives/scroll-bottom.mjs";
10
+ import "./directives/index.mjs";
11
+ import { useDictionary as u } from "./hooks/useDictionary.mjs";
12
+ import { useEventBus as d } from "./hooks/useEventBus.mjs";
13
+ import "./hooks/index.mjs";
14
+ import { ServerMessageManager as f, messageMixin as p } from "./mixin/message.mjs";
15
+ import { childMixin as m, parentMixin as h } from "./mixin/multi-items.mjs";
16
+ import { page as g } from "./mixin/page.mjs";
17
+ import { resizeMixin as _ } from "./mixin/resize-mixin.mjs";
18
+ import { getComputedHeight as v } from "@web-utils/core";
19
+ //#region src/vue/mixin/dialog.ts
20
+ var y = {
21
+ directives: {
22
+ dialogDrag: a,
23
+ alignCenter: { async inserted(e, t, n) {
24
+ await n.componentInstance.$nextTick();
25
+ let r = v(n.componentInstance.$refs.dialog), i = window.document.body.offsetHeight - r;
26
+ n.componentInstance.$refs.dialog.style.marginTop = `${i / 2}px`;
27
+ } }
28
+ },
29
+ props: {
30
+ visible: {
31
+ type: Boolean,
32
+ default: !1
33
+ },
34
+ closeOnClickModal: Boolean,
35
+ reservePositionOnClose: {
36
+ type: Boolean,
37
+ default: !0
38
+ }
39
+ },
40
+ data() {
41
+ return {
42
+ show: !1,
43
+ fullScreen: !1
44
+ };
45
+ },
46
+ methods: {
47
+ closed() {
48
+ if (!this.reservePositionOnClose && this.$refs.dialog) {
49
+ let { dialog: e } = this.$refs.dialog.$refs;
50
+ e.style.top = "unset", e.style.left = "unset";
51
+ }
52
+ this.exitFullScreen(), this.$emit("closed");
53
+ },
54
+ close() {
55
+ this.show = !1;
56
+ },
57
+ toggleFullScreen() {
58
+ this.fullScreen = !this.fullScreen;
59
+ },
60
+ enterFullScreen() {
61
+ this.fullScreen = !0;
62
+ },
63
+ exitFullScreen() {
64
+ this.fullScreen = !1;
65
+ }
66
+ },
67
+ watch: {
68
+ visible: {
69
+ immediate: !0,
70
+ handler(e) {
71
+ this.show = e;
72
+ }
73
+ },
74
+ show(e) {
75
+ e !== this.visible && this.$emit("update:visible", e), e || this.$emit("close");
76
+ }
77
+ },
78
+ beforeDestroy() {
79
+ this.show && this.close();
80
+ }
81
+ };
82
+ //#endregion
83
+ export { f as ServerMessageManager, e as bus, n as chatDrag, m as childMixin, r as clickOutside, y as dialog, a as dialogDrag, o as dragMove, t as eventBusPlugin, s as fixFixedColumnHeight, p as messageMixin, g as page, h as parentMixin, c as resize, _ as resizeMixin, l as scrollBottom, u as useDictionary, d as useEventBus, i as useVisibilityChange };
@@ -0,0 +1,5 @@
1
+ import { emitter as bus } from '@web-utils/core';
2
+ export { bus };
3
+ export declare const eventBusPlugin: {
4
+ install(app: any, globalHooks: Record<string, any>): void;
5
+ };
@@ -0,0 +1,33 @@
1
+ import { emitter as e, isArray as t, isObject as n, isString as r, isUndefined as i } from "@web-utils/core";
2
+ //#region src/vue/mixin/bus.ts
3
+ function a(i) {
4
+ if (n(i)) for (let t in i) {
5
+ let o;
6
+ r(i[t]) ? o = this[i[t]] : n(i[t]) ? a.call(this, i[t]) : o = i[t].bind(this), o && (e.on(t, o), this.$Bus.push({
7
+ event: t,
8
+ handler: o
9
+ }));
10
+ }
11
+ t(i) && i.forEach((t) => {
12
+ let i = this[t];
13
+ r(t) && i && (e.on(t, i), this.$Bus.push({
14
+ event: t,
15
+ handler: i
16
+ })), n(t) && a.call(this, t);
17
+ });
18
+ }
19
+ var o = { install(n, r) {
20
+ n.config.globalProperties.$bus = (t, ...n) => {
21
+ e.emit(t, ...n);
22
+ }, n.mixin({
23
+ beforeCreate() {
24
+ let e = this.$options.bus;
25
+ this.$Bus = [], e && a.call(this, e), a.call(this, r);
26
+ },
27
+ beforeUnmount() {
28
+ if (this.$Bus) for (let t of this.$Bus) e.off(t.event, t.handler);
29
+ }
30
+ }), n.config.optionMergeStrategies.bus = (e, n) => t(e) ? t(n) ? e.concat(n) : (i(n) || e.push(n), e) : t(n) ? (i(e) || n.push(e), n) : e && n ? [e, n] : e || n;
31
+ } };
32
+ //#endregion
33
+ export { e as bus, o as eventBusPlugin };
@@ -0,0 +1,38 @@
1
+ export declare const dialog: {
2
+ directives: {
3
+ dialogDrag: import('vue').ObjectDirective<any, any, string, any>;
4
+ alignCenter: {
5
+ inserted(el: any, binding: any, vNode: any): Promise<void>;
6
+ };
7
+ };
8
+ props: {
9
+ visible: {
10
+ type: BooleanConstructor;
11
+ default: boolean;
12
+ };
13
+ closeOnClickModal: BooleanConstructor;
14
+ reservePositionOnClose: {
15
+ type: BooleanConstructor;
16
+ default: boolean;
17
+ };
18
+ };
19
+ data(): {
20
+ show: boolean;
21
+ fullScreen: boolean;
22
+ };
23
+ methods: {
24
+ closed(this: any): void;
25
+ close(this: any): void;
26
+ toggleFullScreen(this: any): void;
27
+ enterFullScreen(this: any): void;
28
+ exitFullScreen(this: any): void;
29
+ };
30
+ watch: {
31
+ visible: {
32
+ immediate: boolean;
33
+ handler(this: any, newVal: boolean): void;
34
+ };
35
+ show(this: any, newVal: boolean): void;
36
+ };
37
+ beforeDestroy(this: any): void;
38
+ };
@@ -0,0 +1,2 @@
1
+ import { dialog as e } from "../index.mjs";
2
+ export { e as dialog };
@@ -0,0 +1,6 @@
1
+ export * from './bus';
2
+ export * from './dialog';
3
+ export * from './message';
4
+ export * from './multi-items';
5
+ export * from './page';
6
+ export * from './resize-mixin';
@@ -0,0 +1,7 @@
1
+ import { bus as e, eventBusPlugin as t } from "./bus.mjs";
2
+ import { ServerMessageManager as n, messageMixin as r } from "./message.mjs";
3
+ import { childMixin as i, parentMixin as a } from "./multi-items.mjs";
4
+ import { page as o } from "./page.mjs";
5
+ import { resizeMixin as s } from "./resize-mixin.mjs";
6
+ import { dialog as c } from "../index.mjs";
7
+ export { n as ServerMessageManager, e as bus, i as childMixin, c as dialog, t as eventBusPlugin, r as messageMixin, o as page, a as parentMixin, s as resizeMixin };
@@ -0,0 +1,2 @@
1
+ export declare const ServerMessageManager: import('@web-utils/core').MessageManager;
2
+ export declare const messageMixin: any;
@@ -0,0 +1,27 @@
1
+ import { capitalize as e, createMessageManager as t, isObject as n, isString as r } from "@web-utils/core";
2
+ //#region src/vue/mixin/message.ts
3
+ var i = t({ loggerTag: "ServerMessageManager" }), a = {
4
+ beforeCreate() {
5
+ let t = this.$options.message;
6
+ if (t) {
7
+ this.$MessageEvents = [];
8
+ for (let n in t) {
9
+ let r = (e) => {
10
+ t[n].call(this, e);
11
+ }, a = e(n);
12
+ i.addMessageListener(a, r), this.$MessageEvents.push({
13
+ model: a,
14
+ handler: r
15
+ });
16
+ }
17
+ }
18
+ },
19
+ beforeDestroy() {
20
+ if (this.$MessageEvents) for (let e of this.$MessageEvents) i.removeMessageListener(e.model, e.handler);
21
+ },
22
+ methods: { sendMessageToServer(e) {
23
+ (r(e) || n(e)) && i.sendMessage(r(e) ? e : JSON.stringify(e));
24
+ } }
25
+ };
26
+ //#endregion
27
+ export { i as ServerMessageManager, a as messageMixin };
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Tab组件用到
3
+ */
4
+ export declare const parentMixin: {
5
+ mounted(this: any): void;
6
+ methods: {
7
+ updateIndex(this: any): void;
8
+ };
9
+ props: {
10
+ value: NumberConstructor;
11
+ };
12
+ watch: {
13
+ currentIndex(this: any, val: number, oldVal: number): void;
14
+ index(this: any, val: number): void;
15
+ value(this: any, val: number): void;
16
+ };
17
+ data(this: any): {
18
+ index: number;
19
+ currentIndex: any;
20
+ number: any;
21
+ };
22
+ };
23
+ export declare const childMixin: {
24
+ props: {
25
+ selected: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ };
30
+ mounted(this: any): void;
31
+ beforeDestroy(this: any): void;
32
+ methods: {
33
+ onItemClick(this: any, hasLink: string | boolean): void;
34
+ };
35
+ watch: {
36
+ currentSelected(this: any, val: boolean): void;
37
+ selected(this: any, val: boolean): void;
38
+ };
39
+ data(this: any): {
40
+ currentIndex: number;
41
+ currentSelected: any;
42
+ };
43
+ };