@aplus-frontend/ui 0.4.13 → 0.4.15

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 (97) hide show
  1. package/es/index.mjs +84 -80
  2. package/es/src/ap-descriptions/help-message/index.vue2.mjs +17 -12
  3. package/es/src/ap-field/date/helper.mjs +9 -9
  4. package/es/src/ap-table/ap-table.vue2.mjs +206 -181
  5. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +62 -62
  6. package/es/src/ap-upload/apUpload.vue.d.ts +9 -0
  7. package/es/src/ap-upload/apUpload.vue.mjs +22 -18
  8. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +66 -66
  9. package/es/src/ap-upload/components/Picture.vue2.mjs +82 -82
  10. package/es/src/ap-upload/components/SingleFile.vue2.mjs +114 -114
  11. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +79 -67
  12. package/es/src/config-provider/config-provider.d.ts +3 -0
  13. package/es/src/config-provider/css-var.d.ts +3 -0
  14. package/es/src/config-provider/css-var.mjs +21 -14
  15. package/es/src/config-provider/index.d.ts +15 -0
  16. package/es/src/hooks/index.d.ts +1 -0
  17. package/es/src/hooks/index.mjs +6 -4
  18. package/es/src/hooks/useResize.d.ts +8 -0
  19. package/es/src/hooks/useResize.mjs +23 -0
  20. package/es/src/index.d.ts +1 -0
  21. package/es/src/index.mjs +212 -209
  22. package/es/src/path-map.mjs +2 -1
  23. package/es/src/resize-observer/index.d.ts +3 -0
  24. package/es/src/resize-observer/index.mjs +2 -0
  25. package/es/src/resize-observer/index.vue.d.ts +25 -0
  26. package/es/src/resize-observer/index.vue.mjs +45 -0
  27. package/es/src/resize-observer/index.vue2.mjs +4 -0
  28. package/es/src/resize-observer/interface.d.ts +27 -0
  29. package/es/src/resize-observer/interface.mjs +1 -0
  30. package/es/src/resize-observer/style/css.d.ts +1 -0
  31. package/es/src/resize-observer/style/css.js +1 -0
  32. package/es/src/resize-observer/style/index.d.ts +1 -0
  33. package/es/src/resize-observer/style/index.js +1 -0
  34. package/es/src/scroll-bar/index.vue.d.ts +1 -0
  35. package/es/src/scroll-bar/index.vue.mjs +31 -30
  36. package/es/src/scroll-bar/interface.d.ts +3 -1
  37. package/es/src/theme/antd-global-overwrite/admin/index.css +24 -2
  38. package/es/src/theme/antd-global-overwrite/admin/table.css +24 -2
  39. package/es/src/theme/antd-global-overwrite/aplus/index.css +24 -2
  40. package/es/src/theme/antd-global-overwrite/aplus/table.css +24 -2
  41. package/es/src/utils/index.d.ts +1 -0
  42. package/es/src/utils/index.mjs +40 -30
  43. package/lib/index.js +1 -1
  44. package/lib/src/ap-descriptions/help-message/index.vue2.js +1 -1
  45. package/lib/src/ap-field/date/helper.js +1 -1
  46. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  47. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  48. package/lib/src/ap-upload/apUpload.vue.d.ts +9 -0
  49. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  50. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  51. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  52. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  53. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  54. package/lib/src/config-provider/config-provider.d.ts +3 -0
  55. package/lib/src/config-provider/css-var.d.ts +3 -0
  56. package/lib/src/config-provider/css-var.js +1 -1
  57. package/lib/src/config-provider/index.d.ts +15 -0
  58. package/lib/src/hooks/index.d.ts +1 -0
  59. package/lib/src/hooks/index.js +1 -1
  60. package/lib/src/hooks/useResize.d.ts +8 -0
  61. package/lib/src/hooks/useResize.js +1 -0
  62. package/lib/src/index.d.ts +1 -0
  63. package/lib/src/index.js +1 -1
  64. package/lib/src/path-map.js +1 -1
  65. package/lib/src/resize-observer/index.d.ts +3 -0
  66. package/lib/src/resize-observer/index.js +1 -0
  67. package/lib/src/resize-observer/index.vue.d.ts +25 -0
  68. package/lib/src/resize-observer/index.vue.js +1 -0
  69. package/lib/src/resize-observer/index.vue2.js +1 -0
  70. package/lib/src/resize-observer/interface.d.ts +27 -0
  71. package/lib/src/resize-observer/interface.js +1 -0
  72. package/lib/src/resize-observer/style/css.cjs +1 -0
  73. package/lib/src/resize-observer/style/css.d.ts +1 -0
  74. package/lib/src/resize-observer/style/index.cjs +1 -0
  75. package/lib/src/resize-observer/style/index.d.ts +1 -0
  76. package/lib/src/scroll-bar/index.vue.d.ts +1 -0
  77. package/lib/src/scroll-bar/index.vue.js +1 -1
  78. package/lib/src/scroll-bar/interface.d.ts +3 -1
  79. package/lib/src/theme/antd-global-overwrite/admin/index.css +24 -2
  80. package/lib/src/theme/antd-global-overwrite/admin/table.css +24 -2
  81. package/lib/src/theme/antd-global-overwrite/aplus/index.css +24 -2
  82. package/lib/src/theme/antd-global-overwrite/aplus/table.css +24 -2
  83. package/lib/src/utils/index.d.ts +1 -0
  84. package/lib/src/utils/index.js +1 -1
  85. package/package.json +3 -3
  86. package/theme/antd-global-overwrite/admin/index.css +24 -2
  87. package/theme/antd-global-overwrite/admin/table.css +24 -2
  88. package/theme/antd-global-overwrite/admin/table.less +8 -2
  89. package/theme/antd-global-overwrite/aplus/index.css +24 -2
  90. package/theme/antd-global-overwrite/aplus/table.css +24 -2
  91. package/theme/antd-global-overwrite/aplus/table.less +7 -2
  92. package/theme/ap-descriptions/ap-descriptions.css +3 -0
  93. package/theme/ap-descriptions/ap-descriptions.less +7 -0
  94. package/theme/ap-table/ap-table.css +8 -1
  95. package/theme/ap-table/ap-table.less +11 -9
  96. package/theme/ap-table-modal/index.css +8 -1
  97. package/theme/index.css +11 -1
@@ -1,81 +1,81 @@
1
- import { defineComponent as ne, inject as s, ref as h, watch as oe, computed as le, openBlock as _, createElementBlock as x, normalizeClass as se, unref as a, createElementVNode as i, toDisplayString as z, createCommentVNode as A, normalizeStyle as re, createBlock as ie, withModifiers as ce, createVNode as ue } from "vue";
1
+ import { defineComponent as oe, inject as o, ref as _, watch as le, computed as se, openBlock as k, createElementBlock as z, normalizeClass as re, unref as a, createElementVNode as i, toDisplayString as A, createCommentVNode as b, normalizeStyle as ie, createBlock as ce, withModifiers as ue, createVNode as pe } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import { getName as pe, getReturnData as q } from "../utils/returnData.mjs";
4
- import { useOss as ve, useOssInit as de } from "../hooks/useOss.mjs";
5
- import { fileMatchesAccept as fe, getAcceptText as me } from "../utils/accept.mjs";
6
- import { message as u, Progress as ge } from "@aplus-frontend/antdv";
7
- import { DeleteOutlined as he } from "@ant-design/icons-vue";
8
- import I from "../assets/single-file-icon.png.mjs";
9
- import { useLocale as _e } from "../../config-provider/hooks/use-locale.mjs";
10
- import { useNamespace as ke } from "../../config-provider/hooks/use-namespace.mjs";
11
- const ye = ["accept"], we = {
3
+ import { getName as ve, getReturnData as I } from "../utils/returnData.mjs";
4
+ import { useOss as de, useOssInit as fe } from "../hooks/useOss.mjs";
5
+ import { fileMatchesAccept as me, getAcceptText as ge } from "../utils/accept.mjs";
6
+ import { message as u, Progress as he } from "@aplus-frontend/antdv";
7
+ import { DeleteOutlined as _e } from "@ant-design/icons-vue";
8
+ import j from "../assets/single-file-icon.png.mjs";
9
+ import { useLocale as ke } from "../../config-provider/hooks/use-locale.mjs";
10
+ import { useNamespace as ye } from "../../config-provider/hooks/use-namespace.mjs";
11
+ const we = ["accept"], De = {
12
12
  key: 0,
13
13
  class: "state-un"
14
- }, De = ["src"], Ue = { class: "state-un-title" }, Fe = { class: "state-un-subtitle" }, Ce = {
14
+ }, Ue = ["src"], Fe = { class: "state-un-title" }, Ce = { class: "state-un-subtitle" }, Ee = {
15
15
  key: 1,
16
16
  class: "state-ing"
17
- }, Ee = { class: "left" }, Se = ["src"], Ne = { class: "center" }, xe = { class: "center-progress" }, qe = /* @__PURE__ */ ne({
17
+ }, Se = { class: "left" }, Ne = ["src"], xe = { class: "center" }, ze = { class: "center-progress" }, Ie = /* @__PURE__ */ oe({
18
18
  __name: "SingleFile",
19
- setup(ze, { expose: j }) {
20
- const { t: r } = _e(), { b: k } = ke("ap-upload-single-file"), { put: G, client: b } = ve(), y = s("theme"), W = s("dirName"), w = s("accept") || "*", D = s("maxSize") ?? 500, H = s("title") || r("ap.apUpload.clickOrDragUpload"), U = s("subTitle"), n = s("value"), F = s("needName"), p = s("uploadingCount"), B = s("beforeUpload"), R = s("customRequest"), J = s("getOssAccess"), K = s("maxSizeErrorMsg"), Q = s("acceptErrorMsg"), o = h(null);
21
- oe(
22
- () => n == null ? void 0 : n.value,
19
+ setup(Ae, { expose: G }) {
20
+ const { t: r } = ke(), { b: y } = ye("ap-upload-single-file"), { put: W, client: B } = de(), w = o("theme"), H = o("dirName"), D = o("accept") || "*", U = o("maxSize") ?? 500, J = o("title") || r("ap.apUpload.clickOrDragUpload"), F = o("subTitle"), l = o("value"), C = o("needName"), p = o("uploadingCount"), R = o("beforeUpload"), M = o("customRequest"), K = o("getOssAccess"), Q = o("maxSizeErrorMsg"), X = o("acceptErrorMsg"), f = o("onRemove"), n = _(null);
21
+ le(
22
+ () => l == null ? void 0 : l.value,
23
23
  function(e) {
24
- o.value === null && e && M(e);
24
+ n.value === null && e && O(e);
25
25
  },
26
26
  { immediate: !0 }
27
27
  );
28
- function M(e) {
28
+ function O(e) {
29
29
  e ? setTimeout(() => {
30
- const t = pe(F, e);
31
- l.value = 3, o.value = new File([e], t, {}), n.value = e;
32
- }) : (l.value = 1, o.value = null, n.value = void 0);
30
+ const t = ve(C, e);
31
+ s.value = 3, n.value = new File([e], t, {}), l.value = e;
32
+ }) : (s.value = 1, n.value = null, l.value = void 0);
33
33
  }
34
- j({ setValue: M });
35
- const l = h(1), f = h(0), m = h(null), O = le(() => o.value && (n == null ? void 0 : n.value));
36
- function X() {
34
+ G({ setValue: O });
35
+ const s = _(1), m = _(0), g = _(null), P = se(() => n.value && (l == null ? void 0 : l.value));
36
+ function Y() {
37
37
  var e;
38
- l.value === 1 && ((e = m.value) == null || e.click());
38
+ s.value === 1 && ((e = g.value) == null || e.click());
39
39
  }
40
- function P(e) {
40
+ function T(e) {
41
41
  e.preventDefault(), e.stopPropagation();
42
42
  }
43
- function Y(e) {
44
- e.dataTransfer.dropEffect = "copy", e.preventDefault(), e.stopPropagation();
45
- }
46
43
  function Z(e) {
47
- T(e);
44
+ e.dataTransfer.dropEffect = "copy", e.preventDefault(), e.stopPropagation();
48
45
  }
49
46
  function V(e) {
50
- if (e.preventDefault(), e.stopPropagation(), l.value !== 1)
47
+ L(e);
48
+ }
49
+ function ee(e) {
50
+ if (e.preventDefault(), e.stopPropagation(), s.value !== 1)
51
51
  return;
52
- var t = e.dataTransfer, c = [], L = 0, $ = t.files.length;
52
+ var t = e.dataTransfer, c = [], $ = 0, q = t.files.length;
53
53
  function v() {
54
- L === $ - 1 && Z(c), L++;
54
+ $ === q - 1 && V(c), $++;
55
55
  }
56
56
  if (t.items !== void 0)
57
- for (var C = 0; C < t.items.length; C++) {
58
- var E = t.items[C];
59
- if (E.kind === "file" && E.webkitGetAsEntry().isFile) {
60
- var ae = E.getAsFile();
61
- c.push(ae), v();
57
+ for (var E = 0; E < t.items.length; E++) {
58
+ var S = t.items[E];
59
+ if (S.kind === "file" && S.webkitGetAsEntry().isFile) {
60
+ var ne = S.getAsFile();
61
+ c.push(ne), v();
62
62
  }
63
63
  }
64
64
  else
65
- for (let N = 0; N < $; N++) {
66
- var g = t.files[N];
67
- if (g.type)
68
- c.push(g), v();
65
+ for (let x = 0; x < q; x++) {
66
+ var h = t.files[x];
67
+ if (h.type)
68
+ c.push(h), v();
69
69
  else
70
70
  try {
71
- var S = new FileReader();
72
- S.readAsDataURL(g.slice(0, 3)), S.addEventListener(
71
+ var N = new FileReader();
72
+ N.readAsDataURL(h.slice(0, 3)), N.addEventListener(
73
73
  "load",
74
74
  function(d) {
75
- console.warn(d, "load"), c.push(g), v();
75
+ console.warn(d, "load"), c.push(h), v();
76
76
  },
77
77
  !1
78
- ), S.addEventListener(
78
+ ), N.addEventListener(
79
79
  "error",
80
80
  function(d) {
81
81
  console.warn(d, "error"), u.warning(r("ap.apUpload.foldersNotSupported")), v();
@@ -87,143 +87,143 @@ const ye = ["accept"], we = {
87
87
  }
88
88
  }
89
89
  }
90
- async function ee(e) {
90
+ async function te(e) {
91
91
  const t = e.target;
92
- await T(t == null ? void 0 : t.files), m.value && (m.value.value = "");
92
+ await L(t == null ? void 0 : t.files), g.value && (g.value.value = "");
93
93
  }
94
- async function T(e) {
94
+ async function L(e) {
95
95
  if (e != null && e.length) {
96
- if (e[0].size > D * 1024 * 1024) {
96
+ if (e[0].size > U * 1024 * 1024) {
97
97
  u.warning(
98
- K || r("ap.apUpload.maxUploadFileSize", {
99
- maxSize: D
98
+ Q || r("ap.apUpload.maxUploadFileSize", {
99
+ maxSize: U
100
100
  })
101
101
  );
102
102
  return;
103
103
  }
104
- if (!fe(e[0], w)) {
104
+ if (!me(e[0], D)) {
105
105
  u.warning(
106
- Q || r("ap.apUpload.fileFormatNotSupported")
106
+ X || r("ap.apUpload.fileFormatNotSupported")
107
107
  );
108
108
  return;
109
109
  }
110
- if (typeof B == "function" && await B(e[0]) === !1)
110
+ if (typeof R == "function" && await R(e[0]) === !1)
111
111
  return;
112
- if (o.value = e[0], l.value = 2, f.value = 0, p.value++, typeof R == "function") {
113
- R({
112
+ if (n.value = e[0], s.value = 2, m.value = 0, p.value++, typeof M == "function") {
113
+ M({
114
114
  onProgress: (t) => {
115
- f.value = t;
115
+ m.value = t;
116
116
  },
117
117
  onError: (t) => {
118
- u.warning(t || r("ap.apUpload.networkAnomaly")), l.value = 1, o.value = null, p.value--;
118
+ u.warning(t || r("ap.apUpload.networkAnomaly")), s.value = 1, n.value = null, p.value--;
119
119
  },
120
120
  onSuccess: (t) => {
121
- n.value = q(
122
- F,
121
+ l.value = I(
122
+ C,
123
123
  t,
124
- o.value.name
125
- ), l.value = 3, p.value--;
124
+ n.value.name
125
+ ), s.value = 3, p.value--;
126
126
  },
127
127
  file: e[0]
128
128
  });
129
129
  return;
130
130
  }
131
131
  try {
132
- await de(J), G({
133
- file: o.value,
134
- dirName: W,
135
- oss: b,
132
+ await fe(K), W({
133
+ file: n.value,
134
+ dirName: H,
135
+ oss: B,
136
136
  successCallBack(t) {
137
- n.value = q(
138
- F,
137
+ l.value = I(
138
+ C,
139
139
  t,
140
- o.value.name
141
- ), l.value = 3, p.value--;
140
+ n.value.name
141
+ ), s.value = 3, p.value--;
142
142
  },
143
143
  errorCallBack(t) {
144
- u.warning(t || r("ap.apUpload.networkAnomaly")), l.value = 1, o.value = null, p.value--;
144
+ u.warning(t || r("ap.apUpload.networkAnomaly")), s.value = 1, n.value = null, p.value--;
145
145
  },
146
146
  progressCallBack(t) {
147
- f.value = t;
147
+ m.value = t;
148
148
  }
149
149
  });
150
150
  } catch (t) {
151
151
  u.warning(
152
152
  typeof (t == null ? void 0 : t.message) == "string" ? t.message : r("ap.apUpload.networkAnomaly")
153
- ), l.value = 1, o.value = null, p.value--;
153
+ ), s.value = 1, n.value = null, p.value--;
154
154
  }
155
155
  }
156
156
  }
157
- function te() {
158
- o.value && !(n != null && n.value) && b.pauseUpload(), l.value = 1, o.value = null, n.value = void 0;
157
+ function ae() {
158
+ f && (f == null || f(n.value)), n.value && !(l != null && l.value) && B.pauseUpload(), s.value = 1, n.value = null, l.value = void 0;
159
159
  }
160
160
  return (e, t) => {
161
161
  var c;
162
- return _(), x("div", {
163
- class: se({
164
- [a(k)()]: !0,
165
- [a(k)("admin")]: a(y) === "admin",
166
- [a(k)("un")]: l.value === 1
162
+ return k(), z("div", {
163
+ class: re({
164
+ [a(y)()]: !0,
165
+ [a(y)("admin")]: a(w) === "admin",
166
+ [a(y)("un")]: s.value === 1
167
167
  }),
168
- onClick: X,
169
- onDragenter: P,
170
- onDragover: Y,
171
- onDragleave: P,
172
- onDrop: V
168
+ onClick: Y,
169
+ onDragenter: T,
170
+ onDragover: Z,
171
+ onDragleave: T,
172
+ onDrop: ee
173
173
  }, [
174
174
  i("input", {
175
175
  ref_key: "fileRef",
176
- ref: m,
176
+ ref: g,
177
177
  style: { display: "none" },
178
178
  type: "file",
179
- accept: a(w),
180
- onChange: ee
181
- }, null, 40, ye),
182
- l.value === 1 ? (_(), x("div", we, [
179
+ accept: a(D),
180
+ onChange: te
181
+ }, null, 40, we),
182
+ s.value === 1 ? (k(), z("div", De, [
183
183
  i("img", {
184
184
  class: "state-un-icon",
185
- src: a(I)
186
- }, null, 8, De),
187
- i("div", Ue, z(a(H)), 1),
188
- i("div", Fe, z(typeof a(U) == "string" && a(U).length > 0 ? a(U) : `${a(r)("ap.apUpload.supportExtension")}:${a(me)(
189
- a(w)
185
+ src: a(j)
186
+ }, null, 8, Ue),
187
+ i("div", Fe, A(a(J)), 1),
188
+ i("div", Ce, A(typeof a(F) == "string" && a(F).length > 0 ? a(F) : `${a(r)("ap.apUpload.supportExtension")}:${a(ge)(
189
+ a(D)
190
190
  )},${a(r)("ap.apUpload.maxWarnUploadFileSize", {
191
- maxSize: a(D)
191
+ maxSize: a(U)
192
192
  })}`), 1)
193
- ])) : A("", !0),
194
- [2, 3].includes(l.value) ? (_(), x("div", Ce, [
195
- i("div", Ee, [
196
- i("img", { src: a(I) }, null, 8, Se)
193
+ ])) : b("", !0),
194
+ [2, 3].includes(s.value) ? (k(), z("div", Ee, [
195
+ i("div", Se, [
196
+ i("img", { src: a(j) }, null, 8, Ne)
197
197
  ]),
198
- i("div", Ne, [
198
+ i("div", xe, [
199
199
  i("div", {
200
200
  class: "center-title",
201
- style: re({
202
- color: O.value ? "#0070FF" : "#182948"
201
+ style: ie({
202
+ color: P.value ? "#0070FF" : "#182948"
203
203
  })
204
- }, z((c = o.value) == null ? void 0 : c.name), 5),
205
- i("div", xe, [
206
- O.value ? A("", !0) : (_(), ie(a(ge), {
204
+ }, A((c = n.value) == null ? void 0 : c.name), 5),
205
+ i("div", ze, [
206
+ P.value ? b("", !0) : (k(), ce(a(he), {
207
207
  key: 0,
208
- percent: f.value,
208
+ percent: m.value,
209
209
  size: 4,
210
210
  "show-info": !1,
211
- "trail-color": a(y) === "admin" ? "#D9D9D9" : "#DEE4ED",
212
- "stroke-color": a(y) === "admin" ? "#34B77C" : "#0070FF"
211
+ "trail-color": a(w) === "admin" ? "#D9D9D9" : "#DEE4ED",
212
+ "stroke-color": a(w) === "admin" ? "#34B77C" : "#0070FF"
213
213
  }, null, 8, ["percent", "trail-color", "stroke-color"]))
214
214
  ])
215
215
  ]),
216
216
  i("div", {
217
217
  class: "right",
218
- onClick: ce(te, ["stop"])
218
+ onClick: ue(ae, ["stop"])
219
219
  }, [
220
- ue(a(he))
220
+ pe(a(_e))
221
221
  ])
222
- ])) : A("", !0)
222
+ ])) : b("", !0)
223
223
  ], 34);
224
224
  };
225
225
  }
226
226
  });
227
227
  export {
228
- qe as default
228
+ Ie as default
229
229
  };
@@ -1,16 +1,16 @@
1
- import { defineComponent as j, computed as s, ref as I, openBlock as v, createBlock as x, unref as a, normalizeClass as N, withCtx as r, createVNode as g, createTextVNode as b, toDisplayString as p, mergeProps as O, createCommentVNode as V } from "vue";
2
- import { DownOutlined as q } from "@ant-design/icons-vue";
3
- import { message as z, Dropdown as $, Menu as H, MenuItem as C, Button as J } from "@aplus-frontend/antdv";
1
+ import { defineComponent as N, ref as L, computed as s, watch as O, openBlock as g, createBlock as p, unref as o, normalizeClass as V, withCtx as n, createVNode as b, createTextVNode as w, toDisplayString as h, mergeProps as q, createCommentVNode as z } from "vue";
2
+ import { DownOutlined as U } from "@ant-design/icons-vue";
3
+ import { message as $, Dropdown as H, Menu as J, MenuItem as S, Button as Q } from "@aplus-frontend/antdv";
4
4
  import "../../config-provider/index.mjs";
5
- import { ApExportGroupActionType as f } from "./interface.mjs";
6
- import { usePermission as Q } from "@aplus-frontend/hooks";
7
- import { handleExportDownload as U } from "./handleExportDownload.mjs";
8
- import { useInjectApTable as W } from "../../ap-table/context.mjs";
9
- import { convertExportField as X } from "./convertExportField.mjs";
10
- import { useNamespace as Y } from "../../config-provider/hooks/use-namespace.mjs";
11
- import { useLocale as Z } from "../../config-provider/hooks/use-locale.mjs";
12
- import { useGlobalConfig as _ } from "../../config-provider/hooks/use-global-config.mjs";
13
- const fe = /* @__PURE__ */ j({
5
+ import { ApExportGroupActionType as m } from "./interface.mjs";
6
+ import { usePermission as W } from "@aplus-frontend/hooks";
7
+ import { handleExportDownload as X } from "./handleExportDownload.mjs";
8
+ import { useInjectApTable as Y } from "../../ap-table/context.mjs";
9
+ import { convertExportField as Z } from "./convertExportField.mjs";
10
+ import { useNamespace as ee } from "../../config-provider/hooks/use-namespace.mjs";
11
+ import { useLocale as te } from "../../config-provider/hooks/use-locale.mjs";
12
+ import { useGlobalConfig as A } from "../../config-provider/hooks/use-global-config.mjs";
13
+ const ve = /* @__PURE__ */ N({
14
14
  __name: "ApExportGroup",
15
15
  props: {
16
16
  selectedRowKeys: {},
@@ -26,84 +26,96 @@ const fe = /* @__PURE__ */ j({
26
26
  successMessage: { type: [Boolean, String], default: !1 },
27
27
  exportField: { type: [Boolean, Object], default: void 0 }
28
28
  },
29
- setup(L) {
30
- const { hasPermission: S } = Q(), e = L, { columns: n, dataSource: u } = W(), { b: A } = Y("ap-export-group"), { t: i } = Z(), B = _("uiMode"), w = _("exportField"), G = s(() => {
29
+ setup(_) {
30
+ const { hasPermission: B } = W(), e = _, { columns: u, dataSource: r } = Y(), { b: G } = ee("ap-export-group"), { t: i } = te(), P = A("uiMode"), E = A("exportField"), c = L(!1), v = L(!1), K = s(() => {
31
31
  const t = {
32
32
  aplus: "#0070FF",
33
33
  admin: "#34b77c"
34
34
  };
35
- return h.value ? "" : t[B.value] || t.aplus;
36
- }), h = s(
35
+ return d.value ? "" : t[P.value] || t.aplus;
36
+ }), d = s(
37
37
  () => {
38
38
  var t;
39
- return !!(e != null && e.disabled) || (u !== void 0 ? !((t = u == null ? void 0 : u.value) != null && t.length) : !1) || c.value;
39
+ return !!(e != null && e.disabled) || (r !== void 0 ? !((t = r == null ? void 0 : r.value) != null && t.length) : !1) || c.value;
40
40
  }
41
- ), P = s(() => (e == null ? void 0 : e.successMessage) === !0 ? i("ap.apExportGroup.exportSuccess") : e != null && e.successMessage ? e.successMessage : ""), m = s(() => {
42
- const t = "exportFieldList", o = (e == null ? void 0 : e.exportField) ?? (w.value === "" ? !0 : w.value) ?? !1;
43
- return o === !0 ? {
41
+ );
42
+ O(
43
+ () => d.value,
44
+ () => {
45
+ d.value && (v.value = !1);
46
+ },
47
+ {
48
+ immediate: !0
49
+ }
50
+ );
51
+ const D = s(() => (e == null ? void 0 : e.successMessage) === !0 ? i("ap.apExportGroup.exportSuccess") : e != null && e.successMessage ? e.successMessage : ""), y = s(() => {
52
+ const t = "exportFieldList", a = (e == null ? void 0 : e.exportField) ?? (E.value === "" ? !0 : E.value) ?? !1;
53
+ return a === !0 ? {
44
54
  key: t
45
- } : typeof o == "object" ? {
46
- ...o,
47
- key: o.key ?? t
48
- } : o;
49
- }), K = {
55
+ } : typeof a == "object" ? {
56
+ ...a,
57
+ key: a.key ?? t
58
+ } : a;
59
+ }), R = {
50
60
  textAlign: "center"
51
- }, c = I(!1), E = s(() => (e == null ? void 0 : e.selectedRowKeys) || []), D = s(() => {
61
+ }, F = s(() => (e == null ? void 0 : e.selectedRowKeys) || []), T = s(() => {
52
62
  let t = e == null ? void 0 : e.ifShow;
53
- return !(e != null && e.ifShow) && (e != null && e.auth) && (t = () => S(e.auth)), (t == null ? void 0 : t()) ?? !0;
63
+ return !(e != null && e.ifShow) && (e != null && e.auth) && (t = () => B(e.auth)), (t == null ? void 0 : t()) ?? !0;
54
64
  });
55
- async function R({ key: t }) {
56
- var F, M, k;
57
- const { getRequestParams: o, request: l } = e || {};
58
- let y = {};
59
- t === f.SELECT ? y = {
60
- [(e == null ? void 0 : e.idKey) || "ids"]: E.value
61
- } : t === f.ALL && (y = (o == null ? void 0 : o()) || {});
62
- const T = ((F = e == null ? void 0 : e.getInitialParams) == null ? void 0 : F.call(e)) || {};
65
+ async function j({ key: t }) {
66
+ var M, k, C;
67
+ const { getRequestParams: a, request: l } = e || {};
68
+ let x = {};
69
+ t === m.SELECT ? x = {
70
+ [(e == null ? void 0 : e.idKey) || "ids"]: F.value
71
+ } : t === m.ALL && (x = (a == null ? void 0 : a()) || {});
72
+ const I = ((M = e == null ? void 0 : e.getInitialParams) == null ? void 0 : M.call(e)) || {};
63
73
  try {
64
74
  c.value = !0;
65
- let d = Object.assign(
75
+ let f = Object.assign(
66
76
  {
67
- ...y,
68
- ...T
77
+ ...x,
78
+ ...I
69
79
  },
70
- m.value && (n != null && n.value) ? {
71
- [m.value.key]: X(
72
- n.value,
73
- (M = m.value) == null ? void 0 : M.convertField
80
+ y.value && (u != null && u.value) ? {
81
+ [y.value.key]: Z(
82
+ u.value,
83
+ (k = y.value) == null ? void 0 : k.convertField
74
84
  )
75
85
  } : {}
76
86
  );
77
- d = ((k = e == null ? void 0 : e.beforeRequest) == null ? void 0 : k.call(e, d)) || d, await U(async () => await (l == null ? void 0 : l(d))), e != null && e.successMessage && z.success(P.value);
87
+ f = ((C = e == null ? void 0 : e.beforeRequest) == null ? void 0 : C.call(e, f)) || f, await X(async () => await (l == null ? void 0 : l(f))), e != null && e.successMessage && $.success(D.value);
78
88
  } finally {
79
89
  c.value = !1;
80
90
  }
81
91
  }
82
- return (t, o) => D.value ? (v(), x(a($), {
92
+ return (t, a) => T.value ? (g(), p(o(H), {
83
93
  key: 0,
84
- class: N([a(A)()]),
85
- "overlay-style": K,
86
- disabled: h.value
94
+ open: v.value,
95
+ "onUpdate:open": a[0] || (a[0] = (l) => v.value = l),
96
+ class: V([o(G)()]),
97
+ "overlay-style": R,
98
+ disabled: d.value
87
99
  }, {
88
- overlay: r(() => [
89
- g(a(H), { onClick: R }, {
90
- default: r(() => {
100
+ overlay: n(() => [
101
+ b(o(J), { onClick: j }, {
102
+ default: n(() => {
91
103
  var l;
92
104
  return [
93
- (v(), x(a(C), {
94
- key: a(f).SELECT,
95
- disabled: ((l = E.value) == null ? void 0 : l.length) === 0
105
+ (g(), p(o(S), {
106
+ key: o(m).SELECT,
107
+ disabled: ((l = F.value) == null ? void 0 : l.length) === 0
96
108
  }, {
97
- default: r(() => [
98
- b(p(a(i)("ap.apExportGroup.exportSelected")), 1)
109
+ default: n(() => [
110
+ w(h(o(i)("ap.apExportGroup.exportSelected")), 1)
99
111
  ]),
100
112
  _: 1
101
113
  }, 8, ["disabled"])),
102
- (v(), x(a(C), {
103
- key: a(f).ALL
114
+ (g(), p(o(S), {
115
+ key: o(m).ALL
104
116
  }, {
105
- default: r(() => [
106
- b(p(a(i)("ap.apExportGroup.exportAll")), 1)
117
+ default: n(() => [
118
+ w(h(o(i)("ap.apExportGroup.exportAll")), 1)
107
119
  ]),
108
120
  _: 1
109
121
  }))
@@ -112,26 +124,26 @@ const fe = /* @__PURE__ */ j({
112
124
  _: 1
113
125
  })
114
126
  ]),
115
- default: r(() => [
116
- g(a(J), O({
127
+ default: n(() => [
128
+ b(o(Q), q({
117
129
  ...t.$attrs
118
130
  }, {
119
131
  style: {
120
- color: G.value
132
+ color: K.value
121
133
  },
122
134
  loading: c.value
123
135
  }), {
124
- default: r(() => [
125
- b(p((e == null ? void 0 : e.text) ?? a(i)("ap.apExportGroup.export")) + " ", 1),
126
- g(a(q))
136
+ default: n(() => [
137
+ w(h((e == null ? void 0 : e.text) ?? o(i)("ap.apExportGroup.export")) + " ", 1),
138
+ b(o(U))
127
139
  ]),
128
140
  _: 1
129
141
  }, 16, ["style", "loading"])
130
142
  ]),
131
143
  _: 1
132
- }, 8, ["class", "disabled"])) : V("", !0);
144
+ }, 8, ["open", "class", "disabled"])) : z("", !0);
133
145
  }
134
146
  });
135
147
  export {
136
- fe as default
148
+ ve as default
137
149
  };
@@ -417,6 +417,9 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
417
417
  color: {
418
418
  primary: string;
419
419
  };
420
+ scrollbar: {
421
+ size: string;
422
+ };
420
423
  };
421
424
  'ap-descriptions': {
422
425
  item: {
@@ -66,6 +66,9 @@ declare const aplusCssVarObj: {
66
66
  color: {
67
67
  primary: string;
68
68
  };
69
+ scrollbar: {
70
+ size: string;
71
+ };
69
72
  };
70
73
  'ap-descriptions': {
71
74
  item: {
@@ -1,4 +1,5 @@
1
- const F = {
1
+ import { getScrollbarSize as F } from "../utils/index.mjs";
2
+ const l = F(), p = {
2
3
  "ap-form": {
3
4
  bordered: {
4
5
  "border-color": {
@@ -64,6 +65,9 @@ const F = {
64
65
  basic: {
65
66
  color: {
66
67
  primary: "#0070ff"
68
+ },
69
+ scrollbar: {
70
+ size: `${l}px`
67
71
  }
68
72
  },
69
73
  "ap-descriptions": {
@@ -100,7 +104,7 @@ const F = {
100
104
  "color-disabled": "rgba(24, 41, 72, 0.25)"
101
105
  }
102
106
  }
103
- }, b = {
107
+ }, d = {
104
108
  "ap-form": {
105
109
  bordered: {
106
110
  "border-color": {
@@ -166,6 +170,9 @@ const F = {
166
170
  basic: {
167
171
  color: {
168
172
  primary: "#34b77c"
173
+ },
174
+ scrollbar: {
175
+ size: `${l}px`
169
176
  }
170
177
  },
171
178
  "ap-descriptions": {
@@ -203,26 +210,26 @@ const F = {
203
210
  }
204
211
  }
205
212
  };
206
- function i(t) {
213
+ function n(t) {
207
214
  const o = {};
208
- function r(a, l) {
209
- const s = Object.keys(a);
210
- for (const c of s) {
211
- const e = a[c], n = [...l, c];
212
- e !== null && typeof e == "object" ? r(e, n) : o[`--${n.join("-")}`] = e;
215
+ function r(a, s) {
216
+ const b = Object.keys(a);
217
+ for (const c of b) {
218
+ const e = a[c], i = [...s, c];
219
+ e !== null && typeof e == "object" ? r(e, i) : o[`--${i.join("-")}`] = e;
213
220
  }
214
221
  }
215
222
  return r(t, []), o;
216
223
  }
217
- const d = i(F), p = i(b);
218
- function u(t) {
224
+ const g = n(p), m = n(d);
225
+ function D(t) {
219
226
  Object.entries(t).forEach(([o, r]) => {
220
227
  document.documentElement.style.setProperty(o, r);
221
228
  });
222
229
  }
223
230
  export {
224
- p as adminCssVar,
225
- d as aplusCssVar,
226
- i as generateCssVar,
227
- u as setCSSVariables
231
+ m as adminCssVar,
232
+ g as aplusCssVar,
233
+ n as generateCssVar,
234
+ D as setCSSVariables
228
235
  };