@aplus-frontend/ui 6.31.0 → 6.32.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 (154) hide show
  1. package/es/index.mjs +39 -37
  2. package/es/src/ag-grid/components/body-cell/index.vue2.mjs +14 -12
  3. package/es/src/ag-grid/editable/index.vue.d.ts +18 -0
  4. package/es/src/ag-grid/editable/index.vue.mjs +233 -0
  5. package/es/src/ag-grid/editable/index.vue2.mjs +4 -0
  6. package/es/src/ag-grid/editable/interface.d.ts +96 -0
  7. package/es/src/ag-grid/editable/interface.mjs +1 -0
  8. package/es/src/ag-grid/editable/style/css.d.ts +0 -0
  9. package/es/src/ag-grid/editable/style/css.js +1 -0
  10. package/es/src/ag-grid/editable/style/index.d.ts +0 -0
  11. package/es/src/ag-grid/editable/style/index.js +1 -0
  12. package/es/src/ag-grid/editable/utils.d.ts +5 -0
  13. package/es/src/ag-grid/editable/utils.mjs +23 -0
  14. package/es/src/ag-grid/hooks/use-editable-api.d.ts +15 -0
  15. package/es/src/ag-grid/hooks/use-editable-api.mjs +150 -0
  16. package/es/src/ag-grid/hooks/use-editable-columns.d.ts +6 -0
  17. package/es/src/ag-grid/hooks/use-editable-columns.mjs +96 -0
  18. package/es/src/ag-grid/hooks/use-editable-form-item-api.d.ts +14 -0
  19. package/es/src/ag-grid/index.d.ts +3 -1
  20. package/es/src/ag-grid/index.mjs +2 -0
  21. package/es/src/ag-grid/index.vue.mjs +70 -66
  22. package/es/src/ag-grid/interface.d.ts +20 -1
  23. package/es/src/ag-grid/utils.d.ts +2 -0
  24. package/es/src/ag-grid/utils.mjs +12 -7
  25. package/es/src/ap-field/date/index.vue.mjs +29 -28
  26. package/es/src/ap-field/radio/index.vue.d.ts +4 -0
  27. package/es/src/ap-field/radio/index.vue.mjs +9 -8
  28. package/es/src/ap-field/radio/read.vue2.mjs +5 -4
  29. package/es/src/ap-field/rate/index.vue.d.ts +20 -0
  30. package/es/src/ap-field/rate/index.vue.mjs +12 -11
  31. package/es/src/ap-form/interface.d.ts +4 -0
  32. package/es/src/ap-form/item/index.vue.mjs +41 -39
  33. package/es/src/ap-form/items/checkbox/index.vue.mjs +5 -5
  34. package/es/src/ap-form/items/date/index.vue.mjs +9 -9
  35. package/es/src/ap-form/items/date-range/index.vue.mjs +8 -8
  36. package/es/src/ap-form/items/number/index.vue.mjs +11 -11
  37. package/es/src/ap-form/items/radio/index.vue.d.ts +8 -0
  38. package/es/src/ap-form/items/radio/index.vue.mjs +6 -6
  39. package/es/src/ap-form/items/select/index.vue.mjs +3 -3
  40. package/es/src/ap-form/items/switch/index.vue.mjs +2 -2
  41. package/es/src/ap-form/items/text/index.vue2.mjs +12 -12
  42. package/es/src/ap-form/items/text/password.vue.mjs +2 -2
  43. package/es/src/ap-form/items/text-area/index.vue.d.ts +4 -4
  44. package/es/src/ap-form/items/text-area/index.vue.mjs +3 -3
  45. package/es/src/ap-form/items/tree-select/index.vue.mjs +6 -6
  46. package/es/src/ap-form/render/item.vue.mjs +6 -5
  47. package/es/src/ap-grid/utils/editable.d.ts +2 -1
  48. package/es/src/ap-table/constants.d.ts +4 -0
  49. package/es/src/ap-table/interface.d.ts +5 -0
  50. package/es/src/ap-table/utils.mjs +76 -71
  51. package/es/src/ap-upload/components/MultipleFile.vue.d.ts +10 -0
  52. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +67 -68
  53. package/es/src/business/ap-copy/ApCopy.d.ts +28 -1
  54. package/es/src/business/ap-copy/ApCopy.mjs +42 -38
  55. package/es/src/business/ap-copy/constans.d.ts +12 -0
  56. package/es/src/business/ap-copy/constans.mjs +13 -0
  57. package/es/src/business/ap-copy/index.d.ts +48 -3
  58. package/es/src/business/ap-copy/interface.d.ts +4 -1
  59. package/es/src/business/batch-input-group/form-item.vue.mjs +1 -1
  60. package/es/src/editable-table/utils.d.ts +3 -2
  61. package/es/src/index.mjs +42 -40
  62. package/es/src/version.d.ts +1 -1
  63. package/es/src/version.mjs +1 -1
  64. package/lib/index.js +1 -1
  65. package/lib/src/ag-grid/components/body-cell/index.vue2.js +1 -1
  66. package/lib/src/ag-grid/editable/index.vue.d.ts +18 -0
  67. package/lib/src/ag-grid/editable/index.vue.js +1 -0
  68. package/lib/src/ag-grid/editable/index.vue2.js +1 -0
  69. package/lib/src/ag-grid/editable/interface.d.ts +96 -0
  70. package/lib/src/ag-grid/editable/interface.js +1 -0
  71. package/lib/src/ag-grid/editable/style/css.cjs +1 -0
  72. package/lib/src/ag-grid/editable/style/css.d.ts +0 -0
  73. package/lib/src/ag-grid/editable/style/index.cjs +1 -0
  74. package/lib/src/ag-grid/editable/style/index.d.ts +0 -0
  75. package/lib/src/ag-grid/editable/utils.d.ts +5 -0
  76. package/lib/src/ag-grid/editable/utils.js +1 -0
  77. package/lib/src/ag-grid/hooks/use-editable-api.d.ts +15 -0
  78. package/lib/src/ag-grid/hooks/use-editable-api.js +1 -0
  79. package/lib/src/ag-grid/hooks/use-editable-columns.d.ts +6 -0
  80. package/lib/src/ag-grid/hooks/use-editable-columns.js +1 -0
  81. package/lib/src/ag-grid/hooks/use-editable-form-item-api.d.ts +14 -0
  82. package/lib/src/ag-grid/index.d.ts +3 -1
  83. package/lib/src/ag-grid/index.js +1 -1
  84. package/lib/src/ag-grid/index.vue.js +1 -1
  85. package/lib/src/ag-grid/interface.d.ts +20 -1
  86. package/lib/src/ag-grid/utils.d.ts +2 -0
  87. package/lib/src/ag-grid/utils.js +1 -1
  88. package/lib/src/ap-field/date/index.vue.js +1 -1
  89. package/lib/src/ap-field/radio/index.vue.d.ts +4 -0
  90. package/lib/src/ap-field/radio/index.vue.js +1 -1
  91. package/lib/src/ap-field/radio/read.vue2.js +1 -1
  92. package/lib/src/ap-field/rate/index.vue.d.ts +20 -0
  93. package/lib/src/ap-field/rate/index.vue.js +1 -1
  94. package/lib/src/ap-form/interface.d.ts +4 -0
  95. package/lib/src/ap-form/item/index.vue.js +1 -1
  96. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  97. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  98. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  99. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  100. package/lib/src/ap-form/items/radio/index.vue.d.ts +8 -0
  101. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  102. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  103. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  104. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  105. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  106. package/lib/src/ap-form/items/text-area/index.vue.d.ts +4 -4
  107. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  108. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  109. package/lib/src/ap-form/render/item.vue.js +1 -1
  110. package/lib/src/ap-grid/utils/editable.d.ts +2 -1
  111. package/lib/src/ap-table/constants.d.ts +4 -0
  112. package/lib/src/ap-table/interface.d.ts +5 -0
  113. package/lib/src/ap-table/utils.js +1 -1
  114. package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +10 -0
  115. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  116. package/lib/src/business/ap-copy/ApCopy.d.ts +28 -1
  117. package/lib/src/business/ap-copy/ApCopy.js +1 -1
  118. package/lib/src/business/ap-copy/constans.d.ts +12 -0
  119. package/lib/src/business/ap-copy/constans.js +1 -1
  120. package/lib/src/business/ap-copy/index.d.ts +48 -3
  121. package/lib/src/business/ap-copy/interface.d.ts +4 -1
  122. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  123. package/lib/src/editable-table/utils.d.ts +3 -2
  124. package/lib/src/index.js +1 -1
  125. package/lib/src/version.d.ts +1 -1
  126. package/lib/src/version.js +1 -1
  127. package/package.json +3 -3
  128. package/theme/ag-grid/editable.css +52 -0
  129. package/theme/ag-grid/editable.less +11 -0
  130. package/theme/ag-grid/index.css +18 -0
  131. package/theme/ag-grid/index.less +1 -0
  132. package/theme/ap-appendix/ap-appendix.css +4 -13
  133. package/theme/ap-appendix/ap-appendix.less +5 -12
  134. package/theme/ap-form/ap-form-item.css +12 -0
  135. package/theme/ap-form/ap-form-item.less +12 -0
  136. package/theme/ap-form/index.css +12 -0
  137. package/theme/ap-form/search-form.css +12 -0
  138. package/theme/ap-grid/editable.css +1 -0
  139. package/theme/ap-grid/editable.less +1 -0
  140. package/theme/ap-grid/index.css +13 -0
  141. package/theme/ap-grid/index.less +1 -0
  142. package/theme/ap-table/ap-table.css +12 -0
  143. package/theme/ap-table-modal/index.css +12 -0
  144. package/theme/editable-table/index.css +13 -0
  145. package/theme/editable-table/index.less +1 -0
  146. package/theme/index.css +25 -13
  147. package/es/src/business/ap-appendix/icons/empty-admin-icon.vue.d.ts +0 -3
  148. package/es/src/business/ap-appendix/icons/empty-admin-icon.vue.mjs +0 -20
  149. package/es/src/business/ap-appendix/icons/empty-aplus-icon.vue.d.ts +0 -3
  150. package/es/src/business/ap-appendix/icons/empty-aplus-icon.vue.mjs +0 -20
  151. package/lib/src/business/ap-appendix/icons/empty-admin-icon.vue.d.ts +0 -3
  152. package/lib/src/business/ap-appendix/icons/empty-admin-icon.vue.js +0 -1
  153. package/lib/src/business/ap-appendix/icons/empty-aplus-icon.vue.d.ts +0 -3
  154. package/lib/src/business/ap-appendix/icons/empty-aplus-icon.vue.js +0 -1
@@ -1,20 +1,20 @@
1
- import { isVNode as T, createVNode as i, mergeProps as a, cloneVNode as h, Fragment as C } from "vue";
2
- import { isObject as d, isArray as u, isUndefined as j, isFunction as g, omit as E, isBoolean as O, isString as v, isEqual as x, sortBy as m, isPlainObject as y, every as N, isEmpty as F } from "lodash-unified";
3
- import { apTableRenderItemMap as P, apTableFormItemMap as R } from "./constants.mjs";
4
- import { isType as S } from "@fruits-chain/utils";
1
+ import { isVNode as T, createVNode as s, mergeProps as a, cloneVNode as h, createTextVNode as C, Fragment as j } from "vue";
2
+ import { isObject as d, isArray as u, isUndefined as E, isFunction as g, omit as O, isBoolean as v, isString as x, isEqual as F, sortBy as m, isPlainObject as y, every as N, isEmpty as R } from "lodash-unified";
3
+ import { apTableRenderItemMap as P, apTableFormItemMap as S } from "./constants.mjs";
4
+ import { isType as I } from "@fruits-chain/utils";
5
5
  import "../ap-form/index.mjs";
6
- import { Tooltip as I } from "@aplus-frontend/antdv";
6
+ import { Tooltip as V } from "@aplus-frontend/antdv";
7
7
  import { QuestionCircleOutlined as w } from "@ant-design/icons-vue";
8
8
  import A from "../ap-form/item/index.vue.mjs";
9
- function V(e) {
9
+ function M(e) {
10
10
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !T(e);
11
11
  }
12
- const M = (e, t, n) => {
12
+ const _ = (e, t, n) => {
13
13
  let o = {};
14
14
  return d(e) ? Object.keys(e).forEach((r) => {
15
- d(e[r]) ? o[r] = M(e[r], t[r], n) : o[r] = n(e[r], t);
15
+ d(e[r]) ? o[r] = _(e[r], t[r], n) : o[r] = n(e[r], t);
16
16
  }) : o = n(e, t), o;
17
- }, k = (e, t) => {
17
+ }, z = (e, t) => {
18
18
  switch (e) {
19
19
  case "dayjs":
20
20
  return t.valueOf();
@@ -35,15 +35,15 @@ const M = (e, t, n) => {
35
35
  return t;
36
36
  }
37
37
  };
38
- function z(e) {
38
+ function G(e) {
39
39
  return u(e) ? e.join(".") : e;
40
40
  }
41
- function _(e) {
41
+ function q(e) {
42
42
  const t = Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase();
43
43
  return t === "string" && typeof e == "object" ? "object" : e === null ? "null" : e === void 0 ? "undefined" : t;
44
44
  }
45
- const q = (e) => {
46
- if (_(e) === "map")
45
+ const W = (e) => {
46
+ if (q(e) === "map")
47
47
  return e;
48
48
  const t = /* @__PURE__ */ new Map();
49
49
  for (const [n, o] of Object.entries(e || {})) {
@@ -52,41 +52,41 @@ const q = (e) => {
52
52
  }
53
53
  return t;
54
54
  }, b = (e) => {
55
- const t = [], n = q(e);
55
+ const t = [], n = W(e);
56
56
  return n.forEach((o, r) => {
57
- const s = n.get(r) || n.get(`${r}`);
58
- if (s) {
59
- if (typeof s == "object" && s?.text) {
57
+ const i = n.get(r) || n.get(`${r}`);
58
+ if (i) {
59
+ if (typeof i == "object" && i?.text) {
60
60
  t.push({
61
- text: s?.text,
61
+ text: i?.text,
62
62
  value: r,
63
- label: s?.text,
64
- disabled: s.disabled
63
+ label: i?.text,
64
+ disabled: i.disabled
65
65
  });
66
66
  return;
67
67
  }
68
68
  t.push({
69
- text: s,
70
- label: s,
69
+ text: i,
70
+ label: i,
71
71
  value: r
72
72
  });
73
73
  }
74
74
  }), t;
75
- }, G = (e) => j(e) || e < 0 ? 0 : e;
76
- function W(e, t) {
75
+ }, X = (e) => E(e) || e < 0 ? 0 : e;
76
+ function B(e, t) {
77
77
  return !e || !g(e) ? e : e(t);
78
78
  }
79
- function X(e) {
79
+ function Y(e) {
80
80
  let t = e.valueType || "text";
81
81
  return e.valueEnum && (t = "status"), t;
82
82
  }
83
- function Y(e, t, n, o) {
83
+ function Z(e, t, n, o) {
84
84
  const r = P[e];
85
- return r ? i(r, a(t, {
85
+ return r ? s(r, a(t, {
86
86
  mode: "read"
87
87
  }), null) : o?.[e]?.render?.(t.value, n, t) || t.value;
88
88
  }
89
- function Z(e, t) {
89
+ function ee(e, t) {
90
90
  if (e.customRenderFormItem)
91
91
  return () => {
92
92
  const r = e.customRenderFormItem(e);
@@ -96,47 +96,47 @@ function Z(e, t) {
96
96
  ...r.props || {}
97
97
  });
98
98
  };
99
- const n = R[e.valueType];
99
+ const n = S[e.valueType];
100
100
  if (n)
101
- return () => i(n, a(e.fieldProps, {
101
+ return () => s(n, a(e.fieldProps, {
102
102
  span: e.span
103
103
  }), null);
104
104
  const o = t?.[e.valueType];
105
105
  return () => {
106
106
  const r = o?.renderFormItem?.(e.fieldProps.field);
107
- return r ? i(A, a(e.fieldProps, {
107
+ return r ? s(A, a(e.fieldProps, {
108
108
  span: e.span
109
- }), V(r) ? r : {
109
+ }), M(r) ? r : {
110
110
  default: () => [r]
111
111
  }) : null;
112
112
  };
113
113
  }
114
- function ee(e, t) {
115
- const n = W(e.fieldProps, t), o = n?.field || n || {}, r = e.valueType === "switch", s = e.valueType === "index", f = r ? {
114
+ function te(e, t) {
115
+ const n = B(e.fieldProps, t), o = n?.field || n || {}, r = e.valueType === "switch", i = e.valueType === "index", f = r ? {
116
116
  checked: t.value
117
117
  } : {
118
- value: s ? t.index + 1 : t.value
118
+ value: i ? t.index + 1 : t.value
119
119
  };
120
120
  return e.valueEnum && (o.valueEnum = e.valueEnum), {
121
- ...E(o, ["request"]),
121
+ ...O(o, ["request"]),
122
122
  ...f
123
123
  };
124
124
  }
125
- function te(e) {
125
+ function ne(e) {
126
126
  const t = {
127
127
  ...e
128
128
  };
129
- return O(e.filters) && e.filters && e.valueEnum && (t.filters = b(e.valueEnum)), t;
129
+ return v(e.filters) && e.filters && e.valueEnum && (t.filters = b(e.valueEnum)), t;
130
130
  }
131
- function ne(e, t) {
131
+ function re(e, t) {
132
132
  const n = t || {};
133
133
  return e.valueEnum && !n.field?.options && (n.field = {
134
134
  ...n.field,
135
135
  options: b(e.valueEnum)
136
136
  }), n;
137
137
  }
138
- function re(e) {
139
- if (!S("Object")(e))
138
+ function oe(e) {
139
+ if (!I("Object")(e))
140
140
  return e;
141
141
  try {
142
142
  return JSON.stringify(e);
@@ -144,29 +144,34 @@ function re(e) {
144
144
  return e;
145
145
  }
146
146
  }
147
- function oe(e, t, n, o) {
147
+ function ie(e, t, n, o) {
148
148
  const r = n?.({
149
149
  title: e.title,
150
150
  column: e
151
- }), s = r?.filter((l) => l.type !== Symbol.for("v-cmt")) || [];
152
- if (r && s.length > 0)
151
+ }), i = r?.filter((l) => l.type !== Symbol.for("v-cmt")) || [];
152
+ if (r && i.length > 0)
153
153
  return r;
154
- const c = v(e.title) ? i("span", {
154
+ const c = x(e.title) ? s("span", {
155
155
  class: t,
156
156
  title: e.title
157
- }, [e.title]) : e.title, p = e.tooltip ? g(e.tooltip) ? e.tooltip(e) : i(C, null, [e.tooltip]) : null;
158
- return p ? i("span", {
157
+ }, [e._requireMark ? s("span", {
158
+ style: {
159
+ color: "#FF4D4F",
160
+ paddingRight: "2px"
161
+ }
162
+ }, [C("*")]) : null, e.title]) : e.title, p = e.tooltip ? g(e.tooltip) ? e.tooltip(e) : s(j, null, [e.tooltip]) : null;
163
+ return p ? s("span", {
159
164
  style: {
160
165
  display: "inline-flex",
161
166
  alignItems: "center",
162
167
  maxWidth: "100%"
163
168
  }
164
- }, [c, i(I, {
169
+ }, [c, s(V, {
165
170
  title: p,
166
171
  placement: "bottom",
167
172
  getPopupContainer: (l) => l.closest(".ant-table") || l.closest(".ant-modal") || l.closest(".vxe-table") || document.body
168
173
  }, {
169
- default: () => [i(w, {
174
+ default: () => [s(w, {
170
175
  style: {
171
176
  paddingInline: "4px",
172
177
  color: o,
@@ -178,41 +183,41 @@ function oe(e, t, n, o) {
178
183
  function se(e, t) {
179
184
  const n = [];
180
185
  function o(r) {
181
- for (const s of r)
182
- s.children?.length ? o(s.children) : n.push(t(s));
186
+ for (const i of r)
187
+ i.children?.length ? o(i.children) : n.push(t(i));
183
188
  }
184
189
  return o(e), n;
185
190
  }
186
- function ie(e, t) {
191
+ function le(e, t) {
187
192
  if (u(e) && u(t))
188
- return x(m(e), m(t));
193
+ return F(m(e), m(t));
189
194
  if (y(e) && y(t)) {
190
- const n = (o) => N(o, (r) => r == null) || F(o);
195
+ const n = (o) => N(o, (r) => r == null) || R(o);
191
196
  if (n(e) && n(t))
192
197
  return !0;
193
198
  }
194
199
  }
195
- function le(e) {
200
+ function ue(e) {
196
201
  if (e !== !1)
197
202
  return e;
198
203
  }
199
204
  export {
200
- te as apColumnToColumn,
201
- z as dataIndexToStr,
202
- le as falseToUndefined,
203
- M as formatParamsValueType,
204
- G as getColumnOrder,
205
- W as getFieldProps,
206
- Z as getSearchFormItemRenderNode,
207
- Y as getTableCellRenderNode,
208
- ee as getTableRenderProps,
209
- X as getTableRenderType,
210
- oe as getTableTitle,
211
- ie as isEqualCustom,
212
- q as objectToMap,
213
- re as objectToString,
214
- k as parseFieldValue,
205
+ ne as apColumnToColumn,
206
+ G as dataIndexToStr,
207
+ ue as falseToUndefined,
208
+ _ as formatParamsValueType,
209
+ X as getColumnOrder,
210
+ B as getFieldProps,
211
+ ee as getSearchFormItemRenderNode,
212
+ Z as getTableCellRenderNode,
213
+ te as getTableRenderProps,
214
+ Y as getTableRenderType,
215
+ ie as getTableTitle,
216
+ le as isEqualCustom,
217
+ W as objectToMap,
218
+ oe as objectToString,
219
+ z as parseFieldValue,
215
220
  se as recursionApColumns,
216
- ne as updateFormProps,
221
+ re as updateFormProps,
217
222
  b as valueEnumToArray
218
223
  };
@@ -179,6 +179,10 @@ declare const _default: DefineComponent<{}, {
179
179
  file: UploadFile<any>;
180
180
  }) => VueNode;
181
181
  };
182
+ pastable: {
183
+ type: BooleanConstructor;
184
+ default: boolean;
185
+ };
182
186
  }>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
183
187
  progress: UploadListProgressProps;
184
188
  type: UploadType;
@@ -209,6 +213,7 @@ declare const _default: DefineComponent<{}, {
209
213
  customRequest: (options: UploadRequestOption<any>) => void;
210
214
  withCredentials: boolean;
211
215
  openFileDialogOnClick: boolean;
216
+ pastable: boolean;
212
217
  fileList: UploadFile<any>[];
213
218
  defaultFileList: UploadFile<any>[];
214
219
  showUploadList: boolean | ShowUploadListInterface;
@@ -405,6 +410,10 @@ declare const _default: DefineComponent<{}, {
405
410
  file: UploadFile<any>;
406
411
  }) => VueNode;
407
412
  };
413
+ pastable: {
414
+ type: BooleanConstructor;
415
+ default: boolean;
416
+ };
408
417
  }>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
409
418
  progress: UploadListProgressProps;
410
419
  type: UploadType;
@@ -435,6 +444,7 @@ declare const _default: DefineComponent<{}, {
435
444
  customRequest: (options: UploadRequestOption<any>) => void;
436
445
  withCredentials: boolean;
437
446
  openFileDialogOnClick: boolean;
447
+ pastable: boolean;
438
448
  fileList: UploadFile<any>[];
439
449
  defaultFileList: UploadFile<any>[];
440
450
  showUploadList: boolean | ShowUploadListInterface;
@@ -1,20 +1,18 @@
1
- import { defineComponent as T, computed as d, ref as E, createElementBlock as k, openBlock as r, mergeProps as V, unref as e, renderSlot as c, createCommentVNode as C, createVNode as v, withCtx as g, createElementVNode as s, normalizeClass as i, createBlock as p, Fragment as S, renderList as j, createSlots as D, createTextVNode as M, toDisplayString as h } from "vue";
2
- import U from "./icons/empty-aplus-icon.vue.mjs";
3
- import z from "./icons/empty-admin-icon.vue.mjs";
1
+ import { defineComponent as x, computed as u, ref as O, createElementBlock as A, openBlock as r, mergeProps as T, unref as e, renderSlot as c, createCommentVNode as k, createVNode as p, withCtx as d, createElementVNode as n, normalizeClass as i, createBlock as C, Fragment as S, renderList as V, createSlots as D, createTextVNode as j, toDisplayString as P } from "vue";
4
2
  import G from "./icons/file-icon.vue.mjs";
5
- import { Tooltip as P, TypographyText as q } from "@aplus-frontend/antdv";
6
- import { IconVariantDownload as H } from "@aplus-frontend/icon";
7
- import { LoadingOutlined as J } from "@ant-design/icons-vue";
3
+ import { Tooltip as M, TypographyText as U, Empty as F } from "@aplus-frontend/antdv";
4
+ import { IconVariantDownload as z } from "@aplus-frontend/icon";
5
+ import { LoadingOutlined as R } from "@ant-design/icons-vue";
8
6
  import "../ap-title/ApTitle.vue.mjs";
9
7
  import "../../ap-download/ap-download.vue2.mjs";
10
8
  import "../../config-provider/index.mjs";
11
- import { getFileInfo as K } from "./utils/index.mjs";
12
- import { useNamespace as Q } from "../../config-provider/hooks/use-namespace.mjs";
13
- import { useLocale as R } from "../../config-provider/hooks/use-locale.mjs";
14
- import { useGlobalConfig as N } from "../../config-provider/hooks/use-global-config.mjs";
15
- import W from "../ap-title/ApTitle.vue2.mjs";
16
- import X from "../../ap-download/ap-download.vue.mjs";
17
- const Y = ["onClick"], ve = /* @__PURE__ */ T({
9
+ import { getFileInfo as q } from "./utils/index.mjs";
10
+ import { useNamespace as H } from "../../config-provider/hooks/use-namespace.mjs";
11
+ import { useLocale as J } from "../../config-provider/hooks/use-locale.mjs";
12
+ import { useGlobalConfig as $ } from "../../config-provider/hooks/use-global-config.mjs";
13
+ import K from "../ap-title/ApTitle.vue2.mjs";
14
+ import Q from "../../ap-download/ap-download.vue.mjs";
15
+ const W = ["onClick"], fe = /* @__PURE__ */ x({
18
16
  __name: "ap-appendix",
19
17
  props: {
20
18
  fileList: {},
@@ -25,67 +23,67 @@ const Y = ["onClick"], ve = /* @__PURE__ */ T({
25
23
  column: { default: 2 },
26
24
  isFileAreaBorder: { type: Boolean, default: !1 }
27
25
  },
28
- setup(w) {
29
- const { b: _, e: l, em: F } = Q("ap-appendix"), { t: m } = R(), x = N("uiMode"), a = w, B = N("apUpload"), $ = N(
26
+ setup(h) {
27
+ const { b: w, e: l, em: N } = H("ap-appendix"), { t: v } = J(), a = h, E = $("apUpload"), _ = $(
30
28
  "downloadCenterTriggerConfig"
31
- ), f = d(
32
- () => K(a?.needName, a?.fileList ?? [])
33
- ), I = d(
34
- () => a.getOssAccess || B.value?.getOssAccess
35
- ), y = d(
29
+ ), f = u(
30
+ () => q(a?.needName, a?.fileList ?? [])
31
+ ), B = u(
32
+ () => a.getOssAccess || E.value?.getOssAccess
33
+ ), g = u(
36
34
  () => !(Array.isArray(f.value) && f.value.length)
37
- ), o = E([]), b = d(() => a.title || m("ap.apAppendix.appendix"));
38
- async function O(n, u) {
39
- if (!(o.value.findIndex((t) => t === u) > -1)) {
40
- o.value = [...o.value, u];
35
+ ), o = O([]), I = u(() => a.title || v("ap.apAppendix.appendix"));
36
+ async function b(s, m) {
37
+ if (!(o.value.findIndex((t) => t === m) > -1)) {
38
+ o.value = [...o.value, m];
41
39
  try {
42
- if ($.value?.trigger) {
43
- let t = [n].map((L) => ({
40
+ if (_.value?.trigger) {
41
+ let t = [s].map((L) => ({
44
42
  objectName: L.path,
45
43
  fileName: L.fileName
46
44
  }));
47
- await $.value?.trigger(t);
45
+ await _.value?.trigger(t);
48
46
  }
49
47
  } finally {
50
- o.value = o.value.filter((t) => t !== u);
48
+ o.value = o.value.filter((t) => t !== m);
51
49
  }
52
50
  }
53
51
  }
54
- return (n, u) => (r(), k("div", V({
55
- class: [e(_)()]
52
+ return (s, m) => (r(), A("div", T({
53
+ class: [e(w)()]
56
54
  }, {
57
- ...n.$attrs
55
+ ...s.$attrs
58
56
  }, {
59
57
  style: {
60
58
  "--ap-appendix-column": `repeat(${Number(a?.column || 2)}, 1fr)`
61
59
  }
62
60
  }), [
63
- c(n.$slots, "title", {
61
+ c(s.$slots, "title", {
64
62
  fileList: a.fileList
65
63
  }, () => [
66
- v(W, {
67
- title: b.value,
64
+ p(K, {
65
+ title: I.value,
68
66
  "help-message": a?.tooltip
69
67
  }, {
70
- suffix: g(() => [
71
- s("div", {
68
+ suffix: d(() => [
69
+ n("div", {
72
70
  class: i([e(l)("suffix")])
73
71
  }, [
74
- c(n.$slots, "titleSuffix", {
72
+ c(s.$slots, "titleSuffix", {
75
73
  fileList: a.fileList
76
74
  }),
77
- c(n.$slots, "titleDownloadAllBtn", {
75
+ c(s.$slots, "titleDownloadAllBtn", {
78
76
  fileList: a.fileList
79
77
  }, () => [
80
- y.value ? C("", !0) : (r(), p(X, {
78
+ g.value ? k("", !0) : (r(), C(Q, {
81
79
  key: 0,
82
80
  class: i([e(l)("download-all")]),
83
- text: e(m)("ap.apAppendix.downloadAll"),
84
- "get-oss-access": I.value,
81
+ text: e(v)("ap.apAppendix.downloadAll"),
82
+ "get-oss-access": B.value,
85
83
  "file-name": f.value
86
84
  }, {
87
- icon: g(() => [
88
- v(e(H))
85
+ icon: d(() => [
86
+ p(e(z))
89
87
  ]),
90
88
  _: 1
91
89
  }, 8, ["class", "text", "get-oss-access", "file-name"]))
@@ -95,56 +93,56 @@ const Y = ["onClick"], ve = /* @__PURE__ */ T({
95
93
  _: 3
96
94
  }, 8, ["title", "help-message"])
97
95
  ]),
98
- y.value ? C("", !0) : c(n.$slots, "fileArea", {
96
+ g.value ? k("", !0) : c(s.$slots, "fileArea", {
99
97
  key: 0,
100
98
  fileList: a.fileList
101
99
  }, () => [
102
- s("div", {
100
+ n("div", {
103
101
  class: i({
104
102
  [e(l)("file-area")]: !0,
105
- [e(F)("file-area", "border")]: !!a.isFileAreaBorder
103
+ [e(N)("file-area", "border")]: !!a.isFileAreaBorder
106
104
  })
107
105
  }, [
108
- s("div", {
106
+ n("div", {
109
107
  class: i([e(l)("file-area-content")])
110
108
  }, [
111
- (r(!0), k(S, null, j(f.value, (A, t) => (r(), k("div", {
109
+ (r(!0), A(S, null, V(f.value, (y, t) => (r(), A("div", {
112
110
  key: t,
113
111
  class: i({
114
112
  [e(l)("file-area-content-item")]: !0,
115
- [e(F)("file-area-content-item", "loading")]: o.value.includes(t)
113
+ [e(N)("file-area-content-item", "loading")]: o.value.includes(t)
116
114
  })
117
115
  }, [
118
- v(e(P), null, D({
119
- default: g(() => [
120
- s("div", {
116
+ p(e(M), null, D({
117
+ default: d(() => [
118
+ n("div", {
121
119
  class: i({
122
120
  [e(l)("file-area-content-item-content")]: !0,
123
121
  [e(l)("file-area-content-item--loading-content")]: o.value.includes(t)
124
122
  }),
125
- onClick: (L) => O(A, t)
123
+ onClick: (L) => b(y, t)
126
124
  }, [
127
- s("div", {
125
+ n("div", {
128
126
  class: i([e(l)("file-area-content-item-icon")])
129
127
  }, [
130
- o.value.includes(t) ? (r(), p(e(J), { key: 0 })) : (r(), p(G, { key: 1 }))
128
+ o.value.includes(t) ? (r(), C(e(R), { key: 0 })) : (r(), C(G, { key: 1 }))
131
129
  ], 2),
132
- s("div", {
130
+ n("div", {
133
131
  class: i([e(l)("file-area-content-item-file-name")])
134
132
  }, [
135
- v(e(q), {
133
+ p(e(U), {
136
134
  ellipsis: "",
137
- content: A.fileName
135
+ content: y.fileName
138
136
  }, null, 8, ["content"])
139
137
  ], 2)
140
- ], 10, Y)
138
+ ], 10, W)
141
139
  ]),
142
140
  _: 2
143
141
  }, [
144
142
  o.value.includes(t) ? void 0 : {
145
143
  name: "title",
146
- fn: g(() => [
147
- M(h(e(m)("ap.apAppendix.downloadFile")), 1)
144
+ fn: d(() => [
145
+ j(P(e(v)("ap.apAppendix.downloadFile")), 1)
148
146
  ]),
149
147
  key: "0"
150
148
  }
@@ -153,21 +151,22 @@ const Y = ["onClick"], ve = /* @__PURE__ */ T({
153
151
  ], 2)
154
152
  ], 2)
155
153
  ]),
156
- y.value ? c(n.$slots, "empty", { key: 1 }, () => [
157
- s("div", {
154
+ g.value ? c(s.$slots, "empty", { key: 1 }, () => [
155
+ n("div", {
158
156
  class: i([e(l)("empty")])
159
157
  }, [
160
- s("div", {
158
+ n("div", {
161
159
  class: i([e(l)("empty-content")])
162
160
  }, [
163
- e(x) === "aplus" ? (r(), p(U, { key: 0 })) : (r(), p(z, { key: 1 })),
164
- s("span", null, h(e(m)("ap.apAppendix.empty")), 1)
161
+ p(e(F), {
162
+ image: e(F).PRESENTED_IMAGE_SIMPLE
163
+ }, null, 8, ["image"])
165
164
  ], 2)
166
165
  ], 2)
167
- ]) : C("", !0)
166
+ ]) : k("", !0)
168
167
  ], 16));
169
168
  }
170
169
  });
171
170
  export {
172
- ve as default
171
+ fe as default
173
172
  };
@@ -21,6 +21,18 @@ declare const _default: DefineComponent<ExtractPropTypes<{
21
21
  type: PropType< ApCopy["disableCopy"]>;
22
22
  default: boolean;
23
23
  };
24
+ onClick: {
25
+ type: PropType< ApCopy["onClick"]>;
26
+ default: () => void;
27
+ };
28
+ tipMessageSuccess: {
29
+ type: PropType< ApCopy["tipMessageSuccess"]>;
30
+ default: string;
31
+ };
32
+ tipMessageError: {
33
+ type: PropType< ApCopy["tipMessageError"]>;
34
+ default: string;
35
+ };
24
36
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
25
37
  text: {
26
38
  type: PropType< ApCopy["text"]>;
@@ -42,11 +54,26 @@ declare const _default: DefineComponent<ExtractPropTypes<{
42
54
  type: PropType< ApCopy["disableCopy"]>;
43
55
  default: boolean;
44
56
  };
57
+ onClick: {
58
+ type: PropType< ApCopy["onClick"]>;
59
+ default: () => void;
60
+ };
61
+ tipMessageSuccess: {
62
+ type: PropType< ApCopy["tipMessageSuccess"]>;
63
+ default: string;
64
+ };
65
+ tipMessageError: {
66
+ type: PropType< ApCopy["tipMessageError"]>;
67
+ default: string;
68
+ };
45
69
  }>> & Readonly<{}>, {
46
70
  size: number | undefined;
47
- link: string | undefined;
71
+ link: string | boolean | undefined;
72
+ onClick: (() => void) | undefined;
48
73
  text: string | undefined;
49
74
  textStyle: "link" | CSSProperties | "major" | "minor" | undefined;
50
75
  disableCopy: boolean | undefined;
76
+ tipMessageSuccess: string | undefined;
77
+ tipMessageError: string | undefined;
51
78
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
52
79
  export default _default;