@aplus-frontend/ui 0.4.33 → 0.5.0-beta.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 (123) hide show
  1. package/es/index.mjs +121 -117
  2. package/es/src/ap-button/ap-confirm-button.vue.d.ts +20 -0
  3. package/es/src/ap-button/ap-confirm-button.vue.mjs +56 -0
  4. package/es/src/ap-button/ap-confirm-button.vue2.mjs +4 -0
  5. package/es/src/ap-button/index.d.ts +2 -1
  6. package/es/src/ap-button/index.mjs +1 -0
  7. package/es/src/ap-button/interface.d.ts +6 -1
  8. package/es/src/ap-button/utils/index.d.ts +2 -0
  9. package/es/src/ap-button/utils/index.mjs +36 -16
  10. package/es/src/ap-grid/constants.d.ts +9 -0
  11. package/es/src/ap-grid/constants.mjs +12 -0
  12. package/es/src/ap-grid/hooks/use-inner-params.d.ts +10 -0
  13. package/es/src/ap-grid/hooks/use-inner-params.mjs +41 -0
  14. package/es/src/ap-grid/hooks/use-render-columns.d.ts +6 -0
  15. package/es/src/ap-grid/hooks/use-render-columns.mjs +29 -0
  16. package/es/src/ap-grid/index.d.ts +3 -0
  17. package/es/src/ap-grid/index.mjs +2 -0
  18. package/es/src/ap-grid/index.vue.mjs +399 -0
  19. package/es/src/ap-grid/index.vue2.mjs +4 -0
  20. package/es/src/ap-grid/interface.d.ts +279 -0
  21. package/es/src/ap-grid/interface.mjs +1 -0
  22. package/es/src/ap-grid/style/css.d.ts +0 -0
  23. package/es/src/ap-grid/style/css.js +1 -0
  24. package/es/src/ap-grid/style/index.d.ts +0 -0
  25. package/es/src/ap-grid/style/index.js +1 -0
  26. package/es/src/ap-grid/utils/col.d.ts +20 -0
  27. package/es/src/ap-grid/utils/col.mjs +106 -0
  28. package/es/src/ap-grid/utils/renderer.d.ts +3 -0
  29. package/es/src/ap-grid/utils/renderer.mjs +21 -0
  30. package/es/src/ap-grid/utils/table.d.ts +13 -0
  31. package/es/src/ap-grid/utils/table.mjs +64 -0
  32. package/es/src/ap-modal/utils/createModal.mjs +28 -28
  33. package/es/src/ap-table/ap-table.vue.d.ts +2 -0
  34. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +38 -38
  35. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +9 -9
  36. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +21 -21
  37. package/es/src/ap-table/components/setting/utils.d.ts +15 -3
  38. package/es/src/ap-table/components/setting/utils.mjs +49 -38
  39. package/es/src/ap-table/context.d.ts +2 -1
  40. package/es/src/ap-table/context.mjs +8 -7
  41. package/es/src/ap-table/hooks/use-table-column-state.mjs +79 -70
  42. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +8 -2
  43. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +43 -40
  44. package/es/src/ap-table/hooks/use-table-row-selection.d.ts +12 -0
  45. package/es/src/ap-table/hooks/use-table-row-selection.mjs +41 -27
  46. package/es/src/ap-table/interface.d.ts +4 -0
  47. package/es/src/ap-table/utils.d.ts +1 -1
  48. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +2 -0
  49. package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +2 -0
  50. package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +2 -0
  51. package/es/src/business/ap-table-modal/index.d.ts +8 -0
  52. package/es/src/business/ap-table-modal/table-modal.vue.d.ts +4 -0
  53. package/es/src/business/hooks/usePageListApTable.d.ts +2 -0
  54. package/es/src/index.d.ts +1 -0
  55. package/es/src/index.mjs +242 -237
  56. package/es/src/path-map.mjs +2 -1
  57. package/lib/index.js +1 -1
  58. package/lib/src/ap-button/ap-confirm-button.vue.d.ts +20 -0
  59. package/lib/src/ap-button/ap-confirm-button.vue.js +1 -0
  60. package/lib/src/ap-button/ap-confirm-button.vue2.js +1 -0
  61. package/lib/src/ap-button/index.d.ts +2 -1
  62. package/lib/src/ap-button/index.js +1 -1
  63. package/lib/src/ap-button/interface.d.ts +6 -1
  64. package/lib/src/ap-button/utils/index.d.ts +2 -0
  65. package/lib/src/ap-button/utils/index.js +1 -1
  66. package/lib/src/ap-grid/constants.d.ts +9 -0
  67. package/lib/src/ap-grid/constants.js +1 -0
  68. package/lib/src/ap-grid/hooks/use-inner-params.d.ts +10 -0
  69. package/lib/src/ap-grid/hooks/use-inner-params.js +1 -0
  70. package/lib/src/ap-grid/hooks/use-render-columns.d.ts +6 -0
  71. package/lib/src/ap-grid/hooks/use-render-columns.js +1 -0
  72. package/lib/src/ap-grid/index.d.ts +3 -0
  73. package/lib/src/ap-grid/index.js +1 -0
  74. package/lib/src/ap-grid/index.vue.js +1 -0
  75. package/lib/src/ap-grid/index.vue2.js +1 -0
  76. package/lib/src/ap-grid/interface.d.ts +279 -0
  77. package/lib/src/ap-grid/interface.js +1 -0
  78. package/lib/src/ap-grid/style/css.cjs +1 -0
  79. package/lib/src/ap-grid/style/css.d.ts +0 -0
  80. package/lib/src/ap-grid/style/index.cjs +1 -0
  81. package/lib/src/ap-grid/style/index.d.ts +0 -0
  82. package/lib/src/ap-grid/utils/col.d.ts +20 -0
  83. package/lib/src/ap-grid/utils/col.js +1 -0
  84. package/lib/src/ap-grid/utils/renderer.d.ts +3 -0
  85. package/lib/src/ap-grid/utils/renderer.js +1 -0
  86. package/lib/src/ap-grid/utils/table.d.ts +13 -0
  87. package/lib/src/ap-grid/utils/table.js +1 -0
  88. package/lib/src/ap-modal/utils/createModal.js +1 -1
  89. package/lib/src/ap-table/ap-table.vue.d.ts +2 -0
  90. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
  91. package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
  92. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
  93. package/lib/src/ap-table/components/setting/utils.d.ts +15 -3
  94. package/lib/src/ap-table/components/setting/utils.js +1 -1
  95. package/lib/src/ap-table/context.d.ts +2 -1
  96. package/lib/src/ap-table/context.js +1 -1
  97. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  98. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +8 -2
  99. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  100. package/lib/src/ap-table/hooks/use-table-row-selection.d.ts +12 -0
  101. package/lib/src/ap-table/hooks/use-table-row-selection.js +1 -1
  102. package/lib/src/ap-table/interface.d.ts +4 -0
  103. package/lib/src/ap-table/utils.d.ts +1 -1
  104. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +2 -0
  105. package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +2 -0
  106. package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +2 -0
  107. package/lib/src/business/ap-table-modal/index.d.ts +8 -0
  108. package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +4 -0
  109. package/lib/src/business/hooks/usePageListApTable.d.ts +2 -0
  110. package/lib/src/index.d.ts +1 -0
  111. package/lib/src/index.js +1 -1
  112. package/lib/src/path-map.js +1 -1
  113. package/package.json +3 -1
  114. package/theme/antd-global-overwrite/admin/index.css +8 -1
  115. package/theme/antd-global-overwrite/admin/modal.css +8 -1
  116. package/theme/antd-global-overwrite/admin/modal.less +10 -1
  117. package/theme/antd-global-overwrite/aplus/index.css +8 -1
  118. package/theme/antd-global-overwrite/aplus/modal.css +8 -1
  119. package/theme/antd-global-overwrite/aplus/modal.less +10 -1
  120. package/theme/ap-grid/index.css +302 -0
  121. package/theme/ap-grid/index.less +65 -0
  122. package/theme/index.css +51 -0
  123. package/theme/index.less +1 -0
@@ -1,62 +1,76 @@
1
- import { ref as h, computed as s, unref as c } from "vue";
2
- import { isFunction as x } from "lodash-unified";
3
- const g = (o) => {
4
- const n = h([]);
5
- function r(e, t) {
1
+ import { ref as y, computed as s, unref as c } from "vue";
2
+ import { isFunction as K } from "lodash-unified";
3
+ const m = (a) => {
4
+ const n = y([]);
5
+ function f(e, t) {
6
6
  n.value = t;
7
7
  }
8
- const l = (e) => x(o.rowKey) ? o.rowKey(e) : e[o.rowKey], a = s(() => {
8
+ const l = (e) => K(a.rowKey) ? a.rowKey(e) : e[a.rowKey], o = s(() => {
9
9
  const e = /* @__PURE__ */ new Map();
10
10
  return c(n).forEach((t) => {
11
11
  e.set(l(t), t);
12
12
  }), e;
13
13
  });
14
- function f(e) {
15
- return c(a).has(l(e));
14
+ function r(e) {
15
+ return c(o).has(l(e));
16
16
  }
17
17
  function d(e) {
18
- const t = c(a);
18
+ const t = c(o);
19
19
  t.set(l(e), e), n.value = [...t.values()];
20
20
  }
21
+ function i(e) {
22
+ const t = c(o);
23
+ for (const u of e)
24
+ t.set(l(u), u);
25
+ n.value = [...t.values()];
26
+ }
21
27
  function S(e) {
22
- const t = c(a);
28
+ const t = c(o);
23
29
  t.delete(l(e)), n.value = [...t.values()];
24
30
  }
25
- function i() {
26
- const e = c(a);
27
- c(o.dataSource).forEach((t) => {
31
+ function v(e) {
32
+ const t = c(o);
33
+ for (const u of e)
34
+ t.delete(l(u));
35
+ n.value = [...t.values()];
36
+ }
37
+ function M() {
38
+ const e = c(o);
39
+ c(a.dataSource).forEach((t) => {
28
40
  e.set(l(t), t);
29
41
  }), n.value = [...e.values()];
30
42
  }
31
- function v(e) {
32
- const t = c(a), u = l(e);
43
+ function w(e) {
44
+ const t = c(o), u = l(e);
33
45
  t.has(u) ? t.delete(u) : t.set(u, e), n.value = [...t.values()];
34
46
  }
35
- function w() {
36
- const e = c(a);
37
- c(o.dataSource).forEach((t) => {
47
+ function x() {
48
+ const e = c(o);
49
+ c(a.dataSource).forEach((t) => {
38
50
  e.delete(l(t));
39
51
  }), n.value = [...e.values()];
40
52
  }
41
- function M() {
53
+ function h() {
42
54
  n.value = [];
43
55
  }
44
56
  return {
45
57
  select: d,
46
58
  unSelect: S,
47
- isSelected: f,
48
- selectAll: i,
49
- unSelectAll: w,
50
- clearAll: M,
51
- toggleSelect: v,
59
+ isSelected: r,
60
+ selectAll: M,
61
+ unSelectAll: x,
62
+ clearAll: h,
63
+ toggleSelect: w,
52
64
  selectedRows: n,
65
+ selectMulti: i,
66
+ unSelectMulti: v,
53
67
  rowSelection: s(() => ({
54
- ...o,
55
- onChange: r,
68
+ ...a,
69
+ onChange: f,
56
70
  selectedRowKeys: c(n).map((e) => l(e))
57
71
  }))
58
72
  };
59
73
  };
60
74
  export {
61
- g as default
75
+ m as default
62
76
  };
@@ -379,3 +379,7 @@ export type ApTableExpose<SearchParamsType = Recordable, RecordType = any> = {
379
379
  y: undefined;
380
380
  };
381
381
  };
382
+ export type ApTableContextRenderConfig = {
383
+ color: string;
384
+ className: string;
385
+ };
@@ -1891,7 +1891,7 @@ export declare function getTableTitle(column: ApColumnType<any>, titleNodeClassN
1891
1891
  }) => any, tooltipColor?: string): number | boolean | void | VNodeArrayChildren | VNode< RendererNode, RendererElement, {
1892
1892
  [key: string]: any;
1893
1893
  }> | ((props: ColumnTitleProps<any>) => VNodeArrayChildren | VueNode) | null;
1894
- export declare function recursionApColumns<ReturnType = any>(columns: (ColumnType | ColumnGroupType<any>)[], handler: (column: ColumnType) => ReturnType): ReturnType[];
1894
+ export declare function recursionApColumns<ReturnType = any, ColumnsType extends Array<any> = (ColumnType | ColumnGroupType<any>)[]>(columns: ColumnsType, handler: (column: ColumnsType[0]) => ReturnType): ReturnType[];
1895
1895
  export declare function isEqualCustom(value: any, other: any): boolean | undefined;
1896
1896
  export declare function falseToUndefined(obj: any): any;
1897
1897
  export {};
@@ -23,6 +23,8 @@ export declare function useCreateTableModal(props: UseCreateTableModalProps): {
23
23
  isSelected: (item: any) => boolean;
24
24
  clearAll: () => void;
25
25
  toggleSelect: (item: any) => void;
26
+ selectMulti: (items: any[]) => void;
27
+ unSelectMulti: (items: any[]) => void;
26
28
  } | undefined;
27
29
  getShownColumns: () => TableColumnsType<any>;
28
30
  scrollBar: {
@@ -21,6 +21,8 @@ export declare function useTableModal<TableRowType = Record<string, any>>(props:
21
21
  isSelected: (item: any) => boolean;
22
22
  clearAll: () => void;
23
23
  toggleSelect: (item: any) => void;
24
+ selectMulti: (items: any[]) => void;
25
+ unSelectMulti: (items: any[]) => void;
24
26
  } | undefined;
25
27
  getShownColumns: () => TableColumnsType<any>;
26
28
  scrollBar: {
@@ -20,6 +20,8 @@ export declare function useTableSelectModal<TableRowType = Record<string, any>>(
20
20
  isSelected: (item: any) => boolean;
21
21
  clearAll: () => void;
22
22
  toggleSelect: (item: any) => void;
23
+ selectMulti: (items: any[]) => void;
24
+ unSelectMulti: (items: any[]) => void;
23
25
  } | undefined;
24
26
  getShownColumns: () => TableColumnsType<any>;
25
27
  scrollBar: {
@@ -29,6 +29,8 @@ declare const ApTableModal: {
29
29
  isSelected: (item: any) => boolean;
30
30
  clearAll: () => void;
31
31
  toggleSelect: (item: any) => void;
32
+ selectMulti: (items: any[]) => void;
33
+ unSelectMulti: (items: any[]) => void;
32
34
  } | undefined;
33
35
  getShownColumns: () => TableColumnsType<any>;
34
36
  scrollBar: {
@@ -75,6 +77,8 @@ declare const ApTableModal: {
75
77
  unSelectAll: () => void;
76
78
  clearAll: () => void;
77
79
  toggleSelect: (item: any) => void;
80
+ selectMulti: (items: any[]) => void;
81
+ unSelectMulti: (items: any[]) => void;
78
82
  selectedRows: ComputedRef<any[]>;
79
83
  };
80
84
  scrollBar: {
@@ -113,6 +117,8 @@ declare const ApTableModal: {
113
117
  isSelected: (item: any) => boolean;
114
118
  clearAll: () => void;
115
119
  toggleSelect: (item: any) => void;
120
+ selectMulti: (items: any[]) => void;
121
+ unSelectMulti: (items: any[]) => void;
116
122
  } | undefined;
117
123
  getShownColumns: () => TableColumnsType<any>;
118
124
  scrollBar: {
@@ -165,6 +171,8 @@ declare const ApTableModal: {
165
171
  isSelected: (item: any) => boolean;
166
172
  clearAll: () => void;
167
173
  toggleSelect: (item: any) => void;
174
+ selectMulti: (items: any[]) => void;
175
+ unSelectMulti: (items: any[]) => void;
168
176
  } | undefined;
169
177
  getShownColumns: () => TableColumnsType<any>;
170
178
  scrollBar: {
@@ -22,6 +22,8 @@ declare const _default: DefineComponent<__VLS_Props, {
22
22
  isSelected: (item: any) => boolean;
23
23
  clearAll: () => void;
24
24
  toggleSelect: (item: any) => void;
25
+ selectMulti: (items: any[]) => void;
26
+ unSelectMulti: (items: any[]) => void;
25
27
  } | undefined;
26
28
  getShownColumns: () => TableColumnsType<any>;
27
29
  scrollBar: {
@@ -70,6 +72,8 @@ declare const _default: DefineComponent<__VLS_Props, {
70
72
  unSelectAll: () => void;
71
73
  clearAll: () => void;
72
74
  toggleSelect: (item: any) => void;
75
+ selectMulti: (items: any[]) => void;
76
+ unSelectMulti: (items: any[]) => void;
73
77
  selectedRows: ComputedRef<any[]>;
74
78
  };
75
79
  scrollBar: {
@@ -47,6 +47,8 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
47
47
  isSelected: (item: any) => boolean;
48
48
  clearAll: () => void;
49
49
  toggleSelect: (item: any) => void;
50
+ selectMulti: (items: any[]) => void;
51
+ unSelectMulti: (items: any[]) => void;
50
52
  } | undefined;
51
53
  getShownColumns: () => TableColumnsType<any>;
52
54
  scrollBar: {
package/es/src/index.d.ts CHANGED
@@ -22,3 +22,4 @@ export * from './scroll-view';
22
22
  export * from './portal';
23
23
  export * from './full-screen';
24
24
  export * from './resize-observer';
25
+ export * from './ap-grid';