@aplus-frontend/ui 7.11.1 → 7.11.3

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 (49) hide show
  1. package/es/src/ag-grid/editable/utils.mjs +28 -22
  2. package/es/src/business/ap-copy/constans.mjs +1 -1
  3. package/es/src/business/ap-copy/style/index.mjs +1 -1
  4. package/es/src/business/ap-product-info/ApProductInfo.d.ts +9 -0
  5. package/es/src/business/ap-product-info/ApProductInfo.mjs +5 -5
  6. package/es/src/business/ap-product-info/constans.d.ts +4 -0
  7. package/es/src/business/ap-product-info/constans.mjs +4 -0
  8. package/es/src/business/ap-product-info/index.d.ts +15 -0
  9. package/es/src/business/ap-product-info/interface.d.ts +1 -0
  10. package/es/src/business/ap-product-info/style/index.mjs +2 -1
  11. package/es/src/business/ap-view/ap-view.vue2.mjs +36 -33
  12. package/es/src/business/ap-view/interface.d.ts +4 -0
  13. package/es/src/business/batch-input-group/form-item.vue.mjs +24 -22
  14. package/es/src/business/batch-input-group/index.vue.mjs +1 -1
  15. package/es/src/splitter/SplitBar.vue2.mjs +152 -112
  16. package/es/src/splitter/Splitter.vue2.mjs +67 -61
  17. package/es/src/splitter/hooks/useItems.d.ts +1 -0
  18. package/es/src/splitter/hooks/useItems.mjs +20 -16
  19. package/es/src/splitter/hooks/useResizable.d.ts +3 -0
  20. package/es/src/splitter/hooks/useResizable.mjs +50 -27
  21. package/es/src/splitter/interface.d.ts +12 -1
  22. package/es/src/splitter/style/index.mjs +51 -15
  23. package/es/src/version.d.ts +1 -1
  24. package/es/src/version.mjs +1 -1
  25. package/lib/src/ag-grid/editable/utils.js +1 -1
  26. package/lib/src/business/ap-copy/constans.js +1 -1
  27. package/lib/src/business/ap-copy/style/index.js +1 -1
  28. package/lib/src/business/ap-product-info/ApProductInfo.d.ts +9 -0
  29. package/lib/src/business/ap-product-info/ApProductInfo.js +1 -1
  30. package/lib/src/business/ap-product-info/constans.d.ts +4 -0
  31. package/lib/src/business/ap-product-info/constans.js +1 -1
  32. package/lib/src/business/ap-product-info/index.d.ts +15 -0
  33. package/lib/src/business/ap-product-info/interface.d.ts +1 -0
  34. package/lib/src/business/ap-product-info/style/index.js +1 -1
  35. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  36. package/lib/src/business/ap-view/interface.d.ts +4 -0
  37. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  38. package/lib/src/business/batch-input-group/index.vue.js +1 -1
  39. package/lib/src/splitter/SplitBar.vue2.js +1 -1
  40. package/lib/src/splitter/Splitter.vue2.js +1 -1
  41. package/lib/src/splitter/hooks/useItems.d.ts +1 -0
  42. package/lib/src/splitter/hooks/useItems.js +1 -1
  43. package/lib/src/splitter/hooks/useResizable.d.ts +3 -0
  44. package/lib/src/splitter/hooks/useResizable.js +1 -1
  45. package/lib/src/splitter/interface.d.ts +12 -1
  46. package/lib/src/splitter/style/index.js +1 -1
  47. package/lib/src/version.d.ts +1 -1
  48. package/lib/src/version.js +1 -1
  49. package/package.json +5 -5
@@ -1,130 +1,170 @@
1
- import { defineComponent as U, ref as z, computed as w, unref as t, watchEffect as V, createElementBlock as h, openBlock as y, normalizeClass as s, createCommentVNode as O, createElementVNode as T, normalizeStyle as F, createVNode as C } from "vue";
2
- import { UpOutlined as A, LeftOutlined as D, DownOutlined as I, RightOutlined as R } from "@ant-design/icons-vue";
1
+ import { defineComponent as T, ref as N, computed as z, unref as o, watchEffect as D, createVNode as b, createElementBlock as g, openBlock as c, normalizeClass as d, createCommentVNode as y, createElementVNode as O, normalizeStyle as F, createBlock as E, resolveDynamicComponent as M } from "vue";
2
+ import { UpOutlined as A, DownOutlined as R, LeftOutlined as $, RightOutlined as j } from "@ant-design/icons-vue";
3
3
  import "../config-provider/index.mjs";
4
- import { useNamespace as $ } from "../config-provider/hooks/use-namespace.mjs";
5
- const j = ["aria-valuenow", "aria-valuemin", "aria-valuemax"], K = /* @__PURE__ */ U({
4
+ import { useNamespace as q } from "../config-provider/hooks/use-namespace.mjs";
5
+ const G = ["aria-valuenow", "aria-valuemin", "aria-valuemax"], W = /* @__PURE__ */ T({
6
6
  name: "SplitBar",
7
7
  __name: "SplitBar",
8
8
  props: {
9
9
  index: {},
10
- active: { type: Boolean },
11
- resizable: { type: Boolean },
12
- startCollapsible: { type: Boolean },
13
- endCollapsible: { type: Boolean },
14
- onOffsetStart: { type: Function },
15
- onOffsetUpdate: { type: Function },
10
+ active: {
11
+ type: Boolean
12
+ },
13
+ resizable: {
14
+ type: Boolean
15
+ },
16
+ startCollapsible: {
17
+ type: Boolean
18
+ },
19
+ endCollapsible: {
20
+ type: Boolean
21
+ },
22
+ onOffsetStart: {
23
+ type: Function
24
+ },
25
+ onOffsetUpdate: {
26
+ type: Function
27
+ },
16
28
  onOffsetEnd: {},
17
- onCollapse: { type: Function },
18
- vertical: { type: Boolean },
29
+ onCollapse: {
30
+ type: Function
31
+ },
32
+ vertical: {
33
+ type: Boolean
34
+ },
19
35
  ariaNow: {},
20
36
  ariaMin: {},
21
37
  ariaMax: {},
22
- lazy: { type: Boolean },
23
- containerSize: {}
38
+ lazy: {
39
+ type: Boolean
40
+ },
41
+ containerSize: {},
42
+ draggerIcon: {},
43
+ collapsibleIcon: {},
44
+ showStartCollapsibleIcon: {
45
+ type: [Boolean, String]
46
+ },
47
+ showEndCollapsibleIcon: {
48
+ type: [Boolean, String]
49
+ }
24
50
  },
25
- setup(x) {
26
- function g(o) {
27
- return typeof o == "number" && !Number.isNaN(o) ? Math.round(o) : 0;
51
+ setup(k) {
52
+ function C(e) {
53
+ return typeof e == "number" && !Number.isNaN(e) ? Math.round(e) : 0;
28
54
  }
29
- const e = x, { b: n, cssVar: L } = $("splitter-bar"), p = z(null), l = z(0), N = w(
30
- () => e.vertical ? 0 : t(l)
31
- ), S = w(
32
- () => e.vertical ? t(l) : 0
33
- ), B = (o) => {
34
- e.resizable && o.currentTarget && (p.value = [o.pageX, o.pageY], e.onOffsetStart(e.index));
35
- }, k = (o) => {
36
- if (e.resizable && o.touches.length === 1) {
37
- const a = o.touches[0];
38
- p.value = [a.pageX, a.pageY], e.onOffsetStart(e.index);
55
+ const n = k, {
56
+ b: t,
57
+ cssVar: x
58
+ } = q("splitter-bar"), w = N(null), u = N(0), V = z(() => n.vertical ? 0 : o(u)), X = z(() => n.vertical ? o(u) : 0), Y = (e) => {
59
+ n.resizable && e.currentTarget && (w.value = [e.pageX, e.pageY], n.onOffsetStart(n.index));
60
+ }, P = (e) => {
61
+ if (n.resizable && e.touches.length === 1) {
62
+ const a = e.touches[0];
63
+ w.value = [a.pageX, a.pageY], n.onOffsetStart(n.index);
64
+ }
65
+ }, U = (e) => {
66
+ const {
67
+ containerSize: a,
68
+ ariaMax: s,
69
+ ariaMin: r,
70
+ ariaNow: i
71
+ } = n, l = a * i / 100, p = l + e, f = Math.max(0, a * r / 100), v = Math.max(a, a * s / 100);
72
+ return Math.max(f, Math.min(v, p)) - l;
73
+ }, I = (e, a) => {
74
+ const s = U(n.vertical ? a : e);
75
+ u.value = s;
76
+ }, S = () => {
77
+ n.onOffsetUpdate(n.index, o(V), o(X)), u.value = 0;
78
+ }, B = (e) => {
79
+ switch (e) {
80
+ case !0:
81
+ return t("collapse-bar-always-visible");
82
+ case !1:
83
+ return t("collapse-bar-always-hidden");
84
+ case "auto":
85
+ return t("collapse-bar-hover-only");
39
86
  }
40
- }, X = (o) => {
41
- const { containerSize: a, ariaMax: i, ariaMin: v, ariaNow: m } = e, f = a * m / 100, r = f + o, c = Math.max(0, a * v / 100), d = Math.max(
42
- a,
43
- a * i / 100
44
- );
45
- return Math.max(c, Math.min(d, r)) - f;
46
- }, b = (o, a) => {
47
- const i = X(
48
- e.vertical ? a : o
49
- );
50
- l.value = i;
51
- }, M = () => {
52
- e.onOffsetUpdate(
53
- e.index,
54
- t(N),
55
- t(S)
56
- ), l.value = 0;
57
87
  };
58
- V(
59
- (o) => {
60
- const a = t(p);
61
- if (a) {
62
- const i = (r) => {
63
- const { pageX: c, pageY: d } = r, u = c - a[0], E = d - a[1];
64
- e.lazy ? b(u, E) : e.onOffsetUpdate(e.index, u, E);
65
- }, v = () => {
66
- e.lazy && M(), p.value = null, e.onOffsetEnd();
67
- }, m = (r) => {
68
- if (r.touches.length === 1) {
69
- const c = r.touches[0], d = c.pageX - a[0], u = c.pageY - a[1];
70
- e.lazy ? b(d, u) : e.onOffsetUpdate(e.index, d, u);
71
- }
72
- }, f = () => {
73
- e.lazy && M(), p.value = null, e.onOffsetEnd();
74
- };
75
- window.addEventListener("touchmove", m), window.addEventListener("touchend", f), window.addEventListener("mousemove", i), window.addEventListener("mouseup", v), o(() => {
76
- window.removeEventListener("touchmove", m), window.removeEventListener("touchend", f), window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", v);
77
- });
78
- }
79
- },
80
- { flush: "post" }
81
- );
82
- const Y = w(
83
- () => e.vertical ? A : D
84
- ), P = w(
85
- () => e.vertical ? I : R
86
- );
87
- return (o, a) => (y(), h("div", {
88
- class: s(t(n)()),
88
+ D((e) => {
89
+ const a = o(w);
90
+ if (a) {
91
+ const s = (p) => {
92
+ const {
93
+ pageX: f,
94
+ pageY: v
95
+ } = p, m = f - a[0], L = v - a[1];
96
+ n.lazy ? I(m, L) : n.onOffsetUpdate(n.index, m, L);
97
+ }, r = () => {
98
+ n.lazy && S(), w.value = null, n.onOffsetEnd();
99
+ }, i = (p) => {
100
+ if (p.touches.length === 1) {
101
+ const f = p.touches[0], v = f.pageX - a[0], m = f.pageY - a[1];
102
+ n.lazy ? I(v, m) : n.onOffsetUpdate(n.index, v, m);
103
+ }
104
+ }, l = () => {
105
+ n.lazy && S(), w.value = null, n.onOffsetEnd();
106
+ };
107
+ window.addEventListener("touchmove", i), window.addEventListener("touchend", l), window.addEventListener("mousemove", s), window.addEventListener("mouseup", r), e(() => {
108
+ window.removeEventListener("touchmove", i), window.removeEventListener("touchend", l), window.removeEventListener("mousemove", s), window.removeEventListener("mouseup", r);
109
+ });
110
+ }
111
+ }, {
112
+ flush: "post"
113
+ });
114
+ const h = z(() => {
115
+ const {
116
+ collapsibleIcon: e,
117
+ vertical: a
118
+ } = n;
119
+ let s = null, r = null;
120
+ const i = e?.start !== void 0, l = e?.end !== void 0;
121
+ return a ? (s = i ? e.start : b(A, null, null), r = l ? e.end : b(R, null, null)) : (s = i ? e.start : b($, null, null), r = l ? e.end : b(j, null, null)), {
122
+ startIcon: () => s,
123
+ endIcon: () => r,
124
+ startCustomize: i,
125
+ endCustomize: l
126
+ };
127
+ });
128
+ return (e, a) => (c(), g("div", {
129
+ class: d(o(t)()),
89
130
  role: "separator",
90
- "aria-valuenow": g(e.ariaNow),
91
- "aria-valuemin": g(e.ariaMin),
92
- "aria-valuemax": g(e.ariaMax)
93
- }, [
94
- e.lazy ? (y(), h("div", {
95
- key: 0,
96
- class: s([t(n)("preview"), { [t(n)("preview-active")]: !!l.value }]),
97
- style: F(t(L)({ "preview-offset": `${l.value}px` }))
98
- }, null, 6)) : O("", !0),
99
- T("div", {
100
- class: s([
101
- t(n)("dragger"),
102
- { [t(n)("dragger-disabled")]: !o.resizable, [t(n)("dragger-active")]: o.active }
103
- ]),
104
- onMousedown: B,
105
- onTouchstart: k
106
- }, null, 34),
107
- o.startCollapsible ? (y(), h("div", {
108
- key: 1,
109
- class: s([t(n)("collapse-bar"), t(n)("collapse-bar-start")]),
110
- onClick: a[0] || (a[0] = () => o.onCollapse(o.index, "start"))
111
- }, [
112
- C(t(Y), {
113
- class: s([t(n)("collapse-icon"), t(n)("collapse-start")])
114
- }, null, 8, ["class"])
115
- ], 2)) : O("", !0),
116
- o.endCollapsible ? (y(), h("div", {
117
- key: 2,
118
- class: s([t(n)("collapse-bar"), t(n)("collapse-bar-end")]),
119
- onClick: a[1] || (a[1] = () => o.onCollapse(o.index, "end"))
120
- }, [
121
- C(t(P), {
122
- class: s([t(n)("collapse-icon"), t(n)("collapse-end")])
123
- }, null, 8, ["class"])
124
- ], 2)) : O("", !0)
125
- ], 10, j));
131
+ "aria-valuenow": C(n.ariaNow),
132
+ "aria-valuemin": C(n.ariaMin),
133
+ "aria-valuemax": C(n.ariaMax)
134
+ }, [n.lazy ? (c(), g("div", {
135
+ key: 0,
136
+ class: d([o(t)("preview"), {
137
+ [o(t)("preview-active")]: !!u.value
138
+ }]),
139
+ style: F(o(x)({
140
+ "preview-offset": `${u.value}px`
141
+ }))
142
+ }, null, 6)) : y("", !0), O("div", {
143
+ class: d([o(t)("dragger"), {
144
+ [o(t)("dragger-disabled")]: !e.resizable,
145
+ [o(t)("dragger-active")]: e.active,
146
+ [o(t)("dragger-customize")]: e.draggerIcon !== void 0
147
+ }]),
148
+ onMousedown: Y,
149
+ onTouchstart: P
150
+ }, [e.draggerIcon !== void 0 ? (c(), g("div", {
151
+ key: 0,
152
+ class: d(o(t)("dragger-icon"))
153
+ }, [(c(), E(M(e.draggerIcon)))], 2)) : y("", !0)], 34), e.startCollapsible ? (c(), g("div", {
154
+ key: 1,
155
+ class: d([o(t)("collapse-bar"), o(t)("collapse-bar-start"), h.value.startCustomize ? o(t)("collapse-bar-customize") : "", B(e.showStartCollapsibleIcon)]),
156
+ onClick: a[0] || (a[0] = () => e.onCollapse(e.index, "start"))
157
+ }, [O("span", {
158
+ class: d([o(t)("collapse-icon"), o(t)("collapse-start")])
159
+ }, [(c(), E(M(h.value.startIcon)))], 2)], 2)) : y("", !0), e.endCollapsible ? (c(), g("div", {
160
+ key: 2,
161
+ class: d([o(t)("collapse-bar"), o(t)("collapse-bar-end"), h.value.endCustomize ? o(t)("collapse-bar-customize") : "", B(e.showEndCollapsibleIcon)]),
162
+ onClick: a[1] || (a[1] = () => e.onCollapse(e.index, "end"))
163
+ }, [O("span", {
164
+ class: d([o(t)("collapse-icon"), o(t)("collapse-end")])
165
+ }, [(c(), E(M(h.value.endIcon)))], 2)], 2)) : y("", !0)], 10, G));
126
166
  }
127
167
  });
128
168
  export {
129
- K as default
169
+ W as default
130
170
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as q, ref as G, unref as a, computed as _, createBlock as y, openBlock as r, withCtx as g, createElementVNode as J, normalizeClass as h, normalizeStyle as K, createElementBlock as p, createCommentVNode as b, Fragment as d, renderList as k, createVNode as Q, mergeProps as T, resolveDynamicComponent as X } from "vue";
1
+ import { defineComponent as q, ref as G, unref as o, computed as v, createBlock as d, openBlock as r, withCtx as C, createElementVNode as J, normalizeClass as R, normalizeStyle as K, createElementBlock as f, createCommentVNode as I, Fragment as b, renderList as E, createVNode as Q, mergeProps as T, resolveDynamicComponent as X } from "vue";
2
2
  import { omit as Y } from "lodash-unified";
3
3
  import "../config-provider/index.mjs";
4
4
  import "../resize-observer/index.mjs";
@@ -8,12 +8,12 @@ import { useResize as ee } from "./hooks/useResize.mjs";
8
8
  import { useSizes as te } from "./hooks/useSizes.mjs";
9
9
  import "./Panel.vue.mjs";
10
10
  import "./SplitBar.vue.mjs";
11
- import ae from "./style/index.mjs";
12
- import { useNamespace as se } from "../config-provider/hooks/use-namespace.mjs";
13
- import oe from "../resize-observer/index.vue.mjs";
11
+ import oe from "./style/index.mjs";
12
+ import { useNamespace as ae } from "../config-provider/hooks/use-namespace.mjs";
13
+ import se from "../resize-observer/index.vue.mjs";
14
14
  import ne from "./Panel.vue2.mjs";
15
- import re from "./SplitBar.vue2.mjs";
16
- const ge = /* @__PURE__ */ q({
15
+ import le from "./SplitBar.vue2.mjs";
16
+ const Ce = /* @__PURE__ */ q({
17
17
  name: "Splitter",
18
18
  __name: "Splitter",
19
19
  props: {
@@ -25,85 +25,91 @@ const ge = /* @__PURE__ */ q({
25
25
  onResizeStart: {},
26
26
  onResize: {},
27
27
  onResizeEnd: {},
28
- lazy: { type: Boolean }
28
+ lazy: { type: Boolean },
29
+ draggerIcon: {},
30
+ collapsibleIcon: {}
29
31
  },
30
- setup(E) {
31
- const n = E, { b: c } = se("splitter"), I = ae("splitter"), i = Z(), l = G(), N = (e) => {
32
- const { offsetWidth: o, offsetHeight: s } = e.target, t = n.layout === "vertical" ? s : o;
33
- l.value !== 0 && (l.value = t);
32
+ setup(_) {
33
+ const n = _, { b: m } = ae("splitter"), k = oe("splitter"), i = Z(), c = G(), w = (e) => {
34
+ const { offsetWidth: s, offsetHeight: a } = e.target, t = n.layout === "vertical" ? a : s;
35
+ c.value !== 0 && (c.value = t);
34
36
  }, [
35
- O,
37
+ N,
36
38
  u,
37
- v,
39
+ g,
40
+ O,
38
41
  P,
39
- M,
40
- B
41
- ] = te(i, l), m = x(i, u, !1), [U, $, w, V, C] = ee(
42
+ M
43
+ ] = te(i, c), l = x(i, u, !1), [B, U, $, V, y] = ee(
42
44
  i,
43
- m,
44
- v,
45
45
  l,
46
- B,
46
+ g,
47
+ c,
48
+ M,
47
49
  !1
48
50
  ), A = (e) => {
49
- U(e), n.onResizeStart?.(a(u));
50
- }, D = (e, o) => {
51
- const s = $(e, o);
52
- n.onResize?.(s);
51
+ B(e), n.onResizeStart?.(o(u));
52
+ }, D = (e, s) => {
53
+ const a = U(e, s);
54
+ n.onResize?.(a);
53
55
  }, F = () => {
54
- w(), n.onResizeEnd?.(a(u));
55
- }, H = (e, o) => {
56
- const s = V(e, o);
57
- n.onResize?.(s), n.onResizeEnd?.(s);
58
- }, L = _(() => [c(), n.className, c(n.layout), I.value]), R = _(() => {
56
+ $(), n.onResizeEnd?.(o(u));
57
+ }, H = (e, s) => {
58
+ const a = V(e, s);
59
+ n.onResize?.(a), n.onResizeEnd?.(a);
60
+ }, L = v(() => [m(), n.className, m(n.layout), k.value]), h = v(() => {
59
61
  const e = [];
60
- let o = 0;
61
- for (let s = 0; s < i.value.length; s += 1)
62
- o += a(v)[s], e.push(o);
62
+ let s = 0;
63
+ for (let a = 0; a < i.value.length; a += 1)
64
+ s += o(g)[a], e.push(s);
63
65
  return e;
64
- }), f = (e) => {
65
- const o = a(R), s = a(P), t = a(M);
66
+ }), p = (e) => {
67
+ const s = o(h), a = o(O), t = o(P);
66
68
  return {
67
- minStart: (o[e - 1] || 0) + s[e],
68
- minEnd: (o[e + 1] || 100) - t[e + 1],
69
- maxStart: (o[e - 1] || 0) + t[e],
70
- maxEnd: (o[e + 1] || 100) - s[e + 1]
69
+ minStart: (s[e - 1] || 0) + a[e],
70
+ minEnd: (s[e + 1] || 100) - t[e + 1],
71
+ maxStart: (s[e - 1] || 0) + t[e],
72
+ maxEnd: (s[e + 1] || 100) - a[e + 1]
71
73
  };
72
74
  };
73
- return (e, o) => (r(), y(a(oe), { onResize: N }, {
74
- default: g(() => [
75
+ return (e, s) => (r(), d(o(se), { onResize: w }, {
76
+ default: C(() => [
75
77
  J("div", {
76
78
  style: K(e.style),
77
- class: h(L.value)
79
+ class: R(L.value)
78
80
  }, [
79
- (r(!0), p(d, null, k(a(i), (s, t) => (r(), p(d, { key: t }, [
80
- Q(ne, T({ ref_for: !0 }, a(Y)(s, "_child"), {
81
- size: a(O)[t]
81
+ (r(!0), f(b, null, E(o(i), (a, t) => (r(), f(b, { key: t }, [
82
+ Q(ne, T({ ref_for: !0 }, o(Y)(a, "_child"), {
83
+ size: o(N)[t]
82
84
  }), {
83
- default: g(() => [
84
- (r(!0), p(d, null, k(s._child, (z, S) => (r(), y(X(z), { key: S }))), 128))
85
+ default: C(() => [
86
+ (r(!0), f(b, null, E(a._child, (z, S) => (r(), d(X(z), { key: S }))), 128))
85
87
  ]),
86
88
  _: 2
87
89
  }, 1040, ["size"]),
88
- a(m)[t] ? (r(), y(re, {
90
+ o(l)[t] ? (r(), d(le, {
89
91
  key: 0,
90
92
  lazy: e.lazy,
91
93
  index: t,
92
- active: a(C) === t,
94
+ active: o(y) === t,
93
95
  vertical: e.layout === "vertical",
94
- resizable: a(m)[t].resizable,
95
- "aria-now": R.value[t] * 100,
96
+ resizable: o(l)[t].resizable,
97
+ "aria-now": h.value[t] * 100,
96
98
  "aria-min": Math.max(
97
- f(t).minStart,
98
- f(t).minEnd
99
+ p(t).minStart,
100
+ p(t).minEnd
99
101
  ) * 100,
100
102
  "aria-max": Math.min(
101
- f(t).maxStart,
102
- f(t).maxEnd
103
+ p(t).maxStart,
104
+ p(t).maxEnd
103
105
  ) * 100,
104
- "start-collapsible": a(m)[t].startCollapsible,
105
- "end-collapsible": a(m)[t].endCollapsible,
106
- "container-size": l.value || 0,
106
+ "start-collapsible": o(l)[t].startCollapsible,
107
+ "end-collapsible": o(l)[t].endCollapsible,
108
+ "show-start-collapsible-icon": o(l)[t].showStartCollapsibleIcon,
109
+ "show-end-collapsible-icon": o(l)[t].showEndCollapsibleIcon,
110
+ "container-size": c.value || 0,
111
+ "dragger-icon": e.draggerIcon,
112
+ "collapsible-icon": e.collapsibleIcon,
107
113
  onOffsetStart: A,
108
114
  onOffsetUpdate: (z, S, W) => {
109
115
  let j = e.layout === "vertical" ? W : S;
@@ -111,13 +117,13 @@ const ge = /* @__PURE__ */ q({
111
117
  },
112
118
  onOffsetEnd: F,
113
119
  onCollapse: H
114
- }, null, 8, ["lazy", "index", "active", "vertical", "resizable", "aria-now", "aria-min", "aria-max", "start-collapsible", "end-collapsible", "container-size", "onOffsetUpdate"])) : b("", !0)
120
+ }, null, 8, ["lazy", "index", "active", "vertical", "resizable", "aria-now", "aria-min", "aria-max", "start-collapsible", "end-collapsible", "show-start-collapsible-icon", "show-end-collapsible-icon", "container-size", "dragger-icon", "collapsible-icon", "onOffsetUpdate"])) : I("", !0)
115
121
  ], 64))), 128)),
116
- typeof a(C) == "number" ? (r(), p("div", {
122
+ typeof o(y) == "number" ? (r(), f("div", {
117
123
  key: 0,
118
124
  "aria-hidden": "",
119
- class: h([a(c)("mask"), a(c)(`mask-${e.layout}`)])
120
- }, null, 2)) : b("", !0)
125
+ class: R([o(m)("mask"), o(m)(`mask-${e.layout}`)])
126
+ }, null, 2)) : I("", !0)
121
127
  ], 6)
122
128
  ]),
123
129
  _: 1
@@ -125,5 +131,5 @@ const ge = /* @__PURE__ */ q({
125
131
  }
126
132
  });
127
133
  export {
128
- ge as default
134
+ Ce as default
129
135
  };
@@ -4,6 +4,7 @@ export type ItemType = Omit<PanelProps, 'collapsible'> & {
4
4
  collapsible: {
5
5
  start?: boolean;
6
6
  end?: boolean;
7
+ showCollapsibleIcon: 'auto' | boolean;
7
8
  };
8
9
  _child: VNode[];
9
10
  };
@@ -1,25 +1,29 @@
1
- import { useSlots as o, computed as s } from "vue";
2
- import { genRealChildren as u } from "../../ap-form/item-group/helper.mjs";
3
- function d(t) {
4
- if (t && typeof t == "object")
5
- return t;
6
- const e = !!t || t === "";
1
+ import { useSlots as n, computed as s } from "vue";
2
+ import { genRealChildren as l } from "../../ap-form/item-group/helper.mjs";
3
+ function u(o) {
4
+ if (o && typeof o == "object")
5
+ return {
6
+ ...o,
7
+ showCollapsibleIcon: o.showCollapsibleIcon === void 0 ? "auto" : o.showCollapsibleIcon
8
+ };
9
+ const t = !!o || o === "";
7
10
  return {
8
- start: e,
9
- end: e
11
+ start: t,
12
+ end: t,
13
+ showCollapsibleIcon: "auto"
10
14
  };
11
15
  }
12
- const f = () => {
13
- const t = o();
14
- return s(() => t.default ? u(t.default()).map((r) => {
15
- const { props: n } = r;
16
+ const d = () => {
17
+ const o = n();
18
+ return s(() => o.default ? l(o.default()).map((e) => {
19
+ const { props: r } = e;
16
20
  return {
17
- ...n,
18
- collapsible: d(n?.collapsible),
19
- _child: r.children.default?.()
21
+ ...r,
22
+ collapsible: u(r?.collapsible),
23
+ _child: e.children.default?.()
20
24
  };
21
25
  }) : []);
22
26
  };
23
27
  export {
24
- f as useItems
28
+ d as useItems
25
29
  };
@@ -1,8 +1,11 @@
1
1
  import { Ref, ComputedRef } from 'vue';
2
+ import { ShowCollapsibleIconMode } from '../interface';
2
3
  import { ItemType } from './useItems';
3
4
  export type ResizableInfo = {
4
5
  resizable: boolean;
5
6
  startCollapsible: boolean;
6
7
  endCollapsible: boolean;
8
+ showStartCollapsibleIcon: ShowCollapsibleIconMode;
9
+ showEndCollapsibleIcon: ShowCollapsibleIconMode;
7
10
  };
8
11
  export declare const useResizable: (items: Ref<ItemType[]>, pxSizes: Ref<number[]>, isRTL: boolean) => ComputedRef<ResizableInfo[]>;
@@ -1,37 +1,60 @@
1
- import { computed as R, unref as b } from "vue";
2
- const g = (z, m, n) => R(() => {
3
- const o = [], l = b(z), i = b(m);
4
- for (let e = 0; e < l.length - 1; e += 1) {
5
- const u = l[e], x = l[e + 1], t = i[e], s = i[e + 1], {
6
- resizable: d = !0,
7
- min: C,
8
- collapsible: r
9
- } = u, {
10
- resizable: v = !0,
11
- min: f,
1
+ import { computed as R, unref as u } from "vue";
2
+ function w(l, o) {
3
+ return l.collapsible && o.collapsible ? l.showCollapsibleIcon === !0 || o.showCollapsibleIcon === !0 ? !0 : l.showCollapsibleIcon === "auto" || o.showCollapsibleIcon === "auto" ? "auto" : !1 : l.collapsible ? l.showCollapsibleIcon : o.collapsible ? o.showCollapsibleIcon : !1;
4
+ }
5
+ const k = (l, o, i) => R(() => {
6
+ const b = [], c = u(l), p = u(o);
7
+ for (let e = 0; e < c.length - 1; e += 1) {
8
+ const d = c[e], f = c[e + 1], s = p[e], n = p[e + 1], {
9
+ resizable: z = !0,
10
+ min: m,
11
+ collapsible: t
12
+ } = d, {
13
+ resizable: S = !0,
14
+ min: x,
12
15
  collapsible: a
13
- } = x, I = (
16
+ } = f, E = (
14
17
  // Both need to be resizable
15
- d && v && // Prev is not collapsed and limit min size
16
- (t !== 0 || !C) && // Next is not collapsed and limit min size
17
- (s !== 0 || !f)
18
- ), p = (
18
+ z && S && // Prev is not collapsed and limit min size
19
+ (s !== 0 || !m) && // Next is not collapsed and limit min size
20
+ (n !== 0 || !x)
21
+ ), g = !!t.end && s > 0, v = !!a.start && n === 0 && s > 0, r = (
19
22
  // Self is collapsible
20
- r.end && t > 0 || // Collapsed and can be collapsed
21
- a.start && s === 0 && t > 0
22
- ), c = (
23
+ t.end && s > 0 || // Collapsed and can be collapsed
24
+ a.start && n === 0 && s > 0
25
+ ), M = !!a.start && n > 0, _ = !!t.end && s === 0 && n > 0, C = (
23
26
  // Self is collapsible
24
- a.start && s > 0 || // Collapsed and can be collapsed
25
- r.end && t === 0 && s > 0
27
+ a.start && n > 0 || // Collapsed and can be collapsed
28
+ t.end && s === 0 && n > 0
29
+ ), I = w(
30
+ {
31
+ collapsible: g,
32
+ showCollapsibleIcon: t.showCollapsibleIcon
33
+ },
34
+ {
35
+ collapsible: v,
36
+ showCollapsibleIcon: a.showCollapsibleIcon
37
+ }
38
+ ), h = w(
39
+ {
40
+ collapsible: M,
41
+ showCollapsibleIcon: a.showCollapsibleIcon
42
+ },
43
+ {
44
+ collapsible: _,
45
+ showCollapsibleIcon: t.showCollapsibleIcon
46
+ }
26
47
  );
27
- o[e] = {
28
- resizable: I,
29
- startCollapsible: !!(n ? c : p),
30
- endCollapsible: !!(n ? p : c)
48
+ b[e] = {
49
+ resizable: E,
50
+ startCollapsible: !!(i ? C : r),
51
+ endCollapsible: !!(i ? r : C),
52
+ showStartCollapsibleIcon: i ? h : I,
53
+ showEndCollapsibleIcon: i ? I : h
31
54
  };
32
55
  }
33
- return o;
56
+ return b;
34
57
  });
35
58
  export {
36
- g as useResizable
59
+ k as useResizable
37
60
  };