@aplus-frontend/ui 6.22.0-beta.0 → 6.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/es/index.mjs +164 -161
  2. package/es/src/ag-grid/components/header-cell/index.vue2.mjs +42 -36
  3. package/es/src/ag-grid/context.d.ts +18 -0
  4. package/es/src/ag-grid/context.mjs +17 -0
  5. package/es/src/ag-grid/index.vue.d.ts +4 -2
  6. package/es/src/ag-grid/index.vue.mjs +337 -201
  7. package/es/src/ag-grid/interface.d.ts +109 -3
  8. package/es/src/ag-grid/theme.d.ts +3 -0
  9. package/es/src/ag-grid/theme.mjs +25 -0
  10. package/es/src/ap-field/number/index.vue.mjs +25 -25
  11. package/es/src/ap-grid/utils/col.d.ts +1 -1
  12. package/es/src/ap-grid/utils/col.mjs +29 -29
  13. package/es/src/ap-pro-card/components/card/index.vue2.mjs +108 -98
  14. package/es/src/ap-pro-card/components/divider/index.vue.d.ts +13 -0
  15. package/es/src/ap-pro-card/components/divider/index.vue.mjs +4 -0
  16. package/es/src/ap-pro-card/components/divider/index.vue2.mjs +29 -0
  17. package/es/src/ap-pro-card/components/operation/index.vue.d.ts +18 -0
  18. package/es/src/ap-pro-card/components/operation/index.vue.mjs +4 -0
  19. package/es/src/ap-pro-card/components/operation/index.vue2.mjs +20 -0
  20. package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +51 -0
  21. package/es/src/ap-pro-card/components/statistic/index.vue.mjs +4 -0
  22. package/es/src/ap-pro-card/components/statistic/index.vue2.mjs +134 -0
  23. package/es/src/ap-pro-card/components/statistic-card/index.vue.d.ts +25 -0
  24. package/es/src/ap-pro-card/components/statistic-card/index.vue.mjs +4 -0
  25. package/es/src/ap-pro-card/components/statistic-card/index.vue2.mjs +116 -0
  26. package/es/src/ap-pro-card/components/title/index.vue.d.ts +23 -0
  27. package/es/src/ap-pro-card/components/title/index.vue.mjs +4 -0
  28. package/es/src/ap-pro-card/components/title/index.vue2.mjs +28 -0
  29. package/es/src/ap-pro-card/index.d.ts +20 -42
  30. package/es/src/ap-pro-card/index.mjs +22 -4
  31. package/es/src/ap-pro-card/interface.d.ts +66 -2
  32. package/es/src/ap-tag/ap-tag-group.vue.mjs +42 -42
  33. package/es/src/business/ap-label/group/ApLabelGroup.mjs +17 -15
  34. package/es/src/business/hooks/index.d.ts +1 -0
  35. package/es/src/business/hooks/index.mjs +8 -6
  36. package/es/src/business/hooks/usePageListAgGrid.d.ts +37 -0
  37. package/es/src/business/hooks/usePageListAgGrid.mjs +88 -0
  38. package/es/src/index.mjs +277 -274
  39. package/es/src/version.d.ts +1 -1
  40. package/es/src/version.mjs +1 -1
  41. package/lib/index.js +1 -1
  42. package/lib/src/ag-grid/components/header-cell/index.vue2.js +1 -1
  43. package/lib/src/ag-grid/context.d.ts +18 -0
  44. package/lib/src/ag-grid/context.js +1 -0
  45. package/lib/src/ag-grid/index.vue.d.ts +4 -2
  46. package/lib/src/ag-grid/index.vue.js +1 -1
  47. package/lib/src/ag-grid/interface.d.ts +109 -3
  48. package/lib/src/ag-grid/theme.d.ts +3 -0
  49. package/lib/src/ag-grid/theme.js +1 -0
  50. package/lib/src/ap-field/number/index.vue.js +1 -1
  51. package/lib/src/ap-grid/utils/col.d.ts +1 -1
  52. package/lib/src/ap-grid/utils/col.js +1 -1
  53. package/lib/src/ap-pro-card/components/card/index.vue2.js +1 -1
  54. package/lib/src/ap-pro-card/components/divider/index.vue.d.ts +13 -0
  55. package/lib/src/ap-pro-card/components/divider/index.vue.js +1 -0
  56. package/lib/src/ap-pro-card/components/divider/index.vue2.js +1 -0
  57. package/lib/src/ap-pro-card/components/operation/index.vue.d.ts +18 -0
  58. package/lib/src/ap-pro-card/components/operation/index.vue.js +1 -0
  59. package/lib/src/ap-pro-card/components/operation/index.vue2.js +1 -0
  60. package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +51 -0
  61. package/lib/src/ap-pro-card/components/statistic/index.vue.js +1 -0
  62. package/lib/src/ap-pro-card/components/statistic/index.vue2.js +1 -0
  63. package/lib/src/ap-pro-card/components/statistic-card/index.vue.d.ts +25 -0
  64. package/lib/src/ap-pro-card/components/statistic-card/index.vue.js +1 -0
  65. package/lib/src/ap-pro-card/components/statistic-card/index.vue2.js +1 -0
  66. package/lib/src/ap-pro-card/components/title/index.vue.d.ts +23 -0
  67. package/lib/src/ap-pro-card/components/title/index.vue.js +1 -0
  68. package/lib/src/ap-pro-card/components/title/index.vue2.js +1 -0
  69. package/lib/src/ap-pro-card/index.d.ts +20 -42
  70. package/lib/src/ap-pro-card/index.js +1 -1
  71. package/lib/src/ap-pro-card/interface.d.ts +66 -2
  72. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  73. package/lib/src/business/ap-label/group/ApLabelGroup.js +1 -1
  74. package/lib/src/business/hooks/index.d.ts +1 -0
  75. package/lib/src/business/hooks/index.js +1 -1
  76. package/lib/src/business/hooks/usePageListAgGrid.d.ts +37 -0
  77. package/lib/src/business/hooks/usePageListAgGrid.js +1 -0
  78. package/lib/src/index.js +1 -1
  79. package/lib/src/version.d.ts +1 -1
  80. package/lib/src/version.js +1 -1
  81. package/package.json +1 -1
  82. package/theme/ag-grid/index.css +470 -0
  83. package/theme/ag-grid/index.less +27 -0
  84. package/theme/ap-button/ap-button.css +1 -1
  85. package/theme/ap-button/ap-button.less +1 -1
  86. package/theme/ap-pro-card/index.css +199 -0
  87. package/theme/ap-pro-card/index.less +203 -0
  88. package/theme/ap-tag/ap-tag.css +1 -1
  89. package/theme/ap-tag/ap-tag.less +1 -1
  90. package/theme/index.css +220 -2
@@ -0,0 +1,116 @@
1
+ import { defineComponent as _, useSlots as $, computed as o, createVNode as n, mergeProps as f, createBlock as u, openBlock as d, createSlots as A, withCtx as y, createCommentVNode as h, renderSlot as v, resolveDynamicComponent as b, renderList as j, unref as P } from "vue";
2
+ import "../../../config-provider/index.mjs";
3
+ import "../card/index.vue.mjs";
4
+ import "../statistic/index.vue.mjs";
5
+ import { mergeClass as B } from "../../../editable-table/utils.mjs";
6
+ import { omit as x } from "lodash-unified";
7
+ import { useNamespace as D } from "../../../config-provider/hooks/use-namespace.mjs";
8
+ import k from "../statistic/index.vue2.mjs";
9
+ import M from "../card/index.vue2.mjs";
10
+ const J = /* @__PURE__ */ _({
11
+ name: "ApStatisticCard",
12
+ __name: "index",
13
+ props: {
14
+ headStyle: {},
15
+ bodyStyle: {},
16
+ actionsStyle: {},
17
+ headerBordered: {
18
+ type: Boolean
19
+ },
20
+ title: {
21
+ type: [Object, String, Number, Boolean, null, Array]
22
+ },
23
+ tooltip: {
24
+ type: [Object, String, Number, Boolean, null, Array]
25
+ },
26
+ extra: {
27
+ type: [Object, String, Number, Boolean, null, Array]
28
+ },
29
+ layout: {},
30
+ type: {},
31
+ direction: {},
32
+ wrap: {
33
+ type: Boolean
34
+ },
35
+ loading: {
36
+ type: [Boolean, Object, String, Number, null, Array]
37
+ },
38
+ colSpan: {},
39
+ colStyle: {},
40
+ gutter: {},
41
+ actions: {
42
+ type: [Object, String, Number, Boolean, null, Array]
43
+ },
44
+ split: {},
45
+ bordered: {
46
+ type: Boolean
47
+ },
48
+ hoverable: {
49
+ type: Boolean
50
+ },
51
+ ghost: {
52
+ type: Boolean
53
+ },
54
+ boxShadow: {
55
+ type: Boolean
56
+ },
57
+ chart: {
58
+ type: [Object, String, Number, Boolean, null, Array]
59
+ },
60
+ statistic: {},
61
+ chartPlacement: {},
62
+ footer: {
63
+ type: [Object, String, Number, Boolean, null, Array]
64
+ }
65
+ },
66
+ setup(S) {
67
+ const t = S, r = $(), {
68
+ b: a
69
+ } = D("statistic-card"), g = o(() => a()), C = o(() => {
70
+ const e = a("chart");
71
+ return B(`${e}`, [t.chartPlacement === "left" ? `${e}-left` : void 0, t.chartPlacement === "right" ? `${e}-right` : void 0].filter(Boolean));
72
+ }), p = o(() => {
73
+ const e = a("content");
74
+ return B(`${e}`, [t.chartPlacement === "left" || t.chartPlacement === "right" ? `${e}-horizontal` : void 0].filter(Boolean));
75
+ }), O = o(() => a("footer")), l = o(() => {
76
+ var e, s;
77
+ return t.statistic ? n(k, f({
78
+ layout: "vertical"
79
+ }, t.statistic, {
80
+ description: ((e = t.statistic) == null ? void 0 : e.description) || ((s = r.description) == null ? void 0 : s.call(r))
81
+ }), null) : void 0;
82
+ }), c = o(() => {
83
+ var e;
84
+ return t.chart || r.chart ? n("div", {
85
+ class: C.value
86
+ }, [t.chart || ((e = r.chart) == null ? void 0 : e.call(r))]) : void 0;
87
+ }), i = o(() => c.value || l.value ? t.chartPlacement === "left" ? n("div", {
88
+ class: p.value
89
+ }, [c.value, l.value]) : n("div", {
90
+ class: p.value
91
+ }, [l.value, c.value]) : void 0), N = o(() => {
92
+ var e;
93
+ return t.footer || r.footer ? n("div", {
94
+ class: O.value
95
+ }, [t.footer || ((e = r.footer) == null ? void 0 : e.call(r))]) : void 0;
96
+ });
97
+ return (e, s) => (d(), u(M, f({
98
+ class: g.value
99
+ }, {
100
+ ...t
101
+ }), A({
102
+ default: y(() => [i.value ? (d(), u(b(i.value), {
103
+ key: 0
104
+ })) : h("", !0), v(e.$slots, "default"), i.value ? (d(), u(b(N.value), {
105
+ key: 1
106
+ })) : h("", !0)]),
107
+ _: 2
108
+ }, [j(P(x)(r, ["chart", "footer", "description", "default"]), (w, m) => ({
109
+ name: m,
110
+ fn: y(() => [v(e.$slots, m)])
111
+ }))]), 1040, ["class"]));
112
+ }
113
+ });
114
+ export {
115
+ J as default
116
+ };
@@ -0,0 +1,23 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ type?: 'default';
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: HTMLDivElement;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
15
+ type: "default";
16
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
17
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
+ export default _default;
19
+ type __VLS_WithTemplateSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,28 @@
1
+ import { defineComponent as a, computed as s, createElementBlock as p, openBlock as i, normalizeClass as u, renderSlot as d } from "vue";
2
+ import "../../../config-provider/index.mjs";
3
+ import { mergeClass as m } from "../../../editable-table/utils.mjs";
4
+ import { useNamespace as c } from "../../../config-provider/hooks/use-namespace.mjs";
5
+ import { useGlobalConfig as f } from "../../../config-provider/hooks/use-global-config.mjs";
6
+ const B = /* @__PURE__ */ a({
7
+ name: "ApProCardTitle",
8
+ __name: "index",
9
+ props: {
10
+ type: {
11
+ default: "default"
12
+ }
13
+ },
14
+ setup(r) {
15
+ const {
16
+ b: l
17
+ } = c("pro-card-title"), o = f("uiMode"), t = r, n = s(() => {
18
+ const e = l();
19
+ return m(`${e}`, [t.type ? `${e}-${t.type}` : void 0, o.value ? `${e}-${t.type ?? "default"}-${o.value}` : void 0].filter(Boolean));
20
+ });
21
+ return (e, C) => (i(), p("div", {
22
+ class: u(n.value)
23
+ }, [d(e.$slots, "default")], 2));
24
+ }
25
+ });
26
+ export {
27
+ B as default
28
+ };
@@ -1,42 +1,20 @@
1
- import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
2
- import { ApProCardProps, ApProCardGutter, ApProCardSolts } from './interface';
3
- declare const ApProCard: {
4
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApProCardProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
5
- wrap: boolean;
6
- boxShadow: boolean;
7
- gutter: ApProCardGutter | ApProCardGutter[];
8
- ghost: boolean;
9
- bordered: boolean;
10
- headerBordered: boolean;
11
- hoverable: boolean;
12
- }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
13
- P: {};
14
- B: {};
15
- D: {};
16
- C: {};
17
- M: {};
18
- Defaults: {};
19
- }, Readonly< ApProCardProps> & Readonly<{}>, {}, {}, {}, {}, {
20
- wrap: boolean;
21
- boxShadow: boolean;
22
- gutter: ApProCardGutter | ApProCardGutter[];
23
- ghost: boolean;
24
- bordered: boolean;
25
- headerBordered: boolean;
26
- hoverable: boolean;
27
- }>;
28
- __isFragment?: never;
29
- __isTeleport?: never;
30
- __isSuspense?: never;
31
- } & ComponentOptionsBase<Readonly< ApProCardProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
32
- wrap: boolean;
33
- boxShadow: boolean;
34
- gutter: ApProCardGutter | ApProCardGutter[];
35
- ghost: boolean;
36
- bordered: boolean;
37
- headerBordered: boolean;
38
- hoverable: boolean;
39
- }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
40
- $slots: Readonly< ApProCardSolts> & ApProCardSolts;
41
- });
42
- export { ApProCard };
1
+ import { default as Card } from './components/card/index.vue';
2
+ import { default as Divider } from './components/divider/index.vue';
3
+ import { default as Title } from './components/title/index.vue';
4
+ import { default as Statistic } from './components/statistic/index.vue';
5
+ import { default as StatisticCard } from './components/statistic-card/index.vue';
6
+ import { default as Operation } from './components/operation/index.vue';
7
+ export type ApProCardType = typeof Card & {
8
+ isProCard: boolean;
9
+ Divider: typeof Divider;
10
+ Title: typeof Title;
11
+ };
12
+ export type ApStatisticCardType = typeof StatisticCard & {
13
+ isProCard: boolean;
14
+ Divider: typeof Divider;
15
+ Statistic: typeof Statistic;
16
+ Operation: typeof Operation;
17
+ };
18
+ declare const ApProCard: ApProCardType;
19
+ declare const ApStatisticCard: ApStatisticCardType;
20
+ export { ApProCard, ApStatisticCard };
@@ -1,7 +1,25 @@
1
1
  import "./components/card/index.vue.mjs";
2
- import r from "./components/card/index.vue2.mjs";
3
- const o = r;
4
- o.isProCard = !0;
2
+ import "./components/divider/index.vue.mjs";
3
+ import "./components/title/index.vue.mjs";
4
+ import "./components/statistic/index.vue.mjs";
5
+ import "./components/statistic-card/index.vue.mjs";
6
+ import "./components/operation/index.vue.mjs";
7
+ import t from "./components/card/index.vue2.mjs";
8
+ import o from "./components/divider/index.vue2.mjs";
9
+ import m from "./components/title/index.vue2.mjs";
10
+ import p from "./components/statistic-card/index.vue2.mjs";
11
+ import a from "./components/statistic/index.vue2.mjs";
12
+ import f from "./components/operation/index.vue2.mjs";
13
+ const i = t;
14
+ i.isProCard = !0;
15
+ i.Divider = o;
16
+ i.Title = m;
17
+ const r = p;
18
+ r.isProCard = !0;
19
+ r.Divider = o;
20
+ r.Statistic = a;
21
+ r.Operation = f;
5
22
  export {
6
- o as ApProCard
23
+ i as ApProCard,
24
+ r as ApStatisticCard
7
25
  };
@@ -1,4 +1,5 @@
1
- import { CSSProperties, VNodeChild } from 'vue';
1
+ import { BadgeProps, StatisticProps } from '@aplus-frontend/antdv';
2
+ import { CSSProperties, VNode, VNodeChild } from 'vue';
2
3
  export type ApProCardBreakpoint = 'xxxl' | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
3
4
  export type ApProCardGutter = number | Partial<Record<ApProCardBreakpoint, number>>;
4
5
  export type ApProCardColSpanType = number | string;
@@ -51,7 +52,7 @@ export interface ApProCardProps {
51
52
  }
52
53
  export type ApProCardSolts = {
53
54
  /** 内容区 */
54
- default?: () => VNodeChild;
55
+ default?: () => VNode[];
55
56
  /** 标题 */
56
57
  title?: () => VNodeChild;
57
58
  /** 右上角自定义区域 */
@@ -59,3 +60,66 @@ export type ApProCardSolts = {
59
60
  /** 卡片操作组,位置在卡片底部 */
60
61
  actions?: () => VNodeChild;
61
62
  };
63
+ export type ApProCardStatisticProps = StatisticProps & {
64
+ /** 描述性标签 */
65
+ description?: VNodeChild;
66
+ /** 标题提示 */
67
+ tip?: VNodeChild;
68
+ status?: BadgeProps['status'];
69
+ /** Icon 图标 */
70
+ icon?: VNodeChild;
71
+ /** Layout 布局 */
72
+ layout?: 'horizontal' | 'vertical' | 'inline';
73
+ /** 趋势 */
74
+ trend?: 'up' | 'down';
75
+ };
76
+ export type ApProCardStatisticSolts = {
77
+ /**
78
+ * 数值的标题
79
+ */
80
+ title?: () => VNode[];
81
+ /**
82
+ * 设置数值的前缀
83
+ */
84
+ prefix?: () => VNode[];
85
+ /**
86
+ * 设置数值的后缀
87
+ */
88
+ suffix?: () => VNode[];
89
+ /**
90
+ * 图标
91
+ */
92
+ icon?: () => VNode[];
93
+ /**
94
+ * 标题提示
95
+ */
96
+ tip?: () => VNode[];
97
+ /**
98
+ * 描述性标签
99
+ */
100
+ description?: () => VNode[];
101
+ };
102
+ export type ApStatisticCardProps = ApProCardProps & {
103
+ /** 图表配置 */
104
+ chart?: VNodeChild;
105
+ /** 数值统计配置 */
106
+ statistic?: ApProCardStatisticProps;
107
+ /** Chart 相对于 statistic 的位置 */
108
+ chartPlacement?: 'right' | 'bottom' | 'left';
109
+ /** 底部额外展示区域 */
110
+ footer?: VNodeChild;
111
+ };
112
+ export type ApStatisticCardSolts = ApProCardSolts & {
113
+ /**
114
+ * 图表配置
115
+ */
116
+ chart?: () => VNodeChild;
117
+ /**
118
+ * 额外指标展示
119
+ */
120
+ footer?: () => VNodeChild;
121
+ /**
122
+ * 描述性标签
123
+ */
124
+ description?: () => VNodeChild;
125
+ };
@@ -1,17 +1,17 @@
1
- import { defineComponent as G, ref as C, computed as n, unref as f, watch as L, nextTick as A, onMounted as F, onUnmounted as I, createBlock as d, openBlock as a, mergeProps as b, withCtx as g, createElementVNode as t, normalizeStyle as w, normalizeClass as k, createElementBlock as _, createCommentVNode as U, Fragment as q, renderList as H, toDisplayString as W, renderSlot as J, createTextVNode as K } from "vue";
2
- import { Tooltip as O } from "@aplus-frontend/antdv";
3
- import Q from "@ant-design/icons-vue";
1
+ import { defineComponent as S, ref as C, computed as n, unref as f, watch as j, nextTick as G, onMounted as L, onUnmounted as A, createBlock as g, openBlock as a, mergeProps as w, withCtx as d, createElementVNode as t, normalizeStyle as b, normalizeClass as k, createElementBlock as _, createCommentVNode as F, Fragment as I, renderList as U, toDisplayString as W, renderSlot as q, createTextVNode as H } from "vue";
2
+ import { Tooltip as J } from "@aplus-frontend/antdv";
3
+ import K from "@ant-design/icons-vue";
4
4
  import "./ap-tag.vue2.mjs";
5
5
  import "../config-provider/index.mjs";
6
- import { omit as X } from "lodash-unified";
6
+ import { omit as O } from "lodash-unified";
7
7
  import { getTextWidth as T } from "./utils.mjs";
8
8
  import "../hooks/index.mjs";
9
- import { useLocale as Y } from "../config-provider/hooks/use-locale.mjs";
10
- import { useGlobalConfig as Z } from "../config-provider/hooks/use-global-config.mjs";
11
- import { useNamespace as ee } from "../config-provider/hooks/use-namespace.mjs";
12
- import { useResize as te } from "../hooks/useResize.mjs";
13
- import le from "./ap-tag.vue.mjs";
14
- const ve = /* @__PURE__ */ G({
9
+ import { useLocale as Q } from "../config-provider/hooks/use-locale.mjs";
10
+ import { useGlobalConfig as X } from "../config-provider/hooks/use-global-config.mjs";
11
+ import { useNamespace as Y } from "../config-provider/hooks/use-namespace.mjs";
12
+ import { useResize as Z } from "../hooks/useResize.mjs";
13
+ import ee from "./ap-tag.vue.mjs";
14
+ const de = /* @__PURE__ */ S({
15
15
  __name: "ap-tag-group",
16
16
  props: {
17
17
  list: { default: () => [] },
@@ -20,22 +20,22 @@ const ve = /* @__PURE__ */ G({
20
20
  ellipsis: { default: () => ({}) }
21
21
  },
22
22
  setup(z) {
23
- const { t: V } = Y(), o = z, v = Z("uiMode"), { b: B, bm: y } = ee("tag-group"), s = C(), { observe: E, unobserve: $ } = te(), i = n(() => ({
23
+ const { t: V } = Q(), o = z, v = X("uiMode"), { b: B, bm: h } = Y("tag-group"), r = C(), { observe: E, unobserve: $ } = Z(), i = n(() => ({
24
24
  ...{
25
25
  iconColor: v.value === "aplus" ? "#182948" : "#333",
26
26
  symbol: "icon",
27
27
  text: V("ap.common.more")
28
28
  },
29
29
  ...o.ellipsis
30
- })), M = n(() => i.value.tooltip && typeof i.value.tooltip == "object" ? X(i.value.tooltip, ["trigger", "title"]) : {}), p = n(() => f(c) < o.list.length), c = C(0), P = n(() => o.list.map((e) => e.text).join("、")), D = n(() => [B()].filter(Boolean)), N = n(() => v.value === "aplus" ? [y("ellipsis-text", "aplus")] : [y("ellipsis-text", "admin")]), h = () => {
30
+ })), M = n(() => i.value.tooltip && typeof i.value.tooltip == "object" ? O(i.value.tooltip, ["trigger", "title"]) : {}), p = n(() => f(c) < o.list.length), c = C(0), P = n(() => o.list.map((e) => e.text).join("、")), D = n(() => [B()].filter(Boolean)), N = n(() => v.value === "aplus" ? [h("ellipsis-text", "aplus")] : [h("ellipsis-text", "admin")]), y = () => {
31
31
  let e = 0, l = 0;
32
- if (!s.value) return;
33
- const u = s.value.offsetWidth;
34
- for (let r of o.list) {
35
- const m = r.size === "small" ? 8 : 12, S = T(
36
- r.size === "large" ? 14 : 12,
37
- r.text
38
- ), j = r.type === "border" ? 2 : 0, x = S + m + j + o.space;
32
+ if (!r.value) return;
33
+ const u = r.value.offsetWidth;
34
+ for (let s of o.list) {
35
+ const m = s.size === "small" ? 8 : 12, x = T(
36
+ s.size === "large" ? 14 : 12,
37
+ s.text
38
+ ) + m + o.space;
39
39
  if (e += x, e > u) {
40
40
  e -= x;
41
41
  break;
@@ -48,11 +48,11 @@ const ve = /* @__PURE__ */ G({
48
48
  }
49
49
  c.value = l;
50
50
  };
51
- L(
51
+ j(
52
52
  () => o.list,
53
53
  (e, l) => {
54
- e !== l && A(() => {
55
- h();
54
+ e !== l && G(() => {
55
+ y();
56
56
  });
57
57
  },
58
58
  {
@@ -60,49 +60,49 @@ const ve = /* @__PURE__ */ G({
60
60
  }
61
61
  );
62
62
  const R = () => {
63
- h();
63
+ y();
64
64
  };
65
- return F(() => {
65
+ return L(() => {
66
66
  [["ellipsisColor", "ellipse.color"]].forEach(
67
67
  ([e, l]) => {
68
68
  o[e] && console.error(
69
69
  `[ApTagGroup]: \`${e}\` is deprecated, please use \`${l}\` instead.`
70
70
  );
71
71
  }
72
- ), s.value && E(s.value, R);
73
- }), I(() => {
74
- s.value && $(s.value);
75
- }), (e, l) => (a(), d(f(O), b({ trigger: "hover" }, M.value), {
76
- title: g(() => [
77
- J(e.$slots, "tooltip", { tags: e.list }, () => [
78
- K(W(P.value), 1)
72
+ ), r.value && E(r.value, R);
73
+ }), A(() => {
74
+ r.value && $(r.value);
75
+ }), (e, l) => (a(), g(f(J), w({ trigger: "hover" }, M.value), {
76
+ title: d(() => [
77
+ q(e.$slots, "tooltip", { tags: e.list }, () => [
78
+ H(W(P.value), 1)
79
79
  ])
80
80
  ]),
81
- default: g(() => [
81
+ default: d(() => [
82
82
  t("div", {
83
83
  ref_key: "container",
84
- ref: s,
84
+ ref: r,
85
85
  class: k(D.value),
86
- style: w({
86
+ style: b({
87
87
  pointerEvents: p.value ? "auto" : "none"
88
88
  // opacity: isUpdating ? '0' : '1'
89
89
  })
90
90
  }, [
91
- (a(!0), _(q, null, H(e.list, (u, r) => (a(), d(le, b({ ref_for: !0 }, u, {
92
- key: r,
91
+ (a(!0), _(I, null, U(e.list, (u, s) => (a(), g(ee, w({ ref_for: !0 }, u, {
92
+ key: s,
93
93
  style: {
94
- display: r >= c.value ? "none" : "inline-block",
94
+ display: s >= c.value ? "none" : "inline-block",
95
95
  marginRight: `${e.space}px`
96
96
  }
97
97
  }), null, 16, ["style"]))), 128)),
98
- p.value && i.value.symbol === "icon" ? (a(), d(f(Q), {
98
+ p.value && i.value.symbol === "icon" ? (a(), g(f(K), {
99
99
  key: 0,
100
- style: w({
100
+ style: b({
101
101
  color: e.ellipsisColor || i.value.iconColor,
102
102
  cursor: "pointer"
103
103
  })
104
104
  }, {
105
- component: g(() => l[0] || (l[0] = [
105
+ component: d(() => l[0] || (l[0] = [
106
106
  t("svg", {
107
107
  xmlns: "http://www.w3.org/2000/svg",
108
108
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
@@ -162,7 +162,7 @@ const ve = /* @__PURE__ */ G({
162
162
  key: 1,
163
163
  class: k(N.value),
164
164
  style: { cursor: "pointer" }
165
- }, W(i.value.text), 3)) : U("", !0)
165
+ }, W(i.value.text), 3)) : F("", !0)
166
166
  ], 6)
167
167
  ]),
168
168
  _: 3
@@ -170,5 +170,5 @@ const ve = /* @__PURE__ */ G({
170
170
  }
171
171
  });
172
172
  export {
173
- ve as default
173
+ de as default
174
174
  };
@@ -1,26 +1,28 @@
1
- import { defineComponent as n, createVNode as o, mergeProps as a, createTextVNode as l } from "vue";
1
+ import { defineComponent as l, createVNode as o, mergeProps as t, createTextVNode as m } from "vue";
2
2
  import "../../../config-provider/index.mjs";
3
- import m from "../ApLabel.mjs";
4
- import { omit as s } from "lodash-unified";
5
- import { ApLabelGroupProps as c } from "../constans.mjs";
3
+ import p from "../ApLabel.mjs";
4
+ import { omit as n } from "lodash-unified";
5
+ import { ApLabelGroupProps as s } from "../constans.mjs";
6
6
  import "../../../ap-tag/index.mjs";
7
- import { useNamespace as f } from "../../../config-provider/hooks/use-namespace.mjs";
8
- import i from "../../../ap-tag/ap-tag.vue.mjs";
7
+ import { useNamespace as c } from "../../../config-provider/hooks/use-namespace.mjs";
8
+ import f from "../../../ap-tag/ap-tag.vue.mjs";
9
9
  const {
10
- b: p
11
- } = f("ap-label-group"), _ = /* @__PURE__ */ n({
10
+ b: i
11
+ } = c("ap-label-group"), _ = /* @__PURE__ */ l({
12
12
  name: "ApLabelGroup",
13
- props: c(),
13
+ props: s(),
14
14
  setup(r) {
15
- const t = (e) => (r.tagValue || r.tagValue === 0) && e.tagConfig && e.tagConfig.length > 0 ? () => e.tagConfig.filter((u) => r.tagValue === u.value).map((u) => o(i, u, null)) : e.customRender ? () => o("div", null, [e.customRender(r.record)]) : null;
15
+ const a = (e) => (r.tagValue || r.tagValue === 0) && e.tagConfig && e.tagConfig.length > 0 ? () => e.tagConfig.filter((u) => r.tagValue === u.value).map((u) => o(f, t(n(u, "type"), {
16
+ type: "border"
17
+ }), null)) : e.customRender ? () => o("div", null, [e.customRender(r.record)]) : null;
16
18
  return () => o("div", {
17
- class: p()
18
- }, [r.columns ? r.columns.map((e, u) => o(m, a({
19
+ class: i()
20
+ }, [r.columns ? r.columns.map((e, u) => o(p, t({
19
21
  key: u,
20
22
  show: r.value === e.value
21
- }, s(e, ["value", "tagConfig", "customRender"])), {
22
- custom: t(e)
23
- })) : o("div", null, [l("columns数组不能为空")])]);
23
+ }, n(e, ["value", "tagConfig", "customRender"])), {
24
+ custom: a(e)
25
+ })) : o("div", null, [m("columns数组不能为空")])]);
24
26
  }
25
27
  });
26
28
  export {
@@ -2,3 +2,4 @@ export * from './usePageListApTable';
2
2
  export * from './useTableRefresh';
3
3
  export * from './usePageListApGrid';
4
4
  export * from './useGridRefresh';
5
+ export * from './usePageListAgGrid';
@@ -1,10 +1,12 @@
1
1
  import { usePageListApTable as o } from "./usePageListApTable.mjs";
2
- import { useTableRefresh as f } from "./useTableRefresh.mjs";
3
- import { usePageListApGrid as t } from "./usePageListApGrid.mjs";
4
- import { useGridRefresh as i } from "./useGridRefresh.mjs";
2
+ import { useTableRefresh as t } from "./useTableRefresh.mjs";
3
+ import { usePageListApGrid as p } from "./usePageListApGrid.mjs";
4
+ import { useGridRefresh as a } from "./useGridRefresh.mjs";
5
+ import { usePageListAgGrid as u } from "./usePageListAgGrid.mjs";
5
6
  export {
6
- i as useGridRefresh,
7
- t as usePageListApGrid,
7
+ a as useGridRefresh,
8
+ u as usePageListAgGrid,
9
+ p as usePageListApGrid,
8
10
  o as usePageListApTable,
9
- f as useTableRefresh
11
+ t as useTableRefresh
10
12
  };
@@ -0,0 +1,37 @@
1
+ import { UseTableRefreshOption } from '..';
2
+ import { AgGridExpose, AgGridProps } from '../../ag-grid';
3
+ export interface UsePageListAgGrid extends AgGridProps {
4
+ /** 是否显示默认的行选择配置
5
+ * @default true
6
+ */
7
+ isShowRowSelection?: boolean;
8
+ /** 转化AgGrid查询参数 */
9
+ transformSearchFormValues?: (values: any) => any;
10
+ /** AgGrid数据接口 */
11
+ api?(record: any): Promise<any>;
12
+ /** 发起请求的时候情况行选中
13
+ * @default true
14
+ */
15
+ clearSelectionOnRequest?: boolean;
16
+ /** 用于覆盖默认的class */
17
+ class?: string;
18
+ /**
19
+ * 表格刷新相关
20
+ */
21
+ tableRefresh?: boolean | Omit<UseTableRefreshOption, 'apTableRef'>;
22
+ /** 是否需要在deactivated的时候清空数据
23
+ * @default true
24
+ */
25
+ clearDataOnDeactivated?: boolean;
26
+ }
27
+ /**
28
+ * 集成了列表页面的AgGrid的默认配置
29
+ */
30
+ export declare function usePageListAgGrid(props?: UsePageListAgGrid): [AgGridProps, {
31
+ reload: () => void;
32
+ reset: () => void;
33
+ getSearchFormValues: (transform?: boolean) => any;
34
+ getAgGridInstance: () => AgGridExpose | undefined;
35
+ getSearchFormValuesAndSorted: (transform?: boolean) => any;
36
+ clearSelection: () => void;
37
+ }];