@elliemae/ds-drag-and-drop 2.1.0 → 2.2.0-alpha.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.
- package/cjs/hierarchy/customCollisionDetection.js +44 -50
- package/cjs/hierarchy/customCollisionDetection.js.map +7 -0
- package/cjs/hierarchy/getHierarchyKeyboardCoordinates.js +78 -91
- package/cjs/hierarchy/getHierarchyKeyboardCoordinates.js.map +7 -0
- package/cjs/hierarchy/index.js +28 -9
- package/cjs/hierarchy/index.js.map +7 -0
- package/cjs/hierarchy/types.js +27 -2
- package/cjs/hierarchy/types.js.map +7 -0
- package/cjs/hierarchy/useHierarchyActionHandlers.js +53 -35
- package/cjs/hierarchy/useHierarchyActionHandlers.js.map +7 -0
- package/cjs/hierarchy/useHierarchyAnnouncements.js +45 -26
- package/cjs/hierarchy/useHierarchyAnnouncements.js.map +7 -0
- package/cjs/hierarchy/useHierarchyDndkitConfig.js +77 -83
- package/cjs/hierarchy/useHierarchyDndkitConfig.js.map +7 -0
- package/cjs/hierarchy/useHierarchyPreviewHandlers.js +48 -27
- package/cjs/hierarchy/useHierarchyPreviewHandlers.js.map +7 -0
- package/cjs/index.js +29 -11
- package/cjs/index.js.map +7 -0
- package/cjs/tree/constants.js +41 -12
- package/cjs/tree/constants.js.map +7 -0
- package/cjs/tree/customCollisionDetection.js +64 -95
- package/cjs/tree/customCollisionDetection.js.map +7 -0
- package/cjs/tree/getTreeKeyboardCoordinates.js +87 -101
- package/cjs/tree/getTreeKeyboardCoordinates.js.map +7 -0
- package/cjs/tree/index.js +28 -9
- package/cjs/tree/index.js.map +7 -0
- package/cjs/tree/types.js +27 -2
- package/cjs/tree/types.js.map +7 -0
- package/cjs/tree/useTreeActionHandlers.js +66 -56
- package/cjs/tree/useTreeActionHandlers.js.map +7 -0
- package/cjs/tree/useTreeAnnouncements.js +53 -40
- package/cjs/tree/useTreeAnnouncements.js.map +7 -0
- package/cjs/tree/useTreeDndkitConfig.js +95 -91
- package/cjs/tree/useTreeDndkitConfig.js.map +7 -0
- package/cjs/tree/useTreePreviewHandlers.js +53 -37
- package/cjs/tree/useTreePreviewHandlers.js.map +7 -0
- package/cjs/tree/utilities.js +44 -30
- package/cjs/tree/utilities.js.map +7 -0
- package/esm/hierarchy/customCollisionDetection.js +15 -46
- package/esm/hierarchy/customCollisionDetection.js.map +7 -0
- package/esm/hierarchy/getHierarchyKeyboardCoordinates.js +42 -76
- package/esm/hierarchy/getHierarchyKeyboardCoordinates.js.map +7 -0
- package/esm/hierarchy/index.js +3 -1
- package/esm/hierarchy/index.js.map +7 -0
- package/esm/hierarchy/types.js +2 -1
- package/esm/hierarchy/types.js.map +7 -0
- package/esm/hierarchy/useHierarchyActionHandlers.js +24 -31
- package/esm/hierarchy/useHierarchyActionHandlers.js.map +7 -0
- package/esm/hierarchy/useHierarchyAnnouncements.js +14 -20
- package/esm/hierarchy/useHierarchyAnnouncements.js.map +7 -0
- package/esm/hierarchy/useHierarchyDndkitConfig.js +45 -66
- package/esm/hierarchy/useHierarchyDndkitConfig.js.map +7 -0
- package/esm/hierarchy/useHierarchyPreviewHandlers.js +15 -19
- package/esm/hierarchy/useHierarchyPreviewHandlers.js.map +7 -0
- package/esm/index.js +4 -2
- package/esm/index.js.map +7 -0
- package/esm/tree/constants.js +12 -10
- package/esm/tree/constants.js.map +7 -0
- package/esm/tree/customCollisionDetection.js +33 -89
- package/esm/tree/customCollisionDetection.js.map +7 -0
- package/esm/tree/getTreeKeyboardCoordinates.js +49 -84
- package/esm/tree/getTreeKeyboardCoordinates.js.map +7 -0
- package/esm/tree/index.js +3 -1
- package/esm/tree/index.js.map +7 -0
- package/esm/tree/types.js +2 -1
- package/esm/tree/types.js.map +7 -0
- package/esm/tree/useTreeActionHandlers.js +35 -50
- package/esm/tree/useTreeActionHandlers.js.map +7 -0
- package/esm/tree/useTreeAnnouncements.js +18 -30
- package/esm/tree/useTreeAnnouncements.js.map +7 -0
- package/esm/tree/useTreeDndkitConfig.js +59 -70
- package/esm/tree/useTreeDndkitConfig.js.map +7 -0
- package/esm/tree/useTreePreviewHandlers.js +19 -28
- package/esm/tree/useTreePreviewHandlers.js.map +7 -0
- package/esm/tree/utilities.js +13 -23
- package/esm/tree/utilities.js.map +7 -0
- package/package.json +1 -1
|
@@ -1,32 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const useHierarchyAnnouncements = visibleItemsDictionary => {
|
|
4
|
-
const onDragStart = useCallback(id =>
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
const useHierarchyAnnouncements = (visibleItemsDictionary) => {
|
|
4
|
+
const onDragStart = useCallback((id) => `Picked up draggable item from position ${visibleItemsDictionary[id].index + 1}.`, [visibleItemsDictionary]);
|
|
5
5
|
const onDragMove = useCallback((id, overId) => {
|
|
6
6
|
if (overId) {
|
|
7
7
|
const overIndex = visibleItemsDictionary[overId].index + 1;
|
|
8
|
-
return
|
|
8
|
+
return `Draggable item was moved to position ${overIndex}.`;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
return "Draggable item is no longer over a droppable area.";
|
|
10
|
+
return `Draggable item is no longer over a droppable area.`;
|
|
12
11
|
}, [visibleItemsDictionary]);
|
|
13
12
|
const onDragOver = onDragMove;
|
|
14
13
|
const onDragEnd = useCallback((id, overId) => {
|
|
15
14
|
if (overId) {
|
|
16
15
|
const overIndex = visibleItemsDictionary[overId].index + 1;
|
|
17
|
-
return
|
|
16
|
+
return `Draggable item was dropped over position ${overIndex}.`;
|
|
18
17
|
}
|
|
19
|
-
|
|
20
|
-
return "Draggable item was dropped at it's original position.";
|
|
18
|
+
return `Draggable item was dropped at it's original position.`;
|
|
21
19
|
}, [visibleItemsDictionary]);
|
|
22
|
-
const onDragCancel = useCallback(id =>
|
|
23
|
-
return {
|
|
24
|
-
onDragStart,
|
|
25
|
-
onDragOver,
|
|
26
|
-
onDragMove,
|
|
27
|
-
onDragEnd,
|
|
28
|
-
onDragCancel
|
|
29
|
-
};
|
|
20
|
+
const onDragCancel = useCallback((id) => `Dragging was cancelled. Draggable item from position ${visibleItemsDictionary[id].index + 1} was dropped at it's initial position.`, [visibleItemsDictionary]);
|
|
21
|
+
return { onDragStart, onDragOver, onDragMove, onDragEnd, onDragCancel };
|
|
30
22
|
};
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
export {
|
|
24
|
+
useHierarchyAnnouncements
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=useHierarchyAnnouncements.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hierarchy/useHierarchyAnnouncements.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Announcements } from '@dnd-kit/core';\nimport { useCallback } from 'react';\nimport { Item } from './types';\n\nexport const useHierarchyAnnouncements = (visibleItemsDictionary: Record<string, Item>): Announcements => {\n const onDragStart = useCallback(\n (id: string) => `Picked up draggable item from position ${visibleItemsDictionary[id].index + 1}.`,\n [visibleItemsDictionary],\n );\n\n const onDragMove = useCallback(\n (id: string, overId: string) => {\n if (overId) {\n const overIndex = visibleItemsDictionary[overId].index + 1;\n return `Draggable item was moved to position ${overIndex}.`;\n }\n\n return `Draggable item is no longer over a droppable area.`;\n },\n [visibleItemsDictionary],\n );\n\n const onDragOver = onDragMove;\n\n const onDragEnd = useCallback(\n (id: string, overId: string) => {\n if (overId) {\n const overIndex = visibleItemsDictionary[overId].index + 1;\n return `Draggable item was dropped over position ${overIndex}.`;\n }\n\n return `Draggable item was dropped at it's original position.`;\n },\n [visibleItemsDictionary],\n );\n\n const onDragCancel = useCallback(\n (id: string) =>\n `Dragging was cancelled. Draggable item from position ${\n visibleItemsDictionary[id].index + 1\n } was dropped at it's initial position.`,\n [visibleItemsDictionary],\n );\n\n return { onDragStart, onDragOver, onDragMove, onDragEnd, onDragCancel };\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACCA;AAGO,MAAM,4BAA4B,CAAC,2BAAgE;AACxG,QAAM,cAAc,YAClB,CAAC,OAAe,0CAA0C,uBAAuB,IAAI,QAAQ,MAC7F,CAAC;AAGH,QAAM,aAAa,YACjB,CAAC,IAAY,WAAmB;AAC9B,QAAI,QAAQ;AACV,YAAM,YAAY,uBAAuB,QAAQ,QAAQ;AACzD,aAAO,wCAAwC;AAAA;AAGjD,WAAO;AAAA,KAET,CAAC;AAGH,QAAM,aAAa;AAEnB,QAAM,YAAY,YAChB,CAAC,IAAY,WAAmB;AAC9B,QAAI,QAAQ;AACV,YAAM,YAAY,uBAAuB,QAAQ,QAAQ;AACzD,aAAO,4CAA4C;AAAA;AAGrD,WAAO;AAAA,KAET,CAAC;AAGH,QAAM,eAAe,YACnB,CAAC,OACC,wDACE,uBAAuB,IAAI,QAAQ,2CAEvC,CAAC;AAGH,SAAO,EAAE,aAAa,YAAY,YAAY,WAAW;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,68 +1,47 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
-
// if second parameter is true, the space will be done on the horizontal axis
|
|
22
|
-
|
|
23
|
-
const adjustTranslate = isHorizontalDnD => _ref => {
|
|
24
|
-
let {
|
|
25
|
-
transform
|
|
26
|
-
} = _ref;
|
|
27
|
-
|
|
28
|
-
const newTransform = _objectSpread({}, transform);
|
|
29
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useState, useEffect, useMemo, useRef } from "react";
|
|
3
|
+
import {
|
|
4
|
+
useSensor,
|
|
5
|
+
useSensors,
|
|
6
|
+
KeyboardSensor,
|
|
7
|
+
PointerSensor,
|
|
8
|
+
MeasuringStrategy
|
|
9
|
+
} from "@dnd-kit/core";
|
|
10
|
+
import { useHierarchyActionHandlers } from "./useHierarchyActionHandlers";
|
|
11
|
+
import { useHierarchyPreviewHandlers } from "./useHierarchyPreviewHandlers";
|
|
12
|
+
import { getHierarchyKeyboardCoordinates } from "./getHierarchyKeyboardCoordinates";
|
|
13
|
+
import { customCollisionDetection } from "./customCollisionDetection";
|
|
14
|
+
import { useHierarchyAnnouncements } from "./useHierarchyAnnouncements";
|
|
15
|
+
const adjustTranslate = (isHorizontalDnD) => ({ transform }) => {
|
|
16
|
+
const newTransform = {
|
|
17
|
+
...transform
|
|
18
|
+
};
|
|
30
19
|
if (isHorizontalDnD) {
|
|
31
20
|
newTransform.y = transform.y + 15;
|
|
32
21
|
} else {
|
|
33
22
|
newTransform.y = transform.y - 35;
|
|
34
23
|
}
|
|
35
|
-
|
|
36
24
|
return newTransform;
|
|
37
25
|
};
|
|
38
|
-
|
|
39
26
|
const measuring = {
|
|
40
27
|
droppable: {
|
|
41
28
|
strategy: MeasuringStrategy.Always
|
|
42
29
|
}
|
|
43
30
|
};
|
|
44
|
-
|
|
45
31
|
const noop = () => null;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
onPreviewDragStart = noop
|
|
57
|
-
} = _ref2;
|
|
58
|
-
const [activeId, setActiveId] = useState('');
|
|
59
|
-
const dndItems = useMemo(() => flattenedItems.map(_ref3 => {
|
|
60
|
-
let [item] = _ref3;
|
|
61
|
-
return item;
|
|
62
|
-
}), [flattenedItems]);
|
|
32
|
+
const useHierarchyDndkitConfig = ({
|
|
33
|
+
flattenedItems,
|
|
34
|
+
dragOverlayDataTestid,
|
|
35
|
+
isHorizontalDnD = false,
|
|
36
|
+
onReorder,
|
|
37
|
+
onPreviewResetState = noop,
|
|
38
|
+
onPreviewDragStart = noop
|
|
39
|
+
}) => {
|
|
40
|
+
const [activeId, setActiveId] = useState("");
|
|
41
|
+
const dndItems = useMemo(() => flattenedItems.map(([item]) => item), [flattenedItems]);
|
|
63
42
|
const itemsDictionary = useMemo(() => {
|
|
64
43
|
const dictionary = {};
|
|
65
|
-
dndItems.forEach(item => {
|
|
44
|
+
dndItems.forEach((item) => {
|
|
66
45
|
dictionary[item.id] = item;
|
|
67
46
|
});
|
|
68
47
|
return dictionary;
|
|
@@ -85,27 +64,27 @@ const useHierarchyDndkitConfig = _ref2 => {
|
|
|
85
64
|
onPreviewResetState,
|
|
86
65
|
onPreviewDragStart
|
|
87
66
|
});
|
|
88
|
-
const dragActionHandlers = useHierarchyActionHandlers(
|
|
67
|
+
const dragActionHandlers = useHierarchyActionHandlers({
|
|
68
|
+
...dragPreviewHandlers,
|
|
89
69
|
dndItems,
|
|
90
70
|
onReorder
|
|
91
|
-
})
|
|
71
|
+
});
|
|
92
72
|
const announcements = useHierarchyAnnouncements(itemsDictionary);
|
|
93
|
-
const dndContextProps = useMemo(() => {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
collisionDetection: customCollisionDetection(activeId, (_itemsDictionary = itemsDictionary[activeId !== null && activeId !== void 0 ? activeId : '']) === null || _itemsDictionary === void 0 ? void 0 : _itemsDictionary.parentId, dndItems)
|
|
102
|
-
}, dragActionHandlers);
|
|
103
|
-
}, [announcements, modifiers, sensors, activeId, itemsDictionary, dndItems, dragActionHandlers]);
|
|
73
|
+
const dndContextProps = useMemo(() => ({
|
|
74
|
+
announcements,
|
|
75
|
+
modifiers,
|
|
76
|
+
sensors,
|
|
77
|
+
measuring,
|
|
78
|
+
collisionDetection: customCollisionDetection(activeId, itemsDictionary[activeId ?? ""]?.parentId, dndItems),
|
|
79
|
+
...dragActionHandlers
|
|
80
|
+
}), [announcements, modifiers, sensors, activeId, itemsDictionary, dndItems, dragActionHandlers]);
|
|
104
81
|
return {
|
|
105
82
|
dndContextProps,
|
|
106
83
|
activeId,
|
|
107
|
-
activeIndex: activeId ?
|
|
84
|
+
activeIndex: activeId ? itemsDictionary[activeId]?.index : -1
|
|
108
85
|
};
|
|
109
86
|
};
|
|
110
|
-
|
|
111
|
-
|
|
87
|
+
export {
|
|
88
|
+
useHierarchyDndkitConfig
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=useHierarchyDndkitConfig.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hierarchy/useHierarchyDndkitConfig.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { useState, useEffect, useMemo, useRef } from 'react';\nimport {\n useSensor,\n useSensors,\n KeyboardSensor,\n PointerSensor,\n MeasuringConfiguration,\n MeasuringStrategy,\n Modifier,\n} from '@dnd-kit/core';\nimport { useHierarchyActionHandlers } from './useHierarchyActionHandlers';\nimport { useHierarchyPreviewHandlers } from './useHierarchyPreviewHandlers';\nimport type { UseHierarchyDndkitConfigType, SensorContext, Item } from './types';\nimport { getHierarchyKeyboardCoordinates } from './getHierarchyKeyboardCoordinates';\nimport { customCollisionDetection } from './customCollisionDetection';\nimport { useHierarchyAnnouncements } from './useHierarchyAnnouncements';\n\n// we make space for the drop indicator\n// if second parameter is true, the space will be done on the horizontal axis\nconst adjustTranslate =\n (isHorizontalDnD: boolean): Modifier =>\n ({ transform }) => {\n const newTransform = {\n ...transform,\n };\n if (isHorizontalDnD) {\n newTransform.y = transform.y + 15;\n } else {\n newTransform.y = transform.y - 35;\n }\n return newTransform;\n };\n\nconst measuring: Partial<MeasuringConfiguration> = {\n droppable: {\n strategy: MeasuringStrategy.Always,\n },\n};\n\nconst noop = () => null;\n\nexport const useHierarchyDndkitConfig: UseHierarchyDndkitConfigType = ({\n flattenedItems,\n dragOverlayDataTestid,\n isHorizontalDnD = false,\n onReorder,\n onPreviewResetState = noop,\n onPreviewDragStart = noop,\n}) => {\n const [activeId, setActiveId] = useState('');\n\n const dndItems = useMemo(() => flattenedItems.map(([item]) => item), [flattenedItems]);\n\n const itemsDictionary = useMemo(() => {\n const dictionary: Record<string, Item> = {};\n dndItems.forEach((item) => {\n dictionary[item.id] = item;\n });\n return dictionary;\n }, [dndItems]);\n\n const modifiers: Modifier[] = useMemo(() => [adjustTranslate(isHorizontalDnD)], [isHorizontalDnD]);\n\n const sensorContext: SensorContext = useRef({\n items: dndItems,\n });\n\n useEffect(() => {\n sensorContext.current = {\n items: dndItems,\n };\n }, [dndItems]);\n\n const coordinateGetter = useMemo(\n () => getHierarchyKeyboardCoordinates(sensorContext, dragOverlayDataTestid, isHorizontalDnD),\n [isHorizontalDnD],\n );\n\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter,\n }),\n );\n\n const dragPreviewHandlers = useHierarchyPreviewHandlers({\n setActiveId,\n onPreviewResetState,\n onPreviewDragStart,\n });\n\n const dragActionHandlers = useHierarchyActionHandlers({\n ...dragPreviewHandlers,\n dndItems,\n onReorder,\n });\n\n const announcements = useHierarchyAnnouncements(itemsDictionary);\n\n const dndContextProps = useMemo(\n () => ({\n announcements,\n modifiers,\n sensors,\n measuring,\n collisionDetection: customCollisionDetection(activeId, itemsDictionary[activeId ?? '']?.parentId, dndItems),\n ...dragActionHandlers,\n }),\n [announcements, modifiers, sensors, activeId, itemsDictionary, dndItems, dragActionHandlers],\n );\n\n return {\n dndContextProps,\n activeId,\n activeIndex: activeId ? itemsDictionary[activeId]?.index : -1,\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACCA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA;AACA;AAEA;AACA;AACA;AAIA,MAAM,kBACJ,CAAC,oBACD,CAAC,EAAE,gBAAgB;AACjB,QAAM,eAAe;AAAA,OAChB;AAAA;AAEL,MAAI,iBAAiB;AACnB,iBAAa,IAAI,UAAU,IAAI;AAAA,SAC1B;AACL,iBAAa,IAAI,UAAU,IAAI;AAAA;AAEjC,SAAO;AAAA;AAGX,MAAM,YAA6C;AAAA,EACjD,WAAW;AAAA,IACT,UAAU,kBAAkB;AAAA;AAAA;AAIhC,MAAM,OAAO,MAAM;AAEZ,MAAM,2BAAyD,CAAC;AAAA,EACrE;AAAA,EACA;AAAA,EACA,kBAAkB;AAAA,EAClB;AAAA,EACA,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,MACjB;AACJ,QAAM,CAAC,UAAU,eAAe,SAAS;AAEzC,QAAM,WAAW,QAAQ,MAAM,eAAe,IAAI,CAAC,CAAC,UAAU,OAAO,CAAC;AAEtE,QAAM,kBAAkB,QAAQ,MAAM;AACpC,UAAM,aAAmC;AACzC,aAAS,QAAQ,CAAC,SAAS;AACzB,iBAAW,KAAK,MAAM;AAAA;AAExB,WAAO;AAAA,KACN,CAAC;AAEJ,QAAM,YAAwB,QAAQ,MAAM,CAAC,gBAAgB,mBAAmB,CAAC;AAEjF,QAAM,gBAA+B,OAAO;AAAA,IAC1C,OAAO;AAAA;AAGT,YAAU,MAAM;AACd,kBAAc,UAAU;AAAA,MACtB,OAAO;AAAA;AAAA,KAER,CAAC;AAEJ,QAAM,mBAAmB,QACvB,MAAM,gCAAgC,eAAe,uBAAuB,kBAC5E,CAAC;AAGH,QAAM,UAAU,WACd,UAAU,gBACV,UAAU,gBAAgB;AAAA,IACxB;AAAA;AAIJ,QAAM,sBAAsB,4BAA4B;AAAA,IACtD;AAAA,IACA;AAAA,IACA;AAAA;AAGF,QAAM,qBAAqB,2BAA2B;AAAA,OACjD;AAAA,IACH;AAAA,IACA;AAAA;AAGF,QAAM,gBAAgB,0BAA0B;AAEhD,QAAM,kBAAkB,QACtB,MAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,oBAAoB,yBAAyB,UAAU,gBAAgB,YAAY,KAAK,UAAU;AAAA,OAC/F;AAAA,MAEL,CAAC,eAAe,WAAW,SAAS,UAAU,iBAAiB,UAAU;AAG3E,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,aAAa,WAAW,gBAAgB,WAAW,QAAQ;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const useHierarchyPreviewHandlers =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} = _ref;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
const useHierarchyPreviewHandlers = ({
|
|
4
|
+
setActiveId,
|
|
5
|
+
onPreviewResetState,
|
|
6
|
+
onPreviewDragStart
|
|
7
|
+
}) => {
|
|
9
8
|
const resetState = useCallback(() => {
|
|
10
|
-
setActiveId(
|
|
9
|
+
setActiveId("");
|
|
11
10
|
onPreviewResetState();
|
|
12
|
-
document.body.style.setProperty(
|
|
11
|
+
document.body.style.setProperty("cursor", "");
|
|
13
12
|
}, [setActiveId, onPreviewResetState]);
|
|
14
|
-
const handlePreviewDragStart = useCallback(
|
|
15
|
-
let {
|
|
16
|
-
active: {
|
|
17
|
-
id
|
|
18
|
-
}
|
|
19
|
-
} = _ref2;
|
|
13
|
+
const handlePreviewDragStart = useCallback(({ active: { id } }) => {
|
|
20
14
|
setActiveId(id);
|
|
21
|
-
document.body.style.setProperty(
|
|
15
|
+
document.body.style.setProperty("cursor", "grabbing");
|
|
22
16
|
onPreviewDragStart();
|
|
23
17
|
}, [setActiveId, onPreviewDragStart]);
|
|
24
18
|
const handlePreviewDragMove = useCallback(() => null, []);
|
|
@@ -35,5 +29,7 @@ const useHierarchyPreviewHandlers = _ref => {
|
|
|
35
29
|
handlePreviewDragCancel
|
|
36
30
|
};
|
|
37
31
|
};
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
export {
|
|
33
|
+
useHierarchyPreviewHandlers
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=useHierarchyPreviewHandlers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hierarchy/useHierarchyPreviewHandlers.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useCallback } from 'react';\nimport { DragStartEvent, DragOverEvent } from '@dnd-kit/core';\nimport type { useHierarchyPreviewHandlersReturn, useHierarchyPreviewHandlersArgs } from './types';\n\nexport const useHierarchyPreviewHandlers = ({\n setActiveId,\n onPreviewResetState,\n onPreviewDragStart,\n}: useHierarchyPreviewHandlersArgs): useHierarchyPreviewHandlersReturn => {\n const resetState = useCallback(() => {\n setActiveId('');\n onPreviewResetState();\n\n document.body.style.setProperty('cursor', '');\n }, [setActiveId, onPreviewResetState]);\n\n const handlePreviewDragStart = useCallback(\n ({ active: { id } }: DragStartEvent) => {\n setActiveId(id);\n document.body.style.setProperty('cursor', 'grabbing');\n onPreviewDragStart();\n },\n [setActiveId, onPreviewDragStart],\n );\n\n const handlePreviewDragMove = useCallback(() => null, []);\n\n const handlePreviewDragEnd = useCallback(() => {\n resetState();\n }, [resetState]);\n\n const handlePreviewDragCancel = useCallback(() => {\n resetState();\n }, [resetState]);\n\n return {\n handlePreviewDragStart,\n handlePreviewDragMove,\n handlePreviewDragEnd,\n handlePreviewDragCancel,\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAIO,MAAM,8BAA8B,CAAC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,MACwE;AACxE,QAAM,aAAa,YAAY,MAAM;AACnC,gBAAY;AACZ;AAEA,aAAS,KAAK,MAAM,YAAY,UAAU;AAAA,KACzC,CAAC,aAAa;AAEjB,QAAM,yBAAyB,YAC7B,CAAC,EAAE,QAAQ,EAAE,WAA2B;AACtC,gBAAY;AACZ,aAAS,KAAK,MAAM,YAAY,UAAU;AAC1C;AAAA,KAEF,CAAC,aAAa;AAGhB,QAAM,wBAAwB,YAAY,MAAM,MAAM;AAEtD,QAAM,uBAAuB,YAAY,MAAM;AAC7C;AAAA,KACC,CAAC;AAEJ,QAAM,0BAA0B,YAAY,MAAM;AAChD;AAAA,KACC,CAAC;AAEJ,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/index.js
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export * from "./hierarchy";
|
|
3
|
+
export * from "./tree";
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './hierarchy';\nexport * from './tree';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/tree/constants.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
})(DropIndicatorPosition ||
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
var DropIndicatorPosition = /* @__PURE__ */ ((DropIndicatorPosition2) => {
|
|
3
|
+
DropIndicatorPosition2[DropIndicatorPosition2["None"] = 0] = "None";
|
|
4
|
+
DropIndicatorPosition2[DropIndicatorPosition2["Before"] = 1] = "Before";
|
|
5
|
+
DropIndicatorPosition2[DropIndicatorPosition2["After"] = 2] = "After";
|
|
6
|
+
DropIndicatorPosition2[DropIndicatorPosition2["Inside"] = 3] = "Inside";
|
|
7
|
+
return DropIndicatorPosition2;
|
|
8
|
+
})(DropIndicatorPosition || {});
|
|
9
|
+
export {
|
|
10
|
+
DropIndicatorPosition
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/tree/constants.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export enum DropIndicatorPosition {\n None = 0,\n Before = 1,\n After = 2,\n Inside = 3,\n}"],
|
|
5
|
+
"mappings": "AAAA;ACAO,IAAK,wBAAL,kBAAK,2BAAL;AACL,0DAAO,KAAP;AACA,4DAAS,KAAT;AACA,2DAAQ,KAAR;AACA,4DAAS,KAAT;AAJU;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,133 +1,77 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
6
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
7
|
-
import { DropIndicatorPosition } from './constants.js';
|
|
8
|
-
|
|
9
|
-
const DUMMY_ID = 'DUMMY_ID_INTERNAL_USE_ONLY';
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DropIndicatorPosition } from "./constants";
|
|
3
|
+
const DUMMY_ID = "DUMMY_ID_INTERNAL_USE_ONLY";
|
|
10
4
|
const RECT_UP = {
|
|
11
5
|
offsetTop: -Infinity,
|
|
12
6
|
offsetLeft: 0,
|
|
13
|
-
// Doesn't matter,
|
|
14
7
|
width: 0,
|
|
15
|
-
|
|
16
|
-
height: 0 // Doesn't matter
|
|
17
|
-
|
|
8
|
+
height: 0
|
|
18
9
|
};
|
|
19
10
|
const RECT_DOWN = {
|
|
20
11
|
offsetTop: Infinity,
|
|
21
12
|
offsetLeft: 0,
|
|
22
|
-
// Doesn't matter,
|
|
23
13
|
width: 0,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}; // Percentage of height to take into consideration when looking for colliding rects
|
|
28
|
-
|
|
29
|
-
const thresholdRatio = 0.2; // Percentage to be inside
|
|
30
|
-
|
|
14
|
+
height: 0
|
|
15
|
+
};
|
|
16
|
+
const thresholdRatio = 0.2;
|
|
31
17
|
const insideThreshold = 0.7;
|
|
32
|
-
const customCollisionDetection = (activeId, visibleItemsDictionary, setDropIndicatorPosition, maxDragAndDropLevel, lastPosition, setLastPosition) =>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
let
|
|
36
|
-
droppableContainers,
|
|
37
|
-
collisionRect
|
|
38
|
-
} = _ref;
|
|
39
|
-
const originalContainer = droppableContainers.find(_ref2 => {
|
|
40
|
-
let {
|
|
41
|
-
id
|
|
42
|
-
} = _ref2;
|
|
43
|
-
return id === activeId;
|
|
44
|
-
});
|
|
45
|
-
const originalRect = originalContainer === null || originalContainer === void 0 ? void 0 : (_originalContainer$re = originalContainer.rect) === null || _originalContainer$re === void 0 ? void 0 : _originalContainer$re.current; // We first check if the item was moved up or down
|
|
46
|
-
// This modifies how to search the matching colliding rect
|
|
47
|
-
|
|
48
|
-
let isUp = lastPosition === 'up';
|
|
49
|
-
|
|
18
|
+
const customCollisionDetection = (activeId, visibleItemsDictionary, setDropIndicatorPosition, maxDragAndDropLevel, lastPosition, setLastPosition) => ({ droppableContainers, collisionRect }) => {
|
|
19
|
+
const originalContainer = droppableContainers.find(({ id }) => id === activeId);
|
|
20
|
+
const originalRect = originalContainer?.rect?.current;
|
|
21
|
+
let isUp = lastPosition === "up";
|
|
50
22
|
if (originalRect) {
|
|
51
23
|
isUp = originalRect.offsetTop > collisionRect.top;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
24
|
+
}
|
|
55
25
|
const threshold = collisionRect.height * thresholdRatio;
|
|
56
26
|
let collidingContainer = null;
|
|
57
|
-
|
|
58
27
|
if (isUp) {
|
|
59
|
-
// Up -- We need to find the first rectangle downwards
|
|
60
28
|
collidingContainer = droppableContainers.reduce((firstRectDown, container) => {
|
|
61
29
|
const rect = container.rect.current;
|
|
62
|
-
|
|
63
30
|
if (rect && firstRectDown.rect.current) {
|
|
64
|
-
const {
|
|
65
|
-
|
|
66
|
-
} = rect;
|
|
67
|
-
const {
|
|
68
|
-
offsetTop: firstRectDownOffsetTop
|
|
69
|
-
} = firstRectDown.rect.current;
|
|
70
|
-
|
|
31
|
+
const { offsetTop: rectOffsetTop } = rect;
|
|
32
|
+
const { offsetTop: firstRectDownOffsetTop } = firstRectDown.rect.current;
|
|
71
33
|
if (rectOffsetTop + threshold > collisionRect.top && rectOffsetTop < firstRectDownOffsetTop) {
|
|
72
34
|
return container;
|
|
73
35
|
}
|
|
74
36
|
}
|
|
75
|
-
|
|
76
37
|
return firstRectDown;
|
|
77
|
-
}, {
|
|
78
|
-
id: DUMMY_ID,
|
|
79
|
-
rect: {
|
|
80
|
-
current: RECT_DOWN
|
|
81
|
-
}
|
|
82
|
-
});
|
|
38
|
+
}, { id: DUMMY_ID, rect: { current: RECT_DOWN } });
|
|
83
39
|
} else {
|
|
84
|
-
// Down -- We need to find the first rectangle upwards
|
|
85
40
|
collidingContainer = droppableContainers.reduce((firstRectUp, container) => {
|
|
86
41
|
const rect = container.rect.current;
|
|
87
|
-
|
|
88
42
|
if (rect && firstRectUp.rect.current) {
|
|
89
|
-
const {
|
|
90
|
-
|
|
91
|
-
} = rect;
|
|
92
|
-
const {
|
|
93
|
-
offsetTop: firstRectUpOffsetTop
|
|
94
|
-
} = firstRectUp.rect.current;
|
|
95
|
-
|
|
43
|
+
const { offsetTop: rectOffsetTop } = rect;
|
|
44
|
+
const { offsetTop: firstRectUpOffsetTop } = firstRectUp.rect.current;
|
|
96
45
|
if (rectOffsetTop - threshold < collisionRect.top && rectOffsetTop > firstRectUpOffsetTop) {
|
|
97
46
|
return container;
|
|
98
47
|
}
|
|
99
48
|
}
|
|
100
|
-
|
|
101
49
|
return firstRectUp;
|
|
102
|
-
}, {
|
|
103
|
-
|
|
104
|
-
rect: {
|
|
105
|
-
current: RECT_UP
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
} // If we didn't find a match, return null
|
|
109
|
-
|
|
110
|
-
|
|
50
|
+
}, { id: DUMMY_ID, rect: { current: RECT_UP } });
|
|
51
|
+
}
|
|
111
52
|
if (collidingContainer.id === DUMMY_ID) {
|
|
112
53
|
return null;
|
|
113
54
|
}
|
|
114
|
-
|
|
115
55
|
const collidingRect = collidingContainer.rect.current;
|
|
116
|
-
if (!collidingRect)
|
|
117
|
-
|
|
118
|
-
const [top, bottom] = [
|
|
119
|
-
|
|
56
|
+
if (!collidingRect)
|
|
57
|
+
return null;
|
|
58
|
+
const [top, bottom] = [
|
|
59
|
+
Math.max(collisionRect.top, collidingRect.offsetTop),
|
|
60
|
+
Math.min(collisionRect.bottom, collidingRect.offsetTop + collidingRect.height)
|
|
61
|
+
];
|
|
120
62
|
const intersectionPercentage = Math.abs(bottom - top) / collidingRect.height;
|
|
121
|
-
|
|
122
63
|
if (intersectionPercentage > insideThreshold && visibleItemsDictionary[collidingContainer.id].depth + 1 <= maxDragAndDropLevel && collidingContainer.id !== activeId) {
|
|
123
64
|
setDropIndicatorPosition(DropIndicatorPosition.Inside);
|
|
124
65
|
} else {
|
|
125
66
|
setDropIndicatorPosition(isUp ? DropIndicatorPosition.Before : DropIndicatorPosition.After);
|
|
126
67
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
68
|
+
if (isUp && lastPosition !== "up")
|
|
69
|
+
setLastPosition("up");
|
|
70
|
+
else if (!isUp && lastPosition !== "down")
|
|
71
|
+
setLastPosition("down");
|
|
130
72
|
return collidingContainer.id;
|
|
131
73
|
};
|
|
132
|
-
|
|
133
|
-
|
|
74
|
+
export {
|
|
75
|
+
customCollisionDetection
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=customCollisionDetection.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/tree/customCollisionDetection.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/indent */\n/* eslint-disable max-params */\nimport { CollisionDetection, DroppableContainer, LayoutRect } from '@dnd-kit/core';\nimport { DropIndicatorPosition } from './constants';\nimport { Item } from './types';\n\nconst DUMMY_ID = 'DUMMY_ID_INTERNAL_USE_ONLY';\nconst RECT_UP: LayoutRect = {\n offsetTop: -Infinity,\n offsetLeft: 0, // Doesn't matter,\n width: 0, // Doesn't matter\n height: 0, // Doesn't matter\n};\nconst RECT_DOWN: LayoutRect = {\n offsetTop: Infinity,\n offsetLeft: 0, // Doesn't matter,\n width: 0, // Doesn't matter\n height: 0, // Doesn't matter\n};\n\n// Percentage of height to take into consideration when looking for colliding rects\nconst thresholdRatio = 0.2;\n// Percentage to be inside\nconst insideThreshold = 0.7;\n\nexport const customCollisionDetection =\n (\n activeId: string,\n visibleItemsDictionary: Record<string, Item>,\n setDropIndicatorPosition: React.Dispatch<React.SetStateAction<DropIndicatorPosition>>,\n maxDragAndDropLevel: number,\n lastPosition: string,\n setLastPosition: React.Dispatch<React.SetStateAction<string>>,\n ): CollisionDetection =>\n ({ droppableContainers, collisionRect }) => {\n const originalContainer = droppableContainers.find(({ id }) => id === activeId);\n const originalRect = originalContainer?.rect?.current;\n\n // We first check if the item was moved up or down\n // This modifies how to search the matching colliding rect\n let isUp = lastPosition === 'up';\n if (originalRect) {\n isUp = originalRect.offsetTop > collisionRect.top;\n }\n\n // Threshold\n const threshold = collisionRect.height * thresholdRatio;\n\n let collidingContainer: DroppableContainer | null = null;\n\n if (isUp) {\n // Up -- We need to find the first rectangle downwards\n collidingContainer = droppableContainers.reduce(\n (firstRectDown, container) => {\n const rect = container.rect.current;\n if (rect && firstRectDown.rect.current) {\n const { offsetTop: rectOffsetTop } = rect;\n const { offsetTop: firstRectDownOffsetTop } = firstRectDown.rect.current;\n if (rectOffsetTop + threshold > collisionRect.top && rectOffsetTop < firstRectDownOffsetTop) {\n return container;\n }\n }\n return firstRectDown;\n },\n { id: DUMMY_ID, rect: { current: RECT_DOWN } } as DroppableContainer,\n );\n } else {\n // Down -- We need to find the first rectangle upwards\n collidingContainer = droppableContainers.reduce(\n (firstRectUp, container) => {\n const rect = container.rect.current;\n if (rect && firstRectUp.rect.current) {\n const { offsetTop: rectOffsetTop } = rect;\n const { offsetTop: firstRectUpOffsetTop } = firstRectUp.rect.current;\n if (rectOffsetTop - threshold < collisionRect.top && rectOffsetTop > firstRectUpOffsetTop) {\n return container;\n }\n }\n return firstRectUp;\n },\n { id: DUMMY_ID, rect: { current: RECT_UP } } as DroppableContainer,\n );\n }\n\n // If we didn't find a match, return null\n if (collidingContainer.id === DUMMY_ID) {\n return null;\n }\n\n const collidingRect = collidingContainer.rect.current;\n\n if (!collidingRect) return null;\n\n // Calculate the intersection interval\n const [top, bottom] = [\n Math.max(collisionRect.top, collidingRect.offsetTop),\n Math.min(collisionRect.bottom, collidingRect.offsetTop + collidingRect.height),\n ];\n\n // Calculate the percentage of intersection\n const intersectionPercentage = Math.abs(bottom - top) / collidingRect.height;\n\n if (\n intersectionPercentage > insideThreshold &&\n visibleItemsDictionary[collidingContainer.id].depth + 1 <= maxDragAndDropLevel &&\n collidingContainer.id !== activeId\n ) {\n setDropIndicatorPosition(DropIndicatorPosition.Inside);\n } else {\n setDropIndicatorPosition(isUp ? DropIndicatorPosition.Before : DropIndicatorPosition.After);\n }\n\n if (isUp && lastPosition !== 'up') setLastPosition('up');\n else if (!isUp && lastPosition !== 'down') setLastPosition('down');\n\n // Return the id of the match rectangle\n return collidingContainer.id;\n };\n"],
|
|
5
|
+
"mappings": "AAAA;ACIA;AAGA,MAAM,WAAW;AACjB,MAAM,UAAsB;AAAA,EAC1B,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,QAAQ;AAAA;AAEV,MAAM,YAAwB;AAAA,EAC5B,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,QAAQ;AAAA;AAIV,MAAM,iBAAiB;AAEvB,MAAM,kBAAkB;AAEjB,MAAM,2BACX,CACE,UACA,wBACA,0BACA,qBACA,cACA,oBAEF,CAAC,EAAE,qBAAqB,oBAAoB;AAC1C,QAAM,oBAAoB,oBAAoB,KAAK,CAAC,EAAE,SAAS,OAAO;AACtE,QAAM,eAAe,mBAAmB,MAAM;AAI9C,MAAI,OAAO,iBAAiB;AAC5B,MAAI,cAAc;AAChB,WAAO,aAAa,YAAY,cAAc;AAAA;AAIhD,QAAM,YAAY,cAAc,SAAS;AAEzC,MAAI,qBAAgD;AAEpD,MAAI,MAAM;AAER,yBAAqB,oBAAoB,OACvC,CAAC,eAAe,cAAc;AAC5B,YAAM,OAAO,UAAU,KAAK;AAC5B,UAAI,QAAQ,cAAc,KAAK,SAAS;AACtC,cAAM,EAAE,WAAW,kBAAkB;AACrC,cAAM,EAAE,WAAW,2BAA2B,cAAc,KAAK;AACjE,YAAI,gBAAgB,YAAY,cAAc,OAAO,gBAAgB,wBAAwB;AAC3F,iBAAO;AAAA;AAAA;AAGX,aAAO;AAAA,OAET,EAAE,IAAI,UAAU,MAAM,EAAE,SAAS;AAAA,SAE9B;AAEL,yBAAqB,oBAAoB,OACvC,CAAC,aAAa,cAAc;AAC1B,YAAM,OAAO,UAAU,KAAK;AAC5B,UAAI,QAAQ,YAAY,KAAK,SAAS;AACpC,cAAM,EAAE,WAAW,kBAAkB;AACrC,cAAM,EAAE,WAAW,yBAAyB,YAAY,KAAK;AAC7D,YAAI,gBAAgB,YAAY,cAAc,OAAO,gBAAgB,sBAAsB;AACzF,iBAAO;AAAA;AAAA;AAGX,aAAO;AAAA,OAET,EAAE,IAAI,UAAU,MAAM,EAAE,SAAS;AAAA;AAKrC,MAAI,mBAAmB,OAAO,UAAU;AACtC,WAAO;AAAA;AAGT,QAAM,gBAAgB,mBAAmB,KAAK;AAE9C,MAAI,CAAC;AAAe,WAAO;AAG3B,QAAM,CAAC,KAAK,UAAU;AAAA,IACpB,KAAK,IAAI,cAAc,KAAK,cAAc;AAAA,IAC1C,KAAK,IAAI,cAAc,QAAQ,cAAc,YAAY,cAAc;AAAA;AAIzE,QAAM,yBAAyB,KAAK,IAAI,SAAS,OAAO,cAAc;AAEtE,MACE,yBAAyB,mBACzB,uBAAuB,mBAAmB,IAAI,QAAQ,KAAK,uBAC3D,mBAAmB,OAAO,UAC1B;AACA,6BAAyB,sBAAsB;AAAA,SAC1C;AACL,6BAAyB,OAAO,sBAAsB,SAAS,sBAAsB;AAAA;AAGvF,MAAI,QAAQ,iBAAiB;AAAM,oBAAgB;AAAA,WAC1C,CAAC,QAAQ,iBAAiB;AAAQ,oBAAgB;AAG3D,SAAO,mBAAmB;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|