@elliemae/ds-drag-and-drop 2.3.1 → 3.0.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/dist/cjs/hierarchy/customCollisionDetection.js +64 -0
- package/dist/cjs/hierarchy/customCollisionDetection.js.map +7 -0
- package/dist/cjs/hierarchy/getHierarchyKeyboardCoordinates.js +124 -0
- package/dist/cjs/hierarchy/getHierarchyKeyboardCoordinates.js.map +7 -0
- package/dist/cjs/hierarchy/index.js +28 -0
- package/dist/cjs/hierarchy/index.js.map +7 -0
- package/dist/cjs/hierarchy/types.js +27 -0
- package/dist/cjs/hierarchy/types.js.map +7 -0
- package/dist/cjs/hierarchy/useHierarchyActionHandlers.js +68 -0
- package/dist/cjs/hierarchy/useHierarchyActionHandlers.js.map +7 -0
- package/dist/cjs/hierarchy/useHierarchyAnnouncements.js +55 -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 +64 -0
- package/dist/cjs/hierarchy/useHierarchyPreviewHandlers.js.map +7 -0
- package/dist/cjs/index.js +29 -0
- package/dist/cjs/index.js.map +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 +109 -0
- package/dist/cjs/tree/customCollisionDetection.js.map +7 -0
- package/dist/cjs/tree/getTreeKeyboardCoordinates.js +137 -0
- package/dist/cjs/tree/getTreeKeyboardCoordinates.js.map +7 -0
- package/dist/cjs/tree/index.js +28 -0
- package/dist/cjs/tree/index.js.map +7 -0
- package/dist/cjs/tree/types.js +27 -0
- package/dist/cjs/tree/types.js.map +7 -0
- package/dist/cjs/tree/useTreeActionHandlers.js +86 -0
- package/dist/cjs/tree/useTreeActionHandlers.js.map +7 -0
- package/dist/cjs/tree/useTreeAnnouncements.js +68 -0
- package/dist/cjs/tree/useTreeAnnouncements.js.map +7 -0
- package/dist/cjs/tree/useTreeDndkitConfig.js +169 -0
- package/dist/cjs/tree/useTreeDndkitConfig.js.map +7 -0
- package/dist/cjs/tree/useTreePreviewHandlers.js +70 -0
- package/dist/cjs/tree/useTreePreviewHandlers.js.map +7 -0
- package/dist/cjs/tree/utilities.js +66 -0
- package/dist/cjs/tree/utilities.js.map +7 -0
- package/dist/esm/hierarchy/customCollisionDetection.js +35 -0
- package/dist/esm/hierarchy/customCollisionDetection.js.map +7 -0
- package/dist/esm/hierarchy/getHierarchyKeyboardCoordinates.js +97 -0
- package/dist/esm/hierarchy/getHierarchyKeyboardCoordinates.js.map +7 -0
- package/dist/esm/hierarchy/index.js +3 -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 +39 -0
- package/dist/esm/hierarchy/useHierarchyActionHandlers.js.map +7 -0
- package/dist/esm/hierarchy/useHierarchyAnnouncements.js +26 -0
- package/dist/esm/hierarchy/useHierarchyAnnouncements.js.map +7 -0
- package/dist/esm/hierarchy/useHierarchyDndkitConfig.js +105 -0
- package/dist/esm/hierarchy/useHierarchyDndkitConfig.js.map +7 -0
- package/{esm → dist/esm}/hierarchy/useHierarchyPreviewHandlers.js +15 -19
- package/dist/esm/hierarchy/useHierarchyPreviewHandlers.js.map +7 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/tree/constants.js +12 -0
- package/dist/esm/tree/constants.js.map +7 -0
- package/dist/esm/tree/customCollisionDetection.js +80 -0
- package/dist/esm/tree/customCollisionDetection.js.map +7 -0
- package/dist/esm/tree/getTreeKeyboardCoordinates.js +110 -0
- package/dist/esm/tree/getTreeKeyboardCoordinates.js.map +7 -0
- package/dist/esm/tree/index.js +3 -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/useTreeActionHandlers.js +57 -0
- package/dist/esm/tree/useTreeActionHandlers.js.map +7 -0
- package/dist/esm/tree/useTreeAnnouncements.js +39 -0
- package/dist/esm/tree/useTreeAnnouncements.js.map +7 -0
- package/dist/esm/tree/useTreeDndkitConfig.js +148 -0
- package/dist/esm/tree/useTreeDndkitConfig.js.map +7 -0
- package/dist/esm/tree/useTreePreviewHandlers.js +41 -0
- package/dist/esm/tree/useTreePreviewHandlers.js.map +7 -0
- package/{esm → dist/esm}/tree/utilities.js +13 -23
- package/dist/esm/tree/utilities.js.map +7 -0
- package/package.json +66 -53
- package/cjs/hierarchy/customCollisionDetection.js +0 -70
- package/cjs/hierarchy/getHierarchyKeyboardCoordinates.js +0 -121
- package/cjs/hierarchy/index.js +0 -9
- package/cjs/hierarchy/types.js +0 -2
- package/cjs/hierarchy/useHierarchyActionHandlers.js +0 -50
- package/cjs/hierarchy/useHierarchyAnnouncements.js +0 -36
- package/cjs/hierarchy/useHierarchyDndkitConfig.js +0 -119
- package/cjs/hierarchy/useHierarchyPreviewHandlers.js +0 -43
- package/cjs/index.js +0 -11
- package/cjs/tree/constants.js +0 -12
- package/cjs/tree/customCollisionDetection.js +0 -141
- package/cjs/tree/getTreeKeyboardCoordinates.js +0 -138
- package/cjs/tree/index.js +0 -9
- package/cjs/tree/types.js +0 -2
- package/cjs/tree/useTreeActionHandlers.js +0 -74
- package/cjs/tree/useTreeAnnouncements.js +0 -55
- package/cjs/tree/useTreeDndkitConfig.js +0 -152
- package/cjs/tree/useTreePreviewHandlers.js +0 -54
- package/cjs/tree/utilities.js +0 -52
- package/esm/hierarchy/customCollisionDetection.js +0 -66
- package/esm/hierarchy/getHierarchyKeyboardCoordinates.js +0 -113
- package/esm/hierarchy/index.js +0 -1
- package/esm/hierarchy/types.js +0 -1
- package/esm/hierarchy/useHierarchyActionHandlers.js +0 -46
- package/esm/hierarchy/useHierarchyAnnouncements.js +0 -32
- package/esm/hierarchy/useHierarchyDndkitConfig.js +0 -111
- package/esm/index.js +0 -2
- package/esm/tree/constants.js +0 -10
- package/esm/tree/customCollisionDetection.js +0 -137
- package/esm/tree/getTreeKeyboardCoordinates.js +0 -130
- package/esm/tree/index.js +0 -1
- package/esm/tree/types.js +0 -1
- package/esm/tree/useTreeActionHandlers.js +0 -70
- package/esm/tree/useTreeAnnouncements.js +0 -51
- package/esm/tree/useTreeDndkitConfig.js +0 -144
- package/esm/tree/useTreePreviewHandlers.js +0 -50
- package/types/hierarchy/customCollisionDetection.d.ts +0 -3
- package/types/hierarchy/getHierarchyKeyboardCoordinates.d.ts +0 -3
- package/types/hierarchy/index.d.ts +0 -1
- package/types/hierarchy/types.d.ts +0 -80
- package/types/hierarchy/useHierarchyActionHandlers.d.ts +0 -1
- package/types/hierarchy/useHierarchyAnnouncements.d.ts +0 -3
- package/types/hierarchy/useHierarchyDndkitConfig.d.ts +0 -2
- package/types/hierarchy/useHierarchyPreviewHandlers.d.ts +0 -2
- package/types/index.d.ts +0 -2
- package/types/tree/constants.d.ts +0 -6
- package/types/tree/customCollisionDetection.d.ts +0 -4
- package/types/tree/getTreeKeyboardCoordinates.d.ts +0 -3
- package/types/tree/index.d.ts +0 -1
- package/types/tree/types.d.ts +0 -102
- package/types/tree/useTreeActionHandlers.d.ts +0 -2
- package/types/tree/useTreeAnnouncements.d.ts +0 -4
- package/types/tree/useTreeDndkitConfig.d.ts +0 -2
- package/types/tree/useTreePreviewHandlers.d.ts +0 -2
- package/types/tree/utilities.d.ts +0 -7
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var customCollisionDetection_exports = {};
|
|
29
|
+
__export(customCollisionDetection_exports, {
|
|
30
|
+
customCollisionDetection: () => customCollisionDetection
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
const customCollisionDetection = (activeId, activeParent, dndItems) => ({ droppableContainers, collisionRect }) => {
|
|
34
|
+
const entriesWithSameParent = droppableContainers.filter(({ id }) => dndItems.find((item) => item.id === id)?.parentId === activeParent);
|
|
35
|
+
const originalContainer = entriesWithSameParent.find(({ id }) => id === activeId);
|
|
36
|
+
const originalRect = originalContainer?.rect?.current;
|
|
37
|
+
if (!originalRect)
|
|
38
|
+
return null;
|
|
39
|
+
if (originalRect.offsetLeft <= collisionRect.offsetLeft && collisionRect.offsetLeft <= originalRect.offsetLeft + originalRect.width) {
|
|
40
|
+
return originalContainer.id;
|
|
41
|
+
}
|
|
42
|
+
const isLeft = collisionRect.offsetLeft <= originalRect.offsetLeft + collisionRect.width / 2 + 5;
|
|
43
|
+
let match = null;
|
|
44
|
+
const collisionPoint = collisionRect.offsetLeft + collisionRect.width / 2;
|
|
45
|
+
entriesWithSameParent.forEach((entry) => {
|
|
46
|
+
const {
|
|
47
|
+
rect: { current: rect }
|
|
48
|
+
} = entry;
|
|
49
|
+
if (rect !== null) {
|
|
50
|
+
const offsetRight = rect.offsetLeft + rect.width;
|
|
51
|
+
if (!match) {
|
|
52
|
+
match = entry;
|
|
53
|
+
} else if (match && match.rect.current && isLeft && Math.abs(collisionPoint - rect.offsetLeft) <= Math.abs(collisionPoint - match.rect.current.offsetLeft)) {
|
|
54
|
+
match = entry;
|
|
55
|
+
} else if (match && match.rect.current && !isLeft && Math.abs(collisionPoint - offsetRight) <= Math.abs(collisionPoint - match.rect.current.offsetLeft - match.rect.current.width)) {
|
|
56
|
+
match = entry;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
const matchCastedForSomeReason = match;
|
|
61
|
+
return matchCastedForSomeReason === null ? null : matchCastedForSomeReason.id;
|
|
62
|
+
};
|
|
63
|
+
module.exports = __toCommonJS(customCollisionDetection_exports);
|
|
64
|
+
//# 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": ["import { CollisionDetection, DroppableContainer } from '@dnd-kit/core';\nimport { Item } from './types';\n\nexport const customCollisionDetection =\n (activeId: string | null, activeParent: string | undefined, dndItems: Item[]): CollisionDetection =>\n ({ droppableContainers, collisionRect }) => {\n const entriesWithSameParent = droppableContainers.filter(\n ({ id }) => dndItems.find((item) => item.id === id)?.parentId === activeParent,\n );\n\n const originalContainer = entriesWithSameParent.find(({ id }) => id === activeId);\n const originalRect = originalContainer?.rect?.current;\n\n if (!originalRect) return null;\n\n if (\n originalRect.offsetLeft <= collisionRect.offsetLeft &&\n collisionRect.offsetLeft <= originalRect.offsetLeft + originalRect.width\n ) {\n return originalContainer.id;\n }\n\n const isLeft = collisionRect.offsetLeft <= originalRect.offsetLeft + 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.offsetLeft + collisionRect.width / 2;\n entriesWithSameParent.forEach((entry) => {\n const {\n rect: { current: rect },\n } = entry;\n\n if (rect !== null) {\n const offsetRight = rect.offsetLeft + 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.offsetLeft) <= Math.abs(collisionPoint - match.rect.current.offsetLeft)\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.offsetLeft - 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 ? null : matchCastedForSomeReason.id;\n };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGhB,MAAM,2BACX,CAAC,UAAyB,cAAkC,aAC5D,CAAC,EAAE,qBAAqB,oBAAoB;AAC1C,QAAM,wBAAwB,oBAAoB,OAChD,CAAC,EAAE,SAAS,SAAS,KAAK,CAAC,SAAS,KAAK,OAAO,KAAK,aAAa;AAGpE,QAAM,oBAAoB,sBAAsB,KAAK,CAAC,EAAE,SAAS,OAAO;AACxE,QAAM,eAAe,mBAAmB,MAAM;AAE9C,MAAI,CAAC;AAAc,WAAO;AAE1B,MACE,aAAa,cAAc,cAAc,cACzC,cAAc,cAAc,aAAa,aAAa,aAAa,OACnE;AACA,WAAO,kBAAkB;AAAA;AAG3B,QAAM,SAAS,cAAc,cAAc,aAAa,aAAa,cAAc,QAAQ,IAAI;AAE/F,MAAI,QAAmC;AAGvC,QAAM,iBAAiB,cAAc,aAAa,cAAc,QAAQ;AACxE,wBAAsB,QAAQ,CAAC,UAAU;AACvC,UAAM;AAAA,MACJ,MAAM,EAAE,SAAS;AAAA,QACf;AAEJ,QAAI,SAAS,MAAM;AACjB,YAAM,cAAc,KAAK,aAAa,KAAK;AAE3C,UAAI,CAAC,OAAO;AACV,gBAAQ;AAAA,iBAER,SACA,MAAM,KAAK,WACX,UACA,KAAK,IAAI,iBAAiB,KAAK,eAAe,KAAK,IAAI,iBAAiB,MAAM,KAAK,QAAQ,aAC3F;AACA,gBAAQ;AAAA,iBAER,SACA,MAAM,KAAK,WACX,CAAC,UACD,KAAK,IAAI,iBAAiB,gBACxB,KAAK,IAAI,iBAAiB,MAAM,KAAK,QAAQ,aAAa,MAAM,KAAK,QAAQ,QAC/E;AACA,gBAAQ;AAAA;AAAA;AAAA;AAKd,QAAM,2BAA2B;AACjC,SAAO,6BAA6B,OAAO,OAAO,yBAAyB;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
|
+
var __export = (target, all) => {
|
|
26
|
+
for (var name in all)
|
|
27
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
|
+
};
|
|
29
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
30
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
31
|
+
for (let key of __getOwnPropNames(module2))
|
|
32
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
33
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __toESM = (module2, isNodeMode) => {
|
|
38
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
39
|
+
};
|
|
40
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
41
|
+
return (module2, temp) => {
|
|
42
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
43
|
+
};
|
|
44
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
45
|
+
var getHierarchyKeyboardCoordinates_exports = {};
|
|
46
|
+
__export(getHierarchyKeyboardCoordinates_exports, {
|
|
47
|
+
getHierarchyKeyboardCoordinates: () => getHierarchyKeyboardCoordinates
|
|
48
|
+
});
|
|
49
|
+
var React = __toESM(require("react"));
|
|
50
|
+
var import_core = require("@dnd-kit/core");
|
|
51
|
+
const directions = [import_core.KeyboardCode.Down, import_core.KeyboardCode.Right, import_core.KeyboardCode.Up, import_core.KeyboardCode.Left];
|
|
52
|
+
const vertical = [import_core.KeyboardCode.Up, import_core.KeyboardCode.Down];
|
|
53
|
+
const getHorizontalKeyboardCoordinates = ({
|
|
54
|
+
items,
|
|
55
|
+
active,
|
|
56
|
+
over,
|
|
57
|
+
event,
|
|
58
|
+
currentCoordinates,
|
|
59
|
+
droppableContainers,
|
|
60
|
+
collisionRect
|
|
61
|
+
}) => {
|
|
62
|
+
if (vertical.includes(event.code) || !active || !over)
|
|
63
|
+
return void 0;
|
|
64
|
+
const activeItem = items.find((item) => item.id === active.id);
|
|
65
|
+
const overRect = over.rect;
|
|
66
|
+
const layoutRects = [];
|
|
67
|
+
droppableContainers.forEach((container) => {
|
|
68
|
+
if (container?.disabled || !overRect) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const node = container?.node.current;
|
|
72
|
+
if (!node) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const itemParent = items.find((item) => item.id === container.id)?.parentId;
|
|
76
|
+
if (itemParent !== activeItem?.parentId)
|
|
77
|
+
return;
|
|
78
|
+
const rect = (0, import_core.getViewRect)(node);
|
|
79
|
+
if (event.code === import_core.KeyboardCode.Left && collisionRect.left > rect.right - 10) {
|
|
80
|
+
layoutRects.push(container);
|
|
81
|
+
} else if (event.code === import_core.KeyboardCode.Right && collisionRect.left < rect.left) {
|
|
82
|
+
layoutRects.push(container);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
const closestId = (0, import_core.closestCorners)({ droppableContainers: layoutRects, collisionRect, active });
|
|
86
|
+
if (!closestId)
|
|
87
|
+
return void 0;
|
|
88
|
+
const closestDroppableContainer = droppableContainers.get(closestId)?.node?.current;
|
|
89
|
+
const activeDroppableContainer = droppableContainers.get(active?.id)?.node?.current;
|
|
90
|
+
if (!closestDroppableContainer || !activeDroppableContainer)
|
|
91
|
+
return void 0;
|
|
92
|
+
const closestRect = (0, import_core.getViewRect)(closestDroppableContainer);
|
|
93
|
+
const activeRect = (0, import_core.getViewRect)(activeDroppableContainer);
|
|
94
|
+
return __spreadProps(__spreadValues({}, currentCoordinates), {
|
|
95
|
+
x: closestRect.left + (closestRect.width - collisionRect.width) / 2 + (closestRect.offsetLeft < activeRect.left ? -1 : 1)
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
const getHierarchyKeyboardCoordinates = (context, dragOverlayDataTestid, isHorizontalDnD) => (event, { currentCoordinates, context: { active, over, collisionRect, droppableContainers } }) => {
|
|
99
|
+
if (directions.includes(event.code)) {
|
|
100
|
+
event.preventDefault();
|
|
101
|
+
if (!collisionRect) {
|
|
102
|
+
return void 0;
|
|
103
|
+
}
|
|
104
|
+
const {
|
|
105
|
+
current: { items }
|
|
106
|
+
} = context;
|
|
107
|
+
const args = {
|
|
108
|
+
dragOverlayDataTestid,
|
|
109
|
+
items,
|
|
110
|
+
active,
|
|
111
|
+
over,
|
|
112
|
+
event,
|
|
113
|
+
currentCoordinates,
|
|
114
|
+
droppableContainers,
|
|
115
|
+
collisionRect
|
|
116
|
+
};
|
|
117
|
+
if (isHorizontalDnD)
|
|
118
|
+
return getHorizontalKeyboardCoordinates(args);
|
|
119
|
+
return void 0;
|
|
120
|
+
}
|
|
121
|
+
return void 0;
|
|
122
|
+
};
|
|
123
|
+
module.exports = __toCommonJS(getHierarchyKeyboardCoordinates_exports);
|
|
124
|
+
//# sourceMappingURL=getHierarchyKeyboardCoordinates.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hierarchy/getHierarchyKeyboardCoordinates.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { closestCorners, getViewRect, KeyboardCode, KeyboardCoordinateGetter, DroppableContainer } from '@dnd-kit/core';\nimport { Coordinates } from '@dnd-kit/core/dist/types';\n\nimport { GetKeyboardCoordinatesArgs, SensorContext } from './types';\n\nconst directions: string[] = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];\n\nconst vertical: string[] = [KeyboardCode.Up, KeyboardCode.Down];\n\nconst getHorizontalKeyboardCoordinates = ({\n items,\n active,\n over,\n event,\n currentCoordinates,\n droppableContainers,\n collisionRect,\n}: GetKeyboardCoordinatesArgs): Coordinates | undefined => {\n if (vertical.includes(event.code) || !active || !over) return undefined;\n\n const activeItem = items.find((item) => item.id === active.id);\n\n const overRect = over.rect;\n\n const layoutRects: DroppableContainer[] = [];\n\n // Get the reacheable rects depending on the arrow key pressed\n droppableContainers.forEach((container) => {\n if (container?.disabled || !overRect) {\n return;\n }\n const node = container?.node.current;\n if (!node) {\n return;\n }\n const itemParent = items.find((item) => item.id === container.id)?.parentId;\n if (itemParent !== activeItem?.parentId) return;\n const rect = getViewRect(node);\n if (event.code === KeyboardCode.Left && collisionRect.left > rect.right - 10) {\n layoutRects.push(container);\n } else if (event.code === KeyboardCode.Right && collisionRect.left < rect.left) {\n layoutRects.push(container);\n }\n });\n\n const closestId = closestCorners({ droppableContainers: layoutRects, collisionRect, active });\n\n if (!closestId) return undefined;\n\n const closestDroppableContainer = droppableContainers.get(closestId)?.node?.current;\n const activeDroppableContainer = droppableContainers.get(active?.id)?.node?.current;\n\n if (!closestDroppableContainer || !activeDroppableContainer) return undefined;\n\n const closestRect = getViewRect(closestDroppableContainer);\n const activeRect = getViewRect(activeDroppableContainer);\n return {\n ...currentCoordinates,\n x:\n closestRect.left +\n (closestRect.width - collisionRect.width) / 2 +\n (closestRect.offsetLeft < activeRect.left ? -1 : 1),\n };\n};\n\nexport const getHierarchyKeyboardCoordinates: (\n context: SensorContext,\n dragOverlayDataTestid: string,\n isHorizontalDnD: boolean,\n) => KeyboardCoordinateGetter =\n (context, dragOverlayDataTestid, isHorizontalDnD) =>\n (event, { currentCoordinates, context: { active, over, collisionRect, droppableContainers } }) => {\n if (directions.includes(event.code)) {\n event.preventDefault();\n if (!collisionRect) {\n return undefined;\n }\n\n const {\n current: { items },\n } = context;\n\n const args = {\n dragOverlayDataTestid,\n items,\n active,\n over,\n event,\n currentCoordinates,\n droppableContainers,\n collisionRect,\n };\n\n if (isHorizontalDnD) return getHorizontalKeyboardCoordinates(args);\n return undefined;\n }\n return undefined;\n };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,kBAAwG;AAKxG,MAAM,aAAuB,CAAC,yBAAa,MAAM,yBAAa,OAAO,yBAAa,IAAI,yBAAa;AAEnG,MAAM,WAAqB,CAAC,yBAAa,IAAI,yBAAa;AAE1D,MAAM,mCAAmC,CAAC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACyD;AACzD,MAAI,SAAS,SAAS,MAAM,SAAS,CAAC,UAAU,CAAC;AAAM,WAAO;AAE9D,QAAM,aAAa,MAAM,KAAK,CAAC,SAAS,KAAK,OAAO,OAAO;AAE3D,QAAM,WAAW,KAAK;AAEtB,QAAM,cAAoC;AAG1C,sBAAoB,QAAQ,CAAC,cAAc;AACzC,QAAI,WAAW,YAAY,CAAC,UAAU;AACpC;AAAA;AAEF,UAAM,OAAO,WAAW,KAAK;AAC7B,QAAI,CAAC,MAAM;AACT;AAAA;AAEF,UAAM,aAAa,MAAM,KAAK,CAAC,SAAS,KAAK,OAAO,UAAU,KAAK;AACnE,QAAI,eAAe,YAAY;AAAU;AACzC,UAAM,OAAO,6BAAY;AACzB,QAAI,MAAM,SAAS,yBAAa,QAAQ,cAAc,OAAO,KAAK,QAAQ,IAAI;AAC5E,kBAAY,KAAK;AAAA,eACR,MAAM,SAAS,yBAAa,SAAS,cAAc,OAAO,KAAK,MAAM;AAC9E,kBAAY,KAAK;AAAA;AAAA;AAIrB,QAAM,YAAY,gCAAe,EAAE,qBAAqB,aAAa,eAAe;AAEpF,MAAI,CAAC;AAAW,WAAO;AAEvB,QAAM,4BAA4B,oBAAoB,IAAI,YAAY,MAAM;AAC5E,QAAM,2BAA2B,oBAAoB,IAAI,QAAQ,KAAK,MAAM;AAE5E,MAAI,CAAC,6BAA6B,CAAC;AAA0B,WAAO;AAEpE,QAAM,cAAc,6BAAY;AAChC,QAAM,aAAa,6BAAY;AAC/B,SAAO,iCACF,qBADE;AAAA,IAEL,GACE,YAAY,OACX,aAAY,QAAQ,cAAc,SAAS,IAC3C,aAAY,aAAa,WAAW,OAAO,KAAK;AAAA;AAAA;AAIhD,MAAM,kCAKX,CAAC,SAAS,uBAAuB,oBACjC,CAAC,OAAO,EAAE,oBAAoB,SAAS,EAAE,QAAQ,MAAM,eAAe,4BAA4B;AAChG,MAAI,WAAW,SAAS,MAAM,OAAO;AACnC,UAAM;AACN,QAAI,CAAC,eAAe;AAClB,aAAO;AAAA;AAGT,UAAM;AAAA,MACJ,SAAS,EAAE;AAAA,QACT;AAEJ,UAAM,OAAO;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAGF,QAAI;AAAiB,aAAO,iCAAiC;AAC7D,WAAO;AAAA;AAET,SAAO;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
9
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(module2))
|
|
11
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
12
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (module2, isNodeMode) => {
|
|
17
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
+
return (module2, temp) => {
|
|
21
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
+
};
|
|
23
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
24
|
+
var hierarchy_exports = {};
|
|
25
|
+
var React = __toESM(require("react"));
|
|
26
|
+
__reExport(hierarchy_exports, require("./useHierarchyDndkitConfig"));
|
|
27
|
+
module.exports = __toCommonJS(hierarchy_exports);
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hierarchy/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './useHierarchyDndkitConfig';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;ADAvB,8BAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
9
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(module2))
|
|
11
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
12
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (module2, isNodeMode) => {
|
|
17
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
+
return (module2, temp) => {
|
|
21
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
+
};
|
|
23
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
24
|
+
var types_exports = {};
|
|
25
|
+
var React = __toESM(require("react"));
|
|
26
|
+
module.exports = __toCommonJS(types_exports);
|
|
27
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hierarchy/types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import type {\n Active,\n Announcements,\n CollisionDetection,\n DragEndEvent,\n DragMoveEvent,\n DragOverEvent,\n DragStartEvent,\n MeasuringConfiguration,\n Modifier,\n Over,\n SensorDescriptor,\n SensorOptions,\n} from '@dnd-kit/core';\nimport { DroppableContainers } from '@dnd-kit/core/dist/store';\nimport { Coordinates, DragCancelEvent, ViewRect } from '@dnd-kit/core/dist/types';\nimport { MutableRefObject } from 'react';\n\nexport type Item = {\n id: string;\n depth: number;\n parentId: string;\n index: number;\n};\n\nexport type DndContextPropsType = {\n announcements: Announcements;\n modifiers: Modifier[];\n sensors: SensorDescriptor<SensorOptions>[];\n measuring: Partial<MeasuringConfiguration>;\n collisionDetection: CollisionDetection;\n onDragStart: (e: DragStartEvent) => void;\n onDragMove: (e: DragMoveEvent) => void;\n onDragOver: (e: DragOverEvent) => void;\n onDragEnd: (e: DragEndEvent) => void;\n onDragCancel: (e: DragCancelEvent) => void;\n};\n\nexport type useHierarchyPreviewHandlersReturn = {\n handlePreviewDragStart: (e: DragStartEvent) => void;\n handlePreviewDragMove: (e: DragMoveEvent) => void;\n handlePreviewDragEnd: (e: DragEndEvent) => void;\n handlePreviewDragCancel: (e: DragCancelEvent) => void;\n};\n\nexport type useHierarchyPreviewHandlersArgs = {\n setActiveId: React.Dispatch<React.SetStateAction<string>>;\n onPreviewResetState: () => void;\n onPreviewDragStart: () => void;\n};\n\nexport type useHierarchyActionHandlersArgs = useHierarchyPreviewHandlersReturn & {\n dndItems: Item[];\n onReorder: (movedItem: Item, indexes: { targetIndex: number; fromIndex: number }) => void;\n};\n\nexport type useHierarchyActionHandlersReturn = {\n onDragStart: (e: DragStartEvent) => void;\n onDragMove: (e: DragMoveEvent) => void;\n onDragOver: (e: DragOverEvent) => void;\n onDragEnd: (e: DragEndEvent) => void;\n onDragCancel: (e: DragCancelEvent) => void;\n};\n\nexport type useHierarchyDndkitConfigArgs = {\n indentationWidth?: number;\n dragOverlayDataTestid: string;\n flattenedItems: [Item, unknown][];\n isHorizontalDnD?: boolean;\n onReorder: (movedItem: Item, indexes: { targetIndex: number; fromIndex: number }) => void;\n onPreviewResetState: () => void;\n onPreviewDragStart: () => void;\n};\n\nexport type useHierarchyDndkitConfigType = (args: useHierarchyDndkitConfigArgs) => useHierarchyDndkitConfigReturn;\n\nexport type useHierarchyDndkitConfigReturn = {\n dndContextProps: DndContextPropsType;\n activeId: string | null;\n overId: string | null;\n activeIndex: number | undefined;\n};\n\nexport type GetKeyboardCoordinatesArgs = {\n items: Item[];\n active: Active | null;\n over: Over | null;\n event: KeyboardEvent;\n currentCoordinates: Coordinates;\n droppableContainers: DroppableContainers;\n collisionRect: ViewRect;\n dragOverlayDataTestid: string;\n};\n\nexport type SensorContext = MutableRefObject<{\n items: Item[];\n offset?: number;\n}>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var useHierarchyActionHandlers_exports = {};
|
|
29
|
+
__export(useHierarchyActionHandlers_exports, {
|
|
30
|
+
useHierarchyActionHandlers: () => useHierarchyActionHandlers
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_react = require("react");
|
|
34
|
+
const useHierarchyActionHandlers = ({
|
|
35
|
+
handlePreviewDragStart,
|
|
36
|
+
handlePreviewDragMove,
|
|
37
|
+
handlePreviewDragEnd,
|
|
38
|
+
handlePreviewDragCancel,
|
|
39
|
+
onReorder,
|
|
40
|
+
dndItems
|
|
41
|
+
}) => {
|
|
42
|
+
const onDragStart = (0, import_react.useCallback)((e) => {
|
|
43
|
+
handlePreviewDragStart(e);
|
|
44
|
+
}, [handlePreviewDragStart]);
|
|
45
|
+
const onDragMove = (0, import_react.useCallback)((e) => {
|
|
46
|
+
handlePreviewDragMove(e);
|
|
47
|
+
}, [handlePreviewDragMove]);
|
|
48
|
+
const onDragEnd = (0, import_react.useCallback)((e) => {
|
|
49
|
+
handlePreviewDragEnd(e);
|
|
50
|
+
const { active, over } = e;
|
|
51
|
+
if (!over)
|
|
52
|
+
return;
|
|
53
|
+
if (active.id !== over.id) {
|
|
54
|
+
const activeIndex = dndItems.findIndex((item) => item.id === active.id);
|
|
55
|
+
const overIndex = dndItems.findIndex((item) => item.id === over.id);
|
|
56
|
+
onReorder(dndItems[activeIndex], {
|
|
57
|
+
targetIndex: overIndex,
|
|
58
|
+
fromIndex: activeIndex
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}, [handlePreviewDragEnd, dndItems, onReorder]);
|
|
62
|
+
const onDragCancel = (0, import_react.useCallback)((e) => {
|
|
63
|
+
handlePreviewDragCancel(e);
|
|
64
|
+
}, [handlePreviewDragCancel]);
|
|
65
|
+
return { onDragStart, onDragMove, onDragEnd, onDragCancel };
|
|
66
|
+
};
|
|
67
|
+
module.exports = __toCommonJS(useHierarchyActionHandlers_exports);
|
|
68
|
+
//# sourceMappingURL=useHierarchyActionHandlers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hierarchy/useHierarchyActionHandlers.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useCallback } from 'react';\nimport { DragStartEvent, DragMoveEvent, DragEndEvent, DragCancelEvent } from '@dnd-kit/core';\nimport { UseHierarchyActionHandlersReturn, UseHierarchyActionHandlersArgs } from './types';\n\nexport const useHierarchyActionHandlers = ({\n handlePreviewDragStart,\n handlePreviewDragMove,\n handlePreviewDragEnd,\n handlePreviewDragCancel,\n onReorder,\n dndItems,\n}: UseHierarchyActionHandlersArgs): UseHierarchyActionHandlersReturn => {\n const onDragStart = useCallback(\n (e: DragStartEvent) => {\n handlePreviewDragStart(e);\n },\n [handlePreviewDragStart],\n );\n\n const onDragMove = useCallback(\n (e: DragMoveEvent) => {\n handlePreviewDragMove(e);\n },\n [handlePreviewDragMove],\n );\n\n const onDragEnd = useCallback(\n (e: DragEndEvent) => {\n handlePreviewDragEnd(e);\n const { active, over } = e;\n\n if (!over) return;\n\n if (active.id !== over.id) {\n const activeIndex = dndItems.findIndex((item) => item.id === active.id);\n const overIndex = dndItems.findIndex((item) => item.id === over.id);\n\n onReorder(dndItems[activeIndex], {\n targetIndex: overIndex,\n fromIndex: activeIndex,\n });\n }\n },\n [handlePreviewDragEnd, dndItems, onReorder],\n );\n\n const onDragCancel = useCallback(\n (e: DragCancelEvent) => {\n handlePreviewDragCancel(e);\n },\n [handlePreviewDragCancel],\n );\n\n return { onDragStart, onDragMove, onDragEnd, onDragCancel };\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA4B;AAIrB,MAAM,6BAA6B,CAAC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACsE;AACtE,QAAM,cAAc,8BAClB,CAAC,MAAsB;AACrB,2BAAuB;AAAA,KAEzB,CAAC;AAGH,QAAM,aAAa,8BACjB,CAAC,MAAqB;AACpB,0BAAsB;AAAA,KAExB,CAAC;AAGH,QAAM,YAAY,8BAChB,CAAC,MAAoB;AACnB,yBAAqB;AACrB,UAAM,EAAE,QAAQ,SAAS;AAEzB,QAAI,CAAC;AAAM;AAEX,QAAI,OAAO,OAAO,KAAK,IAAI;AACzB,YAAM,cAAc,SAAS,UAAU,CAAC,SAAS,KAAK,OAAO,OAAO;AACpE,YAAM,YAAY,SAAS,UAAU,CAAC,SAAS,KAAK,OAAO,KAAK;AAEhE,gBAAU,SAAS,cAAc;AAAA,QAC/B,aAAa;AAAA,QACb,WAAW;AAAA;AAAA;AAAA,KAIjB,CAAC,sBAAsB,UAAU;AAGnC,QAAM,eAAe,8BACnB,CAAC,MAAuB;AACtB,4BAAwB;AAAA,KAE1B,CAAC;AAGH,SAAO,EAAE,aAAa,YAAY,WAAW;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var useHierarchyAnnouncements_exports = {};
|
|
29
|
+
__export(useHierarchyAnnouncements_exports, {
|
|
30
|
+
useHierarchyAnnouncements: () => useHierarchyAnnouncements
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_react = require("react");
|
|
34
|
+
const useHierarchyAnnouncements = (visibleItemsDictionary) => {
|
|
35
|
+
const onDragStart = (0, import_react.useCallback)((id) => `Picked up draggable item from position ${visibleItemsDictionary[id].index + 1}.`, [visibleItemsDictionary]);
|
|
36
|
+
const onDragMove = (0, import_react.useCallback)((id, overId) => {
|
|
37
|
+
if (overId) {
|
|
38
|
+
const overIndex = visibleItemsDictionary[overId].index + 1;
|
|
39
|
+
return `Draggable item was moved to position ${overIndex}.`;
|
|
40
|
+
}
|
|
41
|
+
return `Draggable item is no longer over a droppable area.`;
|
|
42
|
+
}, [visibleItemsDictionary]);
|
|
43
|
+
const onDragOver = onDragMove;
|
|
44
|
+
const onDragEnd = (0, import_react.useCallback)((id, overId) => {
|
|
45
|
+
if (overId) {
|
|
46
|
+
const overIndex = visibleItemsDictionary[overId].index + 1;
|
|
47
|
+
return `Draggable item was dropped over position ${overIndex}.`;
|
|
48
|
+
}
|
|
49
|
+
return `Draggable item was dropped at it's original position.`;
|
|
50
|
+
}, [visibleItemsDictionary]);
|
|
51
|
+
const onDragCancel = (0, import_react.useCallback)((id) => `Dragging was cancelled. Draggable item from position ${visibleItemsDictionary[id].index + 1} was dropped at it's initial position.`, [visibleItemsDictionary]);
|
|
52
|
+
return { onDragStart, onDragOver, onDragMove, onDragEnd, onDragCancel };
|
|
53
|
+
};
|
|
54
|
+
module.exports = __toCommonJS(useHierarchyAnnouncements_exports);
|
|
55
|
+
//# sourceMappingURL=useHierarchyAnnouncements.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hierarchy/useHierarchyAnnouncements.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA4B;AAGrB,MAAM,4BAA4B,CAAC,2BAAgE;AACxG,QAAM,cAAc,8BAClB,CAAC,OAAe,0CAA0C,uBAAuB,IAAI,QAAQ,MAC7F,CAAC;AAGH,QAAM,aAAa,8BACjB,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,8BAChB,CAAC,IAAY,WAAmB;AAC9B,QAAI,QAAQ;AACV,YAAM,YAAY,uBAAuB,QAAQ,QAAQ;AACzD,aAAO,4CAA4C;AAAA;AAGrD,WAAO;AAAA,KAET,CAAC;AAGH,QAAM,eAAe,8BACnB,CAAC,OACC,wDACE,uBAAuB,IAAI,QAAQ,2CAEvC,CAAC;AAGH,SAAO,EAAE,aAAa,YAAY,YAAY,WAAW;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
|
+
var __export = (target, all) => {
|
|
26
|
+
for (var name in all)
|
|
27
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
|
+
};
|
|
29
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
30
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
31
|
+
for (let key of __getOwnPropNames(module2))
|
|
32
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
33
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __toESM = (module2, isNodeMode) => {
|
|
38
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
39
|
+
};
|
|
40
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
41
|
+
return (module2, temp) => {
|
|
42
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
43
|
+
};
|
|
44
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
45
|
+
var useHierarchyDndkitConfig_exports = {};
|
|
46
|
+
__export(useHierarchyDndkitConfig_exports, {
|
|
47
|
+
useHierarchyDndkitConfig: () => useHierarchyDndkitConfig
|
|
48
|
+
});
|
|
49
|
+
var React = __toESM(require("react"));
|
|
50
|
+
var import_react = require("react");
|
|
51
|
+
var import_core = require("@dnd-kit/core");
|
|
52
|
+
var import_useHierarchyActionHandlers = require("./useHierarchyActionHandlers");
|
|
53
|
+
var import_useHierarchyPreviewHandlers = require("./useHierarchyPreviewHandlers");
|
|
54
|
+
var import_getHierarchyKeyboardCoordinates = require("./getHierarchyKeyboardCoordinates");
|
|
55
|
+
var import_customCollisionDetection = require("./customCollisionDetection");
|
|
56
|
+
var import_useHierarchyAnnouncements = require("./useHierarchyAnnouncements");
|
|
57
|
+
const adjustTranslate = (isHorizontalDnD) => ({ transform }) => {
|
|
58
|
+
const newTransform = __spreadValues({}, transform);
|
|
59
|
+
if (isHorizontalDnD) {
|
|
60
|
+
newTransform.y = transform.y + 15;
|
|
61
|
+
} else {
|
|
62
|
+
newTransform.y = transform.y - 35;
|
|
63
|
+
}
|
|
64
|
+
return newTransform;
|
|
65
|
+
};
|
|
66
|
+
const measuring = {
|
|
67
|
+
droppable: {
|
|
68
|
+
strategy: import_core.MeasuringStrategy.Always
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const noop = () => null;
|
|
72
|
+
const useHierarchyDndkitConfig = ({
|
|
73
|
+
flattenedItems,
|
|
74
|
+
dragOverlayDataTestid,
|
|
75
|
+
isHorizontalDnD = false,
|
|
76
|
+
onReorder,
|
|
77
|
+
onPreviewResetState = noop,
|
|
78
|
+
onPreviewDragStart = noop
|
|
79
|
+
}) => {
|
|
80
|
+
const [activeId, setActiveId] = (0, import_react.useState)("");
|
|
81
|
+
const dndItems = (0, import_react.useMemo)(() => flattenedItems.map(([item]) => item), [flattenedItems]);
|
|
82
|
+
const itemsDictionary = (0, import_react.useMemo)(() => {
|
|
83
|
+
const dictionary = {};
|
|
84
|
+
dndItems.forEach((item) => {
|
|
85
|
+
dictionary[item.id] = item;
|
|
86
|
+
});
|
|
87
|
+
return dictionary;
|
|
88
|
+
}, [dndItems]);
|
|
89
|
+
const modifiers = (0, import_react.useMemo)(() => [adjustTranslate(isHorizontalDnD)], [isHorizontalDnD]);
|
|
90
|
+
const sensorContext = (0, import_react.useRef)({
|
|
91
|
+
items: dndItems
|
|
92
|
+
});
|
|
93
|
+
(0, import_react.useEffect)(() => {
|
|
94
|
+
sensorContext.current = {
|
|
95
|
+
items: dndItems
|
|
96
|
+
};
|
|
97
|
+
}, [dndItems]);
|
|
98
|
+
const coordinateGetter = (0, import_react.useMemo)(() => (0, import_getHierarchyKeyboardCoordinates.getHierarchyKeyboardCoordinates)(sensorContext, dragOverlayDataTestid, isHorizontalDnD), [isHorizontalDnD]);
|
|
99
|
+
const sensors = (0, import_core.useSensors)((0, import_core.useSensor)(import_core.PointerSensor), (0, import_core.useSensor)(import_core.KeyboardSensor, {
|
|
100
|
+
coordinateGetter
|
|
101
|
+
}));
|
|
102
|
+
const dragPreviewHandlers = (0, import_useHierarchyPreviewHandlers.useHierarchyPreviewHandlers)({
|
|
103
|
+
setActiveId,
|
|
104
|
+
onPreviewResetState,
|
|
105
|
+
onPreviewDragStart
|
|
106
|
+
});
|
|
107
|
+
const dragActionHandlers = (0, import_useHierarchyActionHandlers.useHierarchyActionHandlers)(__spreadProps(__spreadValues({}, dragPreviewHandlers), {
|
|
108
|
+
dndItems,
|
|
109
|
+
onReorder
|
|
110
|
+
}));
|
|
111
|
+
const announcements = (0, import_useHierarchyAnnouncements.useHierarchyAnnouncements)(itemsDictionary);
|
|
112
|
+
const dndContextProps = (0, import_react.useMemo)(() => __spreadValues({
|
|
113
|
+
announcements,
|
|
114
|
+
modifiers,
|
|
115
|
+
sensors,
|
|
116
|
+
measuring,
|
|
117
|
+
collisionDetection: (0, import_customCollisionDetection.customCollisionDetection)(activeId, itemsDictionary[activeId ?? ""]?.parentId, dndItems)
|
|
118
|
+
}, dragActionHandlers), [announcements, modifiers, sensors, activeId, itemsDictionary, dndItems, dragActionHandlers]);
|
|
119
|
+
return {
|
|
120
|
+
dndContextProps,
|
|
121
|
+
activeId,
|
|
122
|
+
activeIndex: activeId ? itemsDictionary[activeId]?.index : -1
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
module.exports = __toCommonJS(useHierarchyDndkitConfig_exports);
|
|
126
|
+
//# sourceMappingURL=useHierarchyDndkitConfig.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hierarchy/useHierarchyDndkitConfig.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAqD;AACrD,kBAQO;AACP,wCAA2C;AAC3C,yCAA4C;AAE5C,6CAAgD;AAChD,sCAAyC;AACzC,uCAA0C;AAI1C,MAAM,kBACJ,CAAC,oBACD,CAAC,EAAE,gBAAgB;AACjB,QAAM,eAAe,mBAChB;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,8BAAkB;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,2BAAS;AAEzC,QAAM,WAAW,0BAAQ,MAAM,eAAe,IAAI,CAAC,CAAC,UAAU,OAAO,CAAC;AAEtE,QAAM,kBAAkB,0BAAQ,MAAM;AACpC,UAAM,aAAmC;AACzC,aAAS,QAAQ,CAAC,SAAS;AACzB,iBAAW,KAAK,MAAM;AAAA;AAExB,WAAO;AAAA,KACN,CAAC;AAEJ,QAAM,YAAwB,0BAAQ,MAAM,CAAC,gBAAgB,mBAAmB,CAAC;AAEjF,QAAM,gBAA+B,yBAAO;AAAA,IAC1C,OAAO;AAAA;AAGT,8BAAU,MAAM;AACd,kBAAc,UAAU;AAAA,MACtB,OAAO;AAAA;AAAA,KAER,CAAC;AAEJ,QAAM,mBAAmB,0BACvB,MAAM,4EAAgC,eAAe,uBAAuB,kBAC5E,CAAC;AAGH,QAAM,UAAU,4BACd,2BAAU,4BACV,2BAAU,4BAAgB;AAAA,IACxB;AAAA;AAIJ,QAAM,sBAAsB,oEAA4B;AAAA,IACtD;AAAA,IACA;AAAA,IACA;AAAA;AAGF,QAAM,qBAAqB,kEAA2B,iCACjD,sBADiD;AAAA,IAEpD;AAAA,IACA;AAAA;AAGF,QAAM,gBAAgB,gEAA0B;AAEhD,QAAM,kBAAkB,0BACtB,MAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,oBAAoB,8DAAyB,UAAU,gBAAgB,YAAY,KAAK,UAAU;AAAA,KAC/F,qBAEL,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
|
+
}
|