@guodun/antdv 1.5.1 → 1.5.3

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 (37) hide show
  1. package/dist/es/components/contract-signing-location/style/index.css +1 -1
  2. package/dist/es/components/pro-contract-template-designer/src/ContractPrintIframe.mjs +3 -5
  3. package/dist/es/components/pro-contract-template-designer/src/ContractPrintIframe.vue.mjs +7 -0
  4. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.mjs +190 -169
  5. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.mjs +43 -43
  6. package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +114 -98
  7. package/dist/es/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.mjs +29 -18
  8. package/dist/es/components/pro-contract-template-designer/src/extensions/editor-extensions.mjs +4 -1
  9. package/dist/es/components/pro-contract-template-designer/src/extensions/word-paste.mjs +62 -34
  10. package/dist/es/components/pro-contract-template-designer/src/utils/clipboard.mjs +24 -0
  11. package/dist/es/components/pro-contract-template-designer/src/utils/toolbar-overflow.mjs +4 -1
  12. package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
  13. package/dist/lib/components/contract-signing-location/style/index.css +1 -1
  14. package/dist/lib/components/pro-contract-template-designer/src/ContractPrintIframe.cjs +1 -1
  15. package/dist/lib/components/pro-contract-template-designer/src/ContractPrintIframe.vue.cjs +1 -1
  16. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.cjs +1 -1
  17. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.cjs +1 -1
  18. package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
  19. package/dist/lib/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.cjs +1 -1
  20. package/dist/lib/components/pro-contract-template-designer/src/extensions/editor-extensions.cjs +1 -1
  21. package/dist/lib/components/pro-contract-template-designer/src/extensions/word-paste.cjs +1 -1
  22. package/dist/lib/components/pro-contract-template-designer/src/utils/clipboard.cjs +1 -0
  23. package/dist/lib/components/pro-contract-template-designer/src/utils/toolbar-overflow.cjs +1 -1
  24. package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
  25. package/dist/theme/contract-signing-location.css +1 -1
  26. package/dist/theme/icon.css +1 -1
  27. package/dist/theme/index.css +1 -1
  28. package/dist/types/components/pro-contract-template-designer/src/ContractPrintIframe.vue.d.ts +1 -1
  29. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.d.ts +2 -1
  30. package/dist/types/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.d.ts +1 -1
  31. package/dist/types/components/pro-contract-template-designer/src/extensions/editor-extensions.d.ts +2 -0
  32. package/dist/types/components/pro-contract-template-designer/src/extensions/word-paste.d.ts +2 -0
  33. package/dist/types/components/pro-contract-template-designer/src/utils/clipboard.d.ts +7 -0
  34. package/dist/types/components/pro-contract-template-designer/src/utils/toolbar-overflow.d.ts +2 -2
  35. package/package.json +1 -1
  36. package/dist/es/components/pro-contract-template-designer/src/ContractPrintIframe.vue_vue_type_style_index_0_scoped_a9912ff0_lang.css +0 -1
  37. package/dist/lib/components/pro-contract-template-designer/src/ContractPrintIframe.vue_vue_type_style_index_0_scoped_a9912ff0_lang.css +0 -1
@@ -1,14 +1,15 @@
1
- import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, openBlock as s, ref as c, toDisplayString as l, unref as u, watch as d, withCtx as f } from "vue";
2
- import { Button as p, Modal as m, Tooltip as h, message as g } from "ant-design-vue";
3
- import { CheckOutlined as _, CopyOutlined as v } from "@ant-design/icons-vue";
1
+ import { writeContractClipboardText as e } from "./utils/clipboard.mjs";
2
+ import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, openBlock as c, ref as l, toDisplayString as u, unref as d, watch as f, withCtx as p } from "vue";
3
+ import { Button as m, Modal as h, Tooltip as g, message as _ } from "ant-design-vue";
4
+ import { CheckOutlined as v, CopyOutlined as y } from "@ant-design/icons-vue";
4
5
  //#region src/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue?vue&type=script&setup=true&lang.ts
5
- var y = { class: "gd-contract-template-designer__variable-data-grid" }, b = { class: "gd-contract-template-designer__variable-data-section" }, x = { class: "gd-contract-template-designer__variable-data-section-head" }, S = { class: "gd-contract-template-designer__variable-data-code" }, C = {
6
+ var b = { class: "gd-contract-template-designer__variable-data-grid" }, x = { class: "gd-contract-template-designer__variable-data-section" }, S = { class: "gd-contract-template-designer__variable-data-section-head" }, C = { class: "gd-contract-template-designer__variable-data-code" }, w = {
6
7
  key: 0,
7
8
  class: "gd-contract-template-designer__variable-data-error"
8
- }, w = { class: "gd-contract-template-designer__variable-data-section" }, T = { class: "gd-contract-template-designer__variable-data-section-head" }, E = { class: "gd-contract-template-designer__variable-data-code" }, D = {
9
+ }, T = { class: "gd-contract-template-designer__variable-data-section" }, E = { class: "gd-contract-template-designer__variable-data-section-head" }, D = { class: "gd-contract-template-designer__variable-data-code" }, O = {
9
10
  key: 0,
10
11
  class: "gd-contract-template-designer__variable-data-error"
11
- }, O = /* @__PURE__ */ o({
12
+ }, k = /* @__PURE__ */ s({
12
13
  __name: "ContractTemplateVariableDataModal",
13
14
  props: {
14
15
  open: { type: Boolean },
@@ -16,47 +17,46 @@ var y = { class: "gd-contract-template-designer__variable-data-grid" }, b = { cl
16
17
  fileName: {}
17
18
  },
18
19
  emits: ["update:open", "cancel"],
19
- setup(o, { emit: O }) {
20
- let k = o, A = O, j = c(), M = c(), N = c(""), P = c(), F = e(() => JSON.stringify(k.data.values, null, 2)), I = e(() => JSON.stringify(k.data.variables, null, 2));
21
- d(() => k.open, (e) => {
22
- e || (j.value = void 0, M.value = void 0, N.value = "", P.value = void 0);
20
+ setup(s, { emit: k }) {
21
+ let A = s, j = k, M = l(), N = l(), P = l(""), F = l(), I = t(() => JSON.stringify(A.data.values, null, 2)), L = t(() => JSON.stringify(A.data.variables, null, 2));
22
+ f(() => A.open, (e) => {
23
+ e || (M.value = void 0, N.value = void 0, P.value = "", F.value = void 0);
23
24
  });
24
- async function L(e) {
25
- let t = e === "values" ? F.value : I.value;
26
- j.value = e, M.value = void 0, N.value = "", P.value = void 0;
25
+ async function R(t) {
26
+ let n = t === "values" ? I.value : L.value;
27
+ M.value = t, N.value = void 0, P.value = "", F.value = void 0;
27
28
  try {
28
- if (typeof navigator > "u" || !navigator.clipboard?.writeText) throw Error("当前浏览器未授权剪贴板操作");
29
- await navigator.clipboard.writeText(t), M.value = e, g.success(e === "values" ? "控件值对象已复制" : "控件变量定义已复制");
30
- } catch (t) {
31
- let n = t instanceof Error ? t.message : "未知错误";
32
- N.value = `复制失败:${n}`, P.value = e, g.error(`复制失败:${n}`);
29
+ await e(n), N.value = t, _.success(t === "values" ? "控件值对象已复制" : "控件变量定义已复制");
30
+ } catch (e) {
31
+ let n = e instanceof Error ? e.message : "未知错误";
32
+ P.value = `复制失败:${n}`, F.value = t, _.error(`复制失败:${n}`);
33
33
  } finally {
34
- j.value = void 0;
34
+ M.value = void 0;
35
35
  }
36
36
  }
37
- return (e, c) => (s(), t(u(m), {
38
- open: o.open,
39
- title: o.fileName ? `控件变量 · ${o.fileName}` : "控件变量",
37
+ return (e, t) => (c(), n(d(h), {
38
+ open: s.open,
39
+ title: s.fileName ? `控件变量 · ${s.fileName}` : "控件变量",
40
40
  width: "min(1100px, calc(100vw - 48px))",
41
41
  centered: "",
42
42
  footer: null,
43
43
  "wrap-class-name": "gd-contract-template-designer__variable-data-modal",
44
- "onUpdate:open": c[2] ||= (e) => A("update:open", e),
45
- onCancel: c[3] ||= (e) => A("cancel")
44
+ "onUpdate:open": t[2] ||= (e) => j("update:open", e),
45
+ onCancel: t[3] ||= (e) => j("cancel")
46
46
  }, {
47
- default: f(() => [i("div", y, [i("section", b, [
48
- i("div", x, [c[4] ||= i("div", null, [i("strong", null, "接口请求值"), i("small", null, "按控件 key 生成,可直接作为请求 body")], -1), a(u(h), { title: "复制接口请求值" }, {
49
- default: f(() => [a(u(p), {
47
+ default: p(() => [a("div", b, [a("section", x, [
48
+ a("div", S, [t[4] ||= a("div", null, [a("strong", null, "接口请求值"), a("small", null, "按控件 key 生成,可直接作为请求 body")], -1), o(d(g), { title: "复制接口请求值" }, {
49
+ default: p(() => [o(d(m), {
50
50
  size: "small",
51
51
  class: "gd-contract-template-designer__icon-button",
52
- loading: j.value === "values",
52
+ loading: M.value === "values",
53
53
  "aria-label": "复制接口请求值",
54
- onClick: c[0] ||= (e) => L("values")
54
+ onClick: t[0] ||= (e) => R("values")
55
55
  }, {
56
- default: f(() => [M.value === "values" ? (s(), t(u(_), {
56
+ default: p(() => [N.value === "values" ? (c(), n(d(v), {
57
57
  key: 1,
58
58
  "aria-hidden": "true"
59
- })) : (s(), t(u(v), {
59
+ })) : (c(), n(d(y), {
60
60
  key: 0,
61
61
  "aria-hidden": "true"
62
62
  }))]),
@@ -64,21 +64,21 @@ var y = { class: "gd-contract-template-designer__variable-data-grid" }, b = { cl
64
64
  }, 8, ["loading"])]),
65
65
  _: 1
66
66
  })]),
67
- i("pre", S, l(F.value), 1),
68
- N.value && P.value === "values" ? (s(), r("small", C, l(N.value), 1)) : n("", !0)
69
- ]), i("section", w, [
70
- i("div", T, [c[5] ||= i("div", null, [i("strong", null, "控件变量定义"), i("small", null, "当前文件完整 variables 数组")], -1), a(u(h), { title: "复制控件变量定义" }, {
71
- default: f(() => [a(u(p), {
67
+ a("pre", C, u(I.value), 1),
68
+ P.value && F.value === "values" ? (c(), i("small", w, u(P.value), 1)) : r("", !0)
69
+ ]), a("section", T, [
70
+ a("div", E, [t[5] ||= a("div", null, [a("strong", null, "控件变量定义"), a("small", null, "当前文件完整 variables 数组")], -1), o(d(g), { title: "复制控件变量定义" }, {
71
+ default: p(() => [o(d(m), {
72
72
  size: "small",
73
73
  class: "gd-contract-template-designer__icon-button",
74
- loading: j.value === "variables",
74
+ loading: M.value === "variables",
75
75
  "aria-label": "复制控件变量定义",
76
- onClick: c[1] ||= (e) => L("variables")
76
+ onClick: t[1] ||= (e) => R("variables")
77
77
  }, {
78
- default: f(() => [M.value === "variables" ? (s(), t(u(_), {
78
+ default: p(() => [N.value === "variables" ? (c(), n(d(v), {
79
79
  key: 1,
80
80
  "aria-hidden": "true"
81
- })) : (s(), t(u(v), {
81
+ })) : (c(), n(d(y), {
82
82
  key: 0,
83
83
  "aria-hidden": "true"
84
84
  }))]),
@@ -86,12 +86,12 @@ var y = { class: "gd-contract-template-designer__variable-data-grid" }, b = { cl
86
86
  }, 8, ["loading"])]),
87
87
  _: 1
88
88
  })]),
89
- i("pre", E, l(I.value), 1),
90
- N.value && P.value === "variables" ? (s(), r("small", D, l(N.value), 1)) : n("", !0)
89
+ a("pre", D, u(L.value), 1),
90
+ P.value && F.value === "variables" ? (c(), i("small", O, u(P.value), 1)) : r("", !0)
91
91
  ])])]),
92
92
  _: 1
93
93
  }, 8, ["open", "title"]));
94
94
  }
95
95
  });
96
96
  //#endregion
97
- export { O as default };
97
+ export { k as default };