@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,17 +1,24 @@
1
- import { defineComponent as fe, useTemplateRef as K, computed as i, reactive as pe, markRaw as ve, toRaw as he, watch as G, nextTick as be, onUnmounted as ye, createBlock as h, createCommentVNode as m, unref as l, openBlock as u, mergeProps as N, withCtx as b, withDirectives as Ce, createVNode as w, createElementVNode as $, createElementBlock as H, normalizeClass as O, normalizeStyle as J, renderSlot as ge, normalizeProps as we, guardReactiveProps as Fe, resolveDynamicComponent as Re, createSlots as Se, renderList as ke, Transition as Ne, vShow as Oe } from "vue";
1
+ import { defineComponent as fe, useTemplateRef as K, computed as a, reactive as pe, markRaw as ve, toRaw as he, watch as G, nextTick as be, onUnmounted as ye, createBlock as h, createCommentVNode as c, unref as l, openBlock as u, mergeProps as N, withCtx as b, withDirectives as Ce, createVNode as w, createElementVNode as $, createElementBlock as H, normalizeClass as O, normalizeStyle as J, renderSlot as ge, normalizeProps as we, guardReactiveProps as Fe, resolveDynamicComponent as Re, createSlots as Se, renderList as ke, Transition as Ne, vShow as Oe } from "vue";
2
2
  import Ee from "../form/FormControl.vue.js";
3
3
  import Be from "../form/FormDescription.vue.js";
4
4
  import Pe from "../form/FormItem.vue.js";
5
- import { isString as y, isFunction as q, clnm as j, isObject as Te } from "@dazhicheng/utils";
6
- import Ve from "../form/FormMessageToolTip.vue.js";
7
- import Ie from "../form/FormMessage.vue.js";
5
+ import "axios";
6
+ import "element-plus";
7
+ import { isString as y, isFunction as q, isObject as Te } from "../../../../packages/utils/src/is.js";
8
+ import { clnm as j } 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 { set as Ve, get as Ie } from "lodash-es";
15
+ import Le from "../form/FormMessageToolTip.vue.js";
16
+ import $e from "../form/FormMessage.vue.js";
8
17
  import "../../../tt-icon/index.js";
9
18
  import "@vueuse/core";
10
- import "element-plus";
11
- import { useFormValues as Le, useFieldError as $e, Field as qe } from "vee-validate";
19
+ import { useFormValues as qe, useFieldError as je, Field as Me } from "vee-validate";
12
20
  /* empty css */
13
21
  import E from "../form/RenderContent.vue.js";
14
- import { set as je, get as Me } from "lodash-es";
15
22
  import { toTypedSchema as Ue } from "@vee-validate/zod";
16
23
  import { injectComponentRefMap as De } from "../useFormContext.js";
17
24
  import { useFormContext as We, injectRenderFormProps as ze } from "./context.js";
@@ -22,7 +29,7 @@ import { isEventObjectLike as Q } from "./helper.js";
22
29
  const Ge = { class: "flex-auto overflow-hidden" }, He = {
23
30
  key: 0,
24
31
  class: "ml-1"
25
- }, hn = /* @__PURE__ */ fe({
32
+ }, Rn = /* @__PURE__ */ fe({
26
33
  __name: "FormField",
27
34
  props: {
28
35
  component: {},
@@ -59,7 +66,7 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
59
66
  commonComponentProps: {}
60
67
  },
61
68
  setup(n) {
62
- const B = K("wrapperRef"), { componentBindEventMap: X, componentMap: Y, isVertical: C } = We(), M = ze(), k = Le(), Z = $e(n.fieldName), f = K("fieldComponentRef"), F = M.form, R = i(() => M.compact), S = i(() => {
69
+ const B = K("wrapperRef"), { componentBindEventMap: X, componentMap: Y, isVertical: C } = We(), M = ze(), k = qe(), Z = je(n.fieldName), f = K("fieldComponentRef"), F = M.form, R = a(() => M.compact), S = a(() => {
63
70
  var e;
64
71
  return ((e = Z.value) == null ? void 0 : e.length) > 0;
65
72
  }), P = pe(
@@ -70,7 +77,7 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
70
77
  * @returns 当前表单值
71
78
  */
72
79
  get(e, t) {
73
- return Me(k.value, t);
80
+ return Ie(k.value, t);
74
81
  },
75
82
  /**
76
83
  * @param _target 代理目标
@@ -79,21 +86,21 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
79
86
  * @returns 是否设置成功
80
87
  */
81
88
  set(e, t, o) {
82
- return je(k.value, t, o), F == null || F.validateField(t), !0;
89
+ return Ve(k.value, t, o), F == null || F.validateField(t), !0;
83
90
  }
84
91
  })
85
- ), _ = i(() => {
92
+ ), _ = a(() => {
86
93
  const e = y(n.component) ? Y.value[n.component] : n.component;
87
94
  return ve(he(e));
88
95
  }), { dynamicComponentProps: ee, dynamicRules: ne, isDisabled: te, isIf: U, isRequired: T, isShow: D } = xe(
89
96
  () => n.dependencies
90
- ), oe = i(() => {
97
+ ), oe = a(() => {
91
98
  var e;
92
99
  return (e = n.labelClass) != null && e.includes("w-") || C.value ? {} : {
93
100
  width: `${n.labelWidth}px`
94
101
  };
95
- }), s = i(() => ne.value || n.rules), W = i(() => !n.hide && U.value && D.value), V = i(() => {
96
- var o, a, d;
102
+ }), s = a(() => ne.value || n.rules), W = a(() => !n.hide && U.value && D.value), V = a(() => {
103
+ var o, i, d;
97
104
  if (!W.value)
98
105
  return !1;
99
106
  if (!s.value)
@@ -102,14 +109,14 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
102
109
  return !0;
103
110
  if (y(s.value))
104
111
  return ["required", "selectRequired"].includes(s.value);
105
- let e = (a = (o = s == null ? void 0 : s.value) == null ? void 0 : o.isOptional) == null ? void 0 : a.call(o);
112
+ let e = (i = (o = s == null ? void 0 : s.value) == null ? void 0 : o.isOptional) == null ? void 0 : i.call(o);
106
113
  const t = s.value.def;
107
114
  if ((t == null ? void 0 : t.type) === "default" && "innerType" in t) {
108
115
  const v = t.innerType;
109
116
  v && (e = (d = v.isOptional) == null ? void 0 : d.call(v));
110
117
  }
111
118
  return !e;
112
- }), le = i(() => {
119
+ }), le = a(() => {
113
120
  var o;
114
121
  if (!W.value)
115
122
  return null;
@@ -119,19 +126,19 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
119
126
  if (y(e))
120
127
  return e;
121
128
  if (!!V.value) {
122
- const a = (o = e == null ? void 0 : e.unwrap) == null ? void 0 : o.call(e);
123
- a && (e = a);
129
+ const i = (o = e == null ? void 0 : e.unwrap) == null ? void 0 : o.call(e);
130
+ i && (e = i);
124
131
  }
125
132
  return Ue(e);
126
- }), r = i(() => {
133
+ }), r = a(() => {
127
134
  const e = q(n.componentProps) ? n.componentProps(k.value, F) : n.componentProps;
128
135
  return {
129
136
  ...n.commonComponentProps,
130
137
  ...e,
131
138
  ...ee.value
132
139
  };
133
- }), { selectComponentProps: ae } = Ke(
134
- i(() => ({
140
+ }), { selectComponentProps: ie } = Ke(
141
+ a(() => ({
135
142
  componentProps: r,
136
143
  component: n.component,
137
144
  selectWrapRef: B,
@@ -145,15 +152,15 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
145
152
  },
146
153
  (e) => {
147
154
  e === !0 && be(() => {
148
- ce();
155
+ me();
149
156
  });
150
157
  },
151
158
  { immediate: !0 }
152
159
  );
153
- const I = i(() => {
160
+ const I = a(() => {
154
161
  var e;
155
162
  return te.value || n.disabled || ((e = r.value) == null ? void 0 : e.disabled);
156
- }), z = i(() => q(n.renderComponentContent) ? n.renderComponentContent(k.value, F) : {}), ie = i(() => Object.keys(z.value)), re = i(() => {
163
+ }), z = a(() => q(n.renderComponentContent) ? n.renderComponentContent(k.value, F) : {}), ae = a(() => Object.keys(z.value)), re = a(() => {
157
164
  const e = le.value;
158
165
  return {
159
166
  keepValue: !0,
@@ -164,22 +171,22 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
164
171
  });
165
172
  function ue(e) {
166
173
  var v;
167
- const t = e.componentField.modelValue, o = e.componentField["onUpdate:modelValue"], a = n.modelPropName || (y(n.component) ? (v = X.value) == null ? void 0 : v[n.component] : null);
174
+ const t = e.componentField.modelValue, o = e.componentField["onUpdate:modelValue"], i = n.modelPropName || (y(n.component) ? (v = X.value) == null ? void 0 : v[n.component] : null);
168
175
  let d = t;
169
- if (t && Te(t) && a) {
170
- const c = t.target;
171
- d = Q(t) ? c == null ? void 0 : c[a] : (t == null ? void 0 : t[a]) ?? t;
176
+ if (t && Te(t) && i) {
177
+ const m = t.target;
178
+ d = Q(t) ? m == null ? void 0 : m[i] : (t == null ? void 0 : t[i]) ?? t;
172
179
  }
173
- return a ? {
174
- [`onUpdate:${a}`]: o,
175
- [a]: d === void 0 ? n.emptyStateValue : d,
176
- onChange: n.disabledOnChangeListener ? void 0 : (c) => {
180
+ return i ? {
181
+ [`onUpdate:${i}`]: o,
182
+ [i]: d === void 0 ? n.emptyStateValue : d,
183
+ onChange: n.disabledOnChangeListener ? void 0 : (m) => {
177
184
  var A;
178
- const me = Q(c), g = (A = e == null ? void 0 : e.componentField) == null ? void 0 : A.onChange;
179
- if (!me)
180
- return g == null ? void 0 : g(c);
181
- const L = c.target;
182
- return g == null ? void 0 : g((L == null ? void 0 : L[a]) ?? c);
185
+ const ce = Q(m), g = (A = e == null ? void 0 : e.componentField) == null ? void 0 : A.onChange;
186
+ if (!ce)
187
+ return g == null ? void 0 : g(m);
188
+ const L = m.target;
189
+ return g == null ? void 0 : g((L == null ? void 0 : L[i]) ?? m);
183
190
  },
184
191
  ...n.disabledOnInputListener ? { onInput: void 0 } : {}
185
192
  } : {
@@ -192,14 +199,14 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
192
199
  const t = ue(e), o = {
193
200
  ...e.componentField,
194
201
  ...r.value,
195
- ...ae.value,
202
+ ...ie.value,
196
203
  ...t,
197
204
  ...Reflect.has(r.value, "onChange") ? { onChange: r.value.onChange } : {},
198
205
  ...Reflect.has(r.value, "onInput") ? { onInput: r.value.onInput } : {}
199
206
  };
200
207
  return Reflect.has(r.value, "name") || delete o.name, y(n.component) && se.has(n.component) && o.modelValue === void 0 && (o.modelValue = !1), y(n.component) && de.has(n.component) && (o.controls = !1, o.align = "left"), o;
201
208
  }
202
- function ce() {
209
+ function me() {
203
210
  var e, t;
204
211
  f.value && q(f.value.focus) && // 检查当前是否有元素被聚焦
205
212
  document.activeElement !== f.value && ((t = (e = f.value) == null ? void 0 : e.focus) == null || t.call(e));
@@ -209,7 +216,7 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
209
216
  p == null || p.set(n.fieldName, e);
210
217
  }), ye(() => {
211
218
  p != null && p.has(n.fieldName) && p.delete(n.fieldName);
212
- }), (e, t) => !e.hide && l(U) ? (u(), h(l(qe), N({ key: 0 }, re.value, { name: e.fieldName }), {
219
+ }), (e, t) => !e.hide && l(U) ? (u(), h(l(Me), N({ key: 0 }, re.value, { name: e.fieldName }), {
213
220
  default: b((o) => [
214
221
  Ce(w(l(Pe), N({
215
222
  class: [{
@@ -223,7 +230,7 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
223
230
  $("div", {
224
231
  class: O([{ "flex-col": l(C), "flex-row items-center": !l(C) }, "flex"])
225
232
  }, [
226
- e.hideLabel ? m("", !0) : (u(), h(Ae, {
233
+ e.hideLabel ? c("", !0) : (u(), h(Ae, {
227
234
  key: 0,
228
235
  class: O(
229
236
  l(j)(
@@ -249,7 +256,7 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
249
256
  e.label ? (u(), h(l(E), {
250
257
  key: 0,
251
258
  content: e.label
252
- }, null, 8, ["content"])) : m("", !0)
259
+ }, null, 8, ["content"])) : c("", !0)
253
260
  ]),
254
261
  _: 1
255
262
  }, 8, ["class", "help", "colon", "label", "required", "style", "tool-tip", "help-trigger", "form", "tool-tip-text"])),
@@ -284,11 +291,11 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
284
291
  form: P,
285
292
  fieldName: e.fieldName
286
293
  }, { disabled: I.value }), Se({ _: 2 }, [
287
- ke(ie.value, (a) => ({
288
- name: a,
294
+ ke(ae.value, (i) => ({
295
+ name: i,
289
296
  fn: b((d) => [
290
297
  w(l(E), N({
291
- content: z.value[a]
298
+ content: z.value[i]
292
299
  }, { ...d, formContext: o }), null, 16, ["content"])
293
300
  ])
294
301
  }))
@@ -299,11 +306,11 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
299
306
  }, 1032, ["class"]),
300
307
  e.suffix ? (u(), H("div", He, [
301
308
  w(l(E), { content: e.suffix }, null, 8, ["content"])
302
- ])) : m("", !0),
303
- R.value && S.value ? (u(), h(l(Ve), {
309
+ ])) : c("", !0),
310
+ R.value && S.value ? (u(), h(l(Le), {
304
311
  key: 1,
305
312
  "ref-dom": B.value
306
- }, null, 8, ["ref-dom"])) : m("", !0)
313
+ }, null, 8, ["ref-dom"])) : c("", !0)
307
314
  ], 2)
308
315
  ])
309
316
  ], 2),
@@ -319,17 +326,17 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
319
326
  w(l(E), { content: e.description }, null, 8, ["content"])
320
327
  ]),
321
328
  _: 1
322
- })) : m("", !0),
323
- R.value ? m("", !0) : (u(), h(Ne, {
329
+ })) : c("", !0),
330
+ R.value ? c("", !0) : (u(), h(Ne, {
324
331
  key: 1,
325
332
  name: "slide-up"
326
333
  }, {
327
334
  default: b(() => [
328
- w(l(Ie), { class: "absolute" })
335
+ w(l($e), { class: "absolute" })
329
336
  ]),
330
337
  _: 1
331
338
  }))
332
- ], 4)) : m("", !0)
339
+ ], 4)) : c("", !0)
333
340
  ]),
334
341
  _: 2
335
342
  }, 1040, ["class"]), [
@@ -337,9 +344,9 @@ const Ge = { class: "flex-auto overflow-hidden" }, He = {
337
344
  ])
338
345
  ]),
339
346
  _: 3
340
- }, 16, ["name"])) : m("", !0);
347
+ }, 16, ["name"])) : c("", !0);
341
348
  }
342
349
  });
343
350
  export {
344
- hn as default
351
+ Rn as default
345
352
  };
@@ -1,23 +1,31 @@
1
- import { defineComponent as h, createBlock as l, openBlock as t, unref as o, normalizeClass as g, withCtx as r, createElementBlock as s, createCommentVNode as i, Fragment as m, createElementVNode as u, toDisplayString as f, createVNode as a, normalizeProps as b, mergeProps as k, createTextVNode as y } from "vue";
1
+ import { defineComponent as h, createBlock as r, openBlock as t, unref as o, normalizeClass as g, withCtx as l, createElementBlock as i, createCommentVNode as p, Fragment as c, createElementVNode as u, toDisplayString as f, createVNode as m, normalizeProps as b, mergeProps as k, createTextVNode as y } from "vue";
2
2
  import _ from "../../../../assets/svg/help.svg.js";
3
3
  import { TtIcon as v } from "../../../tt-icon/index.js";
4
4
  import { TtText as x } from "../../../tt-text/index.js";
5
- import { isObject as B, isFunction as C, clnm as V } from "@dazhicheng/utils";
5
+ import "axios";
6
6
  import { ElTooltip as d } from "element-plus";
7
+ import { isObject as B, isFunction as C } from "../../../../packages/utils/src/is.js";
8
+ import { clnm as V } 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";
7
15
  import "../components/Slot.js";
8
16
  import "vee-validate";
9
17
  import z from "../form/FormLabel.vue.js";
10
18
  import "../../../tt-form-item-error-tooltip/index.js";
11
19
  import "@vueuse/core";
12
20
  /* empty css */
13
- import p from "../form/RenderContent.vue.js";
21
+ import s from "../form/RenderContent.vue.js";
14
22
  const N = {
15
23
  key: 0,
16
24
  class: "mr-[2px] text-destructive color-var(--el-color-error)"
17
25
  }, E = { class: "flex items-center" }, F = { key: 0 }, q = { class: "flex items-center" }, L = {
18
26
  key: 3,
19
27
  class: "ml-[2px]"
20
- }, Q = /* @__PURE__ */ h({
28
+ }, oe = /* @__PURE__ */ h({
21
29
  __name: "FormLabel",
22
30
  props: {
23
31
  class: {},
@@ -32,55 +40,55 @@ const N = {
32
40
  toolTipText: {}
33
41
  },
34
42
  setup(T) {
35
- const n = T, c = (B(n.label) || C(n.label)) && n.label !== null;
36
- return (e, P) => (t(), l(o(z), {
43
+ const n = T, a = (B(n.label) || C(n.label)) && n.label !== null;
44
+ return (e, P) => (t(), r(o(z), {
37
45
  class: g(o(V)("flex items-center text-var(--el-font-size-base)", n.class))
38
46
  }, {
39
- default: r(() => [
40
- e.required ? (t(), s("span", N, "*")) : i("", !0),
41
- e.label ? (t(), s(m, { key: 1 }, [
42
- e.toolTipText ? (t(), l(o(d), {
47
+ default: l(() => [
48
+ e.required ? (t(), i("span", N, "*")) : p("", !0),
49
+ e.label ? (t(), i(c, { key: 1 }, [
50
+ e.toolTipText ? (t(), r(o(d), {
43
51
  key: 0,
44
52
  "popper-class": "mx-1",
45
53
  placement: "top",
46
54
  trigger: "hover"
47
55
  }, {
48
- content: r(() => [
49
- a(o(p), { content: e.toolTipText }, null, 8, ["content"])
56
+ content: l(() => [
57
+ m(o(s), { content: e.toolTipText }, null, 8, ["content"])
50
58
  ]),
51
- default: r(() => [
59
+ default: l(() => [
52
60
  u("div", E, [
53
- o(c) ? (t(), l(o(p), {
61
+ o(a) ? (t(), r(o(s), {
54
62
  key: 1,
55
63
  content: e.label
56
- }, null, 8, ["content"])) : (t(), s("div", F, f(e.label), 1))
64
+ }, null, 8, ["content"])) : (t(), i("div", F, f(e.label), 1))
57
65
  ])
58
66
  ]),
59
67
  _: 1
60
- })) : (t(), s(m, { key: 1 }, [
61
- o(c) ? (t(), l(o(p), {
68
+ })) : (t(), i(c, { key: 1 }, [
69
+ o(a) ? (t(), r(o(s), {
62
70
  key: 1,
63
71
  content: e.label
64
- }, null, 8, ["content"])) : (t(), l(o(x), b(k({ key: 0 }, n.toolTip)), {
65
- default: r(() => [
72
+ }, null, 8, ["content"])) : (t(), r(o(x), b(k({ key: 0 }, n.toolTip)), {
73
+ default: l(() => [
66
74
  y(f(e.label), 1)
67
75
  ]),
68
76
  _: 1
69
77
  }, 16))
70
78
  ], 64))
71
- ], 64)) : i("", !0),
72
- e.help ? (t(), l(o(d), {
79
+ ], 64)) : p("", !0),
80
+ e.help ? (t(), r(o(d), {
73
81
  key: 2,
74
82
  "popper-class": "mx-1",
75
83
  placement: "top",
76
84
  trigger: e.helpTrigger
77
85
  }, {
78
- content: r(() => [
79
- a(o(p), { content: e.help }, null, 8, ["content"])
86
+ content: l(() => [
87
+ m(o(s), { content: e.help }, null, 8, ["content"])
80
88
  ]),
81
- default: r(() => [
89
+ default: l(() => [
82
90
  u("div", q, [
83
- a(o(v), {
91
+ m(o(v), {
84
92
  class: "ml-[4px] cursor-pointer",
85
93
  size: 14,
86
94
  "is-custom-svg": "",
@@ -89,13 +97,13 @@ const N = {
89
97
  ])
90
98
  ]),
91
99
  _: 1
92
- }, 8, ["trigger"])) : i("", !0),
93
- e.colon && e.label ? (t(), s("span", L, ":")) : i("", !0)
100
+ }, 8, ["trigger"])) : p("", !0),
101
+ e.colon && e.label ? (t(), i("span", L, ":")) : p("", !0)
94
102
  ]),
95
103
  _: 1
96
104
  }, 8, ["class"]));
97
105
  }
98
106
  });
99
107
  export {
100
- Q as default
108
+ oe as default
101
109
  };
@@ -1,5 +1,13 @@
1
- import { defineComponent as M, computed as h, unref as C, reactive as T, onMounted as Y, onUnmounted as z, createVNode as N, toValue as b, Fragment as B, mergeProps as G, isVNode as U } from "vue";
2
- import { clnm as W } from "@dazhicheng/utils";
1
+ import { defineComponent as M, computed as h, unref as C, reactive as T, onMounted as Y, onUnmounted as z, createVNode as P, toValue as b, Fragment as B, mergeProps as G, isVNode as U } from "vue";
2
+ import "axios";
3
+ import "element-plus";
4
+ import "dayjs";
5
+ import { clnm as W } 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";
3
11
  import { set as q, get as J, omit as Q } from "lodash-es";
4
12
  import { useFormValues as X } from "vee-validate";
5
13
  import { useArrayRegistry as Z } from "../../hooks/useArrayRegistry.js";
@@ -7,32 +15,32 @@ import { useFieldArray as ee } from "../../hooks/useFieldArray.js";
7
15
  import { injectFormProps as re, resolveArraySchemasForRuntime as ae, createArraySchemaContext as te } from "../../useFormContext.js";
8
16
  import { normalizeArrayFieldPath as I } from "../../utils/array-path.js";
9
17
  import { injectRenderFormProps as ne } from "../context.js";
10
- import le from "../dependencies.js";
11
- import { FieldRenderer as ie } from "../FormFieldContact.js";
12
- import { formArrayRegisterProps as oe } from "./props.js";
13
- import { getMergedDisabled as de, resolveArrayItemState as x } from "./utils.js";
14
- function me(r) {
18
+ import ie from "../dependencies.js";
19
+ import { FieldRenderer as oe } from "../FormFieldContact.js";
20
+ import { formArrayRegisterProps as le } from "./props.js";
21
+ import { getMergedDisabled as me, resolveArrayItemState as x } from "./utils.js";
22
+ function de(r) {
15
23
  return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !U(r);
16
24
  }
17
25
  const ue = ["fieldName", "arraySchema", "useArraySchema", "useFieldArray", "rules", "formItemClass", "wrapperClass", "defaultValue", "hide", "disabled", "dependencies"], se = /* @__PURE__ */ M({
18
26
  name: "FormArrayRegister",
19
- props: oe,
27
+ props: le,
20
28
  setup(r, {
21
- slots: i,
29
+ slots: o,
22
30
  attrs: D
23
31
  }) {
24
- const o = ee(() => r.fieldName), [O, _] = Z(r.fieldName, r), y = X(), p = ne().form, [j] = re(), $ = h(() => {
32
+ const l = ee(() => r.fieldName), [O, _] = Z(r.fieldName, r), y = X(), N = ne().form, [j] = re(), $ = h(() => {
25
33
  var e;
26
34
  return (e = C(j)) == null ? void 0 : e.formApi;
27
35
  }), v = h(() => {
28
36
  var e;
29
37
  return (e = $.value) == null ? void 0 : e.arrayAction;
30
- }), A = T(new Proxy(y.value, {
38
+ }), p = T(new Proxy(y.value, {
31
39
  get(e, a) {
32
40
  return J(y.value, a);
33
41
  },
34
42
  set(e, a, t) {
35
- return q(y.value, a, t), p == null || p.validateField(String(a)), !0;
43
+ return q(y.value, a, t), N == null || N.validateField(String(a)), !0;
36
44
  },
37
45
  ownKeys() {
38
46
  return Reflect.ownKeys(y.value);
@@ -45,12 +53,12 @@ const ue = ["fieldName", "arraySchema", "useArraySchema", "useFieldArray", "rule
45
53
  isDisabled: R,
46
54
  isIf: H,
47
55
  isShow: L
48
- } = le(() => r.dependencies), w = h(() => Q(D, ue)), g = h(() => I(r.fieldName)), P = h(() => {
56
+ } = ie(() => r.dependencies), w = h(() => Q(D, ue)), g = h(() => I(r.fieldName)), A = h(() => {
49
57
  var e;
50
58
  return (e = v.value) == null ? void 0 : e.at(g.value);
51
59
  });
52
60
  Y(() => {
53
- O(o);
61
+ O(l);
54
62
  }), z(_);
55
63
  function V(e) {
56
64
  var n;
@@ -58,46 +66,46 @@ const ue = ["fieldName", "arraySchema", "useArraySchema", "useFieldArray", "rule
58
66
  entry: a,
59
67
  index: t,
60
68
  itemFieldName: s,
61
- parentItemPath: d
69
+ parentItemPath: m
62
70
  } = e;
63
71
  return te({
64
72
  arrayPath: g.value,
65
73
  itemPath: I(s),
66
74
  index: t,
67
75
  row: a.value,
68
- arrayLength: ((n = b(o.fields)) == null ? void 0 : n.length) ?? 0,
69
- parentItemPath: d,
70
- form: A,
76
+ arrayLength: ((n = b(l.fields)) == null ? void 0 : n.length) ?? 0,
77
+ parentItemPath: m,
78
+ form: p,
71
79
  arrayAction: v.value,
72
- arrayHandle: P.value
80
+ arrayHandle: A.value
73
81
  });
74
82
  }
75
83
  function k(e, a) {
76
84
  const {
77
85
  entry: t,
78
86
  index: s,
79
- itemFieldName: d,
87
+ itemFieldName: m,
80
88
  parentItemPath: n
81
- } = a, m = `${d}.${e.fieldName}`;
89
+ } = a, d = `${m}.${e.fieldName}`;
82
90
  if (e.useArraySchema) {
83
- const l = x(e, {
91
+ const i = x(e, {
84
92
  dynamicRules: F.value,
85
93
  dynamicDisabled: R.value,
86
94
  props: r
87
95
  }), u = {
88
96
  ...w.value,
89
97
  ...e,
90
- fieldName: m,
91
- rules: l.rules,
92
- disabled: l.disabled,
93
- formItemClass: l.formItemClass,
98
+ fieldName: d,
99
+ rules: i.rules,
100
+ disabled: i.disabled,
101
+ formItemClass: i.formItemClass,
94
102
  virtual: r.virtual,
95
103
  arraySchema: e.arraySchema
96
104
  };
97
- return N(se, G({
98
- key: m
99
- }, u), me(i) ? i : {
100
- default: () => [i]
105
+ return P(se, G({
106
+ key: d
107
+ }, u), de(o) ? o : {
108
+ default: () => [o]
101
109
  });
102
110
  }
103
111
  const c = x(e, {
@@ -107,60 +115,60 @@ const ue = ["fieldName", "arraySchema", "useArraySchema", "useFieldArray", "rule
107
115
  }), S = {
108
116
  ...w.value,
109
117
  ...e,
110
- fieldName: m,
118
+ fieldName: d,
111
119
  rules: c.rules,
112
120
  disabled: c.disabled,
113
121
  formItemClass: c.formItemClass
114
122
  };
115
- return N(ie, {
116
- key: `${t.key}-${m}`,
123
+ return P(oe, {
124
+ key: `${t.key}-${d}`,
117
125
  fieldConfig: S,
118
126
  rules: S.rules,
119
127
  virtual: r.virtual
120
128
  }, {
121
- default: (l) => {
129
+ default: (i) => {
122
130
  var u, f;
123
- return (f = i[e.fieldName]) == null ? void 0 : f.call(i, {
124
- ...l,
125
- action: o,
131
+ return (f = o[e.fieldName]) == null ? void 0 : f.call(o, {
132
+ ...i,
133
+ action: l,
126
134
  entry: t,
127
135
  index: s,
128
- fieldName: d,
129
- form: A,
136
+ fieldName: m,
137
+ form: p,
130
138
  arrayPath: g.value,
131
- arrayHandle: P.value,
139
+ arrayHandle: A.value,
132
140
  arrayAction: v.value,
133
141
  parentItemPath: n,
134
- arrayLength: ((u = b(o.fields)) == null ? void 0 : u.length) ?? 0
142
+ arrayLength: ((u = b(l.fields)) == null ? void 0 : u.length) ?? 0
135
143
  });
136
144
  }
137
145
  });
138
146
  }
139
147
  function E(e, a) {
140
148
  var u;
141
- const t = `${r.fieldName}[${a}]`, s = i[r.fieldName], d = r.fieldName.lastIndexOf("."), n = d !== -1 ? r.fieldName.slice(0, d) : void 0;
149
+ const t = `${r.fieldName}[${a}]`, s = o[r.fieldName], m = r.fieldName.lastIndexOf("."), n = m !== -1 ? r.fieldName.slice(0, m) : void 0;
142
150
  if (s) {
143
- const f = de(R.value, void 0, r.disabled);
151
+ const f = me(R.value, void 0, r.disabled);
144
152
  return s({
145
- action: o,
153
+ action: l,
146
154
  entry: e,
147
155
  index: a,
148
156
  fieldName: t,
149
157
  disabled: f,
150
- form: A,
158
+ form: p,
151
159
  arrayPath: g.value,
152
- arrayHandle: P.value,
160
+ arrayHandle: A.value,
153
161
  arrayAction: v.value,
154
162
  parentItemPath: n,
155
- arrayLength: ((u = b(o.fields)) == null ? void 0 : u.length) ?? 0
163
+ arrayLength: ((u = b(l.fields)) == null ? void 0 : u.length) ?? 0
156
164
  });
157
165
  }
158
- const m = {
166
+ const d = {
159
167
  entry: e,
160
168
  index: a,
161
169
  itemFieldName: t,
162
170
  parentItemPath: n
163
- }, c = V(m), l = ae({
171
+ }, c = V(d), i = ae({
164
172
  item: r,
165
173
  arrayPath: g.value,
166
174
  itemPath: c.itemPath,
@@ -168,21 +176,21 @@ const ue = ["fieldName", "arraySchema", "useArraySchema", "useFieldArray", "rule
168
176
  row: e.value,
169
177
  arrayLength: c.arrayLength,
170
178
  parentItemPath: n,
171
- form: A,
179
+ form: p,
172
180
  arrayAction: v.value,
173
- arrayHandle: P.value
174
- }).map((f) => k(f, m));
175
- return l.length ? N(B, {
181
+ arrayHandle: A.value
182
+ }).map((f) => k(f, d));
183
+ return i.length ? P(B, {
176
184
  key: e.key
177
- }, [l]) : null;
185
+ }, [i]) : null;
178
186
  }
179
187
  function K(e) {
180
188
  return e.some(Boolean) ? r.wrapperClass : void 0;
181
189
  }
182
190
  return () => {
183
191
  if (r.hide || !H.value) return null;
184
- const a = (C(o.fields) ?? []).map(E);
185
- return N("div", {
192
+ const a = (C(l.fields) ?? []).map(E);
193
+ return P("div", {
186
194
  class: W("grid col-span-full", {
187
195
  hidden: !L.value
188
196
  }, K(a))