@aplus-frontend/ui 6.23.0 → 6.24.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 (96) hide show
  1. package/es/src/ag-grid/components/body-cell/index.vue2.mjs +2 -1
  2. package/es/src/ag-grid/hooks/use-columns-def.d.ts +13 -0
  3. package/es/src/ag-grid/hooks/use-columns-def.mjs +140 -0
  4. package/es/src/ag-grid/hooks/use-columns.d.ts +9 -0
  5. package/es/src/ag-grid/hooks/use-columns.mjs +26 -0
  6. package/es/src/ag-grid/index.vue.mjs +258 -315
  7. package/es/src/ag-grid/interface.d.ts +13 -1
  8. package/es/src/ag-grid/renderer/checkbox.d.ts +2 -0
  9. package/es/src/ag-grid/renderer/checkbox.mjs +8 -0
  10. package/es/src/ag-grid/renderer/date-range.d.ts +2 -0
  11. package/es/src/ag-grid/renderer/date-range.mjs +15 -0
  12. package/es/src/ag-grid/renderer/date.d.ts +2 -0
  13. package/es/src/ag-grid/renderer/date.mjs +19 -0
  14. package/es/src/ag-grid/renderer/index.d.ts +26 -0
  15. package/es/src/ag-grid/renderer/index.mjs +40 -0
  16. package/es/src/ag-grid/renderer/number.d.ts +2 -0
  17. package/es/src/ag-grid/renderer/number.mjs +13 -0
  18. package/es/src/ag-grid/renderer/password.d.ts +2 -0
  19. package/es/src/ag-grid/renderer/password.mjs +6 -0
  20. package/es/src/ag-grid/renderer/radio.d.ts +2 -0
  21. package/es/src/ag-grid/renderer/radio.mjs +18 -0
  22. package/es/src/ag-grid/renderer/rate.d.ts +2 -0
  23. package/es/src/ag-grid/renderer/segmented.d.ts +2 -0
  24. package/es/src/ag-grid/renderer/select.d.ts +2 -0
  25. package/es/src/ag-grid/renderer/select.mjs +20 -0
  26. package/es/src/ag-grid/renderer/slider.d.ts +2 -0
  27. package/es/src/ag-grid/renderer/switch.d.ts +2 -0
  28. package/es/src/ag-grid/renderer/switch.mjs +7 -0
  29. package/es/src/ag-grid/renderer/text-area.d.ts +2 -0
  30. package/es/src/ag-grid/renderer/text-area.mjs +7 -0
  31. package/es/src/ag-grid/renderer/text.d.ts +2 -0
  32. package/es/src/ag-grid/renderer/text.mjs +8 -0
  33. package/es/src/ag-grid/renderer/tree-select.d.ts +2 -0
  34. package/es/src/ag-grid/renderer/tree-select.mjs +20 -0
  35. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +49 -47
  36. package/es/src/ap-grid/utils/col.d.ts +2 -1
  37. package/es/src/ap-grid/utils/col.mjs +69 -69
  38. package/es/src/ap-pro-card/components/card/index.vue.d.ts +11 -1
  39. package/es/src/ap-pro-card/components/card/index.vue2.mjs +159 -117
  40. package/es/src/ap-pro-card/components/statistic-card/index.vue.d.ts +11 -1
  41. package/es/src/ap-pro-card/components/statistic-card/index.vue2.mjs +59 -42
  42. package/es/src/ap-pro-card/interface.d.ts +30 -0
  43. package/es/src/version.d.ts +1 -1
  44. package/es/src/version.mjs +1 -1
  45. package/lib/src/ag-grid/components/body-cell/index.vue2.js +1 -1
  46. package/lib/src/ag-grid/hooks/use-columns-def.d.ts +13 -0
  47. package/lib/src/ag-grid/hooks/use-columns-def.js +1 -0
  48. package/lib/src/ag-grid/hooks/use-columns.d.ts +9 -0
  49. package/lib/src/ag-grid/hooks/use-columns.js +1 -0
  50. package/lib/src/ag-grid/index.vue.js +1 -1
  51. package/lib/src/ag-grid/interface.d.ts +13 -1
  52. package/lib/src/ag-grid/renderer/checkbox.d.ts +2 -0
  53. package/lib/src/ag-grid/renderer/checkbox.js +1 -0
  54. package/lib/src/ag-grid/renderer/date-range.d.ts +2 -0
  55. package/lib/src/ag-grid/renderer/date-range.js +1 -0
  56. package/lib/src/ag-grid/renderer/date.d.ts +2 -0
  57. package/lib/src/ag-grid/renderer/date.js +1 -0
  58. package/lib/src/ag-grid/renderer/index.d.ts +26 -0
  59. package/lib/src/ag-grid/renderer/index.js +1 -0
  60. package/lib/src/ag-grid/renderer/number.d.ts +2 -0
  61. package/lib/src/ag-grid/renderer/number.js +1 -0
  62. package/lib/src/ag-grid/renderer/password.d.ts +2 -0
  63. package/lib/src/ag-grid/renderer/password.js +1 -0
  64. package/lib/src/ag-grid/renderer/radio.d.ts +2 -0
  65. package/lib/src/ag-grid/renderer/radio.js +1 -0
  66. package/lib/src/ag-grid/renderer/rate.d.ts +2 -0
  67. package/lib/src/ag-grid/renderer/segmented.d.ts +2 -0
  68. package/lib/src/ag-grid/renderer/select.d.ts +2 -0
  69. package/lib/src/ag-grid/renderer/select.js +1 -0
  70. package/lib/src/ag-grid/renderer/slider.d.ts +2 -0
  71. package/lib/src/ag-grid/renderer/switch.d.ts +2 -0
  72. package/lib/src/ag-grid/renderer/switch.js +1 -0
  73. package/lib/src/ag-grid/renderer/text-area.d.ts +2 -0
  74. package/lib/src/ag-grid/renderer/text-area.js +1 -0
  75. package/lib/src/ag-grid/renderer/text.d.ts +2 -0
  76. package/lib/src/ag-grid/renderer/text.js +1 -0
  77. package/lib/src/ag-grid/renderer/tree-select.d.ts +2 -0
  78. package/lib/src/ag-grid/renderer/tree-select.js +1 -0
  79. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  80. package/lib/src/ap-grid/utils/col.d.ts +2 -1
  81. package/lib/src/ap-grid/utils/col.js +1 -1
  82. package/lib/src/ap-pro-card/components/card/index.vue.d.ts +11 -1
  83. package/lib/src/ap-pro-card/components/card/index.vue2.js +1 -1
  84. package/lib/src/ap-pro-card/components/statistic-card/index.vue.d.ts +11 -1
  85. package/lib/src/ap-pro-card/components/statistic-card/index.vue2.js +1 -1
  86. package/lib/src/ap-pro-card/interface.d.ts +30 -0
  87. package/lib/src/version.d.ts +1 -1
  88. package/lib/src/version.js +1 -1
  89. package/package.json +1 -1
  90. package/theme/ag-grid/index.css +6 -0
  91. package/theme/ag-grid/index.less +6 -0
  92. package/theme/ap-pro-card/index.css +32 -4
  93. package/theme/ap-pro-card/index.less +32 -4
  94. package/theme/ap-tag/ap-tag.css +4 -2
  95. package/theme/ap-tag/ap-tag.less +4 -2
  96. package/theme/index.css +42 -6
@@ -1,19 +1,19 @@
1
- import { createVNode as p, Fragment as o } from "vue";
2
- import { isUndefined as N, isArray as b, isString as F, isBoolean as v, isNumber as w, pick as x } from "lodash-unified";
3
- import { valueEnumToArray as E, objectToString as O, getTableTitle as A, getTableRenderType as S, getTableRenderProps as $, getTableCellRenderNode as M } from "../../ap-table/utils.mjs";
4
- import { noRenderAsFormItemValueList as V } from "../../ap-table/constants.mjs";
1
+ import { createVNode as p, Fragment as T } from "vue";
2
+ import { isUndefined as b, isArray as w, isString as v, isBoolean as x, isNumber as E, pick as A } from "lodash-unified";
3
+ import { valueEnumToArray as O, objectToString as S, getTableTitle as R, getTableRenderType as $, getTableRenderProps as M, getTableCellRenderNode as V } from "../../ap-table/utils.mjs";
4
+ import { noRenderAsFormItemValueList as j } from "../../ap-table/constants.mjs";
5
5
  import "../../ap-table/components/paragraph-ellipsis/index.vue.mjs";
6
- import j from "../../ap-table/components/paragraph-ellipsis/index.vue2.mjs";
7
- function R(e) {
8
- if (!N(e))
9
- return b(e) ? e.reduce((t, r) => F(r) ? `${t}.${r}` : `${t}[${r}]`, "") : String(e);
10
- }
6
+ import q from "../../ap-table/components/paragraph-ellipsis/index.vue2.mjs";
11
7
  function c(e) {
8
+ if (!b(e))
9
+ return w(e) ? e.reduce((t, r) => v(r) ? `${t}.${r}` : `${t}[${r}]`, "") : String(e);
10
+ }
11
+ function N(e) {
12
12
  if (e)
13
13
  return e === !0 ? "left" : e;
14
14
  }
15
- function q(e) {
16
- return v(e) ? {
15
+ function B(e) {
16
+ return x(e) ? {
17
17
  sortable: e
18
18
  } : e ? {
19
19
  sortable: !0,
@@ -23,19 +23,19 @@ function q(e) {
23
23
  sortable: !1
24
24
  };
25
25
  }
26
- function B(e) {
26
+ function W(e) {
27
27
  let t;
28
- return v(e.filters) && e.valueEnum ? t = E(e.valueEnum) : t = e.filters, t == null ? void 0 : t.map((r) => ({
29
- label: F(r.text) ? r.text : "",
28
+ return x(e.filters) && e.valueEnum ? t = O(e.valueEnum) : t = e.filters, t == null ? void 0 : t.map((r) => ({
29
+ label: v(r.text) ? r.text : "",
30
30
  value: r.value
31
31
  }));
32
32
  }
33
- function W(e) {
33
+ function _(e) {
34
34
  if (e)
35
35
  return (t) => e(t.value, t.row);
36
36
  }
37
- function _(e, t) {
38
- return e ? w(e) ? {
37
+ function k(e, t) {
38
+ return e ? E(e) ? {
39
39
  tooltip: t,
40
40
  rows: e
41
41
  } : e === !0 || e === "tooltip" ? {
@@ -47,12 +47,12 @@ function _(e, t) {
47
47
  htmlTitle: e === "title" ? t : ""
48
48
  } : !1;
49
49
  }
50
- function k(e, t, r) {
51
- if (V.includes(e.valueType))
50
+ function z(e, t, r) {
51
+ if (j.includes(e.valueType))
52
52
  return r;
53
53
  if (e.copyable || e.ellipsis) {
54
- const l = _(e.ellipsis, t), i = O(t);
55
- return p(j, {
54
+ const l = k(e.ellipsis, t), i = S(t);
55
+ return p(q, {
56
56
  rawValue: i,
57
57
  copyable: e.copyable,
58
58
  ellipsis: l,
@@ -61,81 +61,81 @@ function k(e, t, r) {
61
61
  }
62
62
  return r;
63
63
  }
64
- function T(e, t, r) {
65
- const l = x(e, ["width", "minWidth", "align"]);
66
- return l.field = R(e.dataIndex), l.fixed = c(e.fixed), l.slots = {
67
- header: () => A(e, r, void 0, t)
64
+ function y(e, t, r) {
65
+ const l = A(e, ["width", "minWidth", "align"]);
66
+ return l.field = c(e.dataIndex), l.fixed = N(e.fixed), l.slots = {
67
+ header: () => R(e, r, void 0, t)
68
68
  }, l.headerAlign = e.align, l.showOverflow = !1, l.showFooterOverflow = !1, l;
69
69
  }
70
- const z = ({
70
+ const G = ({
71
71
  value: e,
72
72
  ...t
73
- }, r, l) => {
74
- var u, h;
75
- const i = S(r), d = $({
73
+ }, r, l, i = !0) => {
74
+ var h, o;
75
+ const s = $(r), d = M({
76
76
  ...r,
77
- valueType: i
77
+ valueType: s
78
78
  }, {
79
79
  value: e,
80
80
  ...t
81
- }), s = M(i, d, t.record, l), n = ((u = r.renderText) == null ? void 0 : u.call(r, {
81
+ }), a = V(s, d, t.record, l), n = ((h = r.renderText) == null ? void 0 : h.call(r, {
82
82
  value: e,
83
83
  ...t
84
- })) || e, a = r.renderText ? p(o, null, [(h = r.renderText) == null ? void 0 : h.call(r, {
84
+ })) || e, u = r.renderText ? p(T, null, [(o = r.renderText) == null ? void 0 : o.call(r, {
85
85
  value: e,
86
86
  ...t
87
- })]) : s;
88
- let f = k(r, n, a);
87
+ })]) : a;
88
+ let f = i ? z(r, n, u) : u;
89
89
  return r.customRender && (f = r.customRender({
90
90
  value: e,
91
91
  ...t,
92
92
  column: r,
93
93
  originalNode: f,
94
94
  originalText: n
95
- })), p(o, null, [f]);
95
+ })), p(T, null, [f]);
96
96
  };
97
- function y(e, t, r, l) {
98
- const i = x(e, ["width", "minWidth", "align", "resizable", "className", "headerClassName", "footerClassName", "treeNode"]);
99
- i.field = R(e.dataIndex), i.fixed = c(e.fixed), i.headerAlign = e.align, i.footerAlign = e.align, i.showOverflow = !1, i.showFooterOverflow = !1, Object.assign(i, q(e.sorter)), i.filters = B(e), i.filterMultiple = e.filterMultiple, i.filterMethod = W(e.onFilter);
100
- const d = ({
101
- row: s,
102
- rowIndex: n
103
- }) => z({
104
- value: s[i.field],
105
- text: s[i.field],
106
- record: s,
107
- index: n,
108
- renderIndex: n,
97
+ function F(e, t, r, l) {
98
+ const i = A(e, ["width", "minWidth", "align", "resizable", "className", "headerClassName", "footerClassName", "treeNode"]);
99
+ i.field = c(e.dataIndex), i.fixed = N(e.fixed), i.headerAlign = e.align, i.footerAlign = e.align, i.showOverflow = !1, i.showFooterOverflow = !1, Object.assign(i, B(e.sorter)), i.filters = W(e), i.filterMultiple = e.filterMultiple, i.filterMethod = _(e.onFilter);
100
+ const s = ({
101
+ row: d,
102
+ rowIndex: a
103
+ }) => G({
104
+ value: d[i.field],
105
+ text: d[i.field],
106
+ record: d,
107
+ index: a,
108
+ renderIndex: a,
109
109
  column: e
110
110
  }, e, l);
111
111
  return i.slots = {
112
- header: () => A(e, r, void 0, t),
113
- default: d,
114
- footer: d
112
+ header: () => R(e, r, void 0, t),
113
+ default: s,
114
+ footer: s
115
115
  }, e.html && (delete i.slots.default, delete i.slots.footer, i.type = "html"), e.seq && (i.type = "seq", i.slots = {}), i;
116
116
  }
117
- function J(e, t, r, l) {
118
- var s;
119
- if (!((s = e.children) != null && s.length))
120
- return y(e, t, r, l);
121
- function i(n) {
122
- return n.map((a) => {
123
- var f;
124
- if ((f = a.children) != null && f.length) {
125
- const u = T(a, t, r);
126
- return u.children = i(a.children), u;
117
+ function K(e, t, r, l) {
118
+ var d;
119
+ if (!((d = e.children) != null && d.length))
120
+ return F(e, t, r, l);
121
+ function i(a) {
122
+ return a.map((n) => {
123
+ var u;
124
+ if ((u = n.children) != null && u.length) {
125
+ const f = y(n, t, r);
126
+ return f.children = i(n.children), f;
127
127
  }
128
- return y(a, t, r, l);
128
+ return F(n, t, r, l);
129
129
  });
130
130
  }
131
- const d = T(e, t, r);
132
- return d.children = i(e.children), d;
131
+ const s = y(e, t, r);
132
+ return s.children = i(e.children), s;
133
133
  }
134
134
  export {
135
- z as contentCustom,
136
- R as dataIndexToField,
137
- J as transformCol,
138
- c as transformFixed,
139
- T as transformToColGroup,
140
- y as transformToColumn
135
+ G as contentCustom,
136
+ c as dataIndexToField,
137
+ K as transformCol,
138
+ N as transformFixed,
139
+ y as transformToColGroup,
140
+ F as transformToColumn
141
141
  };
@@ -1,5 +1,9 @@
1
1
  import { ApProCardGutter, ApProCardProps, ApProCardSolts } from '../../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type __VLS_Props = ApProCardProps;
4
+ type __VLS_PublicProps = {
5
+ 'collapsed'?: boolean | undefined;
6
+ } & __VLS_Props;
3
7
  declare function __VLS_template(): {
4
8
  attrs: Partial<{}>;
5
9
  slots: Readonly<ApProCardSolts> & ApProCardSolts;
@@ -7,7 +11,11 @@ declare function __VLS_template(): {
7
11
  rootEl: HTMLDivElement;
8
12
  };
9
13
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
- declare const __VLS_component: DefineComponent<ApProCardProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApProCardProps> & Readonly<{}>, {
14
+ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
15
+ "update:collapsed": (value: boolean | undefined) => any;
16
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
+ "onUpdate:collapsed"?: ((value: boolean | undefined) => any) | undefined;
18
+ }>, {
11
19
  wrap: boolean;
12
20
  boxShadow: boolean;
13
21
  gutter: ApProCardGutter | ApProCardGutter[];
@@ -15,6 +23,8 @@ declare const __VLS_component: DefineComponent<ApProCardProps, {}, {}, {}, {}, C
15
23
  bordered: boolean;
16
24
  headerBordered: boolean;
17
25
  hoverable: boolean;
26
+ collapsible: boolean;
27
+ defaultCollapsed: boolean;
18
28
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
19
29
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
30
  export default _default;
@@ -1,16 +1,17 @@
1
- import { defineComponent as et, useSlots as ot, computed as d, ref as rt, createVNode as u, Fragment as x, createElementBlock as v, openBlock as s, mergeProps as lt, createCommentVNode as $, createElementVNode as nt, normalizeStyle as w, normalizeClass as g, unref as h, renderSlot as V, createBlock as p, resolveDynamicComponent as b, withCtx as M } from "vue";
2
- import { Spin as at, Tooltip as it } from "@aplus-frontend/antdv";
3
- import { QuestionCircleOutlined as st } from "@ant-design/icons-vue";
4
- import { getProCardCssVar as dt } from "../../utils/css-var.mjs";
1
+ import { defineComponent as ne, useSlots as ie, ref as R, useModel as se, watch as de, computed as d, createVNode as u, Fragment as y, createElementBlock as m, openBlock as i, mergeProps as ue, createCommentVNode as $, createElementVNode as ce, normalizeStyle as I, normalizeClass as x, unref as h, createBlock as p, renderSlot as F, resolveDynamicComponent as v, withCtx as H, mergeModels as fe } from "vue";
2
+ import { Spin as pe, Tooltip as ye } from "@aplus-frontend/antdv";
3
+ import { QuestionCircleOutlined as ve } from "@ant-design/icons-vue";
4
+ import { getProCardCssVar as be } from "../../utils/css-var.mjs";
5
5
  import "../../../config-provider/index.mjs";
6
- import { mergeClass as m } from "../../../editable-table/utils.mjs";
7
- import ut from "@aplus-frontend/antdv/es/_util/hooks/useBreakpoint";
8
- import { useNamespace as ct } from "../../../config-provider/hooks/use-namespace.mjs";
9
- import { useGlobalConfig as ft } from "../../../config-provider/hooks/use-global-config.mjs";
10
- const St = /* @__PURE__ */ et({
6
+ import { mergeClass as A } from "../../../editable-table/utils.mjs";
7
+ import ge from "@aplus-frontend/antdv/es/_util/hooks/useBreakpoint";
8
+ import { IconApAdFillDown as xe } from "@aplus-frontend/icon";
9
+ import { useNamespace as he } from "../../../config-provider/hooks/use-namespace.mjs";
10
+ import { useGlobalConfig as Ce } from "../../../config-provider/hooks/use-global-config.mjs";
11
+ const Ee = /* @__PURE__ */ ne({
11
12
  name: "ApProCard",
12
13
  __name: "index",
13
- props: {
14
+ props: /* @__PURE__ */ fe({
14
15
  headStyle: {},
15
16
  bodyStyle: {},
16
17
  actionsStyle: {},
@@ -58,20 +59,47 @@ const St = /* @__PURE__ */ et({
58
59
  type: Boolean,
59
60
  default: !1
60
61
  },
62
+ collapsible: {
63
+ type: Boolean,
64
+ default: !1
65
+ },
66
+ defaultCollapsed: {
67
+ type: Boolean,
68
+ default: !1
69
+ },
70
+ collapsed: {
71
+ type: Boolean
72
+ },
73
+ collapsibleIconRender: {},
61
74
  boxShadow: {
62
75
  type: Boolean,
63
76
  default: !1
64
77
  }
65
- },
66
- setup(_) {
67
- const e = _, l = ot(), {
78
+ }, {
79
+ collapsed: {
80
+ type: Boolean,
81
+ default: void 0
82
+ },
83
+ collapsedModifiers: {}
84
+ }),
85
+ emits: ["update:collapsed"],
86
+ setup(M) {
87
+ const t = M, r = ie(), b = R(t.defaultCollapsed), O = se(M, "collapsed");
88
+ de(() => O.value, (e) => {
89
+ e !== void 0 && (b.value = e);
90
+ }, {
91
+ immediate: !0
92
+ });
93
+ const Q = () => {
94
+ b.value = !b.value;
95
+ }, {
68
96
  b: c
69
- } = ct("pro-card"), D = ft("uiMode"), I = d(() => dt(D.value)), C = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], y = ut(), k = (t, r) => t ? r : {}, F = (t) => {
70
- const r = [0, 0];
71
- return (Array.isArray(t) ? t : [t, 0]).forEach((a, o) => {
72
- if (typeof a == "object")
73
- for (let i = 0; i < C.length; i += 1) {
74
- const f = C[i];
97
+ } = he("pro-card"), T = Ce("uiMode"), q = d(() => be(T.value)), B = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], g = ge(), w = (e, o) => e ? o : {}, J = (e) => {
98
+ const o = [0, 0];
99
+ return (Array.isArray(e) ? e : [e, 0]).forEach((n, l) => {
100
+ if (typeof n == "object")
101
+ for (let s = 0; s < B.length; s += 1) {
102
+ const f = B[s];
75
103
  if ({
76
104
  lg: !0,
77
105
  md: !0,
@@ -80,20 +108,20 @@ const St = /* @__PURE__ */ et({
80
108
  xs: !1,
81
109
  xxl: !1,
82
110
  xxxl: !1,
83
- ...y == null ? void 0 : y.value
84
- }[f] && a[f] !== void 0) {
85
- r[o] = a[f];
111
+ ...g == null ? void 0 : g.value
112
+ }[f] && n[f] !== void 0) {
113
+ o[l] = n[f];
86
114
  break;
87
115
  }
88
116
  }
89
117
  else
90
- r[o] = a || 0;
91
- }), r;
92
- }, H = (t) => {
93
- let r = t;
94
- if (typeof t == "object")
95
- for (let a = 0; a < C.length; a += 1) {
96
- const o = C[a], i = {
118
+ o[l] = n || 0;
119
+ }), o;
120
+ }, K = (e) => {
121
+ let o = e;
122
+ if (typeof e == "object")
123
+ for (let n = 0; n < B.length; n += 1) {
124
+ const l = B[n], s = {
97
125
  lg: !0,
98
126
  md: !0,
99
127
  sm: !0,
@@ -101,33 +129,33 @@ const St = /* @__PURE__ */ et({
101
129
  xs: !1,
102
130
  xxl: !1,
103
131
  xxxl: !1,
104
- ...y == null ? void 0 : y.value
132
+ ...g == null ? void 0 : g.value
105
133
  };
106
- if (i != null && i[o] && (t == null ? void 0 : t[o]) !== void 0) {
107
- r = t[o];
134
+ if (s != null && s[l] && (e == null ? void 0 : e[l]) !== void 0) {
135
+ o = e[l];
108
136
  break;
109
137
  }
110
138
  }
111
- const n = k(typeof r == "string" && /\d%|\dpx/i.test(r), {
112
- width: r,
139
+ const a = w(typeof o == "string" && /\d%|\dpx/i.test(o), {
140
+ width: o,
113
141
  flexShrink: 0
114
142
  });
115
143
  return {
116
- span: r,
117
- colSpanStyle: n
144
+ span: o,
145
+ colSpanStyle: a
118
146
  };
119
- }, Q = d(() => F(e.gutter)), N = rt(!1), E = (t) => {
120
- N.value = t;
121
- }, T = d(() => {
122
- var t;
123
- return u(x, null, [e.title || ((t = l.title) == null ? void 0 : t.call(l))]);
124
- }), q = d(() => u(x, null, [e.tooltip])), J = d(() => {
125
- var t;
126
- return u(x, null, [e.extra || ((t = l.extra) == null ? void 0 : t.call(l))]);
127
- }), K = d(() => {
128
- var t;
129
- return u(x, null, [e.actions || ((t = l.actions) == null ? void 0 : t.call(l))]);
130
- }), L = d(() => e.loading === !0 ? u(at, {
147
+ }, L = d(() => J(t.gutter)), N = R(!1), G = (e) => {
148
+ N.value = e;
149
+ }, U = d(() => {
150
+ var e;
151
+ return u(y, null, [t.title || ((e = r.title) == null ? void 0 : e.call(r))]);
152
+ }), W = d(() => u(y, null, [t.tooltip])), X = d(() => {
153
+ var e;
154
+ return u(y, null, [t.extra || ((e = r.extra) == null ? void 0 : e.call(r))]);
155
+ }), Y = d(() => {
156
+ var e;
157
+ return u(y, null, [t.actions || ((e = r.actions) == null ? void 0 : e.call(r))]);
158
+ }), Z = d(() => t.loading === !0 ? u(pe, {
131
159
  style: {
132
160
  width: "100%",
133
161
  height: "100%",
@@ -135,102 +163,116 @@ const St = /* @__PURE__ */ et({
135
163
  alignItems: "center",
136
164
  justifyContent: "center"
137
165
  }
138
- }, null) : u(x, null, [e.loading])), O = (t, r = []) => {
139
- if ((t == null ? void 0 : t.type) === Symbol.for("v-fgt")) {
140
- const n = Array.isArray(t == null ? void 0 : t.children) ? t == null ? void 0 : t.children : [t == null ? void 0 : t.children];
141
- if (n != null && n.length)
142
- for (let a = 0; a < n.length; a++)
143
- n != null && n[a] && O(n == null ? void 0 : n[a], r);
166
+ }, null) : u(y, null, [t.loading])), C = d(() => {
167
+ var e;
168
+ if (t.collapsible && O.value === void 0)
169
+ return t.collapsibleIconRender ? (e = t.collapsibleIconRender) == null ? void 0 : e.call(t, {
170
+ collapsed: b.value
171
+ }) : u(y, null, [u(xe, {
172
+ class: c("collapsible-icon"),
173
+ style: {
174
+ transform: b.value ? "rotate(-90deg)" : "rotate(0deg)"
175
+ }
176
+ }, null)]);
177
+ }), P = (e, o = []) => {
178
+ if ((e == null ? void 0 : e.type) === Symbol.for("v-fgt")) {
179
+ const a = Array.isArray(e == null ? void 0 : e.children) ? e == null ? void 0 : e.children : [e == null ? void 0 : e.children];
180
+ if (a != null && a.length)
181
+ for (let n = 0; n < a.length; n++)
182
+ a != null && a[n] && P(a == null ? void 0 : a[n], o);
144
183
  } else
145
- t && r.push(t);
146
- return r;
147
- }, R = () => {
148
- var r, n, a;
149
- const t = (r = l.default) == null ? void 0 : r.call(l);
150
- return E(!1), u(x, null, [(a = (n = t == null ? void 0 : t.reduce((o, i) => {
151
- const f = O(i);
152
- return [...o, ...f];
153
- }, [])) == null ? void 0 : n.filter((o) => o.type !== Symbol.for("v-cmt"))) == null ? void 0 : a.map((o, i, f) => {
154
- var z, G, P;
155
- if (o && typeof o == "object" && "type" in o && ((z = o.type) == null ? void 0 : z.isProCard) === !0) {
156
- E(!0);
157
- const Y = ((G = o == null ? void 0 : o.props) == null ? void 0 : G.colSpan) || ((P = o == null ? void 0 : o.props) == null ? void 0 : P["col-span"]) || {}, {
184
+ e && o.push(e);
185
+ return o;
186
+ }, _ = () => {
187
+ var o, a, n;
188
+ const e = (o = r.default) == null ? void 0 : o.call(r);
189
+ return G(!1), u(y, null, [(n = (a = e == null ? void 0 : e.reduce((l, s) => {
190
+ const f = P(s);
191
+ return [...l, ...f];
192
+ }, [])) == null ? void 0 : a.filter((l) => l.type !== Symbol.for("v-cmt"))) == null ? void 0 : n.map((l, s, f) => {
193
+ var z, V, D;
194
+ if (l && typeof l == "object" && "type" in l && ((z = l.type) == null ? void 0 : z.isProCard) === !0) {
195
+ G(!0);
196
+ const oe = ((V = l == null ? void 0 : l.props) == null ? void 0 : V.colSpan) || ((D = l == null ? void 0 : l.props) == null ? void 0 : D["col-span"]) || {}, {
158
197
  span: S,
159
- colSpanStyle: Z
160
- } = H(Y), B = c("col"), tt = m(`${B}`, [typeof S == "number" && S >= 0 && S <= 24 ? `${B}-span-${S}` : void 0, e.split === "horizontal" && i !== f.length - 1 ? `${B}-split-horizontal` : void 0, e.split === "vertical" && i !== f.length - 1 ? `${B}-split-vertical` : void 0].filter(Boolean)), [A, j] = Q.value;
198
+ colSpanStyle: re
199
+ } = K(oe), k = c("col"), ae = A(`${k}`, [typeof S == "number" && S >= 0 && S <= 24 ? `${k}-span-${S}` : void 0, t.split === "horizontal" && s !== f.length - 1 ? `${k}-split-horizontal` : void 0, t.split === "vertical" && s !== f.length - 1 ? `${k}-split-vertical` : void 0].filter(Boolean)), [j, E] = L.value;
161
200
  return u("div", {
162
- class: tt,
201
+ class: ae,
163
202
  style: {
164
- ...Z,
165
- ...k(A > 0, {
166
- paddingInlineStart: `${A / 2}px`,
167
- paddingInlineEnd: `${A / 2}px`
203
+ ...re,
204
+ ...w(j > 0, {
205
+ paddingInlineStart: `${j / 2}px`,
206
+ paddingInlineEnd: `${j / 2}px`
168
207
  }),
169
- ...k(j > 0, {
170
- paddingBlockStart: `${j / 2}px`,
171
- paddingBlockEnd: `${j / 2}px`
208
+ ...w(E > 0, {
209
+ paddingBlockStart: `${E / 2}px`,
210
+ paddingBlockEnd: `${E / 2}px`
172
211
  }),
173
- ...e.colStyle
212
+ ...t.colStyle
174
213
  }
175
- }, [o]);
214
+ }, [l]);
176
215
  }
177
- return o;
216
+ return l;
178
217
  })]);
179
- }, U = d(() => {
180
- const t = c();
181
- return m(`${t}`, [e.bordered ? `${t}-border` : void 0, e.boxShadow ? `${t}-box-shadow` : void 0, N.value ? `${t}-contain-card` : void 0, e.loading ? `${t}-loading` : void 0, e.split === "vertical" || e.split === "horizontal" ? `${t}-split` : void 0, e.ghost ? `${t}-ghost` : void 0, e.hoverable ? `${t}-hoverable` : void 0, e.type ? `${t}-type-${e.type}` : void 0].filter(Boolean));
182
- }), W = d(() => {
183
- const t = c("header");
184
- return m(`${t}`, [e.headerBordered || e.type === "inner" ? `${t}-border` : void 0].filter(Boolean));
185
- }), X = d(() => {
186
- const t = c("body");
187
- return m(`${t}`, [e.layout === "center" ? `${t}-center` : void 0, e.split === "horizontal" || e.direction === "column" ? `${t}-direction-column` : void 0, e.wrap && N.value ? `${t}-wrap` : void 0].filter(Boolean));
218
+ }, ee = d(() => {
219
+ const e = c();
220
+ return A(`${e}`, [t.bordered ? `${e}-border` : void 0, t.boxShadow ? `${e}-box-shadow` : void 0, N.value ? `${e}-contain-card` : void 0, t.loading ? `${e}-loading` : void 0, t.split === "vertical" || t.split === "horizontal" ? `${e}-split` : void 0, t.ghost ? `${e}-ghost` : void 0, t.hoverable ? `${e}-hoverable` : void 0, t.type ? `${e}-type-${t.type}` : void 0, b.value ? `${e}-collapsed` : void 0].filter(Boolean));
221
+ }), te = d(() => {
222
+ const e = c("header");
223
+ return A(`${e}`, [t.headerBordered || t.type === "inner" ? `${e}-border` : void 0, C.value ? `${e}-collapsible` : void 0].filter(Boolean));
224
+ }), le = d(() => {
225
+ const e = c("body");
226
+ return A(`${e}`, [t.layout === "center" ? `${e}-center` : void 0, t.split === "horizontal" || t.direction === "column" ? `${e}-direction-column` : void 0, t.wrap && N.value ? `${e}-wrap` : void 0].filter(Boolean));
188
227
  });
189
- return (t, r) => (s(), v("div", lt({
190
- class: U.value,
228
+ return (e, o) => (i(), m("div", ue({
229
+ class: ee.value,
191
230
  style: {
192
- ...I.value
231
+ ...q.value
193
232
  }
194
233
  }, {
195
- ...t.$attrs
196
- }), [e.title || l.title || e.extra || l.extra ? (s(), v("div", {
234
+ ...e.$attrs
235
+ }), [t.title || r.title || t.extra || r.extra || C.value ? (i(), m("div", {
197
236
  key: 0,
198
- class: g(W.value),
199
- style: w({
200
- ...e.headStyle
237
+ class: x(te.value),
238
+ style: I({
239
+ ...t.headStyle
240
+ }),
241
+ onClick: o[0] || (o[0] = () => {
242
+ C.value && Q();
201
243
  })
202
- }, [e.title || l.title ? (s(), v("div", {
244
+ }, [t.title || r.title || C.value ? (i(), m("div", {
203
245
  key: 0,
204
- class: g(h(c)("header-title"))
205
- }, [V(t.$slots, "title", {}, () => [(s(), p(b(T.value)))]), e.tooltip ? (s(), p(h(it), {
246
+ class: x(h(c)("header-title"))
247
+ }, [(i(), p(v(C.value))), F(e.$slots, "title", {}, () => [(i(), p(v(U.value)))]), t.tooltip ? (i(), p(h(ye), {
206
248
  key: 0
207
249
  }, {
208
- title: M(() => [(s(), p(b(q.value)))]),
209
- default: M(() => [u(h(st), {
210
- class: g(h(c)("header-title-tooltip"))
250
+ title: H(() => [(i(), p(v(W.value)))]),
251
+ default: H(() => [u(h(ve), {
252
+ class: x(h(c)("header-title-tooltip"))
211
253
  }, null, 8, ["class"])]),
212
254
  _: 1
213
- })) : $("", !0)], 2)) : $("", !0), e.extra || l.extra ? (s(), v("div", {
255
+ })) : $("", !0)], 2)) : $("", !0), t.extra || r.extra ? (i(), m("div", {
214
256
  key: 1,
215
- class: g(h(c)("header-extra"))
216
- }, [V(t.$slots, "extra", {}, () => [(s(), p(b(J.value)))])], 2)) : $("", !0)], 6)) : $("", !0), nt("div", {
217
- class: g(X.value),
218
- style: w({
219
- ...e.bodyStyle
257
+ class: x(h(c)("header-extra"))
258
+ }, [F(e.$slots, "extra", {}, () => [(i(), p(v(X.value)))])], 2)) : $("", !0)], 6)) : $("", !0), ce("div", {
259
+ class: x(le.value),
260
+ style: I({
261
+ ...t.bodyStyle
220
262
  })
221
- }, [e.loading ? (s(), p(b(L.value), {
263
+ }, [t.loading ? (i(), p(v(Z.value), {
222
264
  key: 0
223
- })) : (s(), p(b(R()), {
265
+ })) : (i(), p(v(_()), {
224
266
  key: 1
225
- }))], 6), e.actions || l.actions ? (s(), v("div", {
267
+ }))], 6), t.actions || r.actions ? (i(), m("div", {
226
268
  key: 1,
227
- class: g(h(c)("actions")),
228
- style: w({
229
- ...e.actionsStyle
269
+ class: x(h(c)("actions")),
270
+ style: I({
271
+ ...t.actionsStyle
230
272
  })
231
- }, [(s(), p(b(K.value)))], 6)) : $("", !0)], 16));
273
+ }, [(i(), p(v(Y.value)))], 6)) : $("", !0)], 16));
232
274
  }
233
275
  });
234
276
  export {
235
- St as default
277
+ Ee as default
236
278
  };
@@ -1,14 +1,24 @@
1
1
  import { ApStatisticCardProps, ApProCardSolts } from '../../interface';
2
- import { VNodeChild, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { VNodeChild, VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare function __VLS_template(): {
4
4
  attrs: Partial<{}>;
5
5
  slots: Readonly< ApProCardSolts & {
6
6
  chart?: () => VNodeChild;
7
7
  footer?: () => VNodeChild;
8
+ statisticTitle?: () => VNode[];
9
+ prefix?: () => VNode[];
10
+ suffix?: () => VNode[];
11
+ icon?: () => VNode[];
12
+ tip?: () => VNode[];
8
13
  description?: () => VNodeChild;
9
14
  }> & ApProCardSolts & {
10
15
  chart?: () => VNodeChild;
11
16
  footer?: () => VNodeChild;
17
+ statisticTitle?: () => VNode[];
18
+ prefix?: () => VNode[];
19
+ suffix?: () => VNode[];
20
+ icon?: () => VNode[];
21
+ tip?: () => VNode[];
12
22
  description?: () => VNodeChild;
13
23
  };
14
24
  refs: {};