hlrender 0.0.48 → 0.0.50

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