@guodun/antdv 1.7.9 → 1.7.10

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