@aplus-frontend/ui 7.10.6 → 7.11.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 (113) hide show
  1. package/es/index.mjs +93 -91
  2. package/es/src/ag-grid/editable/form-item.vue.mjs +75 -63
  3. package/es/src/ag-grid/editable/index.vue.mjs +80 -72
  4. package/es/src/ag-grid/editable/interface.d.ts +2 -1
  5. package/es/src/ag-grid/editable/utils.d.ts +7 -0
  6. package/es/src/ag-grid/editable/utils.mjs +32 -17
  7. package/es/src/ap-form/ap-form.vue2.mjs +144 -153
  8. package/es/src/ap-form/utils/transform.d.ts +6 -0
  9. package/es/src/ap-form/utils/transform.mjs +30 -0
  10. package/es/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
  11. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +129 -93
  12. package/es/src/business/ap-appendix/interface.d.ts +4 -0
  13. package/es/src/business/ap-appendix/style/index.mjs +56 -34
  14. package/es/src/business/ap-attachment/ApAttachment.mjs +112 -89
  15. package/es/src/business/ap-attachment/style/index.mjs +21 -7
  16. package/es/src/business/ap-download/ap-download.vue.d.ts +1 -0
  17. package/es/src/business/ap-download/ap-download.vue.mjs +86 -45
  18. package/es/src/business/ap-download/interface.d.ts +4 -0
  19. package/es/src/business/ap-download/style/index.mjs +8 -4
  20. package/es/src/business/ap-file-preview/ap-file-preview.vue.d.ts +4 -0
  21. package/es/src/business/ap-file-preview/ap-file-preview.vue.mjs +4 -0
  22. package/es/src/business/ap-file-preview/ap-file-preview.vue2.mjs +104 -0
  23. package/es/src/business/ap-file-preview/components/error-result/index.vue.d.ts +6 -0
  24. package/es/src/business/ap-file-preview/components/error-result/index.vue.mjs +4 -0
  25. package/es/src/business/ap-file-preview/components/error-result/index.vue2.mjs +40 -0
  26. package/es/src/business/ap-file-preview/icons/not-exist-icon.vue.d.ts +3 -0
  27. package/es/src/business/ap-file-preview/icons/not-exist-icon.vue.mjs +20 -0
  28. package/es/src/business/ap-file-preview/icons/not-preview-icon.vue.d.ts +3 -0
  29. package/es/src/business/ap-file-preview/icons/not-preview-icon.vue.mjs +20 -0
  30. package/es/src/business/ap-file-preview/index.d.ts +7 -0
  31. package/es/src/business/ap-file-preview/index.mjs +8 -0
  32. package/es/src/business/ap-file-preview/interface.d.ts +45 -0
  33. package/es/src/business/ap-file-preview/style/index.d.ts +5 -0
  34. package/es/src/business/ap-file-preview/style/index.mjs +46 -0
  35. package/es/src/business/ap-file-preview/utils/create-file-preview-modal.d.ts +2 -0
  36. package/es/src/business/ap-file-preview/utils/create-file-preview-modal.mjs +18 -0
  37. package/es/src/business/ap-file-preview/utils/default-parser-plugin.d.ts +4 -0
  38. package/es/src/business/ap-file-preview/utils/default-parser-plugin.mjs +48 -0
  39. package/es/src/business/ap-image/ApImage.vue2.mjs +16 -16
  40. package/es/src/business/ap-upload/apUpload.vue.d.ts +1 -1
  41. package/es/src/business/ap-upload/apUploadTypes.d.ts +2 -2
  42. package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +94 -82
  43. package/es/src/business/ap-upload/style/multiple-file.mjs +6 -3
  44. package/es/src/business/index.d.ts +1 -0
  45. package/es/src/business/index.mjs +16 -14
  46. package/es/src/config-provider/config-provider-props.d.ts +6 -0
  47. package/es/src/config-provider/config-provider-props.mjs +6 -2
  48. package/es/src/config-provider/config-provider.d.ts +17 -1
  49. package/es/src/config-provider/config-provider.mjs +24 -23
  50. package/es/src/config-provider/hooks/use-global-config.d.ts +7 -0
  51. package/es/src/config-provider/index.d.ts +31 -3
  52. package/es/src/index.mjs +74 -72
  53. package/es/src/locale/lang/en.mjs +5 -0
  54. package/es/src/locale/lang/zh-cn.mjs +5 -0
  55. package/es/src/version.d.ts +1 -1
  56. package/es/src/version.mjs +1 -1
  57. package/lib/index.js +1 -1
  58. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  59. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  60. package/lib/src/ag-grid/editable/interface.d.ts +2 -1
  61. package/lib/src/ag-grid/editable/utils.d.ts +7 -0
  62. package/lib/src/ag-grid/editable/utils.js +1 -1
  63. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  64. package/lib/src/ap-form/utils/transform.d.ts +6 -0
  65. package/lib/src/ap-form/utils/transform.js +1 -0
  66. package/lib/src/ap-pro-card/components/card/index.vue.d.ts +1 -1
  67. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  68. package/lib/src/business/ap-appendix/interface.d.ts +4 -0
  69. package/lib/src/business/ap-appendix/style/index.js +1 -1
  70. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  71. package/lib/src/business/ap-attachment/style/index.js +1 -1
  72. package/lib/src/business/ap-download/ap-download.vue.d.ts +1 -0
  73. package/lib/src/business/ap-download/ap-download.vue.js +1 -1
  74. package/lib/src/business/ap-download/interface.d.ts +4 -0
  75. package/lib/src/business/ap-download/style/index.js +1 -1
  76. package/lib/src/business/ap-file-preview/ap-file-preview.vue.d.ts +4 -0
  77. package/lib/src/business/ap-file-preview/ap-file-preview.vue.js +1 -0
  78. package/lib/src/business/ap-file-preview/ap-file-preview.vue2.js +1 -0
  79. package/lib/src/business/ap-file-preview/components/error-result/index.vue.d.ts +6 -0
  80. package/lib/src/business/ap-file-preview/components/error-result/index.vue.js +1 -0
  81. package/lib/src/business/ap-file-preview/components/error-result/index.vue2.js +1 -0
  82. package/lib/src/business/ap-file-preview/icons/not-exist-icon.vue.d.ts +3 -0
  83. package/lib/src/business/ap-file-preview/icons/not-exist-icon.vue.js +1 -0
  84. package/lib/src/business/ap-file-preview/icons/not-preview-icon.vue.d.ts +3 -0
  85. package/lib/src/business/ap-file-preview/icons/not-preview-icon.vue.js +1 -0
  86. package/lib/src/business/ap-file-preview/index.d.ts +7 -0
  87. package/lib/src/business/ap-file-preview/index.js +1 -0
  88. package/lib/src/business/ap-file-preview/interface.d.ts +45 -0
  89. package/lib/src/business/ap-file-preview/style/index.d.ts +5 -0
  90. package/lib/src/business/ap-file-preview/style/index.js +1 -0
  91. package/lib/src/business/ap-file-preview/utils/create-file-preview-modal.d.ts +2 -0
  92. package/lib/src/business/ap-file-preview/utils/create-file-preview-modal.js +1 -0
  93. package/lib/src/business/ap-file-preview/utils/default-parser-plugin.d.ts +4 -0
  94. package/lib/src/business/ap-file-preview/utils/default-parser-plugin.js +1 -0
  95. package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
  96. package/lib/src/business/ap-upload/apUpload.vue.d.ts +1 -1
  97. package/lib/src/business/ap-upload/apUploadTypes.d.ts +2 -2
  98. package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
  99. package/lib/src/business/ap-upload/style/multiple-file.js +1 -1
  100. package/lib/src/business/index.d.ts +1 -0
  101. package/lib/src/business/index.js +1 -1
  102. package/lib/src/config-provider/config-provider-props.d.ts +6 -0
  103. package/lib/src/config-provider/config-provider-props.js +1 -1
  104. package/lib/src/config-provider/config-provider.d.ts +17 -1
  105. package/lib/src/config-provider/config-provider.js +1 -1
  106. package/lib/src/config-provider/hooks/use-global-config.d.ts +7 -0
  107. package/lib/src/config-provider/index.d.ts +31 -3
  108. package/lib/src/index.js +1 -1
  109. package/lib/src/locale/lang/en.js +1 -1
  110. package/lib/src/locale/lang/zh-cn.js +1 -1
  111. package/lib/src/version.d.ts +1 -1
  112. package/lib/src/version.js +1 -1
  113. package/package.json +1 -1
@@ -1,45 +1,47 @@
1
- import { defineComponent as Y, inject as a, ref as Z, watch as ee, nextTick as oe, createElementBlock as b, openBlock as x, normalizeClass as te, unref as n, createVNode as y, withCtx as U, createElementVNode as S, createTextVNode as ae, toDisplayString as L, withModifiers as se, createCommentVNode as ne, createBlock as re, resolveDynamicComponent as le } from "vue";
2
- import { UploadOutlined as ie, VerticalAlignBottomOutlined as ce } from "@ant-design/icons-vue";
1
+ import { defineComponent as Z, inject as a, ref as ee, watch as oe, nextTick as te, createElementBlock as C, openBlock as x, normalizeClass as ae, unref as n, createVNode as y, withCtx as N, createElementVNode as P, createTextVNode as se, toDisplayString as L, withModifiers as ne, createCommentVNode as re, createBlock as ie, resolveDynamicComponent as le } from "vue";
2
+ import { UploadOutlined as ce } from "@ant-design/icons-vue";
3
3
  import { message as p, Upload as ue, Button as pe } from "@aplus-frontend/antdv";
4
+ import { IconApAdLineDownload as me } from "@aplus-frontend/icon";
5
+ import { ApFilePreview as de } from "../../ap-file-preview/index.mjs";
4
6
  import "../../../config-provider/index.mjs";
5
- import { useOss as de, getOssInstance as z } from "../hooks/useOss.mjs";
6
- import me from "../style/index.mjs";
7
- import { fileMatchesAccept as fe, getAcceptText as ge } from "../utils/accept.mjs";
8
- import { getPath as he, getName as ve, getReturnData as B } from "../utils/returnData.mjs";
9
- import { useGlobalConfig as we } from "../../../config-provider/hooks/use-global-config.mjs";
10
- import { useLocale as xe } from "../../../config-provider/hooks/use-locale.mjs";
11
- import { useNamespace as ye } from "../../../config-provider/hooks/use-namespace.mjs";
12
- const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 }, ze = /* @__PURE__ */ Y({
7
+ import { useOss as fe, getOssInstance as S } from "../hooks/useOss.mjs";
8
+ import ge from "../style/index.mjs";
9
+ import { fileMatchesAccept as ve, getAcceptText as we } from "../utils/accept.mjs";
10
+ import { getPath as he, getName as xe, getReturnData as D } from "../utils/returnData.mjs";
11
+ import { useGlobalConfig as ye } from "../../../config-provider/hooks/use-global-config.mjs";
12
+ import { useLocale as ke } from "../../../config-provider/hooks/use-locale.mjs";
13
+ import { useNamespace as be } from "../../../config-provider/hooks/use-namespace.mjs";
14
+ const Ce = { class: "multiple-file-context" }, Ne = { key: 0 }, Ue = { key: 1 }, Oe = /* @__PURE__ */ Z({
13
15
  __name: "MultipleFile",
14
- setup(Ue, { expose: D }) {
15
- const N = we(
16
+ setup(Ee, { expose: z }) {
17
+ const U = ye(
16
18
  "downloadCenterTriggerConfig"
17
- ), { t: l } = xe(), { b: O } = ye("ap-upload-multiple-file"), P = me("ap-upload"), { put: V } = de(), q = a("dirName"), j = a("baseDirName"), k = a("accept") || "*", E = a("maxSize") ?? 500, $ = a("title") || l("ap.apUpload.uploadFile"), f = a("subTitle"), i = a("maxCount") ?? 10, d = a("uploadingCount"), _ = a("beforeUpload"), F = a("customRequest"), g = a("getOssAccess"), G = a("maxSizeErrorMsg"), W = a("maxCountErrorMsg"), H = a("acceptErrorMsg"), T = a("onRemove"), C = a("showUploadErrorMsg"), A = a("bucket"), r = a("value"), c = [], h = a("needName"), m = Z(null);
18
- ee(
19
+ ), { t: i } = ke(), { b: B } = be("ap-upload-multiple-file"), O = ge("ap-upload"), { put: V } = fe(), q = a("dirName"), j = a("baseDirName"), k = a("accept") || "*", E = a("maxSize") ?? 500, $ = a("title") || i("ap.apUpload.uploadFile"), f = a("subTitle"), l = a("maxCount") ?? 10, m = a("uploadingCount"), F = a("beforeUpload"), A = a("customRequest"), g = a("getOssAccess"), G = a("maxSizeErrorMsg"), W = a("maxCountErrorMsg"), H = a("acceptErrorMsg"), _ = a("onRemove"), b = a("showUploadErrorMsg"), T = a("bucket"), r = a("value"), c = [], v = a("needName"), d = ee(null);
20
+ oe(
19
21
  () => r?.value,
20
22
  function(e) {
21
- !m?.value?.fileList?.length && e && R(e);
23
+ !d?.value?.fileList?.length && e && I(e);
22
24
  },
23
25
  { immediate: !0 }
24
26
  );
25
- function R(e) {
27
+ function I(e) {
26
28
  if (!e) {
27
- u = [], m.value.fileList = [], r.value = void 0, c.splice(0, c.length);
29
+ u = [], d.value.fileList = [], r.value = void 0, c.splice(0, c.length);
28
30
  return;
29
31
  }
30
- oe(() => {
32
+ te(() => {
31
33
  const o = e.map((t) => {
32
- const s = he(h, t), M = ve(h, t), w = new File(
34
+ const s = he(v, t), M = xe(v, t), h = new File(
33
35
  [t],
34
36
  M,
35
37
  {}
36
38
  );
37
- return w.response = s, w.uid = s, w.status = "done", w;
39
+ return h.response = s, h.uid = s, h.status = "done", h;
38
40
  });
39
- if (i && o.length > i) {
41
+ if (l && o.length > l) {
40
42
  p.warning(
41
- l("ap.apUpload.fileInitializationException", {
42
- maxCount: i
43
+ i("ap.apUpload.fileInitializationException", {
44
+ maxCount: l
43
45
  })
44
46
  );
45
47
  return;
@@ -49,45 +51,45 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
49
51
  uid: t.uid,
50
52
  path: t.response
51
53
  });
52
- }), m.value.fileList = o, r.value = e;
54
+ }), d.value.fileList = o, r.value = e;
53
55
  });
54
56
  }
55
- D({ setValue: R });
56
- let u = [], I;
57
- function v(e) {
57
+ z({ setValue: I });
58
+ let u = [], R;
59
+ function w(e) {
58
60
  setTimeout(() => {
59
- const o = m.value.fileList.findIndex(
61
+ const o = d.value.fileList.findIndex(
60
62
  (t) => t.uid === e.uid
61
63
  );
62
- o >= 0 && m.value.fileList.splice(o, 1);
64
+ o >= 0 && d.value.fileList.splice(o, 1);
63
65
  });
64
66
  }
65
67
  async function J(e) {
66
- if (i && i > 1 && u.length >= i)
67
- return clearTimeout(I), I = setTimeout(() => {
68
+ if (l && l > 1 && u.length >= l)
69
+ return clearTimeout(R), R = setTimeout(() => {
68
70
  p.warning(
69
- W || l("ap.apUpload.maxUploadFiles", {
70
- maxCount: i
71
+ W || i("ap.apUpload.maxUploadFiles", {
72
+ maxCount: l
71
73
  })
72
74
  );
73
- }), v(e), !1;
75
+ }), w(e), !1;
74
76
  if (e.size > E * 1024 * 1024)
75
77
  return p.warning(
76
- G || l("ap.apUpload.maxUploadFileSize", {
78
+ G || i("ap.apUpload.maxUploadFileSize", {
77
79
  maxSize: E
78
80
  })
79
- ), v(e), !1;
80
- if (!fe(e, k))
81
+ ), w(e), !1;
82
+ if (!ve(e, k))
81
83
  return p.warning(
82
- H || l("ap.apUpload.fileFormatNotSupported")
83
- ), v(e), !1;
84
- if (typeof _ == "function" && await _(e) === !1)
85
- return v(e), !1;
86
- i && i === 1 && (u = [], r.value = void 0), u.push(e);
84
+ H || i("ap.apUpload.fileFormatNotSupported")
85
+ ), w(e), !1;
86
+ if (typeof F == "function" && await F(e) === !1)
87
+ return w(e), !1;
88
+ l && l === 1 && (u = [], r.value = void 0), u.push(e);
87
89
  }
88
90
  async function K(e) {
89
- if (d.value++, typeof F == "function") {
90
- F({
91
+ if (m.value++, typeof A == "function") {
92
+ A({
91
93
  onProgress: (o) => {
92
94
  setTimeout(() => {
93
95
  e.onProgress({
@@ -96,30 +98,30 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
96
98
  });
97
99
  },
98
100
  onError: (o) => {
99
- C && p.warning(o || l("ap.apUpload.networkAnomaly")), setTimeout(() => {
101
+ b && p.warning(o || i("ap.apUpload.networkAnomaly")), setTimeout(() => {
100
102
  e.onError({
101
103
  name: o,
102
104
  message: o
103
105
  });
104
- }), d.value--;
106
+ }), m.value--;
105
107
  },
106
108
  onSuccess: (o) => {
107
109
  setTimeout(() => {
108
110
  e.onSuccess(o);
109
111
  }), r.value = [
110
112
  ...r.value || [],
111
- B(h, o, e.file.name)
113
+ D(v, o, e.file.name)
112
114
  ], c.push({
113
115
  uid: e.file.uid,
114
116
  path: o
115
- }), d.value--;
117
+ }), m.value--;
116
118
  },
117
119
  file: e.file
118
120
  });
119
121
  return;
120
122
  }
121
123
  try {
122
- const o = await (A ? g(A) : g()), t = await z(async () => o);
124
+ const o = await (T ? g(T) : g()), t = await S(async () => o);
123
125
  e.file.oss = t, V({
124
126
  file: e.file,
125
127
  dirName: q,
@@ -127,17 +129,17 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
127
129
  successCallBack(s) {
128
130
  e.onSuccess(s), r.value = [
129
131
  ...r.value || [],
130
- B(h, s, e.file.name)
132
+ D(v, s, e.file.name)
131
133
  ], c.push({
132
134
  uid: e.file.uid,
133
135
  path: s
134
- }), d.value--;
136
+ }), m.value--;
135
137
  },
136
138
  errorCallBack(s) {
137
- C && p.warning(s || l("ap.apUpload.networkAnomaly")), e.onError({
139
+ b && p.warning(s || i("ap.apUpload.networkAnomaly")), e.onError({
138
140
  name: s,
139
141
  message: s
140
- }), d.value--;
142
+ }), m.value--;
141
143
  },
142
144
  progressCallBack(s) {
143
145
  e.onProgress({
@@ -148,16 +150,16 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
148
150
  bucket: o?.bucket
149
151
  });
150
152
  } catch (o) {
151
- C && p.warning(
152
- typeof o?.message == "string" ? o.message : l("ap.apUpload.networkAnomaly")
153
+ b && p.warning(
154
+ typeof o?.message == "string" ? o.message : i("ap.apUpload.networkAnomaly")
153
155
  ), e.onError({
154
- name: o?.message || l("ap.apUpload.networkAnomaly"),
155
- message: o?.message || l("ap.apUpload.networkAnomaly")
156
- }), d.value--;
156
+ name: o?.message || i("ap.apUpload.networkAnomaly"),
157
+ message: o?.message || i("ap.apUpload.networkAnomaly")
158
+ }), m.value--;
157
159
  }
158
160
  }
159
161
  function Q(e) {
160
- if (T && T?.(e), e.response) {
162
+ if (_ && _?.(e), e.response) {
161
163
  if (Array.isArray(r.value)) {
162
164
  const t = c.findIndex((s) => s.uid === e.uid);
163
165
  t >= 0 && (r?.value.splice(t, 1), c.splice(t, 1)), r.value.length === 0 && (r.value = void 0);
@@ -170,15 +172,15 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
170
172
  return u.splice(o, 1), Promise.resolve(!0);
171
173
  }
172
174
  const X = async (e) => {
173
- if (N.value?.trigger) {
175
+ if (U.value?.trigger) {
174
176
  let o = [e].map((t) => ({
175
177
  objectName: t.response,
176
178
  fileName: t.name
177
179
  }));
178
- N.value?.trigger?.(o);
180
+ U.value?.trigger?.(o);
179
181
  } else {
180
182
  const o = e.response?.match(/^([^:]+):(.*)$/), t = o?.[1], s = o?.[2] ?? e.response;
181
- (await z(
183
+ (await S(
182
184
  () => t ? g?.(t) : g?.()
183
185
  )).downloadFile([
184
186
  {
@@ -187,19 +189,24 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
187
189
  }
188
190
  ]);
189
191
  }
192
+ }, Y = (e) => {
193
+ de.createFilePreviewModal({
194
+ src: e.response,
195
+ fileName: e.name
196
+ });
190
197
  };
191
- return (e, o) => (x(), b("div", {
192
- class: te({
193
- [n(O)()]: !0,
194
- [n(P) ?? ""]: !0
198
+ return (e, o) => (x(), C("div", {
199
+ class: ae({
200
+ [n(B)()]: !0,
201
+ [n(O) ?? ""]: !0
195
202
  })
196
203
  }, [
197
204
  y(n(ue), {
198
205
  ref_key: "uploadRef",
199
- ref: m,
206
+ ref: d,
200
207
  accept: n(k),
201
208
  multiple: "",
202
- "max-count": n(i),
209
+ "max-count": n(l),
203
210
  progress: {
204
211
  strokeWidth: 3,
205
212
  showInfo: !1,
@@ -207,30 +214,35 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
207
214
  },
208
215
  "before-upload": J,
209
216
  "custom-request": K,
210
- "show-upload-list": { showDownloadIcon: !0, showRemoveIcon: !0 },
217
+ "show-upload-list": {
218
+ showDownloadIcon: !0,
219
+ showRemoveIcon: !0,
220
+ showPreviewIcon: !0
221
+ },
222
+ onPreview: Y,
211
223
  onRemove: Q,
212
224
  onDownload: X
213
225
  }, {
214
- downloadIcon: U(() => [
215
- y(n(ce))
226
+ downloadIcon: N(() => [
227
+ y(n(me), { class: "anticon anticon-vertical-align-bottom" })
216
228
  ]),
217
- default: U(() => [
218
- S("div", ke, [
229
+ default: N(() => [
230
+ P("div", Ce, [
219
231
  y(n(pe), { class: "file-btn" }, {
220
- default: U(() => [
221
- y(n(ie)),
222
- ae(" " + L(n($)), 1)
232
+ default: N(() => [
233
+ y(n(ce)),
234
+ se(" " + L(n($)), 1)
223
235
  ]),
224
236
  _: 1
225
237
  }),
226
- S("div", {
238
+ P("div", {
227
239
  class: "sub-title",
228
- onClick: o[0] || (o[0] = se(() => {
240
+ onClick: o[0] || (o[0] = ne(() => {
229
241
  }, ["stop"]))
230
242
  }, [
231
- typeof n(f) == "string" ? (x(), b("div", Ce, L(n(f) || `${n(l)("ap.apUpload.supportExtension")}:${n(ge)(n(k))}`), 1)) : n(f) ? (x(), b("div", be, [
232
- (x(), re(le(n(f))))
233
- ])) : ne("", !0)
243
+ typeof n(f) == "string" ? (x(), C("div", Ne, L(n(f) || `${n(i)("ap.apUpload.supportExtension")}:${n(we)(n(k))}`), 1)) : n(f) ? (x(), C("div", Ue, [
244
+ (x(), ie(le(n(f))))
245
+ ])) : re("", !0)
234
246
  ])
235
247
  ])
236
248
  ]),
@@ -240,5 +252,5 @@ const ke = { class: "multiple-file-context" }, Ce = { key: 0 }, be = { key: 1 },
240
252
  }
241
253
  });
242
254
  export {
243
- ze as default
255
+ Oe as default
244
256
  };
@@ -1,4 +1,4 @@
1
- const t = (l) => {
1
+ const i = (l) => {
2
2
  const { componentCls: o } = l;
3
3
  return {
4
4
  [`${o}-multiple-file`]: {
@@ -54,7 +54,10 @@ const t = (l) => {
54
54
  }
55
55
  },
56
56
  ".ant-upload-list-item-done": {
57
- color: l.colorLink
57
+ color: l.colorLink,
58
+ ".ant-upload-list-item-name": {
59
+ cursor: "pointer"
60
+ }
58
61
  },
59
62
  ".ant-upload-list-item-undefined": {
60
63
  color: l.colorLink
@@ -63,5 +66,5 @@ const t = (l) => {
63
66
  };
64
67
  };
65
68
  export {
66
- t as multipleFileStyle
69
+ i as multipleFileStyle
67
70
  };
@@ -32,3 +32,4 @@ export * from './ap-tag';
32
32
  export * from './ap-upload';
33
33
  export * from './ap-download';
34
34
  export * from './ap-descriptions';
35
+ export * from './ap-file-preview';
@@ -8,13 +8,13 @@ import "./ap-expand-alert/index.mjs";
8
8
  import { ApExportGroup as h } from "./ap-export-group/index.mjs";
9
9
  import { ApImage as B } from "./ap-image/index.mjs";
10
10
  import { ApInputRadio as T } from "./ap-input-radio/index.mjs";
11
- import { ApLabel as R, ApLabelGroup as V } from "./ap-label/index.mjs";
12
- import { ApLadder as w } from "./ap-ladder/index.mjs";
13
- import { ApSelectLayout as E } from "./ap-select-layout/index.mjs";
14
- import { ApStatus as K, ApStatusGroup as M } from "./ap-status/index.mjs";
15
- import { ApTitle as j } from "./ap-title/index.mjs";
11
+ import { ApLabel as w, ApLabelGroup as D } from "./ap-label/index.mjs";
12
+ import { ApLadder as R } from "./ap-ladder/index.mjs";
13
+ import { ApSelectLayout as z } from "./ap-select-layout/index.mjs";
14
+ import { ApStatus as F, ApStatusGroup as H } from "./ap-status/index.mjs";
15
+ import { ApTitle as M } from "./ap-title/index.mjs";
16
16
  import "./hooks/index.mjs";
17
- import { ApSummary as q } from "./ap-summary/index.mjs";
17
+ import { ApSummary as k } from "./ap-summary/index.mjs";
18
18
  import { ApAppendix as J } from "./ap-appendix/index.mjs";
19
19
  import "./ap-upload-file/index.mjs";
20
20
  import "./batch-input-group/index.mjs";
@@ -32,6 +32,7 @@ import "./ap-tag/index.mjs";
32
32
  import "./ap-upload/index.mjs";
33
33
  import "./ap-download/index.mjs";
34
34
  import "./ap-descriptions/index.mjs";
35
+ import { ApFilePreview as ao } from "./ap-file-preview/index.mjs";
35
36
  export {
36
37
  J as ApAppendix,
37
38
  d as ApAttachment,
@@ -42,21 +43,22 @@ export {
42
43
  X as ApCopy,
43
44
  to as ApDraggableGrid,
44
45
  h as ApExportGroup,
46
+ ao as ApFilePreview,
45
47
  B as ApImage,
46
48
  T as ApInputRadio,
47
49
  ro as ApKeepAlive,
48
- R as ApLabel,
49
- V as ApLabelGroup,
50
- w as ApLadder,
50
+ w as ApLabel,
51
+ D as ApLabelGroup,
52
+ R as ApLadder,
51
53
  U as ApProductInfo,
52
54
  $ as ApRadioGroup,
53
- E as ApSelectLayout,
55
+ z as ApSelectLayout,
54
56
  O as ApSizeInput,
55
- K as ApStatus,
56
- M as ApStatusGroup,
57
- q as ApSummary,
57
+ F as ApStatus,
58
+ H as ApStatusGroup,
59
+ k as ApSummary,
58
60
  u as ApTableModal,
59
- j as ApTitle,
61
+ M as ApTitle,
60
62
  fo as ApTransformDataHelper,
61
63
  mo as ApValueSelectCard,
62
64
  Z as ApView
@@ -1,4 +1,5 @@
1
1
  import { ExtractPropTypes, PropType } from 'vue';
2
+ import { ApFilePreviewProps } from '../business/ap-file-preview/interface';
2
3
  import { AgGridProps } from '../ag-grid';
3
4
  import { ApGridProps } from '../ap-grid';
4
5
  import { ApImageProps, ApTitleProps, ViewCacheOption } from '../business';
@@ -19,6 +20,7 @@ type ApProCardConfig = {
19
20
  };
20
21
  type ApImageConfig = Pick<ApImageProps, 'uiMode'>;
21
22
  type ApTitleConfig = Pick<ApTitleProps, 'uiMode'>;
23
+ type ApFilePreviewConfig = Pick<ApFilePreviewProps, 'parserPlugin'>;
22
24
  export declare const configProviderProps: () => {
23
25
  iconPrefixCls: StringConstructor;
24
26
  getTargetContainer: {
@@ -178,6 +180,10 @@ export declare const configProviderProps: () => {
178
180
  type: PropType<ApDescriptionsConfig>;
179
181
  default: () => {};
180
182
  };
183
+ apFilePreview: {
184
+ type: PropType<ApFilePreviewConfig>;
185
+ default: () => {};
186
+ };
181
187
  /**
182
188
  * @description aplus-ui的locale
183
189
  */
@@ -26,8 +26,12 @@ const t = () => ({
26
26
  apDescriptions: {
27
27
  type: Object,
28
28
  default: () => ({})
29
+ },
30
+ apFilePreview: {
31
+ type: Object,
32
+ default: () => ({})
29
33
  }
30
- }), o = () => ({
34
+ }), a = () => ({
31
35
  /**
32
36
  * @description aplus-ui的locale
33
37
  */
@@ -76,5 +80,5 @@ const t = () => ({
76
80
  ...e()
77
81
  });
78
82
  export {
79
- o as configProviderProps
83
+ a as configProviderProps
80
84
  };
@@ -8,6 +8,7 @@ import { ButtonSize } from '@aplus-frontend/antdv/es/button';
8
8
  import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
9
9
  import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '..';
10
10
  import { UiModeType, SearchFormGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ApiType, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from './constants';
11
+ import { ApFilePreviewParser } from '../business/ap-file-preview/interface';
11
12
  import { LocaleType } from '../locale';
12
13
  import { RecursivePartial } from '../type';
13
14
  export declare const globalConfigCached: Ref<ConfigProviderProps>;
@@ -180,6 +181,12 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
180
181
  type: PropType<ApDescriptionsConfig>;
181
182
  default: () => {};
182
183
  };
184
+ apFilePreview: {
185
+ type: PropType<{
186
+ parserPlugin?: ApFilePreviewParser[] | undefined;
187
+ }>;
188
+ default: () => {};
189
+ };
183
190
  aplusLocale: {
184
191
  type: PropType<LocaleType>;
185
192
  };
@@ -384,6 +391,12 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
384
391
  type: PropType<ApDescriptionsConfig>;
385
392
  default: () => {};
386
393
  };
394
+ apFilePreview: {
395
+ type: PropType<{
396
+ parserPlugin?: ApFilePreviewParser[] | undefined;
397
+ }>;
398
+ default: () => {};
399
+ };
387
400
  aplusLocale: {
388
401
  type: PropType<LocaleType>;
389
402
  };
@@ -450,9 +463,12 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
450
463
  mentions: MentionsConfig;
451
464
  timePicker: TimePickerConfig;
452
465
  card: CardConfig;
453
- apUpload: ApUploadConfig;
454
466
  searchForm: SearchFormGlobalConfig;
467
+ apUpload: ApUploadConfig;
455
468
  apDescriptions: ApDescriptionsConfig;
469
+ apFilePreview: {
470
+ parserPlugin?: ApFilePreviewParser[] | undefined;
471
+ };
456
472
  api: ApiType;
457
473
  valueTypeMap: Record<string, ValueTypeRenderConfig>;
458
474
  downloadCenterTriggerConfig: downloadCenterTriggerConfig;
@@ -1,25 +1,25 @@
1
- import { isVNode as m, ref as f, defineComponent as p, computed as s, watch as v, onActivated as C, createVNode as P, renderSlot as h } from "vue";
2
- import { ConfigProvider as T } from "@aplus-frontend/antdv";
3
- import { useDevWarning as b } from "../utils/warning.mjs";
1
+ import { isVNode as c, ref as m, defineComponent as f, computed as s, watch as v, onActivated as C, createVNode as P, renderSlot as h } from "vue";
2
+ import { ConfigProvider as w } from "@aplus-frontend/antdv";
3
+ import { useDevWarning as T } from "../utils/warning.mjs";
4
4
  import { mergeAntdProviderConfigWithCache as t, mergeAntdProvideConfig as n } from "../utils/config-provider-preset.mjs";
5
- import { configProviderProps as w } from "./config-provider-props.mjs";
6
- import { DEFAULT_NAMESPACE as A } from "./constants.mjs";
7
- import { useGlobalConfig as D, provideGlobalConfig as F } from "./hooks/use-global-config.mjs";
5
+ import { configProviderProps as b } from "./config-provider-props.mjs";
6
+ import { DEFAULT_NAMESPACE as F } from "./constants.mjs";
7
+ import { useGlobalConfig as A, provideGlobalConfig as D } from "./hooks/use-global-config.mjs";
8
8
  function G(e) {
9
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
9
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !c(e);
10
10
  }
11
- const i = f({}), E = /* @__PURE__ */ p({
11
+ const a = m({}), E = /* @__PURE__ */ f({
12
12
  name: "AplusConfigProvider",
13
- props: w(),
13
+ props: b(),
14
14
  setup(e, {
15
15
  slots: l
16
16
  }) {
17
- b("ConfigProvider")(!e.uiMode, "breaking", "uiMode has been remove, see migrate guild https://aplus.aplnk.com/aplus-ui/guild/migrate-7.2.html");
18
- function o(a, c) {
19
- return e[a] ?? d.value?.[a] ?? c;
17
+ T("ConfigProvider")(!e.uiMode, "breaking", "uiMode has been remove, see migrate guild https://aplus.aplnk.com/aplus-ui/guild/migrate-7.2.html");
18
+ function o(i, p) {
19
+ return e[i] ?? d.value?.[i] ?? p;
20
20
  }
21
- const d = D(), u = s(() => ({
22
- namespace: o("namespace", A),
21
+ const d = A(), u = s(() => ({
22
+ namespace: o("namespace", F),
23
23
  apGrid: o("apGrid"),
24
24
  agGrid: o("agGrid"),
25
25
  apProCard: o("apProCard"),
@@ -28,6 +28,7 @@ const i = f({}), E = /* @__PURE__ */ p({
28
28
  searchForm: o("searchForm"),
29
29
  apUpload: o("apUpload"),
30
30
  apDescriptions: o("apDescriptions"),
31
+ apFilePreview: o("apFilePreview"),
31
32
  aplusLocale: e.aplusLocale,
32
33
  aplusToken: e.aplusToken,
33
34
  api: e.api,
@@ -36,10 +37,10 @@ const i = f({}), E = /* @__PURE__ */ p({
36
37
  exportField: e.exportField,
37
38
  scrollYDomName: e.scrollYDomName,
38
39
  viewCacheOption: e.viewCacheOption
39
- })), g = F(u);
40
+ })), g = D(u);
40
41
  let r = !0;
41
- return v(() => e, (a) => {
42
- i.value = t(n(a), i.value);
42
+ return v(() => e, (i) => {
43
+ a.value = t(n(i), a.value);
43
44
  }, {
44
45
  deep: !0,
45
46
  immediate: !0
@@ -48,18 +49,18 @@ const i = f({}), E = /* @__PURE__ */ p({
48
49
  r = !1;
49
50
  return;
50
51
  }
51
- i.value = t(n(e), i.value);
52
+ a.value = t(n(e), a.value);
52
53
  }), () => {
53
- let a;
54
- return P(T, i.value, G(a = h(l, "default", {
54
+ let i;
55
+ return P(w, a.value, G(i = h(l, "default", {
55
56
  config: g?.value
56
- })) ? a : {
57
- default: () => [a]
57
+ })) ? i : {
58
+ default: () => [i]
58
59
  });
59
60
  };
60
61
  }
61
62
  });
62
63
  export {
63
64
  E as ConfigProvider,
64
- i as globalConfigCached
65
+ a as globalConfigCached
65
66
  };
@@ -9,6 +9,7 @@ import { ButtonSize } from '@aplus-frontend/antdv/es/button';
9
9
  import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
10
10
  import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '../..';
11
11
  import { UiModeType, SearchFormGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ApiType, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from '..';
12
+ import { ApFilePreviewParser } from '../../business/ap-file-preview/interface';
12
13
  import { LocaleType } from '../../locale';
13
14
  import { RecursivePartial } from '../../type';
14
15
  export declare const keysOf: <T extends Record<string, any>>(arr: T) => Array<keyof T>;
@@ -183,6 +184,12 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
183
184
  type: PropType<ApDescriptionsConfig>;
184
185
  default: () => {};
185
186
  };
187
+ apFilePreview: {
188
+ type: PropType<{
189
+ parserPlugin?: ApFilePreviewParser[] | undefined;
190
+ }>;
191
+ default: () => {};
192
+ };
186
193
  aplusLocale: {
187
194
  type: PropType<LocaleType>;
188
195
  };