hlrender 0.0.83 → 0.0.84

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