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