@aplus-frontend/ui 7.12.5 → 7.13.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 (244) hide show
  1. package/es/src/ag-grid/components/loading/index.vue.d.ts +3 -0
  2. package/es/src/ag-grid/components/loading/index.vue.mjs +4 -0
  3. package/es/src/ag-grid/components/loading/index.vue2.mjs +18 -0
  4. package/es/src/ag-grid/context.mjs +1 -1
  5. package/es/src/ag-grid/editable/form-item.vue.d.ts +2 -4
  6. package/es/src/ag-grid/editable/form-item.vue.mjs +30 -27
  7. package/es/src/ag-grid/editable/index.vue.d.ts +2 -4
  8. package/es/src/ag-grid/editable/index.vue.mjs +10 -8
  9. package/es/src/ag-grid/editable/interface.d.ts +2 -1
  10. package/es/src/ag-grid/hooks/use-pinned-row.mjs +2 -2
  11. package/es/src/ag-grid/index.vue.d.ts +2 -4
  12. package/es/src/ag-grid/index.vue.mjs +209 -202
  13. package/es/src/ag-grid/interface.d.ts +4 -0
  14. package/es/src/ag-grid/style/index.mjs +8 -5
  15. package/es/src/ap-drawer/interface.d.ts +13 -2
  16. package/es/src/ap-drawer/utils/createDrawer.mjs +37 -32
  17. package/es/src/ap-field/select/index.vue.d.ts +1 -2
  18. package/es/src/ap-field/select/index.vue.mjs +126 -88
  19. package/es/src/ap-field/select/use-select-options.d.ts +2 -2
  20. package/es/src/ap-field/style/index.mjs +8 -6
  21. package/es/src/ap-field/style/select.d.ts +2 -0
  22. package/es/src/ap-field/style/select.mjs +43 -0
  23. package/es/src/ap-field/tree-select/use-request.d.ts +4 -4
  24. package/es/src/ap-form/ap-form.vue.d.ts +1 -2
  25. package/es/src/ap-form/context.mjs +1 -1
  26. package/es/src/ap-form/drawer-form/index.vue.d.ts +3 -4
  27. package/es/src/ap-form/item-group/helper.mjs +2 -2
  28. package/es/src/ap-form/items/number/index.vue.d.ts +4 -5
  29. package/es/src/ap-form/items/select/index.vue.d.ts +12 -16
  30. package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
  31. package/es/src/ap-form/items/text/password.vue.d.ts +2 -2
  32. package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  33. package/es/src/ap-form/modal-form/index.vue.d.ts +3 -4
  34. package/es/src/ap-form/provider/context.mjs +1 -1
  35. package/es/src/ap-form/search-form/index.vue.d.ts +3 -4
  36. package/es/src/ap-grid/editable/form-item.vue.d.ts +2 -4
  37. package/es/src/ap-grid/editable/index.vue.d.ts +2 -4
  38. package/es/src/ap-grid/index.vue.d.ts +2 -4
  39. package/es/src/ap-grid/utils/table.mjs +2 -2
  40. package/es/src/ap-list/index.vue.d.ts +2 -4
  41. package/es/src/ap-modal/utils/confirm.d.ts +1 -1
  42. package/es/src/ap-pro-card/components/card/index.vue2.mjs +2 -2
  43. package/es/src/ap-table/ap-table.vue.d.ts +2 -4
  44. package/es/src/ap-table/ap-table.vue2.mjs +15 -16
  45. package/es/src/ap-table/components/setting/context.d.ts +17 -0
  46. package/es/src/ap-table/components/setting/context.mjs +18 -0
  47. package/es/src/ap-table/components/setting/modal/index.vue.d.ts +1 -1
  48. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +217 -88
  49. package/es/src/ap-table/components/setting/sorter/context.mjs +1 -1
  50. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +49 -51
  51. package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +844 -0
  52. package/es/src/ap-table/components/setting/template/edit-form.vue.mjs +4 -0
  53. package/es/src/ap-table/components/setting/template/edit-form.vue2.mjs +74 -0
  54. package/es/src/ap-table/components/setting/template/index.vue.d.ts +11 -0
  55. package/es/src/ap-table/components/setting/template/index.vue.mjs +4 -0
  56. package/es/src/ap-table/components/setting/template/index.vue2.mjs +51 -0
  57. package/es/src/ap-table/components/setting/template/item.vue.d.ts +13 -0
  58. package/es/src/ap-table/components/setting/template/item.vue.mjs +4 -0
  59. package/es/src/ap-table/components/setting/template/item.vue2.mjs +77 -0
  60. package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
  61. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +26 -29
  62. package/es/src/ap-table/components/setting/utils.d.ts +1 -0
  63. package/es/src/ap-table/components/setting/utils.mjs +22 -15
  64. package/es/src/ap-table/constants.d.ts +13 -15
  65. package/es/src/ap-table/context.mjs +1 -1
  66. package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -23
  67. package/es/src/ap-table/hooks/use-table-column-state.mjs +32 -120
  68. package/es/src/ap-table/hooks/use-table-template-storage.d.ts +49 -0
  69. package/es/src/ap-table/hooks/use-table-template-storage.mjs +150 -0
  70. package/es/src/ap-table/interface.d.ts +26 -3
  71. package/es/src/ap-table/style/index.d.ts +1 -0
  72. package/es/src/ap-table/style/index.mjs +2 -1
  73. package/es/src/ap-table/style/setting.d.ts +2 -0
  74. package/es/src/ap-table/style/setting.mjs +114 -19
  75. package/es/src/ap-table/utils.mjs +1 -1
  76. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.mjs +1 -1
  77. package/es/src/business/ag-grid-modal/style/index.mjs +7 -7
  78. package/es/src/business/ap-attachment/ApAttachment.mjs +96 -89
  79. package/es/src/business/ap-attachment/style/index.mjs +33 -16
  80. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +24 -22
  81. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +1 -1
  82. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +35 -31
  83. package/es/src/business/ap-batch-action-group/index.d.ts +6 -6
  84. package/es/src/business/ap-batch-action-group/interface.d.ts +1 -1
  85. package/es/src/business/ap-download/hooks/index.mjs +1 -1
  86. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +1 -1
  87. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +1 -3
  88. package/es/src/business/ap-draggable-grid/index.d.ts +1 -1
  89. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +2 -4
  90. package/es/src/business/ap-keep-alive/hook.mjs +1 -1
  91. package/es/src/business/ap-keep-alive/utils.mjs +1 -1
  92. package/es/src/business/ap-select-layout/index.d.ts +2 -4
  93. package/es/src/business/ap-select-layout/select-layout.vue.d.ts +2 -4
  94. package/es/src/business/ap-table-modal/index.d.ts +17 -5
  95. package/es/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  96. package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +19 -19
  97. package/es/src/business/ap-upload/components/Picture.vue2.mjs +34 -34
  98. package/es/src/business/ap-upload/style/single-file.mjs +2 -2
  99. package/es/src/business/ap-upload-file/ap-upload-single/style/index.mjs +2 -2
  100. package/es/src/business/ap-value-select-card/index.vue.d.ts +2 -4
  101. package/es/src/business/ap-value-select-card/style/index.mjs +3 -2
  102. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +3 -4
  103. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -3
  104. package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +21 -21
  105. package/es/src/business/ap-view/hooks/use-view-provide.mjs +1 -1
  106. package/es/src/business/ap-view/style/index.mjs +2 -2
  107. package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
  108. package/es/src/check-card/context.mjs +1 -1
  109. package/es/src/config-provider/constants.mjs +1 -1
  110. package/es/src/config-provider/hooks/use-locale.mjs +1 -1
  111. package/es/src/config-provider/hooks/use-namespace.d.ts +5 -1
  112. package/es/src/config-provider/hooks/use-namespace.mjs +1 -1
  113. package/es/src/config-provider/hooks/use-token.mjs +1 -1
  114. package/es/src/design-token/index.mjs +5 -5
  115. package/es/src/editable-table/form-item.vue.d.ts +2 -4
  116. package/es/src/editable-table/index.vue.d.ts +2 -4
  117. package/es/src/editable-table/utils.mjs +1 -1
  118. package/es/src/locale/lang/en.mjs +15 -4
  119. package/es/src/locale/lang/zh-cn.mjs +18 -7
  120. package/es/src/scroll-view/index.vue.d.ts +5 -5
  121. package/es/src/tests/wrapper.d.ts +4 -4
  122. package/es/src/text/context.mjs +1 -1
  123. package/es/src/time-ago/useTimeAgo.mjs +26 -27
  124. package/es/src/utils/data-range-persets.d.ts +13 -1
  125. package/es/src/utils/data-range-persets.mjs +80 -60
  126. package/es/src/utils/index.d.ts +1 -0
  127. package/es/src/utils/index.mjs +56 -48
  128. package/es/src/utils/retry.d.ts +12 -0
  129. package/es/src/utils/retry.mjs +27 -0
  130. package/es/src/utils/slot.mjs +1 -1
  131. package/es/src/version.d.ts +1 -1
  132. package/es/src/version.mjs +1 -1
  133. package/lib/src/ag-grid/components/loading/index.vue.d.ts +3 -0
  134. package/lib/src/ag-grid/components/loading/index.vue.js +1 -0
  135. package/lib/src/ag-grid/components/loading/index.vue2.js +1 -0
  136. package/lib/src/ag-grid/editable/form-item.vue.d.ts +2 -4
  137. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  138. package/lib/src/ag-grid/editable/index.vue.d.ts +2 -4
  139. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  140. package/lib/src/ag-grid/editable/interface.d.ts +2 -1
  141. package/lib/src/ag-grid/hooks/use-pinned-row.js +1 -1
  142. package/lib/src/ag-grid/index.vue.d.ts +2 -4
  143. package/lib/src/ag-grid/index.vue.js +1 -1
  144. package/lib/src/ag-grid/interface.d.ts +4 -0
  145. package/lib/src/ag-grid/style/index.js +1 -1
  146. package/lib/src/ap-drawer/interface.d.ts +13 -2
  147. package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
  148. package/lib/src/ap-field/select/index.vue.d.ts +1 -2
  149. package/lib/src/ap-field/select/index.vue.js +1 -1
  150. package/lib/src/ap-field/select/use-select-options.d.ts +2 -2
  151. package/lib/src/ap-field/style/index.js +1 -1
  152. package/lib/src/ap-field/style/select.d.ts +2 -0
  153. package/lib/src/ap-field/style/select.js +1 -0
  154. package/lib/src/ap-field/tree-select/use-request.d.ts +4 -4
  155. package/lib/src/ap-form/ap-form.vue.d.ts +1 -2
  156. package/lib/src/ap-form/drawer-form/index.vue.d.ts +3 -4
  157. package/lib/src/ap-form/items/number/index.vue.d.ts +4 -5
  158. package/lib/src/ap-form/items/select/index.vue.d.ts +12 -16
  159. package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
  160. package/lib/src/ap-form/items/text/password.vue.d.ts +2 -2
  161. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  162. package/lib/src/ap-form/modal-form/index.vue.d.ts +3 -4
  163. package/lib/src/ap-form/search-form/index.vue.d.ts +3 -4
  164. package/lib/src/ap-grid/editable/form-item.vue.d.ts +2 -4
  165. package/lib/src/ap-grid/editable/index.vue.d.ts +2 -4
  166. package/lib/src/ap-grid/index.vue.d.ts +2 -4
  167. package/lib/src/ap-grid/utils/table.js +1 -1
  168. package/lib/src/ap-list/index.vue.d.ts +2 -4
  169. package/lib/src/ap-modal/utils/confirm.d.ts +1 -1
  170. package/lib/src/ap-table/ap-table.vue.d.ts +2 -4
  171. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  172. package/lib/src/ap-table/components/setting/context.d.ts +17 -0
  173. package/lib/src/ap-table/components/setting/context.js +1 -0
  174. package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +1 -1
  175. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  176. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
  177. package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +844 -0
  178. package/lib/src/ap-table/components/setting/template/edit-form.vue.js +1 -0
  179. package/lib/src/ap-table/components/setting/template/edit-form.vue2.js +1 -0
  180. package/lib/src/ap-table/components/setting/template/index.vue.d.ts +11 -0
  181. package/lib/src/ap-table/components/setting/template/index.vue.js +1 -0
  182. package/lib/src/ap-table/components/setting/template/index.vue2.js +1 -0
  183. package/lib/src/ap-table/components/setting/template/item.vue.d.ts +13 -0
  184. package/lib/src/ap-table/components/setting/template/item.vue.js +1 -0
  185. package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -0
  186. package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
  187. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
  188. package/lib/src/ap-table/components/setting/utils.d.ts +1 -0
  189. package/lib/src/ap-table/components/setting/utils.js +1 -1
  190. package/lib/src/ap-table/constants.d.ts +13 -15
  191. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -23
  192. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  193. package/lib/src/ap-table/hooks/use-table-template-storage.d.ts +49 -0
  194. package/lib/src/ap-table/hooks/use-table-template-storage.js +1 -0
  195. package/lib/src/ap-table/interface.d.ts +26 -3
  196. package/lib/src/ap-table/style/index.d.ts +1 -0
  197. package/lib/src/ap-table/style/index.js +1 -1
  198. package/lib/src/ap-table/style/setting.d.ts +2 -0
  199. package/lib/src/ap-table/style/setting.js +1 -1
  200. package/lib/src/business/ag-grid-modal/style/index.js +1 -1
  201. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  202. package/lib/src/business/ap-attachment/style/index.js +1 -1
  203. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
  204. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +1 -1
  205. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue2.js +1 -1
  206. package/lib/src/business/ap-batch-action-group/index.d.ts +6 -6
  207. package/lib/src/business/ap-batch-action-group/interface.d.ts +1 -1
  208. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +1 -1
  209. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
  210. package/lib/src/business/ap-draggable-grid/index.d.ts +1 -1
  211. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +2 -4
  212. package/lib/src/business/ap-select-layout/index.d.ts +2 -4
  213. package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +2 -4
  214. package/lib/src/business/ap-table-modal/index.d.ts +17 -5
  215. package/lib/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  216. package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
  217. package/lib/src/business/ap-upload/components/Picture.vue2.js +1 -1
  218. package/lib/src/business/ap-upload/style/single-file.js +1 -1
  219. package/lib/src/business/ap-upload-file/ap-upload-single/style/index.js +1 -1
  220. package/lib/src/business/ap-value-select-card/index.vue.d.ts +2 -4
  221. package/lib/src/business/ap-value-select-card/style/index.js +1 -1
  222. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +3 -4
  223. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -3
  224. package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
  225. package/lib/src/business/ap-view/style/index.js +1 -1
  226. package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
  227. package/lib/src/config-provider/hooks/use-namespace.d.ts +5 -1
  228. package/lib/src/design-token/index.js +1 -1
  229. package/lib/src/editable-table/form-item.vue.d.ts +2 -4
  230. package/lib/src/editable-table/index.vue.d.ts +2 -4
  231. package/lib/src/locale/lang/en.js +1 -1
  232. package/lib/src/locale/lang/zh-cn.js +1 -1
  233. package/lib/src/scroll-view/index.vue.d.ts +5 -5
  234. package/lib/src/tests/wrapper.d.ts +4 -4
  235. package/lib/src/time-ago/useTimeAgo.js +1 -1
  236. package/lib/src/utils/data-range-persets.d.ts +13 -1
  237. package/lib/src/utils/data-range-persets.js +1 -1
  238. package/lib/src/utils/index.d.ts +1 -0
  239. package/lib/src/utils/index.js +1 -1
  240. package/lib/src/utils/retry.d.ts +12 -0
  241. package/lib/src/utils/retry.js +1 -0
  242. package/lib/src/version.d.ts +1 -1
  243. package/lib/src/version.js +1 -1
  244. package/package.json +2 -2
@@ -0,0 +1,4 @@
1
+ import f from "./edit-form.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,74 @@
1
+ import { defineComponent as f, ref as u, createElementBlock as d, openBlock as y, createVNode as t, unref as e, withCtx as o, createTextVNode as i, toDisplayString as r } from "vue";
2
+ import { Flex as C, Button as m } from "@aplus-frontend/antdv";
3
+ import { ApForm as _ } from "../../../../ap-form/index.mjs";
4
+ import "../../../../config-provider/index.mjs";
5
+ import { useLocale as h } from "../../../../config-provider/hooks/use-locale.mjs";
6
+ import { ApFormItemText as b } from "../../../../ap-form/items/text/index.mjs";
7
+ const V = /* @__PURE__ */ f({
8
+ __name: "edit-form",
9
+ props: {
10
+ onConfirm: { type: Function },
11
+ onCancel: { type: Function },
12
+ initialValues: {}
13
+ },
14
+ setup(p) {
15
+ const s = p, { t: a } = h(), n = u();
16
+ async function c() {
17
+ const l = await n.value?.validateFields();
18
+ s.onConfirm(l?.label);
19
+ }
20
+ return (l, g) => (y(), d("div", null, [
21
+ t(e(_), {
22
+ ref_key: "formRef",
23
+ ref: n,
24
+ colon: !1,
25
+ "label-col": { span: 24 },
26
+ "initial-values": l.initialValues
27
+ }, {
28
+ default: o(() => [
29
+ t(e(b), {
30
+ rules: [
31
+ {
32
+ required: !0,
33
+ message: e(a)("ap.apTable.setting.templateNamePlaceholder")
34
+ }
35
+ ],
36
+ name: "label",
37
+ label: e(a)("ap.apTable.setting.templateName")
38
+ }, null, 8, ["rules", "label"])
39
+ ]),
40
+ _: 1
41
+ }, 8, ["initial-values"]),
42
+ t(e(C), {
43
+ justify: "end",
44
+ gap: 8
45
+ }, {
46
+ default: o(() => [
47
+ t(e(m), {
48
+ style: { height: "24px" },
49
+ onClick: l.onCancel
50
+ }, {
51
+ default: o(() => [
52
+ i(r(e(a)("ap.common.cancelText")), 1)
53
+ ]),
54
+ _: 1
55
+ }, 8, ["onClick"]),
56
+ t(e(m), {
57
+ style: { height: "24px" },
58
+ type: "primary",
59
+ onClick: c
60
+ }, {
61
+ default: o(() => [
62
+ i(r(e(a)("ap.common.save")), 1)
63
+ ]),
64
+ _: 1
65
+ })
66
+ ]),
67
+ _: 1
68
+ })
69
+ ]));
70
+ }
71
+ });
72
+ export {
73
+ V as default
74
+ };
@@ -0,0 +1,11 @@
1
+ import { ApColumnTemplate } from '../../..';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type __VLS_Props = {
4
+ customizeTemplateList: ApColumnTemplate[];
5
+ persistenceKey: string;
6
+ onActiveChange: (nextActiveKey: string) => void;
7
+ };
8
+ declare const _default: DefineComponent<__VLS_Props, {
9
+ updateActiveKey: (key: string) => void;
10
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
11
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,51 @@
1
+ import { defineComponent as v, createBlock as l, openBlock as a, unref as e, normalizeClass as s, withCtx as d, createElementVNode as r, createVNode as f, toDisplayString as y, createElementBlock as g, Fragment as k, renderList as _ } from "vue";
2
+ import { Flex as h, Divider as C } from "@aplus-frontend/antdv";
3
+ import "../../../../config-provider/index.mjs";
4
+ import { useInjectApColumnSetting as L } from "../context.mjs";
5
+ import "./item.vue.mjs";
6
+ import { useLocale as x } from "../../../../config-provider/hooks/use-locale.mjs";
7
+ import { useNamespace as z } from "../../../../config-provider/hooks/use-namespace.mjs";
8
+ import A from "./item.vue2.mjs";
9
+ const j = /* @__PURE__ */ v({
10
+ __name: "index",
11
+ props: {
12
+ customizeTemplateList: {},
13
+ persistenceKey: {},
14
+ onActiveChange: { type: Function }
15
+ },
16
+ setup(B, { expose: c }) {
17
+ const { t: m } = x(), { b: o } = z("ap-column-setting-template-list"), { activeKey: n } = L();
18
+ function p(t) {
19
+ n.value = t;
20
+ }
21
+ function u(t) {
22
+ n.value = t;
23
+ }
24
+ return c({ updateActiveKey: u }), (t, F) => (a(), l(e(h), {
25
+ vertical: "",
26
+ class: s(e(o)())
27
+ }, {
28
+ default: d(() => [
29
+ r("div", {
30
+ class: s(e(o)("title"))
31
+ }, y(e(m)("ap.apTable.setting.templateSetting")), 3),
32
+ f(e(C), { style: { margin: "0" } }),
33
+ r("div", {
34
+ class: s(e(o)("content"))
35
+ }, [
36
+ (a(!0), g(k, null, _(t.customizeTemplateList, (i) => (a(), l(A, {
37
+ key: i.key,
38
+ value: i,
39
+ "is-active": e(n) === i.key,
40
+ "should-remove": t.customizeTemplateList.length > 1,
41
+ onClick: () => p(i.key)
42
+ }, null, 8, ["value", "is-active", "should-remove", "onClick"]))), 128))
43
+ ], 2)
44
+ ]),
45
+ _: 1
46
+ }, 8, ["class"]));
47
+ }
48
+ });
49
+ export {
50
+ j as default
51
+ };
@@ -0,0 +1,13 @@
1
+ import { ApColumnTemplate } from '../../../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type __VLS_Props = {
4
+ value: ApColumnTemplate;
5
+ isActive: boolean;
6
+ onClick: () => void;
7
+ /**
8
+ * 是否可以删除
9
+ */
10
+ shouldRemove?: boolean;
11
+ };
12
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
13
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import f from "./item.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,77 @@
1
+ import { defineComponent as k, ref as b, createElementBlock as m, openBlock as u, normalizeClass as n, unref as t, createElementVNode as c, createVNode as a, toDisplayString as y, withCtx as s, createCommentVNode as g, withModifiers as f } from "vue";
2
+ import { EditOutlined as w, DeleteOutlined as B } from "@ant-design/icons-vue";
3
+ import { Flex as N, Popover as A } from "@aplus-frontend/antdv";
4
+ import "../../../../config-provider/index.mjs";
5
+ import { useInjectApColumnSetting as D } from "../context.mjs";
6
+ import "./edit-form.vue.mjs";
7
+ import { useNamespace as E } from "../../../../config-provider/hooks/use-namespace.mjs";
8
+ import V from "./edit-form.vue2.mjs";
9
+ const I = /* @__PURE__ */ k({
10
+ __name: "item",
11
+ props: {
12
+ value: {},
13
+ isActive: { type: Boolean },
14
+ onClick: { type: Function },
15
+ shouldRemove: { type: Boolean }
16
+ },
17
+ setup(v) {
18
+ const r = v, { b: l } = E("ap-column-setting-template-item"), i = b(!1), { deleteTemplate: d } = D();
19
+ function C(e) {
20
+ if (!e || e === r.value.label)
21
+ return;
22
+ const o = r.value;
23
+ o.label = e, i.value = !1;
24
+ }
25
+ return (e, o) => (u(), m("div", {
26
+ class: n([t(l)(), { [t(l)("active")]: e.isActive }]),
27
+ onClick: o[3] || (o[3] = //@ts-ignore
28
+ (...p) => e.onClick && e.onClick(...p))
29
+ }, [
30
+ c("span", {
31
+ class: n(t(l)("label"))
32
+ }, y(e.value.label), 3),
33
+ a(t(N), {
34
+ gap: 8,
35
+ class: n(t(l)("action-wrapper"))
36
+ }, {
37
+ default: s(() => [
38
+ a(t(A), {
39
+ open: i.value,
40
+ trigger: "click",
41
+ arrow: !1,
42
+ placement: "bottom",
43
+ "destroy-tooltip-on-hide": ""
44
+ }, {
45
+ content: s(() => [
46
+ a(V, {
47
+ "initial-values": { label: e.value.label },
48
+ onConfirm: C,
49
+ onCancel: o[1] || (o[1] = () => i.value = !1)
50
+ }, null, 8, ["initial-values"])
51
+ ]),
52
+ default: s(() => [
53
+ c("span", {
54
+ class: n(t(l)("icon-wrapper")),
55
+ onClick: o[0] || (o[0] = f((p) => i.value = !0, ["stop"]))
56
+ }, [
57
+ a(t(w))
58
+ ], 2)
59
+ ]),
60
+ _: 1
61
+ }, 8, ["open"]),
62
+ e.shouldRemove ? (u(), m("span", {
63
+ key: 0,
64
+ class: n(t(l)("icon-wrapper")),
65
+ onClick: o[2] || (o[2] = f(() => t(d)(e.value.key), ["stop"]))
66
+ }, [
67
+ a(t(B))
68
+ ], 2)) : g("", !0)
69
+ ]),
70
+ _: 1
71
+ }, 8, ["class"])
72
+ ], 2));
73
+ }
74
+ });
75
+ export {
76
+ I as default
77
+ };
@@ -1,4 +1,4 @@
1
1
  import { ApTableSettingTreeSelectProps } from '../../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
- declare const _default: DefineComponent<ApTableSettingTreeSelectProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableSettingTreeSelectProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
3
+ declare const _default: DefineComponent<ApTableSettingTreeSelectProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApTableSettingTreeSelectProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
4
4
  export default _default;
@@ -1,46 +1,43 @@
1
- import { defineComponent as w, computed as v, unref as r, createElementBlock as u, openBlock as o, createVNode as c, withCtx as a, Fragment as f, renderList as b, createBlock as d, mergeProps as x, resolveDynamicComponent as B } from "vue";
2
- import { Row as V, Col as m, Checkbox as I } from "@aplus-frontend/antdv";
1
+ import { defineComponent as v, computed as w, unref as r, createElementBlock as u, createCommentVNode as b, openBlock as o, createVNode as c, withCtx as l, Fragment as f, renderList as x, createBlock as d, mergeProps as B, resolveDynamicComponent as V } from "vue";
2
+ import { Row as N, Col as m, Checkbox as I } from "@aplus-frontend/antdv";
3
3
  import { useInjectApTable as L } from "../../../context.mjs";
4
4
  import "../select-group/index.vue.mjs";
5
- import { getLabelNode as N } from "../utils.mjs";
6
- import P from "../select-group/index.vue2.mjs";
7
- const F = /* @__PURE__ */ w({
5
+ import { getLabelNode as P } from "../utils.mjs";
6
+ import S from "../select-group/index.vue2.mjs";
7
+ const U = { key: 0 }, T = /* @__PURE__ */ v({
8
8
  __name: "index",
9
9
  props: {
10
10
  value: {}
11
11
  },
12
- setup(p) {
13
- const i = p, { columnsBackup: h, renderConfig: k } = L(), g = v(() => [...r(h) || []].sort((e, t) => e.children?.length && !t.children?.length ? 1 : !e.children?.length && t.children?.length ? -1 : 0));
14
- function s(n) {
15
- return i.value.find((e) => e.key === n.key);
12
+ setup(h) {
13
+ const s = h, { columnsBackup: p, renderConfig: k } = L(), g = w(() => [...r(p) || []].sort((e, t) => e.children?.length && !t.children?.length ? 1 : !e.children?.length && t.children?.length ? -1 : 0));
14
+ function i(n) {
15
+ return s.value.find((e) => e.key === n.key);
16
16
  }
17
17
  function C(n) {
18
- const e = s(n);
18
+ const e = i(n);
19
19
  return {
20
20
  checked: e?.show,
21
21
  disabled: e?.disabled
22
22
  };
23
23
  }
24
24
  function _(n, e) {
25
- const l = i.value?.find((y) => y.key === n);
26
- l && (l.show = e);
25
+ const a = s.value?.find((y) => y.key === n);
26
+ a && (a.show = e);
27
27
  }
28
- return (n, e) => (o(), u("div", null, [
29
- c(r(V), {
30
- gutter: [24, 12],
31
- align: "middle"
32
- }, {
33
- default: a(() => [
34
- (o(!0), u(f, null, b(g.value, (t) => (o(), u(f, {
28
+ return (n, e) => n.value?.length ? (o(), u("div", U, [
29
+ c(r(N), { gutter: [24, 12] }, {
30
+ default: l(() => [
31
+ (o(!0), u(f, null, x(g.value, (t) => (o(), u(f, {
35
32
  key: t.key
36
33
  }, [
37
34
  t.children?.length ? (o(), d(r(m), {
38
35
  key: 1,
39
36
  span: 24
40
37
  }, {
41
- default: a(() => [
42
- c(P, {
43
- value: s(t)
38
+ default: l(() => [
39
+ c(S, {
40
+ value: i(t)
44
41
  }, null, 8, ["value"])
45
42
  ]),
46
43
  _: 2
@@ -48,12 +45,12 @@ const F = /* @__PURE__ */ w({
48
45
  key: 0,
49
46
  span: 8
50
47
  }, {
51
- default: a(() => [
52
- c(r(I), x({ ref_for: !0 }, C(t), {
53
- "onUpdate:checked": (l) => _(t.key, l)
48
+ default: l(() => [
49
+ c(r(I), B({ ref_for: !0 }, C(t), {
50
+ "onUpdate:checked": (a) => _(t.key, a)
54
51
  }), {
55
- default: a(() => [
56
- (o(), d(B(r(N)(t, r(k)))))
52
+ default: l(() => [
53
+ (o(), d(V(r(P)(t, r(k)))))
57
54
  ]),
58
55
  _: 2
59
56
  }, 1040, ["onUpdate:checked"])
@@ -64,9 +61,9 @@ const F = /* @__PURE__ */ w({
64
61
  ]),
65
62
  _: 1
66
63
  })
67
- ]));
64
+ ])) : b("", !0);
68
65
  }
69
66
  });
70
67
  export {
71
- F as default
68
+ T as default
72
69
  };
@@ -33,3 +33,4 @@ export declare function getLabelRenderNode(node: any): any;
33
33
  * @returns
34
34
  */
35
35
  export declare function getColumnStateString(columnStates: ApColumnState[]): ApTableSettingDefaultValueType;
36
+ export declare function isEqualColumnStateIgnoreLabel(a: ApColumnState[], b: ApColumnState[]): boolean;
@@ -1,12 +1,12 @@
1
- import { cloneDeepWith as f, isArray as l, omit as u } from "lodash-unified";
2
- import { isVNode as c } from "vue";
1
+ import { cloneDeepWith as f, isArray as l, omit as c, isEqualWith as a } from "lodash-unified";
2
+ import { isVNode as u } from "vue";
3
3
  import { getTableTitle as s } from "../../utils.mjs";
4
- function a(e, n) {
4
+ function d(e, n) {
5
5
  const r = [];
6
6
  for (const t of n) {
7
7
  const i = e.find((o) => o.key === t.key);
8
8
  if (t.children?.length) {
9
- const o = a(
9
+ const o = d(
10
10
  i.children,
11
11
  t.children
12
12
  );
@@ -23,15 +23,15 @@ function a(e, n) {
23
23
  }
24
24
  return r;
25
25
  }
26
- function g(e) {
26
+ function p(e) {
27
27
  return f(e, (n, r) => {
28
28
  if (r === "label")
29
29
  return n;
30
30
  });
31
31
  }
32
- function p(e, n) {
32
+ function b(e, n) {
33
33
  const r = e.title, t = l(r) ? r[0] : r;
34
- return c(t) ? t : s(
34
+ return u(t) ? t : s(
35
35
  e,
36
36
  n?.className || "",
37
37
  void 0,
@@ -39,14 +39,14 @@ function p(e, n) {
39
39
  );
40
40
  }
41
41
  function y(e) {
42
- return c(e) ? e : l(e) ? e[0] : e;
42
+ return u(e) ? e : l(e) ? e[0] : e;
43
43
  }
44
- function b(e) {
44
+ function C(e) {
45
45
  function n(r) {
46
46
  const t = {};
47
47
  return r.forEach((i, o) => {
48
48
  t[i.key] = {
49
- ...u(i, ["label", "key", "children"]),
49
+ ...c(i, ["label", "key", "children"]),
50
50
  order: o,
51
51
  children: i.children?.length ? n(i.children) : void 0
52
52
  };
@@ -54,10 +54,17 @@ function b(e) {
54
54
  }
55
55
  return n(e);
56
56
  }
57
+ function S(e, n) {
58
+ return a(e, n, (r, t, i) => {
59
+ if (i === "label")
60
+ return !0;
61
+ });
62
+ }
57
63
  export {
58
- g as customCloneColumnStates,
59
- a as default,
60
- b as getColumnStateString,
61
- p as getLabelNode,
62
- y as getLabelRenderNode
64
+ p as customCloneColumnStates,
65
+ d as default,
66
+ C as getColumnStateString,
67
+ b as getLabelNode,
68
+ y as getLabelRenderNode,
69
+ S as isEqualColumnStateIgnoreLabel
63
70
  };
@@ -5,13 +5,13 @@ import { ApFieldDateProps, ApFieldDateRangeProps, ApFieldNumberProps, FieldMode,
5
5
  import { ApFormItemSlots, ApFormItemTextPassword, ApActionGroupProps, GroupActionTypes } from '..';
6
6
  import { ValueType } from '@aplus-frontend/antdv/es/input-number/src/utils/MiniDecimal';
7
7
  import { KeyboardEventHandler, FocusEventHandler, ChangeEventHandler, CompositionEventHandler, MouseEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
8
- import { InputNumberProps, RadioChangeEvent, SelectProps, TreeSelectProps, CheckboxOptionType } from '@aplus-frontend/antdv';
9
8
  import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
10
9
  import { VueTypeValidableDef } from '../../node_modules/vue-types';
11
10
  import { VueNode, CustomSlotsType } from '@aplus-frontend/antdv/es/_util/type';
12
11
  import { OnCleanup } from '@vue/reactivity';
13
12
  import { RadioGroupChildOption } from '@aplus-frontend/antdv/es/radio/Group';
14
13
  import { RadioGroupButtonStyle, RadioGroupOptionType } from '@aplus-frontend/antdv/es/radio/interface';
14
+ import { RadioChangeEvent, TreeSelectProps, CheckboxOptionType } from '@aplus-frontend/antdv';
15
15
  import { SelectValue, DefaultOptionType, LabeledValue, BaseOptionType } from '@aplus-frontend/antdv/es/select';
16
16
  import { SelectHandler, FieldNames, FilterFunc } from '@aplus-frontend/antdv/es/vc-select/Select';
17
17
  import { RenderDOMFunc, CustomTagProps, DropdownRender, DisplayValueType } from '@aplus-frontend/antdv/es/vc-select/BaseSelect';
@@ -186,10 +186,10 @@ export declare const apTableFormItemMap: {
186
186
  readonly value?: ValueType | undefined;
187
187
  readonly disabled?: boolean | undefined;
188
188
  readonly placeholder?: string | undefined;
189
+ readonly id?: string | undefined;
189
190
  readonly prefixCls?: string | undefined;
190
191
  readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
191
192
  readonly name?: string | undefined;
192
- readonly id?: string | undefined;
193
193
  readonly readonly?: boolean | undefined;
194
194
  readonly autofocus?: boolean | undefined;
195
195
  readonly bordered?: boolean | undefined;
@@ -221,7 +221,7 @@ export declare const apTableFormItemMap: {
221
221
  offset: ValueType;
222
222
  type: "up" | "down";
223
223
  }) => void) | undefined;
224
- readonly inputMode?: InputNumberProps["mode"];
224
+ readonly inputMode?: "input" | "spinner" | undefined;
225
225
  readonly emptyText?: string | undefined;
226
226
  readonly thousands?: boolean | undefined;
227
227
  readonly limitDecimalsRetain?: boolean | undefined;
@@ -955,12 +955,12 @@ export declare const apTableFormItemMap: {
955
955
  readonly animation?: string | undefined;
956
956
  readonly children?: VueNode[] | undefined;
957
957
  readonly placeholder?: any;
958
+ readonly id?: string | undefined;
958
959
  readonly getPopupContainer?: RenderDOMFunc | undefined;
959
960
  readonly prefixCls?: string | undefined;
960
961
  readonly virtual?: boolean | undefined;
961
962
  readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
962
963
  readonly dropdownMatchSelectWidth?: number | boolean | undefined;
963
- readonly id?: string | undefined;
964
964
  readonly autofocus?: boolean | undefined;
965
965
  readonly loading?: boolean | undefined;
966
966
  readonly bordered?: boolean | undefined;
@@ -1016,14 +1016,14 @@ export declare const apTableFormItemMap: {
1016
1016
  readonly onPopupScroll?: ((e: UIEvent) => void) | undefined;
1017
1017
  readonly onInputKeyDown?: ((e: KeyboardEvent) => void) | undefined;
1018
1018
  readonly emptyText?: string | undefined;
1019
- readonly request?: ((value?: string, extraParams?: Recordable) => Promise< SelectProps["options"]>) | undefined;
1019
+ readonly request?: ((value?: string, extraParams?: Recordable) => Promise< DefaultOptionType[] | undefined>) | undefined;
1020
1020
  readonly multiple?: boolean | undefined;
1021
- readonly value?: SelectProps["value"];
1021
+ readonly value?: (string | number) | LabeledValue | (string | number)[] | LabeledValue[] | undefined;
1022
1022
  readonly 'onUpdate:value'?: (((val: SelectValue) => void) & ((...args: any[]) => any)) | undefined;
1023
- readonly searchMode?: ("filter" | "request") | undefined;
1023
+ readonly searchMode?: "filter" | "request" | undefined;
1024
1024
  readonly refetchOnFocus?: boolean | undefined;
1025
1025
  readonly lazy?: boolean | undefined;
1026
- readonly addAll?: (boolean | number) | undefined;
1026
+ readonly addAll?: boolean | number | undefined;
1027
1027
  readonly params?: Recordable | undefined;
1028
1028
  readonly searchDelay?: number | undefined;
1029
1029
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
@@ -1549,26 +1549,24 @@ export declare const apTableFormItemMap: {
1549
1549
  itemIcon: any;
1550
1550
  removeIcon: any;
1551
1551
  clearIcon: any;
1552
- dropdownRender: any;
1553
- option: any;
1554
1552
  placeholder: any;
1555
1553
  tagRender: any;
1556
1554
  maxTagPlaceholder: any;
1557
1555
  optionLabel: any;
1558
1556
  default: any;
1557
+ dropdownRender: any;
1559
1558
  }> & {
1560
1559
  notFoundContent: any;
1561
1560
  suffixIcon: any;
1562
1561
  itemIcon: any;
1563
1562
  removeIcon: any;
1564
1563
  clearIcon: any;
1565
- dropdownRender: any;
1566
- option: any;
1567
1564
  placeholder: any;
1568
1565
  tagRender: any;
1569
1566
  maxTagPlaceholder: any;
1570
1567
  optionLabel: any;
1571
1568
  default: any;
1569
+ dropdownRender: any;
1572
1570
  };
1573
1571
  }) | null;
1574
1572
  }, any, ComponentProvideOptions, {
@@ -1725,10 +1723,10 @@ export declare const apTableFormItemMap: {
1725
1723
  readonly value?: string | number | undefined;
1726
1724
  readonly disabled?: boolean | undefined;
1727
1725
  readonly placeholder?: string | number | undefined;
1726
+ readonly id?: string | undefined;
1728
1727
  readonly prefixCls?: string | undefined;
1729
1728
  readonly name?: string | undefined;
1730
1729
  readonly focused?: boolean | undefined;
1731
- readonly id?: string | undefined;
1732
1730
  readonly readonly?: boolean | undefined;
1733
1731
  readonly autofocus?: boolean | undefined;
1734
1732
  readonly autocomplete?: string | undefined;
@@ -2353,10 +2351,10 @@ export declare const apTableFormItemMap: {
2353
2351
  readonly value?: string | number | undefined;
2354
2352
  readonly disabled?: boolean | undefined;
2355
2353
  readonly placeholder?: string | number | undefined;
2354
+ readonly id?: string | undefined;
2356
2355
  readonly prefixCls?: string | undefined;
2357
2356
  readonly name?: string | undefined;
2358
2357
  readonly focused?: boolean | undefined;
2359
- readonly id?: string | undefined;
2360
2358
  readonly readonly?: boolean | undefined;
2361
2359
  readonly autofocus?: boolean | undefined;
2362
2360
  readonly autocomplete?: string | undefined;
@@ -2567,12 +2565,12 @@ export declare const apTableFormItemMap: {
2567
2565
  readonly animation?: string | undefined;
2568
2566
  readonly children?: VueNode[] | undefined;
2569
2567
  readonly placeholder?: any;
2568
+ readonly id?: string | undefined;
2570
2569
  readonly getPopupContainer?: RenderDOMFunc | undefined;
2571
2570
  readonly prefixCls?: string | undefined;
2572
2571
  readonly virtual?: boolean | undefined;
2573
2572
  readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
2574
2573
  readonly dropdownMatchSelectWidth?: number | boolean | undefined;
2575
- readonly id?: string | undefined;
2576
2574
  readonly autofocus?: boolean | undefined;
2577
2575
  readonly loading?: boolean | undefined;
2578
2576
  readonly bordered?: boolean | undefined;
@@ -1,5 +1,5 @@
1
1
  import { provide as s, inject as a, computed as t } from "vue";
2
- const r = Symbol("apTableContextKey");
2
+ const r = /* @__PURE__ */ Symbol("apTableContextKey");
3
3
  function n(o) {
4
4
  s(r, o);
5
5
  }
@@ -1,30 +1,11 @@
1
- import { Ref, ComputedRef, ShallowRef } from 'vue';
2
- import { ApColumnState, ApTableSettingType } from '../interface';
3
- export declare const useTableColumnState: (columnSetting: ApTableSettingType, persistenceKey: Ref<string | undefined>, initialColumnState: ApColumnState[]) => {
4
- columnState: Ref<{
5
- key: string | number;
6
- show?: boolean | undefined;
7
- fixed?: ("left" | "right") | undefined;
8
- disabled?: boolean | undefined;
9
- label?: any;
10
- children?: any[] | undefined;
11
- order?: number | undefined;
12
- }[], ApColumnState[] | {
13
- key: string | number;
14
- show?: boolean | undefined;
15
- fixed?: ("left" | "right") | undefined;
16
- disabled?: boolean | undefined;
17
- label?: any;
18
- children?: any[] | undefined;
19
- order?: number | undefined;
20
- }[]>;
1
+ import { Ref, ComputedRef } from 'vue';
2
+ import { ApColumnState } from '../interface';
3
+ export declare const useTableColumnState: (initialColumnState: ApColumnState[]) => {
4
+ columnState: Ref<ApColumnState[], ApColumnState[]>;
21
5
  selectAll: () => void;
22
6
  unSelectAll: () => void;
23
7
  toggleSelect: (key: string, show?: boolean) => void;
24
8
  setColumnState: (nextColumnState: ApColumnState[]) => void;
25
9
  isAllSelected: ComputedRef<boolean>;
26
10
  toggleSelectAll: () => void;
27
- columnStateBackup: ShallowRef<ApColumnState[], ApColumnState[]>;
28
- setColumnStateBackup: (nextBackup: ApColumnState[]) => void;
29
- cacheColumnStateIfNeeded: (nextColumnState: ApColumnState[]) => void;
30
11
  };