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,690 @@
1
+ var Yt = Object.defineProperty;
2
+ var Zt = (t, n, d) => n in t ? Yt(t, n, { enumerable: !0, configurable: !0, writable: !0, value: d }) : t[n] = d;
3
+ var He = (t, n, d) => (Zt(t, typeof n != "symbol" ? n + "" : n, d), d);
4
+ import { onMounted as Xe, nextTick as Ye, onActivated as wt, onErrorCaptured as en, watch as le, reactive as Ue, ref as Y, computed as tn, onBeforeUnmount as nn, isRef as ke, toRefs as on } from "vue";
5
+ import { l as rn, h as Ee, o as X, m as Z, w as sn, d as Q, F as un, t as Ze, f as an, b as cn, k as ye, y as fn } from "./enum-type-287a50b6.js";
6
+ import { u as ln } from "./emitter-2b9b9409.js";
7
+ import { u as we } from "./icon-2bb9fa65.js";
8
+ import { g as L, m as Oe, n as mn, o as qe, c as K, f as vn } from "./template-c30585f4.js";
9
+ import { b as et, d as Re, B as J, P as Ce, c as tt, e as gn, a as dn, h as pn, g as Ge } from "./baseImp-8c4be88e.js";
10
+ import { p as Je, a as nt, g as hn, f as fe, F as Vn } from "./multirow-e1e1205c.js";
11
+ import { c as ve, k as Me, l as yn } from "./uuid-39f0308a.js";
12
+ import { f as bn, d as En, h as be, e as On } from "./index-f146282d.js";
13
+ import { W as U, d as $ } from "./enum-type-255ade69.js";
14
+ function Rn() {
15
+ return {
16
+ onMountedOrActivated: (d) => {
17
+ let S = !1;
18
+ Xe(() => {
19
+ d(), Ye(() => {
20
+ S = !0;
21
+ });
22
+ }), wt(() => {
23
+ S && d();
24
+ });
25
+ },
26
+ onCompErrorCaptured: () => {
27
+ en((d) => (console.log(d), !1));
28
+ }
29
+ };
30
+ }
31
+ function Cn(t, n) {
32
+ const { getWidgetOption: d, getWidgetOptionByPropValue: S } = et(t, n), W = (_) => d(_);
33
+ return {
34
+ existFunc: W,
35
+ handleFunc: (_, N) => {
36
+ if (rn(_)) {
37
+ var T = W(String(_));
38
+ return Re(T, N);
39
+ } else {
40
+ var T = S(ve(_));
41
+ return Re(T, N);
42
+ }
43
+ }
44
+ };
45
+ }
46
+ class Se {
47
+ constructor(n) {
48
+ He(this, "refList", {});
49
+ n && (this.refList = n);
50
+ }
51
+ initRefList() {
52
+ this.refList || (this.refList = {});
53
+ }
54
+ getWidgetRef(n) {
55
+ if (n)
56
+ return this.initRefList(), this.refList[n];
57
+ }
58
+ setWidgetRef(n, d) {
59
+ n && (this.initRefList(), this.refList[n] = d);
60
+ }
61
+ removeWidgetRef(n) {
62
+ n && this.refList && delete this.refList[n.toString()];
63
+ }
64
+ }
65
+ function me(t) {
66
+ t || (t = {});
67
+ const n = new Se(t), { instance: d } = we(), S = (v) => n.getWidgetRef(v == null ? void 0 : v.toString()), W = (v, V, h) => {
68
+ var R = [], o = [];
69
+ let f = S(v);
70
+ return f && R.push(f), R == null || R.forEach((r) => {
71
+ var s = _(r, V, h);
72
+ s && o.push(s);
73
+ }), o;
74
+ }, c = (v, V) => {
75
+ var h;
76
+ return (h = v == null ? void 0 : v.exposed) == null ? void 0 : h[V.toString()];
77
+ }, _ = (v, V, h) => {
78
+ var R = c(v, V);
79
+ if (R) {
80
+ var o = [];
81
+ return h && (o = Object.values(h)), R(...o);
82
+ }
83
+ }, N = (v, V, h) => {
84
+ var R = [];
85
+ if (v) {
86
+ var o = ve(Me(v, !0));
87
+ o == null || o.forEach((f) => {
88
+ var r = W(f, V, h);
89
+ Ee(r) || R.push(r);
90
+ });
91
+ }
92
+ return Array.isArray(v) ? R : R == null ? void 0 : R[0];
93
+ }, T = (v, V) => {
94
+ let h = X(t);
95
+ N(h, v, V);
96
+ }, l = (v, V) => {
97
+ var s, a, m;
98
+ const h = (a = (s = V || d) == null ? void 0 : s.exposed) == null ? void 0 : a.getField();
99
+ var R = Je(h == null ? void 0 : h.id);
100
+ const o = (i) => (i == null ? void 0 : i.id) === v, f = (i) => {
101
+ var C;
102
+ var b = Je(i == null ? void 0 : i.id);
103
+ return (R == null ? void 0 : R.groupName) === (b == null ? void 0 : b.groupName) && ((b == null ? void 0 : b.id) === v || ((C = i == null ? void 0 : i._source) == null ? void 0 : C.id) === v);
104
+ }, r = (m = X(n.refList)) == null ? void 0 : m.find((i) => {
105
+ var C, I;
106
+ try {
107
+ const D = (I = (C = n.refList[i]) == null ? void 0 : C.exposed) == null ? void 0 : I.getField();
108
+ var b = o(D);
109
+ return !b && (R != null && R.groupName) && (b = f(D)), b;
110
+ } catch {
111
+ return !1;
112
+ }
113
+ });
114
+ if (r)
115
+ return S(r);
116
+ }, p = (v) => {
117
+ if (v) {
118
+ let V = v;
119
+ n == null || n.setWidgetRef(V, d);
120
+ }
121
+ }, O = (v) => {
122
+ if (v) {
123
+ let V = v;
124
+ n == null || n.removeWidgetRef(V);
125
+ }
126
+ };
127
+ return {
128
+ findWidgetAndCall: W,
129
+ getWidgetRef: S,
130
+ callWidgetsExposed: N,
131
+ callRefFunc: _,
132
+ existRefFunc: c,
133
+ setAllRefList: T,
134
+ findRefById: l,
135
+ findRefByName: S,
136
+ changeRegisterToRefList: (v, V) => {
137
+ v && (p(v), O(V));
138
+ },
139
+ registerToRefList: p,
140
+ unregisterFromRefList: O
141
+ };
142
+ }
143
+ const Mn = (t, n, d) => {
144
+ const S = new Se(t), { callRefFunc: W } = me(t), { parseGroupId: c } = nt();
145
+ if (!t || t.length <= 0 || !n)
146
+ return;
147
+ const _ = () => {
148
+ var o, f;
149
+ return (f = (o = X(t)) == null ? void 0 : o.map((r) => W(t == null ? void 0 : t[r], U.getField))) == null ? void 0 : f.filter((r) => !!r);
150
+ }, N = (o) => {
151
+ var a;
152
+ const f = (a = _()) == null ? void 0 : a.find((m) => (m == null ? void 0 : m.id) === o);
153
+ if (!f)
154
+ return;
155
+ const r = J.getName(f), s = S.getWidgetRef(r);
156
+ if (s)
157
+ return { ref: s, name: r, id: f == null ? void 0 : f.id };
158
+ }, T = (o, f) => {
159
+ if (!Z(f))
160
+ return;
161
+ const r = J.getName(o), s = S.getWidgetRef(r);
162
+ if (s) {
163
+ const a = J.getOptions(o, L.defaultValue, !1, !(d != null && d.designState), { ...d, formData: f });
164
+ Z(a) && W(s, U.setValue, { newValue: a });
165
+ }
166
+ }, l = (o, f) => {
167
+ const r = N(o);
168
+ if (!r)
169
+ return;
170
+ const s = r.name, a = W(r.ref, U.getValue), m = W(r.ref, U.getCheckedItems), i = {};
171
+ return Ee(a) || (i[s] = a), !cn(m) && !f && (i[`${s}${Oe.checkedOptions}`] = m), i;
172
+ }, p = (o, f) => {
173
+ var s;
174
+ var r = [];
175
+ if ((s = _()) == null || s.forEach((a) => {
176
+ if (!a)
177
+ return;
178
+ const m = a == null ? void 0 : a.id;
179
+ var i = m === o;
180
+ const b = c(m), C = (b == null ? void 0 : b.id) === o, I = (b == null ? void 0 : b.groupName) === f;
181
+ return i || C && (I || !f) ? (r.push(a), !0) : !1;
182
+ }), !(!r || r.length <= 0))
183
+ return r == null ? void 0 : r.map((a) => {
184
+ var m;
185
+ return {
186
+ id: a == null ? void 0 : a.id,
187
+ name: (m = a == null ? void 0 : a._source) == null ? void 0 : m.name,
188
+ source: a == null ? void 0 : a._source
189
+ };
190
+ });
191
+ }, O = (o, f) => {
192
+ var r = [];
193
+ if (!o || (o == null ? void 0 : o.length) <= 0)
194
+ return r;
195
+ const s = c(n), a = s == null ? void 0 : s.groupName;
196
+ return f === fe.Inner2Outer ? o == null || o.forEach((m) => {
197
+ var i = p(m);
198
+ i && (i == null ? void 0 : i.length) > 0 && r.push(...i);
199
+ }) : o == null || o.forEach((m) => {
200
+ var i = p(m, a);
201
+ i && (i == null ? void 0 : i.length) > 0 && r.push(...i);
202
+ }), r;
203
+ }, B = (o, f) => {
204
+ const r = {};
205
+ if (!o || o.length <= 0)
206
+ return r;
207
+ if (f === fe.Inner2Outer) {
208
+ var s = sn(o, (a) => {
209
+ var m;
210
+ return (m = a.source) == null ? void 0 : m.id;
211
+ });
212
+ s == null || s.forEach((a) => {
213
+ var b;
214
+ const m = a.group[0], i = [];
215
+ (b = a == null ? void 0 : a.children) == null || b.forEach((C) => {
216
+ const I = l(C == null ? void 0 : C.id, !0);
217
+ if (Z(I)) {
218
+ var D = Object.values(ve(I));
219
+ i.push(...D);
220
+ }
221
+ }), m && Q(r, { [m]: i });
222
+ });
223
+ } else
224
+ o.forEach((a) => {
225
+ const m = l(a == null ? void 0 : a.id);
226
+ Z(m) && Q(r, m);
227
+ });
228
+ return r;
229
+ }, v = (o) => {
230
+ var f = {};
231
+ return o == null || o.forEach((r) => {
232
+ var s;
233
+ r != null && r.source && (r != null && r.id) && (f[(s = r == null ? void 0 : r.source) == null ? void 0 : s.id] = r == null ? void 0 : r.id);
234
+ }), f;
235
+ }, V = (o, f, r) => {
236
+ if (r === fe.Inner2Inner) {
237
+ const i = un(f), { updateFomula: b } = tt(), { buildVariable: C } = gn();
238
+ var s = v(o);
239
+ if (Z(s)) {
240
+ var a = J.getOrgOption(f, L.defaultValue), m = b(Ze(a), s, (I, D) => {
241
+ var j = s[I];
242
+ return Ee(j) ? C(I) : C(j);
243
+ });
244
+ return J.setOrgOption(i, L.defaultValue, an(m)), i;
245
+ }
246
+ }
247
+ return f;
248
+ }, h = (o) => {
249
+ const f = o == null ? void 0 : o.id;
250
+ var r = J.getOrgOption(o, L.defaultValue);
251
+ if (r === void 0)
252
+ return;
253
+ const s = hn(n, f);
254
+ if (s === fe.DiffInner)
255
+ return;
256
+ var a = Ce.getFormulaRelatedField(r);
257
+ if (!a || a.length <= 0)
258
+ return;
259
+ var m = O(a, s);
260
+ if (!(m != null && m.some((b) => b.id === n)))
261
+ return;
262
+ const i = B(m, s);
263
+ T(V(m, o, s), i);
264
+ };
265
+ (() => {
266
+ var o;
267
+ (o = _()) == null || o.forEach((f) => {
268
+ h(f);
269
+ });
270
+ })();
271
+ }, Sn = (t, n, d, S, W) => {
272
+ var O, B, v;
273
+ if (W || !Z(d))
274
+ return;
275
+ const { callRefFunc: c } = me(t), _ = (B = (O = X(t)) == null ? void 0 : O.map((V) => c(t == null ? void 0 : t[V], U.getField))) == null ? void 0 : B.filter((V) => !!V), { parseGroupId: N } = nt(), T = new Se(t);
276
+ var l = N(n), p = l == null ? void 0 : l.groupName;
277
+ (v = X(d)) == null || v.forEach((V) => {
278
+ var R, o, f;
279
+ if (!((R = Me(S == null ? void 0 : S.newValue, !0)) != null && R.includes(V)))
280
+ return;
281
+ const h = (o = d == null ? void 0 : d[V]) == null ? void 0 : o.result;
282
+ (f = X(h)) == null || f.forEach((r) => {
283
+ var a;
284
+ const s = h == null ? void 0 : h[r];
285
+ (a = s == null ? void 0 : s.ids) == null || a.forEach((m) => {
286
+ var I;
287
+ const i = (I = bn(_, (D) => {
288
+ var j, w;
289
+ return ((D == null ? void 0 : D.id) === m || ((j = D == null ? void 0 : D._source) == null ? void 0 : j.id) === m) && (!p || ((w = D == null ? void 0 : D.id) == null ? void 0 : w.indexOf(p)) != -1);
290
+ })) == null ? void 0 : I[0];
291
+ if (!i)
292
+ return;
293
+ const b = J.getName(i), C = T.getWidgetRef(b);
294
+ C ? c(C, s == null ? void 0 : s.event, s == null ? void 0 : s.args) : le(() => t, (D) => {
295
+ const j = T.getWidgetRef(b);
296
+ j && c(j, s == null ? void 0 : s.event, s == null ? void 0 : s.args);
297
+ });
298
+ });
299
+ });
300
+ });
301
+ };
302
+ function ot(t, n) {
303
+ var d;
304
+ return (d = t == null ? void 0 : t.classList) != null && d.contains(n) ? t : t != null && t.parentElement ? ot(t == null ? void 0 : t.parentElement, n) : null;
305
+ }
306
+ function _n() {
307
+ const t = (l) => {
308
+ if (l)
309
+ return l != null && l.ref ? l == null ? void 0 : l.ref : l;
310
+ }, n = (l) => {
311
+ var p, O;
312
+ try {
313
+ (O = (p = t(l)) == null ? void 0 : p.focus) == null || O.call(p);
314
+ } catch (B) {
315
+ console.log(B);
316
+ }
317
+ }, d = (l) => {
318
+ var p, O;
319
+ try {
320
+ (O = (p = t(l)) == null ? void 0 : p.blur) == null || O.call(p);
321
+ } catch (B) {
322
+ console.log(B);
323
+ }
324
+ }, S = (l) => {
325
+ var p;
326
+ return (p = t(l)) == null ? void 0 : p.selectionStart;
327
+ }, W = (l) => {
328
+ var p;
329
+ return (p = t(l)) == null ? void 0 : p.selectionEnd;
330
+ }, c = (l, p) => {
331
+ var O;
332
+ return (O = t(l)) == null ? void 0 : O.setSelectionRange(p, p);
333
+ }, _ = (l, p) => {
334
+ n(l), c(l, p);
335
+ };
336
+ return {
337
+ getSelectionStart: S,
338
+ getSelectionEnd: W,
339
+ setSelectionStart: c,
340
+ blur: d,
341
+ focus: n,
342
+ setMousePos: _,
343
+ getMousePos: (l) => S(l),
344
+ insertOnMousePos: (l, p, O) => {
345
+ const B = S(l), v = W(l), V = mn(O, p, B, v);
346
+ return Ye(() => {
347
+ _(l, B + (p == null ? void 0 : p.length));
348
+ }), V;
349
+ }
350
+ };
351
+ }
352
+ const ze = (t) => {
353
+ var d;
354
+ const { getFormulaFields: n } = tt();
355
+ return ((d = n(Ze(t))) == null ? void 0 : d.length) > 0;
356
+ }, re = (t) => {
357
+ const n = t.type;
358
+ return ![$.fileUpload, $.pictureUpload].includes(n) && t.formItemFlag || [$.form, $.dialog].includes(n);
359
+ }, Qe = (t) => {
360
+ const n = t.type;
361
+ return [$.treeSelect, $.cascader, $.select, $.checkbox, $.radio].includes(n);
362
+ };
363
+ function jn(t) {
364
+ const n = t == null ? void 0 : t.designState, d = (t == null ? void 0 : t.created) != !1, S = t == null ? void 0 : t.exResetField, W = t == null ? void 0 : t.extInitFieldModel, c = t == null ? void 0 : t.widget, _ = t == null ? void 0 : t.designer, N = _ == null ? void 0 : _.pageConfig;
365
+ let T = {}, l = {}, p = {}, O = Ue({});
366
+ var B = "", v = "", V = {};
367
+ if (d) {
368
+ const e = Vn.globalInject();
369
+ e && (T = e.formRefList, l = e.globalRefList, V = e.globalConfig, B = e.globalFormName || "", v = e.globalPageName || "", O = Ue(e.globalDataModel || {}), p = e.rowScope);
370
+ }
371
+ const h = me(l), R = me(T), o = () => ye(O), f = () => p, r = () => c, s = {
372
+ instance: {
373
+ exposed: {
374
+ getFormData: !n && ze(c) ? o : null,
375
+ findRefByName: h.getWidgetRef,
376
+ getField: r,
377
+ getRowScope: f
378
+ }
379
+ },
380
+ designState: n,
381
+ pageConfig: N,
382
+ formData: !n && ze(c) ? O : {},
383
+ globalConfig: V
384
+ }, a = (t == null ? void 0 : t.shareProp) || { s_attr: !0, s_extendAttr: !0, s_events: !0, s_slots: !0, s_fieldName: !0, s_defaultValue: !0, s_optionItems: !0 }, { on$: m, dispatch: i, emit$: b } = ln(), { instance: C } = we(), { onCompErrorCaptured: I } = Rn(), { existFunc: D } = Cn({ options: c == null ? void 0 : c.options }, s), { attrs: j, extendAttrs: w, events: A, slots: _e, rules: De, fieldName: P, buildRules: rt, clearRules: st, disableChangeValidate: ut, enableChangeValidate: at, optionItems: ct, filterOptionItems: Pe, activeOptionItems: it, activeOptionItem: ft, activeOptionItemIndex: lt, setOptionItems: mt, setWidgetOption: ee, getWidgetOption: Fe, setFieldEnable: vt, getFieldOptions: G, setFieldOptions: gt, computedDefaultValue: te, singleOption: dt, watchOption: pt } = et(c, s, a, C), { isIdClass: ht, getIdByIdClass: Vt } = En(c), { getOneSchemaData: yt, getSchemaDataObject: bt, getSchemaDatas: Et } = dn(s), ne = _n();
385
+ let ge = null, k = Y();
386
+ const q = Y(), Ot = () => P.value, se = (e) => Pe((u) => {
387
+ var g = Me(e || k.value, !0);
388
+ return g == null ? void 0 : g.includes(u == null ? void 0 : u.value);
389
+ }), Rt = (e) => {
390
+ var M, F;
391
+ const u = c.type, g = G(L.multiple, !1);
392
+ Ge(G(L.valueKey, !1));
393
+ const E = Ge(G(L.labelKey, !1));
394
+ switch (u) {
395
+ case $.cascader: {
396
+ if (q.value) {
397
+ const y = q.value.getCheckedNodes();
398
+ return g ? y == null ? void 0 : y.map((x) => x.pathLabels) : (M = y == null ? void 0 : y[0]) == null ? void 0 : M.pathLabels;
399
+ }
400
+ break;
401
+ }
402
+ case $.treeSelect:
403
+ case $.select:
404
+ case $.checkbox:
405
+ case $.radio: {
406
+ const y = (F = se(e)) == null ? void 0 : F.map((x) => x == null ? void 0 : x[E]);
407
+ return g ? y : y == null ? void 0 : y[0];
408
+ }
409
+ }
410
+ }, Ct = (e) => {
411
+ if (!Qe(c))
412
+ return;
413
+ var u = {};
414
+ const g = Rt(e);
415
+ let E = G("textName", !1);
416
+ [`${P.value}${Oe.optionText}`, E].forEach((y) => {
417
+ y && u[y] === void 0 && (u[y] = g);
418
+ });
419
+ var M = se(e);
420
+ let F = G("optionName", !1);
421
+ [`${P.value}${Oe.checkedOptions}`, F].forEach((y) => {
422
+ y && u[y] === void 0 && (u[y] = M);
423
+ }), Q(O, u, !0);
424
+ }, ue = (e) => {
425
+ if (re(c)) {
426
+ var u = { [P.value]: e };
427
+ Q(O, u, !0);
428
+ }
429
+ }, ae = (e) => {
430
+ n || ue(e);
431
+ }, xe = (e) => G(e, !1), We = () => {
432
+ var e = null, u = on(O);
433
+ e = Ce.getValue(Ce.get(u, P.value), !1, !n), ke(e) ? k = e : k.value = e;
434
+ }, Be = (e) => {
435
+ ge = ye(e);
436
+ }, Mt = () => {
437
+ n || W && W(z());
438
+ }, St = () => {
439
+ !n || !re(c) || (ue(te.value), We());
440
+ }, de = (e, u) => {
441
+ b(L.fieldValueChanged, { newValue: e, oldValue: u });
442
+ const g = { fieldId: c.id, fieldName: P.value, newValue: e, oldValue: u };
443
+ i(B, L.fieldChange, g, C), i(v, L.fieldChange, g, C);
444
+ }, _t = (e) => D(e), ce = (e, u) => Re(Fe(e), u), Dt = (e) => {
445
+ ae(e), je(), ce(L.onInput, { value: e });
446
+ }, Pt = (...e) => {
447
+ var E, M, F;
448
+ const g = ((E = e == null ? void 0 : e[0]) == null ? void 0 : E.target) != null ? (F = (M = e == null ? void 0 : e[0]) == null ? void 0 : M.target) == null ? void 0 : F.value : e == null ? void 0 : e[0];
449
+ ae(g), de(g, ge), je(), ce(L.onChange, { value: g, oldValue: ge }), Be(g);
450
+ }, Ft = () => {
451
+ m(vn.setFormData, (e) => {
452
+ oe(e[P.value]);
453
+ }), m(L.fieldValueChanged, (e) => {
454
+ ce(L.onChange, { value: e == null ? void 0 : e.newValue, oldValue: e == null ? void 0 : e.oldValue });
455
+ });
456
+ }, xt = () => {
457
+ let e = P.value;
458
+ re(c) ? ((!fn(O, e) || O[e] === void 0) && (te.value === void 0 ? ue(null) : ue(te.value)), We()) : oe(te.value), Be(z()), Mt();
459
+ }, Wt = () => {
460
+ var e, u;
461
+ d && (Xe(() => {
462
+ var g, E;
463
+ try {
464
+ (E = (g = A == null ? void 0 : A.value) == null ? void 0 : g.mounted) == null || E.call(g), Gt();
465
+ } catch (M) {
466
+ console.log(M);
467
+ }
468
+ }), nn(() => {
469
+ h.unregisterFromRefList(P.value), R.unregisterFromRefList(P.value);
470
+ }), h.registerToRefList(P.value), R.registerToRefList(P.value), xt(), ie(), Ft(), be(c, "change") && (A.value.change = Pt), be(c, "input") && (A.value.input = Dt), (u = (e = A == null ? void 0 : A.value) == null ? void 0 : e.created) == null || u.call(e), I());
471
+ }, Bt = (e = !0) => {
472
+ ee(K.readonly, e);
473
+ }, Lt = (e = !0) => {
474
+ ee(K.disabled, e);
475
+ }, Tt = (e = !0) => {
476
+ ee(K.hidden, e), e ? Ae() : ie();
477
+ }, It = (e = !0) => {
478
+ vt(K.required, e), ie();
479
+ }, $t = (e) => {
480
+ ee(K.label, e);
481
+ }, z = () => k.value, Le = (e) => {
482
+ k.value = e;
483
+ }, oe = (e) => {
484
+ let u = ye(z());
485
+ if (Le(e), !re(c))
486
+ return;
487
+ const g = z();
488
+ u !== g && (ae(g), de(g, u));
489
+ }, Nt = () => {
490
+ oe(te.value), S == null || S();
491
+ }, jt = (e) => {
492
+ const u = z(), g = ne.insertOnMousePos(q.value, e, u);
493
+ oe(g);
494
+ }, Kt = (e, u) => {
495
+ le(() => k.value, (g, E) => {
496
+ e == null || e({ id: c.id, name: P.value, newValue: g, oldValue: E });
497
+ }, u);
498
+ }, At = (e) => {
499
+ var F;
500
+ e.preventDefault();
501
+ const u = (y) => {
502
+ var H;
503
+ const x = (H = Array.from(y.classList)) == null ? void 0 : H.find((he) => ht(he));
504
+ return x ? Vt(x) : "";
505
+ }, g = document.activeElement;
506
+ if (!g)
507
+ return;
508
+ const E = document.getElementsByClassName(qe.formItemTarget);
509
+ for (var M = 0; M < E.length; M++) {
510
+ const y = E[M], x = ot(g, qe.formItemTarget);
511
+ if (!x)
512
+ continue;
513
+ const H = u(y), he = u(x);
514
+ if (H === he) {
515
+ if (M === E.length - 1)
516
+ return;
517
+ const zt = E[M + 1], Qt = u(zt), Ve = h.findRefById(Qt, C);
518
+ try {
519
+ (F = Ve == null ? void 0 : Ve.exposed) == null || F.focus();
520
+ } catch (Xt) {
521
+ console.log(Xt);
522
+ }
523
+ }
524
+ }
525
+ };
526
+ let Ht = () => {
527
+ var y;
528
+ let e = {
529
+ componentName: P.value,
530
+ //用于组件事件emitter发射与接收处理
531
+ refList: T,
532
+ allRefList: l,
533
+ getField: r,
534
+ getFormData: o,
535
+ getValue: z,
536
+ setValue: Le,
537
+ emit$: b,
538
+ changeRegisterToRefList: (x, H) => {
539
+ h.changeRegisterToRefList(x, H), R.changeRegisterToRefList(x, H);
540
+ },
541
+ findRefByName: h.getWidgetRef,
542
+ findRefById: h.findRefById,
543
+ callRefFunc: h.callRefFunc,
544
+ setWidgetOption: ee,
545
+ refreshKey: Ie,
546
+ getRowScope: f,
547
+ //组件的数据绑定:继承的数据,用于计算组件属性变量
548
+ getOneSchemaData: yt,
549
+ getSchemaDatas: Et,
550
+ getSchemaDataObject: bt
551
+ }, u = {
552
+ resetField: Nt,
553
+ getValue: z,
554
+ setValue: oe,
555
+ refreshDefaultValue: St,
556
+ insertOnMousePos: jt,
557
+ disableChangeValidate: ut,
558
+ enableChangeValidate: at,
559
+ focus: () => {
560
+ ne.focus(q.value);
561
+ },
562
+ blur: () => {
563
+ ne.blur(q.value);
564
+ },
565
+ getMousePos: () => {
566
+ ne.getMousePos(q.value);
567
+ },
568
+ setMousePos: (x) => {
569
+ ne.setMousePos(q.value, x);
570
+ }
571
+ }, g = {
572
+ getCheckedItems: se
573
+ }, E = {
574
+ [K.required]: { name: U.setRequired, fn: It },
575
+ [K.label]: { name: U.setLabel, fn: $t },
576
+ [K.hidden]: { name: U.setHidden, fn: Tt },
577
+ [K.disabled]: { name: U.setDisabled, fn: Lt },
578
+ [K.readonly]: { name: U.setReadonly, fn: Bt }
579
+ }, M = {};
580
+ (y = X(E)) == null || y.forEach((x) => {
581
+ if (be(c, x)) {
582
+ const H = E[x];
583
+ M[H.name] = H.fn;
584
+ }
585
+ });
586
+ var F = Q(e, M);
587
+ return c.formItemFlag && (F = Q(F, u)), Qe(c) && (F = Q(F, g)), F;
588
+ };
589
+ const Ut = tn(() => ({
590
+ attrs: j.value,
591
+ extendAttrs: w.value,
592
+ events: A.value,
593
+ slots: _e.value,
594
+ fieldKey: pe.value,
595
+ fieldEditor: q.value,
596
+ fieldName: P.value
597
+ })), Te = () => `${c == null ? void 0 : c.id}-${yn()}`, pe = Y(Te()), Ie = () => {
598
+ pe.value = Te();
599
+ }, kt = (e) => {
600
+ t.designState && t.designer && le(() => {
601
+ var u;
602
+ return (u = t == null ? void 0 : t.widget) == null ? void 0 : u[e];
603
+ }, (u, g) => {
604
+ const { emitHistoryChange: E } = On(t.designer);
605
+ E(`edit ${P.value}.${e},newValue:${u},oldValue:${g}`);
606
+ }, {
607
+ deep: !0
608
+ });
609
+ }, qt = (e, u, g) => {
610
+ const E = Y(), M = xe(e), F = (y) => {
611
+ u && (E.value = u(y || M));
612
+ };
613
+ return ke(M) ? le(M, (y) => {
614
+ F(y), g && g(y);
615
+ }) : F(M), E;
616
+ }, Gt = () => {
617
+ !re(c) || n || Kt((e) => {
618
+ Mn(l, c == null ? void 0 : c.id, s), Sn(l, c == null ? void 0 : c.id, J.getOptions(c, K.relate), e), Jt(), Ct(k.value);
619
+ }, { immediate: !0 });
620
+ }, $e = Y(!1), Ne = Y(""), Jt = () => {
621
+ const e = G("fnTip", !0), u = ve(e == null ? void 0 : e.options);
622
+ u != null && u.enable && u.tipFunc && ((E, M) => {
623
+ pn(u.tipFunc, { value: E, callback: M, errorMsg: u == null ? void 0 : u.errorMsg, ctx: C });
624
+ })(k.value, (E) => {
625
+ $e.value = !!E, Ne.value = E;
626
+ });
627
+ }, je = () => {
628
+ const e = { propName: P.value };
629
+ i(B, L.fieldValidation, e, C), i(v, L.fieldValidation, e, C);
630
+ }, Ke = () => {
631
+ const e = { fieldId: c.id, fieldName: P.value, rules: De };
632
+ i(B, L.fieldRuleChange, e, C);
633
+ }, ie = () => {
634
+ rt(), Ke();
635
+ }, Ae = () => {
636
+ st(), Ke();
637
+ };
638
+ return Wt(), {
639
+ exposed: Ht(),
640
+ fieldModel: k,
641
+ fieldEditor: q,
642
+ fieldKey: pe,
643
+ field: c,
644
+ instance: C,
645
+ attrs: j,
646
+ extendAttrs: w,
647
+ slots: _e,
648
+ events: A,
649
+ rules: De,
650
+ fieldObj: Ut,
651
+ isError: $e,
652
+ errorMsg: Ne,
653
+ pageConfig: N,
654
+ formModel: O,
655
+ fieldName: P,
656
+ propResultOpt: s,
657
+ optionItems: ct,
658
+ activeOptionItems: it,
659
+ activeOptionItem: ft,
660
+ activeOptionItemIndex: lt,
661
+ filterOptionItems: Pe,
662
+ setOptionItems: mt,
663
+ getCheckedItems: se,
664
+ refreshKey: Ie,
665
+ watchKeyValue: qt,
666
+ watchPropAndSaveHistoryStep: kt,
667
+ existEvent: _t,
668
+ handleEvent: ce,
669
+ handleEnter: At,
670
+ getPropName: Ot,
671
+ emitFieldDataChange: de,
672
+ syncUpdateFormModel: ae,
673
+ getWidgetRef: h.getWidgetRef,
674
+ clearRules: Ae,
675
+ buildRules: ie,
676
+ getFieldOptionModel: xe,
677
+ getFieldOptions: G,
678
+ setFieldOptions: gt,
679
+ getWidgetOption: Fe,
680
+ singleOption: dt,
681
+ watchOption: pt
682
+ };
683
+ }
684
+ export {
685
+ Se as R,
686
+ me as a,
687
+ Rn as b,
688
+ jn as c,
689
+ Cn as u
690
+ };