hlrender 0.0.84 → 0.0.85

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