@reportportal/ui-kit 0.0.1-alpha.174 → 0.0.1-alpha.175

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.
@@ -1,3 +1,3 @@
1
1
  import { UseTreeSortableOptions, UseTreeSortableReturn } from '../types';
2
2
 
3
- export declare const useTreeSortable: ({ id, index, parentId, type, isDisabled, acceptDrop, canDropOn, onDrop, hideDefaultPreview, }: UseTreeSortableOptions) => UseTreeSortableReturn;
3
+ export declare const useTreeSortable: ({ id, index, parentId, type, isDisabled, acceptDrop, isLast, canDropOn, onDrop, hideDefaultPreview, }: UseTreeSortableOptions) => UseTreeSortableReturn;
@@ -1,5 +1,5 @@
1
1
  import { u as E } from "../useOnClickOutside-8f7d68a1.js";
2
- import { u as A, a as R } from "../useTreeSortable-70a9c8f5.js";
2
+ import { u as A, a as R } from "../useTreeSortable-694cfbbc.js";
3
3
  import { useCallback as D } from "react";
4
4
  import { i as x } from "../isEmpty-ccacb5ff.js";
5
5
  import { u as W } from "../useWindowResize-a7e1ac92.js";
@@ -1,4 +1,4 @@
1
- import { ReactNode, Ref } from 'react';
1
+ import { ReactNode, Ref, CSSProperties } from 'react';
2
2
  import { XYCoord, ConnectDragSource, ConnectDropTarget, ConnectDragPreview } from 'react-dnd';
3
3
 
4
4
  export interface SortableItemData {
@@ -101,6 +101,7 @@ export interface UseTreeSortableOptions {
101
101
  type?: string;
102
102
  isDisabled?: boolean;
103
103
  acceptDrop?: boolean;
104
+ isLast?: boolean;
104
105
  canDropOn?: (draggedItem: TreeDragItem, targetId: string | number) => boolean;
105
106
  onDrop?: TreeDropHandler;
106
107
  hideDefaultPreview?: boolean;
@@ -126,8 +127,8 @@ export interface TreeSortableItemProps {
126
127
  acceptDrop?: boolean;
127
128
  isLast?: boolean;
128
129
  canDropOn?: (draggedItem: TreeDragItem, targetId: string | number) => boolean;
129
- depth?: number;
130
130
  className?: string;
131
+ style?: CSSProperties;
131
132
  draggingClassName?: string;
132
133
  dropBeforeClassName?: string;
133
134
  dropInsideClassName?: string;
@@ -1,3 +1,3 @@
1
1
  import { TreeSortableItemProps } from '../../../common/types';
2
2
 
3
- export declare const TreeSortableItem: ({ id, index, parentId, type, isDisabled, acceptDrop, isLast, canDropOn, className, draggingClassName, dropBeforeClassName, dropInsideClassName, dropAfterClassName, onDrop, hideDefaultPreview, children, }: TreeSortableItemProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const TreeSortableItem: ({ id, index, parentId, type, isDisabled, acceptDrop, isLast, canDropOn, className, style, draggingClassName, dropBeforeClassName, dropInsideClassName, dropAfterClassName, onDrop, hideDefaultPreview, children, }: TreeSortableItemProps) => import("react/jsx-runtime").JSX.Element;
package/dist/index.js CHANGED
@@ -75,7 +75,7 @@ import "./useWindowResize-a7e1ac92.js";
75
75
  import "@floating-ui/react";
76
76
  import "./floatingUi-41f8c7b5.js";
77
77
  import "es-toolkit";
78
- import "./useTreeSortable-70a9c8f5.js";
78
+ import "./useTreeSortable-694cfbbc.js";
79
79
  import "./common.js";
80
80
  import "react-resizable";
81
81
  export {
@@ -1,42 +1,42 @@
1
- import { jsx as u, jsxs as m } from "react/jsx-runtime";
2
- import { useState as o, useEffect as f } from "react";
3
- import { c as v } from "./bind-06a7ff84.js";
4
- const N = "_button_188ud_28", w = "_disabled_188ud_53", x = "_active_188ud_53", h = "_icon_188ud_77", j = {
5
- "segmented-control": "_segmented-control_188ud_16",
6
- "full-width": "_full-width_188ud_23",
7
- button: N,
8
- disabled: w,
9
- active: x,
10
- icon: h
11
- }, c = v.bind(j), g = ({
1
+ import { jsx as r, jsxs as u } from "react/jsx-runtime";
2
+ import { useState as o, useEffect as v } from "react";
3
+ import { c as z } from "./bind-06a7ff84.js";
4
+ const f = "_button_8evzz_29", N = "_disabled_8evzz_50", w = "_active_8evzz_50", x = "_icon_8evzz_74", h = {
5
+ "segmented-control": "_segmented-control_8evzz_16",
6
+ "full-width": "_full-width_8evzz_24",
7
+ button: f,
8
+ disabled: N,
9
+ active: w,
10
+ icon: x
11
+ }, c = z.bind(h), S = ({
12
12
  options: s,
13
13
  onChange: l,
14
- className: r,
15
- fullWidth: n = !1,
16
- ariaLabel: i
14
+ className: n,
15
+ fullWidth: i = !1,
16
+ ariaLabel: _
17
17
  }) => {
18
- const [d, t] = o(s);
19
- f(() => {
20
- t(s);
18
+ const [t, d] = o(s);
19
+ v(() => {
20
+ d(s);
21
21
  }, [s]);
22
- const _ = (e) => {
22
+ const b = (e) => {
23
23
  if (!e.disabled && !e.selected) {
24
- const b = d.map((a) => ({
24
+ const m = t.map((a) => ({
25
25
  ...a,
26
26
  selected: a.value === e.value
27
27
  }));
28
- t(b), l == null || l(e.value);
28
+ d(m), l == null || l(e.value);
29
29
  }
30
30
  };
31
- return /* @__PURE__ */ u(
31
+ return /* @__PURE__ */ r(
32
32
  "div",
33
33
  {
34
- className: c("segmented-control", r, {
35
- "full-width": n
34
+ className: c("segmented-control", n, {
35
+ "full-width": i
36
36
  }),
37
37
  role: "group",
38
- "aria-label": i,
39
- children: d.map((e) => /* @__PURE__ */ m(
38
+ "aria-label": _,
39
+ children: t.map((e) => /* @__PURE__ */ u(
40
40
  "button",
41
41
  {
42
42
  type: "button",
@@ -44,11 +44,11 @@ const N = "_button_188ud_28", w = "_disabled_188ud_53", x = "_active_188ud_53",
44
44
  active: e.selected,
45
45
  disabled: e.disabled
46
46
  }),
47
- onClick: () => _(e),
47
+ onClick: () => b(e),
48
48
  disabled: e.disabled,
49
49
  "aria-pressed": e.selected,
50
50
  children: [
51
- e.icon && /* @__PURE__ */ u("span", { className: c("icon"), children: e.icon }),
51
+ e.icon && /* @__PURE__ */ r("span", { className: c("icon"), children: e.icon }),
52
52
  e.label
53
53
  ]
54
54
  },
@@ -58,5 +58,5 @@ const N = "_button_188ud_28", w = "_disabled_188ud_53", x = "_active_188ud_53",
58
58
  );
59
59
  };
60
60
  export {
61
- g as SegmentedControl
61
+ S as SegmentedControl
62
62
  };
package/dist/sortable.js CHANGED
@@ -1,184 +1,184 @@
1
- import { jsx as u, jsxs as q } from "react/jsx-runtime";
2
- import { c as N } from "./bind-06a7ff84.js";
1
+ import { jsx as v, jsxs as q } from "react/jsx-runtime";
2
+ import { c as z } from "./bind-06a7ff84.js";
3
3
  import { isFunction as j } from "es-toolkit";
4
- import { useCallback as A, createContext as M, useContext as ee, useState as H, useRef as J } from "react";
5
- import { u as te, D as F, g as re, a as oe } from "./useTreeSortable-70a9c8f5.js";
6
- import { useDragLayer as se } from "react-dnd";
4
+ import { useCallback as A, createContext as ee, useContext as te, useState as H, useRef as J } from "react";
5
+ import { u as re, D as F, g as oe, a as se } from "./useTreeSortable-694cfbbc.js";
6
+ import { useDragLayer as ie } from "react-dnd";
7
7
  import "react-dnd-html5-backend";
8
- import { DROP_DETECTION_MODE as X, DROP_POSITIONS as Y, DROP_ACTIONS as _, TREE_DROP_POSITIONS as S } from "./common.js";
8
+ import { DROP_DETECTION_MODE as X, DROP_POSITIONS as Y, DROP_ACTIONS as m, TREE_DROP_POSITIONS as h } from "./common.js";
9
9
  import { createPortal as K } from "react-dom";
10
- import { u as ie } from "./useOnClickOutside-8f7d68a1.js";
11
- const ne = {
10
+ import { u as ne } from "./useOnClickOutside-8f7d68a1.js";
11
+ const ae = {
12
12
  "sortable-item": "_sortable-item_b58jz_16",
13
13
  "sortable-item--drop-target-top": "_sortable-item--drop-target-top_b58jz_22",
14
14
  "sortable-item--drop-target-bottom": "_sortable-item--drop-target-bottom_b58jz_35",
15
15
  "sortable-item--hover-mode": "_sortable-item--hover-mode_b58jz_48",
16
16
  "drag-handle": "_drag-handle_b58jz_65",
17
17
  "drag-handle--disabled": "_drag-handle--disabled_b58jz_72"
18
- }, ae = N.bind(ne), le = ({
18
+ }, le = z.bind(ae), pe = ({
19
19
  id: n,
20
- index: f,
21
- type: v = F,
22
- isDisabled: E = !1,
20
+ index: b,
21
+ type: E = F,
22
+ isDisabled: O = !1,
23
23
  className: o,
24
24
  draggingClassName: a,
25
- dropTargetClassName: p,
25
+ dropTargetClassName: l,
26
26
  onDrop: e,
27
- hideDefaultPreview: c = !1,
27
+ hideDefaultPreview: d = !1,
28
28
  dropDetectionMode: s = X.INDEX_BASED,
29
- isLast: t = !1,
29
+ isLast: r = !1,
30
30
  children: i
31
31
  }) => {
32
- const { isDragging: l, dropPosition: d, dragRef: R, dropRef: g, previewRef: r } = te({
32
+ const { isDragging: p, dropPosition: _, dragRef: T, dropRef: y, previewRef: P } = re({
33
33
  id: n,
34
- index: f,
35
- type: v,
36
- isDisabled: E,
34
+ index: b,
35
+ type: E,
36
+ isDisabled: O,
37
37
  onDrop: e,
38
- hideDefaultPreview: c,
38
+ hideDefaultPreview: d,
39
39
  dropDetectionMode: s,
40
- isLast: t
41
- }), O = j(i), P = s === X.HOVER, T = ae("sortable-item", o, {
42
- "sortable-item--dragging": l,
43
- "sortable-item--hover-mode": P,
44
- "sortable-item--drop-target-top": d === Y.TOP,
45
- "sortable-item--drop-target-bottom": d === Y.BOTTOM,
46
- [a || ""]: l && a,
47
- [p || ""]: d && p
40
+ isLast: r
41
+ }), t = j(i), g = s === X.HOVER, I = le("sortable-item", o, {
42
+ "sortable-item--dragging": p,
43
+ "sortable-item--hover-mode": g,
44
+ "sortable-item--drop-target-top": _ === Y.TOP,
45
+ "sortable-item--drop-target-bottom": _ === Y.BOTTOM,
46
+ [a || ""]: p && a,
47
+ [l || ""]: _ && l
48
48
  });
49
- return /* @__PURE__ */ u("div", { ref: (b) => {
50
- g(b), c || r(b), O || R(b);
51
- }, className: T, children: O ? i({
52
- isDragging: l,
53
- isOver: d !== null,
54
- dragRef: R
49
+ return /* @__PURE__ */ v("div", { ref: (c) => {
50
+ y(c), d || P(c), t || T(c);
51
+ }, className: I, children: t ? i({
52
+ isDragging: p,
53
+ isOver: _ !== null,
54
+ dragRef: T
55
55
  }) : i });
56
56
  }, Re = ({
57
57
  items: n,
58
- type: f = F,
59
- isDisabled: v = !1,
60
- className: E,
58
+ type: b = F,
59
+ isDisabled: E = !1,
60
+ className: O,
61
61
  itemClassName: o,
62
62
  onReorder: a,
63
- renderItem: p,
64
- keyExtractor: e = (c) => c.id
63
+ renderItem: l,
64
+ keyExtractor: e = (d) => d.id
65
65
  }) => {
66
- const c = A(
67
- (s, t) => {
68
- const i = [...n], [l] = i.splice(s, 1);
69
- i.splice(t, 0, l), a(i);
66
+ const d = A(
67
+ (s, r) => {
68
+ const i = [...n], [p] = i.splice(s, 1);
69
+ i.splice(r, 0, p), a(i);
70
70
  },
71
71
  [n, a]
72
72
  );
73
- return /* @__PURE__ */ u("div", { className: E, children: n.map((s, t) => /* @__PURE__ */ u(
74
- le,
73
+ return /* @__PURE__ */ v("div", { className: O, children: n.map((s, r) => /* @__PURE__ */ v(
74
+ pe,
75
75
  {
76
76
  id: e(s),
77
- index: t,
78
- type: f,
79
- isDisabled: v,
77
+ index: r,
78
+ type: b,
79
+ isDisabled: E,
80
80
  className: o,
81
- onDrop: c,
82
- isLast: t === n.length - 1,
83
- children: ({ dragRef: i, isDragging: l }) => p(s, t, i, l)
81
+ onDrop: d,
82
+ isLast: r === n.length - 1,
83
+ children: ({ dragRef: i, isDragging: p }) => l(s, r, i, p)
84
84
  },
85
85
  e(s)
86
86
  )) });
87
- }, pe = {
87
+ }, de = {
88
88
  "drag-layer": "_drag-layer_1izcx_1",
89
89
  "drag-preview": "_drag-preview_1izcx_11"
90
- }, G = N.bind(pe), he = ({
90
+ }, G = z.bind(de), he = ({
91
91
  type: n,
92
- renderPreview: f,
93
- className: v,
94
- previewClassName: E,
92
+ renderPreview: b,
93
+ className: E,
94
+ previewClassName: O,
95
95
  portalTarget: o = document.body
96
96
  }) => {
97
- const { itemType: a, isDragging: p, item: e, clientOffset: c } = se(
98
- (t) => ({
99
- item: t.getItem(),
100
- itemType: t.getItemType(),
101
- clientOffset: t.getClientOffset(),
102
- isDragging: t.isDragging()
97
+ const { itemType: a, isDragging: l, item: e, clientOffset: d } = ie(
98
+ (r) => ({
99
+ item: r.getItem(),
100
+ itemType: r.getItemType(),
101
+ clientOffset: r.getClientOffset(),
102
+ isDragging: r.isDragging()
103
103
  })
104
104
  );
105
- if (!p || a !== n || !e || !o)
105
+ if (!l || a !== n || !e || !o)
106
106
  return null;
107
- const s = /* @__PURE__ */ u("div", { className: G("drag-layer", v), children: /* @__PURE__ */ u("div", { className: G("drag-preview", E), style: re(c), children: f(e) }) });
107
+ const s = /* @__PURE__ */ v("div", { className: G("drag-layer", E), children: /* @__PURE__ */ v("div", { className: G("drag-preview", O), style: oe(d), children: b(e) }) });
108
108
  return K(s, o);
109
- }, Q = M(null), ce = () => ee(Q), de = {
109
+ }, Q = ee(null), ce = () => te(Q), me = {
110
110
  "drop-confirmation-popover": "_drop-confirmation-popover_obz3t_16",
111
111
  "drop-confirmation-popover--before": "_drop-confirmation-popover--before_obz3t_31",
112
112
  "drop-confirmation-popover--after": "_drop-confirmation-popover--after_obz3t_35",
113
113
  "drop-confirmation-popover__button": "_drop-confirmation-popover__button_obz3t_59",
114
114
  "drop-confirmation-popover__divider": "_drop-confirmation-popover__divider_obz3t_75"
115
- }, C = N.bind(de), me = {
116
- [_.MOVE]: "Move",
117
- [_.DUPLICATE]: "Duplicate",
118
- [_.CANCEL]: "Cancel"
115
+ }, C = z.bind(me), be = {
116
+ [m.MOVE]: "Move",
117
+ [m.DUPLICATE]: "Duplicate",
118
+ [m.CANCEL]: "Cancel"
119
119
  }, Se = ({
120
120
  children: n,
121
- showDropConfirmation: f = !1,
122
- confirmationLabels: v,
123
- portalTarget: E,
121
+ showDropConfirmation: b = !1,
122
+ confirmationLabels: E,
123
+ portalTarget: O,
124
124
  onMove: o,
125
125
  onDuplicate: a,
126
- onCancel: p
126
+ onCancel: l
127
127
  }) => {
128
- const [e, c] = H(null), [s, t] = H(
128
+ const [e, d] = H(null), [s, r] = H(
129
129
  null
130
- ), i = J(null), l = { ...me, ...v }, d = A(() => {
131
- c(null), t(null);
132
- }, []), R = A(
133
- (P, T, m, b) => {
134
- if (!f) {
135
- o == null || o(P, T, m);
130
+ ), i = J(null), p = { ...be, ...E }, _ = A(() => {
131
+ d(null), r(null);
132
+ }, []), T = A(
133
+ (g, I, u, c) => {
134
+ if (!b) {
135
+ o == null || o(g, I, u);
136
136
  return;
137
137
  }
138
- const I = b.getBoundingClientRect(), z = I.left + I.width / 2;
139
- let h;
140
- m === "before" ? h = I.top : m === "after" ? h = I.top + I.height : h = I.top, t({
141
- top: h,
142
- left: z
143
- }), c({ draggedItem: P, targetId: T, position: m });
138
+ const f = c.getBoundingClientRect(), N = f.left + f.width / 2;
139
+ let R;
140
+ u === "before" ? R = f.top : u === "after" ? R = f.top + f.height : R = f.top, r({
141
+ top: R,
142
+ left: N
143
+ }), d({ draggedItem: g, targetId: I, position: u });
144
144
  },
145
- [f, o]
146
- ), g = A(
147
- (P) => {
145
+ [b, o]
146
+ ), y = A(
147
+ (g) => {
148
148
  if (!e) {
149
- d();
149
+ _();
150
150
  return;
151
151
  }
152
- const { draggedItem: T, targetId: m, position: b } = e;
153
- switch (P) {
154
- case _.MOVE:
155
- o == null || o(T, m, b);
152
+ const { draggedItem: I, targetId: u, position: c } = e;
153
+ switch (g) {
154
+ case m.MOVE:
155
+ o == null || o(I, u, c);
156
156
  break;
157
- case _.DUPLICATE:
158
- a == null || a(T, m, b);
157
+ case m.DUPLICATE:
158
+ a == null || a(I, u, c);
159
159
  break;
160
- case _.CANCEL:
161
- p == null || p();
160
+ case m.CANCEL:
161
+ l == null || l();
162
162
  break;
163
163
  }
164
- d();
164
+ _();
165
165
  },
166
- [e, o, a, p, d]
166
+ [e, o, a, l, _]
167
167
  );
168
- ie(
168
+ ne(
169
169
  i,
170
- e && f ? () => g(_.CANCEL) : void 0
170
+ e && b ? () => y(m.CANCEL) : void 0
171
171
  );
172
- const r = {
173
- showDropConfirmation: f,
172
+ const P = {
173
+ showDropConfirmation: b,
174
174
  pendingDraggedItemId: (e == null ? void 0 : e.draggedItem.id) ?? null,
175
175
  pendingTargetId: (e == null ? void 0 : e.targetId) ?? null,
176
176
  pendingDropPosition: (e == null ? void 0 : e.position) ?? null,
177
- requestDrop: R
178
- }, O = E ?? (typeof document < "u" ? document.body : null);
179
- return /* @__PURE__ */ q(Q.Provider, { value: r, children: [
177
+ requestDrop: T
178
+ }, t = O ?? (typeof document < "u" ? document.body : null);
179
+ return /* @__PURE__ */ q(Q.Provider, { value: P, children: [
180
180
  n,
181
- e && s && O && K(
181
+ e && s && t && K(
182
182
  /* @__PURE__ */ q(
183
183
  "div",
184
184
  {
@@ -192,111 +192,114 @@ const ne = {
192
192
  left: s.left
193
193
  },
194
194
  children: [
195
- /* @__PURE__ */ u(
195
+ /* @__PURE__ */ v(
196
196
  "button",
197
197
  {
198
198
  type: "button",
199
199
  className: C("drop-confirmation-popover__button"),
200
- onClick: () => g(_.MOVE),
201
- children: l[_.MOVE]
200
+ onClick: () => y(m.MOVE),
201
+ children: p[m.MOVE]
202
202
  }
203
203
  ),
204
- /* @__PURE__ */ u(
204
+ /* @__PURE__ */ v(
205
205
  "button",
206
206
  {
207
207
  type: "button",
208
208
  className: C("drop-confirmation-popover__button"),
209
- onClick: () => g(_.DUPLICATE),
210
- children: l[_.DUPLICATE]
209
+ onClick: () => y(m.DUPLICATE),
210
+ children: p[m.DUPLICATE]
211
211
  }
212
212
  ),
213
- /* @__PURE__ */ u("div", { className: C("drop-confirmation-popover__divider") }),
214
- /* @__PURE__ */ u(
213
+ /* @__PURE__ */ v("div", { className: C("drop-confirmation-popover__divider") }),
214
+ /* @__PURE__ */ v(
215
215
  "button",
216
216
  {
217
217
  type: "button",
218
218
  className: C("drop-confirmation-popover__button"),
219
- onClick: () => g(_.CANCEL),
220
- children: l[_.CANCEL]
219
+ onClick: () => y(m.CANCEL),
220
+ children: p[m.CANCEL]
221
221
  }
222
222
  )
223
223
  ]
224
224
  }
225
225
  ),
226
- O
226
+ t
227
227
  )
228
228
  ] });
229
- }, be = {
230
- "tree-sortable-item": "_tree-sortable-item_c3l7m_16",
231
- "tree-sortable-item--dragging": "_tree-sortable-item--dragging_c3l7m_20",
232
- "tree-sortable-item--pending": "_tree-sortable-item--pending_c3l7m_23",
233
- "tree-sortable-item--drop-before": "_tree-sortable-item--drop-before_c3l7m_29",
234
- "tree-sortable-item--drop-after": "_tree-sortable-item--drop-after_c3l7m_39",
235
- "tree-sortable-item--drop-inside": "_tree-sortable-item--drop-inside_c3l7m_49"
236
- }, _e = N.bind(be), ye = ({
229
+ }, _e = {
230
+ "tree-sortable-item": "_tree-sortable-item_13y35_16",
231
+ "tree-sortable-item--dragging": "_tree-sortable-item--dragging_13y35_20",
232
+ "tree-sortable-item--pending": "_tree-sortable-item--pending_13y35_23",
233
+ "tree-sortable-item--drop-before": "_tree-sortable-item--drop-before_13y35_29",
234
+ "tree-sortable-item--drop-after": "_tree-sortable-item--drop-after_13y35_40",
235
+ "tree-sortable-item--drop-inside": "_tree-sortable-item--drop-inside_13y35_51"
236
+ }, fe = z.bind(_e), Ce = ({
237
237
  id: n,
238
- index: f,
239
- parentId: v,
240
- type: E = F,
238
+ index: b,
239
+ parentId: E,
240
+ type: O = F,
241
241
  isDisabled: o = !1,
242
242
  acceptDrop: a = !0,
243
- isLast: p = !1,
243
+ isLast: l = !1,
244
244
  canDropOn: e,
245
- className: c,
246
- draggingClassName: s,
247
- dropBeforeClassName: t,
248
- dropInsideClassName: i,
249
- dropAfterClassName: l,
250
- onDrop: d,
251
- hideDefaultPreview: R = !1,
252
- children: g
245
+ className: d,
246
+ style: s,
247
+ draggingClassName: r,
248
+ dropBeforeClassName: i,
249
+ dropInsideClassName: p,
250
+ dropAfterClassName: _,
251
+ onDrop: T,
252
+ hideDefaultPreview: y = !1,
253
+ children: P
253
254
  }) => {
254
- const r = ce(), O = J(null), P = A(
255
+ const t = ce(), g = J(null), I = A(
255
256
  (D, $, x) => {
256
- r != null && r.showDropConfirmation && O.current ? r.requestDrop(D, $, x, O.current) : d == null || d(D, $, x);
257
+ t != null && t.showDropConfirmation && g.current ? t.requestDrop(D, $, x, g.current) : T == null || T(D, $, x);
257
258
  },
258
- [r, d]
259
- ), { isDragging: T, isOver: m, dropPosition: b, dragRef: I, dropRef: z, previewRef: h } = oe({
259
+ [t, T]
260
+ ), { isDragging: u, isOver: c, dropPosition: f, dragRef: N, dropRef: R, previewRef: W } = se({
260
261
  id: n,
261
- index: f,
262
- parentId: v,
263
- type: E,
262
+ index: b,
263
+ parentId: E,
264
+ type: O,
264
265
  isDisabled: o,
265
266
  acceptDrop: a,
267
+ isLast: l,
266
268
  canDropOn: e,
267
- onDrop: P,
268
- hideDefaultPreview: R
269
- }), k = (r == null ? void 0 : r.pendingDraggedItemId) === n, w = T || k, y = (r == null ? void 0 : r.pendingTargetId) === n, L = r == null ? void 0 : r.pendingDropPosition, B = m && b === S.BEFORE || y && L === S.BEFORE, U = m && b === S.INSIDE || y && L === S.INSIDE, V = p && (m && b === S.AFTER || y && L === S.AFTER), W = j(g) ? g({
269
+ onDrop: I,
270
+ hideDefaultPreview: y
271
+ }), k = (t == null ? void 0 : t.pendingDraggedItemId) === n, w = u || k, S = (t == null ? void 0 : t.pendingTargetId) === n, L = t == null ? void 0 : t.pendingDropPosition, B = c && f === h.BEFORE || S && L === h.BEFORE, U = c && f === h.INSIDE || S && L === h.INSIDE, V = l && (c && f === h.AFTER || S && L === h.AFTER), Z = j(P) ? P({
270
272
  isDragging: w,
271
- isOver: m || y,
272
- dropPosition: y ? L ?? null : b,
273
- dragRef: I
274
- }) : g, Z = _e("tree-sortable-item", c, {
273
+ isOver: c || S,
274
+ dropPosition: S ? L ?? null : f,
275
+ dragRef: N
276
+ }) : P, M = fe("tree-sortable-item", d, {
275
277
  "tree-sortable-item--dragging": w,
276
278
  "tree-sortable-item--pending": k,
277
279
  "tree-sortable-item--drop-before": B,
278
280
  "tree-sortable-item--drop-inside": U,
279
281
  "tree-sortable-item--drop-after": V,
280
- [s || ""]: w && s,
281
- [t || ""]: B && t,
282
- [i || ""]: U && i,
283
- [l || ""]: V && l
282
+ [r || ""]: w && r,
283
+ [i || ""]: B && i,
284
+ [p || ""]: U && p,
285
+ [_ || ""]: V && _
284
286
  });
285
- return /* @__PURE__ */ u(
287
+ return /* @__PURE__ */ v(
286
288
  "div",
287
289
  {
288
290
  ref: (D) => {
289
- O.current = D, z(D), j(g) || (I(D), h(D));
291
+ g.current = D, R(D), j(P) || (N(D), W(D));
290
292
  },
291
- className: Z,
292
- children: W
293
+ className: M,
294
+ style: s,
295
+ children: Z
293
296
  }
294
297
  );
295
298
  };
296
299
  export {
297
300
  he as DragLayer,
298
- le as SortableItem,
301
+ pe as SortableItem,
299
302
  Re as SortableList,
300
303
  Se as TreeSortableContainer,
301
- ye as TreeSortableItem
304
+ Ce as TreeSortableItem
302
305
  };