@guodun/antdv 1.3.2 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/es/components/contract-signing-location/index.mjs +1 -0
  2. package/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +311 -289
  3. package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +337 -326
  4. package/dist/es/components/contract-signing-location/src/ContractSigningLocationInspector.vue.mjs +3 -2
  5. package/dist/es/components/contract-signing-location/src/ContractSigningLocationNavigator.vue.mjs +41 -33
  6. package/dist/es/components/contract-signing-location/src/ContractSigningTemplatePage.mjs +5 -0
  7. package/dist/es/components/contract-signing-location/src/ContractSigningTemplatePage.vue.mjs +23 -0
  8. package/dist/es/components/contract-signing-location/src/location-rules.mjs +115 -77
  9. package/dist/es/components/contract-signing-location/src/template-source.mjs +85 -0
  10. package/dist/es/components/contract-signing-location/style/index.css +1 -1
  11. package/dist/es/components/index.mjs +8 -6
  12. package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.mjs +164 -57
  13. package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.mjs +132 -126
  14. package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.vue.mjs +75 -49
  15. package/dist/es/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.mjs +136 -91
  16. package/dist/es/components/pro-contract-signing-flow/src/constants.mjs +25 -5
  17. package/dist/es/components/pro-contract-signing-flow/style/index.css +1 -1
  18. package/dist/es/components/pro-contract-template-designer/index.mjs +5 -4
  19. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.mjs +5 -0
  20. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.mjs +347 -0
  21. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.mjs +5 -0
  22. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.mjs +171 -0
  23. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateFileBar.mjs +5 -0
  24. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateFileBar.vue.mjs +166 -0
  25. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.mjs +4 -4
  26. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererValidation.mjs +5 -0
  27. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererValidation.vue.mjs +36 -0
  28. package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +202 -202
  29. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1591 -1612
  30. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +235 -239
  31. package/dist/es/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.mjs +16 -16
  32. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +166 -166
  33. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-draft-cache.mjs +100 -33
  34. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-files.mjs +77 -0
  35. package/dist/es/components/pro-contract-template-designer/src/extensions/word-paste.mjs +23 -23
  36. package/dist/es/components/pro-contract-template-designer/src/utils/file-tabs.mjs +14 -0
  37. package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +121 -121
  38. package/dist/es/components/pro-contract-template-designer/src/utils/toolbar-overflow.mjs +19 -0
  39. package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
  40. package/dist/es/index.mjs +23 -21
  41. package/dist/lib/components/contract-signing-location/index.cjs +1 -1
  42. package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -1
  43. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
  44. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationInspector.vue.cjs +1 -1
  45. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationNavigator.vue.cjs +1 -1
  46. package/dist/lib/components/contract-signing-location/src/ContractSigningTemplatePage.cjs +1 -0
  47. package/dist/lib/components/contract-signing-location/src/ContractSigningTemplatePage.vue.cjs +1 -0
  48. package/dist/lib/components/contract-signing-location/src/location-rules.cjs +1 -1
  49. package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -0
  50. package/dist/lib/components/contract-signing-location/style/index.css +1 -1
  51. package/dist/lib/components/index.cjs +1 -1
  52. package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.cjs +1 -1
  53. package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.cjs +1 -1
  54. package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.vue.cjs +1 -1
  55. package/dist/lib/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.cjs +1 -1
  56. package/dist/lib/components/pro-contract-signing-flow/src/constants.cjs +1 -1
  57. package/dist/lib/components/pro-contract-signing-flow/style/index.css +1 -1
  58. package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
  59. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.cjs +1 -0
  60. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.cjs +1 -0
  61. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.cjs +1 -0
  62. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.cjs +1 -0
  63. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateFileBar.cjs +1 -0
  64. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateFileBar.vue.cjs +1 -0
  65. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.cjs +1 -1
  66. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererValidation.cjs +1 -0
  67. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererValidation.vue.cjs +1 -0
  68. package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
  69. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
  70. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.cjs +1 -1
  71. package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.cjs +1 -1
  72. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +2 -2
  73. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-draft-cache.cjs +1 -1
  74. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-files.cjs +2 -0
  75. package/dist/lib/components/pro-contract-template-designer/src/extensions/word-paste.cjs +1 -1
  76. package/dist/lib/components/pro-contract-template-designer/src/utils/file-tabs.cjs +1 -0
  77. package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +2 -2
  78. package/dist/lib/components/pro-contract-template-designer/src/utils/toolbar-overflow.cjs +1 -0
  79. package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
  80. package/dist/lib/index.cjs +1 -1
  81. package/dist/theme/contract-signing-location.css +1 -1
  82. package/dist/theme/icon.css +1 -1
  83. package/dist/theme/index.css +1 -1
  84. package/dist/theme/pro-contract-signing-flow.css +1 -1
  85. package/dist/types/components/contract-signing-location/index.d.ts +1 -0
  86. package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +4 -1
  87. package/dist/types/components/contract-signing-location/src/ContractSigningLocationInspector.vue.d.ts +3 -2
  88. package/dist/types/components/contract-signing-location/src/ContractSigningTemplatePage.vue.d.ts +6 -0
  89. package/dist/types/components/contract-signing-location/src/location-rules.d.ts +3 -3
  90. package/dist/types/components/contract-signing-location/src/template-source.d.ts +20 -0
  91. package/dist/types/components/contract-signing-location/src/types.d.ts +49 -2
  92. package/dist/types/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.d.ts +19 -3
  93. package/dist/types/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.d.ts +223 -2
  94. package/dist/types/components/pro-contract-signing-flow/src/constants.d.ts +15 -0
  95. package/dist/types/components/pro-contract-signing-flow/src/types.d.ts +14 -0
  96. package/dist/types/components/pro-contract-template-designer/index.d.ts +1 -0
  97. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.d.ts +103 -0
  98. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.d.ts +48 -0
  99. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateFileBar.vue.d.ts +231 -0
  100. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererValidation.vue.d.ts +15 -0
  101. package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +1 -1
  102. package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +25 -2
  103. package/dist/types/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.d.ts +2 -2
  104. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +1 -1
  105. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-draft-cache.d.ts +29 -1
  106. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-files.d.ts +24 -0
  107. package/dist/types/components/pro-contract-template-designer/src/constants.d.ts +2 -2
  108. package/dist/types/components/pro-contract-template-designer/src/types.d.ts +59 -1
  109. package/dist/types/components/pro-contract-template-designer/src/utils/file-tabs.d.ts +3 -0
  110. package/dist/types/components/pro-contract-template-designer/src/utils/toolbar-overflow.d.ts +11 -0
  111. package/package.json +4 -3
@@ -1,26 +1,33 @@
1
1
  import { CONTRACT_SIGNING_SEAL_TYPE_OPTIONS as e } from "./constants.mjs";
2
2
  import { clampContractSigningPlacement as t, clampContractSigningZoom as n, normalizeContractSigningCoordinateScale as r, resolveContractSigningSealSizeLimit as i } from "./coordinates.mjs";
3
- import { ContractSigningLocationBuildError as a, buildContractSigningLocationOutput as o, cloneContractSigningLocationValue as s, createContractSigningLocationValue as ee, createContractSigningPlacement as te, findContractSigningPage as c, getContractSigningHomePage as ne, isContractSigningPageUsable as re, normalizeContractSigningLocationValue as l, normalizeContractSigningProviderValue as ie, patchContractSigningPlacement as ae, resolveContractSigningPreviewPageSize as oe, validateContractSigningLocationValue as se } from "./location-rules.mjs";
3
+ import { isContractSigningTemplateFile as a } from "./template-source.mjs";
4
+ import { ContractSigningLocationBuildError as o, buildContractSigningLocationOutput as ee, cloneContractSigningLocationValue as s, createContractSigningLocationValue as c, createContractSigningPlacement as te, findContractSigningPage as l, getContractSigningHomePage as ne, isContractSigningPageUsable as re, normalizeContractSigningLocationValue as u, normalizeContractSigningProviderValue as ie, patchContractSigningPlacement as ae, resolveContractSigningPreviewPageSize as oe, validateContractSigningLocationValue as se } from "./location-rules.mjs";
4
5
  import ce from "./ContractSigningLocationCanvas.mjs";
5
6
  import le from "./ContractSigningLocationInspector.mjs";
6
7
  import ue from "./ContractSigningLocationNavigator.mjs";
7
8
  import { ContractSigningPreviewRequests as de } from "./preview-requests.mjs";
8
- import { computed as u, createBlock as d, createCommentVNode as f, createElementBlock as fe, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as pe, nextTick as g, normalizeClass as _, normalizeStyle as me, onBeforeUnmount as he, openBlock as v, ref as y, shallowRef as b, toDisplayString as ge, unref as x, watch as S, withCtx as C } from "vue";
9
- import { Button as w, Tooltip as _e } from "ant-design-vue";
9
+ import { computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as fe, createVNode as g, defineComponent as pe, nextTick as _, normalizeClass as v, normalizeStyle as me, onBeforeUnmount as he, openBlock as y, ref as b, shallowRef as x, toDisplayString as ge, unref as S, watch as C, withCtx as w } from "vue";
10
+ import { Button as T, Tooltip as _e } from "ant-design-vue";
10
11
  import { LeftOutlined as ve, ReloadOutlined as ye, RightOutlined as be } from "@ant-design/icons-vue";
11
12
  //#region src/components/contract-signing-location/src/ContractSigningLocation.vue?vue&type=script&setup=true&lang.ts
12
- var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "gd-ant-contract-signing-location__header-actions" }, Ce = { class: "gd-ant-contract-signing-location__placement-count" }, we = {
13
+ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "gd-ant-contract-signing-location__title" }, Ce = { class: "gd-ant-contract-signing-location__header-actions" }, we = { class: "gd-ant-contract-signing-location__placement-count" }, Te = {
13
14
  key: 0,
14
15
  class: "gd-ant-contract-signing-location__error",
15
16
  role: "alert"
16
- }, Te = ["aria-label", "aria-expanded"], Ee = { class: "gd-ant-contract-signing-location__panel-stack" }, De = ["aria-label", "aria-expanded"], Oe = { class: "gd-ant-contract-signing-location__panel-stack" }, ke = /* @__PURE__ */ pe({
17
+ }, Ee = ["aria-label", "aria-expanded"], De = { class: "gd-ant-contract-signing-location__panel-stack" }, Oe = ["aria-label", "aria-expanded"], ke = { class: "gd-ant-contract-signing-location__panel-stack" }, Ae = /* @__PURE__ */ pe({
17
18
  name: "ContractSigningLocation",
18
19
  __name: "ContractSigningLocation",
19
20
  props: {
20
21
  modelValue: { default: void 0 },
22
+ mode: { default: "placement" },
21
23
  contractId: { default: "" },
22
24
  dataProvider: { default: void 0 },
23
25
  sealTypeOptions: { default: () => e.map((e) => ({ ...e })) },
26
+ allowedPlacementTypes: { default: () => [
27
+ "seal",
28
+ "signature",
29
+ "date"
30
+ ] },
24
31
  sizeProfile: { default: "default" },
25
32
  autoLoad: {
26
33
  type: Boolean,
@@ -47,6 +54,10 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
47
54
  showSubmitButton: {
48
55
  type: Boolean,
49
56
  default: !0
57
+ },
58
+ showInspector: {
59
+ type: Boolean,
60
+ default: void 0
50
61
  }
51
62
  },
52
63
  emits: [
@@ -59,191 +70,192 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
59
70
  "submit",
60
71
  "error"
61
72
  ],
62
- setup(e, { expose: pe, emit: ke }) {
63
- let T = e, E = ke, D = u(() => i(T.sealMinSize, T.sealMaxSize)), O = l(T.modelValue ?? ee(T.contractId), {
64
- sealSizeLimit: D.value,
65
- sealTypeOptions: T.sealTypeOptions
66
- }), k = y(O), Ae = b(s(O)), A = b(O.files[0]?.fileId ?? ""), j = b(O.files[0]?.pages[0]?.pageIndex ?? 0), M = b(""), N = b(!1), P = b(""), F = y([]), I = y({}), L = b(Be(T.zoom)), R = y(null), z = y(!1), B = y(!1), V = 0, H = !1, U, W = [], G = 0, K = new de(), q = u(() => T.readonly || T.disabled), je = u(() => k.value.files.length <= 1), Me = u(() => _t(T.height)), J = u(() => k.value.files.find((e) => e.fileId === A.value) ?? k.value.files[0]), Ne = u(() => J.value?.pages.find((e) => e.pageIndex === j.value) ?? J.value?.pages[0]), Pe = u(() => {
67
- let e = J.value;
68
- return e ? k.value.placements.filter((t) => t.fileId === e.fileId) : [];
69
- }), Y = u(() => k.value.placements.find((e) => e.id === M.value)), Fe = u(() => {
73
+ setup(e, { expose: pe, emit: Ae }) {
74
+ let E = e, D = Ae, O = d(() => i(E.sealMinSize, E.sealMaxSize)), k = u(E.modelValue ?? c(E.contractId), {
75
+ sealSizeLimit: O.value,
76
+ sealTypeOptions: E.sealTypeOptions
77
+ }), A = b(k), je = x(s(k)), j = x(k.files[0]?.fileId ?? ""), M = x(k.files[0]?.pages[0]?.pageIndex ?? 0), N = x(""), P = x(!1), F = x(""), I = b([]), L = b({}), R = x(We(E.zoom)), z = b(null), B = b(!1), V = b(!1), H = 0, U = !1, Me, W = [], G = 0, K = new de(), q = d(() => E.mode === "preview"), J = d(() => q.value || E.readonly || E.disabled), Ne = d(() => E.showInspector ?? !q.value), Pe = d(() => !q.value && E.showSubmitButton), Fe = d(() => A.value.files.length <= 1), Ie = d(() => St(E.height)), Y = d(() => A.value.files.find((e) => e.fileId === j.value) ?? A.value.files[0]), Le = d(() => Y.value?.pages.find((e) => e.pageIndex === M.value) ?? Y.value?.pages[0]), Re = d(() => {
70
78
  let e = Y.value;
71
- return e ? c(k.value, e.fileId, e.pageIndex) ?? Ne.value : Ne.value;
72
- }), Ie = u(() => F.value.filter((e) => e.endsWith(":thumbnail")).map((e) => e.slice(0, -10))), Le = u(() => Object.keys(I.value).filter((e) => e.endsWith(":thumbnail")).map((e) => e.slice(0, -10))), Re = u(() => F.value.filter((e) => e.endsWith(":preview")).map((e) => e.slice(0, -8))), ze = u(() => {
79
+ return e ? A.value.placements.filter((t) => t.fileId === e.fileId) : [];
80
+ }), X = d(() => A.value.placements.find((e) => e.id === N.value)), ze = d(() => {
81
+ let e = X.value;
82
+ return e ? l(A.value, e.fileId, e.pageIndex) ?? Le.value : Le.value;
83
+ }), Be = d(() => I.value.filter((e) => e.endsWith(":thumbnail")).map((e) => e.slice(0, -10))), Ve = d(() => Object.keys(L.value).filter((e) => e.endsWith(":thumbnail")).map((e) => e.slice(0, -10))), He = d(() => I.value.filter((e) => e.endsWith(":preview")).map((e) => e.slice(0, -8))), Ue = d(() => {
73
84
  let e = {};
74
- return Object.entries(I.value).forEach(([t, n]) => {
85
+ return Object.entries(L.value).forEach(([t, n]) => {
75
86
  t.endsWith(":preview") && (e[t.slice(0, -8)] = n);
76
87
  }), e;
77
88
  });
78
- S(() => T.modelValue, (e) => {
89
+ C(() => E.modelValue, (e) => {
79
90
  if (!e) return;
80
- let t = l(e, {
81
- sealSizeLimit: D.value,
82
- sealTypeOptions: T.sealTypeOptions
91
+ let t = u(e, {
92
+ sealSizeLimit: O.value,
93
+ sealTypeOptions: E.sealTypeOptions
83
94
  });
84
- $(t) !== $(k.value) && (ft(), k.value = t, Ae.value = s(t), st(), g(() => R.value?.scrollToPage(j.value)));
85
- }, { deep: !0 }), S(D, () => {
86
- $(l(k.value, {
87
- sealSizeLimit: D.value,
88
- sealTypeOptions: T.sealTypeOptions
89
- })) !== $(k.value) && X(k.value);
90
- }), S(() => T.zoom, (e) => {
91
- L.value = Be(e);
92
- }), S(() => [
93
- T.contractId,
94
- T.dataProvider,
95
- T.autoLoad
95
+ bt(t) !== bt(A.value) && (gt(), A.value = t, je.value = s(t), dt(), _(() => z.value?.scrollToPage(M.value)));
96
+ }, { deep: !0 }), C(O, () => {
97
+ bt(u(A.value, {
98
+ sealSizeLimit: O.value,
99
+ sealTypeOptions: E.sealTypeOptions
100
+ })) !== bt(A.value) && Z(A.value);
101
+ }), C(() => E.zoom, (e) => {
102
+ R.value = We(e);
103
+ }), C(() => [
104
+ E.contractId,
105
+ E.dataProvider,
106
+ E.autoLoad
96
107
  ], ([e, t, n], r) => {
97
- !n || !t || !e || (!r || e !== r[0] || t !== r[1]) && Z();
108
+ !n || !t || !e || (!r || e !== r[0] || t !== r[1]) && Q();
98
109
  }, { immediate: !0 }), he(() => {
99
- H = !0, V += 1, dt(), ft();
110
+ U = !0, H += 1, ht(), gt();
100
111
  });
101
- function Be(e) {
102
- return n(e, Math.min(T.minZoom, T.maxZoom), Math.max(T.minZoom, T.maxZoom));
103
- }
104
- function Ve(e) {
105
- let t = Be(e);
106
- L.value = t, E("update:zoom", t);
107
- }
108
- function He() {
109
- return R.value?.fitWidth() ?? L.value;
110
- }
111
- function X(e, t = {}) {
112
- k.value = l(e, {
113
- sealSizeLimit: D.value,
114
- sealTypeOptions: T.sealTypeOptions
115
- }), t.clearError !== !1 && (P.value = ""), st();
116
- let n = s(k.value);
117
- return E("update:modelValue", n), E("change", n), n;
118
- }
119
- async function Z() {
120
- let e = String(T.contractId || k.value.contractId || "").trim();
121
- if (!T.dataProvider) return Q({
112
+ function We(e) {
113
+ return n(e, Math.min(E.minZoom, E.maxZoom), Math.max(E.minZoom, E.maxZoom));
114
+ }
115
+ function Ge(e) {
116
+ let t = We(e);
117
+ R.value = t, D("update:zoom", t);
118
+ }
119
+ function Ke() {
120
+ return z.value?.fitWidth() ?? R.value;
121
+ }
122
+ function Z(e, t = {}) {
123
+ A.value = u(e, {
124
+ sealSizeLimit: O.value,
125
+ sealTypeOptions: E.sealTypeOptions
126
+ }), t.clearError !== !1 && (F.value = ""), dt();
127
+ let n = s(A.value);
128
+ return D("update:modelValue", n), D("change", n), n;
129
+ }
130
+ async function Q() {
131
+ let e = String(E.contractId || A.value.contractId || "").trim();
132
+ if (!E.dataProvider) return $({
122
133
  code: "CONTRACT_PROVIDER_MISSING",
123
134
  message: "未配置合同数据提供器,请由宿主传入文件数据"
124
135
  }), !1;
125
- if (!e) return Q({
136
+ if (!e) return $({
126
137
  code: "CONTRACT_ID_MISSING",
127
138
  message: "缺少用于加载合同的 PaaS contractId"
128
139
  }), !1;
129
- let t = ++V;
130
- ft(), N.value = !0, P.value = "";
140
+ let t = ++H;
141
+ gt(), P.value = !0, F.value = "";
131
142
  try {
132
- let n = await T.dataProvider.loadContract({ contractId: e });
133
- if (H || t !== V) return !1;
134
- let i = ie(n, r(T.dataProvider.coordinateScale)), a = l({
143
+ let n = await E.dataProvider.loadContract({ contractId: e });
144
+ if (U || t !== H) return !1;
145
+ let i = ie(n, r(E.dataProvider.coordinateScale)), a = u({
135
146
  ...i,
136
147
  contractId: e,
137
- placements: i.placements.length ? i.placements : k.value.contractId === e ? k.value.placements : []
148
+ placements: i.placements.length ? i.placements : A.value.contractId === e ? A.value.placements : []
138
149
  }, {
139
- sealSizeLimit: D.value,
140
- sealTypeOptions: T.sealTypeOptions
150
+ sealSizeLimit: O.value,
151
+ sealTypeOptions: E.sealTypeOptions
141
152
  });
142
- k.value = a, Ae.value = s(a), M.value = "", st();
153
+ A.value = a, je.value = s(a), N.value = "", dt();
143
154
  let o = s(a);
144
- return E("update:modelValue", o), E("change", o), E("ready", o), Ue(), g(() => R.value?.scrollToPage(j.value)), o;
155
+ return D("update:modelValue", o), D("change", o), D("ready", o), qe(), _(() => z.value?.scrollToPage(M.value)), o;
145
156
  } catch (e) {
146
- return H || t !== V || Q(ct(e, "CONTRACT_LOAD_FAILED", "合同加载失败,请检查授权后重试")), !1;
157
+ return U || t !== H || $(ft(e, "CONTRACT_LOAD_FAILED", "合同加载失败,请检查授权后重试")), !1;
147
158
  } finally {
148
- !H && t === V && (N.value = !1);
159
+ !U && t === H && (P.value = !1);
149
160
  }
150
161
  }
151
- async function Ue() {
152
- T.dataProvider?.loadPagePreview && await Promise.allSettled(k.value.files.map((e) => {
162
+ async function qe() {
163
+ E.dataProvider?.loadPagePreview && await Promise.allSettled(A.value.files.map((e) => {
164
+ if (a(e)) return Promise.resolve();
153
165
  let t = ne(e.pages);
154
- return t && !t.thumbnailUrl ? We(e.fileId, t.pageIndex, !0) : Promise.resolve();
166
+ return t && !t.thumbnailUrl ? Je(e.fileId, t.pageIndex, !0) : Promise.resolve();
155
167
  }));
156
168
  }
157
- async function We(e, t, n) {
158
- let i = T.dataProvider?.loadPagePreview, a = c(k.value, e, t), o = lt(e, t, n);
159
- if (!i || !a || F.value.includes(o)) return;
160
- ut(o), F.value = [...F.value, o];
161
- let s = K.start(o);
169
+ async function Je(e, t, n) {
170
+ let i = E.dataProvider?.loadPagePreview, o = A.value.files.find((t) => t.fileId === e), ee = l(A.value, e, t), s = pt(e, t, n);
171
+ if (!i || a(o) || !ee || I.value.includes(s)) return;
172
+ mt(s), I.value = [...I.value, s];
173
+ let c = K.start(s);
162
174
  try {
163
175
  let a = await i({
164
- contractId: k.value.contractId || T.contractId,
176
+ contractId: A.value.contractId || E.contractId,
165
177
  fileId: e,
166
178
  pageIndex: t,
167
179
  thumbnail: n,
168
- signal: s.signal
180
+ signal: c.signal
169
181
  });
170
- if (H || !K.isCurrent(o, s) || !c(k.value, e, t)) return;
171
- let ee = oe(c(k.value, e, t), a, r(T.dataProvider?.coordinateScale), n), te = k.value.files.map((r) => r.fileId === e ? {
182
+ if (U || !K.isCurrent(s, c) || !l(A.value, e, t)) return;
183
+ let o = oe(l(A.value, e, t), a, r(E.dataProvider?.coordinateScale), n), ee = A.value.files.map((r) => r.fileId === e ? {
172
184
  ...r,
173
185
  pages: r.pages.map((e) => e.pageIndex === t ? {
174
186
  ...e,
175
- ...ee || {},
187
+ ...o || {},
176
188
  ...n ? { thumbnailUrl: a.url } : { previewUrl: a.url }
177
189
  } : e)
178
190
  } : r);
179
- X({
180
- ...k.value,
181
- files: te
191
+ Z({
192
+ ...A.value,
193
+ files: ee
182
194
  }, { clearError: !1 });
183
195
  } catch (n) {
184
- if (!K.isCurrent(o, s) || pt(n)) return;
185
- let r = ct(n, "CONTRACT_PREVIEW_FAILED", "合同页面预览加载失败,可切换页面或重试", {
196
+ if (!K.isCurrent(s, c) || _t(n)) return;
197
+ let r = ft(n, "CONTRACT_PREVIEW_FAILED", "合同页面预览加载失败,可切换页面或重试", {
186
198
  fileId: e,
187
199
  pageIndex: t
188
200
  });
189
- E("error", r), I.value = {
190
- ...I.value,
191
- [o]: r.message
201
+ D("error", r), L.value = {
202
+ ...L.value,
203
+ [s]: r.message
192
204
  };
193
205
  } finally {
194
- K.finish(o, s) && (F.value = F.value.filter((e) => e !== o));
206
+ K.finish(s, c) && (I.value = I.value.filter((e) => e !== s));
195
207
  }
196
208
  }
197
- function Ge(e) {
198
- if (e === A.value) return;
199
- let t = A.value;
200
- dt(), t && (ft((e) => e.startsWith(`${t}:`) && e.endsWith(":preview")), W = W.filter((t) => t.fileId === e)), A.value = e, j.value = ne(k.value.files.find((t) => t.fileId === e)?.pages)?.pageIndex ?? 0, M.value = "", E("file-change", e), E("page-change", e, j.value), g(() => R.value?.scrollToPage(j.value));
209
+ function Ye(e) {
210
+ if (e === j.value) return;
211
+ let t = j.value;
212
+ ht(), t && (gt((e) => e.startsWith(`${t}:`) && e.endsWith(":preview")), W = W.filter((t) => t.fileId === e)), j.value = e, M.value = ne(A.value.files.find((t) => t.fileId === e)?.pages)?.pageIndex ?? 0, N.value = "", D("file-change", e), D("page-change", e, M.value), _(() => z.value?.scrollToPage(M.value));
201
213
  }
202
- function Ke(e) {
203
- j.value = e;
214
+ function Xe(e) {
215
+ M.value = e;
204
216
  }
205
- function qe(e) {
206
- j.value !== e && (j.value = e), E("page-change", A.value, e);
217
+ function Ze(e) {
218
+ M.value !== e && (M.value = e), D("page-change", j.value, e);
207
219
  }
208
- function Je(e) {
209
- dt();
210
- let t = A.value;
211
- U = setTimeout(() => {
212
- U = void 0, A.value === t && Ye(t, e);
220
+ function Qe(e) {
221
+ ht();
222
+ let t = j.value;
223
+ Me = setTimeout(() => {
224
+ Me = void 0, j.value === t && $e(t, e);
213
225
  }, 150);
214
226
  }
215
- function Ye(e, t) {
216
- let n = k.value.files.find((t) => t.fileId === e);
217
- !n || e !== A.value || (t.forEach((e) => {
227
+ function $e(e, t) {
228
+ let n = A.value.files.find((t) => t.fileId === e);
229
+ !n || a(n) || e !== j.value || (t.forEach((e) => {
218
230
  let t = n.pages.find((t) => t.pageIndex === e);
219
- !t || t.previewUrl || F.value.includes(lt(n.fileId, e, !1)) || W.some((t) => t.fileId === n.fileId && t.pageIndex === e) || W.push({
231
+ !t || t.previewUrl || I.value.includes(pt(n.fileId, e, !1)) || W.some((t) => t.fileId === n.fileId && t.pageIndex === e) || W.push({
220
232
  fileId: n.fileId,
221
233
  pageIndex: e
222
234
  });
223
- }), Xe());
235
+ }), et());
224
236
  }
225
- async function Xe() {
226
- let e = A.value;
237
+ async function et() {
238
+ let e = j.value;
227
239
  for (W = W.filter((t) => t.fileId === e); G < 3 && W.length;) {
228
240
  let t = W.shift();
229
241
  if (!t || t.fileId !== e) continue;
230
- let n = c(k.value, t.fileId, t.pageIndex);
231
- !n || n.previewUrl || F.value.includes(lt(t.fileId, t.pageIndex, !1)) || (G += 1, We(t.fileId, t.pageIndex, !1).finally(() => {
232
- G = Math.max(0, G - 1), Xe();
242
+ let n = l(A.value, t.fileId, t.pageIndex), r = A.value.files.find((e) => e.fileId === t.fileId);
243
+ !n || a(r) || n.previewUrl || I.value.includes(pt(t.fileId, t.pageIndex, !1)) || (G += 1, Je(t.fileId, t.pageIndex, !1).finally(() => {
244
+ G = Math.max(0, G - 1), et();
233
245
  }));
234
246
  }
235
247
  }
236
- function Ze(e) {
237
- let t = k.value.placements.find((t) => t.id === e);
238
- t && (t.fileId !== A.value && Ge(t.fileId), M.value = e, g(() => R.value?.scrollToPlacement(e)));
248
+ function tt(e) {
249
+ let t = A.value.placements.find((t) => t.id === e);
250
+ t && (t.fileId !== j.value && Ye(t.fileId), N.value = e, _(() => z.value?.scrollToPlacement(e)));
239
251
  }
240
- function Qe(e, t = {}) {
241
- if (q.value) return;
242
- let n = t.fileId ?? J.value?.fileId, r = t.pageIndex ?? Ne.value?.pageIndex;
252
+ function nt(e, t = {}) {
253
+ if (J.value || !E.allowedPlacementTypes.includes(e)) return;
254
+ let n = t.fileId ?? Y.value?.fileId, r = t.pageIndex ?? Le.value?.pageIndex;
243
255
  if (!n || r === void 0) return;
244
- let i = c(k.value, n, r);
256
+ let i = l(A.value, n, r);
245
257
  if (!i || !re(i)) {
246
- Q({
258
+ $({
247
259
  code: "CONTRACT_PAGE_SIZE_INVALID",
248
260
  message: "当前页面缺少有效的原始宽高,暂时不能添加签署位置",
249
261
  fileId: n,
@@ -251,9 +263,9 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
251
263
  });
252
264
  return;
253
265
  }
254
- let a = T.sealTypeOptions.find((e) => String(e.value).trim())?.value;
266
+ let a = E.sealTypeOptions.find((e) => String(e.value).trim())?.value;
255
267
  if (e === "seal" && !a) {
256
- Q({
268
+ $({
257
269
  code: "CONTRACT_SEAL_TYPES_MISSING",
258
270
  message: "当前未配置可用的印章类型,暂时不能添加印章位置",
259
271
  fileId: n,
@@ -264,83 +276,83 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
264
276
  let o = te(e, n, i, {
265
277
  signLeft: t.signLeft,
266
278
  signTop: t.signTop,
267
- sizeProfile: T.sizeProfile,
268
- sealSizeLimit: D.value,
269
- sealTypeOptions: T.sealTypeOptions,
279
+ sizeProfile: E.sizeProfile,
280
+ sealSizeLimit: O.value,
281
+ sealTypeOptions: E.sealTypeOptions,
270
282
  ...e === "seal" ? { sealType: [String(a)] } : {}
271
283
  });
272
- return X({
273
- ...k.value,
274
- placements: [...k.value.placements, o]
275
- }), A.value = n, j.value = r, M.value = o.id, ht(o);
276
- }
277
- function $e(e, t) {
278
- q.value || X({
279
- ...k.value,
280
- placements: k.value.placements.map((n) => {
284
+ return Z({
285
+ ...A.value,
286
+ placements: [...A.value.placements, o]
287
+ }), j.value = n, M.value = r, N.value = o.id, yt(o);
288
+ }
289
+ function rt(e, t) {
290
+ J.value || Z({
291
+ ...A.value,
292
+ placements: A.value.placements.map((n) => {
281
293
  if (n.id !== e) return n;
282
294
  let r = t.pageIndex === void 0 ? n.pageIndex : t.pageIndex;
283
- return ae(n, t, c(k.value, n.fileId, r), {
284
- sealSizeLimit: D.value,
285
- sealTypeOptions: T.sealTypeOptions
295
+ return ae(n, t, l(A.value, n.fileId, r), {
296
+ sealSizeLimit: O.value,
297
+ sealTypeOptions: E.sealTypeOptions
286
298
  });
287
299
  })
288
300
  });
289
301
  }
290
- function et() {
291
- let e = Y.value;
292
- if (!e || q.value) return;
293
- let n = c(k.value, e.fileId, e.pageIndex);
302
+ function it() {
303
+ let e = X.value;
304
+ if (!e || J.value) return;
305
+ let n = l(A.value, e.fileId, e.pageIndex);
294
306
  if (!n) return;
295
307
  let r = t({
296
- ...ht(e),
297
- id: gt(),
308
+ ...yt(e),
309
+ id: xt(),
298
310
  signLeft: e.signLeft + 16,
299
311
  signTop: e.signTop + 16
300
- }, n, { sealSizeLimit: D.value });
301
- X({
302
- ...k.value,
303
- placements: [...k.value.placements, r]
304
- }), M.value = r.id;
305
- }
306
- function tt(e) {
307
- q.value || (X({
308
- ...k.value,
309
- placements: k.value.placements.filter((t) => t.id !== e)
310
- }), M.value === e && (M.value = ""));
312
+ }, n, { sealSizeLimit: O.value });
313
+ Z({
314
+ ...A.value,
315
+ placements: [...A.value.placements, r]
316
+ }), N.value = r.id;
317
+ }
318
+ function at(e) {
319
+ J.value || (Z({
320
+ ...A.value,
321
+ placements: A.value.placements.filter((t) => t.id !== e)
322
+ }), N.value === e && (N.value = ""));
311
323
  }
312
- function nt() {
313
- return se(k.value, { allowedSealTypes: T.sealTypeOptions.map((e) => e.value) });
324
+ function ot() {
325
+ return se(A.value, { allowedSealTypes: E.sealTypeOptions.map((e) => e.value) });
314
326
  }
315
- function rt() {
316
- return s(k.value);
327
+ function st() {
328
+ return s(A.value);
317
329
  }
318
- function it() {
319
- return o(rt(), { allowedSealTypes: T.sealTypeOptions.map((e) => e.value) });
330
+ function ct() {
331
+ return ee(st(), { allowedSealTypes: E.sealTypeOptions.map((e) => e.value) });
320
332
  }
321
- function at() {
333
+ function lt() {
322
334
  try {
323
- let e = it();
324
- return P.value = "", E("submit", e), e;
335
+ let e = ct();
336
+ return F.value = "", D("submit", e), e;
325
337
  } catch (e) {
326
- return Q(e instanceof a ? {
338
+ return $(e instanceof o ? {
327
339
  ...e.errors[0],
328
340
  cause: e
329
- } : ct(e, "CONTRACT_SIGNING_LOCATION_INVALID", "指定签署位置数据不完整")), !1;
341
+ } : ft(e, "CONTRACT_SIGNING_LOCATION_INVALID", "指定签署位置数据不完整")), !1;
330
342
  }
331
343
  }
332
- function ot() {
333
- let e = X(s(Ae.value));
334
- return M.value = "", st(!0), g(() => R.value?.scrollToPage(j.value)), e;
344
+ function ut() {
345
+ let e = Z(s(je.value));
346
+ return N.value = "", dt(!0), _(() => z.value?.scrollToPage(M.value)), e;
335
347
  }
336
- function st(e = !1) {
337
- let t = (e ? void 0 : k.value.files.find((e) => e.fileId === A.value)) ?? k.value.files[0];
338
- A.value = t?.fileId ?? "", j.value = ((e ? void 0 : t?.pages.find((e) => e.pageIndex === j.value)) ?? t?.pages[0])?.pageIndex ?? 0, k.value.placements.some((e) => e.id === M.value) || (M.value = "");
348
+ function dt(e = !1) {
349
+ let t = (e ? void 0 : A.value.files.find((e) => e.fileId === j.value)) ?? A.value.files[0];
350
+ j.value = t?.fileId ?? "", M.value = ((e ? void 0 : t?.pages.find((e) => e.pageIndex === M.value)) ?? t?.pages[0])?.pageIndex ?? 0, A.value.placements.some((e) => e.id === N.value) || (N.value = "");
339
351
  }
340
- function Q(e) {
341
- P.value = e.message, E("error", e);
352
+ function $(e) {
353
+ F.value = e.message, D("error", e);
342
354
  }
343
- function ct(e, t, n, r = {}) {
355
+ function ft(e, t, n, r = {}) {
344
356
  let i = typeof e == "object" && e && "status" in e ? Number(e.status) : void 0;
345
357
  return {
346
358
  code: t,
@@ -349,162 +361,167 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
349
361
  cause: e
350
362
  };
351
363
  }
352
- function lt(e, t, n) {
364
+ function pt(e, t, n) {
353
365
  return `${e}:${t}:${n ? "thumbnail" : "preview"}`;
354
366
  }
355
- function ut(e) {
356
- if (!(e in I.value)) return;
357
- let t = { ...I.value };
358
- delete t[e], I.value = t;
367
+ function mt(e) {
368
+ if (!(e in L.value)) return;
369
+ let t = { ...L.value };
370
+ delete t[e], L.value = t;
359
371
  }
360
- function dt() {
361
- U &&= (clearTimeout(U), void 0);
372
+ function ht() {
373
+ Me &&= (clearTimeout(Me), void 0);
362
374
  }
363
- function ft(e) {
375
+ function gt(e) {
364
376
  let t = e ?? (() => !0), n = new Set(K.abort(t));
365
- n.size && (F.value = F.value.filter((e) => !n.has(e))), e || (W = []);
377
+ n.size && (I.value = I.value.filter((e) => !n.has(e))), e || (W = []);
366
378
  }
367
- function pt(e) {
379
+ function _t(e) {
368
380
  return !!(e && typeof e == "object" && "cancelled" in e && e.cancelled) || e instanceof DOMException && e.name === "AbortError";
369
381
  }
370
- function mt(e) {
371
- let t = J.value;
372
- t && We(t.fileId, e, !1);
382
+ function vt(e) {
383
+ let t = Y.value;
384
+ t && Je(t.fileId, e, !1);
373
385
  }
374
- function ht(e) {
386
+ function yt(e) {
375
387
  return {
376
388
  ...e,
377
389
  sealType: e.sealType ? [...e.sealType] : void 0
378
390
  };
379
391
  }
380
- function $(e) {
392
+ function bt(e) {
381
393
  return JSON.stringify(e);
382
394
  }
383
- function gt() {
395
+ function xt() {
384
396
  return typeof crypto < "u" && "randomUUID" in crypto ? `contract-signing-placement-${crypto.randomUUID()}` : `contract-signing-placement-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
385
397
  }
386
- function _t(e) {
398
+ function St(e) {
387
399
  if (typeof e == "number" && Number.isFinite(e) && e > 0) return { "--gd-ant-contract-signing-location-height": `${e}px` };
388
400
  if (typeof e == "string" && e.trim()) return { "--gd-ant-contract-signing-location-height": e.trim() };
389
401
  }
390
402
  return pe({
391
- load: Z,
392
- validate: nt,
393
- getValue: rt,
394
- getOutput: it,
395
- submit: at,
396
- reset: ot,
397
- addPlacement: Qe,
398
- removePlacement: tt,
399
- fitWidth: He
400
- }), (t, n) => (v(), fe("section", {
401
- class: _(["gd-ant-contract-signing-location", {
402
- "is-readonly": e.readonly,
403
- "is-disabled": e.disabled
403
+ load: Q,
404
+ validate: ot,
405
+ getValue: st,
406
+ getOutput: ct,
407
+ submit: lt,
408
+ reset: ut,
409
+ addPlacement: nt,
410
+ removePlacement: at,
411
+ fitWidth: Ke
412
+ }), (t, n) => (y(), m("section", {
413
+ class: v(["gd-ant-contract-signing-location", {
414
+ "is-readonly": J.value,
415
+ "is-disabled": e.disabled,
416
+ "is-preview": q.value
404
417
  }]),
405
- style: me(Me.value)
418
+ style: me(Ie.value)
406
419
  }, [
407
- p("header", xe, [n[9] ||= p("div", { class: "gd-ant-contract-signing-location__title" }, [p("span", {
420
+ h("header", xe, [h("div", Se, [n[6] ||= h("span", {
408
421
  class: "gd-ant-contract-signing-location__title-bar",
409
422
  "aria-hidden": "true"
410
- }), p("div", null, [p("strong", null, "指定合同签署位置")])], -1), p("div", Se, [
411
- p("span", Ce, ge(k.value.placements.length) + " 个位置", 1),
412
- e.dataProvider ? (v(), d(x(w), {
423
+ }, null, -1), h("div", null, [h("strong", null, ge(q.value ? "合同预览" : "指定合同签署位置"), 1)])]), h("div", Ce, [
424
+ h("span", we, ge(A.value.placements.length) + " 个位置", 1),
425
+ e.dataProvider ? (y(), f(S(T), {
413
426
  key: 0,
414
- loading: N.value,
415
- onClick: Z
427
+ loading: P.value,
428
+ onClick: Q
416
429
  }, {
417
- default: C(() => [h(x(ye), { "aria-hidden": "true" }), n[6] ||= m(" 重新加载 ", -1)]),
430
+ default: w(() => [g(S(ye), { "aria-hidden": "true" }), n[7] ||= fe(" 重新加载 ", -1)]),
418
431
  _: 1
419
- }, 8, ["loading"])) : f("", !0),
420
- h(x(w), {
421
- disabled: q.value,
422
- onClick: ot
432
+ }, 8, ["loading"])) : p("", !0),
433
+ q.value ? p("", !0) : (y(), f(S(T), {
434
+ key: 1,
435
+ disabled: J.value,
436
+ onClick: ut
423
437
  }, {
424
- default: C(() => [...n[7] ||= [m("重置", -1)]]),
438
+ default: w(() => [...n[8] ||= [fe("重置", -1)]]),
425
439
  _: 1
426
- }, 8, ["disabled"]),
427
- e.showSubmitButton ? (v(), d(x(w), {
428
- key: 1,
440
+ }, 8, ["disabled"])),
441
+ Pe.value ? (y(), f(S(T), {
442
+ key: 2,
429
443
  type: "primary",
430
- loading: N.value,
444
+ loading: P.value,
431
445
  disabled: e.disabled,
432
- onClick: at
446
+ onClick: lt
433
447
  }, {
434
- default: C(() => [...n[8] ||= [m("确认并生成规则", -1)]]),
448
+ default: w(() => [...n[9] ||= [fe("确认并生成规则", -1)]]),
435
449
  _: 1
436
- }, 8, ["loading", "disabled"])) : f("", !0)
450
+ }, 8, ["loading", "disabled"])) : p("", !0)
437
451
  ])]),
438
- P.value ? (v(), fe("div", we, [p("span", null, ge(P.value), 1), e.dataProvider && e.contractId ? (v(), d(x(w), {
452
+ F.value ? (y(), m("div", Te, [h("span", null, ge(F.value), 1), e.dataProvider && e.contractId ? (y(), f(S(T), {
439
453
  key: 0,
440
454
  type: "link",
441
455
  size: "small",
442
- onClick: Z
456
+ onClick: Q
443
457
  }, {
444
- default: C(() => [...n[10] ||= [m("重试", -1)]]),
458
+ default: w(() => [...n[10] ||= [fe("重试", -1)]]),
445
459
  _: 1
446
- })) : f("", !0)])) : f("", !0),
447
- p("div", { class: _(["gd-ant-contract-signing-location__body", { "is-single-file": je.value }]) }, [
448
- je.value ? f("", !0) : (v(), fe("div", {
460
+ })) : p("", !0)])) : p("", !0),
461
+ h("div", { class: v(["gd-ant-contract-signing-location__body", {
462
+ "is-single-file": Fe.value,
463
+ "is-inspector-hidden": !Ne.value
464
+ }]) }, [
465
+ Fe.value ? p("", !0) : (y(), m("div", {
449
466
  key: 0,
450
- class: _(["gd-ant-contract-signing-location__navigator-wrap", { "is-collapsed": B.value }])
451
- }, [h(x(_e), { title: B.value ? "展开页面栏" : "收起页面栏" }, {
452
- default: C(() => [p("button", {
467
+ class: v(["gd-ant-contract-signing-location__navigator-wrap", { "is-collapsed": V.value }])
468
+ }, [g(S(_e), { title: V.value ? "展开页面栏" : "收起页面栏" }, {
469
+ default: w(() => [h("button", {
453
470
  type: "button",
454
471
  class: "gd-ant-contract-signing-location__panel-handle",
455
- "aria-label": B.value ? "展开页面栏" : "收起页面栏",
456
- "aria-expanded": !B.value,
457
- onClick: n[0] ||= (e) => B.value = !B.value
458
- }, [B.value ? (v(), d(x(be), {
472
+ "aria-label": V.value ? "展开页面栏" : "收起页面栏",
473
+ "aria-expanded": !V.value,
474
+ onClick: n[0] ||= (e) => V.value = !V.value
475
+ }, [V.value ? (y(), f(S(be), {
459
476
  key: 0,
460
477
  "aria-hidden": "true"
461
- })) : (v(), d(x(ve), {
478
+ })) : (y(), f(S(ve), {
462
479
  key: 1,
463
480
  "aria-hidden": "true"
464
- }))], 8, Te)]),
481
+ }))], 8, Ee)]),
465
482
  _: 1
466
- }, 8, ["title"]), p("div", Ee, [h(ue, {
467
- files: k.value.files,
468
- "active-file-id": A.value,
469
- "loading-preview-keys": Ie.value,
470
- "error-preview-keys": Le.value,
471
- onSelect: Ge
483
+ }, 8, ["title"]), h("div", De, [g(ue, {
484
+ files: A.value.files,
485
+ "active-file-id": j.value,
486
+ "loading-preview-keys": Be.value,
487
+ "error-preview-keys": Ve.value,
488
+ onSelect: Ye
472
489
  }, null, 8, [
473
490
  "files",
474
491
  "active-file-id",
475
492
  "loading-preview-keys",
476
493
  "error-preview-keys"
477
494
  ])])], 2)),
478
- h(ce, {
495
+ g(ce, {
479
496
  ref_key: "canvasRef",
480
- ref: R,
481
- file: J.value,
482
- pages: J.value?.pages ?? [],
483
- placements: Pe.value,
484
- "selected-placement-id": M.value,
485
- readonly: q.value,
497
+ ref: z,
498
+ file: Y.value,
499
+ pages: Y.value?.pages ?? [],
500
+ placements: Re.value,
501
+ "selected-placement-id": N.value,
502
+ readonly: J.value,
486
503
  resizable: e.resizable,
487
- "seal-size-limit": D.value,
504
+ "seal-size-limit": O.value,
488
505
  "seal-type-options": e.sealTypeOptions,
489
- zoom: L.value,
490
- "preview-loading-keys": Re.value,
491
- "preview-error-map": ze.value,
492
- "active-page-index": j.value,
506
+ zoom: R.value,
507
+ "preview-loading-keys": He.value,
508
+ "preview-error-map": Ue.value,
509
+ "active-page-index": M.value,
493
510
  "min-zoom": e.minZoom,
494
511
  "max-zoom": e.maxZoom,
495
- onSelect: n[1] ||= (e) => M.value = e,
496
- onRetry: mt,
497
- onAdd: n[2] ||= (e, t, n, r) => Qe(e, {
512
+ onSelect: n[1] ||= (e) => N.value = e,
513
+ onRetry: vt,
514
+ onAdd: n[2] ||= (e, t, n, r) => nt(e, {
498
515
  signLeft: t,
499
516
  signTop: n,
500
517
  pageIndex: r
501
518
  }),
502
- onUpdate: n[3] ||= (e) => $e(e.id, e),
503
- onRemove: tt,
504
- onVisiblePages: Je,
505
- onViewPage: Ke,
506
- onPageChange: qe,
507
- onZoomChange: Ve
519
+ onUpdate: n[3] ||= (e) => rt(e.id, e),
520
+ onRemove: at,
521
+ onVisiblePages: Qe,
522
+ onViewPage: Xe,
523
+ onPageChange: Ze,
524
+ onZoomChange: Ge
508
525
  }, null, 8, [
509
526
  "file",
510
527
  "pages",
@@ -521,36 +538,40 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
521
538
  "min-zoom",
522
539
  "max-zoom"
523
540
  ]),
524
- p("div", { class: _(["gd-ant-contract-signing-location__inspector-wrap", { "is-collapsed": z.value }]) }, [h(x(_e), { title: z.value ? "展开属性栏" : "收起属性栏" }, {
525
- default: C(() => [p("button", {
541
+ Ne.value ? (y(), m("div", {
542
+ key: 1,
543
+ class: v(["gd-ant-contract-signing-location__inspector-wrap", { "is-collapsed": B.value }])
544
+ }, [g(S(_e), { title: B.value ? "展开属性栏" : "收起属性栏" }, {
545
+ default: w(() => [h("button", {
526
546
  type: "button",
527
547
  class: "gd-ant-contract-signing-location__panel-handle",
528
- "aria-label": z.value ? "展开属性栏" : "收起属性栏",
529
- "aria-expanded": !z.value,
530
- onClick: n[4] ||= (e) => z.value = !z.value
531
- }, [z.value ? (v(), d(x(ve), {
548
+ "aria-label": B.value ? "展开属性栏" : "收起属性栏",
549
+ "aria-expanded": !B.value,
550
+ onClick: n[4] ||= (e) => B.value = !B.value
551
+ }, [B.value ? (y(), f(S(ve), {
532
552
  key: 0,
533
553
  "aria-hidden": "true"
534
- })) : (v(), d(x(be), {
554
+ })) : (y(), f(S(be), {
535
555
  key: 1,
536
556
  "aria-hidden": "true"
537
- }))], 8, De)]),
557
+ }))], 8, Oe)]),
538
558
  _: 1
539
- }, 8, ["title"]), p("div", Oe, [h(le, {
540
- placement: Y.value,
541
- page: Fe.value,
542
- pages: J.value?.pages ?? [],
543
- placements: Pe.value,
544
- readonly: q.value,
559
+ }, 8, ["title"]), h("div", ke, [g(le, {
560
+ placement: X.value,
561
+ page: ze.value,
562
+ pages: Y.value?.pages ?? [],
563
+ placements: Re.value,
564
+ readonly: J.value,
545
565
  resizable: e.resizable,
546
- "seal-size-limit": D.value,
566
+ "seal-size-limit": O.value,
547
567
  "seal-type-options": e.sealTypeOptions,
568
+ "allowed-placement-types": e.allowedPlacementTypes,
548
569
  "size-profile": e.sizeProfile,
549
- onAdd: Qe,
550
- onUpdate: n[5] ||= (e) => Y.value && $e(Y.value.id, e),
551
- onDuplicate: et,
552
- onRemove: tt,
553
- onLocate: Ze
570
+ onAdd: nt,
571
+ onUpdate: n[5] ||= (e) => X.value && rt(X.value.id, e),
572
+ onDuplicate: it,
573
+ onRemove: at,
574
+ onLocate: tt
554
575
  }, null, 8, [
555
576
  "placement",
556
577
  "page",
@@ -560,11 +581,12 @@ var xe = { class: "gd-ant-contract-signing-location__header" }, Se = { class: "g
560
581
  "resizable",
561
582
  "seal-size-limit",
562
583
  "seal-type-options",
584
+ "allowed-placement-types",
563
585
  "size-profile"
564
- ])])], 2)
586
+ ])])], 2)) : p("", !0)
565
587
  ], 2)
566
588
  ], 6));
567
589
  }
568
590
  });
569
591
  //#endregion
570
- export { ke as default };
592
+ export { Ae as default };