hlrender 0.0.251 → 0.0.253
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/{affix-widget-d0b42bdf.js → affix-widget-801f1e6e.js} +6 -6
- package/{alert-widget-c1558d02.js → alert-widget-4588cc67.js} +6 -6
- package/{anchor-widget-c2d2be95.js → anchor-widget-2f3844c5.js} +4 -4
- package/{auto-complete-widget-8c026611.js → auto-complete-widget-6e3ac296.js} +6 -6
- package/{avatar-widget-339334b4.js → avatar-widget-dac65de3.js} +6 -6
- package/{backtop-widget-bd30cda7.js → backtop-widget-478af202.js} +6 -6
- package/{badge-widget-6bbc715a.js → badge-widget-c9130cd6.js} +6 -6
- package/{barcode-widget-12e02ccd.js → barcode-widget-cc9e4745.js} +4 -4
- package/{breadcrumb-widget-928a6248.js → breadcrumb-widget-c050052c.js} +4 -4
- package/{button-widget-9d8ccc3c.js → button-widget-1ed2fe85.js} +6 -6
- package/{cache-widget-a9ec7c5d.js → cache-widget-00b75387.js} +5 -5
- package/{card-widget-d5f16ee6.js → card-widget-30b5fee8.js} +5 -5
- package/{carousel-widget-153c1c46.js → carousel-widget-4d50276b.js} +5 -5
- package/{cascader-widget-63d24f6b.js → cascader-widget-9a987436.js} +5 -5
- package/{chart-widget-0a1fa896.js → chart-widget-a50176b7.js} +4 -4
- package/{checkbox-widget-f69203a4.js → checkbox-widget-692ff86b.js} +5 -5
- package/{collapse-widget-54bd3ca2.js → collapse-widget-5c8328a6.js} +5 -5
- package/{color-picker-widget-82710478.js → color-picker-widget-8aea5afb.js} +5 -5
- package/{cont-cell-widget-b62c363d.js → cont-cell-widget-6e9891d2.js} +1 -1
- package/{cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-dd0ad1c8.js → cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-2341fc00.js} +2 -2
- package/{cont-widget-e828e64a.js → cont-widget-862530b6.js} +3 -3
- package/{countdown-widget-70bd04dc.js → countdown-widget-b541cdd6.js} +6 -6
- package/{date-picker-range-widget-accecd35.js → date-picker-range-widget-dd08d5d8.js} +5 -5
- package/{date-picker-widget-3fd486d4.js → date-picker-widget-095e524d.js} +5 -5
- package/{default-slot-widget-78fba757.js → default-slot-widget-dfc8afa7.js} +4 -4
- package/{default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-7f447b6f.js → default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-9b3dc136.js} +2 -2
- package/{descriptions-widget-ffda8cd9.js → descriptions-widget-ef082824.js} +5 -5
- package/{dialog-widget-a87e3248.js → dialog-widget-f12eaec9.js} +6 -6
- package/{divider-widget-b0d5200a.js → divider-widget-f3036b05.js} +6 -6
- package/{drag-wrapper-c97acf25.js → drag-wrapper-cbb10773.js} +2 -2
- package/{drawer-widget-99367bc1.js → drawer-widget-fabdc22e.js} +6 -6
- package/{dropdown-widget-31efc106.js → dropdown-widget-1e87f15b.js} +5 -5
- package/{empty-widget-c411ff6b.js → empty-widget-cdd6666d.js} +6 -6
- package/{feedback-widget-f2d7e1db.js → feedback-widget-8df7eced.js} +6 -6
- package/{feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-7f2bd815.js → feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-d80dd892.js} +3 -3
- package/{file-upload-widget-658a7002.js → file-upload-widget-dd8010ba.js} +7 -7
- package/{form-item-wrapper-b34acfff.js → form-item-wrapper-664c4181.js} +2 -2
- package/{form-widget-5e1a4cdc.js → form-widget-5a8b0756.js} +53 -52
- package/{grid-col-widget-016ff9ea.js → grid-col-widget-b9d0c390.js} +1 -1
- package/{grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-10ad2a79.js → grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-2fd634d5.js} +3 -3
- package/{grid-widget-a0084250.js → grid-widget-55db94b6.js} +3 -3
- package/{hcard-widget-35819dc6.js → hcard-widget-cf42674e.js} +5 -5
- package/{html-text-widget-9217a694.js → html-text-widget-d9186b24.js} +4 -4
- package/{icon-widget-3b0072d6.js → icon-widget-dd4a50ba.js} +4 -4
- package/{iframe-widget-9cf03ad4.js → iframe-widget-7ff2b293.js} +4 -4
- package/{image-widget-2a03bbd5.js → image-widget-75818f48.js} +4 -4
- package/{index-4c98d500.js → index-99510eab.js} +8 -0
- package/{input-number-widget-258d7af8.js → input-number-widget-cf564a04.js} +5 -5
- package/{input-tag-widget-626718a5.js → input-tag-widget-f55f9060.js} +6 -6
- package/{input-widget-9224341e.js → input-widget-d3e23319.js} +6 -6
- package/{link-widget-96065198.js → link-widget-ba210647.js} +6 -6
- package/{ltable-col-widget-75c1f835.js → ltable-col-widget-b904f3ba.js} +1 -1
- package/{ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-cdfa4779.js → ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-8e173c9e.js} +4 -4
- package/{ltable-widget-f5a4ca42.js → ltable-widget-3ca7a77a.js} +3 -3
- package/{mention-widget-531a9884.js → mention-widget-4c660b5c.js} +6 -6
- package/{menu-widget-80d0339b.js → menu-widget-3f1c7f87.js} +4 -4
- package/{model-widget-f445ee28.js → model-widget-5902f18c.js} +4 -4
- package/{multirow-55dfa7bf.js → multirow-8598f33c.js} +1 -1
- package/{multirow-widget-81a6cd69.js → multirow-widget-4bc4052f.js} +5 -5
- package/package.json +1 -1
- package/{pagination-widget-99971cc9.js → pagination-widget-b34a1194.js} +4 -4
- package/{picture-upload-widget-cc9030a3.js → picture-upload-widget-78384134.js} +6 -6
- package/{progress-widget-2a526b23.js → progress-widget-319ccad1.js} +5 -5
- package/{qrcode-widget-39ca3c3d.js → qrcode-widget-f9fb2fe5.js} +4 -4
- package/{radio-widget-29c9d2bf.js → radio-widget-5a6c3ce9.js} +5 -5
- package/{range-widget-c3367a2f.js → range-widget-26495861.js} +6 -6
- package/{rate-widget-ea3079f1.js → rate-widget-4a70e7a3.js} +5 -5
- package/render.es.js +21 -21
- package/render.style.css +1 -1
- package/render.umd.js +248 -248
- package/{result-widget-6bca64fe.js → result-widget-89ebc6b6.js} +5 -5
- package/{rich-editor-widget-32ea2042.js → rich-editor-widget-df907458.js} +5 -5
- package/{router-widget-9599bfc9.js → router-widget-d52074a8.js} +4 -4
- package/{segmented-widget-b060b1cc.js → segmented-widget-53245a23.js} +4 -4
- package/{select-widget-45846558.js → select-widget-5766fbe3.js} +5 -5
- package/{sfc-751c17f2.js → sfc-7c90544e.js} +1 -1
- package/{sfcview-f2e4159b.js → sfcview-bff1db9b.js} +1 -1
- package/share-field-6b809684.js +834 -0
- package/{share-file-10c6d927.js → share-file-1f280209.js} +1 -1
- package/{skeleton-widget-778dd090.js → skeleton-widget-2a18fa8e.js} +6 -6
- package/{skeletonItem-widget-83f3417b.js → skeletonItem-widget-c6a49e4c.js} +4 -4
- package/{slider-widget-92a94eec.js → slider-widget-28d58aa0.js} +5 -5
- package/{space-widget-b9a576ec.js → space-widget-e8b52155.js} +5 -5
- package/{splitter-widget-42bd96f8.js → splitter-widget-477c74f0.js} +5 -5
- package/{static-text-widget-5fd90f16.js → static-text-widget-25c2d045.js} +4 -4
- package/{statistic-widget-073df406.js → statistic-widget-42e89ca1.js} +6 -6
- package/{steps-widget-ac6fffcd.js → steps-widget-45004417.js} +4 -4
- package/{switch-widget-382153cd.js → switch-widget-3c99ceac.js} +5 -5
- package/{tab-pane-widget-67cdce85.js → tab-pane-widget-513b833b.js} +1 -1
- package/{tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-95fbe638.js → tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-b5fb88a2.js} +3 -3
- package/{table-col-widget-df5f5451.js → table-col-widget-23c57593.js} +4 -4
- package/{table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-4d8dcf50.js → table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-132eeb17.js} +2 -2
- package/{table-widget-aee48dd6.js → table-widget-918a02a3.js} +6 -6
- package/{tabs-widget-ab3e15df.js → tabs-widget-b503efe7.js} +4 -4
- package/{tag-widget-e9790079.js → tag-widget-711c79c9.js} +6 -6
- package/{text-widget-e588d0ac.js → text-widget-0b4d05a0.js} +6 -6
- package/{textarea-widget-881b9191.js → textarea-widget-5cd72c0c.js} +5 -5
- package/{time-picker-range-widget-35811b8e.js → time-picker-range-widget-4ac2ca63.js} +5 -5
- package/{time-picker-widget-81e0be45.js → time-picker-widget-fe953f9e.js} +5 -5
- package/{time-select-widget-2edc0d65.js → time-select-widget-814097a0.js} +5 -5
- package/{timeline-widget-b506c92c.js → timeline-widget-e8844fba.js} +5 -5
- package/{tmpl-widget-38c09700.js → tmpl-widget-c6f4be17.js} +5 -5
- package/{tooltip-widget-5a7b0934.js → tooltip-widget-50e78d16.js} +5 -5
- package/{tour-widget-8fc644d9.js → tour-widget-4a8fc371.js} +4 -4
- package/{transfer-widget-9a4a7cb4.js → transfer-widget-044e8ca7.js} +6 -6
- package/{tree-select-widget-442180b1.js → tree-select-widget-50354001.js} +5 -5
- package/{tree-widget-1fdf704b.js → tree-widget-af0452ae.js} +4 -4
- package/{verifycode-widget-f15a4328.js → verifycode-widget-7290ae2c.js} +4 -4
- package/{widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-21b0af7b.js → widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-b0c471a1.js} +1 -1
- package/wrapper-widget-fa68e965.js +92 -0
- package/share-field-2e7f9b3a.js +0 -819
- package/wrapper-widget-c8fcd2f1.js +0 -91
|
@@ -0,0 +1,834 @@
|
|
|
1
|
+
var Nn = Object.defineProperty;
|
|
2
|
+
var Bn = (n, u, p) => u in n ? Nn(n, u, { enumerable: !0, configurable: !0, writable: !0, value: p }) : n[u] = p;
|
|
3
|
+
var nt = (n, u, p) => (Bn(n, typeof u != "symbol" ? u + "" : u, p), p);
|
|
4
|
+
import { onMounted as ct, nextTick as it, onActivated as Dn, onErrorCaptured as Ln, isRef as ft, watch as ne, reactive as jn, computed as ge, ref as he, onBeforeUnmount as $n, inject as An, toRefs as kn } from "vue";
|
|
5
|
+
import { m as ce, a as Te, c as Be, t as lt, i as mt, o as Y, g as oe, w as Gn, K as Hn, h as dt, f as vt, k as Kn, A as pe, F as ot, n as qn, G as te, d as Oe, I as Ve } from "./enum-type-8bbffeb3.js";
|
|
6
|
+
import { p as rt, b as gt, g as Un, f as Ce, a as Jn } from "./multirow-8598f33c.js";
|
|
7
|
+
import { u as ht } from "./icon-1fc5d00d.js";
|
|
8
|
+
import { f as j, j as ye, k as zn, l as Qn, b as P, m as st, a as Xn, d as Yn } from "./expression-fb652f29.js";
|
|
9
|
+
import { b as pt, d as Ne, B as J, P as Ot, c as Vt, e as Zn, a as ut } from "./baseImp-9c1c3476.js";
|
|
10
|
+
import { F as wn, b as eo, a as to } from "./slot-44e26cb4.js";
|
|
11
|
+
import { f as no, d as oo, h as Ie, e as ro } from "./index-99510eab.js";
|
|
12
|
+
import { W as $, c as z, d as so } from "./enum-type-80708bd8.js";
|
|
13
|
+
import { m as uo } from "./uuid-f2110dfe.js";
|
|
14
|
+
function ao() {
|
|
15
|
+
return {
|
|
16
|
+
onMountedOrActivated: (p) => {
|
|
17
|
+
let _ = !1;
|
|
18
|
+
ct(() => {
|
|
19
|
+
p(), it(() => {
|
|
20
|
+
_ = !0;
|
|
21
|
+
});
|
|
22
|
+
}), Dn(() => {
|
|
23
|
+
_ && p();
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
onCompErrorCaptured: () => {
|
|
27
|
+
Ln((p) => (ce.error("onCompErrorCaptured", p), !1));
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function co(n, u) {
|
|
32
|
+
const { getWidgetOption: p, getWidgetOptionByPropValue: _ } = pt(n, u), T = (a) => p(a);
|
|
33
|
+
return {
|
|
34
|
+
existFunc: T,
|
|
35
|
+
handleFunc: (a, F) => {
|
|
36
|
+
if (Te(a)) {
|
|
37
|
+
var B = T(String(a));
|
|
38
|
+
return Ne(B, F);
|
|
39
|
+
} else {
|
|
40
|
+
var B = _(Be(a));
|
|
41
|
+
return Ne(B, F);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
class De {
|
|
47
|
+
constructor(u) {
|
|
48
|
+
nt(this, "refList", {});
|
|
49
|
+
u && (this.refList = u);
|
|
50
|
+
}
|
|
51
|
+
initRefList() {
|
|
52
|
+
this.refList || (this.refList = {});
|
|
53
|
+
}
|
|
54
|
+
getWidgetRef(u) {
|
|
55
|
+
if (u)
|
|
56
|
+
return this.initRefList(), this.refList[u];
|
|
57
|
+
}
|
|
58
|
+
setWidgetRef(u, p) {
|
|
59
|
+
u && (this.initRefList(), this.refList[u] = p);
|
|
60
|
+
}
|
|
61
|
+
removeWidgetRef(u) {
|
|
62
|
+
u && this.refList && delete this.refList[u.toString()];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function be(n) {
|
|
66
|
+
n || (n = {});
|
|
67
|
+
const u = new De(n), { instance: p } = ht(), _ = (l) => u.getWidgetRef(l == null ? void 0 : l.toString()), T = (l, y, R) => {
|
|
68
|
+
var V = [], b = [];
|
|
69
|
+
let r = _(l);
|
|
70
|
+
return r && V.push(r), V == null || V.forEach((c) => {
|
|
71
|
+
var s = a(c, y, R);
|
|
72
|
+
s && b.push(s);
|
|
73
|
+
}), b;
|
|
74
|
+
}, I = (l, y) => {
|
|
75
|
+
var R;
|
|
76
|
+
return (R = l == null ? void 0 : l.exposed) == null ? void 0 : R[y.toString()];
|
|
77
|
+
}, a = (l, y, R) => {
|
|
78
|
+
var V = I(l, y);
|
|
79
|
+
if (V) {
|
|
80
|
+
var b = [];
|
|
81
|
+
return R && (b = Object.values(R)), V(...b);
|
|
82
|
+
}
|
|
83
|
+
}, F = (l, y, R) => {
|
|
84
|
+
var V = [];
|
|
85
|
+
if (l) {
|
|
86
|
+
var b = Be(lt(l, !0));
|
|
87
|
+
b == null || b.forEach((r) => {
|
|
88
|
+
var c = T(r, y, R);
|
|
89
|
+
mt(c) || V.push(c);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
return Array.isArray(l) ? V : V == null ? void 0 : V[0];
|
|
93
|
+
}, B = (l, y) => {
|
|
94
|
+
let R = Y(n);
|
|
95
|
+
F(R, l, y);
|
|
96
|
+
}, H = (l, y) => {
|
|
97
|
+
var s, v, i, f;
|
|
98
|
+
const R = (i = (v = (s = y || p) == null ? void 0 : s.exposed) == null ? void 0 : v.getField) == null ? void 0 : i.call(v);
|
|
99
|
+
var V = rt(R == null ? void 0 : R.id);
|
|
100
|
+
const b = (m) => (m == null ? void 0 : m.id) === l, r = (m) => {
|
|
101
|
+
var N;
|
|
102
|
+
var O = rt(m == null ? void 0 : m.id);
|
|
103
|
+
return (V == null ? void 0 : V.groupName) === (O == null ? void 0 : O.groupName) && ((O == null ? void 0 : O.id) === l || ((N = m == null ? void 0 : m._source) == null ? void 0 : N.id) === l);
|
|
104
|
+
}, c = (f = Y(u.refList)) == null ? void 0 : f.find((m) => {
|
|
105
|
+
var N, W, K;
|
|
106
|
+
try {
|
|
107
|
+
const A = (K = (W = (N = u.refList[m]) == null ? void 0 : N.exposed) == null ? void 0 : W.getField) == null ? void 0 : K.call(W);
|
|
108
|
+
var O = b(A);
|
|
109
|
+
return !O && (V != null && V.groupName) && (O = r(A)), O;
|
|
110
|
+
} catch {
|
|
111
|
+
return !1;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
if (c)
|
|
115
|
+
return _(c);
|
|
116
|
+
}, g = (l) => {
|
|
117
|
+
if (l) {
|
|
118
|
+
let y = l;
|
|
119
|
+
u == null || u.setWidgetRef(y, p);
|
|
120
|
+
}
|
|
121
|
+
}, h = (l) => {
|
|
122
|
+
if (l) {
|
|
123
|
+
let y = l;
|
|
124
|
+
u == null || u.removeWidgetRef(y);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
return {
|
|
128
|
+
findWidgetAndCall: T,
|
|
129
|
+
getWidgetRef: _,
|
|
130
|
+
callWidgetsExposed: F,
|
|
131
|
+
callRefFunc: a,
|
|
132
|
+
existRefFunc: I,
|
|
133
|
+
setAllRefList: B,
|
|
134
|
+
findRefById: H,
|
|
135
|
+
findRefByName: _,
|
|
136
|
+
changeRegisterToRefList: (l, y) => {
|
|
137
|
+
l && (g(l), h(y));
|
|
138
|
+
},
|
|
139
|
+
registerToRefList: g,
|
|
140
|
+
unregisterFromRefList: h
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
const io = (n, u, p, _) => {
|
|
144
|
+
const T = new De(n), { callRefFunc: I } = be(n), { parseGroupId: a } = gt();
|
|
145
|
+
if (!n || n.length <= 0 || !u)
|
|
146
|
+
return;
|
|
147
|
+
const F = () => {
|
|
148
|
+
var r, c;
|
|
149
|
+
return (c = (r = Y(n)) == null ? void 0 : r.map((s) => I(n == null ? void 0 : n[s], $.getField))) == null ? void 0 : c.filter((s) => !!s);
|
|
150
|
+
}, B = (r) => {
|
|
151
|
+
var i;
|
|
152
|
+
const c = (i = F()) == null ? void 0 : i.find((f) => (f == null ? void 0 : f.id) === r);
|
|
153
|
+
if (!c)
|
|
154
|
+
return;
|
|
155
|
+
const s = J.getName(c), v = T.getWidgetRef(s);
|
|
156
|
+
if (v)
|
|
157
|
+
return { ref: v, name: s, id: c == null ? void 0 : c.id };
|
|
158
|
+
}, H = (r, c) => {
|
|
159
|
+
if (!oe(c))
|
|
160
|
+
return;
|
|
161
|
+
const s = J.getName(r), v = T.getWidgetRef(s);
|
|
162
|
+
if (v) {
|
|
163
|
+
const i = J.getOptions(r, j.defaultValue, !1, !(p != null && p.designState), { ...p, formData: c });
|
|
164
|
+
if (oe(i))
|
|
165
|
+
if (ft(i)) {
|
|
166
|
+
let f = ne(() => i.value, (m) => {
|
|
167
|
+
f == null || f(), I(v, $.setValue, { newValue: m });
|
|
168
|
+
});
|
|
169
|
+
} else
|
|
170
|
+
I(v, $.setValue, { newValue: i });
|
|
171
|
+
}
|
|
172
|
+
}, g = (r, c) => {
|
|
173
|
+
const s = B(r);
|
|
174
|
+
if (!s)
|
|
175
|
+
return;
|
|
176
|
+
const v = s.name, i = I(s.ref, $.getValue), f = I(s.ref, $.getCheckedItems), m = {};
|
|
177
|
+
return m[v] = i, i !== void 0 && !Kn(f) && !c && (m[`${v}${ye.checkedOptions}`] = f), m;
|
|
178
|
+
}, h = (r, c) => {
|
|
179
|
+
var v;
|
|
180
|
+
var s = [];
|
|
181
|
+
if ((v = F()) == null || v.forEach((i) => {
|
|
182
|
+
if (!i)
|
|
183
|
+
return;
|
|
184
|
+
const f = i == null ? void 0 : i.id;
|
|
185
|
+
var m = f === r;
|
|
186
|
+
const O = a(f), N = (O == null ? void 0 : O.id) === r, W = (O == null ? void 0 : O.groupName) === c;
|
|
187
|
+
return m || N && (W || !c) ? (s.push(i), !0) : !1;
|
|
188
|
+
}), !(!s || s.length <= 0))
|
|
189
|
+
return s == null ? void 0 : s.map((i) => {
|
|
190
|
+
var f;
|
|
191
|
+
return {
|
|
192
|
+
id: i == null ? void 0 : i.id,
|
|
193
|
+
name: (f = i == null ? void 0 : i._source) == null ? void 0 : f.name,
|
|
194
|
+
source: i == null ? void 0 : i._source
|
|
195
|
+
};
|
|
196
|
+
});
|
|
197
|
+
}, S = (r, c) => {
|
|
198
|
+
var s = [];
|
|
199
|
+
if (!r || (r == null ? void 0 : r.length) <= 0)
|
|
200
|
+
return s;
|
|
201
|
+
const v = a(u), i = v == null ? void 0 : v.groupName;
|
|
202
|
+
return c === Ce.Inner2Outer ? r == null || r.forEach((f) => {
|
|
203
|
+
var m = h(f);
|
|
204
|
+
m && (m == null ? void 0 : m.length) > 0 && s.push(...m);
|
|
205
|
+
}) : r == null || r.forEach((f) => {
|
|
206
|
+
var m = h(f, i);
|
|
207
|
+
m && (m == null ? void 0 : m.length) > 0 && s.push(...m);
|
|
208
|
+
}), s;
|
|
209
|
+
}, l = (r, c) => {
|
|
210
|
+
let s = {};
|
|
211
|
+
if (!r || r.length <= 0)
|
|
212
|
+
return s;
|
|
213
|
+
if (c === Ce.Inner2Outer) {
|
|
214
|
+
var v = Gn(r, (i) => {
|
|
215
|
+
var f;
|
|
216
|
+
return (f = i.source) == null ? void 0 : f.id;
|
|
217
|
+
});
|
|
218
|
+
v == null || v.forEach((i) => {
|
|
219
|
+
var O;
|
|
220
|
+
const f = i.group[0], m = [];
|
|
221
|
+
(O = i == null ? void 0 : i.children) == null || O.forEach((N) => {
|
|
222
|
+
const W = g(N == null ? void 0 : N.id, !0);
|
|
223
|
+
if (oe(W)) {
|
|
224
|
+
var K = Object.values(Be(W));
|
|
225
|
+
m.push(...K);
|
|
226
|
+
}
|
|
227
|
+
}), f && (s = Object.assign(s, { [f]: m }));
|
|
228
|
+
});
|
|
229
|
+
} else
|
|
230
|
+
r.forEach((i) => {
|
|
231
|
+
const f = g(i == null ? void 0 : i.id);
|
|
232
|
+
oe(f) && (s = Object.assign(s, f));
|
|
233
|
+
});
|
|
234
|
+
return s;
|
|
235
|
+
}, y = (r) => {
|
|
236
|
+
var c = {};
|
|
237
|
+
return r == null || r.forEach((s) => {
|
|
238
|
+
var v;
|
|
239
|
+
s != null && s.source && (s != null && s.id) && (c[(v = s == null ? void 0 : s.source) == null ? void 0 : v.id] = s == null ? void 0 : s.id);
|
|
240
|
+
}), c;
|
|
241
|
+
}, R = (r, c, s) => {
|
|
242
|
+
if (s === Ce.Inner2Inner) {
|
|
243
|
+
const m = Hn(c), { updateFomula: O } = Vt(), { buildVariable: N } = Zn();
|
|
244
|
+
var v = y(r);
|
|
245
|
+
if (oe(v)) {
|
|
246
|
+
var i = J.getOrgOption(c, j.defaultValue), f = O(dt(i), v, (W, K) => {
|
|
247
|
+
var A = v[W];
|
|
248
|
+
return mt(A) ? N(W) : N(A);
|
|
249
|
+
});
|
|
250
|
+
return J.setOrgOption(m, j.defaultValue, vt(f)), m;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return c;
|
|
254
|
+
}, V = (r) => {
|
|
255
|
+
const c = r == null ? void 0 : r.id;
|
|
256
|
+
var s = J.getOrgOption(r, j.defaultValue);
|
|
257
|
+
if (s == null)
|
|
258
|
+
return;
|
|
259
|
+
const v = Un(u, c);
|
|
260
|
+
if (v === Ce.DiffInner)
|
|
261
|
+
return;
|
|
262
|
+
var i = Ot.getFormulaRelatedField(s);
|
|
263
|
+
if (!i || i.length <= 0)
|
|
264
|
+
return;
|
|
265
|
+
var f = S(i, v);
|
|
266
|
+
if (!(f != null && f.some((O) => O.id === u)))
|
|
267
|
+
return;
|
|
268
|
+
const m = l(f, v);
|
|
269
|
+
H(R(f, r, v), m);
|
|
270
|
+
};
|
|
271
|
+
(() => {
|
|
272
|
+
var r;
|
|
273
|
+
(r = F()) == null || r.forEach((c) => {
|
|
274
|
+
V(c);
|
|
275
|
+
});
|
|
276
|
+
})();
|
|
277
|
+
}, fo = (n, u, p, _, T) => {
|
|
278
|
+
var S;
|
|
279
|
+
if (T || !oe(p))
|
|
280
|
+
return;
|
|
281
|
+
const { parseGroupId: I } = gt();
|
|
282
|
+
var a = I(u), F = a == null ? void 0 : a.groupName;
|
|
283
|
+
const { callRefFunc: B } = be(n), H = (l, y) => {
|
|
284
|
+
var s, v, i;
|
|
285
|
+
const R = (v = (s = Y(n)) == null ? void 0 : s.map((f) => B(n == null ? void 0 : n[f], $.getField))) == null ? void 0 : v.filter((f) => !!f), V = (i = no(R, (f) => {
|
|
286
|
+
var m = I(f == null ? void 0 : f.id);
|
|
287
|
+
return (!F || (m == null ? void 0 : m.groupName) === F) && (m == null ? void 0 : m.id) === l;
|
|
288
|
+
})) == null ? void 0 : i[0];
|
|
289
|
+
if (!V)
|
|
290
|
+
return;
|
|
291
|
+
const b = J.getName(V), c = new De(n).getWidgetRef(b);
|
|
292
|
+
c && (y == null || y(c));
|
|
293
|
+
}, g = lt(_ == null ? void 0 : _.newValue, !0), h = (S = Y(p)) == null ? void 0 : S.filter((l) => g == null ? void 0 : g.includes(l));
|
|
294
|
+
!h || h.length <= 0 || h == null || h.forEach((l) => {
|
|
295
|
+
var R, V;
|
|
296
|
+
const y = (R = p == null ? void 0 : p[l]) == null ? void 0 : R.result;
|
|
297
|
+
(V = Y(y)) == null || V.forEach((b) => {
|
|
298
|
+
var c;
|
|
299
|
+
const r = y == null ? void 0 : y[b];
|
|
300
|
+
(c = r == null ? void 0 : r.ids) == null || c.forEach((s) => {
|
|
301
|
+
H(s, (v) => {
|
|
302
|
+
B(v, r == null ? void 0 : r.event, r == null ? void 0 : r.args);
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
function Ct(n, u) {
|
|
309
|
+
var p;
|
|
310
|
+
return (p = n == null ? void 0 : n.classList) != null && p.contains(u) ? n : n != null && n.parentElement ? Ct(n == null ? void 0 : n.parentElement, u) : null;
|
|
311
|
+
}
|
|
312
|
+
function lo() {
|
|
313
|
+
const n = (g) => {
|
|
314
|
+
if (g)
|
|
315
|
+
return g != null && g.ref ? g == null ? void 0 : g.ref : g;
|
|
316
|
+
}, u = (g) => {
|
|
317
|
+
var h, S;
|
|
318
|
+
try {
|
|
319
|
+
(S = (h = n(g)) == null ? void 0 : h.focus) == null || S.call(h);
|
|
320
|
+
} catch (l) {
|
|
321
|
+
ce.error("focus", l, g);
|
|
322
|
+
}
|
|
323
|
+
}, p = (g) => {
|
|
324
|
+
var h, S;
|
|
325
|
+
try {
|
|
326
|
+
(S = (h = n(g)) == null ? void 0 : h.blur) == null || S.call(h);
|
|
327
|
+
} catch (l) {
|
|
328
|
+
ce.error("blur", l, g);
|
|
329
|
+
}
|
|
330
|
+
}, _ = (g) => {
|
|
331
|
+
var h;
|
|
332
|
+
return (h = n(g)) == null ? void 0 : h.selectionStart;
|
|
333
|
+
}, T = (g) => {
|
|
334
|
+
var h;
|
|
335
|
+
return (h = n(g)) == null ? void 0 : h.selectionEnd;
|
|
336
|
+
}, I = (g, h) => {
|
|
337
|
+
var S;
|
|
338
|
+
return (S = n(g)) == null ? void 0 : S.setSelectionRange(h, h);
|
|
339
|
+
}, a = (g, h) => {
|
|
340
|
+
u(g), I(g, h);
|
|
341
|
+
};
|
|
342
|
+
return {
|
|
343
|
+
getSelectionStart: _,
|
|
344
|
+
getSelectionEnd: T,
|
|
345
|
+
setSelectionStart: I,
|
|
346
|
+
blur: p,
|
|
347
|
+
focus: u,
|
|
348
|
+
setMousePos: a,
|
|
349
|
+
getMousePos: (g) => _(g),
|
|
350
|
+
insertOnMousePos: (g, h, S) => {
|
|
351
|
+
const l = _(g), y = T(g), R = zn(S, h, l, y);
|
|
352
|
+
return it(() => {
|
|
353
|
+
a(g, l + (h == null ? void 0 : h.length));
|
|
354
|
+
}), R;
|
|
355
|
+
},
|
|
356
|
+
deleteOnMousePos: (g, h) => Qn(h, g)
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
const at = (n) => {
|
|
360
|
+
var p;
|
|
361
|
+
const { getFormulaFields: u } = Vt();
|
|
362
|
+
return ((p = u(dt(n))) == null ? void 0 : p.length) > 0;
|
|
363
|
+
}, X = (n) => {
|
|
364
|
+
const u = n.type;
|
|
365
|
+
//![WidgetType.fileUpload, WidgetType.pictureUpload].includes(wtype) &&
|
|
366
|
+
return n.formItemFlag || [z.form, z.dialog].includes(u);
|
|
367
|
+
}, Fe = (n) => {
|
|
368
|
+
const u = n.type;
|
|
369
|
+
return [z.treeSelect, z.cascader, z.select, z.checkbox, z.radio].includes(u);
|
|
370
|
+
};
|
|
371
|
+
function Ro(n) {
|
|
372
|
+
const u = n == null ? void 0 : n.designState, p = (n == null ? void 0 : n.created) != !1, _ = n == null ? void 0 : n.exResetField, T = n == null ? void 0 : n.extInitFieldModel, I = n == null ? void 0 : n.exposedWholeInstance, a = n == null ? void 0 : n.widget, F = n == null ? void 0 : n.designer, B = F == null ? void 0 : F.pageConfig, { globalFormOptions: H, formRefList: g, globalRefList: h, globalConfig: S, globalFormName: l, globalDataModel: y, rowScope: R } = wn.globalInject();
|
|
373
|
+
let V = jn(y || {});
|
|
374
|
+
const b = be(h), r = be(g), { instance: c } = ht(), s = () => te(V), v = () => R, i = () => a, f = {
|
|
375
|
+
designState: u,
|
|
376
|
+
pageConfig: B,
|
|
377
|
+
formData: !u && at(a) ? V : {},
|
|
378
|
+
globalConfig: S
|
|
379
|
+
}, m = {
|
|
380
|
+
instance: c,
|
|
381
|
+
...f
|
|
382
|
+
}, O = ut(m), N = {
|
|
383
|
+
exposed: {
|
|
384
|
+
getFormData: !u && at(a) ? s : null,
|
|
385
|
+
findRefByName: b.getWidgetRef,
|
|
386
|
+
fieldEditor: () => q.value,
|
|
387
|
+
getField: i,
|
|
388
|
+
getRowScope: v,
|
|
389
|
+
/**
|
|
390
|
+
* 此处暴露schemadata方法
|
|
391
|
+
* 为实现全局变量中能访问到全局数据源ctx.instance.exposed.getOneSchemaData等数据源求值方法
|
|
392
|
+
*/
|
|
393
|
+
getOneSchemaData: O == null ? void 0 : O.getOneSchemaData,
|
|
394
|
+
getSchemaDataObject: O == null ? void 0 : O.getSchemaDataObject,
|
|
395
|
+
getSchemaDatas: O == null ? void 0 : O.getSchemaDatas,
|
|
396
|
+
getGlobalParams: O == null ? void 0 : O.getGlobalParams
|
|
397
|
+
}
|
|
398
|
+
}, W = {
|
|
399
|
+
instance: I ? c : N,
|
|
400
|
+
...f
|
|
401
|
+
}, { on$: K, dispatch: A, emit$: Le } = Jn(), { onCompErrorCaptured: yt } = ao(), { existFunc: bt } = co({ options: a == null ? void 0 : a.options }, W), { isIdClass: Et, getIdByIdClass: Rt } = oo(a), { getOneSchemaData: Mt, getSchemaDataObject: xt, getSchemaDatas: _t, getGlobalParams: Pt } = ut(W), Z = lo(), St = (n == null ? void 0 : n.shareProp) || { s_attr: !0, s_extendAttr: !0, s_events: !0, s_slots: !0, s_fieldName: !0, s_optionItems: !0 }, { attrs: w, extendAttrs: Ee, events: k, slots: je, rules: $e, fieldName: M, buildRules: Wt, clearRules: It, disableChangeValidate: Ft, enableChangeValidate: Tt, optionItems: ie, refreshOptionItems: Nt, filterOptionItems: Bt, getCheckedOptionText: Dt, getCheckedOptionValues: Lt, getCheckedOptionLabels: jt, getCheckedOptionItems: $t, activeOptionItems: At, activeOptionItem: kt, activeOptionItemIndex: Gt, setOptionItems: Ae, isOptionWidget: Ht, setWidgetOption: re, getWidgetOption: fe, getWidgetOptionByPropValue: Kt, setFieldEnable: qt, hasFieldOptions: Ut, getFieldOptions: se, setFieldOptions: Jt, computedDefaultValue: le, hasDefaultValue: me, singleOption: zt, watchOption: ke, addCssClass: Qt, removeCssClass: Xt } = pt(a, W, St, c), Ge = ge(() => {
|
|
402
|
+
var C;
|
|
403
|
+
if (![z.wrapper].includes(a.type) && a.category == so.container)
|
|
404
|
+
return w.value;
|
|
405
|
+
var e = He(P.disabled, w.value), t = He(P.readonly, w.value);
|
|
406
|
+
if (!a.formItemFlag) {
|
|
407
|
+
var o = (e == null ? void 0 : e.disabled) === !0;
|
|
408
|
+
if (pe(w.value, P.disabled) && !o && !pe(w.value, P.readonly)) {
|
|
409
|
+
var d = (C = ot(H)) == null ? void 0 : C[P.readonly], E = d === !0;
|
|
410
|
+
e[P.disabled] = E;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
return {
|
|
414
|
+
...w.value,
|
|
415
|
+
...e,
|
|
416
|
+
...t
|
|
417
|
+
};
|
|
418
|
+
}), He = (e, t) => {
|
|
419
|
+
var o;
|
|
420
|
+
return pe(t, e) ? {
|
|
421
|
+
[e]: ((o = ot(H)) == null ? void 0 : o[e]) || (t == null ? void 0 : t[e])
|
|
422
|
+
} : {};
|
|
423
|
+
};
|
|
424
|
+
let Re = null, x = he();
|
|
425
|
+
const q = he(), Yt = () => M.value, Ke = () => `${a == null ? void 0 : a.id}-${uo()}`, Me = he(Ke()), qe = () => {
|
|
426
|
+
Me.value = Ke();
|
|
427
|
+
}, Zt = ge({
|
|
428
|
+
get: () => {
|
|
429
|
+
if (Te(x.value)) {
|
|
430
|
+
var e = Number(x.value);
|
|
431
|
+
return isNaN(e) ? void 0 : (x.value = e, e);
|
|
432
|
+
}
|
|
433
|
+
return x.value;
|
|
434
|
+
},
|
|
435
|
+
set: (e) => {
|
|
436
|
+
x.value = e;
|
|
437
|
+
}
|
|
438
|
+
}), wt = ge({
|
|
439
|
+
get: () => {
|
|
440
|
+
if (Te(x.value)) {
|
|
441
|
+
var e = vt(x.value);
|
|
442
|
+
qn(e) && (x.value = e);
|
|
443
|
+
}
|
|
444
|
+
return x.value;
|
|
445
|
+
},
|
|
446
|
+
set: (e) => {
|
|
447
|
+
x.value = e;
|
|
448
|
+
}
|
|
449
|
+
}), en = (e) => {
|
|
450
|
+
var o, d;
|
|
451
|
+
var t = (d = (o = b.getWidgetRef(M.value)) == null ? void 0 : o.exposed) == null ? void 0 : d.loadOptionItems;
|
|
452
|
+
if (t !== void 0) {
|
|
453
|
+
t == null || t(e);
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
Ae(e);
|
|
457
|
+
}, xe = (e) => {
|
|
458
|
+
var t, o, d;
|
|
459
|
+
return (d = (o = (t = b.getWidgetRef(M.value)) == null ? void 0 : t.exposed) == null ? void 0 : o.getCheckedItems) == null ? void 0 : d.call(o, e);
|
|
460
|
+
}, Ue = (e) => {
|
|
461
|
+
var t, o, d;
|
|
462
|
+
return (d = (o = (t = b.getWidgetRef(M.value)) == null ? void 0 : t.exposed) == null ? void 0 : o.getCheckedLabels) == null ? void 0 : d.call(o, e);
|
|
463
|
+
}, tn = (e) => {
|
|
464
|
+
var t, o, d;
|
|
465
|
+
return (d = (o = (t = b.getWidgetRef(M.value)) == null ? void 0 : t.exposed) == null ? void 0 : o.getCheckedText) == null ? void 0 : d.call(o, e);
|
|
466
|
+
}, ee = (e) => {
|
|
467
|
+
var C;
|
|
468
|
+
if (!Ht())
|
|
469
|
+
return;
|
|
470
|
+
const t = (C = Ee.value) == null ? void 0 : C.withAttachData;
|
|
471
|
+
if (!Fe(a) || t === !1)
|
|
472
|
+
return;
|
|
473
|
+
const o = Ue(e), d = tn(e);
|
|
474
|
+
var E = te(xe(e));
|
|
475
|
+
Je(o, E, d);
|
|
476
|
+
}, Je = (e, t, o) => {
|
|
477
|
+
var d = {};
|
|
478
|
+
if (e != null) {
|
|
479
|
+
let E = se("textName", !1);
|
|
480
|
+
[`${M.value}${ye.optionText}`, E].forEach((C) => {
|
|
481
|
+
C && d[C] === void 0 && (d[C] = e);
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
if (t != null) {
|
|
485
|
+
let E = se("optionName", !1);
|
|
486
|
+
[`${M.value}${ye.checkedOptions}`, E].forEach((C) => {
|
|
487
|
+
C && d[C] === void 0 && (d[C] = t);
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
if (o != null) {
|
|
491
|
+
let E = se("labelName", !1);
|
|
492
|
+
e !== o && [`${M.value}${ye.optionLabelName}`].forEach((C) => {
|
|
493
|
+
C && d[C] === void 0 && (d[C] = o);
|
|
494
|
+
}), E && [E].forEach((C) => {
|
|
495
|
+
C && d[C] === void 0 && (d[C] = o);
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
ze(te(d));
|
|
499
|
+
}, Q = (e) => {
|
|
500
|
+
if (X(a)) {
|
|
501
|
+
ee(e);
|
|
502
|
+
var t = { [M.value]: e };
|
|
503
|
+
ze(t);
|
|
504
|
+
}
|
|
505
|
+
}, ze = (e) => {
|
|
506
|
+
Oe(V, e);
|
|
507
|
+
}, ue = (e) => {
|
|
508
|
+
u || Q(e);
|
|
509
|
+
}, Qe = (e) => se(e, !1), Xe = () => {
|
|
510
|
+
var e = kn(V);
|
|
511
|
+
x = Ot.get(e, M.value);
|
|
512
|
+
}, Ye = (e) => {
|
|
513
|
+
Re = te(e);
|
|
514
|
+
}, nn = (e) => {
|
|
515
|
+
u || T && T(e);
|
|
516
|
+
}, on = () => {
|
|
517
|
+
me() && Ve(le()).then((e) => {
|
|
518
|
+
Q(e), Xe();
|
|
519
|
+
});
|
|
520
|
+
}, de = (e, t) => {
|
|
521
|
+
if (!X(a))
|
|
522
|
+
return;
|
|
523
|
+
Le(j.fieldValueChanged, { newValue: e, oldValue: t });
|
|
524
|
+
const o = { fieldId: a.id, fieldName: M.value, newValue: e, oldValue: t };
|
|
525
|
+
A(l, j.fieldChange, o, c);
|
|
526
|
+
}, rn = (e) => bt(e), _e = (e, t) => Ne(fe(e), t), sn = (e) => {
|
|
527
|
+
ue(e), Ze(), _e(j.onInput, { value: e });
|
|
528
|
+
}, un = (e, t) => {
|
|
529
|
+
var o, d, E;
|
|
530
|
+
return (E = (d = (o = b.getWidgetRef(M.value)) == null ? void 0 : o.exposed) == null ? void 0 : d.handleBeforeChange) == null ? void 0 : E.call(d, e, t);
|
|
531
|
+
}, an = (...e) => {
|
|
532
|
+
var E, C, D;
|
|
533
|
+
let o = ((E = e == null ? void 0 : e[0]) == null ? void 0 : E.target) != null ? (D = (C = e == null ? void 0 : e[0]) == null ? void 0 : C.target) == null ? void 0 : D.value : e == null ? void 0 : e[0];
|
|
534
|
+
o = te(o);
|
|
535
|
+
var d = un(o, Re);
|
|
536
|
+
d != null ? ue(d) : ue(o), de(o, Re), Ze(), Ye(o);
|
|
537
|
+
}, cn = (e = !0) => {
|
|
538
|
+
re(P.readonly, e);
|
|
539
|
+
}, fn = (e = !0) => {
|
|
540
|
+
re(P.disabled, e);
|
|
541
|
+
}, ln = (e = !0) => {
|
|
542
|
+
re(P.hidden, e), e ? et() : ve();
|
|
543
|
+
}, mn = (e = !0) => {
|
|
544
|
+
qt(P.required, e), ve();
|
|
545
|
+
}, dn = (e) => {
|
|
546
|
+
re(P.label, e);
|
|
547
|
+
}, U = () => x == null ? void 0 : x.value, Pe = (e) => {
|
|
548
|
+
x.value = e, ee(e);
|
|
549
|
+
}, ae = (e) => {
|
|
550
|
+
let t = te(U());
|
|
551
|
+
if (Pe(e), !X(a))
|
|
552
|
+
return;
|
|
553
|
+
const o = U();
|
|
554
|
+
t !== o && (ue(o), de(e, t));
|
|
555
|
+
}, vn = () => {
|
|
556
|
+
me() ? Ve(le()).then((e) => {
|
|
557
|
+
Q(e);
|
|
558
|
+
}) : Q(null), _ == null || _();
|
|
559
|
+
}, gn = (e) => {
|
|
560
|
+
const t = U(), o = Z.insertOnMousePos(q.value, e, t);
|
|
561
|
+
ae(o);
|
|
562
|
+
}, hn = (e) => {
|
|
563
|
+
const t = U(), o = Z.deleteOnMousePos(e, t);
|
|
564
|
+
ae(o);
|
|
565
|
+
}, pn = (e, t) => {
|
|
566
|
+
ne(() => x == null ? void 0 : x.value, (o, d) => {
|
|
567
|
+
e == null || e({ id: a.id, name: M.value, newValue: o, oldValue: d });
|
|
568
|
+
}, t);
|
|
569
|
+
}, On = (e) => {
|
|
570
|
+
var C;
|
|
571
|
+
e.preventDefault();
|
|
572
|
+
const t = (D) => {
|
|
573
|
+
var G;
|
|
574
|
+
const L = (G = Array.from(D.classList)) == null ? void 0 : G.find((Se) => Et(Se));
|
|
575
|
+
return L ? Rt(L) : "";
|
|
576
|
+
}, o = document.activeElement;
|
|
577
|
+
if (!o)
|
|
578
|
+
return;
|
|
579
|
+
const d = document.getElementsByClassName(st.formItemTarget);
|
|
580
|
+
for (var E = 0; E < d.length; E++) {
|
|
581
|
+
const D = d[E], L = Ct(o, st.formItemTarget);
|
|
582
|
+
if (!L)
|
|
583
|
+
continue;
|
|
584
|
+
const G = t(D), Se = t(L);
|
|
585
|
+
if (G === Se) {
|
|
586
|
+
if (E === d.length - 1)
|
|
587
|
+
return;
|
|
588
|
+
const In = d[E + 1], Fn = t(In), We = b.findRefById(Fn, c);
|
|
589
|
+
try {
|
|
590
|
+
(C = We == null ? void 0 : We.exposed) == null || C.focus();
|
|
591
|
+
} catch (Tn) {
|
|
592
|
+
ce.error("handleEnter", Tn);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
let Vn = () => {
|
|
598
|
+
var D;
|
|
599
|
+
let e = {
|
|
600
|
+
componentName: M.value,
|
|
601
|
+
//用于组件事件emitter发射与接收处理
|
|
602
|
+
refList: g,
|
|
603
|
+
allRefList: h,
|
|
604
|
+
fieldEditor: () => q.value,
|
|
605
|
+
changeRegisterToRefList: (L, G) => {
|
|
606
|
+
b.changeRegisterToRefList(L, G), r.changeRegisterToRefList(L, G);
|
|
607
|
+
},
|
|
608
|
+
getField: i,
|
|
609
|
+
getFormData: s,
|
|
610
|
+
getValue: U,
|
|
611
|
+
setValue: Pe,
|
|
612
|
+
emit$: Le,
|
|
613
|
+
findRefByName: b.getWidgetRef,
|
|
614
|
+
findRefById: b.findRefById,
|
|
615
|
+
callRefFunc: b.callRefFunc,
|
|
616
|
+
getWidgetOption: fe,
|
|
617
|
+
setWidgetOption: re,
|
|
618
|
+
refreshKey: qe,
|
|
619
|
+
getRowScope: v,
|
|
620
|
+
//组件的数据绑定:继承的数据,用于计算组件属性变量
|
|
621
|
+
getOneSchemaData: Mt,
|
|
622
|
+
getSchemaDatas: _t,
|
|
623
|
+
getSchemaDataObject: xt,
|
|
624
|
+
getGlobalParams: Pt,
|
|
625
|
+
addCssClass: Qt,
|
|
626
|
+
removeCssClass: Xt
|
|
627
|
+
}, t = {
|
|
628
|
+
resetField: vn,
|
|
629
|
+
getValue: U,
|
|
630
|
+
setValue: ae,
|
|
631
|
+
refreshDefaultValue: on,
|
|
632
|
+
insertOnMousePos: gn,
|
|
633
|
+
deleteOnMousePos: hn,
|
|
634
|
+
disableChangeValidate: Ft,
|
|
635
|
+
enableChangeValidate: Tt,
|
|
636
|
+
focus: () => {
|
|
637
|
+
Z.focus(q.value);
|
|
638
|
+
},
|
|
639
|
+
blur: () => {
|
|
640
|
+
Z.blur(q.value);
|
|
641
|
+
},
|
|
642
|
+
getMousePos: () => {
|
|
643
|
+
Z.getMousePos(q.value);
|
|
644
|
+
},
|
|
645
|
+
setMousePos: (L) => {
|
|
646
|
+
Z.setMousePos(q.value, L);
|
|
647
|
+
}
|
|
648
|
+
}, o = {
|
|
649
|
+
loadOptionItems: en,
|
|
650
|
+
getCheckedItems: xe,
|
|
651
|
+
getCheckedLabels: Ue
|
|
652
|
+
}, d = {
|
|
653
|
+
[P.required]: { name: $.setRequired, fn: mn },
|
|
654
|
+
[P.label]: { name: $.setLabel, fn: dn },
|
|
655
|
+
[P.hidden]: { name: $.setHidden, fn: ln },
|
|
656
|
+
[P.disabled]: { name: $.setDisabled, fn },
|
|
657
|
+
[P.readonly]: { name: $.setReadonly, fn: cn }
|
|
658
|
+
}, E = {};
|
|
659
|
+
(D = Y(d)) == null || D.forEach((L) => {
|
|
660
|
+
if (Ie(a, L)) {
|
|
661
|
+
const G = d[L];
|
|
662
|
+
E[G.name] = G.fn;
|
|
663
|
+
}
|
|
664
|
+
});
|
|
665
|
+
var C = Oe(e, E);
|
|
666
|
+
return X(a) && (C = Oe(C, t)), Fe(a) && (C = Oe(C, o)), C;
|
|
667
|
+
};
|
|
668
|
+
const Cn = ge(() => ({
|
|
669
|
+
attrs: Ge.value,
|
|
670
|
+
extendAttrs: Ee.value,
|
|
671
|
+
events: k.value,
|
|
672
|
+
slots: je.value,
|
|
673
|
+
fieldKey: Me.value,
|
|
674
|
+
fieldEditor: q.value,
|
|
675
|
+
fieldName: M.value
|
|
676
|
+
})), yn = (e) => {
|
|
677
|
+
n.designState && n.designer && ne(() => {
|
|
678
|
+
var t;
|
|
679
|
+
return (t = n == null ? void 0 : n.widget) == null ? void 0 : t[e];
|
|
680
|
+
}, (t, o) => {
|
|
681
|
+
const { emitHistoryChange: d } = ro(n.designer);
|
|
682
|
+
d(`edit ${M.value}.${e},newValue:${t},oldValue:${o}`);
|
|
683
|
+
}, {
|
|
684
|
+
deep: !0
|
|
685
|
+
});
|
|
686
|
+
}, bn = (e, t, o) => {
|
|
687
|
+
const d = he(), E = Qe(e), C = (D) => {
|
|
688
|
+
t && (d.value = t(D || E));
|
|
689
|
+
};
|
|
690
|
+
return ft(E) ? ne(E, (D) => {
|
|
691
|
+
C(D), o && o(D);
|
|
692
|
+
}) : C(E), d;
|
|
693
|
+
}, En = () => {
|
|
694
|
+
!X(a) || u || pn((e) => {
|
|
695
|
+
const t = a == null ? void 0 : a.id;
|
|
696
|
+
io(h, t, W), fo(h, t, J.getOptions(a, P.relate), e), ee(e.newValue), setTimeout(() => {
|
|
697
|
+
ee(e.newValue), nn(e == null ? void 0 : e.newValue);
|
|
698
|
+
}, 1e3), de(e.newValue, e.oldValue);
|
|
699
|
+
}, { immediate: !0 });
|
|
700
|
+
}, Ze = () => {
|
|
701
|
+
const e = { propName: M.value };
|
|
702
|
+
A(l, j.fieldValidation, e, c);
|
|
703
|
+
}, we = () => {
|
|
704
|
+
const e = { fieldId: a.id, fieldName: M.value, rules: $e };
|
|
705
|
+
A(l, j.fieldRuleChange, e, c);
|
|
706
|
+
}, ve = () => {
|
|
707
|
+
if (!X(a))
|
|
708
|
+
return;
|
|
709
|
+
const e = Wt();
|
|
710
|
+
return we(), e;
|
|
711
|
+
}, et = () => {
|
|
712
|
+
It(), we();
|
|
713
|
+
}, Rn = () => {
|
|
714
|
+
Ie(a, "change") && (k.value.change = an), Ie(a, "input") && (k.value.input = sn), K(Xn.setFormData, (e) => {
|
|
715
|
+
ae(e[M.value]);
|
|
716
|
+
}), K(j.fieldValueChanged, (e) => {
|
|
717
|
+
_e(j.onChange, { value: e == null ? void 0 : e.newValue, oldValue: e == null ? void 0 : e.oldValue });
|
|
718
|
+
});
|
|
719
|
+
}, Mn = () => {
|
|
720
|
+
let e = M.value;
|
|
721
|
+
X(a) ? ((!pe(V, e) || V[e] === void 0) && (Q(null), me() && Ve(le()).then((t) => {
|
|
722
|
+
t == null ? Q(null) : Q(t);
|
|
723
|
+
})), Xe()) : me() && Ve(le()).then((t) => {
|
|
724
|
+
ae(t);
|
|
725
|
+
}), Ye(U());
|
|
726
|
+
}, xn = () => {
|
|
727
|
+
Fe(a) && ne(() => ie == null ? void 0 : ie.value, (e, t) => {
|
|
728
|
+
ee(x.value);
|
|
729
|
+
}, { immediate: !0 });
|
|
730
|
+
}, _n = () => {
|
|
731
|
+
ke(!0, P.css, void 0, (e) => {
|
|
732
|
+
tt();
|
|
733
|
+
});
|
|
734
|
+
}, Pn = () => {
|
|
735
|
+
const e = An(Yn.isRenderComplete), t = () => {
|
|
736
|
+
setTimeout(() => {
|
|
737
|
+
xn(), En();
|
|
738
|
+
}, 10);
|
|
739
|
+
};
|
|
740
|
+
if (e != null && e.value) {
|
|
741
|
+
t();
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
e != null && ne(() => e == null ? void 0 : e.value, (o) => {
|
|
745
|
+
o && t();
|
|
746
|
+
}, { immediate: !0 });
|
|
747
|
+
}, Sn = () => {
|
|
748
|
+
var e, t;
|
|
749
|
+
if (p)
|
|
750
|
+
try {
|
|
751
|
+
Mn(), ve(), Rn(), b.registerToRefList(M.value), r.registerToRefList(M.value), (t = (e = k == null ? void 0 : k.value) == null ? void 0 : e.created) == null || t.call(e), yt();
|
|
752
|
+
} catch (o) {
|
|
753
|
+
ce.error("create", o);
|
|
754
|
+
}
|
|
755
|
+
}, Wn = () => {
|
|
756
|
+
p && (ct(() => {
|
|
757
|
+
var e, t;
|
|
758
|
+
try {
|
|
759
|
+
tt(), _n(), Pn(), (t = (e = k == null ? void 0 : k.value) == null ? void 0 : e.mounted) == null || t.call(e);
|
|
760
|
+
} catch (o) {
|
|
761
|
+
console.log("mounted", a, o);
|
|
762
|
+
}
|
|
763
|
+
}), $n(() => {
|
|
764
|
+
b.unregisterFromRefList(M.value), r.unregisterFromRefList(M.value);
|
|
765
|
+
}));
|
|
766
|
+
}, tt = () => {
|
|
767
|
+
const e = a == null ? void 0 : a.id, t = fe(P.css);
|
|
768
|
+
t && e && eo(t).then((o) => {
|
|
769
|
+
to(o, e);
|
|
770
|
+
});
|
|
771
|
+
};
|
|
772
|
+
return Sn(), Wn(), {
|
|
773
|
+
exposed: Vn(),
|
|
774
|
+
fieldModel: x,
|
|
775
|
+
objFieldModel: wt,
|
|
776
|
+
numFieldModel: Zt,
|
|
777
|
+
fieldEditor: q,
|
|
778
|
+
fieldKey: Me,
|
|
779
|
+
field: a,
|
|
780
|
+
instance: c,
|
|
781
|
+
attrs: Ge,
|
|
782
|
+
extendAttrs: Ee,
|
|
783
|
+
slots: je,
|
|
784
|
+
events: k,
|
|
785
|
+
rules: $e,
|
|
786
|
+
fieldObj: Cn,
|
|
787
|
+
getValue: U,
|
|
788
|
+
setValue: Pe,
|
|
789
|
+
pageConfig: B,
|
|
790
|
+
formModel: V,
|
|
791
|
+
fieldName: M,
|
|
792
|
+
propResultOpt: W,
|
|
793
|
+
optionItems: ie,
|
|
794
|
+
activeOptionItems: At,
|
|
795
|
+
activeOptionItem: kt,
|
|
796
|
+
activeOptionItemIndex: Gt,
|
|
797
|
+
refreshOptionItems: Nt,
|
|
798
|
+
refreshOptionField: ee,
|
|
799
|
+
filterOptionItems: Bt,
|
|
800
|
+
setOptionItems: Ae,
|
|
801
|
+
getCheckedItems: xe,
|
|
802
|
+
getCheckedOptionItems: (e, t) => $t(e || x.value, t),
|
|
803
|
+
getCheckedOptionLabels: (e, t) => jt(e || x.value, t),
|
|
804
|
+
getCheckedOptionValues: (e, t) => Lt(e || x.value, t),
|
|
805
|
+
getCheckedOptionText: (e, t) => Dt(e || x.value, t),
|
|
806
|
+
refreshKey: qe,
|
|
807
|
+
watchKeyValue: bn,
|
|
808
|
+
watchPropAndSaveHistoryStep: yn,
|
|
809
|
+
existEvent: rn,
|
|
810
|
+
handleEvent: _e,
|
|
811
|
+
handleEnter: On,
|
|
812
|
+
getPropName: Yt,
|
|
813
|
+
emitFieldDataChange: de,
|
|
814
|
+
syncUpdateFormModel: ue,
|
|
815
|
+
getWidgetRef: b.getWidgetRef,
|
|
816
|
+
clearRules: et,
|
|
817
|
+
buildRules: ve,
|
|
818
|
+
getFieldOptionModel: Qe,
|
|
819
|
+
getFieldOptions: se,
|
|
820
|
+
hasFieldOptions: Ut,
|
|
821
|
+
setFieldOptions: Jt,
|
|
822
|
+
getWidgetOption: fe,
|
|
823
|
+
getWidgetOptionByPropValue: Kt,
|
|
824
|
+
singleOption: zt,
|
|
825
|
+
watchOption: ke,
|
|
826
|
+
mergeOptionToFormModel: Je
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
export {
|
|
830
|
+
De as R,
|
|
831
|
+
be as a,
|
|
832
|
+
Ro as b,
|
|
833
|
+
co as u
|
|
834
|
+
};
|