@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,18 @@
1
+ import { provide as o, inject as i, ref as e } from "vue";
2
+ const t = /* @__PURE__ */ Symbol("ap-column-setting");
3
+ function u(n) {
4
+ o(t, n);
5
+ }
6
+ function m() {
7
+ return i(t, {
8
+ activeKey: e(),
9
+ cacheConfig: e(),
10
+ deleteTemplate: () => {
11
+ }
12
+ });
13
+ }
14
+ export {
15
+ t as ApColumnSettingContextKey,
16
+ m as useInjectApColumnSetting,
17
+ u as useProvideApColumnSetting
18
+ };
@@ -1,6 +1,6 @@
1
1
  import { ApTableSettingModalProps } from '../../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
- import { ApTableSettingType } from '../../..';
3
+ import { ApTableSettingType } from '../../../interface';
4
4
  type TableSettingModalSlots = {
5
5
  trigger?: any;
6
6
  };
@@ -1,135 +1,264 @@
1
- import { defineComponent as M, ref as v, unref as e, computed as P, useSlots as q, createVNode as t, cloneVNode as H, createElementBlock as J, openBlock as k, Fragment as Q, createBlock as W, createCommentVNode as X, resolveDynamicComponent as Y, withCtx as r, withDirectives as Z, createElementVNode as s, normalizeClass as i, toDisplayString as m, createTextVNode as S, isRef as ee, vShow as te } from "vue";
2
- import { SettingOutlined as le } from "@ant-design/icons-vue";
3
- import { Button as y, Modal as ae, RadioGroup as ne, RadioButton as T, Divider as x } from "@aplus-frontend/antdv";
1
+ import { defineComponent as re, ref as v, computed as pe, toRef as ue, useSlots as ce, createVNode as l, cloneVNode as me, unref as e, watch as O, createElementBlock as U, openBlock as S, Fragment as de, createBlock as w, createCommentVNode as E, resolveDynamicComponent as A, withCtx as o, withDirectives as fe, createElementVNode as c, normalizeClass as p, toDisplayString as g, createTextVNode as C, isRef as ve, vShow as ge } from "vue";
2
+ import { SettingOutlined as ye, SaveOutlined as Se } from "@ant-design/icons-vue";
3
+ import { Button as P, Modal as Te, Divider as B, RadioGroup as be, RadioButton as j, Flex as ke, Space as F, Popover as Ce } from "@aplus-frontend/antdv";
4
+ import "../../../../ap-button/index.mjs";
5
+ import { randomStr as he } from "../../../../utils/index.mjs";
4
6
  import "../../../../config-provider/index.mjs";
5
- import { getSingleVNode as oe } from "../../../../utils/slot.mjs";
6
- import { useInjectApTable as se } from "../../../context.mjs";
7
- import { useTableColumnState as ie } from "../../../hooks/use-table-column-state.mjs";
8
- import re from "../../../style/setting.mjs";
7
+ import { getSingleVNode as _e } from "../../../../utils/slot.mjs";
8
+ import { useInjectApTable as ze } from "../../../context.mjs";
9
+ import { useTableColumnState as xe } from "../../../hooks/use-table-column-state.mjs";
10
+ import { useTableTemplateStorage as we } from "../../../hooks/use-table-template-storage.mjs";
11
+ import Ae from "../../../style/setting.mjs";
12
+ import { useProvideApColumnSetting as Be } from "../context.mjs";
9
13
  import "../sorter/index.vue.mjs";
14
+ import "../template/edit-form.vue.mjs";
15
+ import "../template/index.vue.mjs";
10
16
  import "../tree-select/index.vue.mjs";
11
- import ue, { customCloneColumnStates as B } from "../utils.mjs";
12
- import { useLocale as pe } from "../../../../config-provider/hooks/use-locale.mjs";
13
- import { useNamespace as N } from "../../../../config-provider/hooks/use-namespace.mjs";
14
- import ce from "../tree-select/index.vue2.mjs";
15
- import me from "../sorter/index.vue2.mjs";
16
- const we = /* @__PURE__ */ M({
17
+ import Ne, { customCloneColumnStates as N, isEqualColumnStateIgnoreLabel as Ie } from "../utils.mjs";
18
+ import { useLocale as $e } from "../../../../config-provider/hooks/use-locale.mjs";
19
+ import { useNamespace as M } from "../../../../config-provider/hooks/use-namespace.mjs";
20
+ import Le from "../template/index.vue2.mjs";
21
+ import Re from "../tree-select/index.vue2.mjs";
22
+ import Ve from "../sorter/index.vue2.mjs";
23
+ import De from "../../../../ap-button/ap-button.vue.mjs";
24
+ import Ke from "../template/edit-form.vue2.mjs";
25
+ const Oe = {
26
+ style: {
27
+ "padding-inline": "8px"
28
+ }
29
+ }, pt = /* @__PURE__ */ re({
17
30
  name: "ApTableSetting",
18
31
  __name: "index",
19
32
  props: {
20
33
  config: {
21
- default: () => ({})
34
+ default: () => ({
35
+ persistenceKey: ""
36
+ })
22
37
  }
23
38
  },
24
- setup(_) {
25
- const d = _, {
26
- columnsBackup: w,
27
- size: z,
28
- updateSize: A,
29
- updateColumns: V
30
- } = se(), f = v(e(z)), R = P(() => d.config.persistenceKey), {
31
- columnState: a,
32
- setColumnState: D,
33
- isAllSelected: O,
34
- toggleSelectAll: $,
35
- columnStateBackup: I,
36
- setColumnStateBackup: U,
37
- cacheColumnStateIfNeeded: E
38
- } = ie(d.config, R, []), {
39
- t: n
40
- } = pe(), {
41
- b: u,
42
- be: g
43
- } = N("ap-column-setting"), {
44
- b: K
45
- } = N("ap-table"), j = re("ap-column-setting"), p = v(!1), C = v(!1), F = q(), b = oe(F.trigger) || t(y, {
46
- icon: t(le, null, null),
47
- class: K("setting-trigger-button")
48
- }, null), h = b ? H(b, {
39
+ setup(q) {
40
+ const T = q, {
41
+ columnsBackup: G,
42
+ updateSize: H,
43
+ updateColumns: J
44
+ } = ze(), m = v(), h = pe(() => T.config.persistenceKey), _ = `${h.value}__active_key`, b = v(!1), {
45
+ basicTemplate: Q,
46
+ customizeTemplateList: d,
47
+ addTemplate: W,
48
+ deleteTemplate: I,
49
+ updateTemplate: X
50
+ } = we(T.config, h), {
51
+ columnState: u,
52
+ setColumnState: $,
53
+ isAllSelected: Y,
54
+ toggleSelectAll: Z
55
+ } = xe([]), i = v(localStorage.getItem(_) ?? d.value?.[0].key);
56
+ Be({
57
+ activeKey: i,
58
+ cacheConfig: ue(T, "config"),
59
+ deleteTemplate: ie
60
+ });
61
+ const {
62
+ t: s
63
+ } = $e(), {
64
+ b: f,
65
+ be: k
66
+ } = M("ap-column-setting"), {
67
+ b: ee
68
+ } = M("ap-table"), te = Ae("ap-column-setting"), y = v(!1), L = v(!1), ae = ce(), R = _e(ae.trigger) || l(P, {
69
+ icon: l(ye, null, null),
70
+ class: ee("setting-trigger-button")
71
+ }, null), V = R ? me(R, {
49
72
  onClick: () => {
50
- p.value = !0;
73
+ y.value = !0;
51
74
  }
52
75
  }) : null;
53
- function G() {
54
- D(B(e(I)));
76
+ function le() {
77
+ $(N(e(Q).columnState));
78
+ }
79
+ function D(a, t) {
80
+ J?.(Ne(e(G), a)), H?.(t);
81
+ }
82
+ function ne() {
83
+ D(e(u), e(m)), y.value = !1;
84
+ const a = N(u.value), t = X(i.value, {
85
+ columnState: a,
86
+ size: m.value
87
+ });
88
+ localStorage.setItem(_, i.value), T.config?.onChange?.(a, t);
89
+ }
90
+ function oe(a) {
91
+ const t = he();
92
+ W({
93
+ key: t,
94
+ label: a,
95
+ columnState: u.value,
96
+ size: m.value
97
+ }), b.value = !1, i.value = t;
98
+ }
99
+ function K(a) {
100
+ const t = [...d.value].find((n) => n?.key === a);
101
+ t && ($(N(t.columnState)), m.value = t.size);
55
102
  }
56
- function L() {
57
- V?.(ue(e(w), e(a))), A?.(e(f)), p.value = !1;
58
- const c = B(a.value);
59
- U(c), E(c), d.config?.onChange?.(c);
103
+ function ie(a) {
104
+ if (a !== i.value) {
105
+ I(a);
106
+ return;
107
+ }
108
+ const t = d.value, n = t.findIndex((x) => x.key === a), r = t[n + 1]?.key ?? t[n - 1]?.key;
109
+ I(a), i.value = r;
110
+ }
111
+ function se(a) {
112
+ if (L.value = a, !a) {
113
+ const t = localStorage.getItem(_);
114
+ t && t !== i.value && (i.value = t);
115
+ }
60
116
  }
61
- return (c, o) => (k(), J(Q, null, [e(h) ? (k(), W(Y(e(h)), {
117
+ O(() => i.value, (a, t) => {
118
+ if (!t && a) {
119
+ const n = [...d.value].find((r) => r?.key === a);
120
+ D(n.columnState, n.size);
121
+ }
122
+ K(a);
123
+ }, {
124
+ immediate: !0
125
+ });
126
+ const z = v(!1);
127
+ return O([m, u, y], ([a, t, n]) => {
128
+ if (!n)
129
+ return;
130
+ const r = d.value.find((x) => x.key === i.value);
131
+ r && (r.size !== a || !Ie(t, r.columnState)) ? z.value = !0 : z.value = !1;
132
+ }, {
133
+ deep: !0
134
+ }), (a, t) => (S(), U(de, null, [e(V) ? (S(), w(A(e(V)), {
62
135
  key: 0
63
- })) : X("", !0), t(e(ae), {
64
- open: p.value,
65
- "onUpdate:open": o[2] || (o[2] = (l) => p.value = l),
66
- title: e(n)("ap.apTable.setting.title"),
67
- width: 900,
136
+ })) : E("", !0), l(e(Te), {
137
+ open: y.value,
138
+ "onUpdate:open": t[4] || (t[4] = (n) => y.value = n),
139
+ title: e(s)("ap.apTable.setting.title"),
140
+ width: 1e3,
68
141
  centered: !0,
69
142
  "body-style": {
70
143
  padding: "0px !important",
71
- height: "450px"
144
+ height: "516px"
72
145
  },
73
- "after-open-change": (l) => C.value = l,
74
- "wrap-class-name": `${e(u)()} ${e(j)}`,
75
- onOk: L
146
+ "after-open-change": se,
147
+ "wrap-class-name": `${e(f)()} ${e(te)}`,
148
+ "ok-text": e(s)("ap.apTable.setting.saveAndApply"),
149
+ onOk: ne
76
150
  }, {
77
- default: r(() => [Z(s("div", {
78
- class: i(e(u)("wrapper"))
79
- }, [s("div", {
80
- class: i(e(u)("left"))
81
- }, [s("div", {
82
- class: i(e(g)("left", "header"))
83
- }, [s("div", null, [s("span", {
84
- class: i(e(g)("left", "header-tips"))
85
- }, m(e(n)("ap.apTable.setting.selectAllTip")), 3), t(e(y), {
151
+ footer: o(({
152
+ extra: n
153
+ }) => [l(e(ke), {
154
+ justify: "space-between"
155
+ }, {
156
+ default: o(() => [l(e(F), {
157
+ size: 12
158
+ }, {
159
+ default: o(() => [l(e(Ce), {
160
+ open: b.value,
161
+ "onUpdate:open": t[3] || (t[3] = (r) => b.value = r),
162
+ trigger: "click",
163
+ arrow: !1,
164
+ placement: "topLeft",
165
+ "destroy-tooltip-on-hide": ""
166
+ }, {
167
+ content: o(() => [l(Ke, {
168
+ onConfirm: oe,
169
+ onCancel: t[2] || (t[2] = () => b.value = !1)
170
+ })]),
171
+ default: o(() => [l(e(De), {
172
+ type: "borderLink"
173
+ }, {
174
+ icon: o(() => [l(e(Se))]),
175
+ default: o(() => [C(g(e(s)("ap.apTable.setting.saveAsTemplate")) + " ", 1)]),
176
+ _: 1
177
+ })]),
178
+ _: 1
179
+ }, 8, ["open"]), z.value ? (S(), U("span", {
180
+ key: 0,
181
+ class: p(e(f)("modify-tip"))
182
+ }, g(e(s)("ap.apTable.setting.modifyNotification")), 3)) : E("", !0)]),
183
+ _: 1
184
+ }), l(e(F), {
185
+ size: 10
186
+ }, {
187
+ default: o(() => [(S(), w(A(n.cancelBtn))), (S(), w(A(n.okBtn)))]),
188
+ _: 2
189
+ }, 1024)]),
190
+ _: 2
191
+ }, 1024)]),
192
+ default: o(() => [fe(c("div", {
193
+ class: p(e(f)("wrapper"))
194
+ }, [c("div", {
195
+ class: p(e(f)("left"))
196
+ }, [l(Le, {
197
+ "customize-template-list": e(d),
198
+ "persistence-key": h.value,
199
+ onActiveChange: K
200
+ }, null, 8, ["customize-template-list", "persistence-key"])], 2), l(e(B), {
201
+ type: "vertical",
202
+ style: {
203
+ height: "100%",
204
+ margin: "0px"
205
+ }
206
+ }), c("div", {
207
+ class: p(e(f)("center"))
208
+ }, [c("div", {
209
+ class: p(e(k)("center", "header"))
210
+ }, [c("div", {
211
+ class: p(e(k)("center", "tip-wrapper"))
212
+ }, [c("span", {
213
+ class: p(e(k)("center", "header-tips"))
214
+ }, g(e(s)("ap.apTable.setting.selectAllTip")), 3), l(e(P), {
86
215
  type: "link",
87
216
  size: "small",
88
- onClick: e($)
217
+ onClick: e(Z)
89
218
  }, {
90
- default: r(() => [S(m(e(O) ? e(n)("ap.apTable.setting.unSelectAll") : e(n)("ap.apTable.setting.selectAll")), 1)]),
219
+ default: o(() => [C(g(e(Y) ? e(s)("ap.apTable.setting.unSelectAll") : e(s)("ap.apTable.setting.selectAll")), 1)]),
91
220
  _: 1
92
- }, 8, ["onClick"])]), t(e(ne), {
93
- value: f.value,
94
- "onUpdate:value": o[0] || (o[0] = (l) => f.value = l)
221
+ }, 8, ["onClick"])], 2), l(e(be), {
222
+ value: m.value,
223
+ "onUpdate:value": t[0] || (t[0] = (n) => m.value = n)
95
224
  }, {
96
- default: r(() => [t(e(T), {
225
+ default: o(() => [l(e(j), {
97
226
  value: "small"
98
227
  }, {
99
- default: r(() => [S(m(e(n)("ap.apTable.setting.sizeSmall")), 1)]),
228
+ default: o(() => [C(g(e(s)("ap.apTable.setting.sizeSmall")), 1)]),
100
229
  _: 1
101
- }), t(e(T), {
230
+ }), l(e(j), {
102
231
  value: "middle"
103
232
  }, {
104
- default: r(() => [S(m(e(n)("ap.apTable.setting.sizeNormal")), 1)]),
233
+ default: o(() => [C(g(e(s)("ap.apTable.setting.sizeNormal")), 1)]),
105
234
  _: 1
106
235
  })]),
107
236
  _: 1
108
- }, 8, ["value"])], 2), t(e(x), {
237
+ }, 8, ["value"])], 2), c("div", Oe, [l(e(B), {
109
238
  dashed: "",
110
239
  style: {
111
240
  margin: "0px"
112
241
  }
113
- }), t(ce, {
114
- class: i(e(g)("left", "content")),
115
- value: e(a)
116
- }, null, 8, ["class", "value"])], 2), t(e(x), {
242
+ })]), l(Re, {
243
+ class: p(e(k)("center", "content")),
244
+ value: e(u)
245
+ }, null, 8, ["class", "value"])], 2), l(e(B), {
117
246
  type: "vertical",
118
247
  style: {
119
248
  height: "100%",
120
249
  margin: "0px"
121
250
  }
122
- }), s("div", {
123
- class: i(e(u)("right"))
124
- }, [t(me, {
125
- value: e(a),
126
- "onUpdate:value": o[1] || (o[1] = (l) => ee(a) ? a.value = l : null),
127
- onReset: G
128
- }, null, 8, ["value"])], 2)], 2), [[te, C.value]])]),
251
+ }), c("div", {
252
+ class: p(e(f)("right"))
253
+ }, [l(Ve, {
254
+ value: e(u),
255
+ "onUpdate:value": t[1] || (t[1] = (n) => ve(u) ? u.value = n : null),
256
+ onReset: le
257
+ }, null, 8, ["value"])], 2)], 2), [[ge, L.value]])]),
129
258
  _: 1
130
- }, 8, ["open", "title", "after-open-change", "wrap-class-name"])], 64));
259
+ }, 8, ["open", "title", "wrap-class-name", "ok-text"])], 64));
131
260
  }
132
261
  });
133
262
  export {
134
- we as default
263
+ pt as default
135
264
  };
@@ -1,5 +1,5 @@
1
1
  import { provide as o, inject as r } from "vue";
2
- const e = Symbol("apTableSorterContextKey");
2
+ const e = /* @__PURE__ */ Symbol("apTableSorterContextKey");
3
3
  function i(t) {
4
4
  o(e, t);
5
5
  }
@@ -1,5 +1,5 @@
1
- import { defineComponent as A, ref as L, unref as n, computed as O, watch as $, createElementBlock as y, openBlock as r, normalizeClass as c, createVNode as m, createElementVNode as v, withCtx as g, toDisplayString as k, createTextVNode as q, createCommentVNode as p, createBlock as b } from "vue";
2
- import { Flex as G, Button as H, Divider as J } from "@aplus-frontend/antdv";
1
+ import { defineComponent as A, ref as w, unref as n, computed as O, watch as $, createElementBlock as k, openBlock as u, normalizeClass as c, createVNode as m, createElementVNode as v, withCtx as g, toDisplayString as y, createTextVNode as q, createCommentVNode as p, createBlock as b } from "vue";
2
+ import { Flex as G, Typography as H, Divider as J } from "@aplus-frontend/antdv";
3
3
  import N from "vuedraggable";
4
4
  import "../../../../config-provider/index.mjs";
5
5
  import "../sortable/index.vue.mjs";
@@ -7,15 +7,15 @@ import { useProvideSorterMethods as K } from "./context.mjs";
7
7
  import { useNamespace as P } from "../../../../config-provider/hooks/use-namespace.mjs";
8
8
  import { useLocale as Q } from "../../../../config-provider/hooks/use-locale.mjs";
9
9
  import R from "../sortable/index.vue2.mjs";
10
- const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, re = /* @__PURE__ */ A({
10
+ const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, ue = /* @__PURE__ */ A({
11
11
  __name: "index",
12
12
  props: {
13
13
  value: {},
14
14
  onReset: { type: Function }
15
15
  },
16
16
  emits: ["update:value"],
17
- setup(V, { emit: B }) {
18
- const l = L([]), i = L([]), s = L([]), { b: u } = P("ap-column-setting-sorter"), { t: h } = Q(), x = V, S = B;
17
+ setup(V, { emit: S }) {
18
+ const l = w([]), i = w([]), s = w([]), { b: r } = P("ap-column-setting-sorter"), { t: h } = Q(), x = V, B = S;
19
19
  K({
20
20
  fixedToLeft: I,
21
21
  fixedToRight: M,
@@ -29,42 +29,42 @@ const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, re = /* @__PURE__ */ A({
29
29
  t[0].splice(o, 1);
30
30
  else {
31
31
  const a = t[1].findIndex(
32
- (f) => f.key === e.key
32
+ (d) => d.key === e.key
33
33
  );
34
34
  t[1].splice(a, 1);
35
35
  }
36
36
  }
37
37
  function _(e, t) {
38
- const o = [...n(l.value)], a = [...n(s.value)], f = [...n(i.value)], w = {
38
+ const o = [...n(l.value)], a = [...n(s.value)], d = [...n(i.value)], L = {
39
39
  left: {
40
40
  target: o,
41
- search: [f, a]
41
+ search: [d, a]
42
42
  },
43
43
  right: {
44
44
  target: a,
45
- search: [f, o]
45
+ search: [d, o]
46
46
  },
47
47
  normal: {
48
- target: f,
48
+ target: d,
49
49
  search: [o, a]
50
50
  }
51
51
  }[t];
52
- return t === "right" ? w.target.unshift(e) : w.target.push(e), F(
52
+ return t === "right" ? L.target.unshift(e) : L.target.push(e), F(
53
53
  e,
54
- w.search
55
- ), [...o, ...f, ...a];
54
+ L.search
55
+ ), [...o, ...d, ...a];
56
56
  }
57
57
  function I(e) {
58
58
  const t = _(e, "left");
59
- d(t);
59
+ f(t);
60
60
  }
61
61
  function M(e) {
62
62
  const t = _(e, "right");
63
- d(t);
63
+ f(t);
64
64
  }
65
65
  function U(e) {
66
66
  const t = _(e, "normal");
67
- d(t);
67
+ f(t);
68
68
  }
69
69
  function C(e) {
70
70
  return e.children?.length ? e.children.some((t) => t.show) : e.show;
@@ -72,7 +72,7 @@ const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, re = /* @__PURE__ */ A({
72
72
  function T(e, t) {
73
73
  e.value ? e.value.push(t) : e.value = [t];
74
74
  }
75
- const z = O(() => {
75
+ const D = O(() => {
76
76
  let e = 0;
77
77
  function t(o) {
78
78
  for (const a of o)
@@ -80,17 +80,17 @@ const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, re = /* @__PURE__ */ A({
80
80
  }
81
81
  return t(x.value), e;
82
82
  });
83
- function D(e) {
84
- d([...e, ...n(i), ...n(s)]);
85
- }
86
83
  function E(e) {
87
- d([...n(l), ...e, ...n(s)]);
84
+ f([...e, ...n(i), ...n(s)]);
88
85
  }
89
86
  function j(e) {
90
- d([...n(l), ...n(i), ...e]);
87
+ f([...n(l), ...e, ...n(s)]);
88
+ }
89
+ function z(e) {
90
+ f([...n(l), ...n(i), ...e]);
91
91
  }
92
- function d(e) {
93
- S("update:value", e);
92
+ function f(e) {
93
+ B("update:value", e);
94
94
  }
95
95
  return $(
96
96
  () => x.value,
@@ -102,26 +102,24 @@ const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, re = /* @__PURE__ */ A({
102
102
  }
103
103
  },
104
104
  { immediate: !0 }
105
- ), (e, t) => (r(), y("div", {
106
- class: c(n(u)())
105
+ ), (e, t) => (u(), k("div", {
106
+ class: c(n(r)())
107
107
  }, [
108
108
  m(n(G), {
109
- class: c(n(u)("header")),
109
+ class: c(n(r)("header")),
110
110
  align: "center",
111
111
  justify: "space-between"
112
112
  }, {
113
113
  default: g(() => [
114
114
  v("span", {
115
- class: c(n(u)("header-title"))
116
- }, k(n(h)("ap.apTable.setting.selectCount", { count: z.value })), 3),
117
- m(n(H), {
118
- type: "link",
119
- size: "small",
120
- style: { padding: "0" },
115
+ class: c(n(r)("header-title")),
116
+ style: { flex: "1" }
117
+ }, y(n(h)("ap.apTable.setting.selectCount", { count: D.value })), 3),
118
+ m(n(H).Link, {
121
119
  onClick: x.onReset
122
120
  }, {
123
121
  default: g(() => [
124
- q(k(n(h)("ap.apTable.setting.reset")), 1)
122
+ q(y(n(h)("ap.apTable.setting.reset")), 1)
125
123
  ]),
126
124
  _: 1
127
125
  }, 8, ["onClick"])
@@ -130,19 +128,19 @@ const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, re = /* @__PURE__ */ A({
130
128
  }, 8, ["class"]),
131
129
  m(n(J), { style: { margin: "0px" } }),
132
130
  v("div", {
133
- class: c(n(u)("content"))
131
+ class: c(n(r)("content"))
134
132
  }, [
135
- l.value.length ? (r(), y("div", W, [
133
+ l.value.length ? (u(), k("div", W, [
136
134
  v("span", {
137
- class: c(n(u)("section-title"))
138
- }, k(n(h)("ap.apTable.setting.fixToLeft")), 3),
135
+ class: c(n(r)("section-title"))
136
+ }, y(n(h)("ap.apTable.setting.fixToLeft")), 3),
139
137
  m(n(N), {
140
138
  "model-value": l.value,
141
139
  "item-key": "key",
142
- "onUpdate:modelValue": D
140
+ "onUpdate:modelValue": E
143
141
  }, {
144
142
  item: g(({ element: o }) => [
145
- C(o) ? (r(), b(R, {
143
+ C(o) ? (u(), b(R, {
146
144
  key: 0,
147
145
  value: o
148
146
  }, null, 8, ["value"])) : p("", !0)
@@ -150,17 +148,17 @@ const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, re = /* @__PURE__ */ A({
150
148
  _: 1
151
149
  }, 8, ["model-value"])
152
150
  ])) : p("", !0),
153
- i.value.length ? (r(), y("div", X, [
151
+ i.value.length ? (u(), k("div", X, [
154
152
  v("span", {
155
- class: c(n(u)("section-title"))
156
- }, k(n(h)("ap.apTable.setting.unFixed")), 3),
153
+ class: c(n(r)("section-title"))
154
+ }, y(n(h)("ap.apTable.setting.unFixed")), 3),
157
155
  m(n(N), {
158
156
  "model-value": i.value,
159
157
  "item-key": "key",
160
- "onUpdate:modelValue": E
158
+ "onUpdate:modelValue": j
161
159
  }, {
162
160
  item: g(({ element: o }) => [
163
- C(o) ? (r(), b(R, {
161
+ C(o) ? (u(), b(R, {
164
162
  key: 0,
165
163
  value: o
166
164
  }, null, 8, ["value"])) : p("", !0)
@@ -168,17 +166,17 @@ const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, re = /* @__PURE__ */ A({
168
166
  _: 1
169
167
  }, 8, ["model-value"])
170
168
  ])) : p("", !0),
171
- s.value.length ? (r(), y("div", Y, [
169
+ s.value.length ? (u(), k("div", Y, [
172
170
  v("span", {
173
- class: c(n(u)("section-title"))
174
- }, k(n(h)("ap.apTable.setting.fixToRight")), 3),
171
+ class: c(n(r)("section-title"))
172
+ }, y(n(h)("ap.apTable.setting.fixToRight")), 3),
175
173
  m(n(N), {
176
174
  "model-value": s.value,
177
175
  "item-key": "key",
178
- "onUpdate:modelValue": j
176
+ "onUpdate:modelValue": z
179
177
  }, {
180
178
  item: g(({ element: o }) => [
181
- C(o) ? (r(), b(R, {
179
+ C(o) ? (u(), b(R, {
182
180
  key: 0,
183
181
  value: o
184
182
  }, null, 8, ["value"])) : p("", !0)
@@ -191,5 +189,5 @@ const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, re = /* @__PURE__ */ A({
191
189
  }
192
190
  });
193
191
  export {
194
- re as default
192
+ ue as default
195
193
  };