hlrender 0.0.50 → 0.0.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/{affix-widget-3d694272.js → affix-widget-720c9efd.js} +10 -10
  2. package/{alert-widget-1c454a7d.js → alert-widget-a899f06e.js} +10 -10
  3. package/{anchor-widget-c4cd5db3.js → anchor-widget-ef71570c.js} +7 -7
  4. package/{auto-complete-widget-f1c7dc53.js → auto-complete-widget-b0695fb0.js} +9 -9
  5. package/{avatar-widget-0de88b8a.js → avatar-widget-abff3d76.js} +10 -10
  6. package/{backtop-widget-e7aabbdb.js → backtop-widget-ece33c67.js} +10 -10
  7. package/{badge-widget-99f07b37.js → badge-widget-558e0e7a.js} +10 -10
  8. package/{baseImp-c7c90bf0.js → baseImp-7fb8e7ad.js} +292 -295
  9. package/{breadcrumb-widget-12a6f999.js → breadcrumb-widget-caac5972.js} +7 -7
  10. package/{button-widget-bc624762.js → button-widget-6052c8ec.js} +10 -10
  11. package/{cache-widget-79e9f4a8.js → cache-widget-43d274c9.js} +8 -8
  12. package/{card-widget-10e4bc56.js → card-widget-4a64059d.js} +8 -8
  13. package/{carousel-widget-812f5310.js → carousel-widget-0e2d6365.js} +8 -8
  14. package/{cascader-widget-efa8b57d.js → cascader-widget-42b42b5d.js} +8 -8
  15. package/{chart-widget-2b960b60.js → chart-widget-d0edcec4.js} +7 -7
  16. package/{checkbox-widget-1d0cf7a1.js → checkbox-widget-53ef9bb1.js} +8 -8
  17. package/{collapse-widget-893219bc.js → collapse-widget-5b92ec53.js} +8 -8
  18. package/{color-picker-widget-81507e91.js → color-picker-widget-2aa51feb.js} +8 -8
  19. package/{cont-cell-widget-bea1f10b.js → cont-cell-widget-01ed00a8.js} +1 -1
  20. package/{cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-fc8f4d4a.js → cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-d3fec734.js} +5 -5
  21. package/{cont-widget-eeb612e6.js → cont-widget-008ff6be.js} +5 -5
  22. package/{content-wrapper-676c45bd.js → content-wrapper-167976d7.js} +3 -3
  23. package/{content-wrapper.vue_vue_type_script_setup_true_lang-16519ccc.js → content-wrapper.vue_vue_type_script_setup_true_lang-46a42663.js} +2 -2
  24. package/{date-picker-range-widget-9b8a3153.js → date-picker-range-widget-4c99e6f6.js} +8 -8
  25. package/{date-picker-widget-fbd38946.js → date-picker-widget-7d2bc769.js} +8 -8
  26. package/{default-slot-widget-4bb00d87.js → default-slot-widget-dd268245.js} +8 -8
  27. package/{default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-9fc27837.js → default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-1b96b459.js} +5 -5
  28. package/{descriptions-widget-36d2835d.js → descriptions-widget-bb029280.js} +8 -8
  29. package/{dialog-widget-ab088cfe.js → dialog-widget-6ed2346d.js} +9 -9
  30. package/{divider-widget-cad03247.js → divider-widget-cdf31401.js} +10 -10
  31. package/{drag-wrapper-b8f18428.js → drag-wrapper-af1b931c.js} +5 -5
  32. package/{drawer-widget-0fd94fec.js → drawer-widget-4b97c6bd.js} +9 -9
  33. package/{dropdown-widget-fe3a4450.js → dropdown-widget-be56637d.js} +8 -8
  34. package/{empty-widget-814211fa.js → empty-widget-d354daeb.js} +10 -10
  35. package/{expression-8b5cf5cd.js → expression-83e866fe.js} +122 -121
  36. package/{feedback-widget-f61e8977.js → feedback-widget-99fb44f3.js} +9 -9
  37. package/{feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-9cc7f596.js → feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-500be642.js} +5 -5
  38. package/{file-upload-widget-4025a3a8.js → file-upload-widget-b00a7e5f.js} +9 -9
  39. package/{form-item-wrapper-cc408e59.js → form-item-wrapper-3672beb8.js} +4 -4
  40. package/{form-widget-13f3249d.js → form-widget-54444b5c.js} +8 -8
  41. package/{grid-col-widget-4d09e613.js → grid-col-widget-1eb649b3.js} +1 -1
  42. package/{grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-225a5d7e.js → grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-bb1a5ffa.js} +5 -5
  43. package/{grid-widget-97b2fb8f.js → grid-widget-09e314d7.js} +5 -5
  44. package/{html-text-widget-9dd280dc.js → html-text-widget-713c3f1e.js} +8 -8
  45. package/{iframe-widget-040868ec.js → iframe-widget-c5b27494.js} +7 -7
  46. package/{image-widget-bdcb2bce.js → image-widget-1d7435e2.js} +7 -7
  47. package/{index-a4d1d907.js → index-d054c102.js} +2 -2
  48. package/{input-number-widget-965d3d36.js → input-number-widget-187532e3.js} +8 -8
  49. package/{input-widget-16de5413.js → input-widget-476f69c8.js} +9 -9
  50. package/{link-widget-bd21149f.js → link-widget-776eff50.js} +10 -10
  51. package/{ltable-col-widget-7dddf789.js → ltable-col-widget-85538e4b.js} +1 -1
  52. package/{ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-ccd68bf0.js → ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-65eb4264.js} +7 -7
  53. package/{ltable-widget-9bad7c19.js → ltable-widget-ad3168ec.js} +5 -5
  54. package/{menu-widget-16303726.js → menu-widget-0d0f8bf3.js} +8 -8
  55. package/{model-widget-4110b949.js → model-widget-cbd6d10c.js} +7 -7
  56. package/{multirow-2a81c1cd.js → multirow-2ef82f3f.js} +4 -4
  57. package/{multirow-widget-8e1accbf.js → multirow-widget-9d0bb6b7.js} +8 -8
  58. package/package.json +1 -1
  59. package/{pagination-widget-6c196d93.js → pagination-widget-0d78d4a6.js} +7 -7
  60. package/{picture-upload-widget-a4c8f05f.js → picture-upload-widget-a7b34eea.js} +9 -9
  61. package/{progress-widget-6f498ff7.js → progress-widget-0dfc4206.js} +8 -8
  62. package/{propresult-ede45228.js → propresult-a2860930.js} +1 -1
  63. package/{radio-widget-eae4723b.js → radio-widget-bfae2dd2.js} +8 -8
  64. package/{range-widget-ababcf0a.js → range-widget-2d2eb2d7.js} +9 -9
  65. package/{rate-widget-01de38aa.js → rate-widget-fd2efc64.js} +8 -8
  66. package/render.es.js +248 -261
  67. package/render.umd.js +281 -281
  68. package/{result-widget-2fc0775a.js → result-widget-633f9da9.js} +8 -8
  69. package/{rich-editor-widget-f68ce2b7.js → rich-editor-widget-d77f2903.js} +8 -8
  70. package/{router-widget-db469ad6.js → router-widget-293e7aaa.js} +7 -7
  71. package/{select-widget-1bb2f3cb.js → select-widget-631ad509.js} +129 -128
  72. package/{sfc-a485142c.js → sfc-2e04a9d2.js} +4 -4
  73. package/share-field-2e65357c.js +758 -0
  74. package/{share-file-a922565e.js → share-file-eb689377.js} +3 -3
  75. package/{slider-widget-62a03c7f.js → slider-widget-2da9ca84.js} +8 -8
  76. package/{slot-554b9687.js → slot-8a437369.js} +2 -2
  77. package/{static-text-widget-1a133fcf.js → static-text-widget-12ee38d3.js} +8 -8
  78. package/{steps-widget-cbfc63e6.js → steps-widget-50a5b1b2.js} +7 -7
  79. package/{subMenu-widget-422dc3b8.js → subMenu-widget-a9f796af.js} +3 -3
  80. package/{subMenu-widget.vue_vue_type_script_setup_true_lang-a06ac71e.js → subMenu-widget.vue_vue_type_script_setup_true_lang-a143cc4d.js} +1 -1
  81. package/{switch-widget-a1fa3c16.js → switch-widget-c6108ecb.js} +8 -8
  82. package/{tab-pane-widget-4f9b5bb8.js → tab-pane-widget-80652380.js} +1 -1
  83. package/{tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-c204bc62.js → tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-d324110f.js} +5 -5
  84. package/{table-col-widget-9d6e87fe.js → table-col-widget-6d6e3132.js} +7 -7
  85. package/{table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-03f6d1ce.js → table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-a1d453e5.js} +4 -4
  86. package/{table-widget-3a84c6c9.js → table-widget-9d2d3190.js} +9 -9
  87. package/{tabs-widget-2e17a213.js → tabs-widget-a0ad6a27.js} +6 -6
  88. package/{tag-widget-251a0c57.js → tag-widget-9bf22989.js} +10 -10
  89. package/{text-widget-1515d82b.js → text-widget-b22caa75.js} +10 -10
  90. package/{textarea-widget-810b1b35.js → textarea-widget-ab064141.js} +8 -8
  91. package/{time-picker-range-widget-53521305.js → time-picker-range-widget-c3922ec2.js} +8 -8
  92. package/{time-picker-widget-023d4002.js → time-picker-widget-f48d5a8d.js} +8 -8
  93. package/{time-select-widget-162ff318.js → time-select-widget-5af3138d.js} +8 -8
  94. package/{tmpl-widget-a3219a3a.js → tmpl-widget-4b44bea8.js} +8 -8
  95. package/{tree-select-widget-098f9ede.js → tree-select-widget-2e2b5eb9.js} +8 -8
  96. package/{tree-widget-61723874.js → tree-widget-da2871fb.js} +7 -7
  97. package/{widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-f7c17786.js → widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-ea39744c.js} +2 -2
  98. package/{wrapper-widget-a4f4b0b5.js → wrapper-widget-b638dad4.js} +5 -5
  99. package/share-field-e2b77435.js +0 -754
@@ -1,754 +0,0 @@
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
- };