@dazhicheng/ui 1.5.203 → 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 +1 -1
@@ -1,24 +1,37 @@
1
- import { defineComponent as Me, useSlots as Ee, ref as Oe, computed as f, toValue as v, getCurrentInstance as Ae, unref as a, onMounted as U, watch as O, onUnmounted as _e, createElementBlock as q, openBlock as G, normalizeClass as B, createCommentVNode as ke, createElementVNode as Re, createVNode as A, renderSlot as g, createSlots as J, renderList as Q, withCtx as M, normalizeProps as X, guardReactiveProps as Y, mergeProps as Z, toHandlers as $e, nextTick as Be } from "vue";
1
+ import { defineComponent as Me, useSlots as Ee, ref as Oe, computed as b, toValue as v, getCurrentInstance as Ae, onMounted as U, watch as O, onUnmounted as _e, createElementBlock as q, openBlock as G, normalizeClass as B, unref as a, createCommentVNode as ke, createElementVNode as Re, createVNode as A, renderSlot as g, createSlots as J, renderList as Q, withCtx as M, normalizeProps as X, guardReactiveProps as Y, mergeProps as Z, toHandlers as $e, nextTick as Be } from "vue";
2
2
  import "../../tt-button/index.js";
3
3
  import "../../tt-checkbox/index.js";
4
4
  import "../../tt-empty/index.js";
5
- import { extractResourceFromApi as Ve, generateTestId as _, kebabToCamelCase as Le, mergeWithArrayOverride as xe, isFunction as Ke } from "@dazhicheng/utils";
5
+ import { kebabToCamelCase as Ve } from "../../../packages/utils/src/string.js";
6
+ import "axios";
6
7
  import "element-plus";
8
+ import { isFunction as Le } from "../../../packages/utils/src/is.js";
9
+ import { extractResourceFromApi as xe, generateTestId as _ } from "../../../packages/utils/src/testid-helper.js";
10
+ import Ke from "xe-utils";
11
+ import "dayjs";
12
+ import "dayjs/plugin/utc";
13
+ import "dayjs/plugin/timezone";
14
+ import { mergeWithArrayOverride as je } from "../../../packages/utils/src/merge.js";
15
+ import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
16
+ import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
17
+ import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
18
+ import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
19
+ import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
20
+ import { omit as ze } from "lodash-es";
7
21
  import "../../tt-select/index.js";
8
22
  import "../../tt-panel-select/index.js";
9
23
  import "../../tt-upload/index.js";
10
24
  import "../../tt-api-component/index.js";
11
25
  import "vee-validate";
12
- import { useForm as je } from "../../tt-form/src/useForm.js";
26
+ import { useForm as De } from "../../tt-form/src/useForm.js";
13
27
  import "zod";
14
- import { omit as ze } from "lodash-es";
15
- import "dayjs";
16
- import "dayjs/plugin/timezone";
17
- import { useStore as De } from "@tanstack/vue-store";
28
+ import { useStore as Ne } from "@tanstack/vue-store";
18
29
  import "es-toolkit/compat";
19
30
  import "../../tt-form/src/shared/zod-defaults.js";
20
31
  import "../../tt-nav-anchor/index.js";
21
- import { useDesign as Ne, useDebounceFn as V } from "@dazhicheng/hooks";
32
+ 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";
33
+ import { useDesign as He } from "../../../packages/hooks/src/useDesign.js";
34
+ import { useDebounceFn as V } from "../../../packages/hooks/src/useDebounce.js";
22
35
  import "../../tt-icon/index.js";
23
36
  import "../../tt-form/src/components/Slot.js";
24
37
  import "../../tt-form-item-error-tooltip/index.js";
@@ -33,7 +46,7 @@ import "../../tt-drawer/index.js";
33
46
  import "../../tt-modal/index.js";
34
47
  import "../../tt-text/index.js";
35
48
  import "../../../directives/disabled-tip/index.js";
36
- import { GlobalConfig as He } from "../../../hooks/useSetup.js";
49
+ import { GlobalConfig as We } from "../../../hooks/useSetup.js";
37
50
  import "../../tt-log/index.js";
38
51
  /* empty css */
39
52
  /* empty css */
@@ -44,7 +57,6 @@ import "../../tt-loading/index.js";
44
57
  import "../index.js";
45
58
  import "vue-router";
46
59
  import "numeral";
47
- import We from "xe-utils";
48
60
  import Ue from "./components/TableColumnModal.vue2.js";
49
61
  /* empty css */
50
62
  import { provideFormActionTestIds as qe } from "./utils/context.js";
@@ -59,7 +71,7 @@ import { useTableSlot as Ze } from "./hooks/useTableSlot.js";
59
71
  import { tableFormProps as et } from "./props.js";
60
72
  import { getDefaultState as tt } from "./utils/table-api.js";
61
73
  import { TableFormApi as ot } from "./utils/table-form-api.js";
62
- const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
74
+ const rt = ["data-testid"], st = ["data-testid"], Po = /* @__PURE__ */ Me({
63
75
  name: "TtTableForm",
64
76
  __name: "TableForm",
65
77
  props: et,
@@ -73,30 +85,30 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
73
85
  "set-columns",
74
86
  ...ee
75
87
  ],
76
- setup(te, { expose: oe, emit: se }) {
88
+ setup(te, { expose: oe, emit: re }) {
77
89
  var N, H, W;
78
- const p = te, T = se, L = Ee(), { prefixCls: k } = Ne("table-form"), w = Oe();
90
+ const p = te, T = re, L = Ee(), { prefixCls: k } = He("table-form"), w = Oe();
79
91
  let t = p.tableFormApi;
80
92
  if (!t) {
81
93
  t = new ot(p);
82
94
  const e = t;
83
- e.useStore = (o) => De(t.store, o), t = e;
95
+ e.useStore = (o) => Ne(t.store, o), t = e;
84
96
  }
85
- const R = (N = t == null ? void 0 : t.useStore) == null ? void 0 : N.call(t), C = f(() => {
97
+ const R = (N = t == null ? void 0 : t.useStore) == null ? void 0 : N.call(t), C = b(() => {
86
98
  var o;
87
99
  if (p.testId) return p.testId;
88
100
  const e = (o = v(R)) == null ? void 0 : o.table;
89
- return e != null && e.api ? Ve(e.api) : "table";
90
- }), re = f(() => _(C.value, "tableform")), ae = f(() => _(C.value, "search-form-header")), ie = f(() => _(C.value, "search-btn-query")), le = f(() => _(C.value, "search-btn-reset")), ne = f(() => ({
101
+ return e != null && e.api ? xe(e.api) : "table";
102
+ }), se = b(() => _(C.value, "tableform")), ae = b(() => _(C.value, "search-form-header")), ie = b(() => _(C.value, "search-btn-query")), le = b(() => _(C.value, "search-btn-reset")), ne = b(() => ({
91
103
  submit: ie.value,
92
104
  reset: le.value
93
105
  }));
94
106
  qe(ne);
95
- const x = {}, u = Ae(), S = f(() => v(R)), { getFormSlotKeysFunc: me, getTableSlotKeysFunc: pe, replaceTableSlotKey: ue, replaceFormSlotKey: ce } = Ze(), {
107
+ const x = {}, u = Ae(), S = b(() => v(R)), { getFormSlotKeysFunc: me, getTableSlotKeysFunc: pe, replaceTableSlotKey: ue, replaceFormSlotKey: ce } = Ze(), {
96
108
  tableData: de,
97
109
  getFormProps: $,
98
110
  getTableProps: c,
99
- getTableToolProps: be,
111
+ getTableToolProps: fe,
100
112
  handleSearchInfoChange: K
101
113
  } = Xe(
102
114
  S,
@@ -104,12 +116,12 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
104
116
  t.tableApi.getLoading,
105
117
  t.tableApi.getPagination,
106
118
  T
107
- ), { run: fe } = V(
119
+ ), { run: be } = V(
108
120
  async () => {
109
- const e = await s.getValues();
110
- await s.resetForm(e, { force: !0 });
111
- const o = await s.getValues();
112
- s.setLatestSubmissionValues(o), (await (s == null ? void 0 : s.validate())).valid && K(o);
121
+ const e = await r.getValues();
122
+ await r.resetForm(e, { force: !0 });
123
+ const o = await r.getValues();
124
+ r.setLatestSubmissionValues(o), (await (r == null ? void 0 : r.validate())).valid && K(o);
113
125
  },
114
126
  200,
115
127
  { leading: !0 }
@@ -119,13 +131,13 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
119
131
  },
120
132
  200,
121
133
  { leading: !0 }
122
- ), [he, s] = je({
134
+ ), [he, r] = De({
123
135
  ...v($),
124
136
  handleSubmit: ge,
125
- handleReset: fe,
137
+ handleReset: be,
126
138
  submitOnEnter: !0,
127
139
  submitButtonOptions: {
128
- content: (H = He.form) == null ? void 0 : H.submitTitle
140
+ content: (H = We.form) == null ? void 0 : H.submitTitle
129
141
  },
130
142
  showCollapseButton: !0,
131
143
  collapsed: !0,
@@ -138,14 +150,14 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
138
150
  await Be(), t.tableApi && t.tableApi.redoHeight();
139
151
  };
140
152
  ee.forEach((e) => {
141
- const o = We.camelCase(e);
142
- x[o] = (...r) => T(e, ...r);
153
+ const o = Ke.camelCase(e);
154
+ x[o] = (...s) => T(e, ...s);
143
155
  });
144
156
  const ve = {
145
157
  ...x
146
158
  };
147
159
  function Te(e) {
148
- t.setState((o) => o.table ? (o.table.getSyncSlotComponent = p.table.getSyncSlotComponent, xe(
160
+ t.setState((o) => o.table ? (o.table.getSyncSlotComponent = p.table.getSyncSlotComponent, je(
149
161
  {
150
162
  ...e,
151
163
  table: {
@@ -154,18 +166,18 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
154
166
  }
155
167
  },
156
168
  o
157
- )) : {}), e.table && t.tableApi.setState(e.table), e.form && (s == null || s.setState(e.form));
169
+ )) : {}), e.table && t.tableApi.setState(e.table), e.form && (r == null || r.setState(e.form));
158
170
  }
159
171
  const { run: we } = V(
160
172
  async (e) => {
161
- s.isMounted && a(S).useSearchForm ? s.validate().then(async (o) => {
173
+ r.isMounted && a(S).useSearchForm ? r.validate().then(async (o) => {
162
174
  if (o.valid) {
163
- const r = await s.getValues();
175
+ const s = await r.getValues();
164
176
  await t.tableApi.reload({
165
177
  ...e,
166
178
  searchInfo: {
167
179
  ...e == null ? void 0 : e.searchInfo,
168
- ...r
180
+ ...s
169
181
  }
170
182
  });
171
183
  }
@@ -180,20 +192,20 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
180
192
  { leading: !0 }
181
193
  ), E = {
182
194
  tableMethods: t.tableApi,
183
- formMethods: s,
195
+ formMethods: r,
184
196
  setTableProps: t.tableApi.setState,
185
- setFormProps: s.setState,
197
+ setFormProps: r.setState,
186
198
  setProps: Te,
187
199
  reload: we,
188
- selectedKeys: f(() => v(t.tableApi.selectedKeys))
200
+ selectedKeys: b(() => v(t.tableApi.selectedKeys))
189
201
  };
190
202
  async function ye() {
191
203
  const { tableRefreshBefore: e } = S.value;
192
- e && Ke(e) && await e(), E.reload();
204
+ e && Le(e) && await e(), E.reload();
193
205
  }
194
206
  async function Fe(e) {
195
207
  var d, m;
196
- const o = ((m = (d = S.value) == null ? void 0 : d.table) == null ? void 0 : m.columns) || [], r = new Map(o.map((n) => [n.field, n])), l = e.checkedModel.map((n) => r.get(n)).filter(Boolean);
208
+ const o = ((m = (d = S.value) == null ? void 0 : d.table) == null ? void 0 : m.columns) || [], s = new Map(o.map((n) => [n.field, n])), l = e.checkedModel.map((n) => s.get(n)).filter(Boolean);
197
209
  if (e.isExport) {
198
210
  T("export", e.checkedModel, e.modalApi);
199
211
  return;
@@ -205,10 +217,10 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
205
217
  }), e.modalApi.closeModal(), T("set-columns", l);
206
218
  }
207
219
  function z(e = !1) {
208
- var m, n, h, b, y, F, P, I;
209
- const { notSetColumnField: o, columns: r } = a(c), l = (b = (h = (n = ((m = t.tableApi.getTableInstance()) == null ? void 0 : m.getTableColumn()) || []) == null ? void 0 : n.visibleColumn) == null ? void 0 : h.map((i) => i.field)) == null ? void 0 : b.filter(Boolean), d = ((F = (y = a(r)) == null ? void 0 : y.filter((i) => i.visible === !0 || i.visible === void 0)) == null ? void 0 : F.map((i) => i.field)) || [];
220
+ var m, n, h, f, y, F, P, I;
221
+ const { notSetColumnField: o, columns: s } = a(c), l = (f = (h = (n = ((m = t.tableApi.getTableInstance()) == null ? void 0 : m.getTableColumn()) || []) == null ? void 0 : n.visibleColumn) == null ? void 0 : h.map((i) => i.field)) == null ? void 0 : f.filter(Boolean), d = ((F = (y = a(s)) == null ? void 0 : y.filter((i) => i.visible === !0 || i.visible === void 0)) == null ? void 0 : F.map((i) => i.field)) || [];
210
222
  (P = w.value) == null || P.openModal({
211
- columns: v(r) || [],
223
+ columns: v(s) || [],
212
224
  displayFields: e ? d : l,
213
225
  disabledColumnField: o || []
214
226
  }), (I = w.value) == null || I.setModalProps({
@@ -216,10 +228,10 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
216
228
  });
217
229
  }
218
230
  function D(e = !1) {
219
- var m, n, h, b, y, F, P, I;
220
- const { notSetColumnField: o, columns: r } = a(c), l = (b = (h = (n = ((m = t.tableApi.getTableInstance()) == null ? void 0 : m.getTableColumn()) || []) == null ? void 0 : n.visibleColumn) == null ? void 0 : h.map((i) => i.field)) == null ? void 0 : b.filter(Boolean), d = ((F = (y = a(r)) == null ? void 0 : y.filter((i) => i.visible === !0 || i.visible === void 0)) == null ? void 0 : F.map((i) => i.field)) || [];
231
+ var m, n, h, f, y, F, P, I;
232
+ const { notSetColumnField: o, columns: s } = a(c), l = (f = (h = (n = ((m = t.tableApi.getTableInstance()) == null ? void 0 : m.getTableColumn()) || []) == null ? void 0 : n.visibleColumn) == null ? void 0 : h.map((i) => i.field)) == null ? void 0 : f.filter(Boolean), d = ((F = (y = a(s)) == null ? void 0 : y.filter((i) => i.visible === !0 || i.visible === void 0)) == null ? void 0 : F.map((i) => i.field)) || [];
221
233
  (P = w.value) == null || P.openModal({
222
- columns: v(r) || [],
234
+ columns: v(s) || [],
223
235
  displayFields: e ? d : l,
224
236
  disabledColumnField: o || [],
225
237
  isExport: !0
@@ -227,14 +239,14 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
227
239
  title: "自定义导出"
228
240
  });
229
241
  }
230
- Qe({ formInstance: s }), U(() => {
242
+ Qe({ formInstance: r }), U(() => {
231
243
  u && T("register", E, u == null ? void 0 : u.uid), setTimeout(() => {
232
244
  Ce();
233
245
  }, 16);
234
246
  }), O(
235
247
  () => t.tableApi.getLoading.value,
236
248
  () => {
237
- s && s.setState({
249
+ r && r.setState({
238
250
  submitButtonOptions: { loading: t.tableApi.getLoading.value }
239
251
  });
240
252
  },
@@ -242,7 +254,7 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
242
254
  ), O(
243
255
  () => $.value,
244
256
  (e) => {
245
- s && (s == null || s.setState(e));
257
+ r && (r == null || r.setState(e));
246
258
  },
247
259
  { deep: !0 }
248
260
  ), O(
@@ -253,22 +265,22 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
253
265
  },
254
266
  { deep: !0 }
255
267
  ), window.addEventListener("resize", j), U(() => {
256
- t == null || t.mount(E, s), s == null || s.setState($.value);
268
+ t == null || t.mount(E, r), r == null || r.setState($.value);
257
269
  });
258
270
  function Pe(e) {
259
271
  return Object.fromEntries(Object.entries(e).filter(([o]) => !o.startsWith("on")));
260
272
  }
261
273
  function Ie(e, o) {
262
- return Object.fromEntries(Object.keys(e).map((r) => [r, o[r]]));
274
+ return Object.fromEntries(Object.keys(e).map((s) => [s, o[s]]));
263
275
  }
264
276
  return O(
265
277
  () => ze(p, ["tableFormApi"]),
266
278
  () => {
267
279
  var m;
268
- const e = {}, o = ((m = u == null ? void 0 : u.vnode) == null ? void 0 : m.props) || {}, r = new Set(Object.keys(p));
280
+ const e = {}, o = ((m = u == null ? void 0 : u.vnode) == null ? void 0 : m.props) || {}, s = new Set(Object.keys(p));
269
281
  for (const [n, h] of Object.entries(o)) {
270
- const b = Le(n);
271
- r.has(b) && (e[b] = h);
282
+ const f = Ve(n);
283
+ s.has(f) && (e[f] = h);
272
284
  }
273
285
  const l = Pe(e), d = Ie(l, p);
274
286
  t.setState(d);
@@ -278,7 +290,7 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
278
290
  t == null || t.unmount(), window.removeEventListener("resize", j);
279
291
  }), oe({ ...E, instance: u }), (e, o) => (G(), q("div", {
280
292
  class: B(a(k)),
281
- "data-testid": re.value
293
+ "data-testid": se.value
282
294
  }, [
283
295
  S.value.useSearchForm ? (G(), q("div", {
284
296
  key: 0,
@@ -288,15 +300,15 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
288
300
  A(a(he), {
289
301
  "test-id": `${C.value}-search-form`
290
302
  }, J({ _: 2 }, [
291
- Q(a(me)(a(L)), (r) => ({
292
- name: a(ce)(r),
303
+ Q(a(me)(a(L)), (s) => ({
304
+ name: a(ce)(s),
293
305
  fn: M((l) => [
294
- g(e.$slots, r, X(Y(l || {})))
306
+ g(e.$slots, s, X(Y(l || {})))
295
307
  ])
296
308
  }))
297
309
  ]), 1032, ["test-id"]),
298
310
  g(e.$slots, "header-down")
299
- ], 10, rt)) : ke("", !0),
311
+ ], 10, st)) : ke("", !0),
300
312
  Re("div", {
301
313
  class: B({
302
314
  [`${a(k)}-wrapper`]: !0,
@@ -309,19 +321,19 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
309
321
  data: a(de),
310
322
  "table-row-id": e.tableRowId,
311
323
  "table-id": C.value,
312
- "form-api": a(s),
324
+ "form-api": a(r),
313
325
  "table-api": a(t).tableApi
314
326
  }, $e(ve)), J({ _: 2 }, [
315
- Q(a(pe)(a(L)), (r) => ({
316
- name: a(ue)(r),
327
+ Q(a(pe)(a(L)), (s) => ({
328
+ name: a(ue)(s),
317
329
  fn: M((l) => [
318
- g(e.$slots, r, X(Y(l || {})))
330
+ g(e.$slots, s, X(Y(l || {})))
319
331
  ])
320
332
  })),
321
333
  a(c).showToolbar ? {
322
334
  name: "toolbar_tools",
323
335
  fn: M(() => [
324
- A(Ge, Z(a(be), {
336
+ A(Ge, Z(a(fe), {
325
337
  onOnRefresh: ye,
326
338
  onOnExport: D,
327
339
  onOnColumnsSetting: z
@@ -348,9 +360,9 @@ const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
348
360
  "open-column": z,
349
361
  onOnSubmit: Fe
350
362
  }, null, 512)
351
- ], 10, st));
363
+ ], 10, rt));
352
364
  }
353
365
  });
354
366
  export {
355
- co as default
367
+ Po as default
356
368
  };
@@ -1,13 +1,23 @@
1
- import { defineComponent as q, useAttrs as G, ref as x, inject as _, computed as a, unref as r, toRaw as S, h as J, createElementBlock as s, openBlock as i, normalizeClass as h, createVNode as k, createBlock as c, createCommentVNode as u, withCtx as p, Fragment as f, renderList as A, renderSlot as Q, withDirectives as F, mergeProps as Z, normalizeStyle as W, toDisplayString as E, createElementVNode as ee, withModifiers as te, createSlots as oe, createTextVNode as re } from "vue";
2
- import { propTypes as v, useDesign as ne } from "@dazhicheng/hooks";
3
- import { calcWordsWidth as le, isBoolean as ie, isFunction as se, generateTestId as M, toKebabCase as P, isArray as de, isObject as ae } from "@dazhicheng/utils";
1
+ import { defineComponent as q, useAttrs as G, ref as x, inject as _, computed as a, unref as r, toRaw as S, h as J, createElementBlock as s, openBlock as l, normalizeClass as h, createVNode as k, createBlock as c, createCommentVNode as p, withCtx as u, Fragment as f, renderList as A, renderSlot as Q, withDirectives as F, mergeProps as Z, normalizeStyle as W, toDisplayString as E, createElementVNode as ee, withModifiers as te, createSlots as oe, createTextVNode as re } from "vue";
2
+ import { propTypes as v } from "../../../../packages/hooks/src/propTypes.js";
3
+ import { useDesign as ne } from "../../../../packages/hooks/src/useDesign.js";
4
+ import "axios";
5
+ import { ElDivider as ie, ElSpace as le, ElPopover as se } from "element-plus";
6
+ import { isBoolean as de, isFunction as ae, isArray as pe, isObject as ue } from "../../../../packages/utils/src/is.js";
7
+ import { generateTestId as M, toKebabCase as P } from "../../../../packages/utils/src/testid-helper.js";
8
+ import { calcWordsWidth as ce } from "../../../../packages/utils/src/tool.js";
9
+ import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
10
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
11
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
12
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
13
+ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
14
+ import "lodash-es";
4
15
  import { TtButton as C } from "../../../tt-button/index.js";
5
16
  import { TtIcon as I } from "../../../tt-icon/index.js";
6
17
  import R from "../../../../directives/disabled-tip/index.js";
7
- import { ElDivider as ue, ElSpace as pe, ElPopover as ce } from "element-plus";
8
18
  import fe from "../../../../assets/svg/action_more.svg.js";
9
19
  import { ROW_INDEX_KEY as me } from "./RowContext.js";
10
- const ve = { key: 1 }, be = ["onClick"], Be = /* @__PURE__ */ q({
20
+ const ve = { key: 1 }, be = ["onClick"], Pe = /* @__PURE__ */ q({
11
21
  name: "TtTableAction",
12
22
  __name: "TableAction",
13
23
  props: {
@@ -59,24 +69,24 @@ const ve = { key: 1 }, be = ["onClick"], Be = /* @__PURE__ */ q({
59
69
  function $(t) {
60
70
  const o = t.ifShow;
61
71
  let e = !0;
62
- return ie(o) && (e = o), se(o) && (e = o(t)), e;
72
+ return de(o) && (e = o), ae(o) && (e = o(t)), e;
63
73
  }
64
74
  const V = a(() => (S(n.actions) || []).filter((t) => $(t)).slice(0, n.showBtnNums)), g = a(() => (S(n.actions) || []).filter((t) => $(t)).slice(n.showBtnNums)), O = a(() => r(g).length > 0), U = a(() => "left flex items-center"), K = a(() => {
65
- const t = document.getElementsByTagName("body")[0], o = window.getComputedStyle(t).fontFamily, e = g.value.map((d) => le(d.label, "12px", o) + 22), l = Math.max(...e);
66
- return l > n.popoverWidth ? l : n.popoverWidth;
75
+ const t = document.getElementsByTagName("body")[0], o = window.getComputedStyle(t).fontFamily, e = g.value.map((d) => ce(d.label, "12px", o) + 22), i = Math.max(...e);
76
+ return i > n.popoverWidth ? i : n.popoverWidth;
67
77
  });
68
78
  function N(t, o) {
69
79
  const e = t;
70
- return de(e) && e.length > 0 ? e.some((l) => !!(l != null && l.condition)) : ae(e) ? !!e.condition : !!o;
80
+ return pe(e) && e.length > 0 ? e.some((i) => !!(i != null && i.condition)) : ue(e) ? !!e.condition : !!o;
71
81
  }
72
82
  function H(t) {
73
83
  if (!n.stopButtonPropagation) return;
74
- t.composedPath().find((l) => {
84
+ t.composedPath().find((i) => {
75
85
  var d;
76
- return ((d = l.tagName) == null ? void 0 : d.toUpperCase()) === "BUTTON";
86
+ return ((d = i.tagName) == null ? void 0 : d.toUpperCase()) === "BUTTON";
77
87
  }) && t.stopPropagation();
78
88
  }
79
- const L = J(ue, {
89
+ const L = J(ie, {
80
90
  direction: "vertical",
81
91
  style: { fontSize: "12px", margin: "0 6px" }
82
92
  });
@@ -93,55 +103,55 @@ const ve = { key: 1 }, be = ["onClick"], Be = /* @__PURE__ */ q({
93
103
  return w.value;
94
104
  }
95
105
  });
96
- return (t, o) => (i(), s("div", {
106
+ return (t, o) => (l(), s("div", {
97
107
  class: h([r(B), U.value]),
98
108
  onClick: H
99
109
  }, [
100
- k(r(pe), {
110
+ k(r(le), {
101
111
  size: 0,
102
112
  spacer: r(L),
103
113
  wrap: T.wrap
104
114
  }, {
105
- default: p(() => [
106
- (i(!0), s(f, null, A(V.value, (e, l) => (i(), s(f, {
107
- key: `${l}-${e.label}`
115
+ default: u(() => [
116
+ (l(!0), s(f, null, A(V.value, (e, i) => (l(), s(f, {
117
+ key: `${i}-${e.label}`
108
118
  }, [
109
119
  e.slot ? Q(t.$slots, e.slot, Z({
110
120
  key: 0,
111
121
  ref_for: !0
112
- }, e)) : F((i(), c(r(C), {
122
+ }, e)) : F((l(), c(r(C), {
113
123
  key: 1,
114
124
  link: "",
115
125
  type: e.type || "primary",
116
126
  disabled: N(e.disabledTip, e.disabled),
117
127
  style: W({ color: e.color, visibility: e.isTextHide ? "hidden" : "visible" }),
118
128
  loading: e.loading,
119
- "data-index": l,
129
+ "data-index": i,
120
130
  "data-testid": y(e.label || ""),
121
131
  onClick: e.onClick
122
132
  }, {
123
- default: p(() => [
124
- e.iconFont ? (i(), s(f, { key: 0 }, [
125
- e.iconFont ? (i(), c(r(I), {
133
+ default: u(() => [
134
+ e.iconFont ? (l(), s(f, { key: 0 }, [
135
+ e.iconFont ? (l(), c(r(I), {
126
136
  key: 0,
127
137
  "icon-font": e.iconFont,
128
138
  class: h({ "mr-1": !!e.label })
129
- }, null, 8, ["icon-font", "class"])) : u("", !0)
130
- ], 64)) : u("", !0),
131
- e.label ? (i(), s("span", ve, E(e.label), 1)) : u("", !0)
139
+ }, null, 8, ["icon-font", "class"])) : p("", !0)
140
+ ], 64)) : p("", !0),
141
+ e.label ? (l(), s("span", ve, E(e.label), 1)) : p("", !0)
132
142
  ]),
133
143
  _: 2
134
144
  }, 1032, ["type", "disabled", "style", "loading", "data-index", "data-testid", "onClick"])), [
135
145
  [r(R), e.disabledTip]
136
146
  ])
137
147
  ], 64))), 128)),
138
- O.value ? (i(), c(r(C), {
148
+ O.value ? (l(), c(r(C), {
139
149
  key: 0,
140
150
  link: "",
141
151
  type: "primary",
142
152
  "data-testid": y("more")
143
153
  }, {
144
- default: p(() => [
154
+ default: u(() => [
145
155
  ee("span", {
146
156
  onMouseover: te(X, ["stop"]),
147
157
  onMouseleave: o[0] || (o[0] = (e) => m.value = !1)
@@ -154,11 +164,11 @@ const ve = { key: 1 }, be = ["onClick"], Be = /* @__PURE__ */ q({
154
164
  ], 32)
155
165
  ]),
156
166
  _: 1
157
- }, 8, ["data-testid"])) : u("", !0)
167
+ }, 8, ["data-testid"])) : p("", !0)
158
168
  ]),
159
169
  _: 3
160
170
  }, 8, ["spacer", "wrap"]),
161
- w.value.left ? (i(), c(r(ce), {
171
+ w.value.left ? (l(), c(r(se), {
162
172
  key: 0,
163
173
  visible: m.value,
164
174
  "onUpdate:visible": o[1] || (o[1] = (e) => m.value = e),
@@ -175,31 +185,31 @@ const ve = { key: 1 }, be = ["onClick"], Be = /* @__PURE__ */ q({
175
185
  minWidth: "60px"
176
186
  }
177
187
  }, {
178
- default: p(() => [
179
- (i(!0), s(f, null, A(g.value, (e, l) => (i(), s("div", {
180
- key: `${l}-${e.label}`,
188
+ default: u(() => [
189
+ (l(!0), s(f, null, A(g.value, (e, i) => (l(), s("div", {
190
+ key: `${i}-${e.label}`,
181
191
  onClick: () => {
182
192
  var d;
183
193
  !e.disabled && ((d = e.onClick) == null || d.call(e));
184
194
  }
185
195
  }, [
186
- F((i(), c(r(C), {
196
+ F((l(), c(r(C), {
187
197
  link: "",
188
198
  disabled: N(e.disabledTip, e.disabled),
189
199
  type: e.type || "primary",
190
200
  style: W({ color: e.color }),
191
201
  "data-testid": y(e.label || "")
192
202
  }, oe({
193
- default: p(() => [
194
- e.label ? (i(), s(f, { key: 0 }, [
203
+ default: u(() => [
204
+ e.label ? (l(), s(f, { key: 0 }, [
195
205
  re(E(e.label), 1)
196
- ], 64)) : u("", !0)
206
+ ], 64)) : p("", !0)
197
207
  ]),
198
208
  _: 2
199
209
  }, [
200
210
  e.iconFont ? {
201
211
  name: "icon",
202
- fn: p(() => [
212
+ fn: u(() => [
203
213
  k(r(I), {
204
214
  "icon-font": e.iconFont,
205
215
  class: h({ "mr-1": !!e.label })
@@ -213,10 +223,10 @@ const ve = { key: 1 }, be = ["onClick"], Be = /* @__PURE__ */ q({
213
223
  ], 8, be))), 128))
214
224
  ]),
215
225
  _: 1
216
- }, 8, ["visible", "width", "virtual-ref", "popper-class"])) : u("", !0)
226
+ }, 8, ["visible", "width", "virtual-ref", "popper-class"])) : p("", !0)
217
227
  ], 2));
218
228
  }
219
229
  });
220
230
  export {
221
- Be as default
231
+ Pe as default
222
232
  };