@aplus-frontend/ui 7.13.1 → 7.13.2

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 (53) hide show
  1. package/es/src/ag-grid/components/empty/index.vue.d.ts +4 -1
  2. package/es/src/ag-grid/components/empty/index.vue2.mjs +20 -10
  3. package/es/src/ag-grid/editable/form-item.vue.mjs +9 -8
  4. package/es/src/ag-grid/editable/index.vue.mjs +1 -0
  5. package/es/src/ag-grid/index.vue.mjs +47 -45
  6. package/es/src/ag-grid/interface.d.ts +4 -0
  7. package/es/src/ag-grid/style/index.mjs +5 -5
  8. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +135 -128
  9. package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +2 -1
  10. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +296 -161
  11. package/es/src/business/ap-export-group/index.d.ts +4 -1
  12. package/es/src/business/ap-export-group/interface.d.ts +31 -0
  13. package/es/src/business/ap-export-group/style/index.d.ts +5 -0
  14. package/es/src/business/ap-export-group/style/index.mjs +17 -0
  15. package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +21 -21
  16. package/es/src/business/ap-view/style/index.mjs +3 -2
  17. package/es/src/config-provider/config-provider-props.d.ts +7 -6
  18. package/es/src/config-provider/config-provider-props.mjs +4 -4
  19. package/es/src/config-provider/config-provider.d.ts +35 -11
  20. package/es/src/config-provider/config-provider.mjs +24 -24
  21. package/es/src/config-provider/hooks/use-global-config.d.ts +14 -6
  22. package/es/src/config-provider/index.d.ts +65 -17
  23. package/es/src/locale/lang/en.mjs +5 -2
  24. package/es/src/locale/lang/zh-cn.mjs +4 -1
  25. package/es/src/version.d.ts +1 -1
  26. package/es/src/version.mjs +1 -1
  27. package/lib/src/ag-grid/components/empty/index.vue.d.ts +4 -1
  28. package/lib/src/ag-grid/components/empty/index.vue2.js +1 -1
  29. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  30. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  31. package/lib/src/ag-grid/index.vue.js +1 -1
  32. package/lib/src/ag-grid/interface.d.ts +4 -0
  33. package/lib/src/ag-grid/style/index.js +1 -1
  34. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  35. package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +2 -1
  36. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  37. package/lib/src/business/ap-export-group/index.d.ts +4 -1
  38. package/lib/src/business/ap-export-group/interface.d.ts +31 -0
  39. package/lib/src/business/ap-export-group/style/index.d.ts +5 -0
  40. package/lib/src/business/ap-export-group/style/index.js +1 -0
  41. package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
  42. package/lib/src/business/ap-view/style/index.js +1 -1
  43. package/lib/src/config-provider/config-provider-props.d.ts +7 -6
  44. package/lib/src/config-provider/config-provider-props.js +1 -1
  45. package/lib/src/config-provider/config-provider.d.ts +35 -11
  46. package/lib/src/config-provider/config-provider.js +1 -1
  47. package/lib/src/config-provider/hooks/use-global-config.d.ts +14 -6
  48. package/lib/src/config-provider/index.d.ts +65 -17
  49. package/lib/src/locale/lang/en.js +1 -1
  50. package/lib/src/locale/lang/zh-cn.js +1 -1
  51. package/lib/src/version.d.ts +1 -1
  52. package/lib/src/version.js +1 -1
  53. package/package.json +1 -1
@@ -1,28 +1,34 @@
1
- import { defineComponent as J, ref as B, computed as m, watch as Q, createElementBlock as M, openBlock as s, Fragment as T, createBlock as d, createCommentVNode as S, unref as o, mergeProps as x, withCtx as l, createTextVNode as y, toDisplayString as v, normalizeClass as W, createVNode as L } from "vue";
2
- import { DownOutlined as X } from "@ant-design/icons-vue";
3
- import { message as Y, Dropdown as Z, Menu as ee, MenuItem as R } from "@aplus-frontend/antdv";
4
- import { usePermission as te } from "@aplus-frontend/hooks";
5
- import { transformTableParamsNoTimezone as oe } from "@aplus-frontend/utils";
6
- import { merge as ae } from "lodash-unified";
1
+ import { defineComponent as ce, computed as x, ref as Q, watch as fe, createVNode as y, createElementBlock as X, openBlock as c, Fragment as Y, createBlock as v, createCommentVNode as P, unref as t, mergeProps as V, withCtx as f, createTextVNode as A, toDisplayString as M, normalizeClass as K } from "vue";
2
+ import { DownOutlined as me } from "@ant-design/icons-vue";
3
+ import { message as q, Space as ye, Tooltip as j, Dropdown as ge, Menu as xe, MenuItem as Z } from "@aplus-frontend/antdv";
4
+ import { usePermission as ve } from "@aplus-frontend/hooks";
5
+ import { IconApAdLineAnnotation as B } from "@aplus-frontend/icon";
6
+ import { transformTableParamsNoTimezone as he, isObjectWithContent as T } from "@aplus-frontend/utils";
7
+ import { merge as m } from "lodash-unified";
7
8
  import "../../ap-button/index.mjs";
8
- import { useInjectApTable as re } from "../../ap-table/context.mjs";
9
+ import { useInjectApTable as ke } from "../../ap-table/context.mjs";
9
10
  import "../../config-provider/index.mjs";
10
- import { ApBatchActionGroup as se } from "../ap-batch-action-group/index.mjs";
11
- import { convertExportField as le } from "./convertExportField.mjs";
12
- import { handleExportDownload as ne } from "./handleExportDownload.mjs";
13
- import { ApExportGroupActionType as n } from "./interface.mjs";
14
- import { useNamespace as ue } from "../../config-provider/hooks/use-namespace.mjs";
15
- import { useLocale as ie } from "../../config-provider/hooks/use-locale.mjs";
16
- import { useGlobalConfig as pe } from "../../config-provider/hooks/use-global-config.mjs";
17
- import C from "../../ap-button/ap-button.vue.mjs";
18
- const Fe = /* @__PURE__ */ J({
11
+ import { ApBatchActionGroup as be } from "../ap-batch-action-group/index.mjs";
12
+ import { convertExportField as Ee } from "./convertExportField.mjs";
13
+ import { handleExportDownload as we } from "./handleExportDownload.mjs";
14
+ import { ApExportGroupActionType as h } from "./interface.mjs";
15
+ import De from "./style/index.mjs";
16
+ import { useNamespace as Le } from "../../config-provider/hooks/use-namespace.mjs";
17
+ import { useLocale as Re } from "../../config-provider/hooks/use-locale.mjs";
18
+ import { useGlobalConfig as Se } from "../../config-provider/hooks/use-global-config.mjs";
19
+ import N from "../../ap-button/ap-button.vue.mjs";
20
+ const We = /* @__PURE__ */ ce({
19
21
  __name: "ApExportGroup",
20
22
  props: {
21
- type: { default: "button" },
23
+ type: {
24
+ default: "button"
25
+ },
22
26
  selectedRowKeys: {},
23
27
  groupList: {},
24
28
  buttonProps: {},
25
- disabled: { type: Boolean },
29
+ disabled: {
30
+ type: Boolean
31
+ },
26
32
  auth: {},
27
33
  ifShow: {},
28
34
  text: {},
@@ -31,173 +37,302 @@ const Fe = /* @__PURE__ */ J({
31
37
  getRequestParams: {},
32
38
  getInitialParams: {},
33
39
  beforeRequest: {},
34
- successMessage: { type: [Boolean, String], default: !1 },
35
- exportField: { type: [Boolean, Object], default: void 0 }
40
+ successMessage: {
41
+ type: [Boolean, String],
42
+ default: !1
43
+ },
44
+ exportField: {
45
+ type: [Boolean, Object],
46
+ default: void 0
47
+ },
48
+ dateValidate: {
49
+ type: [Object, Boolean],
50
+ default: void 0
51
+ }
36
52
  },
37
- setup(q) {
38
- const { hasPermission: P } = te(), t = q, { columns: F, dataSource: A, getSearchFormValues: K, getLastParams: D } = re(), { b: N } = ue("ap-export-group"), { t: u } = ie(), _ = pe("exportField"), i = B(!1), h = B(!1), p = m(
39
- () => !!t?.disabled || (A !== void 0 ? !A?.value?.length : !1) || i.value
40
- );
41
- Q(
42
- () => p.value,
43
- () => {
44
- p.value && (h.value = !1);
45
- },
46
- {
47
- immediate: !0
48
- }
49
- );
50
- const $ = m(() => t?.successMessage === !0 ? u("ap.apExportGroup.exportSuccess") : t?.successMessage ? t.successMessage : ""), j = (e = t?.exportField) => {
51
- const r = "exportFieldList", a = e ?? (_.value === "" ? !0 : _.value) ?? !1;
52
- return a === !0 ? {
53
- key: r
54
- } : typeof a == "object" ? {
55
- ...a,
56
- key: a.key ?? r
57
- } : a;
58
- }, I = {
53
+ setup(ee) {
54
+ const {
55
+ hasPermission: $
56
+ } = ve(), n = ee, {
57
+ columns: z,
58
+ dataSource: U,
59
+ getSearchFormValues: te,
60
+ getLastParams: ae
61
+ } = ke(), {
62
+ b: k
63
+ } = Le("ap-export-group"), b = De("ap-export-group"), {
64
+ t: i
65
+ } = Re(), W = Se("apExportGroup"), H = x(() => W?.value?.exportField), J = x(() => W?.value?.dateValidate), E = x(() => J.value === !0 ? {
66
+ maxDayRange: 90,
67
+ smartIdentify: !0
68
+ } : J.value), w = x(() => n?.dateValidate === !0 ? {
69
+ maxDayRange: 90,
70
+ smartIdentify: !0
71
+ } : n?.dateValidate), S = Q(!1), I = Q(!1), G = x(() => !!n?.disabled || (U !== void 0 ? !U?.value?.length : !1) || S.value), s = (e) => e === void 0 ? !1 : typeof e == "object" ? m({}, e) : e === !0 ? {} : e;
72
+ fe(() => G.value, () => {
73
+ G.value && (I.value = !1);
74
+ }, {
75
+ immediate: !0
76
+ });
77
+ const oe = x(() => n?.successMessage === !0 ? i("ap.apExportGroup.exportSuccess") : n?.successMessage ? n.successMessage : ""), re = (e = n?.exportField) => {
78
+ const a = "exportFieldList", o = e ?? (H.value === "" ? !0 : H.value) ?? !1;
79
+ return o === !0 ? {
80
+ key: a
81
+ } : typeof o == "object" ? {
82
+ ...o,
83
+ key: o.key ?? a
84
+ } : o;
85
+ }, ne = {
59
86
  textAlign: "center"
60
- }, g = m(() => t?.selectedRowKeys || []), k = m(() => {
61
- let e = t?.ifShow;
62
- return !t?.ifShow && t?.auth && (e = () => P(t.auth)), e?.() ?? !0;
87
+ }, F = x(() => n?.selectedRowKeys || []), O = x(() => {
88
+ let e = n?.ifShow;
89
+ return !n?.ifShow && n?.auth && (e = () => $(n.auth)), e?.() ?? !0;
63
90
  });
64
- async function V() {
65
- g.value.length > 0 ? c({ key: n.SELECT }) : c({ key: n.ALL });
91
+ async function se() {
92
+ F.value.length > 0 ? _({
93
+ key: h.SELECT
94
+ }) : _({
95
+ key: h.ALL
96
+ });
66
97
  }
67
- async function c({ key: e, option: r }) {
68
- const a = ae({}, t, r || {}), { getRequestParams: O, request: z } = a || {}, G = D?.()?.sort, U = G ? oe({ sort: G }) : {}, w = j(a?.exportField);
69
- let E = {};
70
- e === n.SELECT ? E = {
71
- [a?.idKey || "ids"]: g.value
72
- } : e === n.ALL && (E = O?.() || K?.(!0) || {});
73
- const H = a?.getInitialParams?.() || {};
98
+ async function _({
99
+ key: e,
100
+ option: a
101
+ }) {
102
+ const o = m({}, n, a || {}), {
103
+ getRequestParams: p,
104
+ request: L
105
+ } = o || {}, r = ae?.()?.sort, l = r ? he({
106
+ sort: r
107
+ }) : {}, u = re(o?.exportField);
108
+ let d = {};
109
+ e === h.SELECT ? d = {
110
+ [o?.idKey || "ids"]: F.value
111
+ } : e === h.ALL && (d = p?.() || te?.(!0) || {});
112
+ const g = o?.getInitialParams?.() || {};
74
113
  try {
75
- i.value = !0;
76
- let b = Object.assign(
77
- {
78
- ...E,
79
- ...H,
80
- ...U
81
- },
82
- w && F?.value ? {
83
- [w.key]: le(
84
- F.value,
85
- w?.convertField
86
- )
87
- } : {}
88
- );
89
- b = a?.beforeRequest?.(b) || b, await ne(async () => await z?.(b)), a?.successMessage && Y.success($.value);
114
+ S.value = !0;
115
+ let C = Object.assign({
116
+ ...d,
117
+ ...g,
118
+ ...l
119
+ }, u && z?.value ? {
120
+ [u.key]: Ee(z.value, u?.convertField)
121
+ } : {});
122
+ C = o?.beforeRequest?.(C) || C;
123
+ const R = m({}, s(E.value), s(w.value), s(a?.dateValidate));
124
+ T(R) && e === h.ALL && de({
125
+ params: C,
126
+ dateValidate: R
127
+ }), await we(async () => await L?.(C)), o?.successMessage && q.success(oe.value);
90
128
  } finally {
91
- i.value = !1;
129
+ S.value = !1;
92
130
  }
93
131
  }
94
- const f = m(() => t?.groupList?.filter((e) => {
95
- let r = e?.ifShow;
96
- return !e?.ifShow && e?.auth && (r = () => P(e.auth)), r?.() ?? !0;
97
- })?.map((e, r) => ({
98
- key: r,
132
+ const D = x(() => n?.groupList?.filter((e) => {
133
+ let a = e?.ifShow;
134
+ return !e?.ifShow && e?.auth && (a = () => $(e.auth)), a?.() ?? !0;
135
+ })?.map((e, a) => ({
136
+ key: a,
99
137
  content: e?.text,
100
138
  auth: e?.auth,
101
139
  ifShow: e?.ifShow,
102
140
  disabled: e?.disabled,
141
+ dateValidate: e?.dateValidate,
103
142
  onClick: () => {
104
- g.value.length > 0 ? c({
105
- key: n.SELECT,
143
+ F.value.length > 0 ? _({
144
+ key: h.SELECT,
106
145
  option: e
107
- }) : c({
108
- key: n.ALL,
146
+ }) : _({
147
+ key: h.ALL,
109
148
  option: e
110
149
  });
111
150
  }
112
- })) || []);
113
- return (e, r) => (s(), M(T, null, [
114
- k.value && t.type === "button" ? (s(), d(o(C), x({ key: 0 }, {
115
- ...e.$attrs
151
+ })) || []), le = () => {
152
+ const e = m({}, s(E.value), s(w.value), D.value.reduce((a, o) => m(a, s(o.dateValidate)), {}));
153
+ return y(ye, {
154
+ size: 4
116
155
  }, {
117
- disabled: p.value,
118
- loading: i.value,
119
- "min-width": "",
120
- onClick: V
121
- }), {
122
- default: l(() => [
123
- y(v(t?.text ?? o(u)("ap.apExportGroup.export")), 1)
124
- ]),
125
- _: 1
126
- }, 16, ["disabled", "loading"])) : S("", !0),
127
- k.value && t.type === "dropdown" ? (s(), d(o(Z), {
128
- key: 1,
129
- open: h.value,
130
- "onUpdate:open": r[0] || (r[0] = (a) => h.value = a),
131
- class: W([o(N)()]),
132
- "overlay-style": I,
133
- disabled: p.value
134
- }, {
135
- overlay: l(() => [
136
- L(o(ee), { onClick: c }, {
137
- default: l(() => [
138
- (s(), d(o(R), {
139
- key: o(n).SELECT,
140
- disabled: g.value?.length === 0
141
- }, {
142
- default: l(() => [
143
- y(v(o(u)("ap.apExportGroup.exportSelected")), 1)
144
- ]),
145
- _: 1
146
- }, 8, ["disabled"])),
147
- (s(), d(o(R), {
148
- key: o(n).ALL
149
- }, {
150
- default: l(() => [
151
- y(v(o(u)("ap.apExportGroup.exportAll")), 1)
152
- ]),
153
- _: 1
154
- }))
155
- ]),
156
- _: 1
156
+ default: () => [y("span", null, [n?.buttonProps?.content ?? i("ap.apExportGroup.export")]), T(e) ? y(j, {
157
+ title: i("ap.apExportGroup.maxMessage", {
158
+ maxDayRange: e.maxDayRange ?? 90
157
159
  })
158
- ]),
159
- default: l(() => [
160
- L(o(C), x({
161
- ...e.$attrs
162
- }, { loading: i.value }), {
163
- default: l(() => [
164
- y(v(t?.text ?? o(u)("ap.apExportGroup.export")) + " ", 1),
165
- L(o(X))
166
- ]),
167
- _: 1
168
- }, 16, ["loading"])
169
- ]),
160
+ }, {
161
+ default: () => [y(B, {
162
+ class: [k("icon"), b.value]
163
+ }, null)]
164
+ }) : null]
165
+ });
166
+ }, ue = (e) => Object.keys(e).reduce((a, o) => typeof e?.[o] == "number" && e?.[o] > 1e4 ? {
167
+ ...a,
168
+ [o]: e?.[o]
169
+ } : a, {}), ie = (e) => {
170
+ const a = Object.keys(e), o = [], p = /* @__PURE__ */ new Set(), L = [];
171
+ for (let r = 0; r < a.length; r++)
172
+ for (let l = r + 1; l < a.length; l++) {
173
+ const u = a[r], d = a[l];
174
+ let g = "";
175
+ const C = Math.min(u.length, d.length);
176
+ for (let R = 0; R < C && u[R] === d[R]; R++)
177
+ g += u[R];
178
+ g.length >= 3 && L.push({
179
+ prefix: g,
180
+ length: g.length,
181
+ key1: u,
182
+ key2: d,
183
+ diff: Math.abs(e[u] - e[d])
184
+ });
185
+ }
186
+ L.sort((r, l) => l.length !== r.length ? l.length - r.length : r.diff - l.diff);
187
+ for (const r of L)
188
+ if (!p.has(r.key1) && !p.has(r.key2)) {
189
+ const l = e[r.key1], u = e[r.key2];
190
+ o.push({
191
+ startKey: l < u ? r.key1 : r.key2,
192
+ endKey: l < u ? r.key2 : r.key1
193
+ }), p.add(r.key1), p.add(r.key2);
194
+ }
195
+ return o;
196
+ }, pe = ({
197
+ startTime: e,
198
+ endTime: a,
199
+ maxDayRange: o
200
+ }) => Math.abs(a - e) <= (o * 24 + 1) * 60 * 60 * 1e3, de = ({
201
+ params: e,
202
+ dateValidate: a
203
+ }) => {
204
+ const o = a.maxDayRange ?? 90, p = ue(e), L = [...a.smartIdentify ?? !0 ? ie(p) : [], ...a.dateKeyList?.filter((r) => p[r.startKey || ""] && p[r.endKey || ""]) ?? []];
205
+ if (L.length === 0) {
206
+ q.warn(a?.emptyTooltip ?? i("ap.apExportGroup.emptyTooltip", {
207
+ maxDayRange: o
208
+ }));
209
+ return;
210
+ } else if (L.some(({
211
+ startKey: l,
212
+ endKey: u
213
+ }) => {
214
+ const d = p[l || ""], g = p[u || ""];
215
+ return d !== void 0 && g !== void 0 && !pe({
216
+ startTime: d,
217
+ endTime: g,
218
+ maxDayRange: o
219
+ });
220
+ })) {
221
+ q.warn(a?.maxDayRangeTooltip ?? i("ap.apExportGroup.maxDayRangeTooltip", {
222
+ maxDayRange: o
223
+ }));
224
+ return;
225
+ }
226
+ };
227
+ return (e, a) => (c(), X(Y, null, [O.value && n.type === "button" ? (c(), v(t(N), V({
228
+ key: 0
229
+ }, {
230
+ ...e.$attrs
231
+ }, {
232
+ class: [t(k)(), t(b)],
233
+ disabled: G.value,
234
+ loading: S.value,
235
+ "min-width": "",
236
+ onClick: se
237
+ }), {
238
+ default: f(() => [A(M(n?.text ?? t(i)("ap.apExportGroup.export")) + " ", 1), t(T)(t(m)({}, s(E.value), s(w.value))) ? (c(), v(t(j), {
239
+ key: 0,
240
+ title: t(i)("ap.apExportGroup.maxMessage", {
241
+ maxDayRange: t(m)({}, s(E.value), s(w.value)).maxDayRange ?? 90
242
+ })
243
+ }, {
244
+ default: f(() => [y(t(B), {
245
+ class: K([t(k)("icon"), t(b)])
246
+ }, null, 8, ["class"])]),
170
247
  _: 1
171
- }, 8, ["open", "class", "disabled"])) : S("", !0),
172
- k.value && t.type === "group" ? (s(), M(T, { key: 2 }, [
173
- f.value.length === 1 ? (s(), d(o(C), x({ key: 0 }, {
174
- ...e.$attrs
248
+ }, 8, ["title"])) : P("", !0)]),
249
+ _: 1
250
+ }, 16, ["class", "disabled", "loading"])) : P("", !0), O.value && n.type === "dropdown" ? (c(), v(t(ge), {
251
+ key: 1,
252
+ open: I.value,
253
+ "onUpdate:open": a[0] || (a[0] = (o) => I.value = o),
254
+ class: K([t(k)(), t(b)]),
255
+ "overlay-style": ne,
256
+ disabled: G.value
257
+ }, {
258
+ overlay: f(() => [y(t(xe), {
259
+ onClick: _
260
+ }, {
261
+ default: f(() => [(c(), v(t(Z), {
262
+ key: t(h).SELECT,
263
+ disabled: F.value?.length === 0
175
264
  }, {
176
- disabled: p.value || f.value?.[0]?.disabled,
177
- loading: i.value,
178
- "min-width": "",
179
- onClick: f.value?.[0]?.onClick
180
- }), {
181
- default: l(() => [
182
- y(v(f.value?.[0]?.content ?? t?.text ?? o(u)("ap.apExportGroup.export")), 1)
183
- ]),
265
+ default: f(() => [A(M(t(i)("ap.apExportGroup.exportSelected")), 1)]),
184
266
  _: 1
185
- }, 16, ["disabled", "loading", "onClick"])) : (s(), d(o(se), x({ key: 1 }, {
186
- ...e.$attrs
267
+ }, 8, ["disabled"])), (c(), v(t(Z), {
268
+ key: t(h).ALL
187
269
  }, {
188
- disabled: p.value,
189
- loading: i.value,
190
- "button-props": {
191
- ...t.buttonProps,
192
- content: t?.buttonProps?.content ?? o(u)("ap.apExportGroup.export"),
193
- type: t?.buttonProps?.type ?? "default"
194
- },
195
- "menu-list": f.value
196
- }), null, 16, ["disabled", "loading", "button-props", "menu-list"]))
197
- ], 64)) : S("", !0)
198
- ], 64));
270
+ default: f(() => [A(M(t(i)("ap.apExportGroup.exportAll")), 1)]),
271
+ _: 1
272
+ }))]),
273
+ _: 1
274
+ })]),
275
+ default: f(() => [y(t(N), V({
276
+ ...e.$attrs
277
+ }, {
278
+ loading: S.value
279
+ }), {
280
+ default: f(() => [A(M(n?.text ?? t(i)("ap.apExportGroup.export")) + " ", 1), t(T)(t(m)({}, s(E.value), s(w.value))) ? (c(), v(t(j), {
281
+ key: 0,
282
+ title: t(i)("ap.apExportGroup.maxMessage", {
283
+ maxDayRange: t(m)({}, s(E.value), s(w.value)).maxDayRange ?? 90
284
+ })
285
+ }, {
286
+ default: f(() => [y(t(B), {
287
+ class: K([t(k)("icon"), t(b)])
288
+ }, null, 8, ["class"])]),
289
+ _: 1
290
+ }, 8, ["title"])) : P("", !0), y(t(me))]),
291
+ _: 1
292
+ }, 16, ["loading"])]),
293
+ _: 1
294
+ }, 8, ["open", "class", "disabled"])) : P("", !0), O.value && n.type === "group" ? (c(), X(Y, {
295
+ key: 2
296
+ }, [D.value.length === 1 ? (c(), v(t(N), V({
297
+ key: 0
298
+ }, {
299
+ ...e.$attrs
300
+ }, {
301
+ class: [t(k)(), t(b)],
302
+ disabled: G.value || D.value?.[0]?.disabled,
303
+ loading: S.value,
304
+ "min-width": "",
305
+ onClick: D.value?.[0]?.onClick
306
+ }), {
307
+ default: f(() => [A(M(D.value?.[0]?.content ?? n?.text ?? t(i)("ap.apExportGroup.export")) + " ", 1), t(T)(t(m)({}, s(E.value), s(w.value), s(D.value?.[0]?.dateValidate))) ? (c(), v(t(j), {
308
+ key: 0,
309
+ title: t(i)("ap.apExportGroup.maxMessage", {
310
+ maxDayRange: t(m)({}, s(E.value), s(w.value), s(D.value?.[0]?.dateValidate)).maxDayRange ?? 90
311
+ })
312
+ }, {
313
+ default: f(() => [y(t(B), {
314
+ class: K([t(k)("icon"), t(b)])
315
+ }, null, 8, ["class"])]),
316
+ _: 1
317
+ }, 8, ["title"])) : P("", !0)]),
318
+ _: 1
319
+ }, 16, ["class", "disabled", "loading", "onClick"])) : (c(), v(t(be), V({
320
+ key: 1
321
+ }, {
322
+ ...e.$attrs
323
+ }, {
324
+ class: [t(k)(), t(b)],
325
+ disabled: G.value,
326
+ loading: S.value,
327
+ "button-props": {
328
+ ...n.buttonProps,
329
+ content: le(),
330
+ type: n?.buttonProps?.type ?? "default"
331
+ },
332
+ "menu-list": D.value
333
+ }), null, 16, ["class", "disabled", "loading", "button-props", "menu-list"]))], 64)) : P("", !0)], 64));
199
334
  }
200
335
  });
201
336
  export {
202
- Fe as default
337
+ We as default
203
338
  };
@@ -1,11 +1,12 @@
1
1
  import { convertExportField } from './convertExportField';
2
2
  import { handleExportDownload } from './handleExportDownload';
3
3
  import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
4
- import { ApExportGroupProps } from './interface';
4
+ import { ApExportGroupProps, ApExportGroupDateValidate } from './interface';
5
5
  export * from './interface';
6
6
  declare const ApExportGroup: {
7
7
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
8
8
  type: "button" | "dropdown" | "group";
9
+ dateValidate: ApExportGroupDateValidate;
9
10
  exportField: boolean | {
10
11
  key?: string;
11
12
  convertField?: {
@@ -22,6 +23,7 @@ declare const ApExportGroup: {
22
23
  Defaults: {};
23
24
  }, Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, {
24
25
  type: "button" | "dropdown" | "group";
26
+ dateValidate: ApExportGroupDateValidate;
25
27
  exportField: boolean | {
26
28
  key?: string;
27
29
  convertField?: {
@@ -35,6 +37,7 @@ declare const ApExportGroup: {
35
37
  __isSuspense?: never;
36
38
  } & ComponentOptionsBase<Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
37
39
  type: "button" | "dropdown" | "group";
40
+ dateValidate: ApExportGroupDateValidate;
38
41
  exportField: boolean | {
39
42
  key?: string;
40
43
  convertField?: {
@@ -1,4 +1,31 @@
1
1
  import { ApBatchActionGroupButtonProps } from '../ap-batch-action-group';
2
+ export type ApExportGroupDateValidate = {
3
+ /**
4
+ * 默认最大导出天数
5
+ * @default 90
6
+ */
7
+ maxDayRange?: number;
8
+ /**
9
+ * 日期字段key
10
+ */
11
+ dateKeyList?: {
12
+ startKey?: string;
13
+ endKey?: string;
14
+ }[];
15
+ /**
16
+ * 是否开启智能识别日期字段
17
+ * @default true
18
+ */
19
+ smartIdentify?: boolean;
20
+ /**
21
+ * 筛选全量数据提示语
22
+ */
23
+ emptyTooltip?: string;
24
+ /**
25
+ * 筛选日期超出最大天数提示语
26
+ */
27
+ maxDayRangeTooltip?: string;
28
+ } | boolean;
2
29
  export type ApExportGroupProps = {
3
30
  /**
4
31
  * 类型
@@ -61,6 +88,10 @@ export interface ApExportGroupListItem {
61
88
  [key: string]: string[];
62
89
  };
63
90
  };
91
+ /**
92
+ * 日期校验配置
93
+ */
94
+ dateValidate?: ApExportGroupDateValidate;
64
95
  }
65
96
  export declare enum ApExportGroupActionType {
66
97
  ALL = "ALL",
@@ -0,0 +1,5 @@
1
+ import { GenStyleFunc } from '../../../design-token/interface';
2
+ import { ComputedRef } from 'vue';
3
+ export declare const genApExportGroupStyle: GenStyleFunc;
4
+ declare const _default: (prefixCls: string) => ComputedRef<string>;
5
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import { genComponentStyleHook as e } from "../../../utils/cssinjs/index.mjs";
2
+ const r = (o) => {
3
+ const { componentCls: t } = o;
4
+ return {
5
+ [t]: {
6
+ "&-icon": {
7
+ color: o.textColor3
8
+ }
9
+ }
10
+ };
11
+ }, p = e("ApExportGroup", (o) => [
12
+ r(o)
13
+ ]);
14
+ export {
15
+ p as default,
16
+ r as genApExportGroupStyle
17
+ };