hlrender 0.0.302 → 0.0.303
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.
- package/{_pdf-8b160eff.js → _pdf-ab53c386.js} +1 -1
- package/{_txt-f40ce403.js → _txt-ded1c3d3.js} +1 -1
- package/{affix-widget-8d4c1f96.js → affix-widget-90a2ac36.js} +9 -9
- package/{alert-widget-14e2a5a6.js → alert-widget-d5027aec.js} +9 -9
- package/{anchor-widget-efc7f60b.js → anchor-widget-28c209e7.js} +6 -6
- package/{auto-complete-widget-36a82676.js → auto-complete-widget-3eb52e24.js} +8 -8
- package/{avatar-widget-5965338a.js → avatar-widget-e1c65f44.js} +9 -9
- package/{backtop-widget-ac8f92bd.js → backtop-widget-e215ee0d.js} +9 -9
- package/{badge-widget-542ccbef.js → badge-widget-20ed34d6.js} +9 -9
- package/{barcode-widget-bd46e6ca.js → barcode-widget-76d0d856.js} +6 -6
- package/{baseCommonField-1576469d.js → baseCommonField-2d510d41.js} +87 -87
- package/{breadcrumb-widget-1e767dfe.js → breadcrumb-widget-ff5328c0.js} +6 -6
- package/{button-widget-2ef2fc9c.js → button-widget-e6c6f04c.js} +9 -9
- package/{cache-widget-886af07e.js → cache-widget-ba5c6eaa.js} +7 -7
- package/{card-widget-99ed3560.js → card-widget-db857756.js} +7 -7
- package/{carousel-widget-f16e7565.js → carousel-widget-2157cc88.js} +7 -7
- package/{cascader-widget-0ad522fd.js → cascader-widget-3672c794.js} +7 -7
- package/{chart-widget-2c310d33.js → chart-widget-ae41f575.js} +6 -6
- package/{checkbox-widget-2c8cd56b.js → checkbox-widget-9ed6421a.js} +7 -7
- package/{collapse-widget-5accfbbe.js → collapse-widget-791d5b04.js} +7 -7
- package/{color-picker-widget-8c360bd8.js → color-picker-widget-81c99d4d.js} +7 -7
- package/{cont-cell-widget-68c1f292.js → cont-cell-widget-47146f51.js} +1 -1
- package/{cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-0e2ba447.js → cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-0f7341e7.js} +4 -4
- package/{cont-widget-f45885b5.js → cont-widget-6b9ed1f6.js} +4 -4
- package/{content-wrapper-969b957e.js → content-wrapper-5faa21b8.js} +2 -2
- package/{content-wrapper.vue_vue_type_script_setup_true_lang-689164d8.js → content-wrapper.vue_vue_type_script_setup_true_lang-ee899514.js} +1 -1
- package/{countdown-widget-2f7bd978.js → countdown-widget-78f558d4.js} +9 -9
- package/{cssClass-cafeebc1.js → cssClass-a8cc4cb6.js} +1 -1
- package/{date-picker-range-widget-51f37d60.js → date-picker-range-widget-5b6004e0.js} +7 -7
- package/{date-picker-widget-6f138419.js → date-picker-widget-1e25c941.js} +7 -7
- package/{default-slot-widget-9aa17e5f.js → default-slot-widget-89e7a464.js} +7 -7
- package/{default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-fd27d4d2.js → default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-43a2d0e8.js} +4 -4
- package/{descriptions-widget-20483347.js → descriptions-widget-3291f0c4.js} +7 -7
- package/{dialog-widget-ca2795a7.js → dialog-widget-f1d8bb74.js} +8 -8
- package/{divider-widget-ad79081a.js → divider-widget-3a5e6e17.js} +9 -9
- package/{drag-wrapper-fb64e334.js → drag-wrapper-9dd8466e.js} +4 -4
- package/{drawer-widget-d28b0a5c.js → drawer-widget-de002ab4.js} +8 -8
- package/{dropdown-widget-dfd3f78d.js → dropdown-widget-590f8c81.js} +7 -7
- package/{empty-widget-efe843e2.js → empty-widget-1ceb93aa.js} +9 -9
- package/{feedback-widget-d8444997.js → feedback-widget-4472e7f7.js} +8 -8
- package/{feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-9e7988b9.js → feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-5d310069.js} +4 -4
- package/{file-upload-widget-c1254be5.js → file-upload-widget-13f6f77f.js} +11 -11
- package/{form-item-wrapper-0e8696a9.js → form-item-wrapper-dbd6b5e1.js} +3 -3
- package/{form-widget-d2ebab61.js → form-widget-7a1985c9.js} +6 -6
- package/{globalProvideInject-d7642328.js → globalProvideInject-9661e3d4.js} +1 -1
- package/{grid-col-widget-bb49348c.js → grid-col-widget-b1b9cdc5.js} +1 -1
- package/{grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-fcec55df.js → grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-d52db70d.js} +4 -4
- package/{grid-widget-d02b78ac.js → grid-widget-e769708c.js} +4 -4
- package/{hcard-widget-9e842ead.js → hcard-widget-2293e0cb.js} +7 -7
- package/{html-text-widget-fb156b68.js → html-text-widget-11a1526e.js} +7 -7
- package/{icon-widget-16132d4d.js → icon-widget-ab7cb290.js} +6 -6
- package/{iframe-widget-359b32ab.js → iframe-widget-18af460a.js} +6 -6
- package/{image-widget-7886b246.js → image-widget-f1e6355e.js} +6 -6
- package/{input-number-widget-6b5ad705.js → input-number-widget-53633406.js} +7 -7
- package/{input-tag-widget-4a1f2f91.js → input-tag-widget-0602a3e3.js} +8 -8
- package/{input-widget-70b53019.js → input-widget-c8bae683.js} +8 -8
- package/{link-widget-18918f81.js → link-widget-d036141f.js} +9 -9
- package/{ltable-col-widget-7ae1f486.js → ltable-col-widget-80d8fe46.js} +1 -1
- package/{ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-6e146945.js → ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-aea25f08.js} +6 -6
- package/{ltable-widget-3bffd1f7.js → ltable-widget-c92e85fa.js} +4 -4
- package/{mention-widget-4f0b7e46.js → mention-widget-bbf1a8ea.js} +8 -8
- package/{menu-widget-22dd7147.js → menu-widget-30ce2f9a.js} +7 -7
- package/{model-widget-58e2dcfe.js → model-widget-1a43498b.js} +6 -6
- package/{multirow-9367073f.js → multirow-0fc5f343.js} +80 -80
- package/{multirow-widget-8b5b90ec.js → multirow-widget-a8cb91bf.js} +7 -7
- package/package.json +1 -1
- package/{pagination-widget-462f89ed.js → pagination-widget-88dd46aa.js} +6 -6
- package/{picture-upload-widget-d00e1f75.js → picture-upload-widget-382b043f.js} +8 -8
- package/{progress-widget-aedf1ff5.js → progress-widget-507d122e.js} +7 -7
- package/{qrcode-widget-63e62477.js → qrcode-widget-8f311c5f.js} +6 -6
- package/{radio-widget-9afdc4da.js → radio-widget-c5982356.js} +7 -7
- package/{range-widget-585e8fef.js → range-widget-45c8ef85.js} +8 -8
- package/{rate-widget-9626709a.js → rate-widget-7097bfce.js} +7 -7
- package/render.es.js +25 -25
- package/render.umd.js +167 -167
- package/{result-widget-8f0e6d12.js → result-widget-e7fa9a2a.js} +7 -7
- package/{rich-editor-widget-ea50e6d4.js → rich-editor-widget-16ac7f02.js} +7 -7
- package/{router-widget-04cef16a.js → router-widget-af2201b3.js} +6 -6
- package/{segmented-widget-c93ab0eb.js → segmented-widget-c6a8e2e1.js} +6 -6
- package/{select-widget-4b3c1c88.js → select-widget-f5d2a0fe.js} +7 -7
- package/{sfc-55fda8b7.js → sfc-fc88007c.js} +3 -3
- package/{sfcview-36ffb71a.js → sfcview-62e49d95.js} +2 -2
- package/share-field-6e46a867.js +844 -0
- package/{share-file-4414c163.js → share-file-77e40498.js} +2 -2
- package/{skeleton-widget-7f07b172.js → skeleton-widget-952c8c46.js} +9 -9
- package/{skeletonItem-widget-682c51c4.js → skeletonItem-widget-8046f0e4.js} +6 -6
- package/{slider-widget-831746be.js → slider-widget-3c5ba4e4.js} +7 -7
- package/{slot-ac364a94.js → slot-ded79710.js} +1 -1
- package/{space-widget-b9cccac6.js → space-widget-22d49dec.js} +7 -7
- package/{splitter-widget-f2520985.js → splitter-widget-57cd8e9a.js} +7 -7
- package/{static-text-widget-c0108a84.js → static-text-widget-7cfd34ae.js} +7 -7
- package/{statistic-widget-21b0a144.js → statistic-widget-142d400d.js} +9 -9
- package/{steps-widget-99347f03.js → steps-widget-fddfc363.js} +6 -6
- package/{subMenu-widget-e12ca03b.js → subMenu-widget-ff427185.js} +2 -2
- package/{subMenu-widget.vue_vue_type_script_setup_true_lang-570cfc6e.js → subMenu-widget.vue_vue_type_script_setup_true_lang-d38e587d.js} +1 -1
- package/{switch-widget-224711c3.js → switch-widget-5cfcf827.js} +7 -7
- package/{tab-pane-widget-04c0ff7c.js → tab-pane-widget-1e501adc.js} +1 -1
- package/{tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-1d559f10.js → tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-7b997bcf.js} +4 -4
- package/{table-col-widget-c62114ce.js → table-col-widget-11c43be3.js} +6 -6
- package/{table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-96095379.js → table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-c279d855.js} +34 -34
- package/{table-widget-676ab2b2.js → table-widget-15958cbe.js} +116 -112
- package/{tabs-widget-050e0104.js → tabs-widget-4323776f.js} +5 -5
- package/{tag-widget-a093712f.js → tag-widget-be32096d.js} +9 -9
- package/{text-widget-32ca6fd2.js → text-widget-ee9e57e2.js} +9 -9
- package/{textarea-widget-100a3642.js → textarea-widget-e3ae2a63.js} +7 -7
- package/{time-picker-range-widget-8d2da050.js → time-picker-range-widget-a0a1ebce.js} +7 -7
- package/{time-picker-widget-b541e3dd.js → time-picker-widget-983c7b8e.js} +7 -7
- package/{time-select-widget-6b8e4115.js → time-select-widget-7ea8c5b9.js} +7 -7
- package/{timeline-widget-d26525e7.js → timeline-widget-e0d3b465.js} +7 -7
- package/{tmpl-widget-e935a205.js → tmpl-widget-60f125b0.js} +7 -7
- package/{tooltip-widget-9c8bbfdc.js → tooltip-widget-63ca2c21.js} +7 -7
- package/{tour-widget-99cfeabc.js → tour-widget-e7ca5ce6.js} +6 -6
- package/{transfer-widget-5ccf7e5d.js → transfer-widget-a8ee42bb.js} +8 -8
- package/{tree-select-widget-4d9e0970.js → tree-select-widget-8332163f.js} +7 -7
- package/{tree-widget-921f1b7e.js → tree-widget-e0a9878f.js} +6 -6
- package/{verifycode-widget-41007731.js → verifycode-widget-b27e9e2c.js} +6 -6
- package/{widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-344b382a.js → widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-0c096335.js} +2 -2
- package/{wrapper-widget-2e85dde7.js → wrapper-widget-24369b59.js} +5 -5
- package/share-field-2a80093b.js +0 -851
|
@@ -0,0 +1,844 @@
|
|
|
1
|
+
var An = Object.defineProperty;
|
|
2
|
+
var kn = (s, c, g) => c in s ? An(s, c, { enumerable: !0, configurable: !0, writable: !0, value: g }) : s[c] = g;
|
|
3
|
+
var it = (s, c, g) => (kn(s, typeof c != "symbol" ? c + "" : c, g), g);
|
|
4
|
+
import { onMounted as ht, nextTick as pt, onActivated as $n, onErrorCaptured as Kn, toRaw as gt, isRef as Ot, watch as oe, reactive as Oe, inject as Ie, computed as Ce, unref as je, ref as Ve, onBeforeUnmount as Hn, toRefs as qn } from "vue";
|
|
5
|
+
import { l as se, c as Ct, t as Vt, i as yt, o as re, x as Et, g as J, C as Gn, h as Ke, f as Rt, k as Un, y as U, H as Jn, d as w, G as ft, u as Ae, a as lt, n as zn, A as ye } from "./index-5d5e7eda.js";
|
|
6
|
+
import { p as Me, g as Qn, f as Ee, b as Xn, a as Yn } from "./multirow-0fc5f343.js";
|
|
7
|
+
import { u as bt, W as z, C as Zn } from "./icon-8f3b4dab.js";
|
|
8
|
+
import { a as q, v as be, x as wn, y as eo, g as L, d as ke, z as mt, w as to, f as dt } from "./expression-153fa22a.js";
|
|
9
|
+
import { P as xe, m as no, B as We, k as He, n as oo, W as ee, a as vt, h as so, c as ro, i as ao } from "./baseCommonField-2d510d41.js";
|
|
10
|
+
import { F as uo, c as co, h as $e } from "./globalProvideInject-9661e3d4.js";
|
|
11
|
+
import { b as io, a as fo } from "./slot-ded79710.js";
|
|
12
|
+
function lo() {
|
|
13
|
+
return {
|
|
14
|
+
onMountedOrActivated: (g) => {
|
|
15
|
+
let y = !1;
|
|
16
|
+
ht(() => {
|
|
17
|
+
g(), pt(() => {
|
|
18
|
+
y = !0;
|
|
19
|
+
});
|
|
20
|
+
}), $n(() => {
|
|
21
|
+
y && g();
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
onCompErrorCaptured: () => {
|
|
25
|
+
Kn((g) => (se.error("onCompErrorCaptured", g), !1));
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
class qe {
|
|
30
|
+
constructor(c) {
|
|
31
|
+
it(this, "refList", {});
|
|
32
|
+
c && (this.refList = c);
|
|
33
|
+
}
|
|
34
|
+
initRefList() {
|
|
35
|
+
this.refList || (this.refList = {});
|
|
36
|
+
}
|
|
37
|
+
getWidgetRef(c) {
|
|
38
|
+
if (c)
|
|
39
|
+
return this.initRefList(), this.refList[c];
|
|
40
|
+
}
|
|
41
|
+
setWidgetRef(c, g) {
|
|
42
|
+
c && (this.initRefList(), this.refList[c] = g);
|
|
43
|
+
}
|
|
44
|
+
removeWidgetRef(c) {
|
|
45
|
+
c && this.refList && delete this.refList[c.toString()];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function Se(s) {
|
|
49
|
+
s || (s = {});
|
|
50
|
+
const c = new qe(s), { instance: g } = bt(), y = (d) => c.getWidgetRef(d == null ? void 0 : d.toString()), D = (d, W, O) => {
|
|
51
|
+
var C = [], V = [];
|
|
52
|
+
let F = y(d);
|
|
53
|
+
return F && C.push(F), C == null || C.forEach((r) => {
|
|
54
|
+
var h = M(r, W, O);
|
|
55
|
+
h && V.push(h);
|
|
56
|
+
}), V;
|
|
57
|
+
}, u = (d, W) => {
|
|
58
|
+
var O;
|
|
59
|
+
return (O = d == null ? void 0 : d.exposed) == null ? void 0 : O[W.toString()];
|
|
60
|
+
}, M = (d, W, O) => {
|
|
61
|
+
var C = u(d, W);
|
|
62
|
+
if (C) {
|
|
63
|
+
var V = [];
|
|
64
|
+
return O && (V = Object.values(O)), C(...V);
|
|
65
|
+
}
|
|
66
|
+
}, B = (d, W, O) => {
|
|
67
|
+
var C = [];
|
|
68
|
+
if (d) {
|
|
69
|
+
var V = Ct(Vt(d, !0));
|
|
70
|
+
V == null || V.forEach((F) => {
|
|
71
|
+
var r = D(F, W, O);
|
|
72
|
+
yt(r) || C.push(r);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return Array.isArray(d) ? C : C == null ? void 0 : C[0];
|
|
76
|
+
}, x = (d, W) => {
|
|
77
|
+
let O = re(s);
|
|
78
|
+
B(O, d, W);
|
|
79
|
+
}, A = (d, W) => {
|
|
80
|
+
var h, o, a, f;
|
|
81
|
+
const O = (a = (o = (h = W || g) == null ? void 0 : h.exposed) == null ? void 0 : o.getField) == null ? void 0 : a.call(o);
|
|
82
|
+
var C = Me(O == null ? void 0 : O.id);
|
|
83
|
+
const V = (l) => (l == null ? void 0 : l.id) === d, F = (l) => {
|
|
84
|
+
var N;
|
|
85
|
+
var m = Me(l == null ? void 0 : l.id);
|
|
86
|
+
return (C == null ? void 0 : C.groupName) === (m == null ? void 0 : m.groupName) && ((m == null ? void 0 : m.id) === d || ((N = l == null ? void 0 : l._source) == null ? void 0 : N.id) === d);
|
|
87
|
+
}, r = (f = re(c.refList)) == null ? void 0 : f.find((l) => {
|
|
88
|
+
var N, E, K;
|
|
89
|
+
try {
|
|
90
|
+
const $ = (K = (E = (N = c.refList[l]) == null ? void 0 : N.exposed) == null ? void 0 : E.getField) == null ? void 0 : K.call(E);
|
|
91
|
+
var m = V($);
|
|
92
|
+
return !m && (C != null && C.groupName) && (m = F($)), m;
|
|
93
|
+
} catch {
|
|
94
|
+
return !1;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
if (r)
|
|
98
|
+
return y(r);
|
|
99
|
+
}, v = (d) => {
|
|
100
|
+
if (d) {
|
|
101
|
+
let W = d;
|
|
102
|
+
c == null || c.setWidgetRef(W, g);
|
|
103
|
+
}
|
|
104
|
+
}, p = (d) => {
|
|
105
|
+
if (d) {
|
|
106
|
+
let W = d;
|
|
107
|
+
c == null || c.removeWidgetRef(W);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
return {
|
|
111
|
+
findWidgetAndCall: D,
|
|
112
|
+
getWidgetRef: y,
|
|
113
|
+
callWidgetsExposed: B,
|
|
114
|
+
callRefFunc: M,
|
|
115
|
+
existRefFunc: u,
|
|
116
|
+
setAllRefList: x,
|
|
117
|
+
findRefById: A,
|
|
118
|
+
findRefByName: y,
|
|
119
|
+
changeRegisterToRefList: (d, W) => {
|
|
120
|
+
d && (v(d), p(W));
|
|
121
|
+
},
|
|
122
|
+
registerToRefList: v,
|
|
123
|
+
unregisterFromRefList: p
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
const mo = (s, c, g, y, D) => {
|
|
127
|
+
const u = new qe(s), { callRefFunc: M } = Se(s), { parseGroupId: B } = Xn();
|
|
128
|
+
if (!s || s.length <= 0 || !g)
|
|
129
|
+
return;
|
|
130
|
+
const x = c, A = (r) => {
|
|
131
|
+
const h = x == null ? void 0 : x.find((f) => (f == null ? void 0 : f.id) === r);
|
|
132
|
+
if (!h)
|
|
133
|
+
return;
|
|
134
|
+
const o = h == null ? void 0 : h.name, a = u.getWidgetRef(o);
|
|
135
|
+
if (a)
|
|
136
|
+
return { ref: a, name: o, id: h == null ? void 0 : h.id };
|
|
137
|
+
}, v = (r, h) => {
|
|
138
|
+
var f;
|
|
139
|
+
if (!J(h))
|
|
140
|
+
return;
|
|
141
|
+
const o = r == null ? void 0 : r.name, a = u.getWidgetRef(o);
|
|
142
|
+
if (a) {
|
|
143
|
+
const l = xe.getValue((f = r == null ? void 0 : r.options) == null ? void 0 : f.defaultValue, !1, !Et(y == null ? void 0 : y.designState), { ...y, formData: h });
|
|
144
|
+
if (J(l))
|
|
145
|
+
if (Ot(l)) {
|
|
146
|
+
let m = oe(() => l.value, (N) => {
|
|
147
|
+
m == null || m(), M(a, z.setValue, { newValue: N });
|
|
148
|
+
});
|
|
149
|
+
} else
|
|
150
|
+
M(a, z.setValue, { newValue: l });
|
|
151
|
+
}
|
|
152
|
+
}, p = (r, h) => {
|
|
153
|
+
const o = A(r);
|
|
154
|
+
if (!o)
|
|
155
|
+
return;
|
|
156
|
+
const a = o.name, f = M(o.ref, z.getValue), l = M(o.ref, z.getCheckedItems), m = {};
|
|
157
|
+
return m[a] = f, f !== void 0 && !Un(l) && !h && (m[`${a}${be.checkedOptions}`] = l), m;
|
|
158
|
+
}, P = (r, h) => {
|
|
159
|
+
var o = [];
|
|
160
|
+
if (x == null || x.forEach((a) => {
|
|
161
|
+
if (!a)
|
|
162
|
+
return;
|
|
163
|
+
const f = a == null ? void 0 : a.id;
|
|
164
|
+
var l = f === r;
|
|
165
|
+
const m = B(f), N = (m == null ? void 0 : m.id) === r, E = (m == null ? void 0 : m.groupName) === h;
|
|
166
|
+
return l || N && (E || !h) ? (o.push(a), !0) : !1;
|
|
167
|
+
}), !(!o || o.length <= 0))
|
|
168
|
+
return o == null ? void 0 : o.map((a) => {
|
|
169
|
+
var f;
|
|
170
|
+
return {
|
|
171
|
+
id: a == null ? void 0 : a.id,
|
|
172
|
+
name: (f = a == null ? void 0 : a._source) == null ? void 0 : f.name,
|
|
173
|
+
source: a == null ? void 0 : a._source
|
|
174
|
+
};
|
|
175
|
+
});
|
|
176
|
+
}, d = (r, h) => {
|
|
177
|
+
var o = [];
|
|
178
|
+
if (!r || (r == null ? void 0 : r.length) <= 0)
|
|
179
|
+
return o;
|
|
180
|
+
const a = B(g), f = a == null ? void 0 : a.groupName;
|
|
181
|
+
return h === Ee.Inner2Outer ? r == null || r.forEach((l) => {
|
|
182
|
+
var m = P(l);
|
|
183
|
+
m && (m == null ? void 0 : m.length) > 0 && o.push(...m);
|
|
184
|
+
}) : r == null || r.forEach((l) => {
|
|
185
|
+
var m = P(l, f);
|
|
186
|
+
m && (m == null ? void 0 : m.length) > 0 && o.push(...m);
|
|
187
|
+
}), o;
|
|
188
|
+
}, W = (r, h) => {
|
|
189
|
+
let o = {};
|
|
190
|
+
if (!r || r.length <= 0)
|
|
191
|
+
return o;
|
|
192
|
+
if (h === Ee.Inner2Outer) {
|
|
193
|
+
var a = no(r, (f) => {
|
|
194
|
+
var l;
|
|
195
|
+
return (l = f.source) == null ? void 0 : l.id;
|
|
196
|
+
});
|
|
197
|
+
a == null || a.forEach((f) => {
|
|
198
|
+
var N;
|
|
199
|
+
const l = f.group[0], m = [];
|
|
200
|
+
(N = f == null ? void 0 : f.children) == null || N.forEach((E) => {
|
|
201
|
+
const K = p(E == null ? void 0 : E.id, !0);
|
|
202
|
+
if (J(K)) {
|
|
203
|
+
var $ = Object.values(Ct(K));
|
|
204
|
+
m.push(...$);
|
|
205
|
+
}
|
|
206
|
+
}), l && (o = Object.assign(o, { [l]: m }));
|
|
207
|
+
});
|
|
208
|
+
} else
|
|
209
|
+
r.forEach((f) => {
|
|
210
|
+
const l = p(f == null ? void 0 : f.id);
|
|
211
|
+
J(l) && (o = Object.assign(o, l));
|
|
212
|
+
});
|
|
213
|
+
return o;
|
|
214
|
+
}, O = (r) => {
|
|
215
|
+
var h = {};
|
|
216
|
+
return r == null || r.forEach((o) => {
|
|
217
|
+
var a;
|
|
218
|
+
o != null && o.source && (o != null && o.id) && (h[(a = o == null ? void 0 : o.source) == null ? void 0 : a.id] = o == null ? void 0 : o.id);
|
|
219
|
+
}), h;
|
|
220
|
+
}, C = (r, h, o) => {
|
|
221
|
+
if (o === Ee.Inner2Inner) {
|
|
222
|
+
const m = Gn(h), { updateFomula: N } = He(), { buildVariable: E } = oo();
|
|
223
|
+
var a = O(r);
|
|
224
|
+
if (J(a)) {
|
|
225
|
+
var f = We.getOrgOption(h, q.defaultValue), l = N(Ke(f), a, (K, $) => {
|
|
226
|
+
var ae = a[K];
|
|
227
|
+
return yt(ae) ? E(K) : E(ae);
|
|
228
|
+
});
|
|
229
|
+
return We.setOrgOption(m, q.defaultValue, Rt(l)), m;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return h;
|
|
233
|
+
}, V = (r) => {
|
|
234
|
+
var N;
|
|
235
|
+
const h = r == null ? void 0 : r.id;
|
|
236
|
+
var o = (N = r == null ? void 0 : r.options) == null ? void 0 : N.defaultValue;
|
|
237
|
+
if (o == null)
|
|
238
|
+
return;
|
|
239
|
+
const a = Qn(g, h);
|
|
240
|
+
if (a === Ee.DiffInner)
|
|
241
|
+
return;
|
|
242
|
+
var f = xe.getFormulaRelatedField(o);
|
|
243
|
+
if (!f || f.length <= 0)
|
|
244
|
+
return;
|
|
245
|
+
var l = d(f, a);
|
|
246
|
+
if (!(l != null && l.some((E) => E.id === g)))
|
|
247
|
+
return;
|
|
248
|
+
const m = W(l, a);
|
|
249
|
+
v(C(l, r, a), m);
|
|
250
|
+
};
|
|
251
|
+
(() => {
|
|
252
|
+
x == null || x.forEach((r) => {
|
|
253
|
+
V(r);
|
|
254
|
+
});
|
|
255
|
+
})();
|
|
256
|
+
}, vo = (s, c, g, y, D, u) => {
|
|
257
|
+
var O;
|
|
258
|
+
if (Et(u))
|
|
259
|
+
return;
|
|
260
|
+
const M = gt(y);
|
|
261
|
+
if (!J(M))
|
|
262
|
+
return;
|
|
263
|
+
const B = Vt(D == null ? void 0 : D.newValue, !0), x = new Set(B), A = (O = re(M)) == null ? void 0 : O.filter((C) => x == null ? void 0 : x.has(C));
|
|
264
|
+
if (!A || A.length <= 0)
|
|
265
|
+
return;
|
|
266
|
+
const { callRefFunc: v } = Se(s);
|
|
267
|
+
var p = Me(g), P = p == null ? void 0 : p.groupName;
|
|
268
|
+
const d = c, W = (C, V) => {
|
|
269
|
+
const F = d == null ? void 0 : d.find((a) => {
|
|
270
|
+
if ((a == null ? void 0 : a.id) === C)
|
|
271
|
+
return !0;
|
|
272
|
+
var f = Me(a == null ? void 0 : a.id);
|
|
273
|
+
return (!P || (f == null ? void 0 : f.groupName) === P) && (f == null ? void 0 : f.id) === C;
|
|
274
|
+
});
|
|
275
|
+
if (!F)
|
|
276
|
+
return;
|
|
277
|
+
const r = F == null ? void 0 : F.name, o = new qe(s).getWidgetRef(r);
|
|
278
|
+
o && (V == null || V(o));
|
|
279
|
+
};
|
|
280
|
+
A == null || A.forEach((C) => {
|
|
281
|
+
var F, r;
|
|
282
|
+
const V = (F = M == null ? void 0 : M[C]) == null ? void 0 : F.result;
|
|
283
|
+
(r = re(V)) == null || r.forEach((h) => {
|
|
284
|
+
var a;
|
|
285
|
+
const o = V == null ? void 0 : V[h];
|
|
286
|
+
(a = o == null ? void 0 : o.ids) == null || a.forEach((f) => {
|
|
287
|
+
W(f, (l) => {
|
|
288
|
+
v(l, o == null ? void 0 : o.event, o == null ? void 0 : o.args);
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
};
|
|
294
|
+
function Mt(s, c) {
|
|
295
|
+
var g;
|
|
296
|
+
return (g = s == null ? void 0 : s.classList) != null && g.contains(c) ? s : s != null && s.parentElement ? Mt(s == null ? void 0 : s.parentElement, c) : null;
|
|
297
|
+
}
|
|
298
|
+
function ho() {
|
|
299
|
+
const s = (v) => {
|
|
300
|
+
if (v)
|
|
301
|
+
return v != null && v.ref ? v == null ? void 0 : v.ref : v;
|
|
302
|
+
}, c = (v) => {
|
|
303
|
+
var p, P;
|
|
304
|
+
try {
|
|
305
|
+
(P = (p = s(v)) == null ? void 0 : p.focus) == null || P.call(p);
|
|
306
|
+
} catch (d) {
|
|
307
|
+
se.error("focus", d, v);
|
|
308
|
+
}
|
|
309
|
+
}, g = (v) => {
|
|
310
|
+
var p, P;
|
|
311
|
+
try {
|
|
312
|
+
(P = (p = s(v)) == null ? void 0 : p.blur) == null || P.call(p);
|
|
313
|
+
} catch (d) {
|
|
314
|
+
se.error("blur", d, v);
|
|
315
|
+
}
|
|
316
|
+
}, y = (v) => {
|
|
317
|
+
var p;
|
|
318
|
+
return (p = s(v)) == null ? void 0 : p.selectionStart;
|
|
319
|
+
}, D = (v) => {
|
|
320
|
+
var p;
|
|
321
|
+
return (p = s(v)) == null ? void 0 : p.selectionEnd;
|
|
322
|
+
}, u = (v, p) => {
|
|
323
|
+
var P;
|
|
324
|
+
return (P = s(v)) == null ? void 0 : P.setSelectionRange(p, p);
|
|
325
|
+
}, M = (v, p) => {
|
|
326
|
+
c(v), u(v, p);
|
|
327
|
+
};
|
|
328
|
+
return {
|
|
329
|
+
getSelectionStart: y,
|
|
330
|
+
getSelectionEnd: D,
|
|
331
|
+
setSelectionStart: u,
|
|
332
|
+
blur: g,
|
|
333
|
+
focus: c,
|
|
334
|
+
setMousePos: M,
|
|
335
|
+
getMousePos: (v) => y(v),
|
|
336
|
+
insertOnMousePos: (v, p, P) => {
|
|
337
|
+
const d = y(v), W = D(v), O = wn(P, p, d, W);
|
|
338
|
+
return pt(() => {
|
|
339
|
+
M(v, d + (p == null ? void 0 : p.length));
|
|
340
|
+
}), O;
|
|
341
|
+
},
|
|
342
|
+
deleteOnMousePos: (v, p) => eo(p, v)
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
const po = (s) => {
|
|
346
|
+
var g;
|
|
347
|
+
const { getFormulaFields: c } = He();
|
|
348
|
+
return ((g = c(Ke(s))) == null ? void 0 : g.length) > 0;
|
|
349
|
+
}, Z = (s) => {
|
|
350
|
+
const c = s.type;
|
|
351
|
+
//![WidgetType.fileUpload, WidgetType.pictureUpload].includes(wtype) &&
|
|
352
|
+
return s.formItemFlag || [ee.form, ee.dialog].includes(c);
|
|
353
|
+
}, Re = (s) => {
|
|
354
|
+
const c = s.type;
|
|
355
|
+
return [ee.treeSelect, ee.cascader, ee.select, ee.checkbox, ee.radio].includes(c);
|
|
356
|
+
};
|
|
357
|
+
function go(s) {
|
|
358
|
+
const { getFormulaFields: c } = He(), g = U(s == null ? void 0 : s.options), y = Jn(g, (u, M) => xe.isComplexType(M, Zn.slot) || u === L.widgetList);
|
|
359
|
+
var D = c(Ke(y));
|
|
360
|
+
return D;
|
|
361
|
+
}
|
|
362
|
+
function Oo(s, c, g) {
|
|
363
|
+
var M;
|
|
364
|
+
const y = {};
|
|
365
|
+
let D = [];
|
|
366
|
+
if (!s || s.length <= 0)
|
|
367
|
+
return y;
|
|
368
|
+
Object.entries(g).forEach(([B, x]) => {
|
|
369
|
+
s.some((A) => A === (x == null ? void 0 : x.id)) && D.push(x == null ? void 0 : x.name);
|
|
370
|
+
});
|
|
371
|
+
const u = U(c);
|
|
372
|
+
return (M = re(u)) == null || M.forEach((B) => {
|
|
373
|
+
D.includes(B) && w(y, { [B]: u[B] });
|
|
374
|
+
}), J(y) ? y : {};
|
|
375
|
+
}
|
|
376
|
+
function So(s) {
|
|
377
|
+
const {
|
|
378
|
+
designState: c,
|
|
379
|
+
created: g = !0,
|
|
380
|
+
exResetField: y,
|
|
381
|
+
extInitFieldModel: D
|
|
382
|
+
} = s, u = s == null ? void 0 : s.widget, M = s == null ? void 0 : s.designer, B = M == null ? void 0 : M.pageConfig, { globalWrapperOptions: x, formRefList: A, globalRefList: v, globalConfig: p, globalFormName: P, globalDataModel: d, rowScope: W } = uo.globalInject(), O = Se(v), C = Se(A);
|
|
383
|
+
let V = Oe(d || {}), F = Oe(Ie(ke.linerModel, {})), r = Oe(Ie(ke.linerWidgetMap, []));
|
|
384
|
+
const h = Oe({}), { instance: o } = bt(), a = () => gt(V), f = () => W, l = () => u, m = () => !c && po(u);
|
|
385
|
+
if (m()) {
|
|
386
|
+
const e = go(u);
|
|
387
|
+
J(e) && oe(F, (t) => {
|
|
388
|
+
const n = Oo(e, t, r);
|
|
389
|
+
ft(U(n), U(h)) || w(h, n);
|
|
390
|
+
}, { immediate: !0 });
|
|
391
|
+
}
|
|
392
|
+
const E = vt({
|
|
393
|
+
instance: o,
|
|
394
|
+
designState: c,
|
|
395
|
+
pageConfig: B,
|
|
396
|
+
globalConfig: p
|
|
397
|
+
}), $ = {
|
|
398
|
+
instance: {
|
|
399
|
+
exposed: {
|
|
400
|
+
findRefByName: O.getWidgetRef,
|
|
401
|
+
fieldEditor: () => G.value,
|
|
402
|
+
getField: l,
|
|
403
|
+
getRowScope: f,
|
|
404
|
+
getFormData: a,
|
|
405
|
+
/**
|
|
406
|
+
* 此处暴露schemadata方法
|
|
407
|
+
* 为实现全局变量中能访问到全局数据源ctx.instance.exposed.getOneSchemaData等数据源求值方法
|
|
408
|
+
*/
|
|
409
|
+
getOneSchemaData: E == null ? void 0 : E.getOneSchemaData,
|
|
410
|
+
getSchemaDataObject: E == null ? void 0 : E.getSchemaDataObject,
|
|
411
|
+
getSchemaDatas: E == null ? void 0 : E.getSchemaDatas,
|
|
412
|
+
getGlobalParams: E == null ? void 0 : E.getGlobalParams
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
designState: c,
|
|
416
|
+
pageConfig: B,
|
|
417
|
+
formData: m() ? h : {},
|
|
418
|
+
globalConfig: p
|
|
419
|
+
}, { on$: ae, dispatch: _e, emit$: Ge, broadcast: xt } = Yn(), { onCompErrorCaptured: Wt } = lo(), { isIdClass: St, getIdByIdClass: _t } = co(u), { getOneSchemaData: Pt, getSchemaDataObject: Dt, getSchemaDatas: Tt, getGlobalParams: Ft } = vt($), te = ho(), Nt = (s == null ? void 0 : s.shareProp) || { s_attr: !0, s_extendAttr: !0, s_events: !0, s_slots: !0, s_fieldName: !0, s_optionItems: !0 }, { attrs: ne, extendAttrs: Pe, events: H, slots: Ue, rules: Je, fieldName: R, buildRules: Lt, clearRules: Bt, disableChangeValidate: It, enableChangeValidate: jt, optionItems: de, refreshOptionItems: At, filterOptionItems: kt, getCheckedOptionText: $t, getCheckedOptionValues: Kt, getCheckedOptionLabels: Ht, getCheckedOptionItems: qt, activeOptionItems: Gt, activeOptionItem: Ut, activeOptionItemIndex: Jt, setOptionItems: ze, isOptionWidget: zt, setWidgetOption: ue, getWidgetOption: ce, getWidgetOptionByPropValue: Qt, setFieldEnable: Xt, hasFieldOptions: Yt, getFieldOptions: ie, setFieldOptions: Zt, computedDefaultValue: ve, hasDefaultValue: he, watchOption: Qe, addCssClass: wt, removeCssClass: en } = so(u, $, Nt, o), Xe = Ce(() => {
|
|
420
|
+
var n, i;
|
|
421
|
+
const e = je(x);
|
|
422
|
+
if (!J(e))
|
|
423
|
+
return ne.value;
|
|
424
|
+
const t = {};
|
|
425
|
+
return Ae(ne.value, L.disabled) && (t[L.disabled] = je(e == null ? void 0 : e.disabled) || ((n = ne.value) == null ? void 0 : n.disabled)), Ae(ne.value, L.readonly) && (t[L.readonly] = je(e == null ? void 0 : e.readonly) || ((i = ne.value) == null ? void 0 : i.readonly)), {
|
|
426
|
+
...ne.value,
|
|
427
|
+
...t
|
|
428
|
+
};
|
|
429
|
+
});
|
|
430
|
+
let De = null, S = Ve();
|
|
431
|
+
const G = Ve(), tn = () => R.value, nn = () => G.value, Ye = () => `${u == null ? void 0 : u.id}-${ro()}`, Te = Ve(Ye()), Ze = () => {
|
|
432
|
+
Te.value = Ye();
|
|
433
|
+
}, on = Ce({
|
|
434
|
+
get: () => {
|
|
435
|
+
if (lt(S.value)) {
|
|
436
|
+
var e = Number(S.value);
|
|
437
|
+
return isNaN(e) ? void 0 : (S.value = e, e);
|
|
438
|
+
}
|
|
439
|
+
return S.value;
|
|
440
|
+
},
|
|
441
|
+
set: (e) => {
|
|
442
|
+
S.value = e;
|
|
443
|
+
}
|
|
444
|
+
}), sn = Ce({
|
|
445
|
+
get: () => {
|
|
446
|
+
if (lt(S.value)) {
|
|
447
|
+
var e = Rt(S.value);
|
|
448
|
+
zn(e) && (S.value = e);
|
|
449
|
+
}
|
|
450
|
+
return S.value;
|
|
451
|
+
},
|
|
452
|
+
set: (e) => {
|
|
453
|
+
S.value = e;
|
|
454
|
+
}
|
|
455
|
+
}), rn = (e) => {
|
|
456
|
+
var n, i;
|
|
457
|
+
var t = (i = (n = O.getWidgetRef(R.value)) == null ? void 0 : n.exposed) == null ? void 0 : i.loadOptionItems;
|
|
458
|
+
if (t !== void 0) {
|
|
459
|
+
t == null || t(e);
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
ze(e);
|
|
463
|
+
}, Fe = (e) => {
|
|
464
|
+
var t, n, i;
|
|
465
|
+
return (i = (n = (t = O.getWidgetRef(R.value)) == null ? void 0 : t.exposed) == null ? void 0 : n.getCheckedItems) == null ? void 0 : i.call(n, e);
|
|
466
|
+
}, we = (e) => {
|
|
467
|
+
var t, n, i;
|
|
468
|
+
return (i = (n = (t = O.getWidgetRef(R.value)) == null ? void 0 : t.exposed) == null ? void 0 : n.getCheckedLabels) == null ? void 0 : i.call(n, e);
|
|
469
|
+
}, an = (e) => {
|
|
470
|
+
var t, n, i;
|
|
471
|
+
return (i = (n = (t = O.getWidgetRef(R.value)) == null ? void 0 : t.exposed) == null ? void 0 : n.getCheckedText) == null ? void 0 : i.call(n, e);
|
|
472
|
+
}, fe = (e) => {
|
|
473
|
+
var T;
|
|
474
|
+
if (!zt())
|
|
475
|
+
return;
|
|
476
|
+
const t = (T = Pe.value) == null ? void 0 : T.withAttachData;
|
|
477
|
+
if (!Re(u) || t === !1)
|
|
478
|
+
return;
|
|
479
|
+
const n = we(e), i = an(e);
|
|
480
|
+
var _ = U(Fe(e));
|
|
481
|
+
et(n, _, i);
|
|
482
|
+
}, et = (e, t, n) => {
|
|
483
|
+
var j, k;
|
|
484
|
+
var i = {};
|
|
485
|
+
let _ = ie("textName");
|
|
486
|
+
(j = [`${R.value}${be.optionText}`, _].filter((b) => !!b)) == null || j.forEach((b) => {
|
|
487
|
+
b && (e !== void 0 ? i[b] === void 0 && (i[b] = e || null) : delete V[b]);
|
|
488
|
+
});
|
|
489
|
+
let T = ie("optionName");
|
|
490
|
+
(k = [`${R.value}${be.checkedOptions}`, T].filter((b) => !!b)) == null || k.forEach((b) => {
|
|
491
|
+
b && (t !== void 0 ? i[b] === void 0 && (i[b] = t || []) : delete V[b]);
|
|
492
|
+
});
|
|
493
|
+
let I = ie("labelName");
|
|
494
|
+
e !== n && [`${R.value}${be.optionLabelName}`].forEach((b) => {
|
|
495
|
+
b && (n !== void 0 ? i[b] === void 0 && (i[b] = n) : delete V[b]);
|
|
496
|
+
}), I && [I].forEach((b) => {
|
|
497
|
+
b && (n !== void 0 ? i[b] === void 0 && (i[b] = n) : delete V[b]);
|
|
498
|
+
}), tt(U(i));
|
|
499
|
+
}, X = (e) => {
|
|
500
|
+
if (Z(u)) {
|
|
501
|
+
fe(e);
|
|
502
|
+
var t = { [R.value]: e };
|
|
503
|
+
tt(t);
|
|
504
|
+
}
|
|
505
|
+
}, tt = (e) => {
|
|
506
|
+
w(V, e);
|
|
507
|
+
}, le = (e) => {
|
|
508
|
+
c || X(e);
|
|
509
|
+
}, nt = (e) => ie(e), ot = () => {
|
|
510
|
+
var e = qn(V);
|
|
511
|
+
S = xe.get(e, R.value);
|
|
512
|
+
}, st = (e) => {
|
|
513
|
+
De = U(e);
|
|
514
|
+
}, un = (e) => {
|
|
515
|
+
c || D && D(e);
|
|
516
|
+
}, cn = () => {
|
|
517
|
+
he(!0) && ye(ve()).then((e) => {
|
|
518
|
+
X(e), ot();
|
|
519
|
+
});
|
|
520
|
+
};
|
|
521
|
+
let rt = {};
|
|
522
|
+
const pe = (e, t) => {
|
|
523
|
+
if (!Z(u))
|
|
524
|
+
return;
|
|
525
|
+
var n = { newValue: e, oldValue: t };
|
|
526
|
+
if (ft(n, rt))
|
|
527
|
+
return;
|
|
528
|
+
w(F, { [R.value]: e }), Object.assign(rt, n), Ge(q.fieldValueChanged, n);
|
|
529
|
+
const i = { fieldId: u.id, fieldName: R.value, newValue: e, oldValue: t };
|
|
530
|
+
_e(P, q.fieldChange, i, o);
|
|
531
|
+
}, fn = (e) => !!ce(e), Ne = (e, t) => ao(ce(e), t), ln = (e) => {
|
|
532
|
+
le(e), at(), Ne(q.onInput, { value: e });
|
|
533
|
+
}, mn = (e, t) => {
|
|
534
|
+
var n, i, _;
|
|
535
|
+
return (_ = (i = (n = O.getWidgetRef(R.value)) == null ? void 0 : n.exposed) == null ? void 0 : i.handleBeforeChange) == null ? void 0 : _.call(i, e, t);
|
|
536
|
+
}, dn = (...e) => {
|
|
537
|
+
var _, T, I;
|
|
538
|
+
let n = ((_ = e == null ? void 0 : e[0]) == null ? void 0 : _.target) != null ? (I = (T = e == null ? void 0 : e[0]) == null ? void 0 : T.target) == null ? void 0 : I.value : e == null ? void 0 : e[0];
|
|
539
|
+
n = U(n);
|
|
540
|
+
var i = mn(n, De);
|
|
541
|
+
i != null ? le(i) : le(n), pe(n, De), at(), st(n);
|
|
542
|
+
}, vn = (e = !0) => {
|
|
543
|
+
ue(L.readonly, e);
|
|
544
|
+
}, hn = (e = !0) => {
|
|
545
|
+
ue(L.disabled, e);
|
|
546
|
+
}, pn = (e = !0) => {
|
|
547
|
+
ue(L.hidden, e), e ? ct() : ge();
|
|
548
|
+
}, gn = (e = !0) => {
|
|
549
|
+
Xt(L.required, e), ge();
|
|
550
|
+
}, On = (e) => {
|
|
551
|
+
ue(L.label, e);
|
|
552
|
+
}, Q = () => S == null ? void 0 : S.value, Le = (e) => {
|
|
553
|
+
S.value = e, fe(e);
|
|
554
|
+
}, me = (e) => {
|
|
555
|
+
let t = U(Q());
|
|
556
|
+
if (Le(e), !Z(u))
|
|
557
|
+
return;
|
|
558
|
+
const n = Q();
|
|
559
|
+
t !== n && (le(n), pe(e, t));
|
|
560
|
+
}, Cn = () => {
|
|
561
|
+
he() ? ye(ve()).then((e) => {
|
|
562
|
+
X(e);
|
|
563
|
+
}) : X(null), y == null || y();
|
|
564
|
+
}, Vn = (e) => {
|
|
565
|
+
const t = Q(), n = te.insertOnMousePos(G.value, e, t);
|
|
566
|
+
me(n);
|
|
567
|
+
}, yn = (e) => {
|
|
568
|
+
const t = Q(), n = te.deleteOnMousePos(e, t);
|
|
569
|
+
me(n);
|
|
570
|
+
}, En = (e, t) => {
|
|
571
|
+
oe(() => S == null ? void 0 : S.value, (n, i) => {
|
|
572
|
+
e == null || e({ id: u.id, name: R.value, newValue: n, oldValue: i });
|
|
573
|
+
}, t);
|
|
574
|
+
}, Rn = (e) => {
|
|
575
|
+
var T;
|
|
576
|
+
e.preventDefault();
|
|
577
|
+
const t = (I) => {
|
|
578
|
+
var k;
|
|
579
|
+
const j = (k = Array.from(I.classList)) == null ? void 0 : k.find((b) => St(b));
|
|
580
|
+
return j ? _t(j) : "";
|
|
581
|
+
}, n = document.activeElement;
|
|
582
|
+
if (!n)
|
|
583
|
+
return;
|
|
584
|
+
const i = document.getElementsByClassName(mt.formItemTarget);
|
|
585
|
+
for (var _ = 0; _ < i.length; _++) {
|
|
586
|
+
const I = i[_], j = Mt(n, mt.formItemTarget);
|
|
587
|
+
if (!j)
|
|
588
|
+
continue;
|
|
589
|
+
const k = t(I), b = t(j);
|
|
590
|
+
if (k === b) {
|
|
591
|
+
if (_ === i.length - 1)
|
|
592
|
+
return;
|
|
593
|
+
const Bn = i[_ + 1], In = t(Bn), Be = O.findRefById(In, o);
|
|
594
|
+
try {
|
|
595
|
+
(T = Be == null ? void 0 : Be.exposed) == null || T.focus();
|
|
596
|
+
} catch (jn) {
|
|
597
|
+
se.error("handleEnter", jn);
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
};
|
|
602
|
+
let bn = () => {
|
|
603
|
+
var I;
|
|
604
|
+
let e = {
|
|
605
|
+
componentName: R.value,
|
|
606
|
+
//用于组件事件emitter发射与接收处理
|
|
607
|
+
refList: A,
|
|
608
|
+
allRefList: v,
|
|
609
|
+
fieldEditor: nn,
|
|
610
|
+
changeRegisterToRefList: (j, k) => {
|
|
611
|
+
O.changeRegisterToRefList(j, k), C.changeRegisterToRefList(j, k);
|
|
612
|
+
},
|
|
613
|
+
getField: l,
|
|
614
|
+
getFormData: a,
|
|
615
|
+
getValue: Q,
|
|
616
|
+
setValue: Le,
|
|
617
|
+
emit$: Ge,
|
|
618
|
+
findRefByName: O.getWidgetRef,
|
|
619
|
+
findRefById: O.findRefById,
|
|
620
|
+
callRefFunc: O.callRefFunc,
|
|
621
|
+
getWidgetOption: ce,
|
|
622
|
+
setWidgetOption: ue,
|
|
623
|
+
refreshKey: Ze,
|
|
624
|
+
getRowScope: f,
|
|
625
|
+
//组件的数据绑定:继承的数据,用于计算组件属性变量
|
|
626
|
+
getOneSchemaData: Pt,
|
|
627
|
+
getSchemaDatas: Tt,
|
|
628
|
+
getSchemaDataObject: Dt,
|
|
629
|
+
getGlobalParams: Ft,
|
|
630
|
+
addCssClass: wt,
|
|
631
|
+
removeCssClass: en
|
|
632
|
+
}, t = {
|
|
633
|
+
resetField: Cn,
|
|
634
|
+
getValue: Q,
|
|
635
|
+
setValue: me,
|
|
636
|
+
refreshDefaultValue: cn,
|
|
637
|
+
insertOnMousePos: Vn,
|
|
638
|
+
deleteOnMousePos: yn,
|
|
639
|
+
disableChangeValidate: It,
|
|
640
|
+
enableChangeValidate: jt,
|
|
641
|
+
focus: () => {
|
|
642
|
+
te.focus(G.value);
|
|
643
|
+
},
|
|
644
|
+
blur: () => {
|
|
645
|
+
te.blur(G.value);
|
|
646
|
+
},
|
|
647
|
+
getMousePos: () => {
|
|
648
|
+
te.getMousePos(G.value);
|
|
649
|
+
},
|
|
650
|
+
setMousePos: (j) => {
|
|
651
|
+
te.setMousePos(G.value, j);
|
|
652
|
+
}
|
|
653
|
+
}, n = {
|
|
654
|
+
loadOptionItems: rn,
|
|
655
|
+
getCheckedItems: Fe,
|
|
656
|
+
getCheckedLabels: we
|
|
657
|
+
}, i = {
|
|
658
|
+
[L.required]: { name: z.setRequired, fn: gn },
|
|
659
|
+
[L.label]: { name: z.setLabel, fn: On },
|
|
660
|
+
[L.hidden]: { name: z.setHidden, fn: pn },
|
|
661
|
+
[L.disabled]: { name: z.setDisabled, fn: hn },
|
|
662
|
+
[L.readonly]: { name: z.setReadonly, fn: vn }
|
|
663
|
+
}, _ = {};
|
|
664
|
+
(I = re(i)) == null || I.forEach((j) => {
|
|
665
|
+
if ($e(u, j)) {
|
|
666
|
+
const k = i[j];
|
|
667
|
+
_[k.name] = k.fn;
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
var T = w(e, _);
|
|
671
|
+
return Z(u) && (T = w(T, t)), Re(u) && (T = w(T, n)), T;
|
|
672
|
+
};
|
|
673
|
+
const Mn = Ce(() => ({
|
|
674
|
+
attrs: Xe.value,
|
|
675
|
+
extendAttrs: Pe.value,
|
|
676
|
+
events: H.value,
|
|
677
|
+
slots: Ue.value,
|
|
678
|
+
fieldKey: Te.value,
|
|
679
|
+
fieldEditor: G.value,
|
|
680
|
+
fieldName: R.value
|
|
681
|
+
})), xn = (e, t, n) => {
|
|
682
|
+
const i = Ve(), _ = nt(e), T = (I) => {
|
|
683
|
+
t && (i.value = t(I || _));
|
|
684
|
+
};
|
|
685
|
+
return Ot(_) ? oe(_, (I) => {
|
|
686
|
+
T(I), n && n(I);
|
|
687
|
+
}) : T(_), i;
|
|
688
|
+
}, Wn = () => {
|
|
689
|
+
!Z(u) || c || En((e) => {
|
|
690
|
+
const t = u == null ? void 0 : u.id;
|
|
691
|
+
mo(v, r, t, $);
|
|
692
|
+
const n = We.getOptions(u, L.relate);
|
|
693
|
+
vo(v, r, t, n, e), (Re(u) || D) && setTimeout(() => {
|
|
694
|
+
fe(e.newValue), un(e == null ? void 0 : e.newValue);
|
|
695
|
+
}, 1e3), pe(e.newValue, e.oldValue);
|
|
696
|
+
}, { immediate: !0 });
|
|
697
|
+
}, at = () => {
|
|
698
|
+
const e = { propName: R.value };
|
|
699
|
+
_e(P, q.fieldValidation, e, o);
|
|
700
|
+
}, ut = () => {
|
|
701
|
+
const e = { fieldId: u.id, fieldName: R.value, rules: Je };
|
|
702
|
+
_e(P, q.fieldRuleChange, e, o);
|
|
703
|
+
}, ge = () => {
|
|
704
|
+
if (!Z(u))
|
|
705
|
+
return;
|
|
706
|
+
const e = Lt();
|
|
707
|
+
return ut(), e;
|
|
708
|
+
}, ct = () => {
|
|
709
|
+
Bt(), ut();
|
|
710
|
+
}, Sn = () => {
|
|
711
|
+
$e(u, "change") && (H.value.change = dn), $e(u, "input") && (H.value.input = ln), ae(dt.setFormData, (e) => {
|
|
712
|
+
me(e[R.value]);
|
|
713
|
+
}), ae(q.fieldValueChanged, (e) => {
|
|
714
|
+
Ne(q.onChange, { value: e == null ? void 0 : e.newValue, oldValue: e == null ? void 0 : e.oldValue });
|
|
715
|
+
});
|
|
716
|
+
}, _n = () => {
|
|
717
|
+
let e = R.value;
|
|
718
|
+
if (Z(u)) {
|
|
719
|
+
const t = () => !Ae(V, e) || V[e] === void 0;
|
|
720
|
+
t() && (X(null), he() && ye(ve()).then((n) => {
|
|
721
|
+
t() && (n == null ? X(null) : X(n));
|
|
722
|
+
})), ot();
|
|
723
|
+
} else
|
|
724
|
+
he() && ye(ve()).then((t) => {
|
|
725
|
+
me(t);
|
|
726
|
+
});
|
|
727
|
+
st(Q());
|
|
728
|
+
}, Pn = () => {
|
|
729
|
+
Re(u) && oe(() => de == null ? void 0 : de.value, (e, t) => {
|
|
730
|
+
fe(S.value);
|
|
731
|
+
}, { immediate: !0 });
|
|
732
|
+
}, Dn = () => {
|
|
733
|
+
Qe(L.css, void 0, (e) => {
|
|
734
|
+
Ln();
|
|
735
|
+
});
|
|
736
|
+
}, Y = Ie(ke.isRenderComplete), Tn = () => {
|
|
737
|
+
const e = () => 100, t = () => {
|
|
738
|
+
setTimeout(() => {
|
|
739
|
+
Pn(), Wn(), ge();
|
|
740
|
+
}, e());
|
|
741
|
+
};
|
|
742
|
+
if (Y != null && Y.value) {
|
|
743
|
+
t();
|
|
744
|
+
return;
|
|
745
|
+
}
|
|
746
|
+
if (Y != null) {
|
|
747
|
+
const n = oe(() => Y == null ? void 0 : Y.value, (i) => {
|
|
748
|
+
i && (t(), n());
|
|
749
|
+
}, { immediate: !0 });
|
|
750
|
+
}
|
|
751
|
+
}, Fn = () => {
|
|
752
|
+
var e, t;
|
|
753
|
+
if (g)
|
|
754
|
+
try {
|
|
755
|
+
O.registerToRefList(R.value), C.registerToRefList(R.value), r.push({
|
|
756
|
+
id: u.id,
|
|
757
|
+
name: R.value,
|
|
758
|
+
_source: u == null ? void 0 : u._source,
|
|
759
|
+
options: {
|
|
760
|
+
defaultValue: We.getOrgOption(u, q.defaultValue)
|
|
761
|
+
}
|
|
762
|
+
}), _n(), Sn(), (t = (e = H == null ? void 0 : H.value) == null ? void 0 : e.created) == null || t.call(e), Wt();
|
|
763
|
+
} catch (n) {
|
|
764
|
+
se.error("create", n);
|
|
765
|
+
}
|
|
766
|
+
}, Nn = () => {
|
|
767
|
+
g && (ht(() => {
|
|
768
|
+
var e, t;
|
|
769
|
+
try {
|
|
770
|
+
Dn(), Tn(), (t = (e = H == null ? void 0 : H.value) == null ? void 0 : e.mounted) == null || t.call(e), xt(to.VFormRender, dt.registerRef, { fieldName: R.value, fieldId: u == null ? void 0 : u.id }, [v]);
|
|
771
|
+
} catch (n) {
|
|
772
|
+
se.error("mounted", n, u);
|
|
773
|
+
}
|
|
774
|
+
}), Hn(() => {
|
|
775
|
+
O.unregisterFromRefList(R.value), C.unregisterFromRefList(R.value);
|
|
776
|
+
}));
|
|
777
|
+
}, Ln = (e) => {
|
|
778
|
+
const t = u == null ? void 0 : u.id, n = ce(L.css);
|
|
779
|
+
n && t && io(n).then((i) => {
|
|
780
|
+
fo(i, t);
|
|
781
|
+
});
|
|
782
|
+
};
|
|
783
|
+
return Fn(), Nn(), {
|
|
784
|
+
exposed: bn(),
|
|
785
|
+
fieldModel: S,
|
|
786
|
+
objFieldModel: sn,
|
|
787
|
+
numFieldModel: on,
|
|
788
|
+
fieldEditor: G,
|
|
789
|
+
fieldKey: Te,
|
|
790
|
+
field: u,
|
|
791
|
+
instance: o,
|
|
792
|
+
attrs: Xe,
|
|
793
|
+
extendAttrs: Pe,
|
|
794
|
+
slots: Ue,
|
|
795
|
+
events: H,
|
|
796
|
+
rules: Je,
|
|
797
|
+
fieldObj: Mn,
|
|
798
|
+
getValue: Q,
|
|
799
|
+
setValue: Le,
|
|
800
|
+
pageConfig: B,
|
|
801
|
+
formModel: V,
|
|
802
|
+
fieldName: R,
|
|
803
|
+
propResultOpt: $,
|
|
804
|
+
optionItems: de,
|
|
805
|
+
activeOptionItems: Gt,
|
|
806
|
+
activeOptionItem: Ut,
|
|
807
|
+
activeOptionItemIndex: Jt,
|
|
808
|
+
refreshOptionItems: At,
|
|
809
|
+
refreshOptionField: fe,
|
|
810
|
+
filterOptionItems: kt,
|
|
811
|
+
setOptionItems: ze,
|
|
812
|
+
getCheckedItems: Fe,
|
|
813
|
+
getCheckedOptionItems: (e, t) => qt(e || S.value, t),
|
|
814
|
+
getCheckedOptionLabels: (e, t) => Ht(e || S.value, t),
|
|
815
|
+
getCheckedOptionValues: (e, t) => Kt(e || S.value, t),
|
|
816
|
+
getCheckedOptionText: (e, t) => $t(e || S.value, t),
|
|
817
|
+
refreshKey: Ze,
|
|
818
|
+
watchKeyValue: xn,
|
|
819
|
+
// watchPropAndSaveHistoryStep,
|
|
820
|
+
existEvent: fn,
|
|
821
|
+
handleEvent: Ne,
|
|
822
|
+
handleEnter: Rn,
|
|
823
|
+
getPropName: tn,
|
|
824
|
+
emitFieldDataChange: pe,
|
|
825
|
+
syncUpdateFormModel: le,
|
|
826
|
+
getWidgetRef: O.getWidgetRef,
|
|
827
|
+
clearRules: ct,
|
|
828
|
+
buildRules: ge,
|
|
829
|
+
getFieldOptionModel: nt,
|
|
830
|
+
getFieldOptions: ie,
|
|
831
|
+
hasFieldOptions: Yt,
|
|
832
|
+
setFieldOptions: Zt,
|
|
833
|
+
getWidgetOption: ce,
|
|
834
|
+
getWidgetOptionByPropValue: Qt,
|
|
835
|
+
// singleOption,
|
|
836
|
+
watchOption: Qe,
|
|
837
|
+
mergeOptionToFormModel: et
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
export {
|
|
841
|
+
qe as R,
|
|
842
|
+
So as a,
|
|
843
|
+
Se as u
|
|
844
|
+
};
|