@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,88 @@
1
+ import "../index.mjs";
2
+ import { merge as v, cloneDeep as A } from "lodash-unified";
3
+ import { ref as F } from "vue";
4
+ import { useKeepAliveFlag as R } from "./useKeepAliveFlag.mjs";
5
+ import { useTableRefresh as w } from "./useTableRefresh.mjs";
6
+ function z(s) {
7
+ const t = F(null), {
8
+ isShowRowSelection: i = !0,
9
+ clearSelectionOnRequest: f = !0,
10
+ transformSearchFormValues: a,
11
+ api: n,
12
+ tableRefresh: d = !0,
13
+ clearDataOnDeactivated: m = !0,
14
+ ...p
15
+ } = s || {};
16
+ let l = null;
17
+ const u = () => {
18
+ var e, r;
19
+ (r = (e = t.value) == null ? void 0 : e.rowSelection) == null || r.clearAll();
20
+ };
21
+ w({
22
+ ...V(d),
23
+ apTableRef: t
24
+ });
25
+ const c = () => {
26
+ var e;
27
+ (e = t.value) == null || e.submit();
28
+ }, h = () => {
29
+ var e;
30
+ (e = t.value) == null || e.reset();
31
+ }, { isDeactivated: S } = R({
32
+ afterDeactivated: c
33
+ });
34
+ return [v(
35
+ {
36
+ // scroll,tableLayout,columnResizable设置表格可拖动
37
+ columnResizable: !0,
38
+ request: n ? async (e) => {
39
+ if (S() && m)
40
+ return {
41
+ data: [],
42
+ total: 0
43
+ };
44
+ l = e.sort;
45
+ const r = a ? a(e) : e;
46
+ if (!n) throw new Error("api is not defined");
47
+ const { records: o, total: g } = await n(r);
48
+ return f && u(), {
49
+ data: o,
50
+ total: g
51
+ };
52
+ } : void 0,
53
+ rowSelection: i ? {
54
+ fixed: "left",
55
+ columnWidth: 38
56
+ } : void 0,
57
+ ref(e) {
58
+ t.value = e;
59
+ },
60
+ // 新UI规范,需要都添加分割线
61
+ card: !0
62
+ },
63
+ p
64
+ ), {
65
+ reload: c,
66
+ reset: h,
67
+ getSearchFormValues: (e = !0) => {
68
+ var o;
69
+ const r = ((o = t.value) == null ? void 0 : o.getSearchFormValues(!!e)) || {};
70
+ return a ? a(r) : r;
71
+ },
72
+ getAgGridInstance: () => t.value,
73
+ getSearchFormValuesAndSorted: (e = !0) => {
74
+ var o;
75
+ const r = ((o = t.value) == null ? void 0 : o.getSearchFormValues(!!e)) || {};
76
+ return r.sort = l && A(l), a ? a(r) : r;
77
+ },
78
+ clearSelection: u
79
+ }];
80
+ }
81
+ function V(s) {
82
+ return s === !0 ? {} : s === !1 ? {
83
+ refreshBefore: () => !1
84
+ } : s;
85
+ }
86
+ export {
87
+ z as usePageListAgGrid
88
+ };