@elliemae/ds-legacy-drag-and-drop 1.0.0-rc.1
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/dist/cjs/exported-related/DSDragAndDrop.js +98 -0
- package/dist/cjs/exported-related/DSDragAndDrop.js.map +7 -0
- package/dist/cjs/exported-related/DSSortableContainer.js +72 -0
- package/dist/cjs/exported-related/DSSortableContainer.js.map +7 -0
- package/dist/cjs/exported-related/DSSortableItem.js +61 -0
- package/dist/cjs/exported-related/DSSortableItem.js.map +7 -0
- package/dist/cjs/exported-related/DropIndicator.js +97 -0
- package/dist/cjs/exported-related/DropIndicator.js.map +7 -0
- package/dist/cjs/exported-related/SortableContainerContext.js +45 -0
- package/dist/cjs/exported-related/SortableContainerContext.js.map +7 -0
- package/dist/cjs/exported-related/index.js +42 -0
- package/dist/cjs/exported-related/index.js.map +7 -0
- package/dist/cjs/hierarchy/customCollisionDetection.js +69 -0
- package/dist/cjs/hierarchy/customCollisionDetection.js.map +7 -0
- package/dist/cjs/hierarchy/getHierarchyKeyboardCoordinates.js +115 -0
- package/dist/cjs/hierarchy/getHierarchyKeyboardCoordinates.js.map +7 -0
- package/dist/cjs/hierarchy/index.js +31 -0
- package/dist/cjs/hierarchy/index.js.map +7 -0
- package/dist/cjs/hierarchy/types.js +28 -0
- package/dist/cjs/hierarchy/types.js.map +7 -0
- package/dist/cjs/hierarchy/useHierarchyActionHandlers.js +81 -0
- package/dist/cjs/hierarchy/useHierarchyActionHandlers.js.map +7 -0
- package/dist/cjs/hierarchy/useHierarchyAnnouncements.js +68 -0
- package/dist/cjs/hierarchy/useHierarchyAnnouncements.js.map +7 -0
- package/dist/cjs/hierarchy/useHierarchyDndkitConfig.js +126 -0
- package/dist/cjs/hierarchy/useHierarchyDndkitConfig.js.map +7 -0
- package/dist/cjs/hierarchy/useHierarchyPreviewHandlers.js +68 -0
- package/dist/cjs/hierarchy/useHierarchyPreviewHandlers.js.map +7 -0
- package/dist/cjs/index.js +35 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/tree/constants.js +41 -0
- package/dist/cjs/tree/constants.js.map +7 -0
- package/dist/cjs/tree/customCollisionDetection.js +92 -0
- package/dist/cjs/tree/customCollisionDetection.js.map +7 -0
- package/dist/cjs/tree/getTreeKeyboardCoordinates.js +176 -0
- package/dist/cjs/tree/getTreeKeyboardCoordinates.js.map +7 -0
- package/dist/cjs/tree/index.js +40 -0
- package/dist/cjs/tree/index.js.map +7 -0
- package/dist/cjs/tree/types.js +28 -0
- package/dist/cjs/tree/types.js.map +7 -0
- package/dist/cjs/tree/useMultiTreeDndkitConfig.js +231 -0
- package/dist/cjs/tree/useMultiTreeDndkitConfig.js.map +7 -0
- package/dist/cjs/tree/useTreeActionHandlers.js +139 -0
- package/dist/cjs/tree/useTreeActionHandlers.js.map +7 -0
- package/dist/cjs/tree/useTreeAnnouncements.js +84 -0
- package/dist/cjs/tree/useTreeAnnouncements.js.map +7 -0
- package/dist/cjs/tree/useTreeDndkitConfig.js +62 -0
- package/dist/cjs/tree/useTreeDndkitConfig.js.map +7 -0
- package/dist/cjs/tree/useTreePreviewHandlers.js +83 -0
- package/dist/cjs/tree/useTreePreviewHandlers.js.map +7 -0
- package/dist/cjs/tree/utilities.js +86 -0
- package/dist/cjs/tree/utilities.js.map +7 -0
- package/dist/esm/exported-related/DSDragAndDrop.js +73 -0
- package/dist/esm/exported-related/DSDragAndDrop.js.map +7 -0
- package/dist/esm/exported-related/DSSortableContainer.js +42 -0
- package/dist/esm/exported-related/DSSortableContainer.js.map +7 -0
- package/dist/esm/exported-related/DSSortableItem.js +31 -0
- package/dist/esm/exported-related/DSSortableItem.js.map +7 -0
- package/dist/esm/exported-related/DropIndicator.js +67 -0
- package/dist/esm/exported-related/DropIndicator.js.map +7 -0
- package/dist/esm/exported-related/SortableContainerContext.js +15 -0
- package/dist/esm/exported-related/SortableContainerContext.js.map +7 -0
- package/dist/esm/exported-related/index.js +12 -0
- package/dist/esm/exported-related/index.js.map +7 -0
- package/dist/esm/hierarchy/customCollisionDetection.js +39 -0
- package/dist/esm/hierarchy/customCollisionDetection.js.map +7 -0
- package/dist/esm/hierarchy/getHierarchyKeyboardCoordinates.js +85 -0
- package/dist/esm/hierarchy/getHierarchyKeyboardCoordinates.js.map +7 -0
- package/dist/esm/hierarchy/index.js +4 -0
- package/dist/esm/hierarchy/index.js.map +7 -0
- package/dist/esm/hierarchy/types.js +2 -0
- package/dist/esm/hierarchy/types.js.map +7 -0
- package/dist/esm/hierarchy/useHierarchyActionHandlers.js +51 -0
- package/dist/esm/hierarchy/useHierarchyActionHandlers.js.map +7 -0
- package/dist/esm/hierarchy/useHierarchyAnnouncements.js +38 -0
- package/dist/esm/hierarchy/useHierarchyAnnouncements.js.map +7 -0
- package/dist/esm/hierarchy/useHierarchyDndkitConfig.js +96 -0
- package/dist/esm/hierarchy/useHierarchyDndkitConfig.js.map +7 -0
- package/dist/esm/hierarchy/useHierarchyPreviewHandlers.js +38 -0
- package/dist/esm/hierarchy/useHierarchyPreviewHandlers.js.map +7 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +7 -0
- package/dist/esm/tree/constants.js +11 -0
- package/dist/esm/tree/constants.js.map +7 -0
- package/dist/esm/tree/customCollisionDetection.js +62 -0
- package/dist/esm/tree/customCollisionDetection.js.map +7 -0
- package/dist/esm/tree/getTreeKeyboardCoordinates.js +146 -0
- package/dist/esm/tree/getTreeKeyboardCoordinates.js.map +7 -0
- package/dist/esm/tree/index.js +9 -0
- package/dist/esm/tree/index.js.map +7 -0
- package/dist/esm/tree/types.js +2 -0
- package/dist/esm/tree/types.js.map +7 -0
- package/dist/esm/tree/useMultiTreeDndkitConfig.js +201 -0
- package/dist/esm/tree/useMultiTreeDndkitConfig.js.map +7 -0
- package/dist/esm/tree/useTreeActionHandlers.js +109 -0
- package/dist/esm/tree/useTreeActionHandlers.js.map +7 -0
- package/dist/esm/tree/useTreeAnnouncements.js +54 -0
- package/dist/esm/tree/useTreeAnnouncements.js.map +7 -0
- package/dist/esm/tree/useTreeDndkitConfig.js +32 -0
- package/dist/esm/tree/useTreeDndkitConfig.js.map +7 -0
- package/dist/esm/tree/useTreePreviewHandlers.js +53 -0
- package/dist/esm/tree/useTreePreviewHandlers.js.map +7 -0
- package/dist/esm/tree/utilities.js +56 -0
- package/dist/esm/tree/utilities.js.map +7 -0
- package/dist/types/exported-related/DSDragAndDrop.d.ts +17 -0
- package/dist/types/exported-related/DSSortableContainer.d.ts +16 -0
- package/dist/types/exported-related/DSSortableItem.d.ts +14 -0
- package/dist/types/exported-related/DropIndicator.d.ts +15 -0
- package/dist/types/exported-related/SortableContainerContext.d.ts +13 -0
- package/dist/types/exported-related/index.d.ts +4 -0
- package/dist/types/hierarchy/customCollisionDetection.d.ts +3 -0
- package/dist/types/hierarchy/getHierarchyKeyboardCoordinates.d.ts +3 -0
- package/dist/types/hierarchy/index.d.ts +2 -0
- package/dist/types/hierarchy/types.d.ts +83 -0
- package/dist/types/hierarchy/useHierarchyActionHandlers.d.ts +2 -0
- package/dist/types/hierarchy/useHierarchyAnnouncements.d.ts +3 -0
- package/dist/types/hierarchy/useHierarchyDndkitConfig.d.ts +2 -0
- package/dist/types/hierarchy/useHierarchyPreviewHandlers.d.ts +2 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/tree/constants.d.ts +6 -0
- package/dist/types/tree/customCollisionDetection.d.ts +3 -0
- package/dist/types/tree/getTreeKeyboardCoordinates.d.ts +3 -0
- package/dist/types/tree/index.d.ts +4 -0
- package/dist/types/tree/types.d.ts +129 -0
- package/dist/types/tree/useMultiTreeDndkitConfig.d.ts +2 -0
- package/dist/types/tree/useTreeActionHandlers.d.ts +2 -0
- package/dist/types/tree/useTreeAnnouncements.d.ts +3 -0
- package/dist/types/tree/useTreeDndkitConfig.d.ts +2 -0
- package/dist/types/tree/useTreePreviewHandlers.d.ts +2 -0
- package/dist/types/tree/utilities.d.ts +8 -0
- package/package.json +143 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var DSDragAndDrop_exports = {};
|
|
30
|
+
__export(DSDragAndDrop_exports, {
|
|
31
|
+
DSDragAndDrop: () => DSDragAndDrop
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(DSDragAndDrop_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_react = require("react");
|
|
37
|
+
var import_react_dom = require("react-dom");
|
|
38
|
+
var import__ = require("../index.js");
|
|
39
|
+
var import_SortableContainerContext = __toESM(require("./SortableContainerContext.js"));
|
|
40
|
+
const flatten = (items, parentId = null, depth = 0, container = "root", iteration = { count: 0 }) => items.reduce((acc, item, index) => {
|
|
41
|
+
acc.push({
|
|
42
|
+
...item,
|
|
43
|
+
uid: item.dsId,
|
|
44
|
+
childrenCount: item?.subitems?.length || 0,
|
|
45
|
+
original: item,
|
|
46
|
+
realIndex: iteration.count++,
|
|
47
|
+
parentId,
|
|
48
|
+
depth,
|
|
49
|
+
index,
|
|
50
|
+
container
|
|
51
|
+
});
|
|
52
|
+
if (item.subitems?.length > 0 && item.collapsed === false) {
|
|
53
|
+
acc.push(...flatten(item.subitems, item.dsId, depth + 1, container, iteration));
|
|
54
|
+
}
|
|
55
|
+
return acc;
|
|
56
|
+
}, []);
|
|
57
|
+
const DSDragAndDrop = ({
|
|
58
|
+
items,
|
|
59
|
+
children,
|
|
60
|
+
onReorder,
|
|
61
|
+
onCollapse,
|
|
62
|
+
DragOverlayRenderer,
|
|
63
|
+
...rest
|
|
64
|
+
}) => {
|
|
65
|
+
const itemsFlattened = (0, import_react.useMemo)(
|
|
66
|
+
() => Object.keys(items).reduce(
|
|
67
|
+
(acc, container) => {
|
|
68
|
+
acc[container] = flatten(items[container], null, 0, container);
|
|
69
|
+
return acc;
|
|
70
|
+
},
|
|
71
|
+
{}
|
|
72
|
+
),
|
|
73
|
+
[items]
|
|
74
|
+
);
|
|
75
|
+
const { dndContextProps, sortableContextProps, active, dropIndicatorPosition, isDropValid } = (0, import__.useMultiTreeDndkitConfig)({
|
|
76
|
+
flattenedItems: itemsFlattened,
|
|
77
|
+
isHorizontalDnD: false,
|
|
78
|
+
isExpandable: true,
|
|
79
|
+
onReorder,
|
|
80
|
+
maxDragAndDropLevel: 0,
|
|
81
|
+
getIsDropValid: () => true,
|
|
82
|
+
...rest
|
|
83
|
+
});
|
|
84
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.DndContext, { ...dndContextProps, children: [
|
|
85
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
86
|
+
import_SortableContainerContext.default.Provider,
|
|
87
|
+
{
|
|
88
|
+
value: { sortableContextProps, dropIndicatorPosition, isDropValid, items: itemsFlattened, onCollapse },
|
|
89
|
+
children
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
(0, import_react_dom.createPortal)(
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DragOverlay, { style: { width: "auto", zIndex: 1001 }, modifiers: [import__.restrictToWindowEdges], children: active ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DragOverlayRenderer, { activeItem: active }) : null }),
|
|
94
|
+
document.body
|
|
95
|
+
)
|
|
96
|
+
] });
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=DSDragAndDrop.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/exported-related/DSDragAndDrop.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-params */\nimport React, { useMemo } from 'react';\nimport { createPortal } from 'react-dom';\nimport {\n DndContext,\n DragOverlay,\n restrictToWindowEdges,\n useMultiTreeDndkitConfig,\n type UniqueIdentifier,\n type Active,\n} from '../index.js';\nimport ContainersContext from './SortableContainerContext.js';\nimport type { DnDKitTree } from '../tree/types.js';\nexport interface DSDragAndDropT<T> {\n items: Record<string, Item<T>[]>;\n onReorder: DnDKitTree.OnReorder<T>;\n onCollapse: (nodeId: number) => void;\n children: React.ReactNode;\n DragOverlayRenderer: React.ComponentType<{ activeItem: Active }>;\n}\n\n// opinionated item type\nexport type Item<T> = DnDKitTree.Item<T> & {\n dsId: number;\n subitems: Item<T>[];\n} & T;\n\nconst flatten = <T,>(\n items: Item<T>[],\n parentId: UniqueIdentifier | null = null,\n depth = 0,\n container = 'root',\n iteration = { count: 0 },\n) =>\n items.reduce((acc, item, index) => {\n acc.push({\n ...item,\n uid: item.dsId,\n childrenCount: item?.subitems?.length || 0,\n original: item,\n realIndex: iteration.count++,\n parentId,\n depth,\n index,\n container,\n });\n if (item.subitems?.length > 0 && item.collapsed === false) {\n acc.push(...flatten(item.subitems, item.dsId, depth + 1, container, iteration));\n }\n return acc;\n }, [] as Item<T>[]);\n\nexport const DSDragAndDrop = <T,>({\n items,\n children,\n onReorder,\n onCollapse,\n DragOverlayRenderer,\n ...rest\n}: DSDragAndDropT<T>) => {\n const itemsFlattened = useMemo(\n () =>\n Object.keys(items).reduce(\n (acc, container) => {\n acc[container] = flatten(items[container], null, 0, container);\n return acc;\n },\n {} as Record<string, Item<T>[]>,\n ),\n [items],\n );\n const { dndContextProps, sortableContextProps, active, dropIndicatorPosition, isDropValid } =\n useMultiTreeDndkitConfig({\n flattenedItems: itemsFlattened,\n isHorizontalDnD: false,\n isExpandable: true,\n onReorder,\n maxDragAndDropLevel: 0,\n getIsDropValid: () => true,\n ...rest,\n });\n\n return (\n <DndContext {...dndContextProps}>\n <ContainersContext.Provider\n value={{ sortableContextProps, dropIndicatorPosition, isDropValid, items: itemsFlattened, onCollapse }}\n >\n {children}\n </ContainersContext.Provider>\n {createPortal(\n <DragOverlay style={{ width: 'auto', zIndex: 1001 }} modifiers={[restrictToWindowEdges]}>\n {active ? <DragOverlayRenderer activeItem={active} /> : null}\n </DragOverlay>,\n document.body,\n )}\n </DndContext>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmFnB;AAlFJ,mBAA+B;AAC/B,uBAA6B;AAC7B,eAOO;AACP,sCAA8B;AAgB9B,MAAM,UAAU,CACd,OACA,WAAoC,MACpC,QAAQ,GACR,YAAY,QACZ,YAAY,EAAE,OAAO,EAAE,MAEvB,MAAM,OAAO,CAAC,KAAK,MAAM,UAAU;AACjC,MAAI,KAAK;AAAA,IACP,GAAG;AAAA,IACH,KAAK,KAAK;AAAA,IACV,eAAe,MAAM,UAAU,UAAU;AAAA,IACzC,UAAU;AAAA,IACV,WAAW,UAAU;AAAA,IACrB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,MAAI,KAAK,UAAU,SAAS,KAAK,KAAK,cAAc,OAAO;AACzD,QAAI,KAAK,GAAG,QAAQ,KAAK,UAAU,KAAK,MAAM,QAAQ,GAAG,WAAW,SAAS,CAAC;AAAA,EAChF;AACA,SAAO;AACT,GAAG,CAAC,CAAc;AAEb,MAAM,gBAAgB,CAAK;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAyB;AACvB,QAAM,qBAAiB;AAAA,IACrB,MACE,OAAO,KAAK,KAAK,EAAE;AAAA,MACjB,CAAC,KAAK,cAAc;AAClB,YAAI,SAAS,IAAI,QAAQ,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS;AAC7D,eAAO;AAAA,MACT;AAAA,MACA,CAAC;AAAA,IACH;AAAA,IACF,CAAC,KAAK;AAAA,EACR;AACA,QAAM,EAAE,iBAAiB,sBAAsB,QAAQ,uBAAuB,YAAY,QACxF,mCAAyB;AAAA,IACvB,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,cAAc;AAAA,IACd;AAAA,IACA,qBAAqB;AAAA,IACrB,gBAAgB,MAAM;AAAA,IACtB,GAAG;AAAA,EACL,CAAC;AAEH,SACE,6CAAC,uBAAY,GAAG,iBACd;AAAA;AAAA,MAAC,gCAAAA,QAAkB;AAAA,MAAlB;AAAA,QACC,OAAO,EAAE,sBAAsB,uBAAuB,aAAa,OAAO,gBAAgB,WAAW;AAAA,QAEpG;AAAA;AAAA,IACH;AAAA,QACC;AAAA,MACC,4CAAC,wBAAY,OAAO,EAAE,OAAO,QAAQ,QAAQ,KAAK,GAAG,WAAW,CAAC,8BAAqB,GACnF,mBAAS,4CAAC,uBAAoB,YAAY,QAAQ,IAAK,MAC1D;AAAA,MACA,SAAS;AAAA,IACX;AAAA,KACF;AAEJ;",
|
|
6
|
+
"names": ["ContainersContext"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var DSSortableContainer_exports = {};
|
|
30
|
+
__export(DSSortableContainer_exports, {
|
|
31
|
+
DSSortableContainer: () => DSSortableContainer
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(DSSortableContainer_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_ds_legacy_fast_list = require("@elliemae/ds-legacy-fast-list");
|
|
38
|
+
var import__ = require("../index.js");
|
|
39
|
+
var import_SortableContainerContext = __toESM(require("./SortableContainerContext.js"));
|
|
40
|
+
const ContainerItemRenderer = (props) => {
|
|
41
|
+
const { items, ItemRenderer, index, ...rest } = props;
|
|
42
|
+
const item = items[index];
|
|
43
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSSortableItem, { item, ItemRenderer, ...rest });
|
|
44
|
+
};
|
|
45
|
+
const ContainerItemRendererMemoized = import_react.default.memo(ContainerItemRenderer);
|
|
46
|
+
const DSSortableContainer = (props) => {
|
|
47
|
+
const { containerId, ItemRenderer, Component, children } = props;
|
|
48
|
+
const { setNodeRef, isOver } = (0, import__.useDroppable)({
|
|
49
|
+
id: containerId
|
|
50
|
+
});
|
|
51
|
+
const ctx = (0, import_react.useContext)(import_SortableContainerContext.default);
|
|
52
|
+
const { sortableContextProps, items } = ctx;
|
|
53
|
+
const containerSortableContextProps = sortableContextProps[containerId];
|
|
54
|
+
const render = (0, import_react.useMemo)(() => {
|
|
55
|
+
if (children) {
|
|
56
|
+
return children;
|
|
57
|
+
}
|
|
58
|
+
if (ItemRenderer) {
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
+
import_ds_legacy_fast_list.DSFastList,
|
|
61
|
+
{
|
|
62
|
+
count: items[containerId].length,
|
|
63
|
+
ItemRenderer: ContainerItemRendererMemoized,
|
|
64
|
+
extraItemProps: { items: items[containerId], ItemRenderer }
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}, [ItemRenderer, children, containerId, items]);
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.SortableContext, { ...containerSortableContextProps, id: "container", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { innerRef: setNodeRef, isOver, children: render }) });
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=DSSortableContainer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/exported-related/DSSortableContainer.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React, { useContext, useMemo } from 'react';\nimport { DSFastList } from '@elliemae/ds-legacy-fast-list';\nimport { SortableContext, useDroppable, DSSortableItem } from '../index.js';\nimport ContainersContext from './SortableContainerContext.js';\nimport type { UniqueIdentifier } from '@dnd-kit/core/dist/types';\nimport type { Item } from './DSDragAndDrop.js';\nimport type { ItemRendererPropsT } from './DSSortableItem.js';\ninterface DSSortableContainerT<T> {\n items: Record<string, Item<T>[]>;\n containerId: UniqueIdentifier;\n ItemRenderer: React.ComponentType<T>;\n Component: React.ComponentType<{\n innerRef: React.Ref<HTMLElement>;\n isOver: boolean;\n children: React.ReactNode;\n }>;\n children: React.ReactNode;\n}\n\ninterface ContainerItemRendererT<T> {\n items: Item<T>[];\n ItemRenderer: React.ComponentType<ItemRendererPropsT<T>>;\n index: number;\n}\nconst ContainerItemRenderer = <T,>(props: ContainerItemRendererT<T>) => {\n const { items, ItemRenderer, index, ...rest } = props;\n const item = items[index];\n return <DSSortableItem item={item} ItemRenderer={ItemRenderer} {...rest} />;\n};\n\nconst ContainerItemRendererMemoized = React.memo(ContainerItemRenderer);\n\nexport const DSSortableContainer = <T,>(props: DSSortableContainerT<T>) => {\n const { containerId, ItemRenderer, Component, children } = props;\n const { setNodeRef, isOver } = useDroppable({\n id: containerId,\n });\n const ctx = useContext(ContainersContext);\n const { sortableContextProps, items } = ctx;\n const containerSortableContextProps = sortableContextProps[containerId];\n\n const render = useMemo(() => {\n if (children) {\n return children;\n }\n if (ItemRenderer) {\n return (\n <DSFastList\n count={items[containerId].length}\n ItemRenderer={ContainerItemRendererMemoized}\n extraItemProps={{ items: items[containerId], ItemRenderer }}\n />\n );\n }\n return null;\n }, [ItemRenderer, children, containerId, items]);\n\n return (\n <SortableContext {...containerSortableContextProps} id=\"container\">\n <Component innerRef={setNodeRef} isOver={isOver}>\n {render}\n </Component>\n </SortableContext>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2Bd;AA3BT,mBAA2C;AAC3C,iCAA2B;AAC3B,eAA8D;AAC9D,sCAA8B;AAqB9B,MAAM,wBAAwB,CAAK,UAAqC;AACtE,QAAM,EAAE,OAAO,cAAc,OAAO,GAAG,KAAK,IAAI;AAChD,QAAM,OAAO,MAAM,KAAK;AACxB,SAAO,4CAAC,2BAAe,MAAY,cAA6B,GAAG,MAAM;AAC3E;AAEA,MAAM,gCAAgC,aAAAA,QAAM,KAAK,qBAAqB;AAE/D,MAAM,sBAAsB,CAAK,UAAmC;AACzE,QAAM,EAAE,aAAa,cAAc,WAAW,SAAS,IAAI;AAC3D,QAAM,EAAE,YAAY,OAAO,QAAI,uBAAa;AAAA,IAC1C,IAAI;AAAA,EACN,CAAC;AACD,QAAM,UAAM,yBAAW,gCAAAC,OAAiB;AACxC,QAAM,EAAE,sBAAsB,MAAM,IAAI;AACxC,QAAM,gCAAgC,qBAAqB,WAAW;AAEtE,QAAM,aAAS,sBAAQ,MAAM;AAC3B,QAAI,UAAU;AACZ,aAAO;AAAA,IACT;AACA,QAAI,cAAc;AAChB,aACE;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,MAAM,WAAW,EAAE;AAAA,UAC1B,cAAc;AAAA,UACd,gBAAgB,EAAE,OAAO,MAAM,WAAW,GAAG,aAAa;AAAA;AAAA,MAC5D;AAAA,IAEJ;AACA,WAAO;AAAA,EACT,GAAG,CAAC,cAAc,UAAU,aAAa,KAAK,CAAC;AAE/C,SACE,4CAAC,4BAAiB,GAAG,+BAA+B,IAAG,aACrD,sDAAC,aAAU,UAAU,YAAY,QAC9B,kBACH,GACF;AAEJ;",
|
|
6
|
+
"names": ["React", "ContainersContext"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var DSSortableItem_exports = {};
|
|
30
|
+
__export(DSSortableItem_exports, {
|
|
31
|
+
DSSortableItem: () => DSSortableItem
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(DSSortableItem_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_react = require("react");
|
|
37
|
+
var import__ = require("../index.js");
|
|
38
|
+
var import_SortableContainerContext = __toESM(require("./SortableContainerContext.js"));
|
|
39
|
+
const DSSortableItem = (props) => {
|
|
40
|
+
const { item, ItemRenderer, ...rest } = props;
|
|
41
|
+
const ctx = (0, import_react.useContext)(import_SortableContainerContext.default);
|
|
42
|
+
const { isDropValid, dropIndicatorPosition, onCollapse } = ctx;
|
|
43
|
+
const draggableOptions = (0, import_react.useMemo)(
|
|
44
|
+
() => ({
|
|
45
|
+
id: item.dsId
|
|
46
|
+
}),
|
|
47
|
+
[item]
|
|
48
|
+
);
|
|
49
|
+
const useSortableHelpers = (0, import__.useSortable)(draggableOptions);
|
|
50
|
+
const draggableProps = (0, import_react.useMemo)(() => {
|
|
51
|
+
const { index, overIndex } = useSortableHelpers;
|
|
52
|
+
return {
|
|
53
|
+
...useSortableHelpers,
|
|
54
|
+
shouldShowDropIndicatorPosition: overIndex === index,
|
|
55
|
+
dropIndicatorPosition,
|
|
56
|
+
isDropValid
|
|
57
|
+
};
|
|
58
|
+
}, [dropIndicatorPosition, isDropValid, useSortableHelpers]);
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: draggableProps.setNodeRef, style: { position: "relative" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemRenderer, { item, draggableProps, onCollapse, ...rest }) });
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=DSSortableItem.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/exported-related/DSSortableItem.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React, { useMemo, useContext } from 'react';\nimport { useSortable } from '../index.js';\nimport ContainersContext from './SortableContainerContext.js';\nimport type { Item } from './DSDragAndDrop.js';\nexport interface ItemRendererPropsT<T> {\n item: Item<T>;\n draggableProps: ReturnType<typeof useSortable>;\n onCollapse?: (nodeId: number) => void;\n}\ninterface DSSortableItemT<T> {\n item: Item<T>;\n ItemRenderer: React.ComponentType<ItemRendererPropsT<T>>;\n}\nexport const DSSortableItem = <T,>(props: DSSortableItemT<T>) => {\n const { item, ItemRenderer, ...rest } = props;\n const ctx = useContext(ContainersContext);\n\n const { isDropValid, dropIndicatorPosition, onCollapse } = ctx;\n\n // onMount generate unique options, so everyting is only ran once\n const draggableOptions = useMemo(\n () => ({\n id: item.dsId,\n }),\n [item],\n );\n\n const useSortableHelpers = useSortable(draggableOptions);\n\n const draggableProps = useMemo(() => {\n const { index, overIndex } = useSortableHelpers;\n\n return {\n ...useSortableHelpers,\n shouldShowDropIndicatorPosition: overIndex === index,\n dropIndicatorPosition,\n isDropValid,\n };\n }, [dropIndicatorPosition, isDropValid, useSortableHelpers]);\n\n return (\n <div ref={draggableProps.setNodeRef} style={{ position: 'relative' }}>\n <ItemRenderer item={item} draggableProps={draggableProps} onCollapse={onCollapse} {...rest} />\n </div>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0CjB;AA1CN,mBAA2C;AAC3C,eAA4B;AAC5B,sCAA8B;AAWvB,MAAM,iBAAiB,CAAK,UAA8B;AAC/D,QAAM,EAAE,MAAM,cAAc,GAAG,KAAK,IAAI;AACxC,QAAM,UAAM,yBAAW,gCAAAA,OAAiB;AAExC,QAAM,EAAE,aAAa,uBAAuB,WAAW,IAAI;AAG3D,QAAM,uBAAmB;AAAA,IACvB,OAAO;AAAA,MACL,IAAI,KAAK;AAAA,IACX;AAAA,IACA,CAAC,IAAI;AAAA,EACP;AAEA,QAAM,yBAAqB,sBAAY,gBAAgB;AAEvD,QAAM,qBAAiB,sBAAQ,MAAM;AACnC,UAAM,EAAE,OAAO,UAAU,IAAI;AAE7B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,iCAAiC,cAAc;AAAA,MAC/C;AAAA,MACA;AAAA,IACF;AAAA,EACF,GAAG,CAAC,uBAAuB,aAAa,kBAAkB,CAAC;AAE3D,SACE,4CAAC,SAAI,KAAK,eAAe,YAAY,OAAO,EAAE,UAAU,WAAW,GACjE,sDAAC,gBAAa,MAAY,gBAAgC,YAAyB,GAAG,MAAM,GAC9F;AAEJ;",
|
|
6
|
+
"names": ["ContainersContext"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var DropIndicator_exports = {};
|
|
30
|
+
__export(DropIndicator_exports, {
|
|
31
|
+
DropIndicator: () => DropIndicator
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(DropIndicator_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_ds_legacy_system = require("@elliemae/ds-legacy-system");
|
|
37
|
+
const DropIndicatorPosition = {
|
|
38
|
+
None: "none",
|
|
39
|
+
Before: "before",
|
|
40
|
+
After: "after",
|
|
41
|
+
Inside: "inside"
|
|
42
|
+
};
|
|
43
|
+
const getPositionStyles = ({
|
|
44
|
+
dropIndicatorPosition,
|
|
45
|
+
vertical
|
|
46
|
+
}) => {
|
|
47
|
+
if (vertical) {
|
|
48
|
+
return `
|
|
49
|
+
left: ${dropIndicatorPosition === DropIndicatorPosition.Before ? "0" : "unset"};
|
|
50
|
+
right: ${dropIndicatorPosition === DropIndicatorPosition.After ? "0" : "unset"};
|
|
51
|
+
`;
|
|
52
|
+
}
|
|
53
|
+
return `
|
|
54
|
+
top: ${dropIndicatorPosition === DropIndicatorPosition.Before ? "0" : "unset"};
|
|
55
|
+
bottom: ${dropIndicatorPosition === DropIndicatorPosition.After ? "0" : "unset"};
|
|
56
|
+
`;
|
|
57
|
+
};
|
|
58
|
+
const getCircleStyles = ({
|
|
59
|
+
dropIndicatorPosition,
|
|
60
|
+
vertical
|
|
61
|
+
}) => ({
|
|
62
|
+
position: "absolute",
|
|
63
|
+
zIndex: 1e3,
|
|
64
|
+
top: vertical || dropIndicatorPosition === DropIndicatorPosition.After ? "unset" : "-2px",
|
|
65
|
+
bottom: vertical || dropIndicatorPosition === DropIndicatorPosition.Before ? "unset" : "-2px",
|
|
66
|
+
left: !vertical || dropIndicatorPosition === DropIndicatorPosition.After ? "unset" : "-2px",
|
|
67
|
+
right: !vertical || dropIndicatorPosition === DropIndicatorPosition.Before ? "unset" : "-2px",
|
|
68
|
+
opacity: 1
|
|
69
|
+
});
|
|
70
|
+
const StyledIndicator = import_ds_legacy_system.styled.div`
|
|
71
|
+
position: absolute;
|
|
72
|
+
${getPositionStyles}
|
|
73
|
+
box-sizing: border-box;
|
|
74
|
+
width: ${(props) => props.vertical ? "2px" : "100%"};
|
|
75
|
+
height: ${(props) => props.vertical ? "100%" : "2px"};
|
|
76
|
+
background-color: ${({ isDropValid, theme }) => isDropValid ? theme.colors.brand[600] : theme.colors.danger[900]};
|
|
77
|
+
z-index: ${1e3};
|
|
78
|
+
`;
|
|
79
|
+
const CircleIndicator = (style, isDropValid) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { height: "6", width: "6", style, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "3", cy: "3", r: "3", strokeWidth: "0", fill: isDropValid ? "#1E79C2" : "#C64252" }) });
|
|
80
|
+
const DropIndicator = (props) => {
|
|
81
|
+
const { vertical, dropIndicatorPosition, isLast, isDropValid } = props;
|
|
82
|
+
if (dropIndicatorPosition === false || dropIndicatorPosition === DropIndicatorPosition.None || dropIndicatorPosition === DropIndicatorPosition.Inside)
|
|
83
|
+
return null;
|
|
84
|
+
const safeDropIndicatorPosition = isLast ? DropIndicatorPosition.Before : dropIndicatorPosition;
|
|
85
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
86
|
+
CircleIndicator(getCircleStyles({ ...props, dropIndicatorPosition: safeDropIndicatorPosition }), isDropValid),
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
+
StyledIndicator,
|
|
89
|
+
{
|
|
90
|
+
vertical,
|
|
91
|
+
dropIndicatorPosition: safeDropIndicatorPosition,
|
|
92
|
+
isDropValid
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
] });
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=DropIndicator.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/exported-related/DropIndicator.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { styled } from '@elliemae/ds-legacy-system';\n\ntype DropIndicatorPositionT = (typeof DropIndicatorPosition)[keyof typeof DropIndicatorPosition] | false;\ninterface DropIndicatorPropsT {\n vertical: boolean;\n dropIndicatorPosition: DropIndicatorPositionT;\n isLast: boolean;\n isDropValid: boolean;\n}\n\nconst DropIndicatorPosition = {\n None: 'none',\n Before: 'before',\n After: 'after',\n Inside: 'inside',\n};\n\nconst getPositionStyles = ({\n dropIndicatorPosition,\n vertical,\n}: {\n dropIndicatorPosition: (typeof DropIndicatorPosition)[keyof typeof DropIndicatorPosition];\n vertical: boolean;\n}) => {\n if (vertical) {\n return `\n left: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};\n right: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};\n `;\n }\n return `\n top: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};\n bottom: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};\n `;\n};\n\nconst getCircleStyles = ({\n dropIndicatorPosition,\n vertical,\n}: {\n dropIndicatorPosition: (typeof DropIndicatorPosition)[keyof typeof DropIndicatorPosition];\n vertical: boolean;\n}) => ({\n position: 'absolute',\n zIndex: 1000,\n top: vertical || dropIndicatorPosition === DropIndicatorPosition.After ? 'unset' : '-2px',\n bottom: vertical || dropIndicatorPosition === DropIndicatorPosition.Before ? 'unset' : '-2px',\n left: !vertical || dropIndicatorPosition === DropIndicatorPosition.After ? 'unset' : '-2px',\n right: !vertical || dropIndicatorPosition === DropIndicatorPosition.Before ? 'unset' : '-2px',\n opacity: 1,\n});\n\nconst StyledIndicator = styled.div<{ isDropValid: boolean; vertical: boolean; dropIndicatorPosition: string }>`\n position: absolute;\n ${getPositionStyles}\n box-sizing: border-box;\n width: ${(props) => (props.vertical ? '2px' : '100%')};\n height: ${(props) => (props.vertical ? '100%' : '2px')};\n background-color: ${({ isDropValid, theme }) => (isDropValid ? theme.colors.brand[600] : theme.colors.danger[900])};\n z-index: ${1000};\n`;\n\nconst CircleIndicator = (style: Record<string, unknown>, isDropValid: boolean) => (\n <svg height=\"6\" width=\"6\" style={style}>\n <circle cx=\"3\" cy=\"3\" r=\"3\" strokeWidth=\"0\" fill={isDropValid ? '#1E79C2' : '#C64252'} />\n </svg>\n);\n\nexport const DropIndicator = (props: DropIndicatorPropsT) => {\n const { vertical, dropIndicatorPosition, isLast, isDropValid } = props;\n if (\n dropIndicatorPosition === false ||\n dropIndicatorPosition === DropIndicatorPosition.None ||\n dropIndicatorPosition === DropIndicatorPosition.Inside\n )\n return null;\n\n const safeDropIndicatorPosition = isLast ? DropIndicatorPosition.Before : dropIndicatorPosition;\n\n return (\n <>\n {CircleIndicator(getCircleStyles({ ...props, dropIndicatorPosition: safeDropIndicatorPosition }), isDropValid)}\n <StyledIndicator\n vertical={vertical}\n dropIndicatorPosition={safeDropIndicatorPosition}\n isDropValid={isDropValid}\n />\n </>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgEnB;AAhEJ,8BAAuB;AAUvB,MAAM,wBAAwB;AAAA,EAC5B,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AACV;AAEA,MAAM,oBAAoB,CAAC;AAAA,EACzB;AAAA,EACA;AACF,MAGM;AACJ,MAAI,UAAU;AACZ,WAAO;AAAA,cACG,0BAA0B,sBAAsB,SAAS,MAAM;AAAA,eAC9D,0BAA0B,sBAAsB,QAAQ,MAAM;AAAA;AAAA,EAE3E;AACA,SAAO;AAAA,aACI,0BAA0B,sBAAsB,SAAS,MAAM;AAAA,gBAC5D,0BAA0B,sBAAsB,QAAQ,MAAM;AAAA;AAE9E;AAEA,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA;AACF,OAGO;AAAA,EACL,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,KAAK,YAAY,0BAA0B,sBAAsB,QAAQ,UAAU;AAAA,EACnF,QAAQ,YAAY,0BAA0B,sBAAsB,SAAS,UAAU;AAAA,EACvF,MAAM,CAAC,YAAY,0BAA0B,sBAAsB,QAAQ,UAAU;AAAA,EACrF,OAAO,CAAC,YAAY,0BAA0B,sBAAsB,SAAS,UAAU;AAAA,EACvF,SAAS;AACX;AAEA,MAAM,kBAAkB,+BAAO;AAAA;AAAA,IAE3B;AAAA;AAAA,WAEO,CAAC,UAAW,MAAM,WAAW,QAAQ;AAAA,YACpC,CAAC,UAAW,MAAM,WAAW,SAAS;AAAA,sBAC5B,CAAC,EAAE,aAAa,MAAM,MAAO,cAAc,MAAM,OAAO,MAAM,GAAG,IAAI,MAAM,OAAO,OAAO,GAAG;AAAA,aACrG;AAAA;AAGb,MAAM,kBAAkB,CAAC,OAAgC,gBACvD,4CAAC,SAAI,QAAO,KAAI,OAAM,KAAI,OACxB,sDAAC,YAAO,IAAG,KAAI,IAAG,KAAI,GAAE,KAAI,aAAY,KAAI,MAAM,cAAc,YAAY,WAAW,GACzF;AAGK,MAAM,gBAAgB,CAAC,UAA+B;AAC3D,QAAM,EAAE,UAAU,uBAAuB,QAAQ,YAAY,IAAI;AACjE,MACE,0BAA0B,SAC1B,0BAA0B,sBAAsB,QAChD,0BAA0B,sBAAsB;AAEhD,WAAO;AAET,QAAM,4BAA4B,SAAS,sBAAsB,SAAS;AAE1E,SACE,4EACG;AAAA,oBAAgB,gBAAgB,EAAE,GAAG,OAAO,uBAAuB,0BAA0B,CAAC,GAAG,WAAW;AAAA,IAC7G;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,uBAAuB;AAAA,QACvB;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var SortableContainerContext_exports = {};
|
|
30
|
+
__export(SortableContainerContext_exports, {
|
|
31
|
+
createContainerContext: () => createContainerContext,
|
|
32
|
+
default: () => SortableContainerContext_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(SortableContainerContext_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_react = require("react");
|
|
37
|
+
function createContainerContext() {
|
|
38
|
+
return (0, import_react.createContext)({
|
|
39
|
+
sortableContextProps: {},
|
|
40
|
+
items: {}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const ContainersContext = createContainerContext();
|
|
44
|
+
var SortableContainerContext_default = ContainersContext;
|
|
45
|
+
//# sourceMappingURL=SortableContainerContext.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/exported-related/SortableContainerContext.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { createContext } from 'react';\nimport type { DnDKitTree } from '../tree/types.js';\nimport type { Item } from './DSDragAndDrop.js';\ninterface ContainerContextT<T> {\n isDropValid?: boolean;\n dropIndicatorPosition?: string;\n sortableContextProps: Record<string, DnDKitTree.SortableContextPropsType>;\n items: Record<string, Item<T>[]>;\n onCollapse?: (nodeId: number) => void;\n}\n\nexport function createContainerContext<T>() {\n return createContext<ContainerContextT<T>>({\n sortableContextProps: {},\n items: {},\n });\n}\nconst ContainersContext = createContainerContext();\n\nexport default ContainersContext;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA8B;AAWvB,SAAS,yBAA4B;AAC1C,aAAO,4BAAoC;AAAA,IACzC,sBAAsB,CAAC;AAAA,IACvB,OAAO,CAAC;AAAA,EACV,CAAC;AACH;AACA,MAAM,oBAAoB,uBAAuB;AAEjD,IAAO,mCAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var exported_related_exports = {};
|
|
30
|
+
__export(exported_related_exports, {
|
|
31
|
+
DSDragAndDrop: () => import_DSDragAndDrop.DSDragAndDrop,
|
|
32
|
+
DSSortableContainer: () => import_DSSortableContainer.DSSortableContainer,
|
|
33
|
+
DSSortableItem: () => import_DSSortableItem.DSSortableItem,
|
|
34
|
+
DropIndicator: () => import_DropIndicator.DropIndicator
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(exported_related_exports);
|
|
37
|
+
var React = __toESM(require("react"));
|
|
38
|
+
var import_DropIndicator = require("./DropIndicator.js");
|
|
39
|
+
var import_DSDragAndDrop = require("./DSDragAndDrop.js");
|
|
40
|
+
var import_DSSortableContainer = require("./DSSortableContainer.js");
|
|
41
|
+
var import_DSSortableItem = require("./DSSortableItem.js");
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/exported-related/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export { DropIndicator } from './DropIndicator.js';\nexport { DSDragAndDrop } from './DSDragAndDrop.js';\nexport { DSSortableContainer } from './DSSortableContainer.js';\nexport { DSSortableItem } from './DSSortableItem.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAA8B;AAC9B,2BAA8B;AAC9B,iCAAoC;AACpC,4BAA+B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var customCollisionDetection_exports = {};
|
|
30
|
+
__export(customCollisionDetection_exports, {
|
|
31
|
+
customCollisionDetection: () => customCollisionDetection
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(customCollisionDetection_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
const customCollisionDetection = (sensorContext) => ({ droppableContainers, collisionRect }) => {
|
|
36
|
+
const { flattenedItems, active, itemsDictionary } = sensorContext.current;
|
|
37
|
+
if (!active)
|
|
38
|
+
return [];
|
|
39
|
+
const activeParent = itemsDictionary[active.id].parentId;
|
|
40
|
+
const entriesWithSameParent = droppableContainers.filter(
|
|
41
|
+
({ id }) => flattenedItems.find((item) => item.uid === id)?.parentId === activeParent
|
|
42
|
+
);
|
|
43
|
+
const originalContainer = entriesWithSameParent.find(({ id }) => id === active.id);
|
|
44
|
+
const originalRect = originalContainer?.rect?.current;
|
|
45
|
+
if (!originalRect)
|
|
46
|
+
return [];
|
|
47
|
+
if (originalRect.left <= collisionRect.left && collisionRect.left <= originalRect.left + originalRect.width) {
|
|
48
|
+
return [{ id: originalContainer.id }];
|
|
49
|
+
}
|
|
50
|
+
const isLeft = collisionRect.left <= originalRect.left + collisionRect.width / 2 + 5;
|
|
51
|
+
let match = null;
|
|
52
|
+
const collisionPoint = collisionRect.left + collisionRect.width / 2;
|
|
53
|
+
entriesWithSameParent.forEach((entry) => {
|
|
54
|
+
const rect = entry.rect.current;
|
|
55
|
+
if (rect !== null) {
|
|
56
|
+
const offsetRight = rect.left + rect.width;
|
|
57
|
+
if (!match) {
|
|
58
|
+
match = entry;
|
|
59
|
+
} else if (match && match.rect.current && isLeft && Math.abs(collisionPoint - rect.left) <= Math.abs(collisionPoint - match.rect.current.left)) {
|
|
60
|
+
match = entry;
|
|
61
|
+
} else if (match && match.rect.current && !isLeft && Math.abs(collisionPoint - offsetRight) <= Math.abs(collisionPoint - match.rect.current.left - match.rect.current.width)) {
|
|
62
|
+
match = entry;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
const matchCastedForSomeReason = match;
|
|
67
|
+
return matchCastedForSomeReason === null ? [] : [{ id: matchCastedForSomeReason.id }];
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=customCollisionDetection.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hierarchy/customCollisionDetection.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable indent, complexity */\nimport { type CollisionDetection, type DroppableContainer } from '@dnd-kit/core';\nimport type { DnDKitHierarchy } from './types.js';\n\nexport const customCollisionDetection =\n <T,>(sensorContext: DnDKitHierarchy.SensorContext<T>): CollisionDetection =>\n ({ droppableContainers, collisionRect }) => {\n const { flattenedItems, active, itemsDictionary } = sensorContext.current;\n\n if (!active) return [];\n\n const activeParent = itemsDictionary[active.id].parentId;\n\n const entriesWithSameParent = droppableContainers.filter(\n ({ id }) => flattenedItems.find((item) => item.uid === id)?.parentId === activeParent,\n );\n\n const originalContainer = entriesWithSameParent.find(({ id }) => id === active.id);\n const originalRect = originalContainer?.rect?.current;\n\n if (!originalRect) return [];\n\n if (originalRect.left <= collisionRect.left && collisionRect.left <= originalRect.left + originalRect.width) {\n return [{ id: originalContainer.id }];\n }\n\n const isLeft = collisionRect.left <= originalRect.left + collisionRect.width / 2 + 5;\n\n let match: DroppableContainer | null = null;\n // If going to the left, search the closest offset left\n // Otherwise, get the closest offset right\n const collisionPoint = collisionRect.left + collisionRect.width / 2;\n entriesWithSameParent.forEach((entry) => {\n const rect = entry.rect.current;\n\n if (rect !== null) {\n const offsetRight = rect.left + rect.width;\n\n if (!match) {\n match = entry;\n } else if (\n match &&\n match.rect.current &&\n isLeft &&\n Math.abs(collisionPoint - rect.left) <= Math.abs(collisionPoint - match.rect.current.left)\n ) {\n match = entry;\n } else if (\n match &&\n match.rect.current &&\n !isLeft &&\n Math.abs(collisionPoint - offsetRight) <=\n Math.abs(collisionPoint - match.rect.current.left - match.rect.current.width)\n ) {\n match = entry;\n }\n }\n });\n // Typescript believes match is always null for some reason\n const matchCastedForSomeReason = match as DroppableContainer | null;\n return matchCastedForSomeReason === null ? [] : [{ id: matchCastedForSomeReason.id }];\n };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIhB,MAAM,2BACX,CAAK,kBACL,CAAC,EAAE,qBAAqB,cAAc,MAAM;AAC1C,QAAM,EAAE,gBAAgB,QAAQ,gBAAgB,IAAI,cAAc;AAElE,MAAI,CAAC;AAAQ,WAAO,CAAC;AAErB,QAAM,eAAe,gBAAgB,OAAO,EAAE,EAAE;AAEhD,QAAM,wBAAwB,oBAAoB;AAAA,IAChD,CAAC,EAAE,GAAG,MAAM,eAAe,KAAK,CAAC,SAAS,KAAK,QAAQ,EAAE,GAAG,aAAa;AAAA,EAC3E;AAEA,QAAM,oBAAoB,sBAAsB,KAAK,CAAC,EAAE,GAAG,MAAM,OAAO,OAAO,EAAE;AACjF,QAAM,eAAe,mBAAmB,MAAM;AAE9C,MAAI,CAAC;AAAc,WAAO,CAAC;AAE3B,MAAI,aAAa,QAAQ,cAAc,QAAQ,cAAc,QAAQ,aAAa,OAAO,aAAa,OAAO;AAC3G,WAAO,CAAC,EAAE,IAAI,kBAAkB,GAAG,CAAC;AAAA,EACtC;AAEA,QAAM,SAAS,cAAc,QAAQ,aAAa,OAAO,cAAc,QAAQ,IAAI;AAEnF,MAAI,QAAmC;AAGvC,QAAM,iBAAiB,cAAc,OAAO,cAAc,QAAQ;AAClE,wBAAsB,QAAQ,CAAC,UAAU;AACvC,UAAM,OAAO,MAAM,KAAK;AAExB,QAAI,SAAS,MAAM;AACjB,YAAM,cAAc,KAAK,OAAO,KAAK;AAErC,UAAI,CAAC,OAAO;AACV,gBAAQ;AAAA,MACV,WACE,SACA,MAAM,KAAK,WACX,UACA,KAAK,IAAI,iBAAiB,KAAK,IAAI,KAAK,KAAK,IAAI,iBAAiB,MAAM,KAAK,QAAQ,IAAI,GACzF;AACA,gBAAQ;AAAA,MACV,WACE,SACA,MAAM,KAAK,WACX,CAAC,UACD,KAAK,IAAI,iBAAiB,WAAW,KACnC,KAAK,IAAI,iBAAiB,MAAM,KAAK,QAAQ,OAAO,MAAM,KAAK,QAAQ,KAAK,GAC9E;AACA,gBAAQ;AAAA,MACV;AAAA,IACF;AAAA,EACF,CAAC;AAED,QAAM,2BAA2B;AACjC,SAAO,6BAA6B,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,yBAAyB,GAAG,CAAC;AACtF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|