hlrender 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 (118) hide show
  1. package/_commonjsHelpers-e7ea1525.js +36 -0
  2. package/_plugin-vue_export-helper-dad06003.js +9 -0
  3. package/affix-widget-b6cdaf6f.js +35 -0
  4. package/anchor-link-widget-919ac0ee.js +5 -0
  5. package/anchor-link-widget.vue_vue_type_script_setup_true_name_anchor-link-widget_lang-7df7e7c1.js +35 -0
  6. package/anchor-widget-403fe70f.js +54 -0
  7. package/auto-complete-widget-597d8400.js +71 -0
  8. package/avatar-widget-c56add2d.js +35 -0
  9. package/backtop-widget-65d711e3.js +35 -0
  10. package/badge-widget-f6a08422.js +41 -0
  11. package/baseImp-70f1a9c5.js +11003 -0
  12. package/breadcrumb-widget-3791fbcf.js +76 -0
  13. package/button-widget-b539a793.js +45 -0
  14. package/cache-widget-89624589.js +50 -0
  15. package/card-widget-2890042f.js +109 -0
  16. package/carousel-widget-730618e4.js +72 -0
  17. package/cascader-widget-a364f226.js +94 -0
  18. package/chart-widget-d0b5993c.js +44282 -0
  19. package/checkbox-widget-5f87a8e5.js +76 -0
  20. package/collapse-widget-a654ac45.js +86 -0
  21. package/color-picker-widget-b5b274dd.js +53 -0
  22. package/cont-cell-widget-475412c6.js +8 -0
  23. package/cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-9aac0112.js +59 -0
  24. package/cont-widget-defa7dd6.js +42 -0
  25. package/content-wrapper-7ba06bbc.js +14 -0
  26. package/content-wrapper.vue_vue_type_script_setup_true_lang-56dfcc0b.js +37 -0
  27. package/date-picker-range-widget-e528dab6.js +69 -0
  28. package/date-picker-widget-a5d3e5ff.js +75 -0
  29. package/default-slot-widget-09d11567.js +22 -0
  30. package/default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-af9e9fc7.js +59 -0
  31. package/descriptions-widget-9711a62b.js +80 -0
  32. package/dialog-333d3421.js +124 -0
  33. package/dialog-widget-94d8ab5a.js +30 -0
  34. package/divider-widget-b835bbc3.js +35 -0
  35. package/drag-wrapper-227f198f.js +258 -0
  36. package/drawer-widget-3906d028.js +30 -0
  37. package/dropdown-widget-74696f3c.js +89 -0
  38. package/empty-widget-ba5e0039.js +61 -0
  39. package/enum-type-92806e9d.js +207 -0
  40. package/enum-type-be3a0b8b.js +2048 -0
  41. package/expression-63a787db.js +2181 -0
  42. package/feedback-widget-3140f73d.js +23 -0
  43. package/feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-f8da09d0.js +82 -0
  44. package/field-base-5547436d.js +7 -0
  45. package/file-upload-widget-dcc0425c.js +95 -0
  46. package/form-item-wrapper-849d8a21.js +111 -0
  47. package/form-widget-1dcffd59.js +183 -0
  48. package/grid-col-widget-e6b1455d.js +8 -0
  49. package/grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-ed554759.js +41 -0
  50. package/grid-widget-d7974890.js +43 -0
  51. package/html-text-widget-e13171fa.js +47 -0
  52. package/icon-e9532b43.js +119 -0
  53. package/iframe-widget-dee326a7.js +74 -0
  54. package/image-widget-d417c681.js +61 -0
  55. package/index-28e4bcfb.js +99 -0
  56. package/index-2d29f8d3.js +7233 -0
  57. package/index-ddd23411.js +4884 -0
  58. package/index-f54403db.js +65 -0
  59. package/index-fa19f5d9.js +10568 -0
  60. package/input-number-widget-548743d9.js +63 -0
  61. package/input-widget-81153a08.js +68 -0
  62. package/label-wrapper-13267254.js +12 -0
  63. package/label-wrapper.vue_vue_type_style_index_0_lang-5b455ef8.js +80 -0
  64. package/link-widget-e2aeac9f.js +53 -0
  65. package/ltable-col-widget-ecfe9f02.js +8 -0
  66. package/ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-6c231f2e.js +256 -0
  67. package/ltable-widget-d5d81ac2.js +69 -0
  68. package/menu-widget-101389ec.js +93 -0
  69. package/model-widget-84277d11.js +119 -0
  70. package/multirow-3ade8c6e.js +341 -0
  71. package/multirow-widget copy-efbb1e00.js +855 -0
  72. package/multirow-widget-a73fd2b8.js +691 -0
  73. package/package.json +13 -0
  74. package/pagination-widget-12edf5f4.js +78 -0
  75. package/picture-upload-widget-bcef9cc8.js +99 -0
  76. package/progress-widget-f515a118.js +49 -0
  77. package/propresult-e424ed73.js +22 -0
  78. package/radio-widget-78f9cab9.js +76 -0
  79. package/range-widget-904ed0d6.js +71 -0
  80. package/rate-widget-efdab26c.js +53 -0
  81. package/render.es.js +4434 -0
  82. package/render.style.css +11 -0
  83. package/render.umd.js +160496 -0
  84. package/result-widget-b1688641.js +64 -0
  85. package/rich-editor-widget-f1bb90c7.js +74 -0
  86. package/router-widget-920b11e4.js +51 -0
  87. package/select-widget-f3a43687.js +285 -0
  88. package/sfc-b5fb0bca.js +2568 -0
  89. package/share-field-9834aef6.js +688 -0
  90. package/share-file-329736c4.js +121 -0
  91. package/slider-widget-5146c0c3.js +59 -0
  92. package/slot-c6523e8c.js +17 -0
  93. package/static-text-widget-307cd047.js +48 -0
  94. package/steps-widget-70c08c51.js +88 -0
  95. package/subMenu-widget-c1a614ad.js +16 -0
  96. package/subMenu-widget.vue_vue_type_script_setup_true_lang-1896e25e.js +69 -0
  97. package/switch-widget-a103faaa.js +53 -0
  98. package/tab-pane-widget-e7c83114.js +8 -0
  99. package/tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-12fa9f12.js +35 -0
  100. package/table-col-widget-f177b82e.js +20 -0
  101. package/table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-5a1b4f92.js +80 -0
  102. package/table-widget-500902fd.js +160 -0
  103. package/tabs-widget-5e612fc0.js +68 -0
  104. package/tag-widget-8b945443.js +35 -0
  105. package/template-9ade074e.js +251730 -0
  106. package/text-widget-0d93ae9a.js +35 -0
  107. package/textarea-widget-d2464e70.js +53 -0
  108. package/time-picker-range-widget-7d92f5f0.js +55 -0
  109. package/time-picker-widget-3e0cc2c5.js +54 -0
  110. package/time-select-widget-b0b17501.js +54 -0
  111. package/tmpl-widget-b2402ddc.js +89 -0
  112. package/tree-select-widget-13f054e9.js +91 -0
  113. package/tree-widget-8bee698c.js +87 -0
  114. package/uuid-b302db3f.js +192 -0
  115. package/vue3-sfc-loader-b70bdce4.js +34688 -0
  116. package/widget-base-4c2d6265.js +27 -0
  117. package/widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-d0e116ac.js +277 -0
  118. package/wrapper-widget-4d87e124.js +78 -0
@@ -0,0 +1,688 @@
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-be3a0b8b.js";
6
+ import { p as qe, b as we, g as ln, f as fe, F as mn, a as vn } from "./multirow-3ade8c6e.js";
7
+ import { u as et } from "./icon-e9532b43.js";
8
+ import { e as L, l as Oe, m as gn, n as Ge, b as K, f as dn } from "./template-9ade074e.js";
9
+ import { b as tt, d as Re, B as J, P as Ce, c as nt, e as hn, a as pn, h as Vn, g as Je } from "./baseImp-70f1a9c5.js";
10
+ import { c as ve, k as Me, l as yn } from "./uuid-b302db3f.js";
11
+ import { f as bn, d as En, h as be, e as On } from "./index-fa19f5d9.js";
12
+ import { W as U, d as $ } from "./enum-type-92806e9d.js";
13
+ function Rn() {
14
+ return {
15
+ onMountedOrActivated: (d) => {
16
+ let S = !1;
17
+ Xe(() => {
18
+ d(), Ye(() => {
19
+ S = !0;
20
+ });
21
+ }), wt(() => {
22
+ S && d();
23
+ });
24
+ },
25
+ onCompErrorCaptured: () => {
26
+ en((d) => (console.log(d), !1));
27
+ }
28
+ };
29
+ }
30
+ function Cn(t, n) {
31
+ const { getWidgetOption: d, getWidgetOptionByPropValue: S } = tt(t, n), W = (_) => d(_);
32
+ return {
33
+ existFunc: W,
34
+ handleFunc: (_, N) => {
35
+ if (rn(_)) {
36
+ var T = W(String(_));
37
+ return Re(T, N);
38
+ } else {
39
+ var T = S(ve(_));
40
+ return Re(T, N);
41
+ }
42
+ }
43
+ };
44
+ }
45
+ class Se {
46
+ constructor(n) {
47
+ He(this, "refList", {});
48
+ n && (this.refList = n);
49
+ }
50
+ initRefList() {
51
+ this.refList || (this.refList = {});
52
+ }
53
+ getWidgetRef(n) {
54
+ if (n)
55
+ return this.initRefList(), this.refList[n];
56
+ }
57
+ setWidgetRef(n, d) {
58
+ n && (this.initRefList(), this.refList[n] = d);
59
+ }
60
+ removeWidgetRef(n) {
61
+ n && this.refList && delete this.refList[n.toString()];
62
+ }
63
+ }
64
+ function me(t) {
65
+ t || (t = {});
66
+ const n = new Se(t), { instance: d } = et(), S = (v) => n.getWidgetRef(v == null ? void 0 : v.toString()), W = (v, V, p) => {
67
+ var R = [], o = [];
68
+ let f = S(v);
69
+ return f && R.push(f), R == null || R.forEach((r) => {
70
+ var s = _(r, V, p);
71
+ s && o.push(s);
72
+ }), o;
73
+ }, c = (v, V) => {
74
+ var p;
75
+ return (p = v == null ? void 0 : v.exposed) == null ? void 0 : p[V.toString()];
76
+ }, _ = (v, V, p) => {
77
+ var R = c(v, V);
78
+ if (R) {
79
+ var o = [];
80
+ return p && (o = Object.values(p)), R(...o);
81
+ }
82
+ }, N = (v, V, p) => {
83
+ var R = [];
84
+ if (v) {
85
+ var o = ve(Me(v, !0));
86
+ o == null || o.forEach((f) => {
87
+ var r = W(f, V, p);
88
+ Ee(r) || R.push(r);
89
+ });
90
+ }
91
+ return Array.isArray(v) ? R : R == null ? void 0 : R[0];
92
+ }, T = (v, V) => {
93
+ let p = X(t);
94
+ N(p, v, V);
95
+ }, l = (v, V) => {
96
+ var s, a, m;
97
+ const p = (a = (s = V || d) == null ? void 0 : s.exposed) == null ? void 0 : a.getField();
98
+ var R = qe(p == null ? void 0 : p.id);
99
+ const o = (i) => (i == null ? void 0 : i.id) === v, f = (i) => {
100
+ var C;
101
+ var b = qe(i == null ? void 0 : i.id);
102
+ 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);
103
+ }, r = (m = X(n.refList)) == null ? void 0 : m.find((i) => {
104
+ var C, I;
105
+ try {
106
+ const D = (I = (C = n.refList[i]) == null ? void 0 : C.exposed) == null ? void 0 : I.getField();
107
+ var b = o(D);
108
+ return !b && (R != null && R.groupName) && (b = f(D)), b;
109
+ } catch {
110
+ return !1;
111
+ }
112
+ });
113
+ if (r)
114
+ return S(r);
115
+ }, h = (v) => {
116
+ if (v) {
117
+ let V = v;
118
+ n == null || n.setWidgetRef(V, d);
119
+ }
120
+ }, O = (v) => {
121
+ if (v) {
122
+ let V = v;
123
+ n == null || n.removeWidgetRef(V);
124
+ }
125
+ };
126
+ return {
127
+ findWidgetAndCall: W,
128
+ getWidgetRef: S,
129
+ callWidgetsExposed: N,
130
+ callRefFunc: _,
131
+ existRefFunc: c,
132
+ setAllRefList: T,
133
+ findRefById: l,
134
+ findRefByName: S,
135
+ changeRegisterToRefList: (v, V) => {
136
+ v && (h(v), O(V));
137
+ },
138
+ registerToRefList: h,
139
+ unregisterFromRefList: O
140
+ };
141
+ }
142
+ const Mn = (t, n, d) => {
143
+ const S = new Se(t), { callRefFunc: W } = me(t), { parseGroupId: c } = we();
144
+ if (!t || t.length <= 0 || !n)
145
+ return;
146
+ const _ = () => {
147
+ var o, f;
148
+ 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);
149
+ }, N = (o) => {
150
+ var a;
151
+ const f = (a = _()) == null ? void 0 : a.find((m) => (m == null ? void 0 : m.id) === o);
152
+ if (!f)
153
+ return;
154
+ const r = J.getName(f), s = S.getWidgetRef(r);
155
+ if (s)
156
+ return { ref: s, name: r, id: f == null ? void 0 : f.id };
157
+ }, T = (o, f) => {
158
+ if (!Z(f))
159
+ return;
160
+ const r = J.getName(o), s = S.getWidgetRef(r);
161
+ if (s) {
162
+ const a = J.getOptions(o, L.defaultValue, !1, !(d != null && d.designState), { ...d, formData: f });
163
+ Z(a) && W(s, U.setValue, { newValue: a });
164
+ }
165
+ }, l = (o, f) => {
166
+ const r = N(o);
167
+ if (!r)
168
+ return;
169
+ const s = r.name, a = W(r.ref, U.getValue), m = W(r.ref, U.getCheckedItems), i = {};
170
+ return Ee(a) || (i[s] = a), !cn(m) && !f && (i[`${s}${Oe.checkedOptions}`] = m), i;
171
+ }, h = (o, f) => {
172
+ var s;
173
+ var r = [];
174
+ if ((s = _()) == null || s.forEach((a) => {
175
+ if (!a)
176
+ return;
177
+ const m = a == null ? void 0 : a.id;
178
+ var i = m === o;
179
+ const b = c(m), C = (b == null ? void 0 : b.id) === o, I = (b == null ? void 0 : b.groupName) === f;
180
+ return i || C && (I || !f) ? (r.push(a), !0) : !1;
181
+ }), !(!r || r.length <= 0))
182
+ return r == null ? void 0 : r.map((a) => {
183
+ var m;
184
+ return {
185
+ id: a == null ? void 0 : a.id,
186
+ name: (m = a == null ? void 0 : a._source) == null ? void 0 : m.name,
187
+ source: a == null ? void 0 : a._source
188
+ };
189
+ });
190
+ }, O = (o, f) => {
191
+ var r = [];
192
+ if (!o || (o == null ? void 0 : o.length) <= 0)
193
+ return r;
194
+ const s = c(n), a = s == null ? void 0 : s.groupName;
195
+ return f === fe.Inner2Outer ? o == null || o.forEach((m) => {
196
+ var i = h(m);
197
+ i && (i == null ? void 0 : i.length) > 0 && r.push(...i);
198
+ }) : o == null || o.forEach((m) => {
199
+ var i = h(m, a);
200
+ i && (i == null ? void 0 : i.length) > 0 && r.push(...i);
201
+ }), r;
202
+ }, B = (o, f) => {
203
+ const r = {};
204
+ if (!o || o.length <= 0)
205
+ return r;
206
+ if (f === fe.Inner2Outer) {
207
+ var s = sn(o, (a) => {
208
+ var m;
209
+ return (m = a.source) == null ? void 0 : m.id;
210
+ });
211
+ s == null || s.forEach((a) => {
212
+ var b;
213
+ const m = a.group[0], i = [];
214
+ (b = a == null ? void 0 : a.children) == null || b.forEach((C) => {
215
+ const I = l(C == null ? void 0 : C.id, !0);
216
+ if (Z(I)) {
217
+ var D = Object.values(ve(I));
218
+ i.push(...D);
219
+ }
220
+ }), m && Q(r, { [m]: i });
221
+ });
222
+ } else
223
+ o.forEach((a) => {
224
+ const m = l(a == null ? void 0 : a.id);
225
+ Z(m) && Q(r, m);
226
+ });
227
+ return r;
228
+ }, v = (o) => {
229
+ var f = {};
230
+ return o == null || o.forEach((r) => {
231
+ var s;
232
+ 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);
233
+ }), f;
234
+ }, V = (o, f, r) => {
235
+ if (r === fe.Inner2Inner) {
236
+ const i = un(f), { updateFomula: b } = nt(), { buildVariable: C } = hn();
237
+ var s = v(o);
238
+ if (Z(s)) {
239
+ var a = J.getOrgOption(f, L.defaultValue), m = b(Ze(a), s, (I, D) => {
240
+ var j = s[I];
241
+ return Ee(j) ? C(I) : C(j);
242
+ });
243
+ return J.setOrgOption(i, L.defaultValue, an(m)), i;
244
+ }
245
+ }
246
+ return f;
247
+ }, p = (o) => {
248
+ const f = o == null ? void 0 : o.id;
249
+ var r = J.getOrgOption(o, L.defaultValue);
250
+ if (r === void 0)
251
+ return;
252
+ const s = ln(n, f);
253
+ if (s === fe.DiffInner)
254
+ return;
255
+ var a = Ce.getFormulaRelatedField(r);
256
+ if (!a || a.length <= 0)
257
+ return;
258
+ var m = O(a, s);
259
+ if (!(m != null && m.some((b) => b.id === n)))
260
+ return;
261
+ const i = B(m, s);
262
+ T(V(m, o, s), i);
263
+ };
264
+ (() => {
265
+ var o;
266
+ (o = _()) == null || o.forEach((f) => {
267
+ p(f);
268
+ });
269
+ })();
270
+ }, Sn = (t, n, d, S, W) => {
271
+ var O, B, v;
272
+ if (W || !Z(d))
273
+ return;
274
+ 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 } = we(), T = new Se(t);
275
+ var l = N(n), h = l == null ? void 0 : l.groupName;
276
+ (v = X(d)) == null || v.forEach((V) => {
277
+ var R, o, f;
278
+ if (!((R = Me(S == null ? void 0 : S.newValue, !0)) != null && R.includes(V)))
279
+ return;
280
+ const p = (o = d == null ? void 0 : d[V]) == null ? void 0 : o.result;
281
+ (f = X(p)) == null || f.forEach((r) => {
282
+ var a;
283
+ const s = p == null ? void 0 : p[r];
284
+ (a = s == null ? void 0 : s.ids) == null || a.forEach((m) => {
285
+ var I;
286
+ const i = (I = bn(_, (D) => {
287
+ var j, w;
288
+ return ((D == null ? void 0 : D.id) === m || ((j = D == null ? void 0 : D._source) == null ? void 0 : j.id) === m) && (!h || ((w = D == null ? void 0 : D.id) == null ? void 0 : w.indexOf(h)) != -1);
289
+ })) == null ? void 0 : I[0];
290
+ if (!i)
291
+ return;
292
+ const b = J.getName(i), C = T.getWidgetRef(b);
293
+ C ? c(C, s == null ? void 0 : s.event, s == null ? void 0 : s.args) : le(() => t, (D) => {
294
+ const j = T.getWidgetRef(b);
295
+ j && c(j, s == null ? void 0 : s.event, s == null ? void 0 : s.args);
296
+ });
297
+ });
298
+ });
299
+ });
300
+ };
301
+ function ot(t, n) {
302
+ var d;
303
+ 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;
304
+ }
305
+ function _n() {
306
+ const t = (l) => {
307
+ if (l)
308
+ return l != null && l.ref ? l == null ? void 0 : l.ref : l;
309
+ }, n = (l) => {
310
+ var h, O;
311
+ try {
312
+ (O = (h = t(l)) == null ? void 0 : h.focus) == null || O.call(h);
313
+ } catch (B) {
314
+ console.log(B);
315
+ }
316
+ }, d = (l) => {
317
+ var h, O;
318
+ try {
319
+ (O = (h = t(l)) == null ? void 0 : h.blur) == null || O.call(h);
320
+ } catch (B) {
321
+ console.log(B);
322
+ }
323
+ }, S = (l) => {
324
+ var h;
325
+ return (h = t(l)) == null ? void 0 : h.selectionStart;
326
+ }, W = (l) => {
327
+ var h;
328
+ return (h = t(l)) == null ? void 0 : h.selectionEnd;
329
+ }, c = (l, h) => {
330
+ var O;
331
+ return (O = t(l)) == null ? void 0 : O.setSelectionRange(h, h);
332
+ }, _ = (l, h) => {
333
+ n(l), c(l, h);
334
+ };
335
+ return {
336
+ getSelectionStart: S,
337
+ getSelectionEnd: W,
338
+ setSelectionStart: c,
339
+ blur: d,
340
+ focus: n,
341
+ setMousePos: _,
342
+ getMousePos: (l) => S(l),
343
+ insertOnMousePos: (l, h, O) => {
344
+ const B = S(l), v = W(l), V = gn(O, h, B, v);
345
+ return Ye(() => {
346
+ _(l, B + (h == null ? void 0 : h.length));
347
+ }), V;
348
+ }
349
+ };
350
+ }
351
+ const ze = (t) => {
352
+ var d;
353
+ const { getFormulaFields: n } = nt();
354
+ return ((d = n(Ze(t))) == null ? void 0 : d.length) > 0;
355
+ }, re = (t) => {
356
+ const n = t.type;
357
+ return ![$.fileUpload, $.pictureUpload].includes(n) && t.formItemFlag || [$.form, $.dialog].includes(n);
358
+ }, Qe = (t) => {
359
+ const n = t.type;
360
+ return [$.treeSelect, $.cascader, $.select, $.checkbox, $.radio].includes(n);
361
+ };
362
+ function Nn(t) {
363
+ 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;
364
+ let T = {}, l = {}, h = {}, O = Ue({});
365
+ var B = "", v = "", V = {};
366
+ if (d) {
367
+ const e = mn.globalInject();
368
+ e && (T = e.formRefList, l = e.globalRefList, V = e.globalConfig, B = e.globalFormName || "", v = e.globalPageName || "", O = Ue(e.globalDataModel || {}), h = e.rowScope);
369
+ }
370
+ const p = me(l), R = me(T), o = () => ye(O), f = () => h, r = () => c, s = {
371
+ instance: {
372
+ exposed: {
373
+ getFormData: !n && ze(c) ? o : null,
374
+ findRefByName: p.getWidgetRef,
375
+ getField: r,
376
+ getRowScope: f
377
+ }
378
+ },
379
+ designState: n,
380
+ pageConfig: N,
381
+ formData: !n && ze(c) ? O : {},
382
+ globalConfig: V
383
+ }, 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 } = vn(), { instance: C } = et(), { 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: ht } = tt(c, s, a, C), { isIdClass: pt, getIdByIdClass: Vt } = En(c), { getOneSchemaData: yt, getSchemaDataObject: bt, getSchemaDatas: Et } = pn(s), ne = _n();
384
+ let ge = null, k = Y();
385
+ const q = Y(), Ot = () => P.value, se = (e) => Pe((u) => {
386
+ var g = Me(e || k.value, !0);
387
+ return g == null ? void 0 : g.includes(u == null ? void 0 : u.value);
388
+ }), Rt = (e) => {
389
+ var M, F;
390
+ const u = c.type, g = G(L.multiple, !1);
391
+ Je(G(L.valueKey, !1));
392
+ const E = Je(G(L.labelKey, !1));
393
+ switch (u) {
394
+ case $.cascader: {
395
+ if (q.value) {
396
+ const y = q.value.getCheckedNodes();
397
+ return g ? y == null ? void 0 : y.map((x) => x.pathLabels) : (M = y == null ? void 0 : y[0]) == null ? void 0 : M.pathLabels;
398
+ }
399
+ break;
400
+ }
401
+ case $.treeSelect:
402
+ case $.select:
403
+ case $.checkbox:
404
+ case $.radio: {
405
+ const y = (F = se(e)) == null ? void 0 : F.map((x) => x == null ? void 0 : x[E]);
406
+ return g ? y : y == null ? void 0 : y[0];
407
+ }
408
+ }
409
+ }, Ct = (e) => {
410
+ if (!Qe(c))
411
+ return;
412
+ var u = {};
413
+ const g = Rt(e);
414
+ let E = G("textName", !1);
415
+ [`${P.value}${Oe.optionText}`, E].forEach((y) => {
416
+ y && u[y] === void 0 && (u[y] = g);
417
+ });
418
+ var M = se(e);
419
+ let F = G("optionName", !1);
420
+ [`${P.value}${Oe.checkedOptions}`, F].forEach((y) => {
421
+ y && u[y] === void 0 && (u[y] = M);
422
+ }), Q(O, u, !0);
423
+ }, ue = (e) => {
424
+ if (re(c)) {
425
+ var u = { [P.value]: e };
426
+ Q(O, u, !0);
427
+ }
428
+ }, ae = (e) => {
429
+ n || ue(e);
430
+ }, xe = (e) => G(e, !1), We = () => {
431
+ var e = null, u = on(O);
432
+ e = Ce.getValue(Ce.get(u, P.value), !1, !n), ke(e) ? k = e : k.value = e;
433
+ }, Be = (e) => {
434
+ ge = ye(e);
435
+ }, Mt = () => {
436
+ n || W && W(z());
437
+ }, St = () => {
438
+ !n || !re(c) || (ue(te.value), We());
439
+ }, de = (e, u) => {
440
+ b(L.fieldValueChanged, { newValue: e, oldValue: u });
441
+ const g = { fieldId: c.id, fieldName: P.value, newValue: e, oldValue: u };
442
+ i(B, L.fieldChange, g, C), i(v, L.fieldChange, g, C);
443
+ }, _t = (e) => D(e), ce = (e, u) => Re(Fe(e), u), Dt = (e) => {
444
+ ae(e), je(), ce(L.onInput, { value: e });
445
+ }, Pt = (...e) => {
446
+ var E, M, F;
447
+ 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];
448
+ ae(g), de(g, ge), je(), ce(L.onChange, { value: g, oldValue: ge }), Be(g);
449
+ }, Ft = () => {
450
+ m(dn.setFormData, (e) => {
451
+ oe(e[P.value]);
452
+ }), m(L.fieldValueChanged, (e) => {
453
+ ce(L.onChange, { value: e == null ? void 0 : e.newValue, oldValue: e == null ? void 0 : e.oldValue });
454
+ });
455
+ }, xt = () => {
456
+ let e = P.value;
457
+ 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();
458
+ }, Wt = () => {
459
+ var e, u;
460
+ d && (Xe(() => {
461
+ var g, E;
462
+ try {
463
+ (E = (g = A == null ? void 0 : A.value) == null ? void 0 : g.mounted) == null || E.call(g), Gt();
464
+ } catch (M) {
465
+ console.log(M);
466
+ }
467
+ }), nn(() => {
468
+ p.unregisterFromRefList(P.value), R.unregisterFromRefList(P.value);
469
+ }), p.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());
470
+ }, Bt = (e = !0) => {
471
+ ee(K.readonly, e);
472
+ }, Lt = (e = !0) => {
473
+ ee(K.disabled, e);
474
+ }, Tt = (e = !0) => {
475
+ ee(K.hidden, e), e ? Ae() : ie();
476
+ }, It = (e = !0) => {
477
+ vt(K.required, e), ie();
478
+ }, $t = (e) => {
479
+ ee(K.label, e);
480
+ }, z = () => k.value, Le = (e) => {
481
+ k.value = e;
482
+ }, oe = (e) => {
483
+ let u = ye(z());
484
+ if (Le(e), !re(c))
485
+ return;
486
+ const g = z();
487
+ u !== g && (ae(g), de(g, u));
488
+ }, Nt = () => {
489
+ oe(te.value), S == null || S();
490
+ }, jt = (e) => {
491
+ const u = z(), g = ne.insertOnMousePos(q.value, e, u);
492
+ oe(g);
493
+ }, Kt = (e, u) => {
494
+ le(() => k.value, (g, E) => {
495
+ e == null || e({ id: c.id, name: P.value, newValue: g, oldValue: E });
496
+ }, u);
497
+ }, At = (e) => {
498
+ var F;
499
+ e.preventDefault();
500
+ const u = (y) => {
501
+ var H;
502
+ const x = (H = Array.from(y.classList)) == null ? void 0 : H.find((pe) => pt(pe));
503
+ return x ? Vt(x) : "";
504
+ }, g = document.activeElement;
505
+ if (!g)
506
+ return;
507
+ const E = document.getElementsByClassName(Ge.formItemTarget);
508
+ for (var M = 0; M < E.length; M++) {
509
+ const y = E[M], x = ot(g, Ge.formItemTarget);
510
+ if (!x)
511
+ continue;
512
+ const H = u(y), pe = u(x);
513
+ if (H === pe) {
514
+ if (M === E.length - 1)
515
+ return;
516
+ const zt = E[M + 1], Qt = u(zt), Ve = p.findRefById(Qt, C);
517
+ try {
518
+ (F = Ve == null ? void 0 : Ve.exposed) == null || F.focus();
519
+ } catch (Xt) {
520
+ console.log(Xt);
521
+ }
522
+ }
523
+ }
524
+ };
525
+ let Ht = () => {
526
+ var y;
527
+ let e = {
528
+ componentName: P.value,
529
+ //用于组件事件emitter发射与接收处理
530
+ refList: T,
531
+ allRefList: l,
532
+ getField: r,
533
+ getFormData: o,
534
+ getValue: z,
535
+ setValue: Le,
536
+ emit$: b,
537
+ changeRegisterToRefList: (x, H) => {
538
+ p.changeRegisterToRefList(x, H), R.changeRegisterToRefList(x, H);
539
+ },
540
+ findRefByName: p.getWidgetRef,
541
+ findRefById: p.findRefById,
542
+ callRefFunc: p.callRefFunc,
543
+ setWidgetOption: ee,
544
+ refreshKey: Ie,
545
+ getRowScope: f,
546
+ //组件的数据绑定:继承的数据,用于计算组件属性变量
547
+ getOneSchemaData: yt,
548
+ getSchemaDatas: Et,
549
+ getSchemaDataObject: bt
550
+ }, u = {
551
+ resetField: Nt,
552
+ getValue: z,
553
+ setValue: oe,
554
+ refreshDefaultValue: St,
555
+ insertOnMousePos: jt,
556
+ disableChangeValidate: ut,
557
+ enableChangeValidate: at,
558
+ focus: () => {
559
+ ne.focus(q.value);
560
+ },
561
+ blur: () => {
562
+ ne.blur(q.value);
563
+ },
564
+ getMousePos: () => {
565
+ ne.getMousePos(q.value);
566
+ },
567
+ setMousePos: (x) => {
568
+ ne.setMousePos(q.value, x);
569
+ }
570
+ }, g = {
571
+ getCheckedItems: se
572
+ }, E = {
573
+ [K.required]: { name: U.setRequired, fn: It },
574
+ [K.label]: { name: U.setLabel, fn: $t },
575
+ [K.hidden]: { name: U.setHidden, fn: Tt },
576
+ [K.disabled]: { name: U.setDisabled, fn: Lt },
577
+ [K.readonly]: { name: U.setReadonly, fn: Bt }
578
+ }, M = {};
579
+ (y = X(E)) == null || y.forEach((x) => {
580
+ if (be(c, x)) {
581
+ const H = E[x];
582
+ M[H.name] = H.fn;
583
+ }
584
+ });
585
+ var F = Q(e, M);
586
+ return c.formItemFlag && (F = Q(F, u)), Qe(c) && (F = Q(F, g)), F;
587
+ };
588
+ const Ut = tn(() => ({
589
+ attrs: j.value,
590
+ extendAttrs: w.value,
591
+ events: A.value,
592
+ slots: _e.value,
593
+ fieldKey: he.value,
594
+ fieldEditor: q.value,
595
+ fieldName: P.value
596
+ })), Te = () => `${c == null ? void 0 : c.id}-${yn()}`, he = Y(Te()), Ie = () => {
597
+ he.value = Te();
598
+ }, kt = (e) => {
599
+ t.designState && t.designer && le(() => {
600
+ var u;
601
+ return (u = t == null ? void 0 : t.widget) == null ? void 0 : u[e];
602
+ }, (u, g) => {
603
+ const { emitHistoryChange: E } = On(t.designer);
604
+ E(`edit ${P.value}.${e},newValue:${u},oldValue:${g}`);
605
+ }, {
606
+ deep: !0
607
+ });
608
+ }, qt = (e, u, g) => {
609
+ const E = Y(), M = xe(e), F = (y) => {
610
+ u && (E.value = u(y || M));
611
+ };
612
+ return ke(M) ? le(M, (y) => {
613
+ F(y), g && g(y);
614
+ }) : F(M), E;
615
+ }, Gt = () => {
616
+ !re(c) || n || Kt((e) => {
617
+ 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);
618
+ }, { immediate: !0 });
619
+ }, $e = Y(!1), Ne = Y(""), Jt = () => {
620
+ const e = G("fnTip", !0), u = ve(e == null ? void 0 : e.options);
621
+ u != null && u.enable && u.tipFunc && ((E, M) => {
622
+ Vn(u.tipFunc, { value: E, callback: M, errorMsg: u == null ? void 0 : u.errorMsg, ctx: C });
623
+ })(k.value, (E) => {
624
+ $e.value = !!E, Ne.value = E;
625
+ });
626
+ }, je = () => {
627
+ const e = { propName: P.value };
628
+ i(B, L.fieldValidation, e, C), i(v, L.fieldValidation, e, C);
629
+ }, Ke = () => {
630
+ const e = { fieldId: c.id, fieldName: P.value, rules: De };
631
+ i(B, L.fieldRuleChange, e, C);
632
+ }, ie = () => {
633
+ rt(), Ke();
634
+ }, Ae = () => {
635
+ st(), Ke();
636
+ };
637
+ return Wt(), {
638
+ exposed: Ht(),
639
+ fieldModel: k,
640
+ fieldEditor: q,
641
+ fieldKey: he,
642
+ field: c,
643
+ instance: C,
644
+ attrs: j,
645
+ extendAttrs: w,
646
+ slots: _e,
647
+ events: A,
648
+ rules: De,
649
+ fieldObj: Ut,
650
+ isError: $e,
651
+ errorMsg: Ne,
652
+ pageConfig: N,
653
+ formModel: O,
654
+ fieldName: P,
655
+ propResultOpt: s,
656
+ optionItems: ct,
657
+ activeOptionItems: it,
658
+ activeOptionItem: ft,
659
+ activeOptionItemIndex: lt,
660
+ filterOptionItems: Pe,
661
+ setOptionItems: mt,
662
+ getCheckedItems: se,
663
+ refreshKey: Ie,
664
+ watchKeyValue: qt,
665
+ watchPropAndSaveHistoryStep: kt,
666
+ existEvent: _t,
667
+ handleEvent: ce,
668
+ handleEnter: At,
669
+ getPropName: Ot,
670
+ emitFieldDataChange: de,
671
+ syncUpdateFormModel: ae,
672
+ getWidgetRef: p.getWidgetRef,
673
+ clearRules: Ae,
674
+ buildRules: ie,
675
+ getFieldOptionModel: xe,
676
+ getFieldOptions: G,
677
+ setFieldOptions: gt,
678
+ getWidgetOption: Fe,
679
+ singleOption: dt,
680
+ watchOption: ht
681
+ };
682
+ }
683
+ export {
684
+ Se as R,
685
+ me as a,
686
+ Nn as b,
687
+ Cn as u
688
+ };