@aplus-frontend/ui 0.1.26 → 0.1.27

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 (131) hide show
  1. package/es/src/ap-download/ap-download.vue.d.ts +7 -3
  2. package/es/src/ap-download/ap-download.vue.mjs +50 -35
  3. package/es/src/ap-download/interface.d.ts +3 -11
  4. package/es/src/ap-download/style/ap-download.css +3 -0
  5. package/es/src/ap-table/ap-table.vue.mjs +231 -183
  6. package/es/src/ap-table/components/interface.d.ts +33 -1
  7. package/es/src/ap-table/components/setting/images/icon_carst_down.svg.mjs +4 -0
  8. package/es/src/ap-table/components/setting/images/icon_fill_right.svg.mjs +4 -0
  9. package/es/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
  10. package/es/src/ap-table/components/setting/modal/index.vue.mjs +4 -0
  11. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +152 -0
  12. package/es/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
  13. package/es/src/ap-table/components/setting/select-group/index.vue.mjs +4 -0
  14. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +96 -0
  15. package/es/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
  16. package/es/src/ap-table/components/setting/sortable/index.vue.mjs +4 -0
  17. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +51 -0
  18. package/es/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
  19. package/es/src/ap-table/components/setting/sortable/item.vue.mjs +4 -0
  20. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +140 -0
  21. package/es/src/ap-table/components/setting/sorter/context.d.ts +11 -0
  22. package/es/src/ap-table/components/setting/sorter/context.mjs +20 -0
  23. package/es/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
  24. package/es/src/ap-table/components/setting/sorter/index.vue.mjs +4 -0
  25. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +199 -0
  26. package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
  27. package/es/src/ap-table/components/setting/tree-select/index.vue.mjs +4 -0
  28. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +75 -0
  29. package/es/src/ap-table/components/setting/utils.d.ts +17 -0
  30. package/es/src/ap-table/components/setting/utils.mjs +48 -0
  31. package/es/src/ap-table/components/style/setting/modal.css +39 -0
  32. package/es/src/ap-table/components/style/setting/select-group.css +7 -0
  33. package/es/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
  34. package/es/src/ap-table/components/style/setting/sortable-item.css +3 -0
  35. package/es/src/ap-table/components/style/setting/sorter.css +26 -0
  36. package/es/src/ap-table/constants.d.ts +31 -8
  37. package/es/src/ap-table/constants.mjs +41 -53
  38. package/es/src/ap-table/context.d.ts +31 -0
  39. package/es/src/ap-table/context.mjs +20 -0
  40. package/es/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
  41. package/es/src/ap-table/hooks/use-table-column-state.mjs +46 -0
  42. package/es/src/ap-table/hooks/use-table-content-height.mjs +19 -19
  43. package/es/src/ap-table/hooks/use-table-paging.d.ts +1 -0
  44. package/es/src/ap-table/hooks/use-table-paging.mjs +87 -82
  45. package/es/src/ap-table/interface.d.ts +51 -1
  46. package/es/src/ap-table/style/ap-table.css +29 -1
  47. package/es/src/ap-table/utils.d.ts +1 -1
  48. package/es/src/ap-table/utils.mjs +82 -82
  49. package/es/src/business/ap-attachment/ApAttachment.d.ts +1 -1
  50. package/es/src/business/ap-attachment/ApAttachment.mjs +45 -42
  51. package/es/src/business/ap-attachment/style.css +2 -0
  52. package/es/src/business/hooks/usePageListApTable.d.ts +2 -2
  53. package/es/src/business/index.d.ts +1 -1
  54. package/es/src/editable-table/interface.d.ts +1 -1
  55. package/es/src/locale/lang/en.mjs +14 -0
  56. package/es/src/locale/lang/zh-cn.mjs +14 -0
  57. package/es/src/theme/ap-attachment/ap-attachment.css +2 -0
  58. package/es/src/theme/ap-download/ap-download.css +3 -0
  59. package/es/src/theme/ap-table/ap-table.css +29 -1
  60. package/es/src/theme/ap-table/setting/modal.css +39 -0
  61. package/es/src/theme/ap-table/setting/select-group.css +7 -0
  62. package/es/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
  63. package/es/src/theme/ap-table/setting/sortable-item.css +3 -0
  64. package/es/src/theme/ap-table/setting/sorter.css +26 -0
  65. package/es/src/theme/css-var/index.mjs +22 -12
  66. package/lib/src/ap-download/ap-download.vue.d.ts +7 -3
  67. package/lib/src/ap-download/ap-download.vue.js +1 -1
  68. package/lib/src/ap-download/interface.d.ts +3 -11
  69. package/lib/src/ap-download/style/ap-download.css +3 -0
  70. package/lib/src/ap-table/ap-table.vue.js +1 -1
  71. package/lib/src/ap-table/components/interface.d.ts +33 -1
  72. package/lib/src/ap-table/components/setting/images/icon_carst_down.svg.js +1 -0
  73. package/lib/src/ap-table/components/setting/images/icon_fill_right.svg.js +1 -0
  74. package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
  75. package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -0
  76. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -0
  77. package/lib/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
  78. package/lib/src/ap-table/components/setting/select-group/index.vue.js +1 -0
  79. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -0
  80. package/lib/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
  81. package/lib/src/ap-table/components/setting/sortable/index.vue.js +1 -0
  82. package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -0
  83. package/lib/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
  84. package/lib/src/ap-table/components/setting/sortable/item.vue.js +1 -0
  85. package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -0
  86. package/lib/src/ap-table/components/setting/sorter/context.d.ts +11 -0
  87. package/lib/src/ap-table/components/setting/sorter/context.js +1 -0
  88. package/lib/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
  89. package/lib/src/ap-table/components/setting/sorter/index.vue.js +1 -0
  90. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -0
  91. package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
  92. package/lib/src/ap-table/components/setting/tree-select/index.vue.js +1 -0
  93. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -0
  94. package/lib/src/ap-table/components/setting/utils.d.ts +17 -0
  95. package/lib/src/ap-table/components/setting/utils.js +1 -0
  96. package/lib/src/ap-table/components/style/setting/modal.css +39 -0
  97. package/lib/src/ap-table/components/style/setting/select-group.css +7 -0
  98. package/lib/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
  99. package/lib/src/ap-table/components/style/setting/sortable-item.css +3 -0
  100. package/lib/src/ap-table/components/style/setting/sorter.css +26 -0
  101. package/lib/src/ap-table/constants.d.ts +31 -8
  102. package/lib/src/ap-table/constants.js +1 -1
  103. package/lib/src/ap-table/context.d.ts +31 -0
  104. package/lib/src/ap-table/context.js +1 -0
  105. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
  106. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -0
  107. package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
  108. package/lib/src/ap-table/hooks/use-table-paging.d.ts +1 -0
  109. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  110. package/lib/src/ap-table/interface.d.ts +51 -1
  111. package/lib/src/ap-table/style/ap-table.css +29 -1
  112. package/lib/src/ap-table/utils.d.ts +1 -1
  113. package/lib/src/ap-table/utils.js +1 -1
  114. package/lib/src/business/ap-attachment/ApAttachment.d.ts +1 -1
  115. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  116. package/lib/src/business/ap-attachment/style.css +2 -0
  117. package/lib/src/business/hooks/usePageListApTable.d.ts +2 -2
  118. package/lib/src/business/index.d.ts +1 -1
  119. package/lib/src/editable-table/interface.d.ts +1 -1
  120. package/lib/src/locale/lang/en.js +1 -1
  121. package/lib/src/locale/lang/zh-cn.js +1 -1
  122. package/lib/src/theme/ap-attachment/ap-attachment.css +2 -0
  123. package/lib/src/theme/ap-download/ap-download.css +3 -0
  124. package/lib/src/theme/ap-table/ap-table.css +29 -1
  125. package/lib/src/theme/ap-table/setting/modal.css +39 -0
  126. package/lib/src/theme/ap-table/setting/select-group.css +7 -0
  127. package/lib/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
  128. package/lib/src/theme/ap-table/setting/sortable-item.css +3 -0
  129. package/lib/src/theme/ap-table/setting/sorter.css +26 -0
  130. package/lib/src/theme/css-var/index.js +1 -1
  131. package/package.json +3 -2
@@ -0,0 +1,152 @@
1
+ import { defineComponent as M, ref as w, unref as e, useSlots as q, cloneVNode as J, watchEffect as K, openBlock as z, createElementBlock as P, Fragment as Q, createBlock as W, resolveDynamicComponent as X, createCommentVNode as Y, createVNode as o, withCtx as u, createElementVNode as r, normalizeClass as c, toDisplayString as d, createTextVNode as h, isRef as Z } from "vue";
2
+ import { Modal as ee, Button as te, RadioGroup as le, RadioButton as R, Divider as D } from "ant-design-vue";
3
+ import { getSingleVNode as ne } from "../../../../utils/slot.mjs";
4
+ import { useInjectApTable as oe } from "../../../context.mjs";
5
+ import "../tree-select/index.vue.mjs";
6
+ import { useTableColumnState as ae } from "../../../hooks/use-table-column-state.mjs";
7
+ import { isBoolean as ie } from "lodash-unified";
8
+ import "../../../../config-provider/index.mjs";
9
+ import "../sorter/index.vue.mjs";
10
+ import "../../style/setting/modal.css";
11
+ import se, { customCloneColumnStates as k } from "../utils.mjs";
12
+ import { useLocale as re } from "../../../../config-provider/hooks/use-locale.mjs";
13
+ import { useNamespace as ue } 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 pe = {
17
+ style: {
18
+ lineHeight: "22px",
19
+ color: "#8896B0"
20
+ }
21
+ }, Ve = /* @__PURE__ */ M({
22
+ __name: "index",
23
+ props: {
24
+ config: {}
25
+ },
26
+ setup(E) {
27
+ const m = E;
28
+ let f = [];
29
+ const {
30
+ columnsBackup: y,
31
+ size: U,
32
+ updateSize: g,
33
+ updateColumns: v
34
+ } = oe(), C = w(e(U)), {
35
+ columnState: i,
36
+ setColumnState: b,
37
+ isAllSelected: O,
38
+ toggleSelectAll: $
39
+ } = ae([]), {
40
+ t: s
41
+ } = re(), {
42
+ b: x,
43
+ be: _
44
+ } = ue("ap-column-setting"), p = w(!1), j = q(), B = ne(j.trigger), T = B ? J(B, {
45
+ onClick: () => {
46
+ p.value = !0;
47
+ }
48
+ }) : null;
49
+ function F() {
50
+ var l;
51
+ const n = ((l = m == null ? void 0 : m.config) == null ? void 0 : l.defaultValue) || {};
52
+ function t(I, N) {
53
+ var A;
54
+ const V = [];
55
+ for (const a of I) {
56
+ const L = n == null ? void 0 : n[a.key], S = {
57
+ key: a.key,
58
+ label: a.title,
59
+ show: !0,
60
+ fixed: N ? N.fixed : ie(a.fixed) ? a.fixed ? "left" : void 0 : a.fixed,
61
+ disabled: !1,
62
+ ...L
63
+ };
64
+ S.children = (A = a.children) != null && A.length ? t(a.children, S) : void 0, V.push(S);
65
+ }
66
+ return V;
67
+ }
68
+ return t(e(y) || []);
69
+ }
70
+ function G() {
71
+ b(k(f));
72
+ }
73
+ K(() => {
74
+ const n = F();
75
+ b(n), f = k(n);
76
+ });
77
+ function H() {
78
+ var t, l;
79
+ v == null || v(se(e(y), e(i))), g == null || g(e(C)), p.value = !1;
80
+ const n = k(i.value);
81
+ f = n, (l = (t = m.config) == null ? void 0 : t.onChange) == null || l.call(t, n);
82
+ }
83
+ return (n, t) => (z(), P(Q, null, [e(T) ? (z(), W(X(e(T)), {
84
+ key: 0
85
+ })) : Y("", !0), o(e(ee), {
86
+ title: e(s)("ap.apTable.setting.title"),
87
+ open: p.value,
88
+ "onUpdate:open": t[2] || (t[2] = (l) => p.value = l),
89
+ width: 900,
90
+ onOk: H,
91
+ "body-style": {
92
+ padding: "0px !important",
93
+ height: "450px"
94
+ }
95
+ }, {
96
+ default: u(() => [r("div", {
97
+ class: c(e(x)("wrapper"))
98
+ }, [r("div", {
99
+ class: c(e(x)("left"))
100
+ }, [r("div", {
101
+ class: c(e(_)("left", "header"))
102
+ }, [r("div", null, [r("span", pe, d(e(s)("ap.apTable.setting.selectAllTip")), 1), o(e(te), {
103
+ type: "link",
104
+ size: "small",
105
+ onClick: e($)
106
+ }, {
107
+ default: u(() => [h(d(e(O) ? e(s)("ap.apTable.setting.unSelectAll") : e(s)("ap.apTable.setting.selectAll")), 1)]),
108
+ _: 1
109
+ }, 8, ["onClick"])]), o(e(le), {
110
+ value: C.value,
111
+ "onUpdate:value": t[0] || (t[0] = (l) => C.value = l)
112
+ }, {
113
+ default: u(() => [o(e(R), {
114
+ value: "small"
115
+ }, {
116
+ default: u(() => [h(d(e(s)("ap.apTable.setting.sizeSmall")), 1)]),
117
+ _: 1
118
+ }), o(e(R), {
119
+ value: "middle"
120
+ }, {
121
+ default: u(() => [h(d(e(s)("ap.apTable.setting.sizeNormal")), 1)]),
122
+ _: 1
123
+ })]),
124
+ _: 1
125
+ }, 8, ["value"])], 2), o(e(D), {
126
+ dashed: "",
127
+ style: {
128
+ margin: "0px"
129
+ }
130
+ }), o(ce, {
131
+ class: c(e(_)("left", "content")),
132
+ value: e(i)
133
+ }, null, 8, ["class", "value"])], 2), o(e(D), {
134
+ type: "vertical",
135
+ style: {
136
+ height: "100%",
137
+ margin: "0px"
138
+ }
139
+ }), r("div", {
140
+ class: c(e(x)("right"))
141
+ }, [o(me, {
142
+ value: e(i),
143
+ "onUpdate:value": t[1] || (t[1] = (l) => Z(i) ? i.value = l : null),
144
+ onReset: G
145
+ }, null, 8, ["value"])], 2)], 2)]),
146
+ _: 1
147
+ }, 8, ["title", "open"])], 64));
148
+ }
149
+ });
150
+ export {
151
+ Ve as default
152
+ };
@@ -0,0 +1,13 @@
1
+ import { ApTableSettingSelectGroupProps } from '../../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ declare const _default: DefineComponent<__VLS_TypePropsToOption<ApTableSettingSelectGroupProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<ApTableSettingSelectGroupProps>>>, {}, {}>;
4
+ export default _default;
5
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
6
+ type __VLS_TypePropsToOption<T> = {
7
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
8
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
9
+ } : {
10
+ type: PropType<T[K]>;
11
+ required: true;
12
+ };
13
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,96 @@
1
+ import { defineComponent as N, ref as E, computed as p, unref as r, watch as P, openBlock as s, createElementBlock as f, createElementVNode as v, normalizeClass as U, createVNode as u, withCtx as i, createBlock as h, resolveDynamicComponent as k, Fragment as V, renderList as D, mergeProps as L } from "vue";
2
+ import { Checkbox as w, Row as j, Col as z } from "ant-design-vue";
3
+ import "../../style/setting/select-group.css";
4
+ import "../../../../config-provider/index.mjs";
5
+ import { useInjectApTable as F } from "../../../context.mjs";
6
+ import { cloneLabelNode as b } from "../utils.mjs";
7
+ import { useNamespace as I } from "../../../../config-provider/hooks/use-namespace.mjs";
8
+ const M = /* @__PURE__ */ N({
9
+ __name: "index",
10
+ props: {
11
+ value: {}
12
+ },
13
+ setup(y) {
14
+ const t = y, { b: C } = I("select-group"), c = E(!1), { columnsBackup: _ } = F(), m = p(() => {
15
+ var e;
16
+ return (e = r(_)) == null ? void 0 : e.find(
17
+ (o) => {
18
+ var l;
19
+ return o.key === ((l = t.value) == null ? void 0 : l.key);
20
+ }
21
+ );
22
+ });
23
+ function S(n) {
24
+ const e = t.value.children.find((o) => o.key === n.key);
25
+ return {
26
+ checked: e == null ? void 0 : e.show,
27
+ disabled: t.value.disabled || (e == null ? void 0 : e.disabled)
28
+ };
29
+ }
30
+ function g(n) {
31
+ const e = t.value;
32
+ e.children.forEach((o) => o.show = n), e.show = n, c.value = !1;
33
+ }
34
+ function x(n, e) {
35
+ const o = t.value, l = o.children.find((a) => a.key === n);
36
+ if (!l)
37
+ return;
38
+ l.show = e;
39
+ const d = o.children.every((a) => a.show), B = o.children.some((a) => a.show);
40
+ o.show = d, c.value = B && !d;
41
+ }
42
+ const A = p(() => t.value.disabled || t.value.children.every((n) => n.disabled));
43
+ return P(
44
+ () => t.value,
45
+ (n) => {
46
+ const e = n.children.every((l) => l.show), o = n.children.some((l) => l.show);
47
+ c.value = o && !e;
48
+ }
49
+ ), (n, e) => {
50
+ var o;
51
+ return s(), f("div", null, [
52
+ v("div", {
53
+ class: U(r(C)("header"))
54
+ }, [
55
+ u(r(w), {
56
+ indeterminate: c.value,
57
+ checked: (o = n.value) == null ? void 0 : o.show,
58
+ "onUpdate:checked": g,
59
+ disabled: A.value
60
+ }, {
61
+ default: i(() => [
62
+ (s(), h(k(r(b)(m.value.title))))
63
+ ]),
64
+ _: 1
65
+ }, 8, ["indeterminate", "checked", "disabled"])
66
+ ], 2),
67
+ v("div", null, [
68
+ u(r(j), null, {
69
+ default: i(() => [
70
+ (s(!0), f(V, null, D(m.value.children, (l) => (s(), h(r(z), {
71
+ key: l.key,
72
+ span: 8
73
+ }, {
74
+ default: i(() => [
75
+ u(r(w), L({ ref_for: !0 }, S(l), {
76
+ "onUpdate:checked": (d) => x(l.key, d)
77
+ }), {
78
+ default: i(() => [
79
+ (s(), h(k(r(b)(l.title))))
80
+ ]),
81
+ _: 2
82
+ }, 1040, ["onUpdate:checked"])
83
+ ]),
84
+ _: 2
85
+ }, 1024))), 128))
86
+ ]),
87
+ _: 1
88
+ })
89
+ ])
90
+ ]);
91
+ };
92
+ }
93
+ });
94
+ export {
95
+ M as default
96
+ };
@@ -0,0 +1,13 @@
1
+ import { SortableItemProps } from '../../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ declare const _default: DefineComponent<__VLS_TypePropsToOption<SortableItemProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<SortableItemProps>>>, {}, {}>;
4
+ export default _default;
5
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
6
+ type __VLS_TypePropsToOption<T> = {
7
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
8
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
9
+ } : {
10
+ type: PropType<T[K]>;
11
+ required: true;
12
+ };
13
+ };
@@ -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 f, ref as c, openBlock as n, createElementBlock as u, normalizeClass as m, unref as r, createVNode as i, withCtx as k, createBlock as y, createCommentVNode as p } from "vue";
2
+ import "./item.vue.mjs";
3
+ import "../../style/setting/sortable-item.css";
4
+ import "../../../../config-provider/index.mjs";
5
+ import V from "vuedraggable";
6
+ import { useNamespace as h } from "../../../../config-provider/hooks/use-namespace.mjs";
7
+ import s from "./item.vue2.mjs";
8
+ const z = /* @__PURE__ */ f({
9
+ __name: "index",
10
+ props: {
11
+ value: {},
12
+ "onUpdate:value": { type: Function }
13
+ },
14
+ setup(C) {
15
+ const { b: d, is: v } = h("sortable-item"), a = c(!1);
16
+ return (l, o) => {
17
+ var t;
18
+ return n(), u("div", {
19
+ class: m(r(d)())
20
+ }, [
21
+ i(s, {
22
+ value: l.value,
23
+ open: a.value,
24
+ "onUpdate:open": o[0] || (o[0] = (e) => a.value = e)
25
+ }, null, 8, ["value", "open"]),
26
+ (t = l.value.children) != null && t.length ? (n(), u("div", {
27
+ key: 0,
28
+ class: m(r(v)("hidden", a.value))
29
+ }, [
30
+ i(r(V), {
31
+ modelValue: l.value.children,
32
+ "onUpdate:modelValue": o[1] || (o[1] = (e) => l.value.children = e),
33
+ "item-key": "key"
34
+ }, {
35
+ item: k(({ element: e }) => [
36
+ e.show ? (n(), y(s, {
37
+ key: 0,
38
+ value: e,
39
+ level: 2
40
+ }, null, 8, ["value"])) : p("", !0)
41
+ ]),
42
+ _: 1
43
+ }, 8, ["modelValue"])
44
+ ], 2)) : p("", !0)
45
+ ], 2);
46
+ };
47
+ }
48
+ });
49
+ export {
50
+ z as default
51
+ };
@@ -0,0 +1,20 @@
1
+ import { SortableItemMetaProps } from '../../interface';
2
+ import { ApColumnState } from '../../../interface';
3
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
4
+ declare const _default: DefineComponent<__VLS_TypePropsToOption<SortableItemMetaProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
5
+ "update:open": (open: boolean) => void;
6
+ "update:value": (open: ApColumnState) => void;
7
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<SortableItemMetaProps>>> & {
8
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
9
+ "onUpdate:value"?: ((open: ApColumnState) => any) | undefined;
10
+ }, {}, {}>;
11
+ export default _default;
12
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
+ type __VLS_TypePropsToOption<T> = {
14
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
15
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
16
+ } : {
17
+ type: PropType<T[K]>;
18
+ required: true;
19
+ };
20
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./item.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,140 @@
1
+ import { defineComponent as E, openBlock as s, createElementBlock as g, normalizeClass as t, unref as e, createElementVNode as f, createVNode as c, createCommentVNode as r, createBlock as u, resolveDynamicComponent as I, withCtx as d } from "vue";
2
+ import { Space as O, Tooltip as m } from "ant-design-vue";
3
+ import { HolderOutlined as D, VerticalAlignTopOutlined as k, VerticalAlignMiddleOutlined as z, DeleteOutlined as A } from "@ant-design/icons-vue";
4
+ import "../../style/setting/sortable-item-meta.css";
5
+ import "../../../../config-provider/index.mjs";
6
+ import { useInjectSorterMethods as M } from "../sorter/context.mjs";
7
+ import S from "../images/icon_carst_down.svg.mjs";
8
+ import U from "../images/icon_fill_right.svg.mjs";
9
+ import { cloneLabelNode as j } from "../utils.mjs";
10
+ import { useNamespace as H } from "../../../../config-provider/hooks/use-namespace.mjs";
11
+ import { useLocale as q } from "../../../../config-provider/hooks/use-locale.mjs";
12
+ const G = ["src"], te = /* @__PURE__ */ E({
13
+ __name: "item",
14
+ props: {
15
+ value: {},
16
+ "onUpdate:value": { type: Function },
17
+ level: {},
18
+ open: { type: Boolean }
19
+ },
20
+ emits: ["update:open", "update:value"],
21
+ setup(b, { emit: x }) {
22
+ const o = b, C = x, { b: a, be: h, is: T } = H("sortable-item-meta"), { fixedToLeft: w, fixedToRight: V, unFixed: y } = M(), { t: p } = q();
23
+ function v(l) {
24
+ var i;
25
+ const n = o.value;
26
+ return n.fixed = l, (i = n.children) == null || i.forEach((B) => B.fixed = l), n;
27
+ }
28
+ function _() {
29
+ const l = v("left");
30
+ w(l);
31
+ }
32
+ function F() {
33
+ const l = v("right");
34
+ V(l);
35
+ }
36
+ function L() {
37
+ const l = v(void 0);
38
+ y(l);
39
+ }
40
+ function N() {
41
+ C("update:open", !o.open);
42
+ }
43
+ function R() {
44
+ var n;
45
+ const l = o.value;
46
+ l.show = !1, (n = l.children) == null || n.forEach((i) => i.show = !1);
47
+ }
48
+ return (l, n) => {
49
+ var i;
50
+ return s(), g("div", {
51
+ class: t(e(a)())
52
+ }, [
53
+ f("span", {
54
+ class: t(e(a)("left"))
55
+ }, [
56
+ c(e(D), {
57
+ class: t(e(h)("left", "holder")),
58
+ style: { "font-size": "16px", color: "#abb7cc" }
59
+ }, null, 8, ["class"]),
60
+ f("span", {
61
+ class: t(e(h)("left", "indicator")),
62
+ onClick: N
63
+ }, [
64
+ (i = l.value.children) != null && i.length ? (s(), g("img", {
65
+ key: 0,
66
+ src: o.open ? e(U) : e(S)
67
+ }, null, 8, G)) : r("", !0)
68
+ ], 2),
69
+ f("span", {
70
+ class: t([e(h)("left", "label-wrapper"), e(T)("level2", o.level === 2)])
71
+ }, [
72
+ (s(), u(I(e(j)(l.value.label))))
73
+ ], 2)
74
+ ], 2),
75
+ f("span", {
76
+ class: t(e(a)("right"))
77
+ }, [
78
+ c(e(O), null, {
79
+ default: d(() => [
80
+ o.level !== 2 && l.value.fixed !== "left" ? (s(), u(e(m), {
81
+ key: 0,
82
+ title: e(p)("ap.apTable.setting.fixToLeft")
83
+ }, {
84
+ default: d(() => [
85
+ c(e(k), {
86
+ rotate: 270,
87
+ onClick: _,
88
+ class: t(e(a)("action-icon"))
89
+ }, null, 8, ["class"])
90
+ ]),
91
+ _: 1
92
+ }, 8, ["title"])) : r("", !0),
93
+ o.level !== 2 && l.value.fixed ? (s(), u(e(m), {
94
+ key: 1,
95
+ title: e(p)("ap.apTable.setting.unFixed")
96
+ }, {
97
+ default: d(() => [
98
+ c(e(z), {
99
+ onClick: L,
100
+ class: t(e(a)("action-icon"))
101
+ }, null, 8, ["class"])
102
+ ]),
103
+ _: 1
104
+ }, 8, ["title"])) : r("", !0),
105
+ o.level !== 2 && l.value.fixed !== "right" ? (s(), u(e(m), {
106
+ key: 2,
107
+ title: e(p)("ap.apTable.setting.fixToRight")
108
+ }, {
109
+ default: d(() => [
110
+ c(e(k), {
111
+ rotate: 90,
112
+ onClick: F,
113
+ class: t(e(a)("action-icon"))
114
+ }, null, 8, ["class"])
115
+ ]),
116
+ _: 1
117
+ }, 8, ["title"])) : r("", !0),
118
+ l.value.disabled ? r("", !0) : (s(), u(e(m), {
119
+ key: 3,
120
+ title: e(p)("ap.apTable.setting.delete")
121
+ }, {
122
+ default: d(() => [
123
+ c(e(A), {
124
+ onClick: R,
125
+ class: t(e(a)("action-icon"))
126
+ }, null, 8, ["class"])
127
+ ]),
128
+ _: 1
129
+ }, 8, ["title"]))
130
+ ]),
131
+ _: 1
132
+ })
133
+ ], 2)
134
+ ], 2);
135
+ };
136
+ }
137
+ });
138
+ export {
139
+ te as default
140
+ };
@@ -0,0 +1,11 @@
1
+ import { InjectionKey } from 'vue';
2
+ import { ApColumnState } from '../../../interface';
3
+ type ApTableSorterContextProps = {
4
+ fixedToLeft(column: ApColumnState): void;
5
+ fixedToRight(column: ApColumnState): void;
6
+ unFixed(column: ApColumnState): void;
7
+ };
8
+ export declare const ApTableContextKey: InjectionKey<ApTableSorterContextProps>;
9
+ export declare function useProvideSorterMethods(state: ApTableSorterContextProps): void;
10
+ export declare function useInjectSorterMethods(): ApTableSorterContextProps;
11
+ export {};
@@ -0,0 +1,20 @@
1
+ import { provide as o, inject as r } from "vue";
2
+ const e = Symbol("apTableSorterContextKey");
3
+ function i(t) {
4
+ o(e, t);
5
+ }
6
+ function d() {
7
+ return r(e, {
8
+ fixedToLeft: () => {
9
+ },
10
+ fixedToRight: () => {
11
+ },
12
+ unFixed: () => {
13
+ }
14
+ });
15
+ }
16
+ export {
17
+ e as ApTableContextKey,
18
+ d as useInjectSorterMethods,
19
+ i as useProvideSorterMethods
20
+ };
@@ -0,0 +1,18 @@
1
+ import { ApTableSettingSorterProps } from '../../interface';
2
+ import { ApColumnState } from '../../../interface';
3
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
4
+ declare const _default: DefineComponent<__VLS_TypePropsToOption<ApTableSettingSorterProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
5
+ "update:value": (value: ApColumnState[]) => void;
6
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<ApTableSettingSorterProps>>> & {
7
+ "onUpdate:value"?: ((value: ApColumnState[]) => any) | undefined;
8
+ }, {}, {}>;
9
+ export default _default;
10
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
+ type __VLS_TypePropsToOption<T> = {
12
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
13
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
14
+ } : {
15
+ type: PropType<T[K]>;
16
+ required: true;
17
+ };
18
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };