@dazhicheng/ui 1.5.199 → 1.5.201

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 (242) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  2. package/dist/api/dataTypeContext.js +17 -0
  3. package/dist/assets/img/empty_images/no_data.png.js +4 -0
  4. package/dist/assets/img/empty_images/search.png.js +4 -0
  5. package/dist/assets/img/image_status/develop.png.js +4 -0
  6. package/dist/assets/img/image_status/loading.gif.js +4 -0
  7. package/dist/assets/img/image_status/loading_fail.png.js +4 -0
  8. package/dist/assets/img/image_status/no_network.png.js +4 -0
  9. package/dist/assets/img/image_status/no_permission.png.js +4 -0
  10. package/dist/assets/svg/action_more.svg.js +4 -0
  11. package/dist/assets/svg/close.svg.js +4 -0
  12. package/dist/assets/svg/item_error.svg.js +4 -0
  13. package/dist/assets/svg/paixu-jiangxu.svg.js +4 -0
  14. package/dist/assets/svg/paixu-moren.svg.js +4 -0
  15. package/dist/assets/svg/paixu-shengxu.svg.js +4 -0
  16. package/dist/assets/svg/quanping.svg.js +4 -0
  17. package/dist/assets/svg/suoxiao.svg.js +4 -0
  18. package/dist/components/tt-api-component/index.js +7 -0
  19. package/dist/components/tt-api-component/index.vue.js +7 -0
  20. package/dist/components/tt-api-component/index.vue2.js +199 -0
  21. package/dist/components/tt-area/TtArea.vue.js +7 -0
  22. package/dist/components/tt-area/TtArea.vue2.js +36 -0
  23. package/dist/components/tt-button/components/AddButton.vue.js +24 -0
  24. package/dist/components/tt-button/components/AddButton.vue2.js +4 -0
  25. package/dist/components/tt-button/index.js +9 -0
  26. package/dist/components/tt-button/index.vue.js +7 -0
  27. package/dist/components/tt-button/index.vue2.js +68 -0
  28. package/dist/components/tt-checkbox/index.js +7 -0
  29. package/dist/components/tt-checkbox/index.vue.js +77 -0
  30. package/dist/components/tt-checkbox/index.vue2.js +4 -0
  31. package/dist/components/tt-drawer/index.js +14 -0
  32. package/dist/components/tt-drawer/src/RenderDrawer.vue.js +156 -0
  33. package/dist/components/tt-drawer/src/RenderDrawer.vue3.js +5 -0
  34. package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +56 -0
  35. package/dist/components/tt-drawer/src/components/DrawerFooter.vue3.js +5 -0
  36. package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +7 -0
  37. package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +21 -0
  38. package/dist/components/tt-drawer/src/hooks/useDrawerRender.js +124 -0
  39. package/dist/components/tt-drawer/src/hooks/useResizable.js +98 -0
  40. package/dist/components/tt-drawer/src/index.js +17 -0
  41. package/dist/components/tt-drawer/src/props.js +72 -0
  42. package/dist/components/tt-drawer/src/utils/drawer-api.js +191 -0
  43. package/dist/components/tt-empty/index.js +34 -0
  44. package/dist/components/tt-form/index.js +65 -0
  45. package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +38 -0
  46. package/dist/components/tt-form/src/components/ExpandableArrow.vue3.js +5 -0
  47. package/dist/components/tt-form/src/components/FormActions.vue2.js +177 -0
  48. package/dist/components/tt-form/src/components/FormActions.vue3.js +5 -0
  49. package/dist/components/tt-form/src/components/FormElInput.vue.js +80 -0
  50. package/dist/components/tt-form/src/components/FormElInput.vue2.js +4 -0
  51. package/dist/components/tt-form/src/components/Slot.js +28 -0
  52. package/dist/components/tt-form/src/config.js +57 -0
  53. package/dist/components/tt-form/src/form/FormControl.vue.js +16 -0
  54. package/dist/components/tt-form/src/form/FormControl.vue2.js +4 -0
  55. package/dist/components/tt-form/src/form/FormDescription.vue.js +21 -0
  56. package/dist/components/tt-form/src/form/FormDescription.vue2.js +4 -0
  57. package/dist/components/tt-form/src/form/FormItem.vue.js +20 -0
  58. package/dist/components/tt-form/src/form/FormItem.vue2.js +4 -0
  59. package/dist/components/tt-form/src/form/FormLabel.vue.js +19 -0
  60. package/dist/components/tt-form/src/form/FormLabel.vue2.js +4 -0
  61. package/dist/components/tt-form/src/form/FormMessage.vue.js +18 -0
  62. package/dist/components/tt-form/src/form/FormMessage.vue2.js +4 -0
  63. package/dist/components/tt-form/src/form/FormMessageToolTip.vue.js +30 -0
  64. package/dist/components/tt-form/src/form/FormMessageToolTip.vue2.js +4 -0
  65. package/dist/components/tt-form/src/form/RenderContent.vue.js +31 -0
  66. package/dist/components/tt-form/src/form/RenderContent.vue2.js +4 -0
  67. package/dist/components/tt-form/src/form/injectionKeys.js +4 -0
  68. package/dist/components/tt-form/src/form/useFormField.js +24 -0
  69. package/dist/components/tt-form/src/form-render/FormField.vue.js +4 -0
  70. package/dist/components/tt-form/src/form-render/FormField.vue2.js +346 -0
  71. package/dist/components/tt-form/src/form-render/FormFieldContact.js +54 -0
  72. package/dist/components/tt-form/src/form-render/FormLabel.vue.js +4 -0
  73. package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +102 -0
  74. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +195 -0
  75. package/dist/components/tt-form/src/form-render/array-register/props.js +47 -0
  76. package/dist/components/tt-form/src/form-render/array-register/utils.js +12 -0
  77. package/dist/components/tt-form/src/form-render/context.js +15 -0
  78. package/dist/components/tt-form/src/form-render/dependencies.js +51 -0
  79. package/dist/components/tt-form/src/form-render/expandable.js +46 -0
  80. package/dist/components/tt-form/src/form-render/form.vue2.js +197 -0
  81. package/dist/components/tt-form/src/form-render/form.vue3.js +5 -0
  82. package/dist/components/tt-form/src/form-render/helper.js +22 -0
  83. package/dist/components/tt-form/src/form-render/rootWrapperClass.js +10 -0
  84. package/dist/components/tt-form/src/formApi.js +790 -0
  85. package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +223 -0
  86. package/dist/components/tt-form/src/group-form/GroupForm.vue3.js +5 -0
  87. package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +278 -0
  88. package/dist/components/tt-form/src/group-form/GroupSection.vue3.js +5 -0
  89. package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +153 -0
  90. package/dist/components/tt-form/src/group-form/LazyFormField.vue3.js +5 -0
  91. package/dist/components/tt-form/src/group-form/groupFormApi.js +700 -0
  92. package/dist/components/tt-form/src/group-form/lazyContext.js +38 -0
  93. package/dist/components/tt-form/src/group-form/useGroupForm.js +83 -0
  94. package/dist/components/tt-form/src/group-form/utils.js +106 -0
  95. package/dist/components/tt-form/src/hooks/useArrayRegistry.js +22 -0
  96. package/dist/components/tt-form/src/hooks/useFieldArray.js +137 -0
  97. package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +33 -0
  98. package/dist/components/tt-form/src/hooks/useSelectCollapse.js +81 -0
  99. package/dist/components/tt-form/src/index.vue2.js +149 -0
  100. package/dist/components/tt-form/src/index.vue3.js +5 -0
  101. package/dist/components/tt-form/src/shared/createContext.js +14 -0
  102. package/dist/components/tt-form/src/shared/global-state.js +22 -0
  103. package/dist/components/tt-form/src/shared/zod-defaults.js +47 -0
  104. package/dist/components/tt-form/src/types/forms.js +6 -0
  105. package/dist/components/tt-form/src/useForm.js +28 -0
  106. package/dist/components/tt-form/src/useFormContext.js +320 -0
  107. package/dist/components/tt-form/src/utils/array-path.js +18 -0
  108. package/dist/components/tt-form-item-error-tooltip/index.js +9 -0
  109. package/dist/components/tt-form-item-error-tooltip/index.vue.js +183 -0
  110. package/dist/components/tt-form-item-error-tooltip/index.vue3.js +5 -0
  111. package/dist/components/tt-icon/components/AddIcon.vue.js +28 -0
  112. package/dist/components/tt-icon/components/AddIcon.vue2.js +4 -0
  113. package/dist/components/tt-icon/components/SubIcon.vue.js +28 -0
  114. package/dist/components/tt-icon/components/SubIcon.vue2.js +4 -0
  115. package/dist/components/tt-icon/index.js +11 -0
  116. package/dist/components/tt-icon/index.vue.js +8 -0
  117. package/dist/components/tt-icon/index.vue2.js +115 -0
  118. package/dist/components/tt-image/index.js +9 -0
  119. package/dist/components/tt-image/src/components/ImageViewer.js +41 -0
  120. package/dist/components/tt-image/tt-image.js +55 -0
  121. package/dist/components/tt-loading/index.js +8 -0
  122. package/dist/components/tt-loading/src/directive.js +51 -0
  123. package/dist/components/tt-loading/src/loading.vue.js +7 -0
  124. package/dist/components/tt-loading/src/loading.vue2.js +75 -0
  125. package/dist/components/tt-loading/src/service.js +79 -0
  126. package/dist/components/tt-log/index.js +7 -0
  127. package/dist/components/tt-log/index.vue.js +30 -0
  128. package/dist/components/tt-log/index.vue2.js +4 -0
  129. package/dist/components/tt-modal/index.js +14 -0
  130. package/dist/components/tt-modal/src/RenderModal.vue.js +310 -0
  131. package/dist/components/tt-modal/src/RenderModal.vue3.js +5 -0
  132. package/dist/components/tt-modal/src/components/ModalFooter.vue.js +7 -0
  133. package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +74 -0
  134. package/dist/components/tt-modal/src/components/ModalHeader.vue.js +7 -0
  135. package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +22 -0
  136. package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +48 -0
  137. package/dist/components/tt-modal/src/components/ModalWrapper.vue2.js +4 -0
  138. package/dist/components/tt-modal/src/hooks/useModalRender.js +131 -0
  139. package/dist/components/tt-modal/src/index.js +17 -0
  140. package/dist/components/tt-modal/src/props.js +75 -0
  141. package/dist/components/tt-modal/src/utils/modal-api.js +200 -0
  142. package/dist/components/tt-modal/src/utils/modal-stack.js +28 -0
  143. package/dist/components/tt-modal-form/hooks/useModalFormSlot.js +22 -0
  144. package/dist/components/tt-modal-form/index.vue.js +178 -0
  145. package/dist/components/tt-modal-form/index.vue2.js +4 -0
  146. package/dist/components/tt-modal-form/useModalForm.js +30 -0
  147. package/dist/components/tt-nav-anchor/index.js +8 -0
  148. package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +234 -0
  149. package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue3.js +5 -0
  150. package/dist/components/tt-nav-anchor/src/constants.js +4 -0
  151. package/dist/components/tt-panel-select/index.js +7 -0
  152. package/dist/components/tt-panel-select/src/common.js +4 -0
  153. package/dist/components/tt-panel-select/src/components/PanelLeft.vue.js +56 -0
  154. package/dist/components/tt-panel-select/src/components/PanelLeft.vue2.js +4 -0
  155. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +277 -0
  156. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue2.js +4 -0
  157. package/dist/components/tt-panel-select/src/components/PanelRight.vue.js +108 -0
  158. package/dist/components/tt-panel-select/src/components/PanelRight.vue2.js +4 -0
  159. package/dist/components/tt-panel-select/src/hooks/usePanelData.js +184 -0
  160. package/dist/components/tt-panel-select/src/hooks/usePanelSelection.js +91 -0
  161. package/dist/components/tt-panel-select/src/index.vue.js +386 -0
  162. package/dist/components/tt-panel-select/src/index.vue2.js +4 -0
  163. package/dist/components/tt-select/index.js +8 -0
  164. package/dist/components/tt-select/src/Select.vue.js +315 -0
  165. package/dist/components/tt-select/src/Select.vue3.js +5 -0
  166. package/dist/components/tt-select/src/components/SelectTable.vue.js +86 -0
  167. package/dist/components/tt-select/src/components/SelectTable.vue3.js +5 -0
  168. package/dist/components/tt-select/src/components/Table.vue.js +307 -0
  169. package/dist/components/tt-select/src/components/Table.vue3.js +5 -0
  170. package/dist/components/tt-select/src/const.js +19 -0
  171. package/dist/components/tt-select/src/hooks/useDataSource.js +196 -0
  172. package/dist/components/tt-select/src/hooks/useGrid.js +97 -0
  173. package/dist/components/tt-select/src/hooks/useKeyboard.js +63 -0
  174. package/dist/components/tt-select/src/hooks/usePagination.js +45 -0
  175. package/dist/components/tt-select/src/hooks/useSelect.js +100 -0
  176. package/dist/components/tt-select/src/hooks/useSelectTableEvent.d.ts +1 -1
  177. package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +345 -0
  178. package/dist/components/tt-select/src/props.js +201 -0
  179. package/dist/components/tt-select/src/utils/index.js +16 -0
  180. package/dist/components/tt-table/index.js +33 -0
  181. package/dist/components/tt-table/src/Table.vue.js +623 -0
  182. package/dist/components/tt-table/src/Table.vue3.js +5 -0
  183. package/dist/components/tt-table/src/TableForm.vue.js +317 -0
  184. package/dist/components/tt-table/src/TableForm.vue2.js +4 -0
  185. package/dist/components/tt-table/src/componentMap.js +4 -0
  186. package/dist/components/tt-table/src/components/RowContext.js +24 -0
  187. package/dist/components/tt-table/src/components/TableAction.vue.js +222 -0
  188. package/dist/components/tt-table/src/components/TableAction.vue2.js +4 -0
  189. package/dist/components/tt-table/src/components/TableButtons.js +117 -0
  190. package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +233 -0
  191. package/dist/components/tt-table/src/components/TableColumnModal.vue3.js +5 -0
  192. package/dist/components/tt-table/src/components/TableToobalTools.vue.js +87 -0
  193. package/dist/components/tt-table/src/components/TableToobalTools.vue2.js +4 -0
  194. package/dist/components/tt-table/src/emits.js +15 -0
  195. package/dist/components/tt-table/src/hooks/useCellArea.js +15 -0
  196. package/dist/components/tt-table/src/hooks/useColumns.js +275 -0
  197. package/dist/components/tt-table/src/hooks/useCustomColumns.js +53 -0
  198. package/dist/components/tt-table/src/hooks/useDataSource.js +224 -0
  199. package/dist/components/tt-table/src/hooks/useLeftRightSlot.js +64 -0
  200. package/dist/components/tt-table/src/hooks/usePagination.js +44 -0
  201. package/dist/components/tt-table/src/hooks/useRowSelection.js +84 -0
  202. package/dist/components/tt-table/src/hooks/useTableContext.js +20 -0
  203. package/dist/components/tt-table/src/hooks/useTableEvent.js +197 -0
  204. package/dist/components/tt-table/src/hooks/useTableForm.js +60 -0
  205. package/dist/components/tt-table/src/hooks/useTableRender.js +33 -0
  206. package/dist/components/tt-table/src/hooks/useTableSlot.js +17 -0
  207. package/dist/components/tt-table/src/props.js +482 -0
  208. package/dist/components/tt-table/src/toolProps.js +30 -0
  209. package/dist/components/tt-table/src/utils/context.js +17 -0
  210. package/dist/components/tt-table/src/utils/table-api.js +386 -0
  211. package/dist/components/tt-table/src/utils/table-form-api.js +122 -0
  212. package/dist/components/tt-text/index.js +7 -0
  213. package/dist/components/tt-text/index.vue.js +7 -0
  214. package/dist/components/tt-text/index.vue2.js +73 -0
  215. package/dist/components/tt-upload/index.js +9 -0
  216. package/dist/components/tt-upload/src/TtUpload.vue.js +305 -0
  217. package/dist/components/tt-upload/src/TtUpload.vue2.js +4 -0
  218. package/dist/components/tt-upload/src/typing.js +107 -0
  219. package/dist/directives/auto-tip/index.js +62 -0
  220. package/dist/directives/dialog-resize/index.js +49 -0
  221. package/dist/directives/dialog-resize/use-css-variable.js +44 -0
  222. package/dist/directives/dialog-resize/use-draggable.js +35 -0
  223. package/dist/directives/dialog-resize/use-fullscreen.js +38 -0
  224. package/dist/directives/dialog-resize/use-parse-translate.js +9 -0
  225. package/dist/directives/dialog-resize/use-resizer.js +37 -0
  226. package/dist/directives/disabled-tip/index.js +78 -0
  227. package/dist/directives/index.js +8 -0
  228. package/dist/hooks/useDataPermissionOptions.js +142 -0
  229. package/dist/hooks/useFormSchemasLink.js +261 -0
  230. package/dist/hooks/useFormat.js +44 -0
  231. package/dist/hooks/useLoading.js +22 -0
  232. package/dist/hooks/useScreenshotOss.js +69 -0
  233. package/dist/hooks/useSetup.js +59 -0
  234. package/dist/index.js +142 -60274
  235. package/dist/plugins/default/renderCellContent.js +58 -0
  236. package/dist/plugins/vxeTable/switchStatus.js +91 -0
  237. package/dist/plugins.js +4 -146
  238. package/dist/style.css +1 -1
  239. package/dist/utils/xhr.js +8 -0
  240. package/package.json +3 -1
  241. package/dist/index-NG5FNCLD.js +0 -3430
  242. package/dist/index.modern-4Cf3dcJP.js +0 -3069
@@ -0,0 +1,47 @@
1
+ import { z as t } from "zod";
2
+ function u(e, o) {
3
+ return e.constructor.name === o.name;
4
+ }
5
+ const n = /* @__PURE__ */ new Map();
6
+ n.set(t.ZodBoolean.name, () => {
7
+ });
8
+ n.set(t.ZodNumber.name, () => {
9
+ });
10
+ n.set(t.ZodEmail.name, () => {
11
+ });
12
+ n.set(t.ZodString.name, () => "");
13
+ n.set(t.ZodArray.name, () => []);
14
+ n.set(t.ZodRecord.name, () => ({}));
15
+ n.set(t.ZodDefault.name, (e) => e.def.defaultValue);
16
+ n.set(t.ZodOptional.name, (e) => {
17
+ const o = e.def.innerType;
18
+ return o.type === "default" ? o.def.defaultValue : void 0;
19
+ });
20
+ n.set(t.ZodTuple.name, (e) => {
21
+ const o = [];
22
+ for (const r of e.def.items)
23
+ o.push(d(r));
24
+ return o;
25
+ });
26
+ n.set(
27
+ t.ZodUnion.name,
28
+ (e) => d(e.def.options[0])
29
+ );
30
+ n.set(t.ZodObject.name, (e) => a(e));
31
+ n.set(t.ZodRecord.name, (e) => a(e));
32
+ n.set(t.ZodIntersection.name, (e) => a(e));
33
+ function d(e) {
34
+ const o = e.constructor.name;
35
+ return n.has(o) ? n.get(o)(e) : void 0;
36
+ }
37
+ function a(e) {
38
+ return u(e, t.ZodRecord) ? {} : u(e, t.ZodObject) ? Object.fromEntries(
39
+ Object.entries(e.shape).map(([o, r]) => [o, d(r)])
40
+ ) : {};
41
+ }
42
+ function i(e) {
43
+ return a(e);
44
+ }
45
+ export {
46
+ i as getDefaultsForSchema
47
+ };
@@ -0,0 +1,6 @@
1
+ function t(r) {
2
+ return r;
3
+ }
4
+ export {
5
+ t as asFieldArrayContext
6
+ };
@@ -0,0 +1,28 @@
1
+ import { isReactive as a, defineComponent as c, onBeforeUnmount as f, h as u, watch as h } from "vue";
2
+ import { useStore as p } from "@tanstack/vue-store";
3
+ import { FormApi as A } from "./formApi.js";
4
+ import S from "./index.vue2.js";
5
+ /* empty css */
6
+ function C(t) {
7
+ const n = a(t), e = new A(t), m = e;
8
+ m.useStore = (r) => p(e.store, r);
9
+ const i = c(
10
+ (r, { attrs: o, slots: s }) => (f(() => {
11
+ e.unmount();
12
+ }), e.setState({ ...r, ...o }), () => u(S, { ...r, ...o, formApi: m }, s)),
13
+ {
14
+ name: "TtForm",
15
+ inheritAttrs: !1
16
+ }
17
+ );
18
+ return n && h(
19
+ () => t.schema,
20
+ () => {
21
+ e.setState({ schema: t.schema });
22
+ },
23
+ { immediate: !0 }
24
+ ), [i, m];
25
+ }
26
+ export {
27
+ C as useForm
28
+ };
@@ -0,0 +1,320 @@
1
+ import { useSlots as O, computed as j, unref as L, toRaw as P } from "vue";
2
+ import { isFunction as $, isString as A, mergeWithArrayOverride as R, isObject as k } from "@dazhicheng/utils";
3
+ import { get as w, cloneDeep as v, has as C } from "lodash-es";
4
+ import { childArrayPath as x, normalizeArrayFieldPath as h } from "./utils/array-path.js";
5
+ import { set as g } from "es-toolkit/compat";
6
+ import { createContext as F } from "./shared/createContext.js";
7
+ import { useForm as H } from "vee-validate";
8
+ import { object as I, ZodString as W, ZodNumber as z, ZodObject as Z, ZodIntersection as _ } from "zod";
9
+ import { getDefaultsForSchema as N } from "./shared/zod-defaults.js";
10
+ function K(e) {
11
+ if (!e || !k(e))
12
+ return !1;
13
+ const r = e;
14
+ return A(r.fieldName) && "component" in r;
15
+ }
16
+ const [oe, fe] = F("TtFormProps"), [se, le] = F("ComponentRefMap");
17
+ function T(e) {
18
+ if (Reflect.has(e, "defaultValue"))
19
+ return e.defaultValue;
20
+ if (e.rules && !A(e.rules))
21
+ return m(P(e.rules));
22
+ }
23
+ function p(e) {
24
+ const r = e.lastIndexOf(".");
25
+ return r === -1 ? void 0 : e.slice(0, r);
26
+ }
27
+ function E(e) {
28
+ if (e)
29
+ return new Proxy(e, {
30
+ get(r, t) {
31
+ return w(e, t);
32
+ },
33
+ set() {
34
+ return !0;
35
+ },
36
+ ownKeys() {
37
+ return Reflect.ownKeys(e);
38
+ },
39
+ getOwnPropertyDescriptor(r, t) {
40
+ return Object.getOwnPropertyDescriptor(e, t);
41
+ }
42
+ });
43
+ }
44
+ function V(e, r) {
45
+ return {
46
+ path: e,
47
+ get: () => r == null ? void 0 : r.get(e),
48
+ push: () => {
49
+ },
50
+ remove: () => {
51
+ },
52
+ replace: () => {
53
+ },
54
+ update: () => {
55
+ },
56
+ insert: () => {
57
+ },
58
+ prepend: () => {
59
+ },
60
+ move: () => {
61
+ },
62
+ swap: () => {
63
+ },
64
+ at: (t, a) => V(x(e, t, a), r)
65
+ };
66
+ }
67
+ function U(e) {
68
+ if (e)
69
+ return {
70
+ get: (r) => e.get(r),
71
+ push: () => {
72
+ },
73
+ remove: () => {
74
+ },
75
+ replace: () => {
76
+ },
77
+ update: () => {
78
+ },
79
+ insert: () => {
80
+ },
81
+ prepend: () => {
82
+ },
83
+ move: () => {
84
+ },
85
+ swap: () => {
86
+ },
87
+ at: (r, t, a) => V(
88
+ x(r, t, a),
89
+ e
90
+ )
91
+ };
92
+ }
93
+ function q(e) {
94
+ var i;
95
+ const r = e, t = r.safeMutations ? U(e.arrayAction) : e.arrayAction, a = r.safeMutations ? V(e.arrayPath, e.arrayAction) : e.arrayHandle ?? ((i = e.arrayAction) == null ? void 0 : i.at(e.arrayPath));
96
+ return {
97
+ arrayPath: e.arrayPath,
98
+ itemPath: e.itemPath,
99
+ index: e.index,
100
+ entry: {
101
+ key: e.index,
102
+ value: e.row,
103
+ isFirst: e.index === 0,
104
+ isLast: e.index === e.arrayLength - 1
105
+ },
106
+ arrayAction: t,
107
+ arrayHandle: a,
108
+ arrayLength: e.arrayLength,
109
+ form: r.safeMutations ? E(e.form) : e.form,
110
+ parentItemPath: e.parentItemPath
111
+ };
112
+ }
113
+ function B(e, r) {
114
+ const t = {}, a = {};
115
+ for (const n of e)
116
+ if (n.fieldName) {
117
+ if (n.useArraySchema) {
118
+ const f = S(n, {
119
+ arrayPath: h(`${r.itemPath}.${n.fieldName}`),
120
+ parentItemPath: r.itemPath,
121
+ form: r.form,
122
+ arrayAction: r.arrayAction,
123
+ safeMutations: r.safeMutations
124
+ });
125
+ f !== void 0 && (t[n.fieldName] = f);
126
+ continue;
127
+ }
128
+ if (Reflect.has(n, "defaultValue"))
129
+ t[n.fieldName] = v(n.defaultValue);
130
+ else if (n.rules && !A(n.rules)) {
131
+ const f = P(n.rules), o = m(f);
132
+ a[n.fieldName] = f, o !== void 0 && (t[n.fieldName] = o);
133
+ }
134
+ }
135
+ const i = N(I(a));
136
+ for (const n in i)
137
+ n in t || (t[n] = i[n]);
138
+ return t;
139
+ }
140
+ function D(e) {
141
+ const { item: r, index: t } = e, a = r.arraySchema;
142
+ if (!a)
143
+ return [];
144
+ if (!$(a))
145
+ return a;
146
+ const i = a, n = q(e);
147
+ return i(n.entry, t, n);
148
+ }
149
+ function G(e, r, t) {
150
+ const a = h(`${t.itemPath}.${e.fieldName}`), i = S(e, {
151
+ arrayPath: a,
152
+ parentItemPath: t.itemPath,
153
+ form: t.form,
154
+ arrayAction: t.arrayAction,
155
+ safeMutations: t.safeMutations
156
+ }), n = Array.isArray(i) ? i : [{}], f = Array.isArray(r) ? r : [];
157
+ return r === void 0 ? i : Array.isArray(r) && f.length === 0 ? [] : f.map((l, s) => {
158
+ const u = { ...s < n.length ? v(n[s]) : {}, ...l }, c = {
159
+ item: e,
160
+ row: u,
161
+ index: s,
162
+ arrayLength: f.length,
163
+ arrayPath: a,
164
+ itemPath: h(`${a}[${s}]`),
165
+ parentItemPath: t.itemPath,
166
+ form: t.form,
167
+ arrayAction: t.arrayAction,
168
+ safeMutations: t.safeMutations
169
+ }, d = D(c);
170
+ return b(u, d, c);
171
+ });
172
+ }
173
+ function b(e, r, t) {
174
+ const a = { ...e };
175
+ for (const i of r)
176
+ !i.fieldName || !i.useArraySchema || (a[i.fieldName] = G(i, a[i.fieldName], t));
177
+ return a;
178
+ }
179
+ function S(e, r) {
180
+ if (!e.useArraySchema)
181
+ return;
182
+ const t = T(e);
183
+ let a;
184
+ return Array.isArray(t) ? a = v(t) : t !== void 0 ? a = [v(t)] : a = [{}], r.row && a.length === 1 && (a = [
185
+ R(r.row, a[0])
186
+ ]), e.arraySchema ? a.map((n, f) => {
187
+ const o = a.length === 1 && r.index !== void 0 ? r.index : f, l = r.arrayLength ?? a.length, s = {
188
+ item: e,
189
+ row: n,
190
+ index: o,
191
+ arrayLength: l,
192
+ arrayPath: r.arrayPath,
193
+ itemPath: h(`${r.arrayPath}[${o}]`),
194
+ parentItemPath: r.parentItemPath,
195
+ form: r.form,
196
+ arrayAction: r.arrayAction,
197
+ arrayHandle: r.arrayHandle,
198
+ safeMutations: r.safeMutations ?? !0
199
+ }, y = D(s), u = B(y, s);
200
+ return b(
201
+ {
202
+ ...v(u),
203
+ ...n
204
+ },
205
+ y,
206
+ s
207
+ );
208
+ }) : a;
209
+ }
210
+ function M(e, r) {
211
+ return S(e, {
212
+ ...r,
213
+ safeMutations: !0
214
+ });
215
+ }
216
+ function J(e) {
217
+ return M(e, {
218
+ arrayPath: h(e.fieldName),
219
+ parentItemPath: p(h(e.fieldName))
220
+ });
221
+ }
222
+ function Q(e) {
223
+ if (e.fieldName) {
224
+ if (e.useArraySchema)
225
+ return J(e);
226
+ if (Reflect.has(e, "defaultValue"))
227
+ return v(e.defaultValue);
228
+ if (e.rules && !A(e.rules)) {
229
+ const r = P(e.rules), t = m(r);
230
+ if (t !== void 0)
231
+ return t;
232
+ const a = N(I({ [e.fieldName]: r }));
233
+ if (e.fieldName in a)
234
+ return a[e.fieldName];
235
+ }
236
+ }
237
+ }
238
+ function ce(e, r) {
239
+ if (!r.fieldName)
240
+ return !1;
241
+ const t = Q(r);
242
+ if (t === void 0)
243
+ return !1;
244
+ const a = r.fieldName;
245
+ if (!C(e, a))
246
+ return !0;
247
+ const i = w(e, a);
248
+ return i == null ? !0 : r.useArraySchema && Array.isArray(i) ? !(i.length > 0 || Array.isArray(t) && t.length === 0) : !1;
249
+ }
250
+ function m(e) {
251
+ if (e instanceof W)
252
+ return "";
253
+ if (e instanceof z)
254
+ return null;
255
+ if (e instanceof Z) {
256
+ const r = {};
257
+ for (const [t, a] of Object.entries(e.shape))
258
+ r[t] = m(a);
259
+ return r;
260
+ } else if (e instanceof _) {
261
+ const r = m(e._def.left), t = m(e._def.right);
262
+ return typeof r == "object" && typeof t == "object" ? { ...r, ...t } : r ?? t;
263
+ } else
264
+ return;
265
+ }
266
+ function de(e) {
267
+ var f;
268
+ const r = O(), t = n(), a = H({
269
+ ...(f = Object.keys(t)) != null && f.length ? { initialValues: t } : {}
270
+ }), i = j(() => {
271
+ const o = [];
272
+ for (const l of Object.keys(r))
273
+ l !== "default" && o.push(l);
274
+ return o;
275
+ });
276
+ function n() {
277
+ const o = {}, l = {};
278
+ (L(e).schema || []).forEach((u) => {
279
+ if (K(u)) {
280
+ if (u.useArraySchema) {
281
+ const c = h(u.fieldName), d = M(u, {
282
+ arrayPath: c,
283
+ parentItemPath: p(c),
284
+ form: o
285
+ });
286
+ d !== void 0 && g(o, u.fieldName, d);
287
+ } else if (Reflect.has(u, "defaultValue"))
288
+ g(o, u.fieldName, u.defaultValue);
289
+ else if (u.rules && !A(u.rules)) {
290
+ const c = P(u.rules), d = m(c);
291
+ l[u.fieldName] = c, d !== void 0 && (o[u.fieldName] = d);
292
+ }
293
+ }
294
+ });
295
+ const s = N(I(l)), y = {};
296
+ for (const u in s)
297
+ g(y, u, s[u]);
298
+ return R(o, y);
299
+ }
300
+ return {
301
+ delegatedSlots: i,
302
+ form: a
303
+ };
304
+ }
305
+ export {
306
+ q as createArraySchemaContext,
307
+ se as injectComponentRefMap,
308
+ oe as injectFormProps,
309
+ K as isFormSchema,
310
+ le as provideComponentRefMap,
311
+ fe as provideFormProps,
312
+ J as resolveArrayFieldInitialValue,
313
+ M as resolveArrayFieldInitialValueWithRuntime,
314
+ D as resolveArraySchemasForRuntime,
315
+ p as resolveParentItemPathFromArrayPath,
316
+ Q as resolveSchemaFieldInitialValue,
317
+ T as resolveSchemaItemDefaultValue,
318
+ ce as shouldSeedAppendedFieldValue,
319
+ de as useFormInitial
320
+ };
@@ -0,0 +1,18 @@
1
+ const l = /(\w+)\.(\[\d+\])/g, d = /(\w+)(\[(\d+)\])/g;
2
+ function o(r) {
3
+ return r && r.replace(l, "$1$2");
4
+ }
5
+ function u(r) {
6
+ if (!r)
7
+ return [];
8
+ const e = /* @__PURE__ */ new Set([r]), n = o(r);
9
+ return e.add(n), e.add(r.replace(d, (i, t, a, c) => `${t}.[${c}]`)), e.add(n.replace(d, (i, t, a, c) => `${t}.[${c}]`)), [...e];
10
+ }
11
+ function $(r, e, n) {
12
+ return o(e !== void 0 && n !== void 0 ? `${r}[${e}].${n}` : r);
13
+ }
14
+ export {
15
+ $ as childArrayPath,
16
+ u as collectArrayFieldPathAliases,
17
+ o as normalizeArrayFieldPath
18
+ };
@@ -0,0 +1,9 @@
1
+ import { withInstall as o } from "@dazhicheng/utils";
2
+ import t from "./index.vue.js";
3
+ /* empty css */
4
+ const p = o(t);
5
+ o(t);
6
+ export {
7
+ p as TtFormItemErrorTooltip,
8
+ p as default
9
+ };
@@ -0,0 +1,183 @@
1
+ import { defineComponent as B, computed as S, ref as u, watch as f, nextTick as d, createElementBlock as g, openBlock as v, createVNode as h, unref as y, withCtx as N, createElementVNode as V, toDisplayString as D } from "vue";
2
+ import { ElTooltip as I } from "element-plus";
3
+ import { isEmpty as x } from "@dazhicheng/utils";
4
+ import { useElementVisibility as P, useElementBounding as E } from "@vueuse/core";
5
+ import R from "../../assets/svg/item_error.svg.js";
6
+ import C from "../tt-icon/index.vue.js";
7
+ const O = ["data-field-name"], z = {
8
+ key: 0,
9
+ class: "c-#fff"
10
+ }, F = {
11
+ key: 1,
12
+ class: "c-#fff"
13
+ }, K = /* @__PURE__ */ B({
14
+ name: "TtFormItemErrorTooltip",
15
+ __name: "index",
16
+ props: {
17
+ /** 错误信息 */
18
+ errMsg: {
19
+ type: String,
20
+ default: ""
21
+ },
22
+ /** 挂载的DOM */
23
+ refDom: {
24
+ type: Object,
25
+ default: () => null
26
+ },
27
+ /** 显示的位置 enum */
28
+ placement: {
29
+ type: String,
30
+ default: "bottom-start"
31
+ },
32
+ /** 字段名称(用于 E2E 测试定位) */
33
+ fieldName: {
34
+ type: String,
35
+ default: ""
36
+ }
37
+ },
38
+ setup(c) {
39
+ const i = c, k = S(() => i.refDom || void 0), _ = u(), w = u();
40
+ _.value = P(w);
41
+ const m = u(!1), p = u(), l = u("");
42
+ let s = null;
43
+ function T(t) {
44
+ if (t.includes("__v_isVNode")) {
45
+ const e = JSON.parse(t);
46
+ return m.value = !0, e;
47
+ }
48
+ return m.value = !1, t;
49
+ }
50
+ const M = S(() => x(i.errMsg) ? l.value ? T(l.value) : "" : T(i.errMsg));
51
+ return f(
52
+ () => i.errMsg,
53
+ (t) => {
54
+ x(t) ? l.value && (s && clearTimeout(s), s = setTimeout(() => {
55
+ x(i.errMsg) && (l.value = ""), s = null;
56
+ }, 300)) : (s && (clearTimeout(s), s = null), l.value = t);
57
+ },
58
+ { immediate: !0 }
59
+ ), f(
60
+ () => i.refDom,
61
+ (t) => {
62
+ if (t) {
63
+ w.value = t;
64
+ const e = E(t), a = t.closest(".tt-modal"), b = t.closest(".tt-drawer");
65
+ if (a) {
66
+ const r = E(a);
67
+ f(
68
+ [
69
+ r.x,
70
+ r.y,
71
+ e.x,
72
+ e.y,
73
+ e.width,
74
+ e.height
75
+ ],
76
+ () => {
77
+ d(() => {
78
+ var o, n;
79
+ (n = (o = p.value) == null ? void 0 : o.updatePopper) == null || n.call(o);
80
+ });
81
+ },
82
+ { flush: "post" }
83
+ );
84
+ } else if (b) {
85
+ const r = E(b);
86
+ f(
87
+ [
88
+ r.x,
89
+ r.y,
90
+ r.width,
91
+ r.height,
92
+ e.x,
93
+ e.y,
94
+ e.width,
95
+ e.height
96
+ ],
97
+ () => {
98
+ d(() => {
99
+ var o, n;
100
+ (n = (o = p.value) == null ? void 0 : o.updatePopper) == null || n.call(o);
101
+ });
102
+ },
103
+ { flush: "post" }
104
+ );
105
+ } else
106
+ f(
107
+ [e.x, e.y, e.width, e.height],
108
+ () => {
109
+ d(() => {
110
+ var r, o;
111
+ (o = (r = p.value) == null ? void 0 : r.updatePopper) == null || o.call(r);
112
+ });
113
+ },
114
+ { flush: "post" }
115
+ );
116
+ }
117
+ },
118
+ {
119
+ immediate: !0
120
+ }
121
+ ), (t, e) => {
122
+ var a;
123
+ return v(), g("div", null, [
124
+ h(y(I), {
125
+ ref_key: "tooltipRef",
126
+ ref: p,
127
+ offset: 7,
128
+ "show-arrow": !0,
129
+ "virtual-ref": k.value,
130
+ "virtual-triggering": "",
131
+ visible: !!i.errMsg,
132
+ placement: c.placement,
133
+ persistent: !0,
134
+ "popper-options": {
135
+ strategy: "fixed",
136
+ modifiers: [
137
+ {
138
+ name: "arrow",
139
+ options: {
140
+ padding: 2
141
+ }
142
+ },
143
+ {
144
+ name: "computeStyles",
145
+ options: {
146
+ adaptive: !1
147
+ }
148
+ }
149
+ ]
150
+ },
151
+ "popper-class": [
152
+ {
153
+ invisible: !((a = _.value) != null && a.value)
154
+ },
155
+ "formItemErrorTooltip"
156
+ ]
157
+ }, {
158
+ content: N(() => [
159
+ V("div", {
160
+ class: "flex items-center",
161
+ "data-testid": "form-field-error-message",
162
+ "data-field-name": c.fieldName
163
+ }, [
164
+ h(C, {
165
+ icon: y(R),
166
+ "is-custom-svg": "",
167
+ size: 14,
168
+ class: "m-r-5px h-14px lh-14px"
169
+ }, null, 8, ["icon"]),
170
+ m.value ? (v(), g("span", F, [
171
+ h(y(M))
172
+ ])) : (v(), g("span", z, D(M.value), 1))
173
+ ], 8, O)
174
+ ]),
175
+ _: 1
176
+ }, 8, ["virtual-ref", "visible", "placement", "popper-class"])
177
+ ]);
178
+ };
179
+ }
180
+ });
181
+ export {
182
+ K as default
183
+ };
@@ -0,0 +1,5 @@
1
+ import o from "./index.vue.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };
@@ -0,0 +1,28 @@
1
+ import { defineComponent as r, useAttrs as s, computed as c, createBlock as a, openBlock as l, resolveDynamicComponent as i, h as p, mergeProps as m, unref as u } from "vue";
2
+ import d from "@dazhicheng-ui/assets/svg/addCircleLine.svg?raw";
3
+ import f from "../index.vue.js";
4
+ const b = /* @__PURE__ */ r({
5
+ name: "TtSubIcon",
6
+ __name: "AddIcon",
7
+ props: {
8
+ isSymbol: { type: Boolean },
9
+ isCustomSvg: { type: Boolean, default: !0 },
10
+ title: {},
11
+ iconFont: {},
12
+ isImg: { type: Boolean },
13
+ size: { default: 24 },
14
+ disabled: { type: Boolean },
15
+ class: {},
16
+ color: {}
17
+ },
18
+ setup(o) {
19
+ const e = o, t = s(), n = c(() => ({
20
+ ...t,
21
+ ...e
22
+ }));
23
+ return (y, B) => (l(), a(i(p(f)), m(n.value, { icon: u(d) }), null, 16, ["icon"]));
24
+ }
25
+ });
26
+ export {
27
+ b as default
28
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./AddIcon.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,28 @@
1
+ import { defineComponent as r, useAttrs as s, computed as c, createBlock as a, openBlock as i, resolveDynamicComponent as l, h as m, mergeProps as p, unref as u } from "vue";
2
+ import f from "@dazhicheng-ui/assets/svg/determinateCircleLine.svg?raw";
3
+ import d from "../index.vue.js";
4
+ const I = /* @__PURE__ */ r({
5
+ name: "TtSubIcon",
6
+ __name: "SubIcon",
7
+ props: {
8
+ isSymbol: { type: Boolean },
9
+ isCustomSvg: { type: Boolean, default: !0 },
10
+ title: {},
11
+ iconFont: {},
12
+ isImg: { type: Boolean },
13
+ size: { default: 24 },
14
+ disabled: { type: Boolean },
15
+ class: {},
16
+ color: {}
17
+ },
18
+ setup(e) {
19
+ const o = e, t = s(), n = c(() => ({
20
+ ...t,
21
+ ...o
22
+ }));
23
+ return (y, B) => (i(), a(l(m(d)), p(n.value, { icon: u(f) }), null, 16, ["icon"]));
24
+ }
25
+ });
26
+ export {
27
+ I as default
28
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./SubIcon.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,11 @@
1
+ import { withInstall as o } from "@dazhicheng/utils";
2
+ import t from "./index.vue.js";
3
+ import m from "./components/AddIcon.vue.js";
4
+ import n from "./components/SubIcon.vue.js";
5
+ const s = o(t), a = o(m), p = o(n);
6
+ export {
7
+ a as TtAddIcon,
8
+ s as TtIcon,
9
+ p as TtSubIcon,
10
+ s as default
11
+ };