hldesigner 0.0.1

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 (173) hide show
  1. package/FileSaver.min-b57403e6.js +103 -0
  2. package/_commonjsHelpers-e7ea1525.js +36 -0
  3. package/_plugin-vue_export-helper-dad06003.js +9 -0
  4. package/affix-widget-94198099.js +38 -0
  5. package/anchor-link-widget-919ac0ee.js +5 -0
  6. package/anchor-link-widget.vue_vue_type_script_setup_true_name_anchor-link-widget_lang-7df7e7c1.js +35 -0
  7. package/anchor-widget-77003871.js +57 -0
  8. package/auto-complete-widget-8d76ea70.js +74 -0
  9. package/avatar-widget-3cd63f01.js +38 -0
  10. package/backtop-widget-6fc3db98.js +38 -0
  11. package/badge-widget-f36a769c.js +44 -0
  12. package/baseImp-8c4be88e.js +11050 -0
  13. package/breadcrumb-widget-422a9d28.js +79 -0
  14. package/button-widget-918dde3f.js +48 -0
  15. package/cache-widget-a1637f5f.js +53 -0
  16. package/card-widget-2db8e9d4.js +112 -0
  17. package/carousel-widget-838cc8c9.js +75 -0
  18. package/cascader-widget-42482528.js +97 -0
  19. package/chart-widget-ac07a466.js +44285 -0
  20. package/checkbox-widget-ee1fcb0c.js +79 -0
  21. package/clipboard-fc4d858d.js +497 -0
  22. package/code-cf4fbc89.js +82 -0
  23. package/collapse-widget-1a93bdb5.js +89 -0
  24. package/color-picker-widget-e893711a.js +56 -0
  25. package/common-editor-76ac2e32.js +24 -0
  26. package/common-editor.vue_vue_type_script_setup_true_name_common-editor_lang-634a504e.js +25 -0
  27. package/configItem-6bfa74e0.js +113 -0
  28. package/cont-cell-widget-42f96421.js +8 -0
  29. package/cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-d3be593a.js +59 -0
  30. package/cont-widget-9dda9135.js +42 -0
  31. package/content-wrapper-20c559ac.js +14 -0
  32. package/content-wrapper.vue_vue_type_script_setup_true_lang-4a97c453.js +37 -0
  33. package/customClass-editor-9088a8cf.js +43 -0
  34. package/date-picker-range-widget-b9287f93.js +72 -0
  35. package/date-picker-widget-21595fd5.js +78 -0
  36. package/default-slot-widget-fc87ed0a.js +24 -0
  37. package/default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-0fb8e1cc.js +59 -0
  38. package/descriptions-widget-33a02f1a.js +83 -0
  39. package/designer.es.js +42 -0
  40. package/designer.style.css +11 -0
  41. package/designer.umd.js +161882 -0
  42. package/dialog-5e196819.js +124 -0
  43. package/dialog-widget-22714c34.js +33 -0
  44. package/divider-widget-adf656f2.js +38 -0
  45. package/drag-wrapper-f9fb1533.js +259 -0
  46. package/drawer-widget-404cb6db.js +33 -0
  47. package/dropdown-widget-a4a1e2f7.js +92 -0
  48. package/editor-wrapper-e6b30023.js +779 -0
  49. package/emitter-2b9b9409.js +53 -0
  50. package/empty-widget-c53b07dd.js +64 -0
  51. package/enum-type-255ade69.js +543 -0
  52. package/enum-type-287a50b6.js +2054 -0
  53. package/expression-ea95606e.js +2181 -0
  54. package/feedback-widget-c041b474.js +26 -0
  55. package/feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-efe168a5.js +82 -0
  56. package/field-base-5547436d.js +7 -0
  57. package/field-editor-3e1ce4f3.js +69 -0
  58. package/file-upload-widget-941b9493.js +98 -0
  59. package/form-item-wrapper-8039c512.js +113 -0
  60. package/form-widget-98a02c28.js +184 -0
  61. package/grid-col-widget-3ea371ea.js +8 -0
  62. package/grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-f40c8e16.js +41 -0
  63. package/grid-widget-f0635d43.js +43 -0
  64. package/html-text-widget-c440e86d.js +50 -0
  65. package/icon-2bb9fa65.js +129 -0
  66. package/iframe-widget-37ef665f.js +77 -0
  67. package/image-widget-871d5987.js +64 -0
  68. package/import-config-1eb9a66b.js +13156 -0
  69. package/index-0a2f2997.js +225 -0
  70. package/index-12505eec.js +42 -0
  71. package/index-18720c06.js +138 -0
  72. package/index-188b745d.js +132 -0
  73. package/index-28f32a55.js +216 -0
  74. package/index-2936e7cf.js +3265 -0
  75. package/index-2d29f8d3.js +7233 -0
  76. package/index-3d5d5fac.js +23 -0
  77. package/index-50c3e002.js +227 -0
  78. package/index-6a276ef7.js +131 -0
  79. package/index-6d56f058.js +45 -0
  80. package/index-7b38fd82.js +330 -0
  81. package/index-7c2a8e33.js +17993 -0
  82. package/index-7fa591e3.js +4817 -0
  83. package/index-82f2c56a.js +135 -0
  84. package/index-8713c192.js +344 -0
  85. package/index-8d537d38.js +2393 -0
  86. package/index-9fd4a537.js +99 -0
  87. package/index-ad538d7e.js +832 -0
  88. package/index-c1b1f59f.js +88 -0
  89. package/index-d6fa09d6.js +39 -0
  90. package/index-db2305dc.js +117 -0
  91. package/index-ddd23411.js +4884 -0
  92. package/index-e795786b.js +119 -0
  93. package/index-f146282d.js +1356 -0
  94. package/index-f849ef29.js +216 -0
  95. package/index-ffbcbc43.js +65 -0
  96. package/input-number-widget-64f89b9d.js +66 -0
  97. package/input-widget-0fe7c3d7.js +71 -0
  98. package/install-designer-bed2e18a.js +4752 -0
  99. package/item-4be3cb5b.js +34 -0
  100. package/item-ddbdee11.js +24 -0
  101. package/itemDetail-b31192a5.js +43 -0
  102. package/label-wrapper-91b95fb0.js +12 -0
  103. package/label-wrapper.vue_vue_type_style_index_0_lang-0a7f6bdd.js +80 -0
  104. package/link-widget-0f2bb61c.js +56 -0
  105. package/ltable-col-widget-9f26b93d.js +8 -0
  106. package/ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-639ee976.js +256 -0
  107. package/ltable-widget-b78a72ee.js +69 -0
  108. package/menu-widget-15fdd710.js +96 -0
  109. package/model-widget-3f2b1368.js +122 -0
  110. package/multirow-e1e1205c.js +292 -0
  111. package/multirow-widget copy-671ebd9c.js +858 -0
  112. package/multirow-widget-d256cac6.js +694 -0
  113. package/name-editor-05685151.js +104 -0
  114. package/optionItem-0ac4a3ae.js +4667 -0
  115. package/package.json +13 -0
  116. package/pagination-widget-31a7301d.js +81 -0
  117. package/picture-upload-widget-46ea42a0.js +102 -0
  118. package/postcss-2c4d92ea.js +2285 -0
  119. package/progress-widget-fc1f9557.js +52 -0
  120. package/property-base-e63e2f28.js +78 -0
  121. package/propresult-8fdf23e2.js +22 -0
  122. package/radio-widget-fbc63c11.js +79 -0
  123. package/range-widget-b0882319.js +74 -0
  124. package/rate-widget-9719ca7d.js +56 -0
  125. package/reg-editor.vue_vue_type_script_setup_true_lang-56504fb0.js +61 -0
  126. package/result-widget-925a5426.js +67 -0
  127. package/rich-editor-widget-426f0b19.js +77 -0
  128. package/router-widget-209f0eb1.js +54 -0
  129. package/schemaData-ab87bd49.js +333 -0
  130. package/select-widget-0b560a2f.js +288 -0
  131. package/setView-de8aaf40.js +84 -0
  132. package/sfc-10e3d29c.js +2570 -0
  133. package/share-editor-27d43940.js +448 -0
  134. package/share-event-dd8ff2ba.js +26 -0
  135. package/share-field-451430de.js +690 -0
  136. package/share-file-124a4d83.js +121 -0
  137. package/size-editor-ea05760c.js +92 -0
  138. package/slider-widget-fb4efa96.js +62 -0
  139. package/slot-04a83a27.js +17 -0
  140. package/static-text-widget-2efdd909.js +51 -0
  141. package/steps-widget-6f283f21.js +91 -0
  142. package/subMenu-widget-77e295cb.js +16 -0
  143. package/subMenu-widget.vue_vue_type_script_setup_true_lang-b051a10e.js +69 -0
  144. package/switch-widget-f1120b6c.js +56 -0
  145. package/tab-pane-widget-99c21615.js +8 -0
  146. package/tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-bc962788.js +35 -0
  147. package/table-col-widget-d6d5d21f.js +23 -0
  148. package/table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-2efa4d60.js +80 -0
  149. package/table-widget-9b8d9798.js +163 -0
  150. package/tabs-widget-88393072.js +68 -0
  151. package/tag-widget-33c17c06.js +38 -0
  152. package/target-code-48e9d055.js +33 -0
  153. package/target-datasource-35dfcb1d.js +221 -0
  154. package/target-link-3ffd0149.js +126 -0
  155. package/target-saveForm-012b7de1.js +136 -0
  156. package/target-widget-3d7f6104.js +59 -0
  157. package/target-window-7556d301.js +54 -0
  158. package/template-c30585f4.js +251740 -0
  159. package/text-widget-8b5ece83.js +38 -0
  160. package/textarea-widget-e7c1d9ed.js +56 -0
  161. package/time-picker-range-widget-b8dfcc3b.js +58 -0
  162. package/time-picker-widget-73bde0a3.js +57 -0
  163. package/time-select-widget-08008b76.js +57 -0
  164. package/tmpl-widget-7d245d41.js +92 -0
  165. package/tooltip-wrapper-2922e49e.js +31 -0
  166. package/tree-select-widget-67231123.js +94 -0
  167. package/tree-widget-ab91165f.js +90 -0
  168. package/uuid-39f0308a.js +196 -0
  169. package/value-editor-27783d6c.js +89 -0
  170. package/vue3-sfc-loader-b70bdce4.js +34688 -0
  171. package/widget-base-4c2d6265.js +27 -0
  172. package/widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-bbe0cabe.js +277 -0
  173. package/wrapper-widget-5702502d.js +78 -0
@@ -0,0 +1,96 @@
1
+ import { defineComponent as x, computed as h, resolveComponent as $, openBlock as d, createBlock as y, mergeProps as S, unref as i, withCtx as M, toHandlers as g, createVNode as B } from "vue";
2
+ import { d as j } from "./enum-type-287a50b6.js";
3
+ import { I as G } from "./field-base-5547436d.js";
4
+ import { _ as N } from "./widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-bbe0cabe.js";
5
+ import { c as P } from "./share-field-451430de.js";
6
+ import { w as R } from "./template-c30585f4.js";
7
+ import { _ as H } from "./subMenu-widget.vue_vue_type_script_setup_true_lang-b051a10e.js";
8
+ import { ae as k } from "./enum-type-255ade69.js";
9
+ import "./widget-base-4c2d6265.js";
10
+ import "./uuid-39f0308a.js";
11
+ import "./index-f146282d.js";
12
+ import "./optionItem-0ac4a3ae.js";
13
+ import "./baseImp-8c4be88e.js";
14
+ import "./icon-2bb9fa65.js";
15
+ import "./dialog-5e196819.js";
16
+ import "element-plus";
17
+ import "./_commonjsHelpers-e7ea1525.js";
18
+ import "./index-7fa591e3.js";
19
+ import "./index-ffbcbc43.js";
20
+ import "./_plugin-vue_export-helper-dad06003.js";
21
+ import "./emitter-2b9b9409.js";
22
+ import "./multirow-e1e1205c.js";
23
+ import "./slot-04a83a27.js";
24
+ const K = x({ componentName: R.FieldWidget }), ce = /* @__PURE__ */ x({
25
+ ...K,
26
+ __name: "menu-widget",
27
+ props: { ...G },
28
+ setup(C, { expose: E }) {
29
+ const O = C, { fieldEditor: p, fieldKey: b, attrs: t, events: A, optionItems: u, activeOptionItems: m, exposed: F, fieldObj: I, filterOptionItems: T } = P(O), f = (r) => {
30
+ var n;
31
+ return (n = t == null ? void 0 : t.value) != null && n.router ? r == null ? void 0 : r.route : r == null ? void 0 : r.value;
32
+ }, c = (r, n) => r == null ? void 0 : r.some((e) => {
33
+ var o, l;
34
+ return (e == null ? void 0 : e.menuItemType) === k.MenuItemGroup ? !1 : (e == null ? void 0 : e.value) === n ? ((o = e == null ? void 0 : e.children) == null ? void 0 : o.length) > 0 : ((l = e == null ? void 0 : e.children) == null ? void 0 : l.length) > 0 ? c(e.children, n) : !1;
35
+ }), a = (r, n) => r == null ? void 0 : r.some((e) => {
36
+ var o, l;
37
+ return (e == null ? void 0 : e.menuItemType) === k.MenuItemGroup ? !1 : f(e) === n ? ((o = e == null ? void 0 : e.children) == null ? void 0 : o.length) <= 0 : ((l = e == null ? void 0 : e.children) == null ? void 0 : l.length) > 0 ? a(e.children, n) : !1;
38
+ }), v = () => {
39
+ var n, e;
40
+ if ((n = t == null ? void 0 : t.value) != null && n.router) {
41
+ const o = window.location.href;
42
+ var r = T((l) => o == null ? void 0 : o.includes(l == null ? void 0 : l.route));
43
+ return r == null ? void 0 : r.map((l) => String(f(l)));
44
+ }
45
+ return (e = m == null ? void 0 : m.value) == null ? void 0 : e.map((o) => String(o == null ? void 0 : o.value));
46
+ }, _ = h(() => {
47
+ var r;
48
+ return (r = v()) == null ? void 0 : r.find((n) => a(u == null ? void 0 : u.value, n));
49
+ }), s = h(() => {
50
+ var n;
51
+ let r = (n = v()) == null ? void 0 : n.filter((e) => c(u == null ? void 0 : u.value, e));
52
+ return V(r), ((r == null ? void 0 : r.length) || 0) <= 0 ? null : r;
53
+ }), V = (r) => {
54
+ var n;
55
+ (n = u == null ? void 0 : u.value) == null || n.forEach((e) => {
56
+ var o;
57
+ (o = p.value) == null || o.close(String(e == null ? void 0 : e.value));
58
+ }), r == null || r.forEach((e) => {
59
+ var o;
60
+ (o = p.value) == null || o.open(String(e));
61
+ });
62
+ };
63
+ return _.value && j(t.value, { defaultActive: _.value }), s.value && j(t.value, { defaultOpeneds: s.value }), E({ ...F }), (r, n) => {
64
+ const e = $("el-menu");
65
+ return d(), y(N, S(r.$props, {
66
+ "prop-options": { fieldObj: i(I) }
67
+ }), {
68
+ default: M(({ data: o }) => [
69
+ (d(), y(e, S({
70
+ ref_key: "fieldEditor",
71
+ ref: p,
72
+ key: i(b)
73
+ }, i(t), g(i(A)), {
74
+ class: o.injectClass,
75
+ style: o.injectStyle
76
+ }), {
77
+ default: M(() => {
78
+ var l;
79
+ return [
80
+ B(H, {
81
+ items: i(u),
82
+ useRouter: (l = i(t)) == null ? void 0 : l.router
83
+ }, null, 8, ["items", "useRouter"])
84
+ ];
85
+ }),
86
+ _: 2
87
+ }, 1040, ["class", "style"]))
88
+ ]),
89
+ _: 1
90
+ }, 16, ["prop-options"]);
91
+ };
92
+ }
93
+ });
94
+ export {
95
+ ce as default
96
+ };
@@ -0,0 +1,122 @@
1
+ import { defineComponent as O, resolveComponent as S, openBlock as _, createBlock as v, mergeProps as W, unref as r, withCtx as y, createElementVNode as g, createElementBlock as $, Fragment as j, renderList as K, resolveDynamicComponent as L, createTextVNode as h, toDisplayString as B, createCommentVNode as C } from "vue";
2
+ import { I as M } from "./widget-base-4c2d6265.js";
3
+ import { c as q } from "./share-field-451430de.js";
4
+ import { _ as z } from "./widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-bbe0cabe.js";
5
+ import { W as w } from "./enum-type-255ade69.js";
6
+ import { c as I } from "./baseImp-8c4be88e.js";
7
+ import { a as x } from "./enum-type-287a50b6.js";
8
+ import { Plus as G, Edit as H } from "./index-ddd23411.js";
9
+ import "./emitter-2b9b9409.js";
10
+ import "./icon-2bb9fa65.js";
11
+ import "./template-c30585f4.js";
12
+ import "./_commonjsHelpers-e7ea1525.js";
13
+ import "./uuid-39f0308a.js";
14
+ import "./multirow-e1e1205c.js";
15
+ import "./index-f146282d.js";
16
+ import "./optionItem-0ac4a3ae.js";
17
+ import "./index-7fa591e3.js";
18
+ import "./slot-04a83a27.js";
19
+ import "./index-ffbcbc43.js";
20
+ import "./_plugin-vue_export-helper-dad06003.js";
21
+ import "./dialog-5e196819.js";
22
+ import "element-plus";
23
+ const J = { style: { display: "flex", "flex-direction": "row" } }, Q = { style: { flex: "1" } }, ge = /* @__PURE__ */ O({
24
+ __name: "model-widget",
25
+ props: {
26
+ ...M
27
+ },
28
+ setup(F, { expose: T }) {
29
+ const R = F, { exposed: n, attrs: e, events: c, instance: k, optionItems: b, fieldObj: P } = q(R), V = x.i18nt("designer.hint.addButtonText"), A = x.i18nt("designer.hint.saveButtonText"), D = (o) => {
30
+ var s, p, i;
31
+ if (!((s = e == null ? void 0 : e.value) != null && s.appendOnClick))
32
+ return;
33
+ const a = (p = e == null ? void 0 : e.value) == null ? void 0 : p.relatedIds;
34
+ if (!a || (a == null ? void 0 : a.length) <= 0)
35
+ return;
36
+ const { transFormula: l } = I();
37
+ (i = Array.from(a)) == null || i.forEach((t, m) => {
38
+ var f;
39
+ const d = l(t), u = n == null ? void 0 : n.findRefById(d, k);
40
+ n == null || n.callRefFunc(u, w.insertOnMousePos, { content: o == null ? void 0 : o[(f = e == null ? void 0 : e.value) == null ? void 0 : f.contentKey] });
41
+ });
42
+ }, E = () => {
43
+ var i, t, m, d;
44
+ const o = (i = e == null ? void 0 : e.value) == null ? void 0 : i.relatedIds;
45
+ if (!o || (o == null ? void 0 : o.length) <= 0)
46
+ return;
47
+ const { transFormula: a } = I(), l = a(o == null ? void 0 : o[0]), s = n == null ? void 0 : n.findRefById(l, k);
48
+ var p = n == null ? void 0 : n.callRefFunc(s, w.getValue);
49
+ (d = (t = c == null ? void 0 : c.value) == null ? void 0 : t.save) == null || d.call(t, p, (m = e == null ? void 0 : e.value) == null ? void 0 : m.operateData);
50
+ }, N = () => {
51
+ var o, a, l;
52
+ (l = (o = c == null ? void 0 : c.value) == null ? void 0 : o.add) == null || l.call(o, (a = e == null ? void 0 : e.value) == null ? void 0 : a.operateData);
53
+ };
54
+ return T({
55
+ ...n
56
+ }), (o, a) => {
57
+ const l = S("el-button");
58
+ return _(), v(z, W(o.$props, {
59
+ "prop-options": { fieldObj: r(P) }
60
+ }), {
61
+ default: y(({ data: s }) => {
62
+ var p, i;
63
+ return [
64
+ g("div", J, [
65
+ g("div", Q, [
66
+ (_(!0), $(j, null, K(r(b), (t, m) => {
67
+ var d;
68
+ return _(), v(L(`el-${(d = r(e)) == null ? void 0 : d.compName}`), {
69
+ key: m,
70
+ style: { cursor: "pointer", margin: "3px" },
71
+ onClick: () => {
72
+ var u, f;
73
+ D(t), (f = (u = r(c)) == null ? void 0 : u.click) == null || f.call(u, t);
74
+ }
75
+ }, {
76
+ default: y(() => [
77
+ h(B(t == null ? void 0 : t.label), 1)
78
+ ]),
79
+ _: 2
80
+ }, 1032, ["onClick"]);
81
+ }), 128))
82
+ ]),
83
+ g("div", null, [
84
+ (p = r(e)) != null && p.showAddButton ? (_(), v(l, {
85
+ key: 0,
86
+ onClick: N,
87
+ icon: r(G)
88
+ }, {
89
+ default: y(() => {
90
+ var t;
91
+ return [
92
+ h(B(((t = r(e)) == null ? void 0 : t.addButtonText) || r(V)), 1)
93
+ ];
94
+ }),
95
+ _: 1
96
+ }, 8, ["icon"])) : C("", !0),
97
+ (i = r(e)) != null && i.showSaveButton ? (_(), v(l, {
98
+ key: 1,
99
+ type: "primary",
100
+ onClick: E,
101
+ icon: r(H)
102
+ }, {
103
+ default: y(() => {
104
+ var t;
105
+ return [
106
+ h(B(((t = r(e)) == null ? void 0 : t.saveButtonText) || r(A)), 1)
107
+ ];
108
+ }),
109
+ _: 1
110
+ }, 8, ["icon"])) : C("", !0)
111
+ ])
112
+ ])
113
+ ];
114
+ }),
115
+ _: 1
116
+ }, 16, ["prop-options"]);
117
+ };
118
+ }
119
+ });
120
+ export {
121
+ ge as default
122
+ };
@@ -0,0 +1,292 @@
1
+ var P = Object.defineProperty;
2
+ var j = (s, l, e) => l in s ? P(s, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[l] = e;
3
+ var $ = (s, l, e) => (j(s, typeof l != "symbol" ? l + "" : l, e), e);
4
+ import { B as T, b as p, r as ll, c as sl } from "./baseImp-8c4be88e.js";
5
+ import { g as el, b as nl, t as tl, r as ol } from "./index-f146282d.js";
6
+ import { g as gl } from "./slot-04a83a27.js";
7
+ import { h as ul, d as G, m as x, o as V, k as il, t as X, b as Y } from "./enum-type-287a50b6.js";
8
+ import { inject as M, provide as A, computed as S, reactive as R, watch as fl } from "vue";
9
+ import { u as rl } from "./icon-2bb9fa65.js";
10
+ import { c as cl, u as bl, g as al } from "./uuid-39f0308a.js";
11
+ import { d as w, c as F, g as Z } from "./template-c30585f4.js";
12
+ import { u as hl } from "./emitter-2b9b9409.js";
13
+ class z {
14
+ constructor() {
15
+ /**
16
+ * 当前表单引用库
17
+ * 假设表单组件位于表单form中,则该引用注册入库
18
+ */
19
+ $(this, "formRefList", {});
20
+ /**
21
+ * 全局引用库
22
+ */
23
+ $(this, "globalRefList", {});
24
+ /**
25
+ * 全局数据对象
26
+ */
27
+ $(this, "globalDataModel", {});
28
+ /**
29
+ * 当前表单名称
30
+ */
31
+ $(this, "globalFormName", "");
32
+ /**
33
+ * 全局页面名称
34
+ */
35
+ $(this, "globalPageName", "");
36
+ /**
37
+ * 用于类似template组件的数据绑定传递
38
+ */
39
+ $(this, "rowScope", {});
40
+ /**
41
+ * 渲染器调用者传入的配置参数,如接口地址、密钥等
42
+ */
43
+ $(this, "globalConfig", {});
44
+ }
45
+ static globalInject() {
46
+ const l = new z();
47
+ return l.formRefList = M(w.refList, {}), l.globalRefList = M(w.allRefList, {}), l.globalDataModel = M(w.globalModel, {}), l.rowScope = M(w.rowScope, {}), l.globalFormName = M(w.globalForm, ""), l.globalPageName = M(w.globalPage, ""), l.globalConfig = M(w.globalConfig, {}), l;
48
+ }
49
+ static globalProvide(l) {
50
+ if ((l == null ? void 0 : l.globalDataModel) !== void 0) {
51
+ const e = (l == null ? void 0 : l.globalDataModel) || {};
52
+ A(w.globalModel, e);
53
+ }
54
+ if ((l == null ? void 0 : l.rowScope) !== void 0) {
55
+ const e = (l == null ? void 0 : l.rowScope) || {};
56
+ A(w.rowScope, e);
57
+ }
58
+ if ((l == null ? void 0 : l.globalRefList) !== void 0) {
59
+ const e = (l == null ? void 0 : l.globalRefList) || {};
60
+ A(w.allRefList, e);
61
+ }
62
+ if ((l == null ? void 0 : l.formRefList) !== void 0) {
63
+ const e = (l == null ? void 0 : l.formRefList) || {};
64
+ A(w.refList, e);
65
+ }
66
+ if ((l == null ? void 0 : l.globalFormName) !== void 0) {
67
+ const e = (l == null ? void 0 : l.globalFormName) || "";
68
+ A(w.globalForm, e);
69
+ }
70
+ if ((l == null ? void 0 : l.globalPageName) !== void 0) {
71
+ const e = (l == null ? void 0 : l.globalPageName) || "";
72
+ A(w.globalPage, e);
73
+ }
74
+ if ((l == null ? void 0 : l.globalConfig) !== void 0) {
75
+ const e = (l == null ? void 0 : l.globalConfig) || "";
76
+ A(w.globalConfig, e);
77
+ }
78
+ }
79
+ }
80
+ function Cl(s) {
81
+ const l = (h, H = !1) => T.getOptions(s == null ? void 0 : s.widget, h, H, !(s != null && s.designState)), e = S(() => l(F.ctrlWidth) || "auto"), u = S(() => l(F.ctrlHeight) || "auto"), o = S(() => {
82
+ var h = l(F.customClass);
83
+ return Array.isArray(h) ? h == null ? void 0 : h.join(" ") : "";
84
+ }), n = S(() => {
85
+ var h = l(F.componentWrapperClass);
86
+ return Array.isArray(h) ? h == null ? void 0 : h.join(" ") : "";
87
+ }), b = S(() => {
88
+ var h, H;
89
+ return (H = cl((h = l(F.required, !0)) == null ? void 0 : h.options)) == null ? void 0 : H.enable;
90
+ }), r = S(() => l(F.displayLayout)), c = S(() => l(F.labelTooltip)), i = S(() => l(F.labelIconClass)), a = S(() => l(F.labelIconPosition)), W = S(() => l(F.labelHidden)), N = S(() => l(F.label)), L = S(() => l(F.labelWidth)), m = S(() => l(F.labelAlign));
91
+ return {
92
+ //size,
93
+ attrs: S(() => ({
94
+ required: b.value,
95
+ label: N.value,
96
+ labelHidden: W.value,
97
+ labelAlign: m.value,
98
+ labelIconClass: i.value,
99
+ labelIconPosition: a.value,
100
+ labelTooltip: c.value,
101
+ labelWidth: L.value,
102
+ ctrlWidth: e.value
103
+ })),
104
+ labelAlign: m,
105
+ labelHidden: W,
106
+ labelIconClass: i,
107
+ labelIconPosition: a,
108
+ labelTooltip: c,
109
+ labelWidth: L,
110
+ label: N,
111
+ displayLayout: r,
112
+ // hidden,
113
+ // required,
114
+ ctrlWidth: e,
115
+ ctrlHeight: u,
116
+ customClass: o,
117
+ componentWrapperClass: n
118
+ };
119
+ }
120
+ const J = "", K = "_", k = (s, l) => ul(l) ? s || "" : `${J}${s}${K}${l}`, U = (s) => {
121
+ if (s != null && s.includes(K)) {
122
+ var l = s.split(K);
123
+ const e = l == null ? void 0 : l[0].substring(J.length), u = s.substring(J.length + e.length + 1);
124
+ return { id: e, groupName: u };
125
+ }
126
+ return { id: s };
127
+ };
128
+ var Nl = /* @__PURE__ */ ((s) => (s[s.None = 0] = "None", s[s.Inner2Inner = 1] = "Inner2Inner", s[s.Inner2Outer = 2] = "Inner2Outer", s[s.Outer2Inner = 3] = "Outer2Inner", s[s.Outer2Outer = 4] = "Outer2Outer", s[s.DiffInner = 5] = "DiffInner", s))(Nl || {});
129
+ const Vl = (s, l) => {
130
+ const e = U(s), u = e == null ? void 0 : e.groupName, o = U(l), n = o == null ? void 0 : o.groupName;
131
+ return !u && !n ? 4 : u && !n ? 2 : u && n ? u !== n ? 5 : 1 : !u && n ? 3 : 0;
132
+ };
133
+ function Sl(s, l) {
134
+ const e = l == null ? void 0 : l.pageConfig, u = l == null ? void 0 : l.formData;
135
+ l == null || l.designState;
136
+ const o = R(u || {});
137
+ return rl(), {
138
+ formModel: o,
139
+ pageConfig: e,
140
+ widgetList: s,
141
+ initData: () => {
142
+ var i = el(s);
143
+ i == null || i.forEach((a) => {
144
+ const { computedDefaultValue: W, fieldName: N } = p(a.field, l, { s_fieldName: !0, s_defaultValue: !0 });
145
+ N.value && G(o, { [N.value]: W.value });
146
+ });
147
+ },
148
+ setData: (i) => {
149
+ x(o) ? V(o).forEach((a) => {
150
+ i && i.hasOwnProperty(a) && (o[a] = il(i[a]));
151
+ }) : G(o, i);
152
+ },
153
+ getData: () => ll(o),
154
+ clearData: () => {
155
+ for (let i in o)
156
+ delete o[i];
157
+ }
158
+ };
159
+ }
160
+ function wl() {
161
+ const s = (o, n) => ol(o, { newName: !0, recordSource: !0 }, (b, r) => k(b || r, n)), l = (o, n, b) => {
162
+ var W, N;
163
+ Y(b) && (b = `${(W = bl()) == null ? void 0 : W.substring(0, 5)}_${!Y(n == null ? void 0 : n.$index) && (n == null ? void 0 : n.$index) >= 0 ? n == null ? void 0 : n.$index : ""}`);
164
+ var r = gl(o, !0);
165
+ let c = r == null ? void 0 : r.map((L) => s(L, b));
166
+ const i = u(c), { updateFomulaName: a } = sl();
167
+ return (N = V(i)) == null || N.forEach((L) => {
168
+ const m = i[L], q = m == null ? void 0 : m.name;
169
+ c = a(c, q, L);
170
+ }), { widget: c, id: al(), data: n };
171
+ }, e = (o, n, b, r) => {
172
+ if (n || (n = []), b && (n == null ? void 0 : n.length) < b) {
173
+ const a = b - (n == null ? void 0 : n.length);
174
+ for (var c = 0; c < a; c++) {
175
+ var i = {};
176
+ n == null || n.push(i);
177
+ }
178
+ }
179
+ return n == null ? void 0 : n.map((a, W) => {
180
+ const N = r ? r(a, W) : a;
181
+ return l(o, N, W + "");
182
+ });
183
+ }, u = (o, n) => {
184
+ let b = {};
185
+ return o && tl(o, (r) => {
186
+ const c = T.getName(r), i = () => {
187
+ c && (b[c] = r == null ? void 0 : r._source);
188
+ };
189
+ n ? n(r) && i() : i();
190
+ }), b;
191
+ };
192
+ return {
193
+ newSlot: l,
194
+ reflectTargetWithSourceOne: u,
195
+ getSlotFromData: e,
196
+ parseGroupId: U,
197
+ formatGroupId: k
198
+ };
199
+ }
200
+ function Hl(s) {
201
+ const l = s == null ? void 0 : s.fieldName, e = R({}), u = R([]), { newSlot: o, reflectTargetWithSourceOne: n, getSlotFromData: b } = wl(), r = (t, g) => {
202
+ var _;
203
+ let f = {};
204
+ const C = n(g);
205
+ return (_ = V(t)) == null || _.map((E) => {
206
+ var O, B, Q;
207
+ const D = (O = C == null ? void 0 : C[E]) == null ? void 0 : O.name;
208
+ D && (f[D] = t == null ? void 0 : t[E], (Q = (B = V(t)) == null ? void 0 : B.filter((y) => y.startsWith(E + "_"))) == null || Q.forEach((y) => {
209
+ f[y == null ? void 0 : y.replace(E, D)] = t == null ? void 0 : t[y];
210
+ }));
211
+ }), f;
212
+ }, c = (t, g) => {
213
+ var _, E;
214
+ let f = {};
215
+ if (x(t)) {
216
+ const D = n(g, (O) => !!(O != null && O.formItemFlag));
217
+ (_ = V(D)) == null || _.map((O) => {
218
+ var B;
219
+ O && (f[O] = t == null ? void 0 : t[(B = D == null ? void 0 : D[O]) == null ? void 0 : B.name]);
220
+ });
221
+ } else {
222
+ var C = { pageConfig: (E = s == null ? void 0 : s.designer) == null ? void 0 : E.pageConfig, formData: f, designState: s == null ? void 0 : s.designState };
223
+ const { initData: D } = Sl(g, C);
224
+ D();
225
+ }
226
+ return f;
227
+ }, i = (t, g) => {
228
+ const f = c(g, t.widget);
229
+ G(e, f);
230
+ }, a = (t) => {
231
+ var f;
232
+ const g = c({}, t.widget);
233
+ (f = V(g)) == null || f.forEach((C) => delete e[C]);
234
+ }, W = () => {
235
+ var t;
236
+ (t = V(e)) == null || t.forEach((g) => delete e[g]);
237
+ }, N = () => u == null ? void 0 : u.map((g) => r(e, g == null ? void 0 : g.widget)), L = (t, g) => {
238
+ W();
239
+ const f = g(t);
240
+ return f == null || f.forEach((C) => {
241
+ const _ = c(C == null ? void 0 : C.data, C == null ? void 0 : C.widget);
242
+ G(e, _);
243
+ }), u.splice(0, u.length, ...f), u;
244
+ }, m = (t) => {
245
+ var f;
246
+ var g = Cl({ ...s, widget: t });
247
+ return (f = g.attrs) == null ? void 0 : f.value;
248
+ }, q = (t, g, f) => nl(t, g, u, f), h = (t) => {
249
+ var g = N();
250
+ fl(() => e, (f) => {
251
+ var C = N();
252
+ X(C) != X(g) && t(C);
253
+ }, { deep: !0, immediate: !0 });
254
+ }, { off$: H, on$: v, emit$: d } = hl(), I = () => {
255
+ H(Z.fieldChange), v(Z.fieldChange, (t) => {
256
+ var g;
257
+ (g = s == null ? void 0 : s.fieldChanged) == null || g.call(s);
258
+ });
259
+ };
260
+ return (() => {
261
+ const t = l;
262
+ z.globalProvide({
263
+ globalFormName: t,
264
+ globalDataModel: e
265
+ }), I();
266
+ })(), {
267
+ getSlotFromData: b,
268
+ fromModel: c,
269
+ toModel: r,
270
+ newSlot: o,
271
+ getWidgetOption: m,
272
+ newFieldModelFromSlot: i,
273
+ removeFieldModelFromSlot: a,
274
+ getValue: N,
275
+ setValue: L,
276
+ findWidgetByNameWithSibId: q,
277
+ listenFormModel: h,
278
+ emit$: d,
279
+ formModel: e,
280
+ rowsData: u
281
+ };
282
+ }
283
+ export {
284
+ z as F,
285
+ wl as a,
286
+ Hl as b,
287
+ Cl as c,
288
+ Nl as f,
289
+ Vl as g,
290
+ U as p,
291
+ Sl as u
292
+ };