hlrender 0.0.48 → 0.0.50

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 (97) hide show
  1. package/{affix-widget-f9e20186.js → affix-widget-3d694272.js} +9 -9
  2. package/{alert-widget-c572832e.js → alert-widget-1c454a7d.js} +9 -9
  3. package/{anchor-widget-7bec5bc9.js → anchor-widget-c4cd5db3.js} +6 -6
  4. package/{auto-complete-widget-2155225c.js → auto-complete-widget-f1c7dc53.js} +8 -8
  5. package/{avatar-widget-c573a97b.js → avatar-widget-0de88b8a.js} +9 -9
  6. package/{backtop-widget-8fa456fb.js → backtop-widget-e7aabbdb.js} +9 -9
  7. package/{badge-widget-82b49c9d.js → badge-widget-99f07b37.js} +9 -9
  8. package/{baseImp-c24720a8.js → baseImp-c7c90bf0.js} +1376 -1358
  9. package/{breadcrumb-widget-a0b952e8.js → breadcrumb-widget-12a6f999.js} +6 -6
  10. package/{button-widget-3a33319f.js → button-widget-bc624762.js} +9 -9
  11. package/{cache-widget-dd4a0c28.js → cache-widget-79e9f4a8.js} +7 -7
  12. package/{card-widget-3aa42cc3.js → card-widget-10e4bc56.js} +7 -7
  13. package/{carousel-widget-450be371.js → carousel-widget-812f5310.js} +6 -6
  14. package/{cascader-widget-00954a01.js → cascader-widget-efa8b57d.js} +7 -7
  15. package/{chart-widget-df998657.js → chart-widget-2b960b60.js} +6 -6
  16. package/{checkbox-widget-22b09205.js → checkbox-widget-1d0cf7a1.js} +7 -7
  17. package/{collapse-widget-57ed54ce.js → collapse-widget-893219bc.js} +6 -6
  18. package/{color-picker-widget-4e1c86ff.js → color-picker-widget-81507e91.js} +7 -7
  19. package/{cont-cell-widget-813ff1dd.js → cont-cell-widget-bea1f10b.js} +1 -1
  20. package/{cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-4c241060.js → cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-fc8f4d4a.js} +4 -4
  21. package/{cont-widget-02ee5bec.js → cont-widget-eeb612e6.js} +4 -4
  22. package/{content-wrapper-2b01b8c7.js → content-wrapper-676c45bd.js} +2 -2
  23. package/{content-wrapper.vue_vue_type_script_setup_true_lang-a462f8d6.js → content-wrapper.vue_vue_type_script_setup_true_lang-16519ccc.js} +1 -1
  24. package/{date-picker-range-widget-77f4d137.js → date-picker-range-widget-9b8a3153.js} +7 -7
  25. package/{date-picker-widget-e4708e4d.js → date-picker-widget-fbd38946.js} +7 -7
  26. package/{default-slot-widget-a526c5bc.js → default-slot-widget-4bb00d87.js} +7 -7
  27. package/{default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-8e4cc948.js → default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-9fc27837.js} +4 -4
  28. package/{descriptions-widget-0b73bd75.js → descriptions-widget-36d2835d.js} +7 -7
  29. package/{dialog-widget-ada8af4e.js → dialog-widget-ab088cfe.js} +8 -8
  30. package/{divider-widget-3f1cbf12.js → divider-widget-cad03247.js} +9 -9
  31. package/{drag-wrapper-f94c59d4.js → drag-wrapper-b8f18428.js} +4 -4
  32. package/{drawer-widget-b7cfb6b2.js → drawer-widget-0fd94fec.js} +8 -8
  33. package/{dropdown-widget-3c44efda.js → dropdown-widget-fe3a4450.js} +7 -7
  34. package/{empty-widget-588a8c36.js → empty-widget-814211fa.js} +9 -9
  35. package/{feedback-widget-4bf4bd4a.js → feedback-widget-f61e8977.js} +8 -8
  36. package/{feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-4014d5eb.js → feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-9cc7f596.js} +4 -4
  37. package/{file-upload-widget-afe32ddc.js → file-upload-widget-4025a3a8.js} +8 -8
  38. package/{form-item-wrapper-6cf71177.js → form-item-wrapper-cc408e59.js} +3 -3
  39. package/{form-widget-c3bd9dc4.js → form-widget-13f3249d.js} +7 -7
  40. package/{grid-col-widget-d9c28e33.js → grid-col-widget-4d09e613.js} +1 -1
  41. package/{grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-cf8a74e7.js → grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-225a5d7e.js} +4 -4
  42. package/{grid-widget-b0857327.js → grid-widget-97b2fb8f.js} +4 -4
  43. package/{html-text-widget-639cbf77.js → html-text-widget-9dd280dc.js} +7 -7
  44. package/{iframe-widget-f7d7c4ba.js → iframe-widget-040868ec.js} +16 -16
  45. package/{image-widget-f9b1dd6b.js → image-widget-bdcb2bce.js} +6 -6
  46. package/{index-29e642fa.js → index-a4d1d907.js} +1 -1
  47. package/{input-number-widget-0987552d.js → input-number-widget-965d3d36.js} +7 -7
  48. package/{input-widget-ade83d99.js → input-widget-16de5413.js} +8 -8
  49. package/{link-widget-debca55f.js → link-widget-bd21149f.js} +9 -9
  50. package/{ltable-col-widget-784dbddb.js → ltable-col-widget-7dddf789.js} +1 -1
  51. package/{ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-16d9515e.js → ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-ccd68bf0.js} +6 -6
  52. package/{ltable-widget-ab2637e6.js → ltable-widget-9bad7c19.js} +4 -4
  53. package/{menu-widget-f801d950.js → menu-widget-16303726.js} +7 -7
  54. package/{model-widget-1373a1fa.js → model-widget-4110b949.js} +6 -6
  55. package/{multirow-f1a44597.js → multirow-2a81c1cd.js} +78 -76
  56. package/{multirow-widget-26a17a3f.js → multirow-widget-8e1accbf.js} +20 -20
  57. package/package.json +1 -1
  58. package/{pagination-widget-34199975.js → pagination-widget-6c196d93.js} +6 -6
  59. package/{picture-upload-widget-722c12ce.js → picture-upload-widget-a4c8f05f.js} +8 -8
  60. package/{progress-widget-8145d94e.js → progress-widget-6f498ff7.js} +7 -7
  61. package/{radio-widget-5bea2e1f.js → radio-widget-eae4723b.js} +7 -7
  62. package/{range-widget-eed7a621.js → range-widget-ababcf0a.js} +8 -8
  63. package/{rate-widget-12bf395d.js → rate-widget-01de38aa.js} +7 -7
  64. package/render.es.js +299 -299
  65. package/render.umd.js +215 -215
  66. package/{result-widget-52813e4e.js → result-widget-2fc0775a.js} +7 -7
  67. package/{rich-editor-widget-f68a7e7c.js → rich-editor-widget-f68ce2b7.js} +7 -7
  68. package/{router-widget-1bbcac95.js → router-widget-db469ad6.js} +6 -6
  69. package/{select-widget-41f665a1.js → select-widget-1bb2f3cb.js} +7 -7
  70. package/{sfc-921ec71d.js → sfc-a485142c.js} +3 -3
  71. package/share-field-e2b77435.js +754 -0
  72. package/{share-file-ddaed5a6.js → share-file-a922565e.js} +9 -9
  73. package/{slider-widget-83e013c2.js → slider-widget-62a03c7f.js} +7 -7
  74. package/{slot-6cc517d7.js → slot-554b9687.js} +1 -1
  75. package/{static-text-widget-f4d5e790.js → static-text-widget-1a133fcf.js} +7 -7
  76. package/{steps-widget-d77dd076.js → steps-widget-cbfc63e6.js} +6 -6
  77. package/{subMenu-widget-677bbc5c.js → subMenu-widget-422dc3b8.js} +2 -2
  78. package/{subMenu-widget.vue_vue_type_script_setup_true_lang-4a210678.js → subMenu-widget.vue_vue_type_script_setup_true_lang-a06ac71e.js} +1 -1
  79. package/{switch-widget-924da7ae.js → switch-widget-a1fa3c16.js} +7 -7
  80. package/{tab-pane-widget-d06ee564.js → tab-pane-widget-4f9b5bb8.js} +1 -1
  81. package/{tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-d624467c.js → tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-c204bc62.js} +4 -4
  82. package/{table-col-widget-df0a215d.js → table-col-widget-9d6e87fe.js} +6 -6
  83. package/{table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-91119c0a.js → table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-03f6d1ce.js} +4 -4
  84. package/{table-widget-95c94722.js → table-widget-3a84c6c9.js} +8 -8
  85. package/{tabs-widget-a02ca2e8.js → tabs-widget-2e17a213.js} +5 -5
  86. package/{tag-widget-3b705003.js → tag-widget-251a0c57.js} +9 -9
  87. package/{text-widget-68bebf56.js → text-widget-1515d82b.js} +9 -9
  88. package/{textarea-widget-d8b6574f.js → textarea-widget-810b1b35.js} +7 -7
  89. package/{time-picker-range-widget-02dcb87c.js → time-picker-range-widget-53521305.js} +7 -7
  90. package/{time-picker-widget-16f85363.js → time-picker-widget-023d4002.js} +7 -7
  91. package/{time-select-widget-7573e5b7.js → time-select-widget-162ff318.js} +7 -7
  92. package/{tmpl-widget-8bc77beb.js → tmpl-widget-a3219a3a.js} +7 -7
  93. package/{tree-select-widget-cd839e70.js → tree-select-widget-098f9ede.js} +7 -7
  94. package/{tree-widget-4a4c292f.js → tree-widget-61723874.js} +6 -6
  95. package/{widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-228c3ca1.js → widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-f7c17786.js} +2 -2
  96. package/{wrapper-widget-df3c1d69.js → wrapper-widget-a4f4b0b5.js} +4 -4
  97. package/share-field-d115b012.js +0 -762
@@ -0,0 +1,754 @@
1
+ var vn = Object.defineProperty;
2
+ var dn = (t, u, g) => u in t ? vn(t, u, { enumerable: !0, configurable: !0, writable: !0, value: g }) : t[u] = g;
3
+ var Je = (t, u, g) => (dn(t, typeof u != "symbol" ? u + "" : u, g), g);
4
+ import { onMounted as Ze, nextTick as we, onActivated as gn, onErrorCaptured as hn, isRef as et, watch as ee, reactive as pn, ref as le, computed as xe, onBeforeUnmount as Vn, inject as On, toRefs as Cn } from "vue";
5
+ import { b as De, e as Se, o as Q, c as te, r as yn, d as z, D as En, t as ge, f as tt, j as bn, l as Rn, x as w, w as Mn } from "./enum-type-22cb09ce.js";
6
+ import { p as ze, b as nt, g as xn, f as me, a as _n } from "./multirow-2a81c1cd.js";
7
+ import { u as ot } from "./icon-e9532b43.js";
8
+ import { f as j, l as de, m as Dn, n as Qe, g as I, b as Sn, d as Pn } from "./expression-8b5cf5cd.js";
9
+ import { b as rt, d as Pe, B as U, P as st, c as ut, e as Wn, a as Nn, w as ve } from "./baseImp-c7c90bf0.js";
10
+ import { F as Bn } from "./slot-554b9687.js";
11
+ import { c as We, t as at, l as Ln } from "./uuid-13176256.js";
12
+ import { f as Tn, d as Fn, h as _e, e as $n } from "./index-a4d1d907.js";
13
+ import { W as A, d as K } from "./enum-type-6ff9ea07.js";
14
+ function In() {
15
+ return {
16
+ onMountedOrActivated: (g) => {
17
+ let _ = !1;
18
+ Ze(() => {
19
+ g(), we(() => {
20
+ _ = !0;
21
+ });
22
+ }), gn(() => {
23
+ _ && g();
24
+ });
25
+ },
26
+ onCompErrorCaptured: () => {
27
+ hn((g) => (console.log(g), !1));
28
+ }
29
+ };
30
+ }
31
+ function jn(t, u) {
32
+ const { getWidgetOption: g, getWidgetOptionByPropValue: _ } = rt(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
+ Je(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 } = ot(), _ = (m) => u.getWidgetRef(m == null ? void 0 : m.toString()), P = (m, h, O) => {
68
+ var C = [], S = [];
69
+ let o = _(m);
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 = (m, h) => {
75
+ var O;
76
+ return (O = m == null ? void 0 : m.exposed) == null ? void 0 : O[h.toString()];
77
+ }, D = (m, h, O) => {
78
+ var C = i(m, h);
79
+ if (C) {
80
+ var S = [];
81
+ return O && (S = Object.values(O)), C(...S);
82
+ }
83
+ }, W = (m, h, O) => {
84
+ var C = [];
85
+ if (m) {
86
+ var S = We(at(m, !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(m) ? C : C == null ? void 0 : C[0];
93
+ }, N = (m, h) => {
94
+ let O = Q(t);
95
+ W(O, m, h);
96
+ }, p = (m, h) => {
97
+ var n, v, a;
98
+ const O = (v = (n = h || g) == null ? void 0 : n.exposed) == null ? void 0 : v.getField();
99
+ var C = ze(O == null ? void 0 : O.id);
100
+ const S = (r) => (r == null ? void 0 : r.id) === m, o = (r) => {
101
+ var R;
102
+ var l = ze(r == null ? void 0 : r.id);
103
+ return (C == null ? void 0 : C.groupName) === (l == null ? void 0 : l.groupName) && ((l == null ? void 0 : l.id) === m || ((R = r == null ? void 0 : r._source) == null ? void 0 : R.id) === m);
104
+ }, f = (a = Q(u.refList)) == null ? void 0 : a.find((r) => {
105
+ var R, T;
106
+ try {
107
+ const F = (T = (R = u.refList[r]) == 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 = (m) => {
117
+ if (m) {
118
+ let h = m;
119
+ u == null || u.setWidgetRef(h, g);
120
+ }
121
+ }, b = (m) => {
122
+ if (m) {
123
+ let h = m;
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: (m, h) => {
137
+ m && (V(m), b(h));
138
+ },
139
+ registerToRefList: V,
140
+ unregisterFromRefList: b
141
+ };
142
+ }
143
+ const An = (t, u, g, _) => {
144
+ const P = new Ne(t), { callRefFunc: i } = he(t), { parseGroupId: D } = nt();
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 a;
152
+ const f = (a = W()) == null ? void 0 : a.find((r) => (r == null ? void 0 : r.id) === o);
153
+ if (!f)
154
+ return;
155
+ const n = U.getName(f), v = P.getWidgetRef(n);
156
+ if (v)
157
+ return { ref: v, 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), v = P.getWidgetRef(n);
162
+ if (v) {
163
+ const a = U.getOptions(o, j.defaultValue, !1, !(g != null && g.designState), { ...g, formData: f });
164
+ if (te(a))
165
+ if (et(a)) {
166
+ let r = ee(() => a.value, (l) => {
167
+ r == null || r(), i(v, A.setValue, { newValue: l });
168
+ });
169
+ } else
170
+ i(v, A.setValue, { newValue: a });
171
+ }
172
+ }, V = (o, f) => {
173
+ const n = N(o);
174
+ if (!n)
175
+ return;
176
+ const v = n.name, a = i(n.ref, A.getValue), r = i(n.ref, A.getCheckedItems), l = {};
177
+ return Se(a) || (l[v] = a, !bn(r) && !f && (l[`${v}${de.checkedOptions}`] = r)), l;
178
+ }, b = (o, f) => {
179
+ var v;
180
+ var n = [];
181
+ if ((v = W()) == null || v.forEach((a) => {
182
+ if (!a)
183
+ return;
184
+ const r = a == null ? void 0 : a.id;
185
+ var l = r === o;
186
+ const R = D(r), T = (R == null ? void 0 : R.id) === o, F = (R == null ? void 0 : R.groupName) === f;
187
+ return l || T && (F || !f) ? (n.push(a), !0) : !1;
188
+ }), !(!n || n.length <= 0))
189
+ return n == null ? void 0 : n.map((a) => {
190
+ var r;
191
+ return {
192
+ id: a == null ? void 0 : a.id,
193
+ name: (r = a == null ? void 0 : a._source) == null ? void 0 : r.name,
194
+ source: a == null ? void 0 : a._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 v = D(u), a = v == null ? void 0 : v.groupName;
202
+ return f === me.Inner2Outer ? o == null || o.forEach((r) => {
203
+ var l = b(r);
204
+ l && (l == null ? void 0 : l.length) > 0 && n.push(...l);
205
+ }) : o == null || o.forEach((r) => {
206
+ var l = b(r, a);
207
+ l && (l == null ? void 0 : l.length) > 0 && n.push(...l);
208
+ }), n;
209
+ }, m = (o, f) => {
210
+ const n = {};
211
+ if (!o || o.length <= 0)
212
+ return n;
213
+ if (f === me.Inner2Outer) {
214
+ var v = yn(o, (a) => {
215
+ var r;
216
+ return (r = a.source) == null ? void 0 : r.id;
217
+ });
218
+ v == null || v.forEach((a) => {
219
+ var R;
220
+ const r = a.group[0], l = [];
221
+ (R = a == null ? void 0 : a.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
+ }), r && z(n, { [r]: l });
228
+ });
229
+ } else
230
+ o.forEach((a) => {
231
+ const r = V(a == null ? void 0 : a.id);
232
+ te(r) && z(n, r);
233
+ });
234
+ return n;
235
+ }, h = (o) => {
236
+ var f = {};
237
+ return o == null || o.forEach((n) => {
238
+ var v;
239
+ n != null && n.source && (n != null && n.id) && (f[(v = n == null ? void 0 : n.source) == null ? void 0 : v.id] = n == null ? void 0 : n.id);
240
+ }), f;
241
+ }, O = (o, f, n) => {
242
+ if (n === me.Inner2Inner) {
243
+ const l = En(f), { updateFomula: R } = ut(), { buildVariable: T } = Wn();
244
+ var v = h(o);
245
+ if (te(v)) {
246
+ var a = U.getOrgOption(f, j.defaultValue), r = R(ge(a), v, (F, X) => {
247
+ var Y = v[F];
248
+ return Se(Y) ? T(F) : T(Y);
249
+ });
250
+ return U.setOrgOption(l, j.defaultValue, tt(r)), 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 v = xn(u, f);
260
+ if (v === me.DiffInner)
261
+ return;
262
+ var a = st.getFormulaRelatedField(n);
263
+ if (!a || a.length <= 0)
264
+ return;
265
+ var r = B(a, v);
266
+ if (!(r != null && r.some((R) => R.id === u)))
267
+ return;
268
+ const l = m(r, v);
269
+ p(O(r, o, v), l);
270
+ };
271
+ (() => {
272
+ var o;
273
+ (o = W()) == null || o.forEach((f) => {
274
+ C(f);
275
+ });
276
+ })();
277
+ }, kn = (t, u, g, _, P) => {
278
+ var B;
279
+ if (P || !te(g))
280
+ return;
281
+ const { parseGroupId: i } = nt();
282
+ var D = i(u), W = D == null ? void 0 : D.groupName;
283
+ const { callRefFunc: N } = he(t), p = (m, h) => {
284
+ var n, v, a;
285
+ const O = (v = (n = Q(t)) == null ? void 0 : n.map((r) => N(t == null ? void 0 : t[r], A.getField))) == null ? void 0 : v.filter((r) => !!r), C = (a = Tn(O, (r) => {
286
+ var l = i(r == null ? void 0 : r.id);
287
+ return (!W || (l == null ? void 0 : l.groupName) === W) && (l == null ? void 0 : l.id) === m;
288
+ })) == null ? void 0 : a[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 = at(_ == null ? void 0 : _.newValue, !0), b = (B = Q(g)) == null ? void 0 : B.filter((m) => V == null ? void 0 : V.includes(m));
294
+ !b || b.length <= 0 || b == null || b.forEach((m) => {
295
+ var O, C;
296
+ const h = (O = g == null ? void 0 : g[m]) == 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, (v) => {
302
+ N(v, o == null ? void 0 : o.event, o == null ? void 0 : o.args);
303
+ });
304
+ });
305
+ });
306
+ });
307
+ };
308
+ function ct(t, u) {
309
+ var g;
310
+ return (g = t == null ? void 0 : t.classList) != null && g.contains(u) ? t : t != null && t.parentElement ? ct(t == null ? void 0 : t.parentElement, u) : null;
311
+ }
312
+ function Hn() {
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), m = P(p), h = Dn(b, V, B, m);
352
+ return we(() => {
353
+ D(p, B + (V == null ? void 0 : V.length));
354
+ }), h;
355
+ }
356
+ };
357
+ }
358
+ const Xe = (t) => {
359
+ var g;
360
+ const { getFormulaFields: u } = ut();
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
+ }, Ye = (t) => {
366
+ const u = t.type;
367
+ return [K.treeSelect, K.cascader, K.select, K.checkbox, K.radio].includes(u);
368
+ };
369
+ function eo(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: m } = Bn.globalInject();
371
+ let h = pn(B || {});
372
+ const O = he(p), C = he(N), S = () => w(h), o = () => m, f = () => i, n = {
373
+ instance: {
374
+ exposed: {
375
+ getFormData: !u && Xe(i) ? S : null,
376
+ findRefByName: O.getWidgetRef,
377
+ getField: f,
378
+ getRowScope: o
379
+ }
380
+ },
381
+ designState: u,
382
+ pageConfig: W,
383
+ formData: !u && Xe(i) ? h : {},
384
+ globalConfig: V
385
+ }, v = (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$: a, dispatch: r, emit$: l } = _n(), { instance: R } = ot(), { onCompErrorCaptured: T } = In(), { existFunc: F } = jn({ options: i == null ? void 0 : i.options }, n), { attrs: X, extendAttrs: Y, events: k, slots: Be, rules: Le, fieldName: x, buildRules: it, clearRules: ft, disableChangeValidate: lt, enableChangeValidate: mt, optionItems: ue, filterOptionItems: vt, getCheckedOptionText: dt, getCheckedOptionValues: gt, getCheckedOptionLabels: ht, getCheckedOptionItems: pt, activeOptionItems: Vt, activeOptionItem: Ot, activeOptionItemIndex: Ct, setOptionItems: yt, setWidgetOption: ne, getWidgetOption: pe, setFieldEnable: Et, hasFieldOptions: bt, getFieldOptions: oe, setFieldOptions: Rt, computedDefaultValue: ae, hasDefaultValue: ce, singleOption: Mt, watchOption: xt, addCssClass: _t, removeCssClass: Dt } = rt(i, n, v, R), { isIdClass: St, getIdByIdClass: Pt } = Fn(i), { getOneSchemaData: Wt, getSchemaDataObject: Nt, getSchemaDatas: Bt } = Nn(n), re = Hn();
386
+ let Ve = null, M = le();
387
+ const q = le(), Lt = () => x.value, Te = () => `${i == null ? void 0 : i.id}-${Ln()}`, Oe = le(Te()), Fe = () => {
388
+ Oe.value = Te();
389
+ }, Tt = xe({
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 = xe({
401
+ get: () => {
402
+ if (De(M.value)) {
403
+ var e = tt(M.value);
404
+ Rn(e) && (M.value = e);
405
+ }
406
+ return M.value;
407
+ },
408
+ set: (e) => {
409
+ M.value = e;
410
+ }
411
+ }), Ce = (e) => {
412
+ var s, c, d;
413
+ return (d = (c = (s = O.getWidgetRef(x.value)) == null ? void 0 : s.exposed) == null ? void 0 : c.getCheckedItems) == null ? void 0 : d.call(c, e);
414
+ }, $e = (e) => {
415
+ var s, c, d;
416
+ return (d = (c = (s = O.getWidgetRef(x.value)) == null ? void 0 : s.exposed) == null ? void 0 : c.getCheckedLabels) == null ? void 0 : d.call(c, e);
417
+ }, $t = (e) => {
418
+ var s, c, d;
419
+ return (d = (c = (s = O.getWidgetRef(x.value)) == null ? void 0 : s.exposed) == null ? void 0 : c.getCheckedText) == null ? void 0 : d.call(c, e);
420
+ }, ye = () => {
421
+ var y;
422
+ const e = (y = Y.value) == null ? void 0 : y.withAttachData;
423
+ if (!Ye(i) || e === !1)
424
+ return;
425
+ const s = M.value, c = $e(s), d = $t(s);
426
+ var E = w(Ce(s));
427
+ Ie(c, E, d);
428
+ }, Ie = (e, s, c) => {
429
+ var d = {};
430
+ if (e != null) {
431
+ let E = oe("textName", !1);
432
+ [`${x.value}${de.optionText}`, E].forEach((y) => {
433
+ y && d[y] === void 0 && (d[y] = e);
434
+ });
435
+ }
436
+ if (s != null && ge(s) !== ge(M.value)) {
437
+ let E = oe("optionName", !1);
438
+ [`${x.value}${de.checkedOptions}`, E].forEach((y) => {
439
+ y && d[y] === void 0 && (d[y] = s);
440
+ });
441
+ }
442
+ if (c != null) {
443
+ let E = oe("labelName", !1);
444
+ e != c && [`${x.value}${de.optionLabelName}`, E].forEach((y) => {
445
+ y && d[y] === void 0 && (d[y] = c);
446
+ });
447
+ }
448
+ z(h, w(d));
449
+ }, Z = (e) => {
450
+ if (J(i)) {
451
+ ye();
452
+ var s = { [x.value]: e };
453
+ z(h, s);
454
+ }
455
+ }, se = (e) => {
456
+ u || Z(e);
457
+ }, je = (e) => oe(e, !1), Ae = () => {
458
+ var e = Cn(h);
459
+ M = st.get(e, x.value);
460
+ }, ke = (e) => {
461
+ Ve = w(e);
462
+ }, It = () => {
463
+ u || P && P(G());
464
+ }, jt = () => {
465
+ ce() && ve(ae()).then((e) => {
466
+ Z(e), Ae();
467
+ });
468
+ }, Ee = (e, s) => {
469
+ if (!J(i))
470
+ return;
471
+ l(j.fieldValueChanged, { newValue: e, oldValue: s });
472
+ const c = { fieldId: i.id, fieldName: x.value, newValue: e, oldValue: s };
473
+ r(b, j.fieldChange, c, R);
474
+ }, At = (e) => F(e), be = (e, s) => Pe(pe(e), s), kt = (e) => {
475
+ se(e), Ue(), be(j.onInput, { value: e });
476
+ }, Ht = (e, s) => {
477
+ var c, d, E;
478
+ return (E = (d = (c = O.getWidgetRef(x.value)) == null ? void 0 : c.exposed) == null ? void 0 : d.handleBeforeChange) == null ? void 0 : E.call(d, e, s);
479
+ }, Kt = (...e) => {
480
+ var E, y, L;
481
+ let c = ((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];
482
+ c = w(c);
483
+ var d = Ht(c, Ve);
484
+ d != null ? se(d) : se(c), Ee(c, Ve), Ue(), ke(c);
485
+ }, Ut = (e = !0) => {
486
+ ne(I.readonly, e);
487
+ }, qt = (e = !0) => {
488
+ ne(I.disabled, e);
489
+ }, Gt = (e = !0) => {
490
+ ne(I.hidden, e), e ? Ge() : fe();
491
+ }, Jt = (e = !0) => {
492
+ Et(I.required, e), fe();
493
+ }, zt = (e) => {
494
+ ne(I.label, e);
495
+ }, G = () => M == null ? void 0 : M.value, He = (e) => {
496
+ M.value = e;
497
+ }, ie = (e) => {
498
+ let s = w(G());
499
+ if (He(e), !J(i))
500
+ return;
501
+ const c = G();
502
+ s !== c && (se(c), Ee(e, s));
503
+ }, Qt = () => {
504
+ ce() ? ve(ae()).then((e) => {
505
+ Z(e);
506
+ }) : Z(null), _ == null || _();
507
+ }, Xt = (e) => {
508
+ const s = G(), c = re.insertOnMousePos(q.value, e, s);
509
+ ie(c);
510
+ }, Yt = (e, s) => {
511
+ ee(() => M == null ? void 0 : M.value, (c, d) => {
512
+ e == null || e({ id: i.id, name: x.value, newValue: c, oldValue: d });
513
+ }, s);
514
+ }, Zt = (e) => {
515
+ var y;
516
+ e.preventDefault();
517
+ const s = (L) => {
518
+ var H;
519
+ const $ = (H = Array.from(L.classList)) == null ? void 0 : H.find((Re) => St(Re));
520
+ return $ ? Pt($) : "";
521
+ }, c = document.activeElement;
522
+ if (!c)
523
+ return;
524
+ const d = document.getElementsByClassName(Qe.formItemTarget);
525
+ for (var E = 0; E < d.length; E++) {
526
+ const L = d[E], $ = ct(c, Qe.formItemTarget);
527
+ if (!$)
528
+ continue;
529
+ const H = s(L), Re = s($);
530
+ if (H === Re) {
531
+ if (E === d.length - 1)
532
+ return;
533
+ const fn = d[E + 1], ln = s(fn), Me = O.findRefById(ln, R);
534
+ try {
535
+ (y = Me == null ? void 0 : Me.exposed) == null || y.focus();
536
+ } catch (mn) {
537
+ console.log(mn);
538
+ }
539
+ }
540
+ }
541
+ };
542
+ let wt = () => {
543
+ var L;
544
+ let e = {
545
+ componentName: x.value,
546
+ //用于组件事件emitter发射与接收处理
547
+ refList: N,
548
+ allRefList: p,
549
+ changeRegisterToRefList: ($, H) => {
550
+ O.changeRegisterToRefList($, H), C.changeRegisterToRefList($, H);
551
+ },
552
+ getField: f,
553
+ getFormData: S,
554
+ getValue: G,
555
+ setValue: He,
556
+ emit$: l,
557
+ findRefByName: O.getWidgetRef,
558
+ findRefById: O.findRefById,
559
+ callRefFunc: O.callRefFunc,
560
+ getWidgetOption: pe,
561
+ setWidgetOption: ne,
562
+ refreshKey: Fe,
563
+ getRowScope: o,
564
+ //组件的数据绑定:继承的数据,用于计算组件属性变量
565
+ getOneSchemaData: Wt,
566
+ getSchemaDatas: Bt,
567
+ getSchemaDataObject: Nt,
568
+ addCssClass: _t,
569
+ removeCssClass: Dt
570
+ }, s = {
571
+ resetField: Qt,
572
+ getValue: G,
573
+ setValue: ie,
574
+ refreshDefaultValue: jt,
575
+ insertOnMousePos: Xt,
576
+ disableChangeValidate: lt,
577
+ enableChangeValidate: mt,
578
+ focus: () => {
579
+ re.focus(q.value);
580
+ },
581
+ blur: () => {
582
+ re.blur(q.value);
583
+ },
584
+ getMousePos: () => {
585
+ re.getMousePos(q.value);
586
+ },
587
+ setMousePos: ($) => {
588
+ re.setMousePos(q.value, $);
589
+ }
590
+ }, c = {
591
+ getCheckedItems: Ce,
592
+ getCheckedLabels: $e
593
+ }, d = {
594
+ [I.required]: { name: A.setRequired, fn: Jt },
595
+ [I.label]: { name: A.setLabel, fn: zt },
596
+ [I.hidden]: { name: A.setHidden, fn: Gt },
597
+ [I.disabled]: { name: A.setDisabled, fn: qt },
598
+ [I.readonly]: { name: A.setReadonly, fn: Ut }
599
+ }, E = {};
600
+ (L = Q(d)) == null || L.forEach(($) => {
601
+ if (_e(i, $)) {
602
+ const H = d[$];
603
+ E[H.name] = H.fn;
604
+ }
605
+ });
606
+ var y = z(e, E);
607
+ return J(i) && (y = z(y, s)), Ye(i) && (y = z(y, c)), y;
608
+ };
609
+ const en = xe(() => ({
610
+ attrs: X.value,
611
+ extendAttrs: Y.value,
612
+ events: k.value,
613
+ slots: Be.value,
614
+ fieldKey: Oe.value,
615
+ fieldEditor: q.value,
616
+ fieldName: x.value
617
+ })), tn = (e) => {
618
+ t.designState && t.designer && ee(() => {
619
+ var s;
620
+ return (s = t == null ? void 0 : t.widget) == null ? void 0 : s[e];
621
+ }, (s, c) => {
622
+ const { emitHistoryChange: d } = $n(t.designer);
623
+ d(`edit ${x.value}.${e},newValue:${s},oldValue:${c}`);
624
+ }, {
625
+ deep: !0
626
+ });
627
+ }, nn = (e, s, c) => {
628
+ const d = le(), E = je(e), y = (L) => {
629
+ s && (d.value = s(L || E));
630
+ };
631
+ return et(E) ? ee(E, (L) => {
632
+ y(L), c && c(L);
633
+ }) : y(E), d;
634
+ }, Ke = () => {
635
+ !J(i) || u || Yt((e) => {
636
+ An(p, i == null ? void 0 : i.id, n), kn(p, i == null ? void 0 : i.id, U.getOptions(i, I.relate), e), ye();
637
+ }, { immediate: !0 });
638
+ }, Ue = () => {
639
+ const e = { propName: x.value };
640
+ r(b, j.fieldValidation, e, R);
641
+ }, qe = () => {
642
+ const e = { fieldId: i.id, fieldName: x.value, rules: Le };
643
+ r(b, j.fieldRuleChange, e, R);
644
+ }, fe = () => {
645
+ if (!J(i))
646
+ return;
647
+ const e = it();
648
+ return qe(), e;
649
+ }, Ge = () => {
650
+ ft(), qe();
651
+ }, on = () => {
652
+ _e(i, "change") && (k.value.change = Kt), _e(i, "input") && (k.value.input = kt), a(Sn.setFormData, (e) => {
653
+ ie(e[x.value]);
654
+ }), a(j.fieldValueChanged, (e) => {
655
+ be(j.onChange, { value: e == null ? void 0 : e.newValue, oldValue: e == null ? void 0 : e.oldValue });
656
+ });
657
+ }, rn = () => {
658
+ let e = x.value;
659
+ J(i) ? ((!Mn(h, e) || h[e] === void 0) && (Z(null), ce() && ve(ae()).then((s) => {
660
+ Z(s);
661
+ })), Ae()) : ce() && ve(ae()).then((s) => {
662
+ ie(s);
663
+ }), ke(G()), It();
664
+ }, sn = () => {
665
+ ee(() => ue == null ? void 0 : ue.value, (e, s) => {
666
+ ye();
667
+ });
668
+ }, un = () => {
669
+ const e = On(Pn.isRenderComplete);
670
+ if (e != null && e.value) {
671
+ Ke();
672
+ return;
673
+ }
674
+ e != null && ee(() => e == null ? void 0 : e.value, (s) => {
675
+ s && Ke();
676
+ }, { immediate: !0 });
677
+ }, an = () => {
678
+ var e, s;
679
+ if (g)
680
+ try {
681
+ rn(), fe(), on(), O.registerToRefList(x.value), C.registerToRefList(x.value), (s = (e = k == null ? void 0 : k.value) == null ? void 0 : e.created) == null || s.call(e), T();
682
+ } catch (c) {
683
+ console.log("create", i, c);
684
+ }
685
+ }, cn = () => {
686
+ g && (Ze(() => {
687
+ var e, s;
688
+ try {
689
+ un(), sn(), (s = (e = k == null ? void 0 : k.value) == null ? void 0 : e.mounted) == null || s.call(e);
690
+ } catch (c) {
691
+ console.log("mounted", i, c);
692
+ }
693
+ }), Vn(() => {
694
+ O.unregisterFromRefList(x.value), C.unregisterFromRefList(x.value);
695
+ }));
696
+ };
697
+ return an(), cn(), {
698
+ exposed: wt(),
699
+ fieldModel: M,
700
+ objFieldModel: Ft,
701
+ numFieldModel: Tt,
702
+ fieldEditor: q,
703
+ fieldKey: Oe,
704
+ field: i,
705
+ instance: R,
706
+ attrs: X,
707
+ extendAttrs: Y,
708
+ slots: Be,
709
+ events: k,
710
+ rules: Le,
711
+ fieldObj: en,
712
+ pageConfig: W,
713
+ formModel: h,
714
+ fieldName: x,
715
+ propResultOpt: n,
716
+ optionItems: ue,
717
+ activeOptionItems: Vt,
718
+ activeOptionItem: Ot,
719
+ activeOptionItemIndex: Ct,
720
+ filterOptionItems: vt,
721
+ setOptionItems: yt,
722
+ getCheckedItems: Ce,
723
+ getCheckedOptionItems: (e) => pt(e || M.value),
724
+ getCheckedOptionLabels: (e) => ht(e || M.value),
725
+ getCheckedOptionValues: (e) => gt(e || M.value),
726
+ getCheckedOptionText: (e) => dt(e || M.value),
727
+ refreshKey: Fe,
728
+ watchKeyValue: nn,
729
+ watchPropAndSaveHistoryStep: tn,
730
+ existEvent: At,
731
+ handleEvent: be,
732
+ handleEnter: Zt,
733
+ getPropName: Lt,
734
+ emitFieldDataChange: Ee,
735
+ syncUpdateFormModel: se,
736
+ getWidgetRef: O.getWidgetRef,
737
+ clearRules: Ge,
738
+ buildRules: fe,
739
+ getFieldOptionModel: je,
740
+ getFieldOptions: oe,
741
+ hasFieldOptions: bt,
742
+ setFieldOptions: Rt,
743
+ getWidgetOption: pe,
744
+ singleOption: Mt,
745
+ watchOption: xt,
746
+ mergeOptionToFormModel: Ie
747
+ };
748
+ }
749
+ export {
750
+ Ne as R,
751
+ he as a,
752
+ eo as b,
753
+ jn as u
754
+ };