@guodun/antdv 1.4.7 → 1.5.1
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/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +315 -286
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +316 -285
- package/dist/es/components/contract-signing-location/src/ContractSigningTemplatePage.vue.mjs +62 -54
- package/dist/es/components/contract-signing-location/style/index.css +1 -1
- package/dist/es/components/index.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/index.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractPrintIframe.mjs +7 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractPrintIframe.vue.mjs +129 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractPrintIframe.vue_vue_type_style_index_0_scoped_a9912ff0_lang.css +1 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.mjs +10 -5
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +64 -43
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.mjs +82 -53
- package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +271 -265
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +762 -751
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +217 -197
- package/dist/es/components/pro-contract-template-designer/src/constants.mjs +29 -51
- package/dist/es/components/pro-contract-template-designer/src/extensions/template-variable.mjs +103 -103
- package/dist/es/components/pro-contract-template-designer/src/extensions/word-paste.mjs +24 -21
- package/dist/es/components/pro-contract-template-designer/src/utils/contract-print-document.mjs +314 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/page-decorations.mjs +1 -1
- package/dist/es/components/pro-contract-template-designer/src/utils/template-variable-render.mjs +47 -47
- package/dist/es/components/pro-contract-template-designer/src/utils/word-paste.mjs +216 -148
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/index.mjs +27 -26
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/ContractSigningTemplatePage.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/style/index.css +1 -1
- package/dist/lib/components/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractPrintIframe.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractPrintIframe.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractPrintIframe.vue_vue_type_style_index_0_scoped_a9912ff0_lang.css +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/constants.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/template-variable.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/word-paste.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/contract-print-document.cjs +211 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/page-decorations.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-variable-render.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/word-paste.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/theme/contract-signing-location.css +1 -1
- package/dist/theme/icon.css +1 -1
- package/dist/theme/index.css +1 -1
- package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +7 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.d.ts +4 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningTemplatePage.vue.d.ts +9 -3
- package/dist/types/components/contract-signing-location/src/types.d.ts +5 -0
- package/dist/types/components/pro-contract-template-designer/index.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractPrintIframe.vue.d.ts +35 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.d.ts +2 -2
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.d.ts +13 -1
- package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +6 -0
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/constants.d.ts +4 -4
- package/dist/types/components/pro-contract-template-designer/src/extensions/word-paste.d.ts +8 -0
- package/dist/types/components/pro-contract-template-designer/src/types.d.ts +10 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/contract-print-document.d.ts +119 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/word-paste.d.ts +2 -0
- package/package.json +2 -1
package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs
CHANGED
|
@@ -71,7 +71,8 @@ var Ee = {
|
|
|
71
71
|
remoteRequestTimeoutMs: { default: 1e4 },
|
|
72
72
|
remoteOptionsCacheTtlMs: { default: 3e4 },
|
|
73
73
|
selectorHttp: { default: void 0 },
|
|
74
|
-
selectorUrlPrefix: { default: "" }
|
|
74
|
+
selectorUrlPrefix: { default: "" },
|
|
75
|
+
contractFontBaseUrl: { default: void 0 }
|
|
75
76
|
},
|
|
76
77
|
emits: [
|
|
77
78
|
"update:values",
|
|
@@ -95,10 +96,10 @@ var Ee = {
|
|
|
95
96
|
label: "有错误",
|
|
96
97
|
value: "error"
|
|
97
98
|
}
|
|
98
|
-
], We = _(), E = _(), Ge = _(), D = _(c(w.template, w.values)), Ke = _({ ...D.value }), O = _(!1), k = _([]), A = _(!1), j = _(!1),
|
|
99
|
+
], We = _(), E = _(), Ge = _(), D = _(c(w.template, w.values)), Ke = _({ ...D.value }), O = _(!1), k = _([]), A = _(!1), j = _(!1), M = _(""), N = _(""), P = _(""), qe = _(0), F = _(Zt(w.zoom)), I = _(""), L = _("all"), R = _(!1), Je = _(/* @__PURE__ */ new Map()), z = /* @__PURE__ */ new Map(), Ye = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map(), Xe = /* @__PURE__ */ new Set(), { width: Ze } = Se(E), Qe = l(() => w.readonly || w.disabled), V = l(() => te(w.template)), $e = l(() => O.value ? k.value : V.value), H = l(() => (Array.isArray(w.template?.variables) ? w.template.variables : []).filter((t) => !!t?.key && e(t.type ?? "text"))), et = l(() => {
|
|
99
100
|
let e = { ...D.value };
|
|
100
101
|
return H.value.forEach((t) => {
|
|
101
|
-
let n =
|
|
102
|
+
let n = jt(t);
|
|
102
103
|
if (n?.toDisplayText) try {
|
|
103
104
|
e[t.key] = n.toDisplayText(e[t.key], {
|
|
104
105
|
variable: t,
|
|
@@ -106,27 +107,26 @@ var Ee = {
|
|
|
106
107
|
});
|
|
107
108
|
} catch {}
|
|
108
109
|
}), e;
|
|
109
|
-
}),
|
|
110
|
+
}), tt = l(() => H.value.filter((e) => s(D.value[e.key])).length), nt = l(() => {
|
|
110
111
|
let e = /* @__PURE__ */ new Map();
|
|
111
|
-
return
|
|
112
|
+
return $e.value.forEach((t) => {
|
|
112
113
|
t.variableKey && e.set(t.variableKey, [...e.get(t.variableKey) ?? [], t]);
|
|
113
114
|
}), e;
|
|
114
115
|
}), U = l(() => {
|
|
115
116
|
let e = w.interactionMode === "panel";
|
|
116
|
-
return o(w.template, e ?
|
|
117
|
+
return o(w.template, e ? et.value : Ke.value, {
|
|
117
118
|
readonly: w.readonly,
|
|
118
119
|
disabled: w.disabled,
|
|
119
|
-
mode: e ? "display" : "control"
|
|
120
|
-
activeKey: e ? M.value : ""
|
|
120
|
+
mode: e ? "display" : "control"
|
|
121
121
|
});
|
|
122
|
-
}),
|
|
122
|
+
}), rt = l(() => {
|
|
123
123
|
let e = /* @__PURE__ */ new Map(), t = new Set(H.value.map((e) => e.key));
|
|
124
124
|
return U.value.forEach((n) => {
|
|
125
|
-
|
|
125
|
+
Gt(n.contentHtml).forEach((r) => {
|
|
126
126
|
t.has(r) && !e.has(r) && e.set(r, n.id);
|
|
127
127
|
});
|
|
128
128
|
}), e;
|
|
129
|
-
}),
|
|
129
|
+
}), it = l(() => H.value.filter(Bt)), at = l(() => {
|
|
130
130
|
let e = U.value.map((e, t) => ({
|
|
131
131
|
id: `page:${e.id}`,
|
|
132
132
|
pageId: e.id,
|
|
@@ -140,19 +140,19 @@ var Ee = {
|
|
|
140
140
|
variables: []
|
|
141
141
|
};
|
|
142
142
|
return H.value.forEach((e) => {
|
|
143
|
-
let r = t.get(
|
|
144
|
-
r.allVariables.push(e),
|
|
143
|
+
let r = t.get(rt.value.get(e.key) ?? "") ?? n;
|
|
144
|
+
r.allVariables.push(e), Bt(e) && r.variables.push(e);
|
|
145
145
|
}), [...e, n].filter((e) => e.variables.length > 0).map((e) => ({
|
|
146
146
|
id: e.id,
|
|
147
147
|
title: e.title,
|
|
148
148
|
totalCount: e.allVariables.length,
|
|
149
149
|
variables: e.variables
|
|
150
150
|
}));
|
|
151
|
-
}),
|
|
151
|
+
}), ot = l(() => U.value.length > 0), st = l(() => H.value.filter((e) => !s(D.value[e.key])).length), ct = l(() => H.value.filter((e) => e.required && s(D.value[e.key])).length), lt = l(() => H.value.length ? Math.round(st.value / H.value.length * 100) : 0), ut = l(() => O.value && k.value.length === 0), dt = l(() => O.value ? ut.value ? "校验通过,模板与填写值均符合规则" : `发现 ${k.value.length} 个模板或填写问题` : V.value.length ? `模板存在 ${V.value.length} 个问题,已安全降级展示` : ""), ft = l(() => O.value ? $e.value.length > 0 || j.value : V.value.length > 0);
|
|
152
152
|
b(() => w.template, (e) => {
|
|
153
|
-
W(c(e, w.values), !1),
|
|
153
|
+
W(c(e, w.values), !1), Ct();
|
|
154
154
|
let t = Array.isArray(e?.pages) ? e.pages.map((e) => e?.id) : [];
|
|
155
|
-
t.includes(
|
|
155
|
+
t.includes(P.value) || (P.value = t.find(Boolean) ?? ""), N.value && !H.value.some((e) => e.key === N.value) && Dt();
|
|
156
156
|
}, { deep: !0 }), b(() => [
|
|
157
157
|
w.template?.variables,
|
|
158
158
|
w.optionResolver,
|
|
@@ -161,19 +161,19 @@ var Ee = {
|
|
|
161
161
|
w.remoteRequestTimeoutMs,
|
|
162
162
|
w.remoteOptionsCacheTtlMs
|
|
163
163
|
], () => {
|
|
164
|
-
|
|
164
|
+
Nt();
|
|
165
165
|
}, {
|
|
166
166
|
deep: !0,
|
|
167
167
|
immediate: !0
|
|
168
168
|
}), b(() => w.values, (e) => {
|
|
169
169
|
let t = c(w.template, e);
|
|
170
|
-
|
|
170
|
+
Qt(t, D.value) || (W(t, !1, { refreshInlineHtml: w.interactionMode !== "inline" }), Ct());
|
|
171
171
|
}, { deep: !0 }), b(() => w.interactionMode, (e) => {
|
|
172
172
|
e === "inline" && (Ke.value = { ...D.value });
|
|
173
173
|
}), b(() => w.collapsiblePanel, (e) => {
|
|
174
|
-
e || (
|
|
175
|
-
}), b(() => w.zoom, (e) =>
|
|
176
|
-
!
|
|
174
|
+
e || (R.value = !1);
|
|
175
|
+
}), b(() => w.zoom, (e) => F.value = Zt(e)), b(U, (e) => {
|
|
176
|
+
!P.value && e.length && (P.value = e[0].id);
|
|
177
177
|
}, { immediate: !0 });
|
|
178
178
|
function W(e, t = !0, n = {}) {
|
|
179
179
|
D.value = { ...e }, n.refreshInlineHtml !== !1 && (Ke.value = { ...e }), t && (T("update:values", { ...D.value }), T("change", { ...D.value }));
|
|
@@ -182,136 +182,149 @@ var Ee = {
|
|
|
182
182
|
!e || Qe.value || (W({
|
|
183
183
|
...D.value,
|
|
184
184
|
[e]: t
|
|
185
|
-
}, !0, { refreshInlineHtml: w.interactionMode !== "inline" }), O.value &&
|
|
185
|
+
}, !0, { refreshInlineHtml: w.interactionMode !== "inline" }), O.value && yt());
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function pt(e) {
|
|
188
188
|
if (w.interactionMode !== "inline") return;
|
|
189
189
|
let t = e.target;
|
|
190
190
|
if (!(t instanceof HTMLInputElement) && !(t instanceof HTMLTextAreaElement)) return;
|
|
191
191
|
let n = t.dataset.key || "";
|
|
192
192
|
n && (t instanceof HTMLInputElement && t.type === "checkbox" ? G(n, t.checked) : t instanceof HTMLInputElement && t.type === "number" ? G(n, t.value === "" ? void 0 : t.valueAsNumber) : G(n, t.value));
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function mt(e) {
|
|
195
195
|
let t = e.target;
|
|
196
196
|
if (!(t instanceof Element)) return;
|
|
197
197
|
let n = t.closest("[data-render-page-id]");
|
|
198
|
-
n?.dataset.renderPageId && (
|
|
198
|
+
n?.dataset.renderPageId && (P.value = n.dataset.renderPageId);
|
|
199
199
|
let r = t.closest("[data-contract-render-wrapper], [data-contract-render-control]")?.dataset.key || "";
|
|
200
|
-
r &&
|
|
200
|
+
r && Y(r);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function ht(e) {
|
|
203
|
+
let t = U.value.find((t) => t.id === e.pageId), n = H.value.some((t) => t.key === e.key);
|
|
204
|
+
if (!(!t || !n || !Gt(t.contentHtml).has(e.key)) && !(e.kind === "input" && w.interactionMode !== "inline")) {
|
|
205
|
+
if (P.value = e.pageId, e.kind === "input") {
|
|
206
|
+
G(e.key, e.value);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
Y(e.key);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
function gt(e) {
|
|
203
213
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
204
214
|
let t = e.target;
|
|
205
|
-
!(t instanceof HTMLElement) || !t.dataset.key || (e.preventDefault(),
|
|
215
|
+
!(t instanceof HTMLElement) || !t.dataset.key || (e.preventDefault(), Y(t.dataset.key));
|
|
206
216
|
}
|
|
207
|
-
function
|
|
217
|
+
function _t() {
|
|
208
218
|
return { ...D.value };
|
|
209
219
|
}
|
|
210
|
-
function
|
|
220
|
+
function vt(e) {
|
|
211
221
|
W(c(w.template, e));
|
|
212
222
|
}
|
|
213
|
-
function
|
|
223
|
+
function yt() {
|
|
214
224
|
let e = ne(w.template, D.value);
|
|
215
|
-
return
|
|
225
|
+
return wt(e), T("validate", e), e;
|
|
216
226
|
}
|
|
217
|
-
function
|
|
227
|
+
function bt() {
|
|
218
228
|
let e = ee(w.template, D.value, w.validateOnSubmit);
|
|
219
|
-
if ((w.validateOnSubmit || e.length) && (
|
|
220
|
-
let t =
|
|
229
|
+
if ((w.validateOnSubmit || e.length) && (wt(e), T("validate", e)), e.length) return kt(e[0]), !1;
|
|
230
|
+
let t = _t();
|
|
221
231
|
return T("submit", t), t;
|
|
222
232
|
}
|
|
223
|
-
function
|
|
224
|
-
return W(a(w.template)),
|
|
233
|
+
function xt() {
|
|
234
|
+
return W(a(w.template)), Ct(), _t();
|
|
225
235
|
}
|
|
226
|
-
function
|
|
236
|
+
function St() {
|
|
227
237
|
Qe.value || ve.confirm({
|
|
228
238
|
title: "重置填写内容?",
|
|
229
239
|
content: "将恢复模板中的默认值,当前未提交的填写内容会被覆盖。",
|
|
230
240
|
okText: "确认重置",
|
|
231
241
|
cancelText: "取消",
|
|
232
|
-
onOk: () =>
|
|
242
|
+
onOk: () => xt()
|
|
233
243
|
});
|
|
234
244
|
}
|
|
235
|
-
function
|
|
245
|
+
function Ct() {
|
|
236
246
|
O.value = !1, k.value = [], A.value = !1, j.value = !1, q();
|
|
237
247
|
}
|
|
238
|
-
function
|
|
248
|
+
function wt(e) {
|
|
239
249
|
if (k.value = e, O.value = !0, A.value = !1, e.length) {
|
|
240
250
|
j.value = !1, q();
|
|
241
251
|
return;
|
|
242
252
|
}
|
|
243
|
-
|
|
253
|
+
Tt();
|
|
244
254
|
}
|
|
245
255
|
let K;
|
|
246
256
|
function q() {
|
|
247
257
|
K &&= (clearTimeout(K), void 0);
|
|
248
258
|
}
|
|
249
|
-
function
|
|
259
|
+
function Tt() {
|
|
250
260
|
q(), j.value = !0, K = setTimeout(() => {
|
|
251
261
|
j.value = !1, K = void 0;
|
|
252
262
|
}, Be);
|
|
253
263
|
}
|
|
254
264
|
function J(e) {
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
function
|
|
258
|
-
w.interactionMode === "panel" && (
|
|
259
|
-
}
|
|
260
|
-
function
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
+
Y(e, !0);
|
|
266
|
+
}
|
|
267
|
+
function Et(e) {
|
|
268
|
+
w.interactionMode === "panel" && (R.value &&= !1, H.value.some((t) => t.key === e) && !it.value.some((t) => t.key === e) && Vt());
|
|
269
|
+
}
|
|
270
|
+
function Y(e, t = !1) {
|
|
271
|
+
if (!e) return;
|
|
272
|
+
Et(e), N.value = e, M.value = e;
|
|
273
|
+
let n = rt.value.get(e);
|
|
274
|
+
n && (P.value = n), t && (qe.value += 1), de(() => {
|
|
275
|
+
Ot(e);
|
|
276
|
+
let r = n ? E.value?.querySelector(`[data-render-page-id="${$(n)}"]`) : void 0;
|
|
277
|
+
t && r?.scrollIntoView({
|
|
265
278
|
behavior: "smooth",
|
|
266
279
|
block: "center",
|
|
267
280
|
inline: "center"
|
|
268
|
-
}), w.interactionMode === "panel" && Ge.value?.querySelector(`[data-field-key="${
|
|
281
|
+
}), w.interactionMode === "panel" && Ge.value?.querySelector(`[data-field-key="${$(e)}"]`)?.scrollIntoView({
|
|
269
282
|
behavior: "smooth",
|
|
270
283
|
block: "nearest"
|
|
271
284
|
});
|
|
272
|
-
})
|
|
273
|
-
}
|
|
274
|
-
function Et() {
|
|
275
|
-
M.value = "", qe.value = "", Dt("");
|
|
285
|
+
});
|
|
276
286
|
}
|
|
277
|
-
function Dt(
|
|
278
|
-
|
|
287
|
+
function Dt() {
|
|
288
|
+
N.value = "", M.value = "", Ot("");
|
|
279
289
|
}
|
|
280
290
|
function Ot(e) {
|
|
281
|
-
|
|
291
|
+
E.value?.querySelectorAll("[data-contract-render-wrapper], [data-contract-render-control]").forEach((t) => t.classList.toggle("is-active", !!e && t.dataset.key === e));
|
|
282
292
|
}
|
|
283
293
|
function kt(e) {
|
|
284
|
-
|
|
294
|
+
e.variableKey ? J(e.variableKey) : e.pageId && Xt(e.pageId);
|
|
295
|
+
}
|
|
296
|
+
function At(e) {
|
|
297
|
+
return nt.value.get(e) ?? [];
|
|
285
298
|
}
|
|
286
|
-
function
|
|
299
|
+
function X(e) {
|
|
287
300
|
return Je.value.get(e.key) ?? {
|
|
288
301
|
options: e.options ?? [],
|
|
289
302
|
loading: !1
|
|
290
303
|
};
|
|
291
304
|
}
|
|
292
|
-
function
|
|
305
|
+
function jt(e) {
|
|
293
306
|
let t = e.componentKey || e.type || "";
|
|
294
307
|
return t ? w.controlRegistry?.[t] : void 0;
|
|
295
308
|
}
|
|
296
|
-
function
|
|
309
|
+
function Z(e, t) {
|
|
297
310
|
let n = new Map(Je.value);
|
|
298
311
|
n.set(e, t), Je.value = n;
|
|
299
312
|
}
|
|
300
|
-
function
|
|
313
|
+
function Mt(e) {
|
|
301
314
|
T("control-warning", e);
|
|
302
315
|
}
|
|
303
|
-
async function
|
|
304
|
-
|
|
316
|
+
async function Nt() {
|
|
317
|
+
z.forEach((e) => e.abort()), z.clear(), Ye.clear(), Xe.clear();
|
|
305
318
|
let e = Array.isArray(w.template?.variables) ? w.template.variables : [];
|
|
306
319
|
await Promise.all(e.map(async (e) => {
|
|
307
320
|
if (!e?.key) return;
|
|
308
321
|
let t = Array.isArray(e.options) ? e.options.map((e) => ({ ...e })) : [];
|
|
309
|
-
if (e.dataSource ? await
|
|
322
|
+
if (e.dataSource ? await Pt(e, t) : Z(e.key, {
|
|
310
323
|
options: t,
|
|
311
324
|
loading: !1
|
|
312
|
-
}), e.type === "custom" && !
|
|
325
|
+
}), e.type === "custom" && !jt(e)) {
|
|
313
326
|
let t = e.componentKey || "", n = `${e.key}:${t}`;
|
|
314
|
-
Xe.has(n) || (Xe.add(n),
|
|
327
|
+
Xe.has(n) || (Xe.add(n), Mt({
|
|
315
328
|
code: "CONTROL_COMPONENT_MISSING",
|
|
316
329
|
variableKey: e.key,
|
|
317
330
|
componentKey: t,
|
|
@@ -320,28 +333,28 @@ var Ee = {
|
|
|
320
333
|
}
|
|
321
334
|
}));
|
|
322
335
|
}
|
|
323
|
-
async function
|
|
336
|
+
async function Pt(e, n) {
|
|
324
337
|
let r = e.dataSource;
|
|
325
338
|
if (!r) return;
|
|
326
339
|
let i = new AbortController();
|
|
327
|
-
|
|
340
|
+
z.set(e.key, i), Z(e.key, {
|
|
328
341
|
options: n,
|
|
329
342
|
loading: !0
|
|
330
343
|
});
|
|
331
|
-
let a =
|
|
344
|
+
let a = Ft(e), o = Date.now(), s = Ye.get(a);
|
|
332
345
|
if (s && s.expiresAt > o) {
|
|
333
|
-
|
|
346
|
+
Z(e.key, {
|
|
334
347
|
options: s.options,
|
|
335
348
|
loading: !1
|
|
336
|
-
}),
|
|
349
|
+
}), z.delete(e.key);
|
|
337
350
|
return;
|
|
338
351
|
}
|
|
339
352
|
let c = "CONTROL_OPTIONS_LOAD_FAILED";
|
|
340
353
|
try {
|
|
341
354
|
r.kind === "url" && !t(r.url, w.allowedRemoteOrigins) && (c = "CONTROL_REMOTE_URL_BLOCKED");
|
|
342
|
-
let o =
|
|
343
|
-
o || (o =
|
|
344
|
-
|
|
355
|
+
let o = B.get(a);
|
|
356
|
+
o || (o = It(e, r, c, i), B.set(a, o), o.finally(() => {
|
|
357
|
+
B.get(a) === o && B.delete(a);
|
|
345
358
|
}).catch(() => void 0));
|
|
346
359
|
let s = await o;
|
|
347
360
|
if (i.signal.aborted) return;
|
|
@@ -349,7 +362,7 @@ var Ee = {
|
|
|
349
362
|
ee > 0 && Ye.set(a, {
|
|
350
363
|
options: s,
|
|
351
364
|
expiresAt: Date.now() + ee
|
|
352
|
-
}),
|
|
365
|
+
}), Z(e.key, {
|
|
353
366
|
options: s.length ? s : n,
|
|
354
367
|
loading: !1
|
|
355
368
|
});
|
|
@@ -357,28 +370,28 @@ var Ee = {
|
|
|
357
370
|
let r = t instanceof Error && t.message.startsWith("高级控件请求超时");
|
|
358
371
|
if (i.signal.aborted && !r) return;
|
|
359
372
|
let a = t instanceof Error ? t.message : "高级控件选项加载失败";
|
|
360
|
-
|
|
373
|
+
Z(e.key, {
|
|
361
374
|
options: n,
|
|
362
375
|
loading: !1,
|
|
363
376
|
error: a
|
|
364
|
-
}),
|
|
377
|
+
}), Mt({
|
|
365
378
|
code: c,
|
|
366
379
|
variableKey: e.key,
|
|
367
380
|
message: `${e.label || e.key}:${a}`,
|
|
368
381
|
cause: t
|
|
369
382
|
});
|
|
370
383
|
} finally {
|
|
371
|
-
|
|
384
|
+
z.get(e.key) === i && z.delete(e.key);
|
|
372
385
|
}
|
|
373
386
|
}
|
|
374
|
-
function
|
|
387
|
+
function Ft(e) {
|
|
375
388
|
try {
|
|
376
389
|
return JSON.stringify([e.type, e.dataSource]);
|
|
377
390
|
} catch {
|
|
378
391
|
return `${e.key}:${e.type}`;
|
|
379
392
|
}
|
|
380
393
|
}
|
|
381
|
-
async function
|
|
394
|
+
async function It(e, r, a, o) {
|
|
382
395
|
let s;
|
|
383
396
|
if (r.kind === "resolver") {
|
|
384
397
|
if (!w.optionResolver) throw Error(`缺少 resolver ${r.resolverKey} 的宿主实现`);
|
|
@@ -392,7 +405,7 @@ var Ee = {
|
|
|
392
405
|
if (!t(r.url, w.allowedRemoteOrigins)) throw Error(`远程地址未在 allowlist 中:${r.url}`);
|
|
393
406
|
if (!w.requester) throw Error("缺少宿主 requester,组件库不会直接发起网络请求");
|
|
394
407
|
let n = i(r.timeoutMs, w.remoteRequestTimeoutMs);
|
|
395
|
-
s = await
|
|
408
|
+
s = await Lt(w.requester({
|
|
396
409
|
url: r.url,
|
|
397
410
|
method: r.method || "GET",
|
|
398
411
|
params: r.params,
|
|
@@ -404,7 +417,7 @@ var Ee = {
|
|
|
404
417
|
}
|
|
405
418
|
return n(s, r.kind === "url" ? r : void 0, e.type || "select");
|
|
406
419
|
}
|
|
407
|
-
function
|
|
420
|
+
function Lt(e, t, n) {
|
|
408
421
|
return new Promise((r, i) => {
|
|
409
422
|
let a = () => {
|
|
410
423
|
clearTimeout(c), t.signal.removeEventListener("abort", s);
|
|
@@ -416,13 +429,13 @@ var Ee = {
|
|
|
416
429
|
t.signal.addEventListener("abort", s, { once: !0 }), e.then((e) => o(() => r(e)), (e) => o(() => i(e)));
|
|
417
430
|
});
|
|
418
431
|
}
|
|
419
|
-
function
|
|
420
|
-
let t =
|
|
432
|
+
function Rt(e) {
|
|
433
|
+
let t = X(e);
|
|
421
434
|
return {
|
|
422
435
|
variable: e,
|
|
423
436
|
value: D.value[e.key],
|
|
424
|
-
errors:
|
|
425
|
-
active:
|
|
437
|
+
errors: At(e.key),
|
|
438
|
+
active: N.value === e.key,
|
|
426
439
|
readonly: w.readonly,
|
|
427
440
|
disabled: w.disabled,
|
|
428
441
|
options: t.options,
|
|
@@ -432,10 +445,10 @@ var Ee = {
|
|
|
432
445
|
focusVariable: () => J(e.key)
|
|
433
446
|
};
|
|
434
447
|
}
|
|
435
|
-
function
|
|
448
|
+
function zt() {
|
|
436
449
|
let e = H.value;
|
|
437
450
|
if (!e.length) return;
|
|
438
|
-
let t = e.findIndex((e) => e.key ===
|
|
451
|
+
let t = e.findIndex((e) => e.key === N.value), n = t < 0 ? 0 : t + 1;
|
|
439
452
|
for (let t = 0; t < e.length; t += 1) {
|
|
440
453
|
let r = e[(n + t) % e.length];
|
|
441
454
|
if (s(D.value[r.key])) {
|
|
@@ -444,30 +457,30 @@ var Ee = {
|
|
|
444
457
|
}
|
|
445
458
|
}
|
|
446
459
|
}
|
|
447
|
-
function
|
|
448
|
-
let t =
|
|
449
|
-
return !t || e.key.toLocaleLowerCase().includes(t) || (e.label ?? "").toLocaleLowerCase().includes(t) ?
|
|
460
|
+
function Bt(e) {
|
|
461
|
+
let t = I.value.trim().toLocaleLowerCase();
|
|
462
|
+
return !t || e.key.toLocaleLowerCase().includes(t) || (e.label ?? "").toLocaleLowerCase().includes(t) ? L.value === "unfilled" ? s(D.value[e.key]) : L.value === "error" ? At(e.key).length > 0 : !0 : !1;
|
|
450
463
|
}
|
|
451
|
-
function
|
|
452
|
-
|
|
464
|
+
function Vt() {
|
|
465
|
+
I.value = "", L.value = "all";
|
|
453
466
|
}
|
|
454
|
-
function
|
|
455
|
-
let n =
|
|
467
|
+
function Ht(e, t) {
|
|
468
|
+
let n = it.value;
|
|
456
469
|
if (!n.length) return;
|
|
457
470
|
let r = n.findIndex((t) => t.key === e), i = n[r < 0 ? 0 : (r + t + n.length) % n.length]?.key;
|
|
458
|
-
i && (J(i), de(() =>
|
|
459
|
-
}
|
|
460
|
-
function Ht(e) {
|
|
461
|
-
(Ge.value?.querySelector(`[data-field-key="${Q(e)}"]`))?.querySelector("input:not([disabled]), textarea:not([disabled]), button:not([disabled])")?.focus();
|
|
471
|
+
i && (J(i), de(() => Ut(i)));
|
|
462
472
|
}
|
|
463
473
|
function Ut(e) {
|
|
474
|
+
(Ge.value?.querySelector(`[data-field-key="${$(e)}"]`))?.querySelector("input:not([disabled]), textarea:not([disabled]), button:not([disabled])")?.focus();
|
|
475
|
+
}
|
|
476
|
+
function Wt(e) {
|
|
464
477
|
if (e.key !== "Enter" || e.target instanceof HTMLTextAreaElement) return;
|
|
465
478
|
let t = e.target;
|
|
466
479
|
if (!(t instanceof Element)) return;
|
|
467
480
|
let n = t.closest("[data-field-key]")?.dataset.fieldKey;
|
|
468
|
-
n && (e.preventDefault(),
|
|
481
|
+
n && (e.preventDefault(), Ht(n, e.shiftKey ? -1 : 1));
|
|
469
482
|
}
|
|
470
|
-
function
|
|
483
|
+
function Gt(e) {
|
|
471
484
|
let t = /* @__PURE__ */ new Set();
|
|
472
485
|
if (typeof DOMParser < "u") return new DOMParser().parseFromString(e, "text/html").querySelectorAll("[data-key]").forEach((e) => {
|
|
473
486
|
let n = e.getAttribute("data-key")?.trim();
|
|
@@ -480,69 +493,69 @@ var Ee = {
|
|
|
480
493
|
}
|
|
481
494
|
return t;
|
|
482
495
|
}
|
|
483
|
-
function Gt() {
|
|
484
|
-
!w.collapsiblePanel || w.interactionMode !== "panel" || (L.value = !L.value);
|
|
485
|
-
}
|
|
486
|
-
function Z(e) {
|
|
487
|
-
let t = Xt(e);
|
|
488
|
-
return P.value = t, T("update:zoom", t), t;
|
|
489
|
-
}
|
|
490
496
|
function Kt() {
|
|
491
|
-
|
|
497
|
+
!w.collapsiblePanel || w.interactionMode !== "panel" || (R.value = !R.value);
|
|
498
|
+
}
|
|
499
|
+
function Q(e) {
|
|
500
|
+
let t = Zt(e);
|
|
501
|
+
return F.value = t, T("update:zoom", t), t;
|
|
492
502
|
}
|
|
493
503
|
function qt() {
|
|
494
|
-
return
|
|
504
|
+
return Q(1);
|
|
495
505
|
}
|
|
496
506
|
function Jt() {
|
|
507
|
+
return F.value;
|
|
508
|
+
}
|
|
509
|
+
function Yt() {
|
|
497
510
|
let e = Math.max(...U.value.map((e) => e.width), 1);
|
|
498
|
-
return
|
|
511
|
+
return Q(Math.max(0, Ze.value - 48) / e);
|
|
499
512
|
}
|
|
500
|
-
function
|
|
501
|
-
e && (
|
|
502
|
-
E.value?.querySelector(`[data-render-page-id="${
|
|
513
|
+
function Xt(e) {
|
|
514
|
+
e && (P.value = e, de(() => {
|
|
515
|
+
E.value?.querySelector(`[data-render-page-id="${$(e)}"]`)?.scrollIntoView({
|
|
503
516
|
behavior: "smooth",
|
|
504
517
|
block: "start",
|
|
505
518
|
inline: "center"
|
|
506
519
|
});
|
|
507
520
|
}));
|
|
508
521
|
}
|
|
509
|
-
function
|
|
522
|
+
function Zt(e) {
|
|
510
523
|
let t = Number(e);
|
|
511
524
|
return Number.isFinite(t) ? Math.min(ze, Math.max(Re, Math.round(t * 100) / 100)) : 1;
|
|
512
525
|
}
|
|
513
|
-
function
|
|
526
|
+
function $(e) {
|
|
514
527
|
return e.replaceAll("\\", "\\\\").replaceAll("\"", "\\\"");
|
|
515
528
|
}
|
|
516
|
-
function
|
|
529
|
+
function Qt(e, t) {
|
|
517
530
|
let n = new Set([...Object.keys(e), ...Object.keys(t)]);
|
|
518
531
|
return Array.from(n).every((n) => e[n] === t[n]);
|
|
519
532
|
}
|
|
520
|
-
function
|
|
521
|
-
!(e.ctrlKey || e.metaKey) || !
|
|
533
|
+
function $t(e) {
|
|
534
|
+
!(e.ctrlKey || e.metaKey) || !ot.value || (e.preventDefault(), Q(e.deltaY > 0 ? F.value - C : F.value + C));
|
|
522
535
|
}
|
|
523
|
-
let
|
|
524
|
-
function
|
|
525
|
-
|
|
536
|
+
let en;
|
|
537
|
+
function tn() {
|
|
538
|
+
en?.removeEventListener("wheel", $t), en = void 0;
|
|
526
539
|
}
|
|
527
|
-
function
|
|
528
|
-
|
|
540
|
+
function nn(e) {
|
|
541
|
+
tn(), e && (e.addEventListener("wheel", $t, { passive: !1 }), en = e);
|
|
529
542
|
}
|
|
530
543
|
return b(E, (e) => {
|
|
531
|
-
|
|
544
|
+
nn(e);
|
|
532
545
|
}, { immediate: !0 }), pe(() => {
|
|
533
|
-
|
|
546
|
+
tn(), q(), z.forEach((e) => e.abort()), z.clear();
|
|
534
547
|
}), Ve({
|
|
535
|
-
getValues:
|
|
536
|
-
setValues:
|
|
537
|
-
validate:
|
|
538
|
-
submit:
|
|
539
|
-
resetValues:
|
|
548
|
+
getValues: _t,
|
|
549
|
+
setValues: vt,
|
|
550
|
+
validate: yt,
|
|
551
|
+
submit: bt,
|
|
552
|
+
resetValues: xt,
|
|
540
553
|
scrollToVariable: J,
|
|
541
|
-
setZoom:
|
|
542
|
-
resetZoom:
|
|
543
|
-
getZoom:
|
|
544
|
-
fitWidth:
|
|
545
|
-
scrollToPage:
|
|
554
|
+
setZoom: Q,
|
|
555
|
+
resetZoom: qt,
|
|
556
|
+
getZoom: Jt,
|
|
557
|
+
fitWidth: Yt,
|
|
558
|
+
scrollToPage: Xt
|
|
546
559
|
}), (e, t) => (g(), f("section", {
|
|
547
560
|
ref_key: "rendererElement",
|
|
548
561
|
ref: We,
|
|
@@ -552,20 +565,20 @@ var Ee = {
|
|
|
552
565
|
"is-panel": h.interactionMode === "panel",
|
|
553
566
|
"is-inline": h.interactionMode === "inline"
|
|
554
567
|
}]),
|
|
555
|
-
onClick:
|
|
556
|
-
onKeydown:
|
|
557
|
-
onInput:
|
|
558
|
-
onChange:
|
|
568
|
+
onClick: mt,
|
|
569
|
+
onKeydown: gt,
|
|
570
|
+
onInput: pt,
|
|
571
|
+
onChange: pt
|
|
559
572
|
}, [
|
|
560
|
-
|
|
573
|
+
ot.value ? (g(), u(ie, {
|
|
561
574
|
key: 0,
|
|
562
575
|
title: h.title,
|
|
563
|
-
"filled-count":
|
|
576
|
+
"filled-count": st.value,
|
|
564
577
|
"total-count": H.value.length,
|
|
565
|
-
"required-missing-count":
|
|
566
|
-
zoom:
|
|
578
|
+
"required-missing-count": ct.value,
|
|
579
|
+
zoom: F.value,
|
|
567
580
|
pages: U.value,
|
|
568
|
-
"active-page-id":
|
|
581
|
+
"active-page-id": P.value,
|
|
569
582
|
"min-zoom": Re,
|
|
570
583
|
"max-zoom": ze,
|
|
571
584
|
"show-toolbar": h.showToolbar,
|
|
@@ -573,18 +586,18 @@ var Ee = {
|
|
|
573
586
|
"show-reset-button": h.showResetButton,
|
|
574
587
|
"show-submit-button": h.showSubmitButton,
|
|
575
588
|
"show-panel-toggle": h.interactionMode === "panel" && h.collapsiblePanel,
|
|
576
|
-
"panel-collapsed":
|
|
589
|
+
"panel-collapsed": R.value,
|
|
577
590
|
readonly: h.readonly,
|
|
578
591
|
disabled: h.disabled,
|
|
579
|
-
onZoomIn: t[0] ||= (e) =>
|
|
580
|
-
onZoomOut: t[1] ||= (e) =>
|
|
581
|
-
onResetZoom:
|
|
582
|
-
onFitWidth:
|
|
583
|
-
onSelectPage:
|
|
584
|
-
onValidate:
|
|
585
|
-
onReset:
|
|
586
|
-
onSubmit:
|
|
587
|
-
onTogglePanel:
|
|
592
|
+
onZoomIn: t[0] ||= (e) => Q(F.value + C),
|
|
593
|
+
onZoomOut: t[1] ||= (e) => Q(F.value - C),
|
|
594
|
+
onResetZoom: qt,
|
|
595
|
+
onFitWidth: Yt,
|
|
596
|
+
onSelectPage: Xt,
|
|
597
|
+
onValidate: yt,
|
|
598
|
+
onReset: St,
|
|
599
|
+
onSubmit: bt,
|
|
600
|
+
onTogglePanel: Kt
|
|
588
601
|
}, {
|
|
589
602
|
extra: x(() => [he(e.$slots, "headerExtra")]),
|
|
590
603
|
_: 3
|
|
@@ -605,55 +618,62 @@ var Ee = {
|
|
|
605
618
|
"readonly",
|
|
606
619
|
"disabled"
|
|
607
620
|
])) : d("", !0),
|
|
608
|
-
|
|
621
|
+
ft.value ? (g(), u(oe, {
|
|
609
622
|
key: 1,
|
|
610
|
-
passed:
|
|
611
|
-
summary:
|
|
612
|
-
errors:
|
|
623
|
+
passed: ut.value,
|
|
624
|
+
summary: dt.value,
|
|
625
|
+
errors: $e.value,
|
|
613
626
|
expanded: A.value,
|
|
614
627
|
onToggle: t[2] ||= (e) => A.value = !A.value,
|
|
615
|
-
onFocusError:
|
|
628
|
+
onFocusError: kt
|
|
616
629
|
}, null, 8, [
|
|
617
630
|
"passed",
|
|
618
631
|
"summary",
|
|
619
632
|
"errors",
|
|
620
633
|
"expanded"
|
|
621
634
|
])) : d("", !0),
|
|
622
|
-
|
|
635
|
+
ot.value ? (g(), f("div", {
|
|
623
636
|
key: 3,
|
|
624
637
|
class: fe(["gd-contract-template-renderer__workspace", { "is-inline": h.interactionMode === "inline" }])
|
|
625
638
|
}, [p("div", {
|
|
626
639
|
ref_key: "pagesViewportElement",
|
|
627
640
|
ref: E,
|
|
628
641
|
class: "gd-contract-template-renderer__pages-viewport",
|
|
629
|
-
"data-highlighted-variable-key":
|
|
642
|
+
"data-highlighted-variable-key": M.value
|
|
630
643
|
}, [p("div", Oe, [(g(!0), f(se, null, me(U.value, (e, t) => (g(), u(ae, {
|
|
631
644
|
key: e.id,
|
|
632
645
|
page: e,
|
|
633
646
|
index: t,
|
|
634
647
|
total: U.value.length,
|
|
635
|
-
zoom:
|
|
636
|
-
"show-meta": h.showPageMeta
|
|
648
|
+
zoom: F.value,
|
|
649
|
+
"show-meta": h.showPageMeta,
|
|
650
|
+
"font-base-url": h.contractFontBaseUrl,
|
|
651
|
+
"active-key": M.value,
|
|
652
|
+
"scroll-request": qe.value,
|
|
653
|
+
onInteraction: ht
|
|
637
654
|
}, null, 8, [
|
|
638
655
|
"page",
|
|
639
656
|
"index",
|
|
640
657
|
"total",
|
|
641
658
|
"zoom",
|
|
642
|
-
"show-meta"
|
|
659
|
+
"show-meta",
|
|
660
|
+
"font-base-url",
|
|
661
|
+
"active-key",
|
|
662
|
+
"scroll-request"
|
|
643
663
|
]))), 128))])], 8, De), h.interactionMode === "panel" ? (g(), f("div", {
|
|
644
664
|
key: 0,
|
|
645
|
-
class: fe(["gd-contract-template-renderer__panel-wrap", { "is-collapsed":
|
|
665
|
+
class: fe(["gd-contract-template-renderer__panel-wrap", { "is-collapsed": R.value && h.collapsiblePanel }])
|
|
646
666
|
}, [h.collapsiblePanel ? (g(), u(y(xe), {
|
|
647
667
|
key: 0,
|
|
648
|
-
title:
|
|
668
|
+
title: R.value ? "展开填写面板" : "收起填写面板"
|
|
649
669
|
}, {
|
|
650
670
|
default: x(() => [p("button", {
|
|
651
671
|
type: "button",
|
|
652
672
|
class: "gd-contract-template-renderer__panel-handle",
|
|
653
|
-
"aria-label":
|
|
654
|
-
"aria-expanded": !
|
|
655
|
-
onClick: t[3] ||= (e) =>
|
|
656
|
-
}, [
|
|
673
|
+
"aria-label": R.value ? "展开填写面板" : "收起填写面板",
|
|
674
|
+
"aria-expanded": !R.value,
|
|
675
|
+
onClick: t[3] ||= (e) => R.value = !R.value
|
|
676
|
+
}, [R.value ? (g(), u(y(Ce), {
|
|
657
677
|
key: 0,
|
|
658
678
|
"aria-hidden": "true"
|
|
659
679
|
})) : (g(), u(y(we), {
|
|
@@ -662,10 +682,10 @@ var Ee = {
|
|
|
662
682
|
}))], 8, ke)]),
|
|
663
683
|
_: 1
|
|
664
684
|
}, 8, ["title"])) : d("", !0), p("div", Ae, [p("aside", je, [p("div", Me, [
|
|
665
|
-
p("div", Ne, [p("div", null, [t[6] ||= p("strong", null, "填写项", -1), p("span", null, v(
|
|
685
|
+
p("div", Ne, [p("div", null, [t[6] ||= p("strong", null, "填写项", -1), p("span", null, v(st.value) + " / " + v(H.value.length) + " 已填写", 1)]), p("span", null, v(ct.value ? `${ct.value} 项必填未完成` : "必填项已完成"), 1)]),
|
|
666
686
|
m(y(_e), {
|
|
667
|
-
value:
|
|
668
|
-
"onUpdate:value": t[4] ||= (e) =>
|
|
687
|
+
value: I.value,
|
|
688
|
+
"onUpdate:value": t[4] ||= (e) => I.value = e,
|
|
669
689
|
"allow-clear": "",
|
|
670
690
|
size: "small",
|
|
671
691
|
class: "gd-contract-template-renderer__field-search",
|
|
@@ -675,47 +695,47 @@ var Ee = {
|
|
|
675
695
|
_: 1
|
|
676
696
|
}, 8, ["value"]),
|
|
677
697
|
p("div", Pe, [m(y(be), {
|
|
678
|
-
value:
|
|
679
|
-
"onUpdate:value": t[5] ||= (e) =>
|
|
698
|
+
value: L.value,
|
|
699
|
+
"onUpdate:value": t[5] ||= (e) => L.value = e,
|
|
680
700
|
size: "small",
|
|
681
701
|
class: "gd-contract-template-renderer__field-filter",
|
|
682
702
|
options: Ue
|
|
683
703
|
}, null, 8, ["value"]), m(y(ge), {
|
|
684
704
|
size: "small",
|
|
685
|
-
disabled: !
|
|
686
|
-
onClick:
|
|
705
|
+
disabled: !tt.value,
|
|
706
|
+
onClick: zt
|
|
687
707
|
}, {
|
|
688
708
|
default: x(() => [...t[7] ||= [le(" 下一个未填项 ", -1)]]),
|
|
689
709
|
_: 1
|
|
690
710
|
}, 8, ["disabled"])]),
|
|
691
711
|
m(y(ye), {
|
|
692
|
-
percent:
|
|
712
|
+
percent: lt.value,
|
|
693
713
|
size: "small",
|
|
694
714
|
"show-info": !1
|
|
695
715
|
}, null, 8, ["percent"])
|
|
696
|
-
]),
|
|
716
|
+
]), it.value.length ? (g(), f("div", {
|
|
697
717
|
key: 1,
|
|
698
718
|
ref_key: "fieldListElement",
|
|
699
719
|
ref: Ge,
|
|
700
720
|
class: "gd-contract-template-renderer__field-list",
|
|
701
|
-
onKeydownCapture:
|
|
702
|
-
}, [(g(!0), f(se, null, me(
|
|
721
|
+
onKeydownCapture: Wt
|
|
722
|
+
}, [(g(!0), f(se, null, me(at.value, (t) => (g(), f("div", {
|
|
703
723
|
key: t.id,
|
|
704
724
|
class: "gd-contract-template-renderer__field-group"
|
|
705
725
|
}, [p("div", Fe, [p("strong", null, v(t.title), 1), p("span", null, v(t.variables.length) + " / " + v(t.totalCount) + " 项", 1)]), p("div", Ie, [(g(!0), f(se, null, me(t.variables, (t) => (g(), f("div", {
|
|
706
726
|
key: t.id || t.key,
|
|
707
727
|
"data-field-key": t.key
|
|
708
|
-
}, [he(e.$slots, "field", ue({ ref_for: !0 },
|
|
728
|
+
}, [he(e.$slots, "field", ue({ ref_for: !0 }, Rt(t)), () => [m(re, {
|
|
709
729
|
variable: t,
|
|
710
730
|
value: D.value[t.key],
|
|
711
|
-
errors:
|
|
712
|
-
active:
|
|
731
|
+
errors: At(t.key),
|
|
732
|
+
active: N.value === t.key,
|
|
713
733
|
readonly: h.readonly,
|
|
714
734
|
disabled: h.disabled,
|
|
715
|
-
options:
|
|
716
|
-
loading:
|
|
717
|
-
"load-error":
|
|
718
|
-
registration:
|
|
735
|
+
options: X(t).options,
|
|
736
|
+
loading: X(t).loading,
|
|
737
|
+
"load-error": X(t).error,
|
|
738
|
+
registration: jt(t),
|
|
719
739
|
"selector-http": h.selectorHttp,
|
|
720
740
|
"selector-url-prefix": h.selectorUrlPrefix,
|
|
721
741
|
onUpdateValue: (e) => G(t.key, e),
|
|
@@ -741,17 +761,17 @@ var Ee = {
|
|
|
741
761
|
description: H.value.length ? "没有符合条件的填写项" : "暂无填写项",
|
|
742
762
|
image: y(S).PRESENTED_IMAGE_SIMPLE
|
|
743
763
|
}, ce({
|
|
744
|
-
default: x(() => [
|
|
764
|
+
default: x(() => [I.value || L.value !== "all" ? (g(), u(y(ge), {
|
|
745
765
|
key: 0,
|
|
746
766
|
type: "link",
|
|
747
767
|
size: "small",
|
|
748
|
-
onClick:
|
|
768
|
+
onClick: Vt
|
|
749
769
|
}, {
|
|
750
770
|
default: x(() => [...t[9] ||= [le("清除筛选", -1)]]),
|
|
751
771
|
_: 1
|
|
752
772
|
})) : d("", !0)]),
|
|
753
773
|
_: 2
|
|
754
|
-
}, [
|
|
774
|
+
}, [I.value || L.value !== "all" ? {
|
|
755
775
|
name: "description",
|
|
756
776
|
fn: x(() => [t[8] ||= p("span", null, "没有符合条件的填写项", -1)]),
|
|
757
777
|
key: "0"
|