hlrender 0.0.50 → 0.0.52

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 (99) hide show
  1. package/{affix-widget-3d694272.js → affix-widget-720c9efd.js} +10 -10
  2. package/{alert-widget-1c454a7d.js → alert-widget-a899f06e.js} +10 -10
  3. package/{anchor-widget-c4cd5db3.js → anchor-widget-ef71570c.js} +7 -7
  4. package/{auto-complete-widget-f1c7dc53.js → auto-complete-widget-b0695fb0.js} +9 -9
  5. package/{avatar-widget-0de88b8a.js → avatar-widget-abff3d76.js} +10 -10
  6. package/{backtop-widget-e7aabbdb.js → backtop-widget-ece33c67.js} +10 -10
  7. package/{badge-widget-99f07b37.js → badge-widget-558e0e7a.js} +10 -10
  8. package/{baseImp-c7c90bf0.js → baseImp-7fb8e7ad.js} +292 -295
  9. package/{breadcrumb-widget-12a6f999.js → breadcrumb-widget-caac5972.js} +7 -7
  10. package/{button-widget-bc624762.js → button-widget-6052c8ec.js} +10 -10
  11. package/{cache-widget-79e9f4a8.js → cache-widget-43d274c9.js} +8 -8
  12. package/{card-widget-10e4bc56.js → card-widget-4a64059d.js} +8 -8
  13. package/{carousel-widget-812f5310.js → carousel-widget-0e2d6365.js} +8 -8
  14. package/{cascader-widget-efa8b57d.js → cascader-widget-42b42b5d.js} +8 -8
  15. package/{chart-widget-2b960b60.js → chart-widget-d0edcec4.js} +7 -7
  16. package/{checkbox-widget-1d0cf7a1.js → checkbox-widget-53ef9bb1.js} +8 -8
  17. package/{collapse-widget-893219bc.js → collapse-widget-5b92ec53.js} +8 -8
  18. package/{color-picker-widget-81507e91.js → color-picker-widget-2aa51feb.js} +8 -8
  19. package/{cont-cell-widget-bea1f10b.js → cont-cell-widget-01ed00a8.js} +1 -1
  20. package/{cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-fc8f4d4a.js → cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-d3fec734.js} +5 -5
  21. package/{cont-widget-eeb612e6.js → cont-widget-008ff6be.js} +5 -5
  22. package/{content-wrapper-676c45bd.js → content-wrapper-167976d7.js} +3 -3
  23. package/{content-wrapper.vue_vue_type_script_setup_true_lang-16519ccc.js → content-wrapper.vue_vue_type_script_setup_true_lang-46a42663.js} +2 -2
  24. package/{date-picker-range-widget-9b8a3153.js → date-picker-range-widget-4c99e6f6.js} +8 -8
  25. package/{date-picker-widget-fbd38946.js → date-picker-widget-7d2bc769.js} +8 -8
  26. package/{default-slot-widget-4bb00d87.js → default-slot-widget-dd268245.js} +8 -8
  27. package/{default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-9fc27837.js → default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-1b96b459.js} +5 -5
  28. package/{descriptions-widget-36d2835d.js → descriptions-widget-bb029280.js} +8 -8
  29. package/{dialog-widget-ab088cfe.js → dialog-widget-6ed2346d.js} +9 -9
  30. package/{divider-widget-cad03247.js → divider-widget-cdf31401.js} +10 -10
  31. package/{drag-wrapper-b8f18428.js → drag-wrapper-af1b931c.js} +5 -5
  32. package/{drawer-widget-0fd94fec.js → drawer-widget-4b97c6bd.js} +9 -9
  33. package/{dropdown-widget-fe3a4450.js → dropdown-widget-be56637d.js} +8 -8
  34. package/{empty-widget-814211fa.js → empty-widget-d354daeb.js} +10 -10
  35. package/{expression-8b5cf5cd.js → expression-83e866fe.js} +122 -121
  36. package/{feedback-widget-f61e8977.js → feedback-widget-99fb44f3.js} +9 -9
  37. package/{feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-9cc7f596.js → feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-500be642.js} +5 -5
  38. package/{file-upload-widget-4025a3a8.js → file-upload-widget-b00a7e5f.js} +9 -9
  39. package/{form-item-wrapper-cc408e59.js → form-item-wrapper-3672beb8.js} +4 -4
  40. package/{form-widget-13f3249d.js → form-widget-54444b5c.js} +8 -8
  41. package/{grid-col-widget-4d09e613.js → grid-col-widget-1eb649b3.js} +1 -1
  42. package/{grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-225a5d7e.js → grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-bb1a5ffa.js} +5 -5
  43. package/{grid-widget-97b2fb8f.js → grid-widget-09e314d7.js} +5 -5
  44. package/{html-text-widget-9dd280dc.js → html-text-widget-713c3f1e.js} +8 -8
  45. package/{iframe-widget-040868ec.js → iframe-widget-c5b27494.js} +7 -7
  46. package/{image-widget-bdcb2bce.js → image-widget-1d7435e2.js} +7 -7
  47. package/{index-a4d1d907.js → index-d054c102.js} +2 -2
  48. package/{input-number-widget-965d3d36.js → input-number-widget-187532e3.js} +8 -8
  49. package/{input-widget-16de5413.js → input-widget-476f69c8.js} +9 -9
  50. package/{link-widget-bd21149f.js → link-widget-776eff50.js} +10 -10
  51. package/{ltable-col-widget-7dddf789.js → ltable-col-widget-85538e4b.js} +1 -1
  52. package/{ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-ccd68bf0.js → ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-65eb4264.js} +7 -7
  53. package/{ltable-widget-9bad7c19.js → ltable-widget-ad3168ec.js} +5 -5
  54. package/{menu-widget-16303726.js → menu-widget-0d0f8bf3.js} +8 -8
  55. package/{model-widget-4110b949.js → model-widget-cbd6d10c.js} +7 -7
  56. package/{multirow-2a81c1cd.js → multirow-2ef82f3f.js} +4 -4
  57. package/{multirow-widget-8e1accbf.js → multirow-widget-9d0bb6b7.js} +8 -8
  58. package/package.json +1 -1
  59. package/{pagination-widget-6c196d93.js → pagination-widget-0d78d4a6.js} +7 -7
  60. package/{picture-upload-widget-a4c8f05f.js → picture-upload-widget-a7b34eea.js} +9 -9
  61. package/{progress-widget-6f498ff7.js → progress-widget-0dfc4206.js} +8 -8
  62. package/{propresult-ede45228.js → propresult-a2860930.js} +1 -1
  63. package/{radio-widget-eae4723b.js → radio-widget-bfae2dd2.js} +8 -8
  64. package/{range-widget-ababcf0a.js → range-widget-2d2eb2d7.js} +9 -9
  65. package/{rate-widget-01de38aa.js → rate-widget-fd2efc64.js} +8 -8
  66. package/render.es.js +248 -261
  67. package/render.umd.js +281 -281
  68. package/{result-widget-2fc0775a.js → result-widget-633f9da9.js} +8 -8
  69. package/{rich-editor-widget-f68ce2b7.js → rich-editor-widget-d77f2903.js} +8 -8
  70. package/{router-widget-db469ad6.js → router-widget-293e7aaa.js} +7 -7
  71. package/{select-widget-1bb2f3cb.js → select-widget-631ad509.js} +129 -128
  72. package/{sfc-a485142c.js → sfc-2e04a9d2.js} +4 -4
  73. package/share-field-2e65357c.js +758 -0
  74. package/{share-file-a922565e.js → share-file-eb689377.js} +3 -3
  75. package/{slider-widget-62a03c7f.js → slider-widget-2da9ca84.js} +8 -8
  76. package/{slot-554b9687.js → slot-8a437369.js} +2 -2
  77. package/{static-text-widget-1a133fcf.js → static-text-widget-12ee38d3.js} +8 -8
  78. package/{steps-widget-cbfc63e6.js → steps-widget-50a5b1b2.js} +7 -7
  79. package/{subMenu-widget-422dc3b8.js → subMenu-widget-a9f796af.js} +3 -3
  80. package/{subMenu-widget.vue_vue_type_script_setup_true_lang-a06ac71e.js → subMenu-widget.vue_vue_type_script_setup_true_lang-a143cc4d.js} +1 -1
  81. package/{switch-widget-a1fa3c16.js → switch-widget-c6108ecb.js} +8 -8
  82. package/{tab-pane-widget-4f9b5bb8.js → tab-pane-widget-80652380.js} +1 -1
  83. package/{tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-c204bc62.js → tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-d324110f.js} +5 -5
  84. package/{table-col-widget-9d6e87fe.js → table-col-widget-6d6e3132.js} +7 -7
  85. package/{table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-03f6d1ce.js → table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-a1d453e5.js} +4 -4
  86. package/{table-widget-3a84c6c9.js → table-widget-9d2d3190.js} +9 -9
  87. package/{tabs-widget-2e17a213.js → tabs-widget-a0ad6a27.js} +6 -6
  88. package/{tag-widget-251a0c57.js → tag-widget-9bf22989.js} +10 -10
  89. package/{text-widget-1515d82b.js → text-widget-b22caa75.js} +10 -10
  90. package/{textarea-widget-810b1b35.js → textarea-widget-ab064141.js} +8 -8
  91. package/{time-picker-range-widget-53521305.js → time-picker-range-widget-c3922ec2.js} +8 -8
  92. package/{time-picker-widget-023d4002.js → time-picker-widget-f48d5a8d.js} +8 -8
  93. package/{time-select-widget-162ff318.js → time-select-widget-5af3138d.js} +8 -8
  94. package/{tmpl-widget-a3219a3a.js → tmpl-widget-4b44bea8.js} +8 -8
  95. package/{tree-select-widget-098f9ede.js → tree-select-widget-2e2b5eb9.js} +8 -8
  96. package/{tree-widget-61723874.js → tree-widget-da2871fb.js} +7 -7
  97. package/{widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-f7c17786.js → widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-ea39744c.js} +2 -2
  98. package/{wrapper-widget-a4f4b0b5.js → wrapper-widget-b638dad4.js} +5 -5
  99. package/share-field-e2b77435.js +0 -754
@@ -0,0 +1,758 @@
1
+ var dn = Object.defineProperty;
2
+ var gn = (t, u, g) => u in t ? dn(t, u, { enumerable: !0, configurable: !0, writable: !0, value: g }) : t[u] = g;
3
+ var ze = (t, u, g) => (gn(t, typeof u != "symbol" ? u + "" : u, g), g);
4
+ import { onMounted as we, nextTick as et, onActivated as hn, onErrorCaptured as pn, isRef as tt, watch as ee, reactive as Vn, ref as le, computed as Me, onBeforeUnmount as On, inject as Cn, toRefs as yn } from "vue";
5
+ import { b as De, e as Se, o as Q, c as te, r as En, d as z, D as bn, t as ge, f as nt, j as Rn, l as xn, x as w, w as Mn } from "./enum-type-22cb09ce.js";
6
+ import { p as Qe, b as ot, g as _n, f as me, a as Dn } from "./multirow-2ef82f3f.js";
7
+ import { u as rt } from "./icon-e9532b43.js";
8
+ import { f as j, l as de, m as Sn, n as Xe, g as $, b as Pn, d as Wn } from "./expression-83e866fe.js";
9
+ import { b as st, d as Pe, B as U, P as ut, c as at, e as Nn, a as Bn, w as ve } from "./baseImp-7fb8e7ad.js";
10
+ import { F as Ln } from "./slot-8a437369.js";
11
+ import { c as We, t as ct, l as Tn } from "./uuid-13176256.js";
12
+ import { f as Fn, d as In, h as _e, e as $n } from "./index-d054c102.js";
13
+ import { W as A, d as K } from "./enum-type-6ff9ea07.js";
14
+ function jn() {
15
+ return {
16
+ onMountedOrActivated: (g) => {
17
+ let _ = !1;
18
+ we(() => {
19
+ g(), et(() => {
20
+ _ = !0;
21
+ });
22
+ }), hn(() => {
23
+ _ && g();
24
+ });
25
+ },
26
+ onCompErrorCaptured: () => {
27
+ pn((g) => (console.log(g), !1));
28
+ }
29
+ };
30
+ }
31
+ function An(t, u) {
32
+ const { getWidgetOption: g, getWidgetOptionByPropValue: _ } = st(t, u), P = (D) => g(D);
33
+ return {
34
+ existFunc: P,
35
+ handleFunc: (D, W) => {
36
+ if (De(D)) {
37
+ var N = P(String(D));
38
+ return Pe(N, W);
39
+ } else {
40
+ var N = _(We(D));
41
+ return Pe(N, W);
42
+ }
43
+ }
44
+ };
45
+ }
46
+ class Ne {
47
+ constructor(u) {
48
+ ze(this, "refList", {});
49
+ u && (this.refList = u);
50
+ }
51
+ initRefList() {
52
+ this.refList || (this.refList = {});
53
+ }
54
+ getWidgetRef(u) {
55
+ if (u)
56
+ return this.initRefList(), this.refList[u];
57
+ }
58
+ setWidgetRef(u, g) {
59
+ u && (this.initRefList(), this.refList[u] = g);
60
+ }
61
+ removeWidgetRef(u) {
62
+ u && this.refList && delete this.refList[u.toString()];
63
+ }
64
+ }
65
+ function he(t) {
66
+ t || (t = {});
67
+ const u = new Ne(t), { instance: g } = rt(), _ = (v) => u.getWidgetRef(v == null ? void 0 : v.toString()), P = (v, h, O) => {
68
+ var C = [], S = [];
69
+ let o = _(v);
70
+ return o && C.push(o), C == null || C.forEach((f) => {
71
+ var n = D(f, h, O);
72
+ n && S.push(n);
73
+ }), S;
74
+ }, i = (v, h) => {
75
+ var O;
76
+ return (O = v == null ? void 0 : v.exposed) == null ? void 0 : O[h.toString()];
77
+ }, D = (v, h, O) => {
78
+ var C = i(v, h);
79
+ if (C) {
80
+ var S = [];
81
+ return O && (S = Object.values(O)), C(...S);
82
+ }
83
+ }, W = (v, h, O) => {
84
+ var C = [];
85
+ if (v) {
86
+ var S = We(ct(v, !0));
87
+ S == null || S.forEach((o) => {
88
+ var f = P(o, h, O);
89
+ Se(f) || C.push(f);
90
+ });
91
+ }
92
+ return Array.isArray(v) ? C : C == null ? void 0 : C[0];
93
+ }, N = (v, h) => {
94
+ let O = Q(t);
95
+ W(O, v, h);
96
+ }, p = (v, h) => {
97
+ var n, d, c;
98
+ const O = (d = (n = h || g) == null ? void 0 : n.exposed) == null ? void 0 : d.getField();
99
+ var C = Qe(O == null ? void 0 : O.id);
100
+ const S = (s) => (s == null ? void 0 : s.id) === v, o = (s) => {
101
+ var R;
102
+ var l = Qe(s == null ? void 0 : s.id);
103
+ return (C == null ? void 0 : C.groupName) === (l == null ? void 0 : l.groupName) && ((l == null ? void 0 : l.id) === v || ((R = s == null ? void 0 : s._source) == null ? void 0 : R.id) === v);
104
+ }, f = (c = Q(u.refList)) == null ? void 0 : c.find((s) => {
105
+ var R, T;
106
+ try {
107
+ const F = (T = (R = u.refList[s]) == null ? void 0 : R.exposed) == null ? void 0 : T.getField();
108
+ var l = S(F);
109
+ return !l && (C != null && C.groupName) && (l = o(F)), l;
110
+ } catch {
111
+ return !1;
112
+ }
113
+ });
114
+ if (f)
115
+ return _(f);
116
+ }, V = (v) => {
117
+ if (v) {
118
+ let h = v;
119
+ u == null || u.setWidgetRef(h, g);
120
+ }
121
+ }, b = (v) => {
122
+ if (v) {
123
+ let h = v;
124
+ u == null || u.removeWidgetRef(h);
125
+ }
126
+ };
127
+ return {
128
+ findWidgetAndCall: P,
129
+ getWidgetRef: _,
130
+ callWidgetsExposed: W,
131
+ callRefFunc: D,
132
+ existRefFunc: i,
133
+ setAllRefList: N,
134
+ findRefById: p,
135
+ findRefByName: _,
136
+ changeRegisterToRefList: (v, h) => {
137
+ v && (V(v), b(h));
138
+ },
139
+ registerToRefList: V,
140
+ unregisterFromRefList: b
141
+ };
142
+ }
143
+ const kn = (t, u, g, _) => {
144
+ const P = new Ne(t), { callRefFunc: i } = he(t), { parseGroupId: D } = ot();
145
+ if (!t || t.length <= 0 || !u)
146
+ return;
147
+ const W = () => {
148
+ var o, f;
149
+ return (f = (o = Q(t)) == null ? void 0 : o.map((n) => i(t == null ? void 0 : t[n], A.getField))) == null ? void 0 : f.filter((n) => !!n);
150
+ }, N = (o) => {
151
+ var c;
152
+ const f = (c = W()) == null ? void 0 : c.find((s) => (s == null ? void 0 : s.id) === o);
153
+ if (!f)
154
+ return;
155
+ const n = U.getName(f), d = P.getWidgetRef(n);
156
+ if (d)
157
+ return { ref: d, name: n, id: f == null ? void 0 : f.id };
158
+ }, p = (o, f) => {
159
+ if (!te(f))
160
+ return;
161
+ const n = U.getName(o), d = P.getWidgetRef(n);
162
+ if (d) {
163
+ const c = U.getOptions(o, j.defaultValue, !1, !(g != null && g.designState), { ...g, formData: f });
164
+ if (te(c))
165
+ if (tt(c)) {
166
+ let s = ee(() => c.value, (l) => {
167
+ s == null || s(), i(d, A.setValue, { newValue: l });
168
+ });
169
+ } else
170
+ i(d, A.setValue, { newValue: c });
171
+ }
172
+ }, V = (o, f) => {
173
+ const n = N(o);
174
+ if (!n)
175
+ return;
176
+ const d = n.name, c = i(n.ref, A.getValue), s = i(n.ref, A.getCheckedItems), l = {};
177
+ return Se(c) || (l[d] = c, !Rn(s) && !f && (l[`${d}${de.checkedOptions}`] = s)), l;
178
+ }, b = (o, f) => {
179
+ var d;
180
+ var n = [];
181
+ if ((d = W()) == null || d.forEach((c) => {
182
+ if (!c)
183
+ return;
184
+ const s = c == null ? void 0 : c.id;
185
+ var l = s === o;
186
+ const R = D(s), T = (R == null ? void 0 : R.id) === o, F = (R == null ? void 0 : R.groupName) === f;
187
+ return l || T && (F || !f) ? (n.push(c), !0) : !1;
188
+ }), !(!n || n.length <= 0))
189
+ return n == null ? void 0 : n.map((c) => {
190
+ var s;
191
+ return {
192
+ id: c == null ? void 0 : c.id,
193
+ name: (s = c == null ? void 0 : c._source) == null ? void 0 : s.name,
194
+ source: c == null ? void 0 : c._source
195
+ };
196
+ });
197
+ }, B = (o, f) => {
198
+ var n = [];
199
+ if (!o || (o == null ? void 0 : o.length) <= 0)
200
+ return n;
201
+ const d = D(u), c = d == null ? void 0 : d.groupName;
202
+ return f === me.Inner2Outer ? o == null || o.forEach((s) => {
203
+ var l = b(s);
204
+ l && (l == null ? void 0 : l.length) > 0 && n.push(...l);
205
+ }) : o == null || o.forEach((s) => {
206
+ var l = b(s, c);
207
+ l && (l == null ? void 0 : l.length) > 0 && n.push(...l);
208
+ }), n;
209
+ }, v = (o, f) => {
210
+ const n = {};
211
+ if (!o || o.length <= 0)
212
+ return n;
213
+ if (f === me.Inner2Outer) {
214
+ var d = En(o, (c) => {
215
+ var s;
216
+ return (s = c.source) == null ? void 0 : s.id;
217
+ });
218
+ d == null || d.forEach((c) => {
219
+ var R;
220
+ const s = c.group[0], l = [];
221
+ (R = c == null ? void 0 : c.children) == null || R.forEach((T) => {
222
+ const F = V(T == null ? void 0 : T.id, !0);
223
+ if (te(F)) {
224
+ var X = Object.values(We(F));
225
+ l.push(...X);
226
+ }
227
+ }), s && z(n, { [s]: l });
228
+ });
229
+ } else
230
+ o.forEach((c) => {
231
+ const s = V(c == null ? void 0 : c.id);
232
+ te(s) && z(n, s);
233
+ });
234
+ return n;
235
+ }, h = (o) => {
236
+ var f = {};
237
+ return o == null || o.forEach((n) => {
238
+ var d;
239
+ n != null && n.source && (n != null && n.id) && (f[(d = n == null ? void 0 : n.source) == null ? void 0 : d.id] = n == null ? void 0 : n.id);
240
+ }), f;
241
+ }, O = (o, f, n) => {
242
+ if (n === me.Inner2Inner) {
243
+ const l = bn(f), { updateFomula: R } = at(), { buildVariable: T } = Nn();
244
+ var d = h(o);
245
+ if (te(d)) {
246
+ var c = U.getOrgOption(f, j.defaultValue), s = R(ge(c), d, (F, X) => {
247
+ var Y = d[F];
248
+ return Se(Y) ? T(F) : T(Y);
249
+ });
250
+ return U.setOrgOption(l, j.defaultValue, nt(s)), l;
251
+ }
252
+ }
253
+ return f;
254
+ }, C = (o) => {
255
+ const f = o == null ? void 0 : o.id;
256
+ var n = U.getOrgOption(o, j.defaultValue);
257
+ if (n == null)
258
+ return;
259
+ const d = _n(u, f);
260
+ if (d === me.DiffInner)
261
+ return;
262
+ var c = ut.getFormulaRelatedField(n);
263
+ if (!c || c.length <= 0)
264
+ return;
265
+ var s = B(c, d);
266
+ if (!(s != null && s.some((R) => R.id === u)))
267
+ return;
268
+ const l = v(s, d);
269
+ p(O(s, o, d), l);
270
+ };
271
+ (() => {
272
+ var o;
273
+ (o = W()) == null || o.forEach((f) => {
274
+ C(f);
275
+ });
276
+ })();
277
+ }, Hn = (t, u, g, _, P) => {
278
+ var B;
279
+ if (P || !te(g))
280
+ return;
281
+ const { parseGroupId: i } = ot();
282
+ var D = i(u), W = D == null ? void 0 : D.groupName;
283
+ const { callRefFunc: N } = he(t), p = (v, h) => {
284
+ var n, d, c;
285
+ const O = (d = (n = Q(t)) == null ? void 0 : n.map((s) => N(t == null ? void 0 : t[s], A.getField))) == null ? void 0 : d.filter((s) => !!s), C = (c = Fn(O, (s) => {
286
+ var l = i(s == null ? void 0 : s.id);
287
+ return (!W || (l == null ? void 0 : l.groupName) === W) && (l == null ? void 0 : l.id) === v;
288
+ })) == null ? void 0 : c[0];
289
+ if (!C)
290
+ return;
291
+ const S = U.getName(C), f = new Ne(t).getWidgetRef(S);
292
+ f && (h == null || h(f));
293
+ }, V = ct(_ == null ? void 0 : _.newValue, !0), b = (B = Q(g)) == null ? void 0 : B.filter((v) => V == null ? void 0 : V.includes(v));
294
+ !b || b.length <= 0 || b == null || b.forEach((v) => {
295
+ var O, C;
296
+ const h = (O = g == null ? void 0 : g[v]) == null ? void 0 : O.result;
297
+ (C = Q(h)) == null || C.forEach((S) => {
298
+ var f;
299
+ const o = h == null ? void 0 : h[S];
300
+ (f = o == null ? void 0 : o.ids) == null || f.forEach((n) => {
301
+ p(n, (d) => {
302
+ N(d, o == null ? void 0 : o.event, o == null ? void 0 : o.args);
303
+ });
304
+ });
305
+ });
306
+ });
307
+ };
308
+ function it(t, u) {
309
+ var g;
310
+ return (g = t == null ? void 0 : t.classList) != null && g.contains(u) ? t : t != null && t.parentElement ? it(t == null ? void 0 : t.parentElement, u) : null;
311
+ }
312
+ function Kn() {
313
+ const t = (p) => {
314
+ if (p)
315
+ return p != null && p.ref ? p == null ? void 0 : p.ref : p;
316
+ }, u = (p) => {
317
+ var V, b;
318
+ try {
319
+ (b = (V = t(p)) == null ? void 0 : V.focus) == null || b.call(V);
320
+ } catch (B) {
321
+ console.log(B);
322
+ }
323
+ }, g = (p) => {
324
+ var V, b;
325
+ try {
326
+ (b = (V = t(p)) == null ? void 0 : V.blur) == null || b.call(V);
327
+ } catch (B) {
328
+ console.log(B);
329
+ }
330
+ }, _ = (p) => {
331
+ var V;
332
+ return (V = t(p)) == null ? void 0 : V.selectionStart;
333
+ }, P = (p) => {
334
+ var V;
335
+ return (V = t(p)) == null ? void 0 : V.selectionEnd;
336
+ }, i = (p, V) => {
337
+ var b;
338
+ return (b = t(p)) == null ? void 0 : b.setSelectionRange(V, V);
339
+ }, D = (p, V) => {
340
+ u(p), i(p, V);
341
+ };
342
+ return {
343
+ getSelectionStart: _,
344
+ getSelectionEnd: P,
345
+ setSelectionStart: i,
346
+ blur: g,
347
+ focus: u,
348
+ setMousePos: D,
349
+ getMousePos: (p) => _(p),
350
+ insertOnMousePos: (p, V, b) => {
351
+ const B = _(p), v = P(p), h = Sn(b, V, B, v);
352
+ return et(() => {
353
+ D(p, B + (V == null ? void 0 : V.length));
354
+ }), h;
355
+ }
356
+ };
357
+ }
358
+ const Ye = (t) => {
359
+ var g;
360
+ const { getFormulaFields: u } = at();
361
+ return ((g = u(ge(t))) == null ? void 0 : g.length) > 0;
362
+ }, J = (t) => {
363
+ const u = t.type;
364
+ return ![K.fileUpload, K.pictureUpload].includes(u) && t.formItemFlag || [K.form, K.dialog].includes(u);
365
+ }, Ze = (t) => {
366
+ const u = t.type;
367
+ return [K.treeSelect, K.cascader, K.select, K.checkbox, K.radio].includes(u);
368
+ };
369
+ function to(t) {
370
+ const u = t == null ? void 0 : t.designState, g = (t == null ? void 0 : t.created) != !1, _ = t == null ? void 0 : t.exResetField, P = t == null ? void 0 : t.extInitFieldModel, i = t == null ? void 0 : t.widget, D = t == null ? void 0 : t.designer, W = D == null ? void 0 : D.pageConfig, { formRefList: N, globalRefList: p, globalConfig: V, globalFormName: b, globalDataModel: B, rowScope: v } = Ln.globalInject();
371
+ let h = Vn(B || {});
372
+ const O = he(p), C = he(N), S = () => w(h), o = () => v, f = () => i, n = {
373
+ instance: {
374
+ exposed: {
375
+ getFormData: !u && Ye(i) ? S : null,
376
+ findRefByName: O.getWidgetRef,
377
+ getField: f,
378
+ getRowScope: o
379
+ }
380
+ },
381
+ designState: u,
382
+ pageConfig: W,
383
+ formData: !u && Ye(i) ? h : {},
384
+ globalConfig: V
385
+ }, d = (t == null ? void 0 : t.shareProp) || { s_attr: !0, s_extendAttr: !0, s_events: !0, s_slots: !0, s_fieldName: !0, s_optionItems: !0 }, { on$: c, dispatch: s, emit$: l } = Dn(), { instance: R } = rt(), { onCompErrorCaptured: T } = jn(), { existFunc: F } = An({ options: i == null ? void 0 : i.options }, n), { attrs: X, extendAttrs: Y, events: k, slots: Be, rules: Le, fieldName: x, buildRules: ft, clearRules: lt, disableChangeValidate: mt, enableChangeValidate: vt, optionItems: ue, filterOptionItems: dt, getCheckedOptionText: gt, getCheckedOptionValues: ht, getCheckedOptionLabels: pt, getCheckedOptionItems: Vt, activeOptionItems: Ot, activeOptionItem: Ct, activeOptionItemIndex: yt, setOptionItems: Te, setWidgetOption: ne, getWidgetOption: pe, setFieldEnable: Et, hasFieldOptions: bt, getFieldOptions: oe, setFieldOptions: Rt, computedDefaultValue: ae, hasDefaultValue: ce, singleOption: xt, watchOption: Mt, addCssClass: _t, removeCssClass: Dt } = st(i, n, d, R), { isIdClass: St, getIdByIdClass: Pt } = In(i), { getOneSchemaData: Wt, getSchemaDataObject: Nt, getSchemaDatas: Bt } = Bn(n), re = Kn();
386
+ let Ve = null, M = le();
387
+ const q = le(), Lt = () => x.value, Fe = () => `${i == null ? void 0 : i.id}-${Tn()}`, Oe = le(Fe()), Ie = () => {
388
+ Oe.value = Fe();
389
+ }, Tt = Me({
390
+ get: () => {
391
+ if (De(M.value)) {
392
+ var e = Number(M.value);
393
+ return isNaN(e) ? void 0 : (M.value = e, e);
394
+ }
395
+ return M.value;
396
+ },
397
+ set: (e) => {
398
+ M.value = e;
399
+ }
400
+ }), Ft = Me({
401
+ get: () => {
402
+ if (De(M.value)) {
403
+ var e = nt(M.value);
404
+ xn(e) && (M.value = e);
405
+ }
406
+ return M.value;
407
+ },
408
+ set: (e) => {
409
+ M.value = e;
410
+ }
411
+ }), It = (e) => {
412
+ var r, a, m;
413
+ (m = (a = (r = O.getWidgetRef(x.value)) == null ? void 0 : r.exposed) == null ? void 0 : a.loadOptionItems) == null || m.call(a, e), Te(e);
414
+ }, Ce = (e) => {
415
+ var r, a, m;
416
+ return (m = (a = (r = O.getWidgetRef(x.value)) == null ? void 0 : r.exposed) == null ? void 0 : a.getCheckedItems) == null ? void 0 : m.call(a, e);
417
+ }, $e = (e) => {
418
+ var r, a, m;
419
+ return (m = (a = (r = O.getWidgetRef(x.value)) == null ? void 0 : r.exposed) == null ? void 0 : a.getCheckedLabels) == null ? void 0 : m.call(a, e);
420
+ }, $t = (e) => {
421
+ var r, a, m;
422
+ return (m = (a = (r = O.getWidgetRef(x.value)) == null ? void 0 : r.exposed) == null ? void 0 : a.getCheckedText) == null ? void 0 : m.call(a, e);
423
+ }, ye = () => {
424
+ var y;
425
+ const e = (y = Y.value) == null ? void 0 : y.withAttachData;
426
+ if (!Ze(i) || e === !1)
427
+ return;
428
+ const r = M.value, a = $e(r), m = $t(r);
429
+ var E = w(Ce(r));
430
+ je(a, E, m);
431
+ }, je = (e, r, a) => {
432
+ var m = {};
433
+ if (e != null) {
434
+ let E = oe("textName", !1);
435
+ [`${x.value}${de.optionText}`, E].forEach((y) => {
436
+ y && m[y] === void 0 && (m[y] = e);
437
+ });
438
+ }
439
+ if (r != null && ge(r) !== ge(M.value)) {
440
+ let E = oe("optionName", !1);
441
+ [`${x.value}${de.checkedOptions}`, E].forEach((y) => {
442
+ y && m[y] === void 0 && (m[y] = r);
443
+ });
444
+ }
445
+ if (a != null) {
446
+ let E = oe("labelName", !1);
447
+ e != a && [`${x.value}${de.optionLabelName}`, E].forEach((y) => {
448
+ y && m[y] === void 0 && (m[y] = a);
449
+ });
450
+ }
451
+ z(h, w(m));
452
+ }, Z = (e) => {
453
+ if (J(i)) {
454
+ ye();
455
+ var r = { [x.value]: e };
456
+ z(h, r);
457
+ }
458
+ }, se = (e) => {
459
+ u || Z(e);
460
+ }, Ae = (e) => oe(e, !1), ke = () => {
461
+ var e = yn(h);
462
+ M = ut.get(e, x.value);
463
+ }, He = (e) => {
464
+ Ve = w(e);
465
+ }, jt = () => {
466
+ u || P && P(G());
467
+ }, At = () => {
468
+ ce() && ve(ae()).then((e) => {
469
+ Z(e), ke();
470
+ });
471
+ }, Ee = (e, r) => {
472
+ if (!J(i))
473
+ return;
474
+ l(j.fieldValueChanged, { newValue: e, oldValue: r });
475
+ const a = { fieldId: i.id, fieldName: x.value, newValue: e, oldValue: r };
476
+ s(b, j.fieldChange, a, R);
477
+ }, kt = (e) => F(e), be = (e, r) => Pe(pe(e), r), Ht = (e) => {
478
+ se(e), qe(), be(j.onInput, { value: e });
479
+ }, Kt = (e, r) => {
480
+ var a, m, E;
481
+ return (E = (m = (a = O.getWidgetRef(x.value)) == null ? void 0 : a.exposed) == null ? void 0 : m.handleBeforeChange) == null ? void 0 : E.call(m, e, r);
482
+ }, Ut = (...e) => {
483
+ var E, y, L;
484
+ let a = ((E = e == null ? void 0 : e[0]) == null ? void 0 : E.target) != null ? (L = (y = e == null ? void 0 : e[0]) == null ? void 0 : y.target) == null ? void 0 : L.value : e == null ? void 0 : e[0];
485
+ a = w(a);
486
+ var m = Kt(a, Ve);
487
+ m != null ? se(m) : se(a), Ee(a, Ve), qe(), He(a);
488
+ }, qt = (e = !0) => {
489
+ ne($.readonly, e);
490
+ }, Gt = (e = !0) => {
491
+ ne($.disabled, e);
492
+ }, Jt = (e = !0) => {
493
+ ne($.hidden, e), e ? Je() : fe();
494
+ }, zt = (e = !0) => {
495
+ Et($.required, e), fe();
496
+ }, Qt = (e) => {
497
+ ne($.label, e);
498
+ }, G = () => M == null ? void 0 : M.value, Ke = (e) => {
499
+ M.value = e;
500
+ }, ie = (e) => {
501
+ let r = w(G());
502
+ if (Ke(e), !J(i))
503
+ return;
504
+ const a = G();
505
+ r !== a && (se(a), Ee(e, r));
506
+ }, Xt = () => {
507
+ ce() ? ve(ae()).then((e) => {
508
+ Z(e);
509
+ }) : Z(null), _ == null || _();
510
+ }, Yt = (e) => {
511
+ const r = G(), a = re.insertOnMousePos(q.value, e, r);
512
+ ie(a);
513
+ }, Zt = (e, r) => {
514
+ ee(() => M == null ? void 0 : M.value, (a, m) => {
515
+ e == null || e({ id: i.id, name: x.value, newValue: a, oldValue: m });
516
+ }, r);
517
+ }, wt = (e) => {
518
+ var y;
519
+ e.preventDefault();
520
+ const r = (L) => {
521
+ var H;
522
+ const I = (H = Array.from(L.classList)) == null ? void 0 : H.find((Re) => St(Re));
523
+ return I ? Pt(I) : "";
524
+ }, a = document.activeElement;
525
+ if (!a)
526
+ return;
527
+ const m = document.getElementsByClassName(Xe.formItemTarget);
528
+ for (var E = 0; E < m.length; E++) {
529
+ const L = m[E], I = it(a, Xe.formItemTarget);
530
+ if (!I)
531
+ continue;
532
+ const H = r(L), Re = r(I);
533
+ if (H === Re) {
534
+ if (E === m.length - 1)
535
+ return;
536
+ const ln = m[E + 1], mn = r(ln), xe = O.findRefById(mn, R);
537
+ try {
538
+ (y = xe == null ? void 0 : xe.exposed) == null || y.focus();
539
+ } catch (vn) {
540
+ console.log(vn);
541
+ }
542
+ }
543
+ }
544
+ };
545
+ let en = () => {
546
+ var L;
547
+ let e = {
548
+ componentName: x.value,
549
+ //用于组件事件emitter发射与接收处理
550
+ refList: N,
551
+ allRefList: p,
552
+ changeRegisterToRefList: (I, H) => {
553
+ O.changeRegisterToRefList(I, H), C.changeRegisterToRefList(I, H);
554
+ },
555
+ getField: f,
556
+ getFormData: S,
557
+ getValue: G,
558
+ setValue: Ke,
559
+ emit$: l,
560
+ findRefByName: O.getWidgetRef,
561
+ findRefById: O.findRefById,
562
+ callRefFunc: O.callRefFunc,
563
+ getWidgetOption: pe,
564
+ setWidgetOption: ne,
565
+ refreshKey: Ie,
566
+ getRowScope: o,
567
+ //组件的数据绑定:继承的数据,用于计算组件属性变量
568
+ getOneSchemaData: Wt,
569
+ getSchemaDatas: Bt,
570
+ getSchemaDataObject: Nt,
571
+ addCssClass: _t,
572
+ removeCssClass: Dt
573
+ }, r = {
574
+ resetField: Xt,
575
+ getValue: G,
576
+ setValue: ie,
577
+ refreshDefaultValue: At,
578
+ insertOnMousePos: Yt,
579
+ disableChangeValidate: mt,
580
+ enableChangeValidate: vt,
581
+ focus: () => {
582
+ re.focus(q.value);
583
+ },
584
+ blur: () => {
585
+ re.blur(q.value);
586
+ },
587
+ getMousePos: () => {
588
+ re.getMousePos(q.value);
589
+ },
590
+ setMousePos: (I) => {
591
+ re.setMousePos(q.value, I);
592
+ }
593
+ }, a = {
594
+ loadOptionItems: It,
595
+ getCheckedItems: Ce,
596
+ getCheckedLabels: $e
597
+ }, m = {
598
+ [$.required]: { name: A.setRequired, fn: zt },
599
+ [$.label]: { name: A.setLabel, fn: Qt },
600
+ [$.hidden]: { name: A.setHidden, fn: Jt },
601
+ [$.disabled]: { name: A.setDisabled, fn: Gt },
602
+ [$.readonly]: { name: A.setReadonly, fn: qt }
603
+ }, E = {};
604
+ (L = Q(m)) == null || L.forEach((I) => {
605
+ if (_e(i, I)) {
606
+ const H = m[I];
607
+ E[H.name] = H.fn;
608
+ }
609
+ });
610
+ var y = z(e, E);
611
+ return J(i) && (y = z(y, r)), Ze(i) && (y = z(y, a)), y;
612
+ };
613
+ const tn = Me(() => ({
614
+ attrs: X.value,
615
+ extendAttrs: Y.value,
616
+ events: k.value,
617
+ slots: Be.value,
618
+ fieldKey: Oe.value,
619
+ fieldEditor: q.value,
620
+ fieldName: x.value
621
+ })), nn = (e) => {
622
+ t.designState && t.designer && ee(() => {
623
+ var r;
624
+ return (r = t == null ? void 0 : t.widget) == null ? void 0 : r[e];
625
+ }, (r, a) => {
626
+ const { emitHistoryChange: m } = $n(t.designer);
627
+ m(`edit ${x.value}.${e},newValue:${r},oldValue:${a}`);
628
+ }, {
629
+ deep: !0
630
+ });
631
+ }, on = (e, r, a) => {
632
+ const m = le(), E = Ae(e), y = (L) => {
633
+ r && (m.value = r(L || E));
634
+ };
635
+ return tt(E) ? ee(E, (L) => {
636
+ y(L), a && a(L);
637
+ }) : y(E), m;
638
+ }, Ue = () => {
639
+ !J(i) || u || Zt((e) => {
640
+ kn(p, i == null ? void 0 : i.id, n), Hn(p, i == null ? void 0 : i.id, U.getOptions(i, $.relate), e), ye();
641
+ }, { immediate: !0 });
642
+ }, qe = () => {
643
+ const e = { propName: x.value };
644
+ s(b, j.fieldValidation, e, R);
645
+ }, Ge = () => {
646
+ const e = { fieldId: i.id, fieldName: x.value, rules: Le };
647
+ s(b, j.fieldRuleChange, e, R);
648
+ }, fe = () => {
649
+ if (!J(i))
650
+ return;
651
+ const e = ft();
652
+ return Ge(), e;
653
+ }, Je = () => {
654
+ lt(), Ge();
655
+ }, rn = () => {
656
+ _e(i, "change") && (k.value.change = Ut), _e(i, "input") && (k.value.input = Ht), c(Pn.setFormData, (e) => {
657
+ ie(e[x.value]);
658
+ }), c(j.fieldValueChanged, (e) => {
659
+ be(j.onChange, { value: e == null ? void 0 : e.newValue, oldValue: e == null ? void 0 : e.oldValue });
660
+ });
661
+ }, sn = () => {
662
+ let e = x.value;
663
+ J(i) ? ((!Mn(h, e) || h[e] === void 0) && (Z(null), ce() && ve(ae()).then((r) => {
664
+ Z(r);
665
+ })), ke()) : ce() && ve(ae()).then((r) => {
666
+ ie(r);
667
+ }), He(G()), jt();
668
+ }, un = () => {
669
+ ee(() => ue == null ? void 0 : ue.value, (e, r) => {
670
+ ye();
671
+ });
672
+ }, an = () => {
673
+ const e = Cn(Wn.isRenderComplete);
674
+ if (e != null && e.value) {
675
+ Ue();
676
+ return;
677
+ }
678
+ e != null && ee(() => e == null ? void 0 : e.value, (r) => {
679
+ r && Ue();
680
+ }, { immediate: !0 });
681
+ }, cn = () => {
682
+ var e, r;
683
+ if (g)
684
+ try {
685
+ sn(), fe(), rn(), O.registerToRefList(x.value), C.registerToRefList(x.value), (r = (e = k == null ? void 0 : k.value) == null ? void 0 : e.created) == null || r.call(e), T();
686
+ } catch (a) {
687
+ console.log("create", i, a);
688
+ }
689
+ }, fn = () => {
690
+ g && (we(() => {
691
+ var e, r;
692
+ try {
693
+ an(), un(), (r = (e = k == null ? void 0 : k.value) == null ? void 0 : e.mounted) == null || r.call(e);
694
+ } catch (a) {
695
+ console.log("mounted", i, a);
696
+ }
697
+ }), On(() => {
698
+ O.unregisterFromRefList(x.value), C.unregisterFromRefList(x.value);
699
+ }));
700
+ };
701
+ return cn(), fn(), {
702
+ exposed: en(),
703
+ fieldModel: M,
704
+ objFieldModel: Ft,
705
+ numFieldModel: Tt,
706
+ fieldEditor: q,
707
+ fieldKey: Oe,
708
+ field: i,
709
+ instance: R,
710
+ attrs: X,
711
+ extendAttrs: Y,
712
+ slots: Be,
713
+ events: k,
714
+ rules: Le,
715
+ fieldObj: tn,
716
+ pageConfig: W,
717
+ formModel: h,
718
+ fieldName: x,
719
+ propResultOpt: n,
720
+ optionItems: ue,
721
+ activeOptionItems: Ot,
722
+ activeOptionItem: Ct,
723
+ activeOptionItemIndex: yt,
724
+ filterOptionItems: dt,
725
+ setOptionItems: Te,
726
+ getCheckedItems: Ce,
727
+ getCheckedOptionItems: (e) => Vt(e || M.value),
728
+ getCheckedOptionLabels: (e) => pt(e || M.value),
729
+ getCheckedOptionValues: (e) => ht(e || M.value),
730
+ getCheckedOptionText: (e) => gt(e || M.value),
731
+ refreshKey: Ie,
732
+ watchKeyValue: on,
733
+ watchPropAndSaveHistoryStep: nn,
734
+ existEvent: kt,
735
+ handleEvent: be,
736
+ handleEnter: wt,
737
+ getPropName: Lt,
738
+ emitFieldDataChange: Ee,
739
+ syncUpdateFormModel: se,
740
+ getWidgetRef: O.getWidgetRef,
741
+ clearRules: Je,
742
+ buildRules: fe,
743
+ getFieldOptionModel: Ae,
744
+ getFieldOptions: oe,
745
+ hasFieldOptions: bt,
746
+ setFieldOptions: Rt,
747
+ getWidgetOption: pe,
748
+ singleOption: xt,
749
+ watchOption: Mt,
750
+ mergeOptionToFormModel: je
751
+ };
752
+ }
753
+ export {
754
+ Ne as R,
755
+ he as a,
756
+ to as b,
757
+ An as u
758
+ };