@guodun/antdv 1.3.2 → 1.4.0

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