@aplus-frontend/ui 7.12.6 → 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 (168) 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.mjs +33 -31
  6. package/es/src/ag-grid/editable/index.vue.mjs +1 -0
  7. package/es/src/ag-grid/hooks/use-pinned-row.mjs +2 -2
  8. package/es/src/ag-grid/index.vue.mjs +209 -202
  9. package/es/src/ag-grid/interface.d.ts +4 -0
  10. package/es/src/ag-grid/style/index.mjs +8 -5
  11. package/es/src/ap-drawer/interface.d.ts +13 -2
  12. package/es/src/ap-drawer/utils/createDrawer.mjs +37 -32
  13. package/es/src/ap-field/select/index.vue.d.ts +1 -2
  14. package/es/src/ap-field/select/index.vue.mjs +126 -88
  15. package/es/src/ap-field/style/index.mjs +8 -6
  16. package/es/src/ap-field/style/select.d.ts +2 -0
  17. package/es/src/ap-field/style/select.mjs +43 -0
  18. package/es/src/ap-form/context.mjs +1 -1
  19. package/es/src/ap-form/item-group/helper.mjs +2 -2
  20. package/es/src/ap-form/items/select/index.vue.d.ts +4 -8
  21. package/es/src/ap-form/provider/context.mjs +1 -1
  22. package/es/src/ap-grid/utils/table.mjs +2 -2
  23. package/es/src/ap-pro-card/components/card/index.vue2.mjs +2 -2
  24. package/es/src/ap-table/ap-table.vue2.mjs +15 -16
  25. package/es/src/ap-table/components/setting/context.d.ts +17 -0
  26. package/es/src/ap-table/components/setting/context.mjs +18 -0
  27. package/es/src/ap-table/components/setting/modal/index.vue.d.ts +1 -1
  28. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +217 -88
  29. package/es/src/ap-table/components/setting/sorter/context.mjs +1 -1
  30. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +49 -51
  31. package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +844 -0
  32. package/es/src/ap-table/components/setting/template/edit-form.vue.mjs +4 -0
  33. package/es/src/ap-table/components/setting/template/edit-form.vue2.mjs +74 -0
  34. package/es/src/ap-table/components/setting/template/index.vue.d.ts +11 -0
  35. package/es/src/ap-table/components/setting/template/index.vue.mjs +4 -0
  36. package/es/src/ap-table/components/setting/template/index.vue2.mjs +51 -0
  37. package/es/src/ap-table/components/setting/template/item.vue.d.ts +13 -0
  38. package/es/src/ap-table/components/setting/template/item.vue.mjs +4 -0
  39. package/es/src/ap-table/components/setting/template/item.vue2.mjs +77 -0
  40. package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
  41. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +26 -29
  42. package/es/src/ap-table/components/setting/utils.d.ts +1 -0
  43. package/es/src/ap-table/components/setting/utils.mjs +22 -15
  44. package/es/src/ap-table/constants.d.ts +2 -4
  45. package/es/src/ap-table/context.mjs +1 -1
  46. package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -23
  47. package/es/src/ap-table/hooks/use-table-column-state.mjs +32 -120
  48. package/es/src/ap-table/hooks/use-table-template-storage.d.ts +49 -0
  49. package/es/src/ap-table/hooks/use-table-template-storage.mjs +150 -0
  50. package/es/src/ap-table/interface.d.ts +26 -3
  51. package/es/src/ap-table/style/index.d.ts +1 -0
  52. package/es/src/ap-table/style/index.mjs +2 -1
  53. package/es/src/ap-table/style/setting.d.ts +2 -0
  54. package/es/src/ap-table/style/setting.mjs +114 -19
  55. package/es/src/ap-table/utils.mjs +1 -1
  56. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.mjs +1 -1
  57. package/es/src/business/ag-grid-modal/style/index.mjs +7 -7
  58. package/es/src/business/ap-attachment/ApAttachment.mjs +96 -89
  59. package/es/src/business/ap-attachment/style/index.mjs +33 -16
  60. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +24 -22
  61. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +1 -1
  62. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +35 -31
  63. package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
  64. package/es/src/business/ap-batch-action-group/interface.d.ts +1 -1
  65. package/es/src/business/ap-download/hooks/index.mjs +1 -1
  66. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +1 -3
  67. package/es/src/business/ap-keep-alive/hook.mjs +1 -1
  68. package/es/src/business/ap-keep-alive/utils.mjs +1 -1
  69. package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +19 -19
  70. package/es/src/business/ap-upload/components/Picture.vue2.mjs +34 -34
  71. package/es/src/business/ap-value-select-card/style/index.mjs +3 -2
  72. package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +21 -21
  73. package/es/src/business/ap-view/hooks/use-view-provide.mjs +1 -1
  74. package/es/src/business/ap-view/style/index.mjs +2 -2
  75. package/es/src/check-card/context.mjs +1 -1
  76. package/es/src/config-provider/constants.mjs +1 -1
  77. package/es/src/config-provider/hooks/use-locale.mjs +1 -1
  78. package/es/src/config-provider/hooks/use-namespace.mjs +1 -1
  79. package/es/src/config-provider/hooks/use-token.mjs +1 -1
  80. package/es/src/design-token/index.mjs +5 -5
  81. package/es/src/editable-table/utils.mjs +1 -1
  82. package/es/src/locale/lang/en.mjs +15 -4
  83. package/es/src/locale/lang/zh-cn.mjs +18 -7
  84. package/es/src/text/context.mjs +1 -1
  85. package/es/src/time-ago/useTimeAgo.mjs +26 -27
  86. package/es/src/utils/data-range-persets.d.ts +13 -1
  87. package/es/src/utils/data-range-persets.mjs +80 -60
  88. package/es/src/utils/index.d.ts +1 -0
  89. package/es/src/utils/index.mjs +56 -48
  90. package/es/src/utils/retry.d.ts +12 -0
  91. package/es/src/utils/retry.mjs +27 -0
  92. package/es/src/utils/slot.mjs +1 -1
  93. package/es/src/version.d.ts +1 -1
  94. package/es/src/version.mjs +1 -1
  95. package/lib/src/ag-grid/components/loading/index.vue.d.ts +3 -0
  96. package/lib/src/ag-grid/components/loading/index.vue.js +1 -0
  97. package/lib/src/ag-grid/components/loading/index.vue2.js +1 -0
  98. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  99. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  100. package/lib/src/ag-grid/hooks/use-pinned-row.js +1 -1
  101. package/lib/src/ag-grid/index.vue.js +1 -1
  102. package/lib/src/ag-grid/interface.d.ts +4 -0
  103. package/lib/src/ag-grid/style/index.js +1 -1
  104. package/lib/src/ap-drawer/interface.d.ts +13 -2
  105. package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
  106. package/lib/src/ap-field/select/index.vue.d.ts +1 -2
  107. package/lib/src/ap-field/select/index.vue.js +1 -1
  108. package/lib/src/ap-field/style/index.js +1 -1
  109. package/lib/src/ap-field/style/select.d.ts +2 -0
  110. package/lib/src/ap-field/style/select.js +1 -0
  111. package/lib/src/ap-form/items/select/index.vue.d.ts +4 -8
  112. package/lib/src/ap-grid/utils/table.js +1 -1
  113. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  114. package/lib/src/ap-table/components/setting/context.d.ts +17 -0
  115. package/lib/src/ap-table/components/setting/context.js +1 -0
  116. package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +1 -1
  117. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  118. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
  119. package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +844 -0
  120. package/lib/src/ap-table/components/setting/template/edit-form.vue.js +1 -0
  121. package/lib/src/ap-table/components/setting/template/edit-form.vue2.js +1 -0
  122. package/lib/src/ap-table/components/setting/template/index.vue.d.ts +11 -0
  123. package/lib/src/ap-table/components/setting/template/index.vue.js +1 -0
  124. package/lib/src/ap-table/components/setting/template/index.vue2.js +1 -0
  125. package/lib/src/ap-table/components/setting/template/item.vue.d.ts +13 -0
  126. package/lib/src/ap-table/components/setting/template/item.vue.js +1 -0
  127. package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -0
  128. package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
  129. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
  130. package/lib/src/ap-table/components/setting/utils.d.ts +1 -0
  131. package/lib/src/ap-table/components/setting/utils.js +1 -1
  132. package/lib/src/ap-table/constants.d.ts +2 -4
  133. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -23
  134. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  135. package/lib/src/ap-table/hooks/use-table-template-storage.d.ts +49 -0
  136. package/lib/src/ap-table/hooks/use-table-template-storage.js +1 -0
  137. package/lib/src/ap-table/interface.d.ts +26 -3
  138. package/lib/src/ap-table/style/index.d.ts +1 -0
  139. package/lib/src/ap-table/style/index.js +1 -1
  140. package/lib/src/ap-table/style/setting.d.ts +2 -0
  141. package/lib/src/ap-table/style/setting.js +1 -1
  142. package/lib/src/business/ag-grid-modal/style/index.js +1 -1
  143. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  144. package/lib/src/business/ap-attachment/style/index.js +1 -1
  145. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
  146. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +1 -1
  147. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue2.js +1 -1
  148. package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
  149. package/lib/src/business/ap-batch-action-group/interface.d.ts +1 -1
  150. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
  151. package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
  152. package/lib/src/business/ap-upload/components/Picture.vue2.js +1 -1
  153. package/lib/src/business/ap-value-select-card/style/index.js +1 -1
  154. package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
  155. package/lib/src/business/ap-view/style/index.js +1 -1
  156. package/lib/src/design-token/index.js +1 -1
  157. package/lib/src/locale/lang/en.js +1 -1
  158. package/lib/src/locale/lang/zh-cn.js +1 -1
  159. package/lib/src/time-ago/useTimeAgo.js +1 -1
  160. package/lib/src/utils/data-range-persets.d.ts +13 -1
  161. package/lib/src/utils/data-range-persets.js +1 -1
  162. package/lib/src/utils/index.d.ts +1 -0
  163. package/lib/src/utils/index.js +1 -1
  164. package/lib/src/utils/retry.d.ts +12 -0
  165. package/lib/src/utils/retry.js +1 -0
  166. package/lib/src/version.d.ts +1 -1
  167. package/lib/src/version.js +1 -1
  168. 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
  };
@@ -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, {
@@ -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?: /*elided*/ 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?: /*elided*/ 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
  };