@guodun/antdv 1.4.2 → 1.4.4

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 (59) hide show
  1. package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +304 -293
  2. package/dist/es/components/contract-signing-location/src/ContractSigningTemplatePage.vue.mjs +66 -13
  3. package/dist/es/components/contract-signing-location/src/constants.mjs +27 -17
  4. package/dist/es/components/contract-signing-location/src/coordinates.mjs +23 -23
  5. package/dist/es/components/contract-signing-location/src/location-rules.mjs +20 -10
  6. package/dist/es/components/contract-signing-location/src/page-layout.mjs +12 -9
  7. package/dist/es/components/contract-signing-location/src/template-source.mjs +52 -34
  8. package/dist/es/components/contract-signing-location/style/index.css +1 -1
  9. package/dist/es/components/index.mjs +1 -1
  10. package/dist/es/components/pro-contract-template-designer/index.mjs +1 -1
  11. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.mjs +186 -148
  12. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +4 -4
  13. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.mjs +5 -0
  14. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.mjs +179 -0
  15. package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +149 -126
  16. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1229 -1059
  17. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +34 -34
  18. package/dist/es/components/pro-contract-template-designer/src/utils/page-decorations.mjs +17 -17
  19. package/dist/es/components/pro-contract-template-designer/src/utils/signing-placement.mjs +14 -14
  20. package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +89 -89
  21. package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
  22. package/dist/es/index.mjs +25 -25
  23. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
  24. package/dist/lib/components/contract-signing-location/src/ContractSigningTemplatePage.vue.cjs +1 -1
  25. package/dist/lib/components/contract-signing-location/src/constants.cjs +1 -1
  26. package/dist/lib/components/contract-signing-location/src/coordinates.cjs +1 -1
  27. package/dist/lib/components/contract-signing-location/src/location-rules.cjs +1 -1
  28. package/dist/lib/components/contract-signing-location/src/page-layout.cjs +1 -1
  29. package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -1
  30. package/dist/lib/components/contract-signing-location/style/index.css +1 -1
  31. package/dist/lib/components/index.cjs +1 -1
  32. package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
  33. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.cjs +1 -1
  34. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -1
  35. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.cjs +1 -0
  36. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.cjs +1 -0
  37. package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
  38. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
  39. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +3 -3
  40. package/dist/lib/components/pro-contract-template-designer/src/utils/page-decorations.cjs +1 -1
  41. package/dist/lib/components/pro-contract-template-designer/src/utils/signing-placement.cjs +1 -1
  42. package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +2 -2
  43. package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
  44. package/dist/lib/index.cjs +1 -1
  45. package/dist/theme/contract-signing-location.css +1 -1
  46. package/dist/theme/icon.css +1 -1
  47. package/dist/theme/index.css +1 -1
  48. package/dist/types/components/contract-signing-location/src/ContractSigningTemplatePage.vue.d.ts +3 -1
  49. package/dist/types/components/contract-signing-location/src/constants.d.ts +18 -0
  50. package/dist/types/components/contract-signing-location/src/coordinates.d.ts +8 -2
  51. package/dist/types/components/contract-signing-location/src/page-layout.d.ts +2 -2
  52. package/dist/types/components/contract-signing-location/src/template-source.d.ts +19 -0
  53. package/dist/types/components/contract-signing-location/src/types.d.ts +3 -0
  54. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.d.ts +10 -0
  55. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.d.ts +43 -0
  56. package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +22 -0
  57. package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +90 -0
  58. package/dist/types/components/pro-contract-template-designer/src/utils/context-menu-viewport.d.ts +3 -0
  59. package/package.json +5 -3
@@ -1,9 +1,9 @@
1
- import { isContractTemplateFieldType as e } from "../types.mjs";
1
+ import { DEFAULT_CONTRACT_FONT_FAMILY as e } from "../constants.mjs";
2
2
  import { canUseDomHtml as t, createElementAttributeReader as n, createTagAttributeReader as r, escapeHtmlAttribute as i, escapeHtmlText as a, forEachHtmlTag as o, readNumberAttribute as s, readOptionalBoolean as c, readOptionalNumber as l, replaceTemplateVariableSpans as u } from "../utils/html.mjs";
3
- import { normalizeSigningPlacements as ee, scaleSigningPlacementToPage as te, validateSigningPlacements as ne } from "../utils/signing-placement.mjs";
4
- import { DEFAULT_CONTRACT_FONT_FAMILY as re } from "../constants.mjs";
5
- import { resolveTemplateVariablePresentation as ie } from "../utils/template-variable-render.mjs";
6
- import { buildPageDecorationClassNames as ae, buildPageDecorationsHtml as d, collectPageDecorationVariableKeys as f, normalizePageDecorations as p, validatePageDecorations as m } from "../utils/page-decorations.mjs";
3
+ import { resolveTemplateVariablePresentation as ee } from "../utils/template-variable-render.mjs";
4
+ import { buildPageDecorationClassNames as te, buildPageDecorationsHtml as d, collectPageDecorationVariableKeys as f, normalizePageDecorations as p, validatePageDecorations as m } from "../utils/page-decorations.mjs";
5
+ import { isContractTemplateFieldType as ne } from "../types.mjs";
6
+ import { normalizeSigningPlacements as re, scaleSigningPlacementToPage as ie, validateSigningPlacements as ae } from "../utils/signing-placement.mjs";
7
7
  //#region src/components/pro-contract-template-designer/src/composables/use-template-designer.ts
8
8
  var h = [
9
9
  {
@@ -58,26 +58,26 @@ var h = [
58
58
  color: "#1f2937",
59
59
  background: "transparent",
60
60
  fontSize: 14,
61
- fontFamily: re,
61
+ fontFamily: e,
62
62
  placeholderColor: "#7a818b",
63
63
  lineColor: "#565b66",
64
64
  textAlign: "left",
65
65
  borderStyle: "solid",
66
66
  objectFit: "contain"
67
- }, oe = 3, se = 28, v = "contract-template-renderer-1.0.0", y = "contract-render-css-1.0.0", b = /^[A-Za-z][A-Za-z0-9_]{1,63}$/, ce = new Set([
67
+ }, oe = 3, se = 28, v = "contract-template-renderer-1.0.0", y = "contract-render-css-1.0.0", b = /^[A-Za-z][A-Za-z0-9_]{1,63}$/, x = new Set([
68
68
  "pageNumber",
69
69
  "totalPages",
70
70
  "rendererVersion"
71
71
  ]);
72
- function x(e, t, n) {
72
+ function S(e, t, n) {
73
73
  let r = typeof e == "string" ? e.trim() : "";
74
- return r ? b.test(r) ? ce.has(r) ? `${r} 是系统保留标识` : t.some((e) => e.id !== n && e.key.trim() === r) ? `变量标识 ${r} 已存在` : "" : "变量标识需以字母开头,仅包含字母、数字和下划线,长度为 2~64 位" : "请输入变量标识";
74
+ return r ? b.test(r) ? x.has(r) ? `${r} 是系统保留标识` : t.some((e) => e.id !== n && e.key.trim() === r) ? `变量标识 ${r} 已存在` : "" : "变量标识需以字母开头,仅包含字母、数字和下划线,长度为 2~64 位" : "请输入变量标识";
75
75
  }
76
- function le(e) {
76
+ function ce(e) {
77
77
  let t = Number(e);
78
78
  return Number.isFinite(t) && t >= 1 ? Math.max(1, Math.floor(t)) : 20;
79
79
  }
80
- var S = [
80
+ var C = [
81
81
  {
82
82
  type: "text",
83
83
  label: "输入框",
@@ -108,11 +108,11 @@ var S = [
108
108
  defaultWidth: 96,
109
109
  defaultHeight: 28
110
110
  }
111
- ], C = 0;
112
- function w(e) {
113
- return C += 1, `${e}-${Date.now().toString(36)}-${C.toString(36)}`;
114
- }
111
+ ], w = 0;
115
112
  function T(e) {
113
+ return w += 1, `${e}-${Date.now().toString(36)}-${w.toString(36)}`;
114
+ }
115
+ function le(e) {
116
116
  let t = JSON.parse(JSON.stringify(e));
117
117
  return Array.isArray(t.signingPlacements) && (t.signingPlacements = t.signingPlacements.map((e) => ({
118
118
  id: e.id,
@@ -191,7 +191,7 @@ function ue(e, t) {
191
191
  };
192
192
  }), c = [], l = (e.signingPlacements ?? []).map((e) => {
193
193
  let t = o.get(e.pageId);
194
- return t ? (c.push(e.id), te(e, t.source, t.target)) : e;
194
+ return t ? (c.push(e.id), ie(e, t.source, t.target)) : e;
195
195
  });
196
196
  return {
197
197
  value: {
@@ -209,7 +209,7 @@ function M(e, t) {
209
209
  }
210
210
  function N(e = 1, t) {
211
211
  return {
212
- id: w("page"),
212
+ id: T("page"),
213
213
  title: `第 ${e} 页`,
214
214
  pageSize: t ? O(t) : void 0,
215
215
  contentHtml: "<p>请输入合同正文。</p>"
@@ -217,7 +217,7 @@ function N(e = 1, t) {
217
217
  }
218
218
  function P(e = 1, t, n = "<p></p>", r) {
219
219
  return {
220
- id: w("page"),
220
+ id: T("page"),
221
221
  title: `第 ${e} 页`,
222
222
  pageSize: t ? O(t) : void 0,
223
223
  contentHtml: n,
@@ -242,13 +242,13 @@ function de(e = g) {
242
242
  signingPlacements: []
243
243
  };
244
244
  }
245
- function I(e, t = S) {
246
- return t.find((t) => t.type === e) ?? S[0];
245
+ function I(e, t = C) {
246
+ return t.find((t) => t.type === e) ?? C[0];
247
247
  }
248
- function L(e, t = S, n = {}) {
248
+ function L(e, t = C, n = {}) {
249
249
  let r = e.type === void 0 ? "text" : e.type, i = I(r, t), a = fe(r);
250
250
  return {
251
- id: e.id ?? w("variable"),
251
+ id: e.id ?? T("variable"),
252
252
  key: e.key,
253
253
  label: e.label ?? i.label ?? e.key,
254
254
  type: r,
@@ -315,13 +315,13 @@ function fe(e) {
315
315
  underline: !0
316
316
  } };
317
317
  }
318
- function R(t) {
319
- return t !== void 0 && !e(t);
318
+ function R(e) {
319
+ return e !== void 0 && !ne(e);
320
320
  }
321
321
  function pe(e, t = g) {
322
322
  if (!e) return F(t);
323
323
  let n = O(e.pageSize, t), r = (e.pages?.length ? e.pages : [N(1, n)]).map((e, t) => ({
324
- id: e.id || w("page"),
324
+ id: e.id || T("page"),
325
325
  title: e.title || `第 ${t + 1} 页`,
326
326
  pageSize: O(e.pageSize, n),
327
327
  contentHtml: e.contentHtml || "<p></p>",
@@ -330,7 +330,7 @@ function pe(e, t = g) {
330
330
  return (e.variables ?? []).forEach((e) => {
331
331
  let t = L({
332
332
  ...e,
333
- id: e.id || w("variable")
333
+ id: e.id || T("variable")
334
334
  });
335
335
  i.push(t), t.key && a.set(t.key, t);
336
336
  }), r.forEach((e) => {
@@ -356,7 +356,7 @@ function pe(e, t = g) {
356
356
  pages: r,
357
357
  variables: i,
358
358
  pageSize: n,
359
- signingPlacements: ee(e.signingPlacements, o, n),
359
+ signingPlacements: re(e.signingPlacements, o, n),
360
360
  ...e.pageDecorations ? { pageDecorations: p(e.pageDecorations) } : {}
361
361
  };
362
362
  }
@@ -401,7 +401,7 @@ var V = class extends Error {
401
401
  function ge(e) {
402
402
  let t = m(e.pageDecorations, e.variables);
403
403
  if (t.length) throw new V(t);
404
- let n = T(e);
404
+ let n = le(e);
405
405
  return n.pageDecorations &&= p(n.pageDecorations), {
406
406
  ...n,
407
407
  rendererVersion: v,
@@ -418,7 +418,7 @@ function H(e, t = {}) {
418
418
  code: "PAGE_LIMIT_EXCEEDED",
419
419
  message: `合同共 ${e.pages.length} 页,超过最多 ${t.maxPages} 页限制`
420
420
  }), e.variables.forEach((t) => {
421
- let i = x(t.key, e.variables, t.id), a = !!t.key?.trim() && e.variables.some((e) => e.id !== t.id && e.key.trim() === t.key.trim());
421
+ let i = S(t.key, e.variables, t.id), a = !!t.key?.trim() && e.variables.some((e) => e.id !== t.id && e.key.trim() === t.key.trim());
422
422
  i && (!a || t.key !== t.key.trim()) && n.push({
423
423
  type: "variable",
424
424
  id: t.id,
@@ -454,7 +454,7 @@ function H(e, t = {}) {
454
454
  id: e.id,
455
455
  message: `${e.label || e.key} 缺少对应正文变量节点`
456
456
  });
457
- }), n.push(...m(e.pageDecorations, e.variables)), n.push(...ne(e)), n;
457
+ }), n.push(...m(e.pageDecorations, e.variables)), n.push(...ae(e)), n;
458
458
  }
459
459
  function U(e) {
460
460
  let t = /* @__PURE__ */ new Set();
@@ -484,7 +484,7 @@ function ve(e) {
484
484
  let t = W(e), n = f(e.pageDecorations);
485
485
  return {
486
486
  ...e,
487
- variables: e.variables.filter((r) => x(r.key, e.variables, r.id) ? !0 : t.has(r.key) || n.has(r.key))
487
+ variables: e.variables.filter((r) => S(r.key, e.variables, r.id) ? !0 : t.has(r.key) || n.has(r.key))
488
488
  };
489
489
  }
490
490
  function ye(e, t, n) {
@@ -511,7 +511,7 @@ function G(e, t, n, r, i) {
511
511
  function K(e, t, n, r = 1) {
512
512
  let a = O(e.pageSize, t);
513
513
  return [
514
- `class="${ae(n, r)}"`,
514
+ `class="${te(n, r)}"`,
515
515
  `data-page-id="${i(e.id)}"`,
516
516
  `data-page-format="${i(a.format ?? "Custom")}"`,
517
517
  `data-page-label="${i(a.label ?? a.format ?? "自定义")}"`,
@@ -638,7 +638,7 @@ function we(e) {
638
638
  });
639
639
  }
640
640
  function J(e, t) {
641
- let n = e("data-key") ?? "", r = t.get(n), i = r?.type ?? e("data-variable-type") ?? "text", a = ke(i, r?.defaultValue ?? e("data-default-value") ?? ""), o = ie({
641
+ let n = e("data-key") ?? "", r = t.get(n), i = r?.type ?? e("data-variable-type") ?? "text", a = ke(i, r?.defaultValue ?? e("data-default-value") ?? ""), o = ee({
642
642
  type: i,
643
643
  width: r?.width ?? e("data-width"),
644
644
  height: r?.height ?? e("data-height"),
@@ -737,4 +737,4 @@ function Pe(e, t = []) {
737
737
  });
738
738
  }
739
739
  //#endregion
740
- export { v as CONTRACT_TEMPLATE_RENDERER_VERSION, ce as CONTRACT_TEMPLATE_RESERVED_VARIABLE_KEYS, y as CONTRACT_TEMPLATE_STYLE_VERSION, b as CONTRACT_TEMPLATE_VARIABLE_KEY_PATTERN, V as ContractTemplatePageDecorationValidationError, _ as DEFAULT_FIELD_STYLE, S as DEFAULT_FIELD_TYPES, se as DEFAULT_MULTILINE_LINE_HEIGHT, oe as DEFAULT_MULTILINE_ROWS, g as DEFAULT_PAGE_SIZE, h as PAGE_SIZE_OPTIONS, z as buildTemplateExpressionHtml, me as buildTemplateHtml, he as buildTemplatePreviewHtml, B as buildTemplatePreviewPages, T as cloneTemplateValue, Pe as collectTemplateLocationRuleExportErrors, W as collectTemplateValueVariableKeys, U as collectTemplateVariableKeys, ue as constrainTemplatePageSizes, P as createBlankPage, de as createBlankTemplate, N as createDefaultPage, F as createDefaultTemplate, w as createDesignerId, L as createTemplateVariable, ge as exportTemplateValue, j as findPageSizeOption, I as getFieldOption, k as getPageSizeKey, E as getPageSizeOption, D as inferPageFormat, le as normalizeContractTemplateMaxPages, A as normalizePageSizeOptions, pe as normalizeTemplateValue, O as resolvePageSize, ye as splitPageContentByMeasurements, ve as syncTemplateVariablesWithPages, x as validateContractTemplateVariableKey, H as validateTemplateValue };
740
+ export { v as CONTRACT_TEMPLATE_RENDERER_VERSION, x as CONTRACT_TEMPLATE_RESERVED_VARIABLE_KEYS, y as CONTRACT_TEMPLATE_STYLE_VERSION, b as CONTRACT_TEMPLATE_VARIABLE_KEY_PATTERN, V as ContractTemplatePageDecorationValidationError, _ as DEFAULT_FIELD_STYLE, C as DEFAULT_FIELD_TYPES, se as DEFAULT_MULTILINE_LINE_HEIGHT, oe as DEFAULT_MULTILINE_ROWS, g as DEFAULT_PAGE_SIZE, h as PAGE_SIZE_OPTIONS, z as buildTemplateExpressionHtml, me as buildTemplateHtml, he as buildTemplatePreviewHtml, B as buildTemplatePreviewPages, le as cloneTemplateValue, Pe as collectTemplateLocationRuleExportErrors, W as collectTemplateValueVariableKeys, U as collectTemplateVariableKeys, ue as constrainTemplatePageSizes, P as createBlankPage, de as createBlankTemplate, N as createDefaultPage, F as createDefaultTemplate, T as createDesignerId, L as createTemplateVariable, ge as exportTemplateValue, j as findPageSizeOption, I as getFieldOption, k as getPageSizeKey, E as getPageSizeOption, D as inferPageFormat, ce as normalizeContractTemplateMaxPages, A as normalizePageSizeOptions, pe as normalizeTemplateValue, O as resolvePageSize, ye as splitPageContentByMeasurements, ve as syncTemplateVariablesWithPages, S as validateContractTemplateVariableKey, H as validateTemplateValue };
@@ -1,5 +1,5 @@
1
- import { escapeHtmlAttribute as e, escapeHtmlText as t } from "./html.mjs";
2
- import { DEFAULT_CONTRACT_FONT_FAMILY as n } from "../constants.mjs";
1
+ import { DEFAULT_CONTRACT_FONT_FAMILY as e } from "../constants.mjs";
2
+ import { escapeHtmlAttribute as t, escapeHtmlText as n } from "./html.mjs";
3
3
  import { resolveTemplateVariablePresentation as r } from "./template-variable-render.mjs";
4
4
  //#region src/components/pro-contract-template-designer/src/utils/page-decorations.ts
5
5
  var i = {
@@ -31,7 +31,7 @@ var i = {
31
31
  right: ""
32
32
  },
33
33
  showOnFirstPage: !0,
34
- fontFamily: n,
34
+ fontFamily: e,
35
35
  fontSize: 12,
36
36
  fontWeight: 400,
37
37
  color: "#565b66",
@@ -51,7 +51,7 @@ var i = {
51
51
  right: ""
52
52
  },
53
53
  showOnFirstPage: !0,
54
- fontFamily: n,
54
+ fontFamily: e,
55
55
  fontSize: 12,
56
56
  fontWeight: 400,
57
57
  color: "#565b66",
@@ -291,26 +291,26 @@ function k(e, t, n) {
291
291
  };
292
292
  return r[n] = V(e?.text, t.text), r;
293
293
  }
294
- function A(t, n, r, i, a, o, s) {
295
- let c = w(n), l = n.divider.enabled ? `;border-${t === "header" ? "bottom" : "top"}:1px solid ${e(n.divider.color)}` : "", u = `color:${e(n.color)};font-family:${e(n.fontFamily)};font-size:${n.fontSize}px;font-weight:${n.fontWeight};${t === "header" ? "top" : "bottom"}:${n.offset}px${l}`, d = [
294
+ function A(e, n, r, i, a, o, s) {
295
+ let c = w(n), l = n.divider.enabled ? `;border-${e === "header" ? "bottom" : "top"}:1px solid ${t(n.divider.color)}` : "", u = `color:${t(n.color)};font-family:${t(n.fontFamily)};font-size:${n.fontSize}px;font-weight:${n.fontWeight};${e === "header" ? "top" : "bottom"}:${n.offset}px${l}`, d = [
296
296
  "left",
297
297
  "center",
298
298
  "right"
299
299
  ].map((e) => `<div class="gd-contract-template-page__decoration-slot is-${e}">${M(n.slots[e], r, i, a, o, s)}</div>`).join("");
300
- return `<div class="gd-contract-template-page__${t}" data-decoration-offset="${n.offset}" data-decoration-font-size="${n.fontSize}" data-decoration-safe-padding="${c}" style="${u}">${d}</div>`;
300
+ return `<div class="gd-contract-template-page__${e}" data-decoration-offset="${n.offset}" data-decoration-font-size="${n.fontSize}" data-decoration-safe-padding="${c}" style="${u}">${d}</div>`;
301
301
  }
302
- function j(t, n, r, i, a, o) {
303
- let s = C(t.density), c = t.layout === "tiled" ? s.columns * s.rows : 1, l = M(t.text, n, r, i, a, o), u = Array.from({ length: c }, () => `<div class="gd-contract-template-page__watermark-item" style="color:${e(t.color)};font-size:${t.fontSize}px;opacity:${t.opacity};transform:rotate(${t.rotation}deg)">${l}</div>`).join(""), d = t.layout === "tiled" ? `--gd-watermark-columns:${s.columns};--gd-watermark-rows:${s.rows}` : "";
304
- return `<div class="gd-contract-template-page__watermark is-${t.layout} density-${t.density}" data-watermark-layout="${t.layout}" data-watermark-density="${t.density}" aria-hidden="true" style="${d}">${u}</div>`;
302
+ function j(e, n, r, i, a, o) {
303
+ let s = C(e.density), c = e.layout === "tiled" ? s.columns * s.rows : 1, l = M(e.text, n, r, i, a, o), u = Array.from({ length: c }, () => `<div class="gd-contract-template-page__watermark-item" style="color:${t(e.color)};font-size:${e.fontSize}px;opacity:${e.opacity};transform:rotate(${e.rotation}deg)">${l}</div>`).join(""), d = e.layout === "tiled" ? `--gd-watermark-columns:${s.columns};--gd-watermark-rows:${s.rows}` : "";
304
+ return `<div class="gd-contract-template-page__watermark is-${e.layout} density-${e.density}" data-watermark-layout="${e.layout}" data-watermark-density="${e.density}" aria-hidden="true" style="${d}">${u}</div>`;
305
305
  }
306
- function M(n, r, i, a, o, s) {
306
+ function M(e, r, i, a, o, s) {
307
307
  let c = g(a, o, s), l = new Map(r.map((e) => [e.key, e]));
308
- return _(n).tokens.map((n) => {
309
- if (n.type === "text") return t(n.value);
310
- if (n.type === "pageNumber") return t(c.pageNumber);
311
- if (n.type === "totalPages") return t(c.totalPages);
312
- let r = l.get(n.key);
313
- return i !== void 0 && r && r.type !== "image" ? t(N(r, i[n.key])) : `<span class="gd-contract-template-page__variable" data-template-variable="true" data-key="${e(n.key)}" data-label="${e(r?.label ?? n.key)}" data-variable-type="${e(r?.type ?? "text")}">\${{${t(n.key)}}}</span>`;
308
+ return _(e).tokens.map((e) => {
309
+ if (e.type === "text") return n(e.value);
310
+ if (e.type === "pageNumber") return n(c.pageNumber);
311
+ if (e.type === "totalPages") return n(c.totalPages);
312
+ let r = l.get(e.key);
313
+ return i !== void 0 && r && r.type !== "image" ? n(N(r, i[e.key])) : `<span class="gd-contract-template-page__variable" data-template-variable="true" data-key="${t(e.key)}" data-label="${t(r?.label ?? e.key)}" data-variable-type="${t(r?.type ?? "text")}">\${{${n(e.key)}}}</span>`;
314
314
  }).join("");
315
315
  }
316
316
  function N(e, t) {
@@ -1,8 +1,8 @@
1
- import { resolveContractSigningSealSizeInCssPixels as e } from "../../../contract-signing-location/src/constants.mjs";
2
- import { hasPositivePageSize as t } from "./html.mjs";
1
+ import { hasPositivePageSize as e } from "./html.mjs";
2
+ import { resolveContractSigningSealSizeInCssPixels as t } from "../../../contract-signing-location/src/constants.mjs";
3
3
  //#region src/components/pro-contract-template-designer/src/utils/signing-placement.ts
4
4
  var n = "application/x-gd-contract-signing-placement", r = {
5
- seal: e(["04"]),
5
+ seal: t(["04"]),
6
6
  signature: {
7
7
  width: l(50),
8
8
  height: l(20)
@@ -80,21 +80,21 @@ function v(e, t, n = 8) {
80
80
  ...l ? { sealTypes: l } : {}
81
81
  };
82
82
  }
83
- function y(t, n, r) {
84
- let i = n.type ?? t.type, a = {
85
- ...t,
83
+ function y(e, n, r) {
84
+ let i = n.type ?? e.type, a = {
85
+ ...e,
86
86
  ...n,
87
87
  type: i,
88
88
  ...i === "seal" ? {} : { sealTypes: void 0 }
89
89
  };
90
90
  if (i === "seal" && (n.type !== void 0 || n.sealTypes !== void 0)) {
91
- let t = e(n.sealTypes ?? a.sealTypes ?? ["04"]);
92
- a.width = t.width, a.height = t.height;
91
+ let e = t(n.sealTypes ?? a.sealTypes ?? ["04"]);
92
+ a.width = e.width, a.height = e.height;
93
93
  }
94
94
  return v(a, r);
95
95
  }
96
- function b(t, n, r, i = {}) {
97
- let a = N(t) ? t : "signature", o = g(a), s = d(r), l = a === "seal" ? e(i.sealTypes ?? ["04"]) : o, f = u(i.width, l.width), p = u(i.height, l.height);
96
+ function b(e, n, r, i = {}) {
97
+ let a = N(e) ? e : "signature", o = g(a), s = d(r), l = a === "seal" ? t(i.sealTypes ?? ["04"]) : o, f = u(i.width, l.width), p = u(i.height, l.height);
98
98
  return v({
99
99
  id: i.id || c(),
100
100
  pageId: n,
@@ -260,10 +260,10 @@ function D(e, t, n) {
260
260
  location: t
261
261
  }));
262
262
  }
263
- function O(e, n, r, i) {
264
- if (!e) return i;
265
- let a = Array.isArray(e) ? e[r] : e[n];
266
- return t(a) ? d(a) : i;
263
+ function O(t, n, r, i) {
264
+ if (!t) return i;
265
+ let a = Array.isArray(t) ? t[r] : t[n];
266
+ return e(a) ? d(a) : i;
267
267
  }
268
268
  function k(e) {
269
269
  let t = new Set(e.map((e) => e && typeof e == "object" ? String(e.id || "") : "").filter(Boolean)), n = /* @__PURE__ */ new Set();