hlrender 0.0.84 → 0.0.86

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 (86) hide show
  1. package/{affix-widget-dd7e040a.js → affix-widget-e63bc415.js} +3 -3
  2. package/{alert-widget-b58b33cc.js → alert-widget-6e7ae1e4.js} +3 -3
  3. package/{anchor-widget-c0e93b9d.js → anchor-widget-dfd9a902.js} +1 -1
  4. package/{auto-complete-widget-a608b94d.js → auto-complete-widget-c7507937.js} +2 -2
  5. package/{avatar-widget-16974770.js → avatar-widget-c59a688c.js} +3 -3
  6. package/{backtop-widget-c19400fe.js → backtop-widget-d304aa3d.js} +3 -3
  7. package/{badge-widget-47203271.js → badge-widget-f1d9b806.js} +3 -3
  8. package/{breadcrumb-widget-a3fdaf1e.js → breadcrumb-widget-7634b670.js} +1 -1
  9. package/{button-widget-d8b510ae.js → button-widget-2bbce676.js} +3 -3
  10. package/{cache-widget-b58cc15b.js → cache-widget-4150c8b5.js} +1 -1
  11. package/{card-widget-c4fbd3bd.js → card-widget-c0c65180.js} +2 -2
  12. package/{carousel-widget-a3a01575.js → carousel-widget-787ca9b7.js} +1 -1
  13. package/{cascader-widget-030b6168.js → cascader-widget-4b5004d6.js} +1 -1
  14. package/{chart-widget-999deb4e.js → chart-widget-dce9ab23.js} +1 -1
  15. package/{checkbox-widget-b1d08e89.js → checkbox-widget-a96a1f8b.js} +1 -1
  16. package/{collapse-widget-022f59ce.js → collapse-widget-61bbbedd.js} +1 -1
  17. package/{color-picker-widget-4f520267.js → color-picker-widget-697e998f.js} +1 -1
  18. package/{cont-cell-widget-5b75cd48.js → cont-cell-widget-0571e74f.js} +1 -1
  19. package/{cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-da561134.js → cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-73daa90e.js} +2 -2
  20. package/{cont-widget-7cfaabc5.js → cont-widget-96b7919c.js} +2 -2
  21. package/{date-picker-range-widget-5225f828.js → date-picker-range-widget-ee170117.js} +1 -1
  22. package/{date-picker-widget-aa121b2c.js → date-picker-widget-ff9d06bf.js} +1 -1
  23. package/{default-slot-widget-4eefb621.js → default-slot-widget-082f4c99.js} +2 -2
  24. package/{default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-27fed468.js → default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-9f18c4b4.js} +1 -1
  25. package/{descriptions-widget-c2c4afe2.js → descriptions-widget-873db5f9.js} +2 -2
  26. package/{dialog-widget-5988b3fc.js → dialog-widget-3491e678.js} +3 -3
  27. package/{divider-widget-4a79268d.js → divider-widget-7aa5ddc7.js} +3 -3
  28. package/{drag-wrapper-c7d69fe9.js → drag-wrapper-aa253f8d.js} +1 -1
  29. package/{drawer-widget-976782fa.js → drawer-widget-0c84f880.js} +3 -3
  30. package/{dropdown-widget-0f0772c3.js → dropdown-widget-5a9c099e.js} +2 -2
  31. package/{empty-widget-b321364e.js → empty-widget-2b5947ce.js} +3 -3
  32. package/{feedback-widget-f98694b0.js → feedback-widget-e2d53f1b.js} +3 -3
  33. package/{feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-6aab861f.js → feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-4362ca13.js} +2 -2
  34. package/{file-upload-widget-c8ed1bf5.js → file-upload-widget-1e9c9fc4.js} +2 -2
  35. package/{form-widget-41e65b55.js → form-widget-943b0828.js} +2 -2
  36. package/{grid-col-widget-aba68f25.js → grid-col-widget-2dc4f87c.js} +1 -1
  37. package/{grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-b48269cb.js → grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-747b3e2f.js} +2 -2
  38. package/{grid-widget-29ecf365.js → grid-widget-2faff463.js} +2 -2
  39. package/{html-text-widget-00ee93ec.js → html-text-widget-376bd069.js} +1 -1
  40. package/{iframe-widget-2d3bf4f6.js → iframe-widget-2209ec6f.js} +1 -1
  41. package/{image-widget-4a2d4589.js → image-widget-2272835d.js} +1 -1
  42. package/{input-number-widget-29047d02.js → input-number-widget-79e7f0a9.js} +1 -1
  43. package/{input-widget-b1a1a7f3.js → input-widget-442ea86f.js} +2 -2
  44. package/{link-widget-52187c67.js → link-widget-b26575be.js} +3 -3
  45. package/{ltable-col-widget-6a0e5416.js → ltable-col-widget-9b648ac4.js} +1 -1
  46. package/{ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-b1d89b16.js → ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-c9b25559.js} +2 -2
  47. package/{ltable-widget-5d187195.js → ltable-widget-ad86509e.js} +2 -2
  48. package/{menu-widget-65050c6a.js → menu-widget-890435f9.js} +1 -1
  49. package/{model-widget-b52d7ebb.js → model-widget-65600aef.js} +1 -1
  50. package/{multirow-widget-bcb9ceee.js → multirow-widget-b5d37c4d.js} +2 -2
  51. package/package.json +2 -2
  52. package/{pagination-widget-782e9736.js → pagination-widget-5362dbe3.js} +1 -1
  53. package/{picture-upload-widget-eb67b99f.js → picture-upload-widget-c0685f16.js} +2 -2
  54. package/{progress-widget-64184089.js → progress-widget-c70b39ea.js} +2 -2
  55. package/{radio-widget-e04e952f.js → radio-widget-99e398a3.js} +1 -1
  56. package/{range-widget-0b2cf1f6.js → range-widget-041b3a22.js} +2 -2
  57. package/{rate-widget-4791ce39.js → rate-widget-2f8a0ffa.js} +1 -1
  58. package/render.es.js +16 -16
  59. package/render.umd.js +228 -228
  60. package/{result-widget-8360185f.js → result-widget-b65269ed.js} +2 -2
  61. package/{rich-editor-widget-6bc4e5d5.js → rich-editor-widget-d187cf1d.js} +1 -1
  62. package/{router-widget-6149b801.js → router-widget-c728b3a2.js} +1 -1
  63. package/{select-widget-67f5c76d.js → select-widget-556bb037.js} +1 -1
  64. package/share-field-7337fba7.js +777 -0
  65. package/{share-file-ee7f211b.js → share-file-721a384b.js} +1 -1
  66. package/{slider-widget-1fbdca19.js → slider-widget-e3331775.js} +1 -1
  67. package/{static-text-widget-eaa7b21e.js → static-text-widget-d91dc382.js} +1 -1
  68. package/{steps-widget-83f921a8.js → steps-widget-d564537c.js} +1 -1
  69. package/{switch-widget-9f9e4b1e.js → switch-widget-232dcf19.js} +1 -1
  70. package/{tab-pane-widget-d8fca1e1.js → tab-pane-widget-7f4e2180.js} +1 -1
  71. package/{tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-b70d1918.js → tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-1cb173fb.js} +2 -2
  72. package/{table-col-widget-6843a3b2.js → table-col-widget-d86eb191.js} +3 -3
  73. package/{table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-89c59eac.js → table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-7eeb26ce.js} +25 -25
  74. package/{table-widget-a331c143.js → table-widget-37fdcd41.js} +38 -38
  75. package/{tabs-widget-d8906f4f.js → tabs-widget-6708e931.js} +2 -2
  76. package/{tag-widget-527e9bcd.js → tag-widget-a2fc0920.js} +3 -3
  77. package/{text-widget-74946ebd.js → text-widget-22f5d666.js} +3 -3
  78. package/{textarea-widget-dd3c3e46.js → textarea-widget-fe4bb5d4.js} +1 -1
  79. package/{time-picker-range-widget-d94558a3.js → time-picker-range-widget-4daca603.js} +1 -1
  80. package/{time-picker-widget-395f8cc4.js → time-picker-widget-a07d88b7.js} +1 -1
  81. package/{time-select-widget-cb17e5ad.js → time-select-widget-6d380412.js} +1 -1
  82. package/{tmpl-widget-2c2f0b6b.js → tmpl-widget-f15f2a35.js} +2 -2
  83. package/{tree-select-widget-cd45be04.js → tree-select-widget-a7c3b2cf.js} +1 -1
  84. package/{tree-widget-455ce76e.js → tree-widget-4ab3c954.js} +1 -1
  85. package/{wrapper-widget-d9e5664e.js → wrapper-widget-be6fa965.js} +2 -2
  86. package/share-field-27cccffb.js +0 -776
@@ -0,0 +1,777 @@
1
+ var En = Object.defineProperty;
2
+ var bn = (t, u, p) => u in t ? En(t, u, { enumerable: !0, configurable: !0, writable: !0, value: p }) : t[u] = p;
3
+ var Xe = (t, u, p) => (bn(t, typeof u != "symbol" ? u + "" : u, p), p);
4
+ import { onMounted as nt, nextTick as ot, onActivated as yn, onErrorCaptured as Rn, isRef as rt, watch as Z, reactive as xn, ref as me, computed as _e, onBeforeUnmount as Mn, inject as Sn, toRefs as _n } from "vue";
5
+ import { l as ue, b as We, e as st, o as X, c as w, u as Dn, G as Wn, t as he, f as ut, j as Pn, m as Nn, A as Y, d as se, x as Bn, M as ve } from "./enum-type-83a1c63e.js";
6
+ import { p as Ye, b as at, g as In, f as de, a as Ln } from "./multirow-ba01fb1b.js";
7
+ import { u as ct } from "./icon-e9532b43.js";
8
+ import { f as $, l as ge, m as Tn, n as Ze, g as j, b as Fn, d as jn } from "./expression-a789517c.js";
9
+ import { b as it, d as Pe, B as G, P as ft, c as lt, e as $n, a as we } from "./baseImp-7dec7b0d.js";
10
+ import { F as An } from "./slot-47652b09.js";
11
+ import { c as Ne, t as mt, l as kn } from "./uuid-85671611.js";
12
+ import { f as Hn, d as Kn, h as De, e as Un } from "./index-9219e73c.js";
13
+ import { W as A, c as U } from "./enum-type-966ff1e0.js";
14
+ function Gn() {
15
+ return {
16
+ onMountedOrActivated: (p) => {
17
+ let M = !1;
18
+ nt(() => {
19
+ p(), ot(() => {
20
+ M = !0;
21
+ });
22
+ }), yn(() => {
23
+ M && p();
24
+ });
25
+ },
26
+ onCompErrorCaptured: () => {
27
+ Rn((p) => (ue.error("onCompErrorCaptured", p), !1));
28
+ }
29
+ };
30
+ }
31
+ function qn(t, u) {
32
+ const { getWidgetOption: p, getWidgetOptionByPropValue: M } = it(t, u), N = (i) => p(i);
33
+ return {
34
+ existFunc: N,
35
+ handleFunc: (i, W) => {
36
+ if (We(i)) {
37
+ var I = N(String(i));
38
+ return Pe(I, W);
39
+ } else {
40
+ var I = M(Ne(i));
41
+ return Pe(I, W);
42
+ }
43
+ }
44
+ };
45
+ }
46
+ class Be {
47
+ constructor(u) {
48
+ Xe(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, p) {
59
+ u && (this.initRefList(), this.refList[u] = p);
60
+ }
61
+ removeWidgetRef(u) {
62
+ u && this.refList && delete this.refList[u.toString()];
63
+ }
64
+ }
65
+ function pe(t) {
66
+ t || (t = {});
67
+ const u = new Be(t), { instance: p } = ct(), M = (g) => u.getWidgetRef(g == null ? void 0 : g.toString()), N = (g, V, C) => {
68
+ var v = [], _ = [];
69
+ let n = M(g);
70
+ return n && v.push(n), v == null || v.forEach((l) => {
71
+ var r = i(l, V, C);
72
+ r && _.push(r);
73
+ }), _;
74
+ }, D = (g, V) => {
75
+ var C;
76
+ return (C = g == null ? void 0 : g.exposed) == null ? void 0 : C[V.toString()];
77
+ }, i = (g, V, C) => {
78
+ var v = D(g, V);
79
+ if (v) {
80
+ var _ = [];
81
+ return C && (_ = Object.values(C)), v(..._);
82
+ }
83
+ }, W = (g, V, C) => {
84
+ var v = [];
85
+ if (g) {
86
+ var _ = Ne(mt(g, !0));
87
+ _ == null || _.forEach((n) => {
88
+ var l = N(n, V, C);
89
+ st(l) || v.push(l);
90
+ });
91
+ }
92
+ return Array.isArray(g) ? v : v == null ? void 0 : v[0];
93
+ }, I = (g, V) => {
94
+ let C = X(t);
95
+ W(C, g, V);
96
+ }, O = (g, V) => {
97
+ var r, d, f;
98
+ const C = (d = (r = V || p) == null ? void 0 : r.exposed) == null ? void 0 : d.getField();
99
+ var v = Ye(C == null ? void 0 : C.id);
100
+ const _ = (s) => (s == null ? void 0 : s.id) === g, n = (s) => {
101
+ var S;
102
+ var c = Ye(s == null ? void 0 : s.id);
103
+ return (v == null ? void 0 : v.groupName) === (c == null ? void 0 : c.groupName) && ((c == null ? void 0 : c.id) === g || ((S = s == null ? void 0 : s._source) == null ? void 0 : S.id) === g);
104
+ }, l = (f = X(u.refList)) == null ? void 0 : f.find((s) => {
105
+ var S, P;
106
+ try {
107
+ const L = (P = (S = u.refList[s]) == null ? void 0 : S.exposed) == null ? void 0 : P.getField();
108
+ var c = _(L);
109
+ return !c && (v != null && v.groupName) && (c = n(L)), c;
110
+ } catch {
111
+ return !1;
112
+ }
113
+ });
114
+ if (l)
115
+ return M(l);
116
+ }, h = (g) => {
117
+ if (g) {
118
+ let V = g;
119
+ u == null || u.setWidgetRef(V, p);
120
+ }
121
+ }, x = (g) => {
122
+ if (g) {
123
+ let V = g;
124
+ u == null || u.removeWidgetRef(V);
125
+ }
126
+ };
127
+ return {
128
+ findWidgetAndCall: N,
129
+ getWidgetRef: M,
130
+ callWidgetsExposed: W,
131
+ callRefFunc: i,
132
+ existRefFunc: D,
133
+ setAllRefList: I,
134
+ findRefById: O,
135
+ findRefByName: M,
136
+ changeRegisterToRefList: (g, V) => {
137
+ g && (h(g), x(V));
138
+ },
139
+ registerToRefList: h,
140
+ unregisterFromRefList: x
141
+ };
142
+ }
143
+ const Jn = (t, u, p, M) => {
144
+ const N = new Be(t), { callRefFunc: D } = pe(t), { parseGroupId: i } = at();
145
+ if (!t || t.length <= 0 || !u)
146
+ return;
147
+ const W = () => {
148
+ var n, l;
149
+ return (l = (n = X(t)) == null ? void 0 : n.map((r) => D(t == null ? void 0 : t[r], A.getField))) == null ? void 0 : l.filter((r) => !!r);
150
+ }, I = (n) => {
151
+ var f;
152
+ const l = (f = W()) == null ? void 0 : f.find((s) => (s == null ? void 0 : s.id) === n);
153
+ if (!l)
154
+ return;
155
+ const r = G.getName(l), d = N.getWidgetRef(r);
156
+ if (d)
157
+ return { ref: d, name: r, id: l == null ? void 0 : l.id };
158
+ }, O = (n, l) => {
159
+ if (!w(l))
160
+ return;
161
+ const r = G.getName(n), d = N.getWidgetRef(r);
162
+ if (d) {
163
+ const f = G.getOptions(n, $.defaultValue, !1, !(p != null && p.designState), { ...p, formData: l });
164
+ if (w(f))
165
+ if (rt(f)) {
166
+ let s = Z(() => f.value, (c) => {
167
+ s == null || s(), D(d, A.setValue, { newValue: c });
168
+ });
169
+ } else
170
+ D(d, A.setValue, { newValue: f });
171
+ }
172
+ }, h = (n, l) => {
173
+ const r = I(n);
174
+ if (!r)
175
+ return;
176
+ const d = r.name, f = D(r.ref, A.getValue), s = D(r.ref, A.getCheckedItems), c = {};
177
+ return c[d] = f, f !== void 0 && !Pn(s) && !l && (c[`${d}${ge.checkedOptions}`] = s), c;
178
+ }, x = (n, l) => {
179
+ var d;
180
+ var r = [];
181
+ if ((d = W()) == null || d.forEach((f) => {
182
+ if (!f)
183
+ return;
184
+ const s = f == null ? void 0 : f.id;
185
+ var c = s === n;
186
+ const S = i(s), P = (S == null ? void 0 : S.id) === n, L = (S == null ? void 0 : S.groupName) === l;
187
+ return c || P && (L || !l) ? (r.push(f), !0) : !1;
188
+ }), !(!r || r.length <= 0))
189
+ return r == null ? void 0 : r.map((f) => {
190
+ var s;
191
+ return {
192
+ id: f == null ? void 0 : f.id,
193
+ name: (s = f == null ? void 0 : f._source) == null ? void 0 : s.name,
194
+ source: f == null ? void 0 : f._source
195
+ };
196
+ });
197
+ }, B = (n, l) => {
198
+ var r = [];
199
+ if (!n || (n == null ? void 0 : n.length) <= 0)
200
+ return r;
201
+ const d = i(u), f = d == null ? void 0 : d.groupName;
202
+ return l === de.Inner2Outer ? n == null || n.forEach((s) => {
203
+ var c = x(s);
204
+ c && (c == null ? void 0 : c.length) > 0 && r.push(...c);
205
+ }) : n == null || n.forEach((s) => {
206
+ var c = x(s, f);
207
+ c && (c == null ? void 0 : c.length) > 0 && r.push(...c);
208
+ }), r;
209
+ }, g = (n, l) => {
210
+ let r = {};
211
+ if (!n || n.length <= 0)
212
+ return r;
213
+ if (l === de.Inner2Outer) {
214
+ var d = Dn(n, (f) => {
215
+ var s;
216
+ return (s = f.source) == null ? void 0 : s.id;
217
+ });
218
+ d == null || d.forEach((f) => {
219
+ var S;
220
+ const s = f.group[0], c = [];
221
+ (S = f == null ? void 0 : f.children) == null || S.forEach((P) => {
222
+ const L = h(P == null ? void 0 : P.id, !0);
223
+ if (w(L)) {
224
+ var q = Object.values(Ne(L));
225
+ c.push(...q);
226
+ }
227
+ }), s && (r = Object.assign(r, { [s]: c }));
228
+ });
229
+ } else
230
+ n.forEach((f) => {
231
+ const s = h(f == null ? void 0 : f.id);
232
+ w(s) && (r = Object.assign(r, s));
233
+ });
234
+ return r;
235
+ }, V = (n) => {
236
+ var l = {};
237
+ return n == null || n.forEach((r) => {
238
+ var d;
239
+ r != null && r.source && (r != null && r.id) && (l[(d = r == null ? void 0 : r.source) == null ? void 0 : d.id] = r == null ? void 0 : r.id);
240
+ }), l;
241
+ }, C = (n, l, r) => {
242
+ if (r === de.Inner2Inner) {
243
+ const c = Wn(l), { updateFomula: S } = lt(), { buildVariable: P } = $n();
244
+ var d = V(n);
245
+ if (w(d)) {
246
+ var f = G.getOrgOption(l, $.defaultValue), s = S(he(f), d, (L, q) => {
247
+ var ee = d[L];
248
+ return st(ee) ? P(L) : P(ee);
249
+ });
250
+ return G.setOrgOption(c, $.defaultValue, ut(s)), c;
251
+ }
252
+ }
253
+ return l;
254
+ }, v = (n) => {
255
+ const l = n == null ? void 0 : n.id;
256
+ var r = G.getOrgOption(n, $.defaultValue);
257
+ if (r == null)
258
+ return;
259
+ const d = In(u, l);
260
+ if (d === de.DiffInner)
261
+ return;
262
+ var f = ft.getFormulaRelatedField(r);
263
+ if (!f || f.length <= 0)
264
+ return;
265
+ var s = B(f, d);
266
+ if (!(s != null && s.some((S) => S.id === u)))
267
+ return;
268
+ const c = g(s, d);
269
+ O(C(s, n, d), c);
270
+ };
271
+ (() => {
272
+ var n;
273
+ (n = W()) == null || n.forEach((l) => {
274
+ v(l);
275
+ });
276
+ })();
277
+ }, zn = (t, u, p, M, N) => {
278
+ var B;
279
+ if (N || !w(p))
280
+ return;
281
+ const { parseGroupId: D } = at();
282
+ var i = D(u), W = i == null ? void 0 : i.groupName;
283
+ const { callRefFunc: I } = pe(t), O = (g, V) => {
284
+ var r, d, f;
285
+ const C = (d = (r = X(t)) == null ? void 0 : r.map((s) => I(t == null ? void 0 : t[s], A.getField))) == null ? void 0 : d.filter((s) => !!s), v = (f = Hn(C, (s) => {
286
+ var c = D(s == null ? void 0 : s.id);
287
+ return (!W || (c == null ? void 0 : c.groupName) === W) && (c == null ? void 0 : c.id) === g;
288
+ })) == null ? void 0 : f[0];
289
+ if (!v)
290
+ return;
291
+ const _ = G.getName(v), l = new Be(t).getWidgetRef(_);
292
+ l && (V == null || V(l));
293
+ }, h = mt(M == null ? void 0 : M.newValue, !0), x = (B = X(p)) == null ? void 0 : B.filter((g) => h == null ? void 0 : h.includes(g));
294
+ !x || x.length <= 0 || x == null || x.forEach((g) => {
295
+ var C, v;
296
+ const V = (C = p == null ? void 0 : p[g]) == null ? void 0 : C.result;
297
+ (v = X(V)) == null || v.forEach((_) => {
298
+ var l;
299
+ const n = V == null ? void 0 : V[_];
300
+ (l = n == null ? void 0 : n.ids) == null || l.forEach((r) => {
301
+ O(r, (d) => {
302
+ I(d, n == null ? void 0 : n.event, n == null ? void 0 : n.args);
303
+ });
304
+ });
305
+ });
306
+ });
307
+ };
308
+ function vt(t, u) {
309
+ var p;
310
+ return (p = t == null ? void 0 : t.classList) != null && p.contains(u) ? t : t != null && t.parentElement ? vt(t == null ? void 0 : t.parentElement, u) : null;
311
+ }
312
+ function Qn() {
313
+ const t = (O) => {
314
+ if (O)
315
+ return O != null && O.ref ? O == null ? void 0 : O.ref : O;
316
+ }, u = (O) => {
317
+ var h, x;
318
+ try {
319
+ (x = (h = t(O)) == null ? void 0 : h.focus) == null || x.call(h);
320
+ } catch (B) {
321
+ ue.error("focus", B, O);
322
+ }
323
+ }, p = (O) => {
324
+ var h, x;
325
+ try {
326
+ (x = (h = t(O)) == null ? void 0 : h.blur) == null || x.call(h);
327
+ } catch (B) {
328
+ ue.error("blur", B, O);
329
+ }
330
+ }, M = (O) => {
331
+ var h;
332
+ return (h = t(O)) == null ? void 0 : h.selectionStart;
333
+ }, N = (O) => {
334
+ var h;
335
+ return (h = t(O)) == null ? void 0 : h.selectionEnd;
336
+ }, D = (O, h) => {
337
+ var x;
338
+ return (x = t(O)) == null ? void 0 : x.setSelectionRange(h, h);
339
+ }, i = (O, h) => {
340
+ u(O), D(O, h);
341
+ };
342
+ return {
343
+ getSelectionStart: M,
344
+ getSelectionEnd: N,
345
+ setSelectionStart: D,
346
+ blur: p,
347
+ focus: u,
348
+ setMousePos: i,
349
+ getMousePos: (O) => M(O),
350
+ insertOnMousePos: (O, h, x) => {
351
+ const B = M(O), g = N(O), V = Tn(x, h, B, g);
352
+ return ot(() => {
353
+ i(O, B + (h == null ? void 0 : h.length));
354
+ }), V;
355
+ }
356
+ };
357
+ }
358
+ const et = (t) => {
359
+ var p;
360
+ const { getFormulaFields: u } = lt();
361
+ return ((p = u(he(t))) == null ? void 0 : p.length) > 0;
362
+ }, Q = (t) => {
363
+ const u = t.type;
364
+ return ![U.fileUpload, U.pictureUpload].includes(u) && t.formItemFlag || [U.form, U.dialog].includes(u);
365
+ }, tt = (t) => {
366
+ const u = t.type;
367
+ return [U.treeSelect, U.cascader, U.select, U.checkbox, U.radio].includes(u);
368
+ };
369
+ function ao(t) {
370
+ const u = t == null ? void 0 : t.designState, p = (t == null ? void 0 : t.created) != !1, M = t == null ? void 0 : t.exResetField, N = t == null ? void 0 : t.extInitFieldModel, D = t == null ? void 0 : t.exposedWholeInstance, i = t == null ? void 0 : t.widget, W = t == null ? void 0 : t.designer, I = W == null ? void 0 : W.pageConfig, { formRefList: O, globalRefList: h, globalConfig: x, globalFormName: B, globalDataModel: g, rowScope: V } = An.globalInject();
371
+ let C = xn(g || {});
372
+ const v = pe(h), _ = pe(O), { instance: n } = ct(), l = () => Y(C), r = () => V, d = () => i, f = {
373
+ designState: u,
374
+ pageConfig: I,
375
+ formData: !u && et(i) ? C : {},
376
+ globalConfig: x
377
+ }, s = {
378
+ instance: n,
379
+ ...f
380
+ }, c = we(s), S = {
381
+ exposed: {
382
+ getFormData: !u && et(i) ? l : null,
383
+ findRefByName: v.getWidgetRef,
384
+ fieldEditor: () => K.value,
385
+ getField: d,
386
+ getRowScope: r,
387
+ /**
388
+ * 此处暴露schemadata方法
389
+ * 为实现全局变量中能访问到全局数据源ctx.instance.exposed.getOneSchemaData等数据源求值方法
390
+ */
391
+ getOneSchemaData: c == null ? void 0 : c.getOneSchemaData,
392
+ getSchemaDataObject: c == null ? void 0 : c.getSchemaDataObject,
393
+ getSchemaDatas: c == null ? void 0 : c.getSchemaDatas
394
+ }
395
+ }, P = {
396
+ instance: D ? n : S,
397
+ ...f
398
+ }, { on$: L, dispatch: q, emit$: ee } = Ln(), { onCompErrorCaptured: dt } = Gn(), { existFunc: gt } = qn({ options: i == null ? void 0 : i.options }, P), { isIdClass: ht, getIdByIdClass: pt } = Kn(i), { getOneSchemaData: Ot, getSchemaDataObject: Vt, getSchemaDatas: Ct } = we(P), te = Qn(), Et = (t == null ? void 0 : t.shareProp) || { s_attr: !0, s_extendAttr: !0, s_events: !0, s_slots: !0, s_fieldName: !0, s_optionItems: !0 }, { attrs: Ie, extendAttrs: Oe, events: k, slots: Le, rules: Te, fieldName: y, buildRules: bt, clearRules: yt, disableChangeValidate: Rt, enableChangeValidate: xt, optionItems: ae, filterOptionItems: Mt, getCheckedOptionText: St, getCheckedOptionValues: _t, getCheckedOptionLabels: Dt, getCheckedOptionItems: Wt, activeOptionItems: Pt, activeOptionItem: Nt, activeOptionItemIndex: Bt, setOptionItems: Fe, setWidgetOption: ne, getWidgetOption: Ve, setFieldEnable: It, hasFieldOptions: Lt, getFieldOptions: oe, setFieldOptions: Tt, computedDefaultValue: ce, hasDefaultValue: ie, singleOption: Ft, watchOption: jt, addCssClass: $t, removeCssClass: At } = it(i, P, Et, n);
399
+ let Ce = null, R = me();
400
+ const K = me(), kt = () => y.value, je = () => `${i == null ? void 0 : i.id}-${kn()}`, Ee = me(je()), $e = () => {
401
+ Ee.value = je();
402
+ }, Ht = _e({
403
+ get: () => {
404
+ if (We(R.value)) {
405
+ var e = Number(R.value);
406
+ return isNaN(e) ? void 0 : (R.value = e, e);
407
+ }
408
+ return R.value;
409
+ },
410
+ set: (e) => {
411
+ R.value = e;
412
+ }
413
+ }), Kt = _e({
414
+ get: () => {
415
+ if (We(R.value)) {
416
+ var e = ut(R.value);
417
+ Nn(e) && (R.value = e);
418
+ }
419
+ return R.value;
420
+ },
421
+ set: (e) => {
422
+ R.value = e;
423
+ }
424
+ }), Ut = (e) => {
425
+ var a, m;
426
+ var o = (m = (a = v.getWidgetRef(y.value)) == null ? void 0 : a.exposed) == null ? void 0 : m.loadOptionItems;
427
+ if (o !== void 0) {
428
+ o == null || o(e);
429
+ return;
430
+ }
431
+ Fe(e);
432
+ }, be = (e) => {
433
+ var o, a, m;
434
+ return (m = (a = (o = v.getWidgetRef(y.value)) == null ? void 0 : o.exposed) == null ? void 0 : a.getCheckedItems) == null ? void 0 : m.call(a, e);
435
+ }, Ae = (e) => {
436
+ var o, a, m;
437
+ return (m = (a = (o = v.getWidgetRef(y.value)) == null ? void 0 : o.exposed) == null ? void 0 : a.getCheckedLabels) == null ? void 0 : m.call(a, e);
438
+ }, Gt = (e) => {
439
+ var o, a, m;
440
+ return (m = (a = (o = v.getWidgetRef(y.value)) == null ? void 0 : o.exposed) == null ? void 0 : a.getCheckedText) == null ? void 0 : m.call(a, e);
441
+ }, ye = () => {
442
+ var E;
443
+ const e = (E = Oe.value) == null ? void 0 : E.withAttachData;
444
+ if (!tt(i) || e === !1)
445
+ return;
446
+ const o = R.value, a = Ae(o), m = Gt(o);
447
+ var b = Y(be(o));
448
+ ke(a, b, m);
449
+ }, ke = (e, o, a) => {
450
+ var m = {};
451
+ if (e != null) {
452
+ let b = oe("textName", !1);
453
+ [`${y.value}${ge.optionText}`, b].forEach((E) => {
454
+ E && m[E] === void 0 && (m[E] = e);
455
+ });
456
+ }
457
+ if (o != null && he(o) !== he(R.value)) {
458
+ let b = oe("optionName", !1);
459
+ [`${y.value}${ge.checkedOptions}`, b].forEach((E) => {
460
+ E && m[E] === void 0 && (m[E] = o);
461
+ });
462
+ }
463
+ if (a != null) {
464
+ let b = oe("labelName", !1);
465
+ e != a && [`${y.value}${ge.optionLabelName}`, b].forEach((E) => {
466
+ E && m[E] === void 0 && (m[E] = a);
467
+ });
468
+ }
469
+ se(C, Y(m));
470
+ }, J = (e) => {
471
+ if (Q(i)) {
472
+ ye();
473
+ var o = { [y.value]: e };
474
+ se(C, o);
475
+ }
476
+ }, re = (e) => {
477
+ u || J(e);
478
+ }, He = (e) => oe(e, !1), Ke = () => {
479
+ var e = _n(C);
480
+ R = ft.get(e, y.value);
481
+ }, Ue = (e) => {
482
+ Ce = Y(e);
483
+ }, qt = () => {
484
+ u || N && N(z());
485
+ }, Jt = () => {
486
+ ie() && ve(ce()).then((e) => {
487
+ J(e), Ke();
488
+ });
489
+ }, Re = (e, o) => {
490
+ if (!Q(i))
491
+ return;
492
+ ee($.fieldValueChanged, { newValue: e, oldValue: o });
493
+ const a = { fieldId: i.id, fieldName: y.value, newValue: e, oldValue: o };
494
+ q(B, $.fieldChange, a, n);
495
+ }, zt = (e) => gt(e), xe = (e, o) => Pe(Ve(e), o), Qt = (e) => {
496
+ re(e), Je(), xe($.onInput, { value: e });
497
+ }, Xt = (e, o) => {
498
+ var a, m, b;
499
+ return (b = (m = (a = v.getWidgetRef(y.value)) == null ? void 0 : a.exposed) == null ? void 0 : m.handleBeforeChange) == null ? void 0 : b.call(m, e, o);
500
+ }, Yt = (...e) => {
501
+ var b, E, T;
502
+ let a = ((b = e == null ? void 0 : e[0]) == null ? void 0 : b.target) != null ? (T = (E = e == null ? void 0 : e[0]) == null ? void 0 : E.target) == null ? void 0 : T.value : e == null ? void 0 : e[0];
503
+ a = Y(a);
504
+ var m = Xt(a, Ce);
505
+ m != null ? re(m) : re(a), Re(a, Ce), Je(), Ue(a);
506
+ }, Zt = (e = !0) => {
507
+ ne(j.readonly, e);
508
+ }, wt = (e = !0) => {
509
+ ne(j.disabled, e);
510
+ }, en = (e = !0) => {
511
+ ne(j.hidden, e), e ? Qe() : le();
512
+ }, tn = (e = !0) => {
513
+ It(j.required, e), le();
514
+ }, nn = (e) => {
515
+ ne(j.label, e);
516
+ }, z = () => R == null ? void 0 : R.value, Ge = (e) => {
517
+ R.value = e;
518
+ }, fe = (e) => {
519
+ let o = Y(z());
520
+ if (Ge(e), !Q(i))
521
+ return;
522
+ const a = z();
523
+ o !== a && (re(a), Re(e, o));
524
+ }, on = () => {
525
+ ie() ? ve(ce()).then((e) => {
526
+ J(e);
527
+ }) : J(null), M == null || M();
528
+ }, rn = (e) => {
529
+ const o = z(), a = te.insertOnMousePos(K.value, e, o);
530
+ fe(a);
531
+ }, sn = (e, o) => {
532
+ Z(() => R == null ? void 0 : R.value, (a, m) => {
533
+ e == null || e({ id: i.id, name: y.value, newValue: a, oldValue: m });
534
+ }, o);
535
+ }, un = (e) => {
536
+ var E;
537
+ e.preventDefault();
538
+ const o = (T) => {
539
+ var H;
540
+ const F = (H = Array.from(T.classList)) == null ? void 0 : H.find((Me) => ht(Me));
541
+ return F ? pt(F) : "";
542
+ }, a = document.activeElement;
543
+ if (!a)
544
+ return;
545
+ const m = document.getElementsByClassName(Ze.formItemTarget);
546
+ for (var b = 0; b < m.length; b++) {
547
+ const T = m[b], F = vt(a, Ze.formItemTarget);
548
+ if (!F)
549
+ continue;
550
+ const H = o(T), Me = o(F);
551
+ if (H === Me) {
552
+ if (b === m.length - 1)
553
+ return;
554
+ const On = m[b + 1], Vn = o(On), Se = v.findRefById(Vn, n);
555
+ try {
556
+ (E = Se == null ? void 0 : Se.exposed) == null || E.focus();
557
+ } catch (Cn) {
558
+ ue.error("handleEnter", Cn);
559
+ }
560
+ }
561
+ }
562
+ };
563
+ let an = () => {
564
+ var T;
565
+ let e = {
566
+ componentName: y.value,
567
+ //用于组件事件emitter发射与接收处理
568
+ refList: O,
569
+ allRefList: h,
570
+ fieldEditor: () => K.value,
571
+ changeRegisterToRefList: (F, H) => {
572
+ v.changeRegisterToRefList(F, H), _.changeRegisterToRefList(F, H);
573
+ },
574
+ getField: d,
575
+ getFormData: l,
576
+ getValue: z,
577
+ setValue: Ge,
578
+ emit$: ee,
579
+ findRefByName: v.getWidgetRef,
580
+ findRefById: v.findRefById,
581
+ callRefFunc: v.callRefFunc,
582
+ getWidgetOption: Ve,
583
+ setWidgetOption: ne,
584
+ refreshKey: $e,
585
+ getRowScope: r,
586
+ //组件的数据绑定:继承的数据,用于计算组件属性变量
587
+ getOneSchemaData: Ot,
588
+ getSchemaDatas: Ct,
589
+ getSchemaDataObject: Vt,
590
+ addCssClass: $t,
591
+ removeCssClass: At
592
+ }, o = {
593
+ resetField: on,
594
+ getValue: z,
595
+ setValue: fe,
596
+ refreshDefaultValue: Jt,
597
+ insertOnMousePos: rn,
598
+ disableChangeValidate: Rt,
599
+ enableChangeValidate: xt,
600
+ focus: () => {
601
+ te.focus(K.value);
602
+ },
603
+ blur: () => {
604
+ te.blur(K.value);
605
+ },
606
+ getMousePos: () => {
607
+ te.getMousePos(K.value);
608
+ },
609
+ setMousePos: (F) => {
610
+ te.setMousePos(K.value, F);
611
+ }
612
+ }, a = {
613
+ loadOptionItems: Ut,
614
+ getCheckedItems: be,
615
+ getCheckedLabels: Ae
616
+ }, m = {
617
+ [j.required]: { name: A.setRequired, fn: tn },
618
+ [j.label]: { name: A.setLabel, fn: nn },
619
+ [j.hidden]: { name: A.setHidden, fn: en },
620
+ [j.disabled]: { name: A.setDisabled, fn: wt },
621
+ [j.readonly]: { name: A.setReadonly, fn: Zt }
622
+ }, b = {};
623
+ (T = X(m)) == null || T.forEach((F) => {
624
+ if (De(i, F)) {
625
+ const H = m[F];
626
+ b[H.name] = H.fn;
627
+ }
628
+ });
629
+ var E = se(e, b);
630
+ return Q(i) && (E = se(E, o)), tt(i) && (E = se(E, a)), E;
631
+ };
632
+ const cn = _e(() => ({
633
+ attrs: Ie.value,
634
+ extendAttrs: Oe.value,
635
+ events: k.value,
636
+ slots: Le.value,
637
+ fieldKey: Ee.value,
638
+ fieldEditor: K.value,
639
+ fieldName: y.value
640
+ })), fn = (e) => {
641
+ t.designState && t.designer && Z(() => {
642
+ var o;
643
+ return (o = t == null ? void 0 : t.widget) == null ? void 0 : o[e];
644
+ }, (o, a) => {
645
+ const { emitHistoryChange: m } = Un(t.designer);
646
+ m(`edit ${y.value}.${e},newValue:${o},oldValue:${a}`);
647
+ }, {
648
+ deep: !0
649
+ });
650
+ }, ln = (e, o, a) => {
651
+ const m = me(), b = He(e), E = (T) => {
652
+ o && (m.value = o(T || b));
653
+ };
654
+ return rt(b) ? Z(b, (T) => {
655
+ E(T), a && a(T);
656
+ }) : E(b), m;
657
+ }, qe = () => {
658
+ !Q(i) || u || sn((e) => {
659
+ Jn(h, i == null ? void 0 : i.id, P), zn(h, i == null ? void 0 : i.id, G.getOptions(i, j.relate), e), ye();
660
+ }, { immediate: !0 });
661
+ }, Je = () => {
662
+ const e = { propName: y.value };
663
+ q(B, $.fieldValidation, e, n);
664
+ }, ze = () => {
665
+ const e = { fieldId: i.id, fieldName: y.value, rules: Te };
666
+ q(B, $.fieldRuleChange, e, n);
667
+ }, le = () => {
668
+ if (!Q(i))
669
+ return;
670
+ const e = bt();
671
+ return ze(), e;
672
+ }, Qe = () => {
673
+ yt(), ze();
674
+ }, mn = () => {
675
+ De(i, "change") && (k.value.change = Yt), De(i, "input") && (k.value.input = Qt), L(Fn.setFormData, (e) => {
676
+ fe(e[y.value]);
677
+ }), L($.fieldValueChanged, (e) => {
678
+ xe($.onChange, { value: e == null ? void 0 : e.newValue, oldValue: e == null ? void 0 : e.oldValue });
679
+ });
680
+ }, vn = () => {
681
+ let e = y.value;
682
+ Q(i) ? ((!Bn(C, e) || C[e] === void 0) && (J(null), ie() && ve(ce()).then((o) => {
683
+ o == null ? J(null) : J(o);
684
+ })), Ke()) : ie() && ve(ce()).then((o) => {
685
+ fe(o);
686
+ }), Ue(z()), qt();
687
+ }, dn = () => {
688
+ Z(() => ae == null ? void 0 : ae.value, (e, o) => {
689
+ ye();
690
+ });
691
+ }, gn = () => {
692
+ const e = Sn(jn.isRenderComplete);
693
+ if (e != null && e.value) {
694
+ qe();
695
+ return;
696
+ }
697
+ e != null && Z(() => e == null ? void 0 : e.value, (o) => {
698
+ o && qe();
699
+ }, { immediate: !0 });
700
+ }, hn = () => {
701
+ var e, o;
702
+ if (p)
703
+ try {
704
+ vn(), le(), mn(), v.registerToRefList(y.value), _.registerToRefList(y.value), (o = (e = k == null ? void 0 : k.value) == null ? void 0 : e.created) == null || o.call(e), dt();
705
+ } catch (a) {
706
+ ue.error("create", a);
707
+ }
708
+ }, pn = () => {
709
+ p && (nt(() => {
710
+ var e, o;
711
+ try {
712
+ gn(), dn(), (o = (e = k == null ? void 0 : k.value) == null ? void 0 : e.mounted) == null || o.call(e);
713
+ } catch (a) {
714
+ console.log("mounted", i, a);
715
+ }
716
+ }), Mn(() => {
717
+ v.unregisterFromRefList(y.value), _.unregisterFromRefList(y.value);
718
+ }));
719
+ };
720
+ return hn(), pn(), {
721
+ exposed: an(),
722
+ fieldModel: R,
723
+ objFieldModel: Kt,
724
+ numFieldModel: Ht,
725
+ fieldEditor: K,
726
+ fieldKey: Ee,
727
+ field: i,
728
+ instance: n,
729
+ attrs: Ie,
730
+ extendAttrs: Oe,
731
+ slots: Le,
732
+ events: k,
733
+ rules: Te,
734
+ fieldObj: cn,
735
+ pageConfig: I,
736
+ formModel: C,
737
+ fieldName: y,
738
+ propResultOpt: P,
739
+ optionItems: ae,
740
+ activeOptionItems: Pt,
741
+ activeOptionItem: Nt,
742
+ activeOptionItemIndex: Bt,
743
+ filterOptionItems: Mt,
744
+ setOptionItems: Fe,
745
+ getCheckedItems: be,
746
+ getCheckedOptionItems: (e) => Wt(e || R.value),
747
+ getCheckedOptionLabels: (e) => Dt(e || R.value),
748
+ getCheckedOptionValues: (e) => _t(e || R.value),
749
+ getCheckedOptionText: (e) => St(e || R.value),
750
+ refreshKey: $e,
751
+ watchKeyValue: ln,
752
+ watchPropAndSaveHistoryStep: fn,
753
+ existEvent: zt,
754
+ handleEvent: xe,
755
+ handleEnter: un,
756
+ getPropName: kt,
757
+ emitFieldDataChange: Re,
758
+ syncUpdateFormModel: re,
759
+ getWidgetRef: v.getWidgetRef,
760
+ clearRules: Qe,
761
+ buildRules: le,
762
+ getFieldOptionModel: He,
763
+ getFieldOptions: oe,
764
+ hasFieldOptions: Lt,
765
+ setFieldOptions: Tt,
766
+ getWidgetOption: Ve,
767
+ singleOption: Ft,
768
+ watchOption: jt,
769
+ mergeOptionToFormModel: ke
770
+ };
771
+ }
772
+ export {
773
+ Be as R,
774
+ pe as a,
775
+ ao as b,
776
+ qn as u
777
+ };