@dazhicheng/ui 1.5.202 → 1.5.204

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 (149) hide show
  1. package/dist/_virtual/___vite-browser-external.js +6 -0
  2. package/dist/_virtual/__vite-browser-external.js +4 -0
  3. package/dist/_virtual/_commonjs-dynamic-modules.js +6 -0
  4. package/dist/_virtual/_commonjsHelpers.js +24 -0
  5. package/dist/_virtual/aes.js +4 -0
  6. package/dist/_virtual/cipher-core.js +4 -0
  7. package/dist/_virtual/core.js +4 -0
  8. package/dist/_virtual/enc-base64.js +4 -0
  9. package/dist/_virtual/enc-utf8.js +4 -0
  10. package/dist/_virtual/evpkdf.js +4 -0
  11. package/dist/_virtual/hmac.js +4 -0
  12. package/dist/_virtual/md5.js +4 -0
  13. package/dist/_virtual/mode-ecb.js +4 -0
  14. package/dist/_virtual/pad-pkcs7.js +4 -0
  15. package/dist/_virtual/sha1.js +4 -0
  16. package/dist/components/tt-api-component/index.js +17 -4
  17. package/dist/components/tt-api-component/index.vue2.js +24 -13
  18. package/dist/components/tt-area/TtArea.vue3.js +24 -13
  19. package/dist/components/tt-button/index.js +18 -5
  20. package/dist/components/tt-button/index.vue2.js +27 -16
  21. package/dist/components/tt-checkbox/index.js +17 -4
  22. package/dist/components/tt-checkbox/index.vue.js +38 -28
  23. package/dist/components/tt-drawer/index.js +17 -7
  24. package/dist/components/tt-drawer/src/RenderDrawer.vue.js +48 -36
  25. package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +39 -26
  26. package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +23 -10
  27. package/dist/components/tt-drawer/src/props.js +22 -9
  28. package/dist/components/tt-drawer/src/utils/drawer-api.js +42 -33
  29. package/dist/components/tt-empty/index.js +28 -18
  30. package/dist/components/tt-form/index.js +22 -14
  31. package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +23 -14
  32. package/dist/components/tt-form/src/components/FormActions.vue2.js +42 -32
  33. package/dist/components/tt-form/src/form/FormDescription.vue.js +19 -10
  34. package/dist/components/tt-form/src/form/FormItem.vue.js +18 -9
  35. package/dist/components/tt-form/src/form/FormLabel.vue.js +18 -9
  36. package/dist/components/tt-form/src/form/RenderContent.vue.js +25 -13
  37. package/dist/components/tt-form/src/form-render/FormField.vue2.js +62 -55
  38. package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +36 -28
  39. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +64 -56
  40. package/dist/components/tt-form/src/form-render/array-register/utils.js +18 -8
  41. package/dist/components/tt-form/src/form-render/dependencies.js +36 -24
  42. package/dist/components/tt-form/src/form-render/form.vue2.js +17 -7
  43. package/dist/components/tt-form/src/form-render/helper.js +29 -16
  44. package/dist/components/tt-form/src/form-render/rootWrapperClass.js +17 -7
  45. package/dist/components/tt-form/src/formApi.js +59 -48
  46. package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +17 -4
  47. package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +67 -57
  48. package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +55 -46
  49. package/dist/components/tt-form/src/group-form/groupFormApi.js +21 -10
  50. package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +27 -17
  51. package/dist/components/tt-form/src/hooks/useSelectCollapse.js +32 -23
  52. package/dist/components/tt-form/src/index.vue2.js +53 -45
  53. package/dist/components/tt-form/src/useFormContext.js +74 -62
  54. package/dist/components/tt-form-item-error-tooltip/index.js +18 -5
  55. package/dist/components/tt-form-item-error-tooltip/index.vue.js +32 -21
  56. package/dist/components/tt-icon/index.js +20 -7
  57. package/dist/components/tt-image/index.js +19 -6
  58. package/dist/components/tt-image/src/components/ImageViewer.js +27 -17
  59. package/dist/components/tt-loading/index.js +16 -4
  60. package/dist/components/tt-loading/src/directive.js +34 -22
  61. package/dist/components/tt-log/index.js +17 -4
  62. package/dist/components/tt-log/index.vue.js +21 -8
  63. package/dist/components/tt-modal/index.js +16 -5
  64. package/dist/components/tt-modal/src/RenderModal.vue.js +163 -151
  65. package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +38 -28
  66. package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +24 -11
  67. package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +36 -23
  68. package/dist/components/tt-modal/src/props.js +22 -9
  69. package/dist/components/tt-modal/src/utils/modal-api.js +39 -29
  70. package/dist/components/tt-modal-form/index.vue.js +44 -36
  71. package/dist/components/tt-nav-anchor/index.js +17 -4
  72. package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +69 -57
  73. package/dist/components/tt-panel-select/index.js +17 -4
  74. package/dist/components/tt-panel-select/src/hooks/usePanelData.js +51 -40
  75. package/dist/components/tt-panel-select/src/index.vue.js +35 -24
  76. package/dist/components/tt-select/index.js +17 -4
  77. package/dist/components/tt-select/src/Select.vue.js +79 -68
  78. package/dist/components/tt-select/src/components/SelectTable.vue.js +41 -30
  79. package/dist/components/tt-select/src/components/Table.vue.js +86 -76
  80. package/dist/components/tt-select/src/hooks/useDataSource.js +59 -49
  81. package/dist/components/tt-select/src/hooks/useSelect.js +46 -38
  82. package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +123 -112
  83. package/dist/components/tt-table/index.js +19 -12
  84. package/dist/components/tt-table/src/Table.vue.js +82 -71
  85. package/dist/components/tt-table/src/TableForm.vue.js +77 -65
  86. package/dist/components/tt-table/src/components/TableAction.vue.js +49 -39
  87. package/dist/components/tt-table/src/components/TableButtons.js +73 -60
  88. package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +14 -3
  89. package/dist/components/tt-table/src/components/TableToobalTools.vue.js +36 -25
  90. package/dist/components/tt-table/src/hooks/useColumns.js +72 -65
  91. package/dist/components/tt-table/src/hooks/useCustomColumns.js +43 -31
  92. package/dist/components/tt-table/src/hooks/useDataSource.js +50 -42
  93. package/dist/components/tt-table/src/hooks/usePagination.js +36 -25
  94. package/dist/components/tt-table/src/props.js +55 -42
  95. package/dist/components/tt-table/src/utils/table-api.js +33 -22
  96. package/dist/components/tt-table/src/utils/table-form-api.js +35 -24
  97. package/dist/components/tt-text/index.js +17 -4
  98. package/dist/components/tt-upload/index.js +19 -6
  99. package/dist/components/tt-upload/src/TtUpload.vue.js +77 -66
  100. package/dist/directives/disabled-tip/index.js +37 -26
  101. package/dist/hooks/useFormSchemasLink.js +90 -79
  102. package/dist/hooks/useScreenshotOss.js +49 -35
  103. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
  104. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js +64 -0
  105. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.js +545 -0
  106. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.js +508 -0
  107. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.js +81 -0
  108. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js +10 -0
  109. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.js +71 -0
  110. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.js +84 -0
  111. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.js +72 -0
  112. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js +22 -0
  113. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js +11 -0
  114. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.js +50 -0
  115. package/dist/node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js +1024 -0
  116. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.js +32 -0
  117. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js +11 -0
  118. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js +92 -0
  119. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js +34 -0
  120. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js +52 -0
  121. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js +43 -0
  122. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js +47 -0
  123. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js +122 -0
  124. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js +30 -0
  125. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js +24 -0
  126. package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js +106 -0
  127. package/dist/node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js +16 -0
  128. package/dist/node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.js +21 -0
  129. package/dist/node_modules/.pnpm/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js +2922 -0
  130. package/dist/node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js +93 -0
  131. package/dist/packages/hooks/src/propTypes.js +17 -0
  132. package/dist/packages/hooks/src/tools.js +6 -0
  133. package/dist/packages/hooks/src/useDebounce.js +32 -0
  134. package/dist/packages/hooks/src/useDesign.js +12 -0
  135. package/dist/packages/hooks/src/useElementScreenshot.js +136 -0
  136. package/dist/packages/hooks/src/useIsScroll.js +12 -0
  137. package/dist/packages/hooks/src/usePriorityValue.js +45 -0
  138. package/dist/packages/utils/src/calc.js +14 -0
  139. package/dist/packages/utils/src/check.js +10 -0
  140. package/dist/packages/utils/src/install.js +11 -0
  141. package/dist/packages/utils/src/is.js +64 -0
  142. package/dist/packages/utils/src/merge.js +13 -0
  143. package/dist/packages/utils/src/stateHandler.js +33 -0
  144. package/dist/packages/utils/src/string.js +6 -0
  145. package/dist/packages/utils/src/testid-helper.js +14 -0
  146. package/dist/packages/utils/src/tool.js +181 -0
  147. package/dist/plugins/default/renderCellContent.js +39 -28
  148. package/dist/plugins/vxeTable/switchStatus.js +37 -26
  149. package/package.json +3 -3
@@ -1,19 +1,32 @@
1
- import { defineComponent as I, inject as S, computed as d, toRaw as k, createVNode as n, resolveComponent as P, unref as f, isVNode as j, mergeProps as c, withDirectives as F, resolveDirective as $ } from "vue";
2
- import { propTypes as a, useDesign as x } from "@dazhicheng/hooks";
3
- import { isBoolean as z, isFunction as b, generateTestId as D, toKebabCase as N, isArray as O, isObject as A } from "@dazhicheng/utils";
4
- import { TtButton as R } from "../../../tt-button/index.js";
5
- import { TtIcon as m } from "../../../tt-icon/index.js";
6
- import U from "../../../../directives/disabled-tip/index.js";
7
- import { ElPopover as V } from "element-plus";
1
+ import { defineComponent as I, inject as S, computed as f, toRaw as k, createVNode as n, resolveComponent as P, unref as d, isVNode as j, mergeProps as c, withDirectives as F, resolveDirective as $ } from "vue";
2
+ import { propTypes as a } from "../../../../packages/hooks/src/propTypes.js";
3
+ import { useDesign as x } from "../../../../packages/hooks/src/useDesign.js";
4
+ import "axios";
5
+ import { ElPopover as z } from "element-plus";
6
+ import { isBoolean as D, isFunction as m, isArray as N, isObject as O } from "../../../../packages/utils/src/is.js";
7
+ import { generateTestId as A, toKebabCase as R } from "../../../../packages/utils/src/testid-helper.js";
8
+ import "xe-utils";
9
+ import "dayjs";
10
+ import "dayjs/plugin/utc";
11
+ import "dayjs/plugin/timezone";
12
+ import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
13
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
14
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
15
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
16
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
17
+ import "lodash-es";
18
+ import { TtButton as U } from "../../../tt-button/index.js";
19
+ import { TtIcon as b } from "../../../tt-icon/index.js";
20
+ import V from "../../../../directives/disabled-tip/index.js";
8
21
  import { componentMap as _ } from "../componentMap.js";
9
22
  /* empty css */
10
- function E(l) {
11
- return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !j(l);
23
+ function E(i) {
24
+ return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !j(i);
12
25
  }
13
- const X = /* @__PURE__ */ I({
26
+ const ft = /* @__PURE__ */ I({
14
27
  name: "TtTableButton",
15
28
  directives: {
16
- disabledTip: U
29
+ disabledTip: V
17
30
  },
18
31
  props: {
19
32
  /** 按钮acitons */
@@ -26,92 +39,92 @@ const X = /* @__PURE__ */ I({
26
39
  /** 是否阻止默认行为 */
27
40
  stopButtonPropagation: a.bool.def(!0)
28
41
  },
29
- setup(l, {
42
+ setup(i, {
30
43
  slots: g
31
44
  }) {
32
45
  const {
33
- prefixCls: s
34
- } = x("table-buttons"), h = S("tableIdContext", d(() => "")), T = (e) => D(f(h), "toolbar-btn", N(e)), C = (e) => {
35
- const t = e.ifShow;
46
+ prefixCls: l
47
+ } = x("table-buttons"), h = S("tableIdContext", f(() => "")), T = (t) => A(d(h), "toolbar-btn", R(t)), C = (t) => {
48
+ const e = t.ifShow;
36
49
  let o = !0;
37
- return z(t) && (o = t), b(t) && (o = t(e)), o;
38
- }, v = d(() => (k(l.actions) || []).filter((e) => C(e))), y = (e) => {
39
- if (!l.stopButtonPropagation) return;
40
- e.composedPath().find((r) => {
41
- var i;
42
- return ((i = r.tagName) == null ? void 0 : i.toUpperCase()) === "BUTTON";
43
- }) && e.stopPropagation();
50
+ return D(e) && (o = e), m(e) && (o = e(t)), o;
51
+ }, v = f(() => (k(i.actions) || []).filter((t) => C(t))), y = (t) => {
52
+ if (!i.stopButtonPropagation) return;
53
+ t.composedPath().find((r) => {
54
+ var s;
55
+ return ((s = r.tagName) == null ? void 0 : s.toUpperCase()) === "BUTTON";
56
+ }) && t.stopPropagation();
44
57
  };
45
- function B(e, t) {
46
- const o = e;
47
- return O(o) && o.length > 0 ? o.some((r) => !!(r != null && r.condition)) : A(o) ? !!o.condition : !!t;
58
+ function B(t, e) {
59
+ const o = t;
60
+ return N(o) && o.length > 0 ? o.some((r) => !!(r != null && r.condition)) : O(o) ? !!o.condition : !!e;
48
61
  }
49
- function w(e, t = "default", o) {
50
- if (!e || !Reflect.has(e, t) || !b(e[t]))
62
+ function w(t, e = "default", o) {
63
+ if (!t || !Reflect.has(t, e) || !m(t[e]))
51
64
  return null;
52
- const r = e[t];
65
+ const r = t[e];
53
66
  return r ? r(o) : null;
54
67
  }
55
- const u = (e, t) => F(n(R, c({
56
- disabled: B(e.disabledTip, e.disabled),
57
- key: t,
68
+ const p = (t, e) => F(n(U, c({
69
+ disabled: B(t.disabledTip, t.disabled),
70
+ key: e,
58
71
  style: {
59
- color: e.color
72
+ color: t.color
60
73
  },
61
- class: `${s}-reference-btn`,
62
- onClick: e.onClick,
63
- loading: e.loading,
64
- type: e.type || "",
65
- size: e.size || "default",
66
- "data-testid": T(e.label || "")
67
- }, e.props ?? {}), {
68
- default: () => [n("span", null, [e.label || ""]), e.children && !e.disabled && n(m, {
74
+ class: `${l}-reference-btn`,
75
+ onClick: t.onClick,
76
+ loading: t.loading,
77
+ type: t.type || "",
78
+ size: t.size || "default",
79
+ "data-testid": T(t.label || "")
80
+ }, t.props ?? {}), {
81
+ default: () => [n("span", null, [t.label || ""]), t.children && !t.disabled && n(b, {
69
82
  "icon-font": "icon-xiala",
70
83
  class: "el-icon--right"
71
84
  }, null)],
72
- ...e.iconFont && {
73
- icon: () => n(m, {
74
- "icon-font": e.iconFont,
85
+ ...t.iconFont && {
86
+ icon: () => n(b, {
87
+ "icon-font": t.iconFont,
75
88
  size: 14
76
89
  }, null)
77
90
  }
78
- }), [[$("disabled-tip"), e.disabledTip]]), p = (e) => e.map((t, o) => {
79
- const r = _.get(t.component);
80
- if (t.children && t.children.length > 0) {
81
- const i = {
82
- reference: () => u(t, o)
91
+ }), [[$("disabled-tip"), t.disabledTip]]), u = (t) => t.map((e, o) => {
92
+ const r = _.get(e.component);
93
+ if (e.children && e.children.length > 0) {
94
+ const s = {
95
+ reference: () => p(e, o)
83
96
  };
84
- return t.disabled ? u(t, o) : n(V, {
97
+ return e.disabled ? p(e, o) : n(z, {
85
98
  placement: "bottom",
86
99
  width: "auto",
87
100
  trigger: "hover",
88
101
  offset: 8,
89
102
  "show-arrow": !1,
90
- "popper-class": `${s}-popover`
103
+ "popper-class": `${l}-popover`
91
104
  }, {
92
105
  default: () => [n("div", {
93
- class: `${s}-popover-btnbox`
94
- }, [p(t.children)])],
95
- ...i
106
+ class: `${l}-popover-btnbox`
107
+ }, [u(e.children)])],
108
+ ...s
96
109
  });
97
110
  }
98
- return t.slot ? w(g, t.slot, t) : t.component ? n(r, c({
111
+ return e.slot ? w(g, e.slot, e) : e.component ? n(r, c({
99
112
  key: o
100
- }, t), null) : u(t, o);
113
+ }, e), null) : p(e, o);
101
114
  });
102
115
  return () => {
103
- let e;
116
+ let t;
104
117
  return n("div", {
105
- class: `${s} flex`,
118
+ class: `${l} flex`,
106
119
  onClick: y
107
120
  }, [n(P("el-space"), {
108
121
  size: 8
109
- }, E(e = p(f(v))) ? e : {
110
- default: () => [e]
122
+ }, E(t = u(d(v))) ? t : {
123
+ default: () => [t]
111
124
  })]);
112
125
  };
113
126
  }
114
127
  });
115
128
  export {
116
- X as default
129
+ ft as default
117
130
  };
@@ -5,12 +5,23 @@ import { TtIcon as B } from "../../../tt-icon/index.js";
5
5
  import { TtText as oe } from "../../../tt-text/index.js";
6
6
  import "../../../tt-modal/index.js";
7
7
  import { TtButton as ne } from "../../../tt-button/index.js";
8
- import { useDesign as se } from "@dazhicheng/hooks";
8
+ import "../../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
9
+ import { useDesign as se } from "../../../../packages/hooks/src/useDesign.js";
10
+ import "axios";
9
11
  import { ElScrollbar as $, ElCheckbox as I, ElCheckboxGroup as ie, ElTooltip as de } from "element-plus";
12
+ import "dayjs";
13
+ import "xe-utils";
14
+ import "dayjs/plugin/utc";
15
+ import "dayjs/plugin/timezone";
16
+ import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
17
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
18
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
19
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
20
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
10
21
  import { cloneDeep as ce } from "lodash-es";
11
22
  import ae from "sortablejs";
12
23
  import { useModalRender as re } from "../../../tt-modal/src/hooks/useModalRender.js";
13
- const ue = { class: "flex-1" }, me = { class: "cb flex items-center" }, fe = { class: "text-[var(--el-text-color-primary)] font-bold" }, pe = { class: "flex flex-col w-[200px] shrink-0" }, he = { class: "flex items-center justify-between px-15px pt-12px pb-6px text-xs text-[var(--el-text-color-regular)]" }, xe = { class: "flex items-center text-xs" }, Ce = ["onClick"], be = { class: "text-left" }, Be = /* @__PURE__ */ X({
24
+ const ue = { class: "flex-1" }, me = { class: "cb flex items-center" }, fe = { class: "text-[var(--el-text-color-primary)] font-bold" }, pe = { class: "flex flex-col w-[200px] shrink-0" }, he = { class: "flex items-center justify-between px-15px pt-12px pb-6px text-xs text-[var(--el-text-color-regular)]" }, xe = { class: "flex items-center text-xs" }, Ce = ["onClick"], be = { class: "text-left" }, qe = /* @__PURE__ */ X({
14
25
  __name: "TableColumnModal",
15
26
  props: {
16
27
  openColumn: { type: Function },
@@ -230,5 +241,5 @@ const ue = { class: "flex-1" }, me = { class: "cb flex items-center" }, fe = { c
230
241
  }
231
242
  });
232
243
  export {
233
- Be as default
244
+ qe as default
234
245
  };
@@ -1,55 +1,66 @@
1
- import { defineComponent as w, inject as E, computed as i, unref as n, ref as x, createElementBlock as a, openBlock as t, createBlock as d, createCommentVNode as f, withCtx as p, renderSlot as u, Fragment as h, renderList as I, createElementVNode as $, createVNode as y } from "vue";
1
+ import { defineComponent as w, inject as E, computed as s, unref as n, ref as x, createElementBlock as a, openBlock as t, createBlock as p, createCommentVNode as d, withCtx as f, renderSlot as u, Fragment as h, renderList as I, createElementVNode as $, createVNode as y } from "vue";
2
2
  import { TtIcon as A } from "../../../tt-icon/index.js";
3
- import { generateTestId as B } from "@dazhicheng/utils";
4
- import { ElSpace as N, ElTooltip as V } from "element-plus";
3
+ import "axios";
4
+ import { ElSpace as B, ElTooltip as N } from "element-plus";
5
+ import "dayjs";
6
+ import { generateTestId as V } from "../../../../packages/utils/src/testid-helper.js";
7
+ import "xe-utils";
8
+ import "dayjs/plugin/utc";
9
+ import "dayjs/plugin/timezone";
10
+ import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
11
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
12
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
13
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
14
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
15
+ import "lodash-es";
5
16
  import { toolProps as z } from "../toolProps.js";
6
17
  import R from "../../../../assets/svg/RiRefreshLine.svg.js";
7
18
  import j from "../../../../assets/svg/exportSvg.svg.js";
8
19
  import F from "../../../../assets/svg/columnSet.svg.js";
9
- const L = ["data-testid"], P = ["onClick", "onAnimationend"], Q = /* @__PURE__ */ w({
20
+ const L = ["data-testid"], P = ["onClick", "onAnimationend"], ie = /* @__PURE__ */ w({
10
21
  __name: "TableToobalTools",
11
22
  props: z,
12
23
  emits: ["on-refresh", "on-columns-setting", "on-export"],
13
24
  setup(b, { emit: k }) {
14
- const r = b, l = k, v = E(
25
+ const r = b, i = k, v = E(
15
26
  "tableIdContext",
16
- i(() => "")
17
- ), _ = i(() => B(n(v), "table-toolbar-tools")), c = x(/* @__PURE__ */ new Set());
18
- function g(e, m) {
19
- c.value.add(e), m();
27
+ s(() => "")
28
+ ), _ = s(() => V(n(v), "table-toolbar-tools")), m = x(/* @__PURE__ */ new Set());
29
+ function g(e, c) {
30
+ m.value.add(e), c();
20
31
  }
21
32
  function C(e) {
22
- c.value.delete(e);
33
+ m.value.delete(e);
23
34
  }
24
- const S = i(() => [
35
+ const S = s(() => [
25
36
  {
26
37
  label: "自定义导出",
27
38
  icon: j,
28
- handler: () => l("on-export"),
39
+ handler: () => i("on-export"),
29
40
  if: r.showExport
30
41
  },
31
42
  {
32
43
  label: "刷新",
33
44
  icon: R,
34
- handler: () => l("on-refresh"),
45
+ handler: () => i("on-refresh"),
35
46
  if: r.showRefresh
36
47
  },
37
48
  {
38
49
  label: "列设置",
39
50
  icon: F,
40
- handler: () => l("on-columns-setting"),
51
+ handler: () => i("on-columns-setting"),
41
52
  if: r.showSetColumn
42
53
  }
43
54
  ]);
44
- return (e, m) => (t(), a("div", { "data-testid": _.value }, [
45
- e.showSetting ? (t(), d(n(N), {
55
+ return (e, c) => (t(), a("div", { "data-testid": _.value }, [
56
+ e.showSetting ? (t(), p(n(B), {
46
57
  key: 0,
47
58
  size: 12
48
59
  }, {
49
- default: p(() => [
60
+ default: f(() => [
50
61
  u(e.$slots, "toolbar-left"),
51
- (t(!0), a(h, null, I(S.value, (o, s) => (t(), a(h, { key: s }, [
52
- o.if ? (t(), d(n(V), {
62
+ (t(!0), a(h, null, I(S.value, (o, l) => (t(), a(h, { key: l }, [
63
+ o.if ? (t(), p(n(N), {
53
64
  key: 0,
54
65
  ref_for: !0,
55
66
  ref: "tooltipRef",
@@ -59,11 +70,11 @@ const L = ["data-testid"], P = ["onClick", "onAnimationend"], Q = /* @__PURE__ *
59
70
  placement: "top",
60
71
  "show-after": 200
61
72
  }, {
62
- default: p(() => [
73
+ default: f(() => [
63
74
  $("div", {
64
75
  class: "icon-table-btn",
65
- onClick: (T) => g(s, o.handler),
66
- onAnimationend: (T) => C(s)
76
+ onClick: (T) => g(l, o.handler),
77
+ onAnimationend: (T) => C(l)
67
78
  }, [
68
79
  y(n(A), {
69
80
  icon: o.icon,
@@ -73,15 +84,15 @@ const L = ["data-testid"], P = ["onClick", "onAnimationend"], Q = /* @__PURE__ *
73
84
  ], 40, P)
74
85
  ]),
75
86
  _: 2
76
- }, 1032, ["content"])) : f("", !0)
87
+ }, 1032, ["content"])) : d("", !0)
77
88
  ], 64))), 128)),
78
89
  u(e.$slots, "toolbar-right")
79
90
  ]),
80
91
  _: 3
81
- })) : f("", !0)
92
+ })) : d("", !0)
82
93
  ], 8, L));
83
94
  }
84
95
  });
85
96
  export {
86
- Q as default
97
+ ie as default
87
98
  };
@@ -1,8 +1,15 @@
1
- import { calcWordsWidth as G } from "@dazhicheng/utils";
2
- import { ElMessage as Y } from "element-plus";
3
- import { GlobalConfig as R } from "../../../../hooks/useSetup.js";
4
- import { isEqual as U, debounce as B, cloneDeep as L, flattenDeep as ee, isArray as ne, isFunction as te } from "lodash-es";
5
- import { ref as x, shallowRef as le, computed as T, unref as n, watch as E, toValue as oe, watchEffect as ie, onUnmounted as se, nextTick as ue } from "vue";
1
+ import "axios";
2
+ import { ElMessage as G } from "element-plus";
3
+ import "dayjs";
4
+ import { ref as x, shallowRef as Y, computed as T, unref as n, watch as E, toValue as R, watchEffect as ee, onUnmounted as ne, nextTick as te } from "vue";
5
+ import { calcWordsWidth as oe } from "../../../../packages/utils/src/tool.js";
6
+ import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
7
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
8
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
9
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
10
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
11
+ import { isEqual as U, debounce as B, cloneDeep as L, flattenDeep as le, isArray as ie, isFunction as se } from "lodash-es";
12
+ import { GlobalConfig as ue } from "../../../../hooks/useSetup.js";
6
13
  function S(e) {
7
14
  var u;
8
15
  const s = L(e || []);
@@ -56,7 +63,7 @@ function ce(e) {
56
63
  ...W
57
64
  }), a;
58
65
  }
59
- function de(e) {
66
+ function re(e) {
60
67
  const { showAction: s, actionProps: u, actionWidth: t, actionTitle: i } = n(e);
61
68
  return s ? [
62
69
  {
@@ -71,7 +78,7 @@ function de(e) {
71
78
  }
72
79
  ] : [];
73
80
  }
74
- function re(e, s) {
81
+ function de(e, s) {
75
82
  const u = (t, i) => {
76
83
  if (t.sortable && i) {
77
84
  const h = `${t.field}_header`;
@@ -100,7 +107,7 @@ function ae(e, s, u) {
100
107
  }
101
108
  function he(e) {
102
109
  const u = document.getElementsByTagName("body")[0], t = window.getComputedStyle(u).fontFamily;
103
- return e.minWidth = e.minWidth === "auto" ? (G(e.title, "12px", t) + 60).toFixed(0) : e.minWidth, e;
110
+ return e.minWidth = e.minWidth === "auto" ? (oe(e.title, "12px", t) + 60).toFixed(0) : e.minWidth, e;
104
111
  }
105
112
  function fe({
106
113
  propsRef: e,
@@ -113,29 +120,29 @@ function fe({
113
120
  }) {
114
121
  var g;
115
122
  const { columnsFieldSort: h, columnsFieldNoSort: b, isCellSort: W, isCellResize: C, customizeColumn: a } = n(e);
116
- let v = W;
117
- h.length > 0 && (v = h.includes(s.field)), b.length > 0 && (v = !b.includes(s.field));
118
- let r = {
123
+ let p = W;
124
+ h.length > 0 && (p = h.includes(s.field)), b.length > 0 && (p = !b.includes(s.field));
125
+ let d = {
119
126
  minWidth: 140,
120
- sortable: v,
127
+ sortable: p,
121
128
  resizable: C,
122
129
  ...s
123
130
  };
124
- const m = a || ((g = R.table) == null ? void 0 : g.customizeColumn);
125
- return m && te(m) && (r = m(r)), r = re(r, t), r = ae(r, u, i), r = he(r), r;
131
+ const m = a || ((g = ue.table) == null ? void 0 : g.customizeColumn);
132
+ return m && se(m) && (d = m(d)), d = de(d, t), d = ae(d, u, i), d = he(d), d;
126
133
  }
127
- function xe(e, {
134
+ function Pe(e, {
128
135
  xGrid: s,
129
136
  tableWidth: u
130
137
  }, t) {
131
- const i = x([]), h = x([]), b = x([]), W = x([]), C = x([]), a = x([]), v = le(!0), r = x(!1);
138
+ const i = x([]), h = x([]), b = x([]), W = x([]), C = x([]), a = x([]), p = Y(!0), d = x(!1);
132
139
  let m = null, g = [];
133
- function j(o) {
140
+ function j(l) {
134
141
  var c;
135
- const l = { ...o };
136
- return (c = l.children) != null && c.length && (l.children = l.children.map((z) => j(z))), fe({
142
+ const o = { ...l };
143
+ return (c = o.children) != null && c.length && (o.children = o.children.map((v) => j(v))), fe({
137
144
  propsRef: e,
138
- item: l,
145
+ item: o,
139
146
  titleSolts: h,
140
147
  validSolts: b,
141
148
  validRulesKeys: W
@@ -144,70 +151,70 @@ function xe(e, {
144
151
  });
145
152
  }
146
153
  const q = T(() => {
147
- const o = S(n(i));
148
- return o ? o.map((c) => j(c)) : [];
154
+ const l = S(n(i));
155
+ return l ? l.map((c) => j(c)) : [];
149
156
  }), H = () => ({
150
157
  leftColumn: n(C),
151
158
  actionColumn: n(a)
152
159
  });
153
- function D(o) {
154
- const l = S(o);
155
- if (ne(l)) {
156
- if (l.length <= 0) {
160
+ function D(l) {
161
+ const o = S(l);
162
+ if (ie(o)) {
163
+ if (o.length <= 0) {
157
164
  i.value = [];
158
165
  return;
159
166
  }
160
- i.value = g = l;
167
+ i.value = g = o;
161
168
  }
162
169
  }
163
170
  function $() {
164
171
  return g;
165
172
  }
166
- function N(o) {
167
- ue(() => {
168
- const l = n(s);
169
- l && l.reloadColumn(ee(o));
173
+ function N(l) {
174
+ te(() => {
175
+ const o = n(s);
176
+ o && o.reloadColumn(le(l));
170
177
  });
171
178
  }
172
- function V(o) {
179
+ function V(l) {
173
180
  m || (m = n(s).$el.querySelector(".vxe-table--scroll-y-virtual"));
174
- const l = [...n(C), ...n(a)], { column: c } = o, { tableColumn: z } = n(s).getTableColumn(), w = L(
175
- z.filter((d) => !l.map((f) => (f == null ? void 0 : f.type) || f.field).includes((d == null ? void 0 : d.type) || d.field))
176
- ), F = l.reduce((d, f) => d + (f.width || 0), 0), I = (n(u) || 0) - F, A = w.filter((d) => d.field !== c.field).reduce((d, f) => d + Number(f.renderWidth), 0), p = I - A;
177
- if (c.resizeWidth < p) {
178
- const d = (m == null ? void 0 : m.offsetWidth) || 0;
179
- c.resizeWidth = p - d, c.renderWidth = c.resizeWidth, n(s).setColumnWidth(w, c.resizeWidth), Y.warning("不能小于拖动的最小宽度,会导致表格右侧空白");
181
+ const o = [...n(C), ...n(a)], { column: c } = l, { tableColumn: v } = n(s).getTableColumn(), w = L(
182
+ v.filter((r) => !o.map((f) => (f == null ? void 0 : f.type) || f.field).includes((r == null ? void 0 : r.type) || r.field))
183
+ ), F = o.reduce((r, f) => r + (f.width || 0), 0), I = (n(u) || 0) - F, A = w.filter((r) => r.field !== c.field).reduce((r, f) => r + Number(f.renderWidth), 0), y = I - A;
184
+ if (c.resizeWidth < y) {
185
+ const r = (m == null ? void 0 : m.offsetWidth) || 0;
186
+ c.resizeWidth = y - r, c.renderWidth = c.resizeWidth, n(s).setColumnWidth(w, c.resizeWidth), G.warning("不能小于拖动的最小宽度,会导致表格右侧空白");
180
187
  }
181
- const k = w == null ? void 0 : w.find((d) => d.field === c.field);
188
+ const k = w == null ? void 0 : w.find((r) => r.field === c.field);
182
189
  k && (k.width = c.resizeWidth);
183
190
  }
184
- function J(o) {
185
- V(o), t("resizable-change", o);
191
+ function J(l) {
192
+ V(l), t("resizable-change", l);
186
193
  }
187
- function K(o) {
188
- V(o), t("column-resizable-change", o);
194
+ function K(l) {
195
+ V(l), t("column-resizable-change", l);
189
196
  }
190
- function Q(o) {
197
+ function Q(l) {
191
198
  var _;
192
- r.value = !0;
193
- const l = [], { showAction: c, showCheckbox: z, showIndex: w, showRadio: F, showExpand: I } = n(e);
194
- c && l.push("action"), z && l.push("checkbox"), w && l.push("seq"), F && l.push("radio"), I && l.push("expand");
195
- const { collectColumn: A } = ((_ = o.$grid) == null ? void 0 : _.getTableColumn()) || { collectColumn: [] }, p = A.filter((P) => !l.includes(P.field) && !l.includes(P.type)), k = $();
196
- function d(P, X) {
199
+ d.value = !0;
200
+ const o = [], { showAction: c, showCheckbox: v, showIndex: w, showRadio: F, showExpand: I } = n(e);
201
+ c && o.push("action"), v && o.push("checkbox"), w && o.push("seq"), F && o.push("radio"), I && o.push("expand");
202
+ const { collectColumn: A } = ((_ = l.$grid) == null ? void 0 : _.getTableColumn()) || { collectColumn: [] }, y = A.filter((P) => !o.includes(P.field) && !o.includes(P.type)), k = $();
203
+ function r(P, X) {
197
204
  const M = [];
198
205
  return P.forEach((O) => {
199
- const y = X.find((Z) => Z.field === O.field);
200
- y && (O.children && y.children && (y.children = d(O.children, y.children)), M.push(y));
206
+ const z = X.find((Z) => Z.field === O.field);
207
+ z && (O.children && z.children && (z.children = r(O.children, z.children)), M.push(z));
201
208
  }), M;
202
209
  }
203
- const f = d(p, k);
204
- D(f), t("column-dragend", o);
210
+ const f = r(y, k);
211
+ D(f), t("column-dragend", l);
205
212
  }
206
213
  return E(
207
- T(() => oe(n(e).columns)),
208
- (o, l) => {
209
- if (!U(o, l)) {
210
- const c = S(o || []);
214
+ T(() => R(n(e).columns)),
215
+ (l, o) => {
216
+ if (!U(l, o)) {
217
+ const c = S(l || []);
211
218
  i.value = g = c || [];
212
219
  }
213
220
  },
@@ -217,13 +224,13 @@ function xe(e, {
217
224
  }
218
225
  ), E(
219
226
  () => [C.value, q.value, a.value],
220
- (o, l) => {
221
- if (n(r))
222
- return r.value = !1, !1;
223
- v.value && (N(o), v.value = !1), U(o, l) || N(o);
227
+ (l, o) => {
228
+ if (n(d))
229
+ return d.value = !1, !1;
230
+ p.value && (N(l), p.value = !1), U(l, o) || N(l);
224
231
  },
225
232
  { deep: !0 }
226
- ), ie(() => {
233
+ ), ee(() => {
227
234
  n(e).editRules && (W.value = Object.keys(n(e).editRules));
228
235
  }), E(
229
236
  T(() => [
@@ -251,12 +258,12 @@ function xe(e, {
251
258
  n(e).isI18n
252
259
  ]),
253
260
  () => {
254
- a.value = de(e);
261
+ a.value = re(e);
255
262
  },
256
263
  {
257
264
  immediate: !0
258
265
  }
259
- ), se(() => {
266
+ ), ne(() => {
260
267
  g = [];
261
268
  }), {
262
269
  getColumnsRef: q,
@@ -271,5 +278,5 @@ function xe(e, {
271
278
  };
272
279
  }
273
280
  export {
274
- xe as useColumns
281
+ Pe as useColumns
275
282
  };