hlrender 0.0.27 → 0.0.31

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-0b1e9967.js → affix-widget-30f2ea6c.js} +9 -9
  2. package/{alert-widget-7bf6f225.js → alert-widget-c04a1725.js} +9 -9
  3. package/{anchor-widget-a2f27bc8.js → anchor-widget-9d07cd7e.js} +6 -6
  4. package/{auto-complete-widget-e539a9ae.js → auto-complete-widget-b1f7aa7a.js} +8 -8
  5. package/{avatar-widget-c69d30b8.js → avatar-widget-709f7ee7.js} +9 -9
  6. package/{backtop-widget-6b893c3e.js → backtop-widget-9ad291ef.js} +9 -9
  7. package/{badge-widget-6b72628b.js → badge-widget-25f42960.js} +9 -9
  8. package/{baseImp-9015fa78.js → baseImp-9dc35637.js} +1 -1
  9. package/{breadcrumb-widget-d0ab848c.js → breadcrumb-widget-94a9873d.js} +6 -6
  10. package/{button-widget-f5051b21.js → button-widget-8ffb0ecd.js} +9 -9
  11. package/{cache-widget-5352d8dd.js → cache-widget-d581bc9d.js} +7 -7
  12. package/{card-widget-c78711e5.js → card-widget-4e298c77.js} +7 -7
  13. package/{carousel-widget-4f4a005b.js → carousel-widget-20f6df18.js} +6 -6
  14. package/{cascader-widget-b4a36954.js → cascader-widget-564492f6.js} +7 -7
  15. package/{chart-widget-fc1f767c.js → chart-widget-7d1e36dc.js} +6 -6
  16. package/{checkbox-widget-50773c08.js → checkbox-widget-8f68a90e.js} +7 -7
  17. package/{collapse-widget-ff4b1c65.js → collapse-widget-541ad6d5.js} +6 -6
  18. package/{color-picker-widget-9267690c.js → color-picker-widget-df756adc.js} +7 -7
  19. package/{cont-cell-widget-c48a2133.js → cont-cell-widget-5c8b3431.js} +1 -1
  20. package/{cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-afaeb0f9.js → cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-174b4ab2.js} +4 -4
  21. package/{cont-widget-1b0983ab.js → cont-widget-9b88d171.js} +4 -4
  22. package/{content-wrapper-cd37d36d.js → content-wrapper-ac73895d.js} +2 -2
  23. package/{content-wrapper.vue_vue_type_script_setup_true_lang-3393dd5d.js → content-wrapper.vue_vue_type_script_setup_true_lang-8b6e8053.js} +1 -1
  24. package/{date-picker-range-widget-6c7b090c.js → date-picker-range-widget-d4246a3f.js} +7 -7
  25. package/{date-picker-widget-a23b9219.js → date-picker-widget-5d34aa42.js} +7 -7
  26. package/{default-slot-widget-5e1ea055.js → default-slot-widget-531d53f5.js} +7 -7
  27. package/{default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-4277ee59.js → default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-6ec19694.js} +4 -4
  28. package/{descriptions-widget-29fb13b4.js → descriptions-widget-6a91fa34.js} +7 -7
  29. package/{dialog-widget-375e054e.js → dialog-widget-f3a1824d.js} +8 -8
  30. package/{divider-widget-8a63da54.js → divider-widget-4816aab2.js} +9 -9
  31. package/{drag-wrapper-4a85cc4b.js → drag-wrapper-dc4fb2cf.js} +4 -4
  32. package/{drawer-widget-4c1a4273.js → drawer-widget-872f4b90.js} +8 -8
  33. package/{dropdown-widget-ea9bd035.js → dropdown-widget-5b7a4fd2.js} +7 -7
  34. package/{empty-widget-667c01de.js → empty-widget-22dd02bf.js} +9 -9
  35. package/{feedback-widget-18be7e75.js → feedback-widget-49ab9421.js} +8 -8
  36. package/{feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-c2a5ad23.js → feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-05f55615.js} +4 -4
  37. package/{file-upload-widget-c03f2220.js → file-upload-widget-5be694b9.js} +8 -8
  38. package/{form-item-wrapper-aa218656.js → form-item-wrapper-553d43e5.js} +3 -3
  39. package/{form-widget-bdf6c51b.js → form-widget-2090a045.js} +10 -10
  40. package/{grid-col-widget-683be736.js → grid-col-widget-f7a64f05.js} +1 -1
  41. package/{grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-f1aed33a.js → grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-3af5cc0b.js} +4 -4
  42. package/{grid-widget-803bb7f8.js → grid-widget-49ecc8d6.js} +4 -4
  43. package/{html-text-widget-c1f22c98.js → html-text-widget-23447632.js} +7 -7
  44. package/{iframe-widget-3fafddfe.js → iframe-widget-32638539.js} +6 -6
  45. package/{image-widget-3d49deaf.js → image-widget-b51e3a19.js} +6 -6
  46. package/{index-8297fdf5.js → index-8fc40e72.js} +1 -1
  47. package/{input-number-widget-79ec93d8.js → input-number-widget-82b3eb71.js} +11 -11
  48. package/{input-widget-a7c3b86b.js → input-widget-9c5eb8ac.js} +8 -8
  49. package/{link-widget-386944f5.js → link-widget-e25835d2.js} +9 -9
  50. package/{ltable-col-widget-64076cc5.js → ltable-col-widget-b00ff3b0.js} +1 -1
  51. package/{ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-1112d2b0.js → ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-f71b0e83.js} +6 -6
  52. package/{ltable-widget-9d948a4d.js → ltable-widget-613feacf.js} +4 -4
  53. package/{menu-widget-6db018a7.js → menu-widget-3c88cb9a.js} +7 -7
  54. package/{model-widget-27c5e68c.js → model-widget-a3a17d60.js} +6 -6
  55. package/{multirow-a532db48.js → multirow-bb2e2620.js} +30 -30
  56. package/{multirow-widget-5b27fc1b.js → multirow-widget-25801739.js} +220 -219
  57. package/package.json +1 -1
  58. package/{pagination-widget-8fef48e0.js → pagination-widget-b87ed861.js} +6 -6
  59. package/{picture-upload-widget-7aedc87b.js → picture-upload-widget-b82f8ab2.js} +38 -38
  60. package/{progress-widget-4c590fee.js → progress-widget-00f1ae8d.js} +7 -7
  61. package/{radio-widget-c8b5e0f0.js → radio-widget-662bafc5.js} +7 -7
  62. package/{range-widget-4a0db819.js → range-widget-063f3573.js} +8 -8
  63. package/{rate-widget-0b024502.js → rate-widget-ac9b7360.js} +7 -7
  64. package/render.es.js +259 -246
  65. package/render.style.css +1 -1
  66. package/render.umd.js +379 -379
  67. package/{result-widget-76507fc9.js → result-widget-0c49cc9d.js} +7 -7
  68. package/{rich-editor-widget-f3827a60.js → rich-editor-widget-5cb28fbb.js} +7 -7
  69. package/{router-widget-cf3ca475.js → router-widget-3b96deb2.js} +6 -6
  70. package/{select-widget-3d76e920.js → select-widget-d5b6d368.js} +7 -7
  71. package/{sfc-8acc3fa7.js → sfc-f3c94efa.js} +3 -3
  72. package/share-field-2202d5e4.js +740 -0
  73. package/{share-file-07198250.js → share-file-0e405a6a.js} +38 -40
  74. package/{slider-widget-a89d3a2f.js → slider-widget-e1f80bfb.js} +7 -7
  75. package/{slot-7ee844c2.js → slot-04ed2c7f.js} +1 -1
  76. package/{static-text-widget-44ab9497.js → static-text-widget-4f70cd16.js} +7 -7
  77. package/{steps-widget-3c42b92e.js → steps-widget-309ebb8d.js} +6 -6
  78. package/{subMenu-widget-b3d6de0d.js → subMenu-widget-b3e859bb.js} +2 -2
  79. package/{subMenu-widget.vue_vue_type_script_setup_true_lang-18571b83.js → subMenu-widget.vue_vue_type_script_setup_true_lang-24c94a78.js} +1 -1
  80. package/{switch-widget-8c1910e2.js → switch-widget-b43af6e7.js} +7 -7
  81. package/{tab-pane-widget-89dbdacf.js → tab-pane-widget-8c06770f.js} +1 -1
  82. package/{tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-8fba5d63.js → tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-1d40f13e.js} +4 -4
  83. package/{table-col-widget-e2e7fbf2.js → table-col-widget-b6cf0124.js} +6 -6
  84. package/{table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-27a3ef7d.js → table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-ab34f780.js} +4 -4
  85. package/{table-widget-deefc691.js → table-widget-a4b48cc0.js} +8 -8
  86. package/{tabs-widget-a7ba2025.js → tabs-widget-d69689c4.js} +5 -5
  87. package/{tag-widget-a88c5145.js → tag-widget-8aca6042.js} +9 -9
  88. package/{text-widget-f107f40b.js → text-widget-fa03122f.js} +9 -9
  89. package/{textarea-widget-7f410e91.js → textarea-widget-778c63c8.js} +7 -7
  90. package/{time-picker-range-widget-07699ed3.js → time-picker-range-widget-72c58c84.js} +7 -7
  91. package/{time-picker-widget-e15e220f.js → time-picker-widget-3f7f0afb.js} +7 -7
  92. package/{time-select-widget-ebe11d64.js → time-select-widget-3abe8814.js} +7 -7
  93. package/{tmpl-widget-5d3193a4.js → tmpl-widget-1f7a0f5c.js} +7 -7
  94. package/{tree-select-widget-f0561881.js → tree-select-widget-c8a7fb5b.js} +7 -7
  95. package/{tree-widget-8b617a9a.js → tree-widget-a358258a.js} +6 -6
  96. package/{widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-2544ac5d.js → widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-6de179d0.js} +42 -44
  97. package/wrapper-widget-8c5a1980.js +71 -0
  98. package/share-field-1325d4ad.js +0 -735
  99. package/wrapper-widget-80b5f35f.js +0 -78
@@ -1,735 +0,0 @@
1
- var fn = Object.defineProperty;
2
- var ln = (t, r, p) => r in t ? fn(t, r, { enumerable: !0, configurable: !0, writable: !0, value: p }) : t[r] = p;
3
- var Ue = (t, r, p) => (ln(t, typeof r != "symbol" ? r + "" : r, p), p);
4
- import { onMounted as Qe, nextTick as Xe, onActivated as mn, onErrorCaptured as vn, isRef as Ye, watch as z, reactive as dn, ref as fe, computed as ye, onBeforeUnmount as gn, inject as hn, toRefs as pn } from "vue";
5
- import { b as be, e as Re, o as X, c as Y, r as Vn, d as Q, H as On, t as Ze, f as we, j as Cn, l as yn, x as oe, w as En } from "./enum-type-3ddfb3c0.js";
6
- import { p as qe, b as et, g as bn, f as le, a as Rn } from "./multirow-a532db48.js";
7
- import { u as tt } from "./icon-e9532b43.js";
8
- import { f as I, l as me, m as Mn, n as Ge, g as $, b as xn, d as _n } from "./expression-fca39f89.js";
9
- import { b as nt, d as Me, B as q, P as ot, c as rt, e as Sn, a as Dn } from "./baseImp-9015fa78.js";
10
- import { F as Pn } from "./slot-7ee844c2.js";
11
- import { c as xe, t as st, l as Wn } from "./uuid-9d29d969.js";
12
- import { f as Nn, d as Ln, h as Ee, e as Tn } from "./index-8297fdf5.js";
13
- import { W as j, d as k } from "./enum-type-a8dcfe1b.js";
14
- function Bn() {
15
- return {
16
- onMountedOrActivated: (p) => {
17
- let R = !1;
18
- Qe(() => {
19
- p(), Xe(() => {
20
- R = !0;
21
- });
22
- }), mn(() => {
23
- R && p();
24
- });
25
- },
26
- onCompErrorCaptured: () => {
27
- vn((p) => (console.log(p), !1));
28
- }
29
- };
30
- }
31
- function Fn(t, r) {
32
- const { getWidgetOption: p, getWidgetOptionByPropValue: R } = nt(t, r), P = (M) => p(M);
33
- return {
34
- existFunc: P,
35
- handleFunc: (M, N) => {
36
- if (be(M)) {
37
- var L = P(String(M));
38
- return Me(L, N);
39
- } else {
40
- var L = R(xe(M));
41
- return Me(L, N);
42
- }
43
- }
44
- };
45
- }
46
- class _e {
47
- constructor(r) {
48
- Ue(this, "refList", {});
49
- r && (this.refList = r);
50
- }
51
- initRefList() {
52
- this.refList || (this.refList = {});
53
- }
54
- getWidgetRef(r) {
55
- if (r)
56
- return this.initRefList(), this.refList[r];
57
- }
58
- setWidgetRef(r, p) {
59
- r && (this.initRefList(), this.refList[r] = p);
60
- }
61
- removeWidgetRef(r) {
62
- r && this.refList && delete this.refList[r.toString()];
63
- }
64
- }
65
- function ve(t) {
66
- t || (t = {});
67
- const r = new _e(t), { instance: p } = tt(), R = (d) => r.getWidgetRef(d == null ? void 0 : d.toString()), P = (d, h, O) => {
68
- var y = [], o = [];
69
- let c = R(d);
70
- return c && y.push(c), y == null || y.forEach((n) => {
71
- var f = M(n, h, O);
72
- f && o.push(f);
73
- }), o;
74
- }, l = (d, h) => {
75
- var O;
76
- return (O = d == null ? void 0 : d.exposed) == null ? void 0 : O[h.toString()];
77
- }, M = (d, h, O) => {
78
- var y = l(d, h);
79
- if (y) {
80
- var o = [];
81
- return O && (o = Object.values(O)), y(...o);
82
- }
83
- }, N = (d, h, O) => {
84
- var y = [];
85
- if (d) {
86
- var o = xe(st(d, !0));
87
- o == null || o.forEach((c) => {
88
- var n = P(c, h, O);
89
- Re(n) || y.push(n);
90
- });
91
- }
92
- return Array.isArray(d) ? y : y == null ? void 0 : y[0];
93
- }, L = (d, h) => {
94
- let O = X(t);
95
- N(O, d, h);
96
- }, g = (d, h) => {
97
- var f, s, m;
98
- const O = (s = (f = h || p) == null ? void 0 : f.exposed) == null ? void 0 : s.getField();
99
- var y = qe(O == null ? void 0 : O.id);
100
- const o = (i) => (i == null ? void 0 : i.id) === d, c = (i) => {
101
- var _;
102
- var C = qe(i == null ? void 0 : i.id);
103
- return (y == null ? void 0 : y.groupName) === (C == null ? void 0 : C.groupName) && ((C == null ? void 0 : C.id) === d || ((_ = i == null ? void 0 : i._source) == null ? void 0 : _.id) === d);
104
- }, n = (m = X(r.refList)) == null ? void 0 : m.find((i) => {
105
- var _, F;
106
- try {
107
- const K = (F = (_ = r.refList[i]) == null ? void 0 : _.exposed) == null ? void 0 : F.getField();
108
- var C = o(K);
109
- return !C && (y != null && y.groupName) && (C = c(K)), C;
110
- } catch {
111
- return !1;
112
- }
113
- });
114
- if (n)
115
- return R(n);
116
- }, V = (d) => {
117
- if (d) {
118
- let h = d;
119
- r == null || r.setWidgetRef(h, p);
120
- }
121
- }, E = (d) => {
122
- if (d) {
123
- let h = d;
124
- r == null || r.removeWidgetRef(h);
125
- }
126
- };
127
- return {
128
- findWidgetAndCall: P,
129
- getWidgetRef: R,
130
- callWidgetsExposed: N,
131
- callRefFunc: M,
132
- existRefFunc: l,
133
- setAllRefList: L,
134
- findRefById: g,
135
- findRefByName: R,
136
- changeRegisterToRefList: (d, h) => {
137
- d && (V(d), E(h));
138
- },
139
- registerToRefList: V,
140
- unregisterFromRefList: E
141
- };
142
- }
143
- const In = (t, r, p) => {
144
- const R = new _e(t), { callRefFunc: P } = ve(t), { parseGroupId: l } = et();
145
- if (!t || t.length <= 0 || !r)
146
- return;
147
- const M = () => {
148
- var o, c;
149
- return (c = (o = X(t)) == null ? void 0 : o.map((n) => P(t == null ? void 0 : t[n], j.getField))) == null ? void 0 : c.filter((n) => !!n);
150
- }, N = (o) => {
151
- var s;
152
- const c = (s = M()) == null ? void 0 : s.find((m) => (m == null ? void 0 : m.id) === o);
153
- if (!c)
154
- return;
155
- const n = q.getName(c), f = R.getWidgetRef(n);
156
- if (f)
157
- return { ref: f, name: n, id: c == null ? void 0 : c.id };
158
- }, L = (o, c) => {
159
- if (!Y(c))
160
- return;
161
- const n = q.getName(o), f = R.getWidgetRef(n);
162
- if (f) {
163
- const s = q.getOptions(o, I.defaultValue, !1, !(p != null && p.designState), { ...p, formData: c });
164
- Y(s) && (Ye(s) ? z(s, (m) => {
165
- P(f, j.setValue, { newValue: m });
166
- }) : P(f, j.setValue, { newValue: s }));
167
- }
168
- }, g = (o, c) => {
169
- const n = N(o);
170
- if (!n)
171
- return;
172
- const f = n.name, s = P(n.ref, j.getValue), m = P(n.ref, j.getCheckedItems), i = {};
173
- return Re(s) || (i[f] = s), !Cn(m) && !c && (i[`${f}${me.checkedOptions}`] = m), i;
174
- }, V = (o, c) => {
175
- var f;
176
- var n = [];
177
- if ((f = M()) == null || f.forEach((s) => {
178
- if (!s)
179
- return;
180
- const m = s == null ? void 0 : s.id;
181
- var i = m === o;
182
- const C = l(m), _ = (C == null ? void 0 : C.id) === o, F = (C == null ? void 0 : C.groupName) === c;
183
- return i || _ && (F || !c) ? (n.push(s), !0) : !1;
184
- }), !(!n || n.length <= 0))
185
- return n == null ? void 0 : n.map((s) => {
186
- var m;
187
- return {
188
- id: s == null ? void 0 : s.id,
189
- name: (m = s == null ? void 0 : s._source) == null ? void 0 : m.name,
190
- source: s == null ? void 0 : s._source
191
- };
192
- });
193
- }, E = (o, c) => {
194
- var n = [];
195
- if (!o || (o == null ? void 0 : o.length) <= 0)
196
- return n;
197
- const f = l(r), s = f == null ? void 0 : f.groupName;
198
- return c === le.Inner2Outer ? o == null || o.forEach((m) => {
199
- var i = V(m);
200
- i && (i == null ? void 0 : i.length) > 0 && n.push(...i);
201
- }) : o == null || o.forEach((m) => {
202
- var i = V(m, s);
203
- i && (i == null ? void 0 : i.length) > 0 && n.push(...i);
204
- }), n;
205
- }, T = (o, c) => {
206
- const n = {};
207
- if (!o || o.length <= 0)
208
- return n;
209
- if (c === le.Inner2Outer) {
210
- var f = Vn(o, (s) => {
211
- var m;
212
- return (m = s.source) == null ? void 0 : m.id;
213
- });
214
- f == null || f.forEach((s) => {
215
- var C;
216
- const m = s.group[0], i = [];
217
- (C = s == null ? void 0 : s.children) == null || C.forEach((_) => {
218
- const F = g(_ == null ? void 0 : _.id, !0);
219
- if (Y(F)) {
220
- var K = Object.values(xe(F));
221
- i.push(...K);
222
- }
223
- }), m && Q(n, { [m]: i });
224
- });
225
- } else
226
- o.forEach((s) => {
227
- const m = g(s == null ? void 0 : s.id);
228
- Y(m) && Q(n, m);
229
- });
230
- return n;
231
- }, d = (o) => {
232
- var c = {};
233
- return o == null || o.forEach((n) => {
234
- var f;
235
- n != null && n.source && (n != null && n.id) && (c[(f = n == null ? void 0 : n.source) == null ? void 0 : f.id] = n == null ? void 0 : n.id);
236
- }), c;
237
- }, h = (o, c, n) => {
238
- if (n === le.Inner2Inner) {
239
- const i = On(c), { updateFomula: C } = rt(), { buildVariable: _ } = Sn();
240
- var f = d(o);
241
- if (Y(f)) {
242
- var s = q.getOrgOption(c, I.defaultValue), m = C(Ze(s), f, (F, K) => {
243
- var Z = f[F];
244
- return Re(Z) ? _(F) : _(Z);
245
- });
246
- return q.setOrgOption(i, I.defaultValue, we(m)), i;
247
- }
248
- }
249
- return c;
250
- }, O = (o) => {
251
- const c = o == null ? void 0 : o.id;
252
- var n = q.getOrgOption(o, I.defaultValue);
253
- if (n === void 0)
254
- return;
255
- const f = bn(r, c);
256
- if (f === le.DiffInner)
257
- return;
258
- var s = ot.getFormulaRelatedField(n);
259
- if (!s || s.length <= 0)
260
- return;
261
- var m = E(s, f);
262
- if (!(m != null && m.some((C) => C.id === r)))
263
- return;
264
- const i = T(m, f);
265
- L(h(m, o, f), i);
266
- };
267
- (() => {
268
- var o;
269
- (o = M()) == null || o.forEach((c) => {
270
- O(c);
271
- });
272
- })();
273
- }, $n = (t, r, p, R, P) => {
274
- var T;
275
- if (P || !Y(p))
276
- return;
277
- const { parseGroupId: l } = et();
278
- var M = l(r), N = M == null ? void 0 : M.groupName;
279
- const { callRefFunc: L } = ve(t), g = (d, h) => {
280
- var f, s, m;
281
- const O = (s = (f = X(t)) == null ? void 0 : f.map((i) => L(t == null ? void 0 : t[i], j.getField))) == null ? void 0 : s.filter((i) => !!i), y = (m = Nn(O, (i) => {
282
- var C = l(i == null ? void 0 : i.id);
283
- return (!N || (C == null ? void 0 : C.groupName) === N) && (C == null ? void 0 : C.id) === d;
284
- })) == null ? void 0 : m[0];
285
- if (!y)
286
- return;
287
- const o = q.getName(y), n = new _e(t).getWidgetRef(o);
288
- n && (h == null || h(n));
289
- }, V = st(R == null ? void 0 : R.newValue, !0), E = (T = X(p)) == null ? void 0 : T.filter((d) => V == null ? void 0 : V.includes(d));
290
- !E || E.length <= 0 || E == null || E.forEach((d) => {
291
- var O, y;
292
- const h = (O = p == null ? void 0 : p[d]) == null ? void 0 : O.result;
293
- (y = X(h)) == null || y.forEach((o) => {
294
- var n;
295
- const c = h == null ? void 0 : h[o];
296
- (n = c == null ? void 0 : c.ids) == null || n.forEach((f) => {
297
- g(f, (s) => {
298
- L(s, c == null ? void 0 : c.event, c == null ? void 0 : c.args);
299
- });
300
- });
301
- });
302
- });
303
- };
304
- function ut(t, r) {
305
- var p;
306
- return (p = t == null ? void 0 : t.classList) != null && p.contains(r) ? t : t != null && t.parentElement ? ut(t == null ? void 0 : t.parentElement, r) : null;
307
- }
308
- function jn() {
309
- const t = (g) => {
310
- if (g)
311
- return g != null && g.ref ? g == null ? void 0 : g.ref : g;
312
- }, r = (g) => {
313
- var V, E;
314
- try {
315
- (E = (V = t(g)) == null ? void 0 : V.focus) == null || E.call(V);
316
- } catch (T) {
317
- console.log(T);
318
- }
319
- }, p = (g) => {
320
- var V, E;
321
- try {
322
- (E = (V = t(g)) == null ? void 0 : V.blur) == null || E.call(V);
323
- } catch (T) {
324
- console.log(T);
325
- }
326
- }, R = (g) => {
327
- var V;
328
- return (V = t(g)) == null ? void 0 : V.selectionStart;
329
- }, P = (g) => {
330
- var V;
331
- return (V = t(g)) == null ? void 0 : V.selectionEnd;
332
- }, l = (g, V) => {
333
- var E;
334
- return (E = t(g)) == null ? void 0 : E.setSelectionRange(V, V);
335
- }, M = (g, V) => {
336
- r(g), l(g, V);
337
- };
338
- return {
339
- getSelectionStart: R,
340
- getSelectionEnd: P,
341
- setSelectionStart: l,
342
- blur: p,
343
- focus: r,
344
- setMousePos: M,
345
- getMousePos: (g) => R(g),
346
- insertOnMousePos: (g, V, E) => {
347
- const T = R(g), d = P(g), h = Mn(E, V, T, d);
348
- return Xe(() => {
349
- M(g, T + (V == null ? void 0 : V.length));
350
- }), h;
351
- }
352
- };
353
- }
354
- const Je = (t) => {
355
- var p;
356
- const { getFormulaFields: r } = rt();
357
- return ((p = r(Ze(t))) == null ? void 0 : p.length) > 0;
358
- }, U = (t) => {
359
- const r = t.type;
360
- return ![k.fileUpload, k.pictureUpload].includes(r) && t.formItemFlag || [k.form, k.dialog].includes(r);
361
- }, ze = (t) => {
362
- const r = t.type;
363
- return [k.treeSelect, k.cascader, k.select, k.checkbox, k.radio].includes(r);
364
- };
365
- function Yn(t) {
366
- const r = t == null ? void 0 : t.designState, p = (t == null ? void 0 : t.created) != !1, R = t == null ? void 0 : t.exResetField, P = t == null ? void 0 : t.extInitFieldModel, l = t == null ? void 0 : t.widget, M = t == null ? void 0 : t.designer, N = M == null ? void 0 : M.pageConfig, { formRefList: L, globalRefList: g, globalConfig: V, globalFormName: E, globalDataModel: T, rowScope: d } = Pn.globalInject();
367
- let h = dn(T || {});
368
- const O = ve(g), y = ve(L), o = () => oe(h), c = () => d, n = () => l, f = {
369
- instance: {
370
- exposed: {
371
- getFormData: !r && Je(l) ? o : null,
372
- findRefByName: O.getWidgetRef,
373
- getField: n,
374
- getRowScope: c
375
- }
376
- },
377
- designState: r,
378
- pageConfig: N,
379
- formData: !r && Je(l) ? h : {},
380
- globalConfig: V
381
- }, s = (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$: m, dispatch: i, emit$: C } = Rn(), { instance: _ } = tt(), { onCompErrorCaptured: F } = Bn(), { existFunc: K } = Fn({ options: l == null ? void 0 : l.options }, f), { attrs: Z, extendAttrs: Se, events: A, slots: De, rules: Pe, fieldName: x, buildRules: at, clearRules: ct, disableChangeValidate: it, enableChangeValidate: ft, optionItems: re, filterOptionItems: lt, getCheckedOptionText: mt, getCheckedOptionValues: vt, getCheckedOptionLabels: dt, getCheckedOptionItems: gt, activeOptionItems: ht, activeOptionItem: pt, activeOptionItemIndex: Vt, setOptionItems: Ot, setWidgetOption: w, getWidgetOption: de, setFieldEnable: Ct, getFieldOptions: ee, setFieldOptions: yt, computedDefaultValue: Et, hasDefaultValue: We, singleOption: bt, watchOption: Rt, addCssClass: Mt, removeCssClass: xt } = nt(l, f, s, _), { isIdClass: _t, getIdByIdClass: St } = Ln(l), { getOneSchemaData: Dt, getSchemaDataObject: Pt, getSchemaDatas: Wt } = Dn(f), te = jn();
382
- let ge = null, S = fe();
383
- const G = fe(), Nt = () => x.value, Lt = ye({
384
- get: () => {
385
- if (be(S.value)) {
386
- var e = Number(S.value);
387
- return isNaN(e) ? void 0 : (S.value = e, e);
388
- }
389
- return S.value;
390
- },
391
- set: (e) => {
392
- S.value = e;
393
- }
394
- }), Tt = ye({
395
- get: () => {
396
- if (be(S.value)) {
397
- var e = we(S.value);
398
- yn(e) && (S.value = e);
399
- }
400
- return S.value;
401
- },
402
- set: (e) => {
403
- S.value = e;
404
- }
405
- }), he = (e) => {
406
- var u, a, v;
407
- return (v = (a = (u = O.getWidgetRef(x.value)) == null ? void 0 : u.exposed) == null ? void 0 : a.getCheckedItems) == null ? void 0 : v.call(a, e);
408
- }, Ne = (e) => {
409
- var u, a, v;
410
- return (v = (a = (u = O.getWidgetRef(x.value)) == null ? void 0 : u.exposed) == null ? void 0 : a.getCheckedLabels) == null ? void 0 : v.call(a, e);
411
- }, Bt = (e) => {
412
- var u, a, v;
413
- return (v = (a = (u = O.getWidgetRef(x.value)) == null ? void 0 : u.exposed) == null ? void 0 : a.getCheckedText) == null ? void 0 : v.call(a, e);
414
- }, Le = () => {
415
- if (!ze(l))
416
- return;
417
- const e = S.value, u = Ne(e), a = Bt(e);
418
- var v = oe(he(e));
419
- Te(u, v, a);
420
- }, Te = (e, u, a) => {
421
- var v = {};
422
- let D = ee("textName", !1);
423
- [`${x.value}${me.optionText}`, D].forEach((b) => {
424
- b && v[b] === void 0 && (v[b] = e);
425
- });
426
- let W = ee("optionName", !1);
427
- [`${x.value}${me.checkedOptions}`, W].forEach((b) => {
428
- b && v[b] === void 0 && (v[b] = u);
429
- });
430
- let B = ee("labelName", !1);
431
- e != a && [`${x.value}${me.optionLabelName}`, B].forEach((b) => {
432
- b && v[b] === void 0 && (v[b] = a);
433
- }), Q(h, oe(v));
434
- }, ne = (e) => {
435
- if (U(l)) {
436
- var u = { [x.value]: e };
437
- Q(h, u);
438
- }
439
- }, se = (e) => {
440
- r || ne(e);
441
- }, Be = (e) => ee(e, !1), Fe = () => {
442
- var e = pn(h);
443
- S = ot.get(e, x.value);
444
- }, Ie = (e) => {
445
- ge = oe(e);
446
- }, Ft = () => {
447
- r || P && P(J());
448
- }, It = () => {
449
- var e;
450
- !r || !U(l) || ((e = ae()) == null || e.then((u) => {
451
- ne(u);
452
- }), Fe());
453
- }, pe = (e, u) => {
454
- if (!U(l))
455
- return;
456
- C(I.fieldValueChanged, { newValue: e, oldValue: u });
457
- const a = { fieldId: l.id, fieldName: x.value, newValue: e, oldValue: u };
458
- i(E, I.fieldChange, a, _);
459
- }, $t = (e) => K(e), ue = (e, u) => Me(de(e), u), jt = (e) => {
460
- se(e), He(), ue(I.onInput, { value: e });
461
- }, At = (...e) => {
462
- var v, D, W;
463
- const a = ((v = e == null ? void 0 : e[0]) == null ? void 0 : v.target) != null ? (W = (D = e == null ? void 0 : e[0]) == null ? void 0 : D.target) == null ? void 0 : W.value : e == null ? void 0 : e[0];
464
- se(a), pe(a, ge), He(), ue(I.onChange, { value: a, oldValue: ge }), Ie(a);
465
- }, Ht = () => {
466
- Ee(l, "change") && (A.value.change = At), Ee(l, "input") && (A.value.input = jt), m(xn.setFormData, (e) => {
467
- ce(e[x.value]);
468
- }), m(I.fieldValueChanged, (e) => {
469
- ue(I.onChange, { value: e == null ? void 0 : e.newValue, oldValue: e == null ? void 0 : e.oldValue });
470
- });
471
- };
472
- function ae() {
473
- if (We())
474
- return new Promise((e, u) => {
475
- z(() => Et.value, (a, v) => {
476
- e(a);
477
- }, { immediate: !0 });
478
- });
479
- }
480
- const Kt = () => {
481
- var u, a;
482
- let e = x.value;
483
- U(l) ? ((!En(h, e) || h[e] === void 0) && (ne(null), (u = ae()) == null || u.then((v) => {
484
- ne(v);
485
- })), Fe()) : We() && ((a = ae()) == null || a.then((v) => {
486
- ce(v);
487
- })), Ie(J()), Ft();
488
- }, kt = () => {
489
- z(() => re == null ? void 0 : re.value, (e, u) => {
490
- Le();
491
- });
492
- }, Ut = () => {
493
- const e = hn(_n.isRenderComplete);
494
- e != null && z(() => e == null ? void 0 : e.value, (u) => {
495
- u && sn();
496
- }, { immediate: !0 });
497
- }, qt = () => {
498
- var e, u;
499
- p && (Ut(), ie(), Kt(), Ht(), kt(), Qe(() => {
500
- var a, v;
501
- try {
502
- (v = (a = A == null ? void 0 : A.value) == null ? void 0 : a.mounted) == null || v.call(a);
503
- } catch (D) {
504
- console.log(D);
505
- }
506
- }), gn(() => {
507
- O.unregisterFromRefList(x.value), y.unregisterFromRefList(x.value);
508
- }), O.registerToRefList(x.value), y.registerToRefList(x.value), (u = (e = A == null ? void 0 : A.value) == null ? void 0 : e.created) == null || u.call(e), F());
509
- }, Gt = (e = !0) => {
510
- w($.readonly, e);
511
- }, Jt = (e = !0) => {
512
- w($.disabled, e);
513
- }, zt = (e = !0) => {
514
- w($.hidden, e), e ? ke() : ie();
515
- }, Qt = (e = !0) => {
516
- Ct($.required, e), ie();
517
- }, Xt = (e) => {
518
- w($.label, e);
519
- }, J = () => S == null ? void 0 : S.value, $e = (e) => {
520
- S.value = e;
521
- }, ce = (e) => {
522
- let u = oe(J());
523
- if ($e(e), !U(l))
524
- return;
525
- const a = J();
526
- u !== a && (se(a), pe(e, u));
527
- }, Yt = () => {
528
- var e;
529
- (e = ae()) == null || e.then((u) => {
530
- ne(u);
531
- }), R == null || R();
532
- }, Zt = (e) => {
533
- const u = J(), a = te.insertOnMousePos(G.value, e, u);
534
- ce(a);
535
- }, wt = (e, u) => {
536
- z(() => S == null ? void 0 : S.value, (a, v) => {
537
- e == null || e({ id: l.id, name: x.value, newValue: a, oldValue: v });
538
- }, u);
539
- }, en = (e) => {
540
- var W;
541
- e.preventDefault();
542
- const u = (B) => {
543
- var H;
544
- const b = (H = Array.from(B.classList)) == null ? void 0 : H.find((Oe) => _t(Oe));
545
- return b ? St(b) : "";
546
- }, a = document.activeElement;
547
- if (!a)
548
- return;
549
- const v = document.getElementsByClassName(Ge.formItemTarget);
550
- for (var D = 0; D < v.length; D++) {
551
- const B = v[D], b = ut(a, Ge.formItemTarget);
552
- if (!b)
553
- continue;
554
- const H = u(B), Oe = u(b);
555
- if (H === Oe) {
556
- if (D === v.length - 1)
557
- return;
558
- const un = v[D + 1], an = u(un), Ce = O.findRefById(an, _);
559
- try {
560
- (W = Ce == null ? void 0 : Ce.exposed) == null || W.focus();
561
- } catch (cn) {
562
- console.log(cn);
563
- }
564
- }
565
- }
566
- };
567
- let tn = () => {
568
- var B;
569
- let e = {
570
- componentName: x.value,
571
- //用于组件事件emitter发射与接收处理
572
- refList: L,
573
- allRefList: g,
574
- changeRegisterToRefList: (b, H) => {
575
- O.changeRegisterToRefList(b, H), y.changeRegisterToRefList(b, H);
576
- },
577
- getField: n,
578
- getFormData: o,
579
- getValue: J,
580
- setValue: $e,
581
- emit$: C,
582
- findRefByName: O.getWidgetRef,
583
- findRefById: O.findRefById,
584
- callRefFunc: O.callRefFunc,
585
- getWidgetOption: de,
586
- setWidgetOption: w,
587
- refreshKey: Ae,
588
- getRowScope: c,
589
- //组件的数据绑定:继承的数据,用于计算组件属性变量
590
- getOneSchemaData: Dt,
591
- getSchemaDatas: Wt,
592
- getSchemaDataObject: Pt,
593
- addCssClass: Mt,
594
- removeCssClass: xt
595
- }, u = {
596
- resetField: Yt,
597
- getValue: J,
598
- setValue: ce,
599
- refreshDefaultValue: It,
600
- insertOnMousePos: Zt,
601
- disableChangeValidate: it,
602
- enableChangeValidate: ft,
603
- focus: () => {
604
- te.focus(G.value);
605
- },
606
- blur: () => {
607
- te.blur(G.value);
608
- },
609
- getMousePos: () => {
610
- te.getMousePos(G.value);
611
- },
612
- setMousePos: (b) => {
613
- te.setMousePos(G.value, b);
614
- }
615
- }, a = {
616
- getCheckedItems: he,
617
- getCheckedLabels: Ne
618
- }, v = {
619
- [$.required]: { name: j.setRequired, fn: Qt },
620
- [$.label]: { name: j.setLabel, fn: Xt },
621
- [$.hidden]: { name: j.setHidden, fn: zt },
622
- [$.disabled]: { name: j.setDisabled, fn: Jt },
623
- [$.readonly]: { name: j.setReadonly, fn: Gt }
624
- }, D = {};
625
- (B = X(v)) == null || B.forEach((b) => {
626
- if (Ee(l, b)) {
627
- const H = v[b];
628
- D[H.name] = H.fn;
629
- }
630
- });
631
- var W = Q(e, D);
632
- return U(l) && (W = Q(W, u)), ze(l) && (W = Q(W, a)), W;
633
- };
634
- const nn = ye(() => ({
635
- attrs: Z.value,
636
- extendAttrs: Se.value,
637
- events: A.value,
638
- slots: De.value,
639
- fieldKey: Ve.value,
640
- fieldEditor: G.value,
641
- fieldName: x.value
642
- })), je = () => `${l == null ? void 0 : l.id}-${Wn()}`, Ve = fe(je()), Ae = () => {
643
- Ve.value = je();
644
- }, on = (e) => {
645
- t.designState && t.designer && z(() => {
646
- var u;
647
- return (u = t == null ? void 0 : t.widget) == null ? void 0 : u[e];
648
- }, (u, a) => {
649
- const { emitHistoryChange: v } = Tn(t.designer);
650
- v(`edit ${x.value}.${e},newValue:${u},oldValue:${a}`);
651
- }, {
652
- deep: !0
653
- });
654
- }, rn = (e, u, a) => {
655
- const v = fe(), D = Be(e), W = (B) => {
656
- u && (v.value = u(B || D));
657
- };
658
- return Ye(D) ? z(D, (B) => {
659
- W(B), a && a(B);
660
- }) : W(D), v;
661
- }, sn = () => {
662
- !U(l) || r || wt((e) => {
663
- In(g, l == null ? void 0 : l.id, f), $n(g, l == null ? void 0 : l.id, q.getOptions(l, $.relate), e), Le();
664
- }, { immediate: !0 });
665
- }, He = () => {
666
- const e = { propName: x.value };
667
- i(E, I.fieldValidation, e, _);
668
- }, Ke = () => {
669
- const e = { fieldId: l.id, fieldName: x.value, rules: Pe };
670
- i(E, I.fieldRuleChange, e, _);
671
- }, ie = () => {
672
- if (!U(l))
673
- return;
674
- const e = at();
675
- return Ke(), e;
676
- }, ke = () => {
677
- ct(), Ke();
678
- };
679
- return qt(), {
680
- exposed: tn(),
681
- fieldModel: S,
682
- objFieldModel: Tt,
683
- numFieldModel: Lt,
684
- fieldEditor: G,
685
- fieldKey: Ve,
686
- field: l,
687
- instance: _,
688
- attrs: Z,
689
- extendAttrs: Se,
690
- slots: De,
691
- events: A,
692
- rules: Pe,
693
- fieldObj: nn,
694
- pageConfig: N,
695
- formModel: h,
696
- fieldName: x,
697
- propResultOpt: f,
698
- optionItems: re,
699
- activeOptionItems: ht,
700
- activeOptionItem: pt,
701
- activeOptionItemIndex: Vt,
702
- filterOptionItems: lt,
703
- setOptionItems: Ot,
704
- getCheckedItems: he,
705
- getCheckedOptionItems: gt,
706
- getCheckedOptionLabels: dt,
707
- getCheckedOptionValues: vt,
708
- getCheckedOptionText: mt,
709
- refreshKey: Ae,
710
- watchKeyValue: rn,
711
- watchPropAndSaveHistoryStep: on,
712
- existEvent: $t,
713
- handleEvent: ue,
714
- handleEnter: en,
715
- getPropName: Nt,
716
- emitFieldDataChange: pe,
717
- syncUpdateFormModel: se,
718
- getWidgetRef: O.getWidgetRef,
719
- clearRules: ke,
720
- buildRules: ie,
721
- getFieldOptionModel: Be,
722
- getFieldOptions: ee,
723
- setFieldOptions: yt,
724
- getWidgetOption: de,
725
- singleOption: bt,
726
- watchOption: Rt,
727
- mergeOptionToFormModel: Te
728
- };
729
- }
730
- export {
731
- _e as R,
732
- ve as a,
733
- Yn as b,
734
- Fn as u
735
- };