@aplus-frontend/ui 7.11.2 → 7.11.4

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 (45) 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/batch-input-group/form-item.vue.mjs +24 -22
  12. package/es/src/business/batch-input-group/index.vue.mjs +1 -1
  13. package/es/src/splitter/SplitBar.vue2.mjs +152 -112
  14. package/es/src/splitter/Splitter.vue2.mjs +67 -61
  15. package/es/src/splitter/hooks/useItems.d.ts +1 -0
  16. package/es/src/splitter/hooks/useItems.mjs +20 -16
  17. package/es/src/splitter/hooks/useResizable.d.ts +3 -0
  18. package/es/src/splitter/hooks/useResizable.mjs +50 -27
  19. package/es/src/splitter/interface.d.ts +12 -1
  20. package/es/src/splitter/style/index.mjs +51 -15
  21. package/es/src/version.d.ts +1 -1
  22. package/es/src/version.mjs +1 -1
  23. package/lib/src/ag-grid/editable/utils.js +1 -1
  24. package/lib/src/business/ap-copy/constans.js +1 -1
  25. package/lib/src/business/ap-copy/style/index.js +1 -1
  26. package/lib/src/business/ap-product-info/ApProductInfo.d.ts +9 -0
  27. package/lib/src/business/ap-product-info/ApProductInfo.js +1 -1
  28. package/lib/src/business/ap-product-info/constans.d.ts +4 -0
  29. package/lib/src/business/ap-product-info/constans.js +1 -1
  30. package/lib/src/business/ap-product-info/index.d.ts +15 -0
  31. package/lib/src/business/ap-product-info/interface.d.ts +1 -0
  32. package/lib/src/business/ap-product-info/style/index.js +1 -1
  33. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  34. package/lib/src/business/batch-input-group/index.vue.js +1 -1
  35. package/lib/src/splitter/SplitBar.vue2.js +1 -1
  36. package/lib/src/splitter/Splitter.vue2.js +1 -1
  37. package/lib/src/splitter/hooks/useItems.d.ts +1 -0
  38. package/lib/src/splitter/hooks/useItems.js +1 -1
  39. package/lib/src/splitter/hooks/useResizable.d.ts +3 -0
  40. package/lib/src/splitter/hooks/useResizable.js +1 -1
  41. package/lib/src/splitter/interface.d.ts +12 -1
  42. package/lib/src/splitter/style/index.js +1 -1
  43. package/lib/src/version.d.ts +1 -1
  44. package/lib/src/version.js +1 -1
  45. package/package.json +5 -5
@@ -1,38 +1,44 @@
1
- import { isString as u } from "lodash-unified";
2
- import s from "../../ap-form/utils/set.mjs";
3
- function i(o, t, r) {
1
+ import { isString as s } from "lodash-unified";
2
+ import u from "../../ap-form/utils/set.mjs";
3
+ import { getFieldProps as c } from "../../ap-table/utils.mjs";
4
+ function i(n, t, r) {
4
5
  if (r)
5
- return u(r) ? o[r] : r(o, t);
6
+ return s(r) ? n[r] : r(n, t);
6
7
  }
7
- function m(o, t) {
8
+ function d(n, t) {
8
9
  const r = {};
9
- return o.forEach((e, n) => {
10
- const f = i(e, n, t);
10
+ return n.forEach((e, o) => {
11
+ const f = i(e, o, t);
11
12
  r[f] = e;
12
13
  }), r;
13
14
  }
14
- function p(o, t, r) {
15
- return o.map((e, n) => {
16
- const f = i(e, n, t);
15
+ function g(n, t, r) {
16
+ return n.map((e, o) => {
17
+ const f = i(e, o, t);
17
18
  return r[f] ?? e;
18
19
  });
19
20
  }
20
- function d(o) {
21
+ function h(n) {
21
22
  let t = {};
22
23
  function r(e) {
23
- for (const n of e)
24
- n.children?.length ? r(n.children) : n.fieldProps?.transform && (t = s(
25
- t,
26
- [n.dataIndex].flat(1),
27
- n.fieldProps.transform,
28
- !0
29
- ));
24
+ for (const o of e)
25
+ if (o.children?.length)
26
+ r(o.children);
27
+ else {
28
+ const f = c(o.fieldProps, {});
29
+ f?.transform && (t = u(
30
+ t,
31
+ [o.dataIndex].flat(1),
32
+ f.transform,
33
+ !0
34
+ ));
35
+ }
30
36
  }
31
- return r(o), t;
37
+ return r(n), t;
32
38
  }
33
39
  export {
34
- m as arrayToObject,
35
- d as getColumnTransformOptions,
40
+ d as arrayToObject,
41
+ h as getColumnTransformOptions,
36
42
  i as getRowKey,
37
- p as updateArrItem
43
+ g as updateArrItem
38
44
  };
@@ -5,7 +5,7 @@ const t = () => ({
5
5
  },
6
6
  size: {
7
7
  type: Number,
8
- default: 14
8
+ default: 12
9
9
  },
10
10
  textStyle: {
11
11
  type: [String, Object],
@@ -39,7 +39,7 @@ const r = (o) => {
39
39
  marginInlineStart: o.spaceXS,
40
40
  display: "flex",
41
41
  alignItems: "center",
42
- fontSize: o.fontSizeLG,
42
+ fontSize: o.fontSize,
43
43
  color: o.textColor4,
44
44
  cursor: "pointer",
45
45
  "&:hover": {
@@ -21,6 +21,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
21
21
  type: BooleanConstructor;
22
22
  default: boolean;
23
23
  };
24
+ showImg: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
24
28
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
25
29
  title: {
26
30
  type: StringConstructor;
@@ -42,11 +46,16 @@ declare const _default: DefineComponent<ExtractPropTypes<{
42
46
  type: BooleanConstructor;
43
47
  default: boolean;
44
48
  };
49
+ showImg: {
50
+ type: BooleanConstructor;
51
+ default: boolean;
52
+ };
45
53
  }>> & Readonly<{}>, {
46
54
  values: ApProductInfoValue[];
47
55
  title: string;
48
56
  preview: boolean;
49
57
  disableCopy: boolean;
50
58
  imgSrc: string;
59
+ showImg: boolean;
51
60
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
52
61
  export default _default;
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as f, h as t, createVNode as e, createTextVNode as v } from "vue";
2
- import { Space as y, Tooltip as h } from "@aplus-frontend/antdv";
2
+ import { Space as h, Tooltip as y } from "@aplus-frontend/antdv";
3
3
  import { IconApAdFillWarn as g } from "@aplus-frontend/icon";
4
4
  import "../../config-provider/index.mjs";
5
5
  import { ApCopy as s } from "../ap-copy/index.mjs";
6
6
  import { ApImage as m } from "../ap-image/index.mjs";
7
7
  import { ApProductInfoProps as k } from "./constans.mjs";
8
8
  import b from "./style/index.mjs";
9
- import { useNamespace as A } from "../../config-provider/hooks/use-namespace.mjs";
9
+ import { useNamespace as w } from "../../config-provider/hooks/use-namespace.mjs";
10
10
  const T = /* @__PURE__ */ f({
11
11
  name: "ApProductInfo",
12
12
  props: k(),
@@ -15,11 +15,11 @@ const T = /* @__PURE__ */ f({
15
15
  b: i,
16
16
  e: o,
17
17
  m: a
18
- } = A("ap-product-info"), c = b("ap-product-info"), p = (l) => typeof l.value == "function" ? l.value() : l.helpMessage ? t(y.Compact, {}, [t(s, {
18
+ } = w("ap-product-info"), c = b("ap-product-info"), p = (l) => typeof l.value == "function" ? l.value() : l.helpMessage ? t(h.Compact, {}, [t(s, {
19
19
  text: l.value,
20
20
  link: l.link,
21
21
  textStyle: l.link ? "link" : "minor"
22
- }), t(h, {
22
+ }), t(y, {
23
23
  placement: "top",
24
24
  color: l.toolTipBgColor,
25
25
  title: typeof l.helpMessage == "string" ? l.helpMessage : t(l.helpMessage)
@@ -36,7 +36,7 @@ const T = /* @__PURE__ */ f({
36
36
  }, l.value);
37
37
  return () => e("div", {
38
38
  class: [i(), c.value]
39
- }, [e("div", {
39
+ }, [r.showImg && e("div", {
40
40
  class: o("img")
41
41
  }, [e(m, {
42
42
  src: r.imgSrc,
@@ -21,4 +21,8 @@ export declare const ApProductInfoProps: () => {
21
21
  type: BooleanConstructor;
22
22
  default: boolean;
23
23
  };
24
+ showImg: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
24
28
  };
@@ -18,6 +18,10 @@ const e = () => ({
18
18
  disableCopy: {
19
19
  type: Boolean,
20
20
  default: !1
21
+ },
22
+ showImg: {
23
+ type: Boolean,
24
+ default: !0
21
25
  }
22
26
  });
23
27
  export {
@@ -23,12 +23,17 @@ declare const ApProductInfo: {
23
23
  type: BooleanConstructor;
24
24
  default: boolean;
25
25
  };
26
+ showImg: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
26
30
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
27
31
  values: ApProductInfoValue[];
28
32
  title: string;
29
33
  preview: boolean;
30
34
  disableCopy: boolean;
31
35
  imgSrc: string;
36
+ showImg: boolean;
32
37
  }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
33
38
  P: {};
34
39
  B: {};
@@ -57,12 +62,17 @@ declare const ApProductInfo: {
57
62
  type: BooleanConstructor;
58
63
  default: boolean;
59
64
  };
65
+ showImg: {
66
+ type: BooleanConstructor;
67
+ default: boolean;
68
+ };
60
69
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
61
70
  values: ApProductInfoValue[];
62
71
  title: string;
63
72
  preview: boolean;
64
73
  disableCopy: boolean;
65
74
  imgSrc: string;
75
+ showImg: boolean;
66
76
  }>;
67
77
  __isFragment?: never;
68
78
  __isTeleport?: never;
@@ -88,12 +98,17 @@ declare const ApProductInfo: {
88
98
  type: BooleanConstructor;
89
99
  default: boolean;
90
100
  };
101
+ showImg: {
102
+ type: BooleanConstructor;
103
+ default: boolean;
104
+ };
91
105
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
92
106
  values: ApProductInfoValue[];
93
107
  title: string;
94
108
  preview: boolean;
95
109
  disableCopy: boolean;
96
110
  imgSrc: string;
111
+ showImg: boolean;
97
112
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
98
113
  $props: {
99
114
  onClick?: () => void;
@@ -5,6 +5,7 @@ export interface ApProductInfoProps {
5
5
  title?: string;
6
6
  values?: ApProductInfoValue[];
7
7
  disableCopy?: boolean;
8
+ showImg?: boolean;
8
9
  }
9
10
  export interface ApProductInfoValue {
10
11
  label?: string;
@@ -30,7 +30,8 @@ const o = (i) => {
30
30
  height: "12px",
31
31
  top: "50%",
32
32
  marginBlockStart: i.calc(i.spaceSM).mul(-1).equal(),
33
- marginInlineEnd: i.spaceXL,
33
+ marginInlineEnd: i.spaceLG,
34
+ marginInlineStart: i.spaceSM,
34
35
  zIndex: 1
35
36
  },
36
37
  [`${l}__divider-vertical`]: {
@@ -59,26 +59,28 @@ const P = /* @__PURE__ */ m({
59
59
  defaultSelectedAllKey: { type: Boolean }
60
60
  },
61
61
  setup(d) {
62
- const t = d, { internalInstance: s } = b(), u = a(() => t?.transform || {
62
+ const e = d, { internalInstance: s } = b(), u = a(() => e?.transform || {
63
63
  flat: !1,
64
- transformer: (e) => {
65
- if (e)
66
- return !e?.value || e?.value?.length < 1 ? void 0 : t?.field?.options ? {
67
- ...e,
68
- value: e?.value?.filter((l) => i(l?.trim()))?.map((l) => t.trim ? l?.trim() : l)
69
- } : e?.value?.filter((l) => i(l?.trim()))?.map((l) => t.trim ? l?.trim() : l);
64
+ transformer: (l) => {
65
+ if (l)
66
+ return !l?.value || l?.value?.length < 1 ? void 0 : e?.field?.options ? {
67
+ ...l,
68
+ value: l?.value?.filter((t) => i(t?.trim()))?.map((t) => e.trim ? t?.trim() : t)
69
+ } : l?.value?.filter((t) => i(t?.trim()))?.map((t) => e.trim ? t?.trim() : t);
70
70
  }
71
- }), p = a(() => t.field?.style || "width:auto"), f = a(() => {
72
- if (t.initialValue)
73
- return t.initialValue;
74
- const e = s?.getInitialValues();
75
- if (!B(e, t.name))
76
- return {
77
- key: t?.field?.options?.map((l) => l.value)
71
+ }), f = a(() => e.field?.style || "width:auto"), p = a(() => {
72
+ if (e.initialValue)
73
+ return e.initialValue;
74
+ const l = s?.getInitialValues();
75
+ if (!B(l, e.name))
76
+ return e.field.hasAll === !1 ? {
77
+ key: [e?.field?.options?.[0]?.value]
78
+ } : {
79
+ key: e?.field?.options?.map((t) => t.value)
78
80
  };
79
81
  });
80
- return (e, l) => (v(), c(g, o(
81
- r(n)(t, [
82
+ return (l, t) => (v(), c(g, o(
83
+ r(n)(e, [
82
84
  "field",
83
85
  "initialValue",
84
86
  "transform",
@@ -86,16 +88,16 @@ const P = /* @__PURE__ */ m({
86
88
  "disabled"
87
89
  ]),
88
90
  {
89
- "initial-value": f.value,
91
+ "initial-value": p.value,
90
92
  transform: u.value,
91
- bordered: e.field?.options?.length ? !1 : e.bordered
93
+ bordered: l.field?.options?.length ? !1 : l.bordered
92
94
  }
93
95
  ), {
94
96
  default: y(() => [
95
- h(V, o(r(n)(t.field, ["style"]), {
96
- style: p.value,
97
- disabled: e.disabled,
98
- placeholer: e.placeholer
97
+ h(V, o(r(n)(e.field, ["style"]), {
98
+ style: f.value,
99
+ disabled: l.disabled,
100
+ placeholer: l.placeholer
99
101
  }), null, 16, ["style", "disabled", "placeholer"])
100
102
  ]),
101
103
  _: 1
@@ -97,7 +97,7 @@ const d = "GROUP_SEARCH_ALL", Ve = /* @__PURE__ */ $({
97
97
  return e.length === 1 || !o.hasAll ? e[0] : d;
98
98
  }), L = r(() => {
99
99
  const e = t(a)?.key;
100
- return !e || e?.length <= 1 ? t(I) : (o.options || []).filter((n) => e.includes(n.value)).map((n) => n.label).join("/");
100
+ return !e || e?.length <= 1 || o.hasAll === !1 ? t(I) : (o.options || []).filter((n) => e.includes(n.value)).map((n) => n.label).join("/");
101
101
  });
102
102
  function O(e) {
103
103
  const l = t(a) || {}, n = e === d ? t(R) : oe(e) ? [e] : [];
@@ -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 P, ref as S, computed as C, unref as a, watchEffect as U, createElementBlock as g, openBlock as m, normalizeClass as c, createCommentVNode as b, createElementVNode as z, normalizeStyle as T, createBlock as D, resolveDynamicComponent as F, createVNode as B } 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__ */ P({
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(L) {
52
+ function y(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 o = L, {
56
+ b: t,
57
+ cssVar: N
58
+ } = q("splitter-bar"), w = S(null), d = S(0), k = C(() => o.vertical ? 0 : a(d)), x = C(() => o.vertical ? a(d) : 0), V = (e) => {
59
+ o.resizable && e.currentTarget && (w.value = [e.pageX, e.pageY], o.onOffsetStart(o.index));
60
+ }, X = (e) => {
61
+ if (o.resizable && e.touches.length === 1) {
62
+ const n = e.touches[0];
63
+ w.value = [n.pageX, n.pageY], o.onOffsetStart(o.index);
64
+ }
65
+ }, Y = (e) => {
66
+ const {
67
+ containerSize: n,
68
+ ariaMax: s,
69
+ ariaMin: r,
70
+ ariaNow: i
71
+ } = o, l = n * i / 100, u = l + e, p = Math.max(0, n * r / 100), f = Math.max(n, n * s / 100);
72
+ return Math.max(p, Math.min(f, u)) - l;
73
+ }, O = (e, n) => {
74
+ const s = Y(o.vertical ? n : e);
75
+ d.value = s;
76
+ }, E = () => {
77
+ o.onOffsetUpdate(o.index, a(k), a(x)), d.value = 0;
78
+ }, M = (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
+ U((e) => {
89
+ const n = a(w);
90
+ if (n) {
91
+ const s = (u) => {
92
+ const {
93
+ pageX: p,
94
+ pageY: f
95
+ } = u, v = p - n[0], I = f - n[1];
96
+ o.lazy ? O(v, I) : o.onOffsetUpdate(o.index, v, I);
97
+ }, r = () => {
98
+ o.lazy && E(), w.value = null, o.onOffsetEnd();
99
+ }, i = (u) => {
100
+ if (u.touches.length === 1) {
101
+ const p = u.touches[0], f = p.pageX - n[0], v = p.pageY - n[1];
102
+ o.lazy ? O(f, v) : o.onOffsetUpdate(o.index, f, v);
103
+ }
104
+ }, l = () => {
105
+ o.lazy && E(), w.value = null, o.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 = C(() => {
115
+ const {
116
+ collapsibleIcon: e,
117
+ vertical: n
118
+ } = o;
119
+ let s = null, r = null;
120
+ const i = e?.start !== void 0, l = e?.end !== void 0;
121
+ return n ? (s = i ? () => e.start : A, r = l ? () => e.end : R) : (s = i ? () => e.start : $, r = l ? () => e.end : j), {
122
+ startIcon: s,
123
+ endIcon: r,
124
+ startCustomize: i,
125
+ endCustomize: l
126
+ };
127
+ });
128
+ return (e, n) => (m(), g("div", {
129
+ class: c(a(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": y(o.ariaNow),
132
+ "aria-valuemin": y(o.ariaMin),
133
+ "aria-valuemax": y(o.ariaMax)
134
+ }, [o.lazy ? (m(), g("div", {
135
+ key: 0,
136
+ class: c([a(t)("preview"), {
137
+ [a(t)("preview-active")]: !!d.value
138
+ }]),
139
+ style: T(a(N)({
140
+ "preview-offset": `${d.value}px`
141
+ }))
142
+ }, null, 6)) : b("", !0), z("div", {
143
+ class: c([a(t)("dragger"), {
144
+ [a(t)("dragger-disabled")]: !e.resizable,
145
+ [a(t)("dragger-active")]: e.active,
146
+ [a(t)("dragger-customize")]: e.draggerIcon !== void 0
147
+ }]),
148
+ onMousedown: V,
149
+ onTouchstart: X
150
+ }, [e.draggerIcon !== void 0 ? (m(), g("div", {
151
+ key: 0,
152
+ class: c(a(t)("dragger-icon"))
153
+ }, [(m(), D(F(e.draggerIcon)))], 2)) : b("", !0)], 34), e.startCollapsible ? (m(), g("div", {
154
+ key: 1,
155
+ class: c([a(t)("collapse-bar"), a(t)("collapse-bar-start"), h.value.startCustomize ? a(t)("collapse-bar-customize") : "", M(e.showStartCollapsibleIcon)]),
156
+ onClick: n[0] || (n[0] = () => e.onCollapse(e.index, "start"))
157
+ }, [z("span", {
158
+ class: c([a(t)("collapse-icon"), a(t)("collapse-start")])
159
+ }, [B(a(h).startIcon)], 2)], 2)) : b("", !0), e.endCollapsible ? (m(), g("div", {
160
+ key: 2,
161
+ class: c([a(t)("collapse-bar"), a(t)("collapse-bar-end"), h.value.endCustomize ? a(t)("collapse-bar-customize") : "", M(e.showEndCollapsibleIcon)]),
162
+ onClick: n[1] || (n[1] = () => e.onCollapse(e.index, "end"))
163
+ }, [z("span", {
164
+ class: c([a(t)("collapse-icon"), a(t)("collapse-end")])
165
+ }, [B(a(h).endIcon)], 2)], 2)) : b("", !0)], 10, G));
126
166
  }
127
167
  });
128
168
  export {
129
- K as default
169
+ W as default
130
170
  };