@patternfly/react-drag-drop 6.0.0-alpha.9 → 6.0.0-prerelease.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/CHANGELOG.md +583 -0
  2. package/dist/cjs.tsbuildinfo +1 -1
  3. package/dist/esm/{next/components → components}/DragDrop/DragButton.d.ts +5 -1
  4. package/dist/esm/components/DragDrop/DragButton.d.ts.map +1 -0
  5. package/dist/esm/components/DragDrop/DragButton.js +13 -0
  6. package/dist/esm/components/DragDrop/DragButton.js.map +1 -0
  7. package/dist/esm/components/DragDrop/DragDropContainer.d.ts +41 -0
  8. package/dist/esm/components/DragDrop/DragDropContainer.d.ts.map +1 -0
  9. package/dist/esm/components/DragDrop/DragDropContainer.js +147 -0
  10. package/dist/esm/components/DragDrop/DragDropContainer.js.map +1 -0
  11. package/dist/esm/{next/components → components}/DragDrop/DragDropSort.d.ts +8 -14
  12. package/dist/esm/components/DragDrop/DragDropSort.d.ts.map +1 -0
  13. package/dist/esm/components/DragDrop/DragDropSort.js +22 -0
  14. package/dist/esm/components/DragDrop/DragDropSort.js.map +1 -0
  15. package/dist/esm/components/DragDrop/Draggable.d.ts.map +1 -0
  16. package/dist/esm/components/DragDrop/Draggable.js.map +1 -0
  17. package/dist/esm/components/DragDrop/DraggableDataListItem.d.ts.map +1 -0
  18. package/dist/esm/components/DragDrop/DraggableDataListItem.js.map +1 -0
  19. package/dist/esm/components/DragDrop/DraggableDualListSelectorListItem.d.ts.map +1 -0
  20. package/dist/esm/{next/components → components}/DragDrop/DraggableDualListSelectorListItem.js +1 -1
  21. package/dist/esm/components/DragDrop/DraggableDualListSelectorListItem.js.map +1 -0
  22. package/dist/esm/components/DragDrop/Droppable.d.ts +22 -0
  23. package/dist/esm/components/DragDrop/Droppable.d.ts.map +1 -0
  24. package/dist/esm/components/DragDrop/Droppable.js +28 -0
  25. package/dist/esm/components/DragDrop/Droppable.js.map +1 -0
  26. package/dist/esm/components/DragDrop/index.d.ts +4 -0
  27. package/dist/esm/components/DragDrop/index.d.ts.map +1 -0
  28. package/dist/esm/components/DragDrop/index.js +4 -0
  29. package/dist/esm/components/DragDrop/index.js.map +1 -0
  30. package/dist/esm/components/index.d.ts.map +1 -0
  31. package/dist/esm/components/index.js.map +1 -0
  32. package/dist/esm/index.d.ts +1 -1
  33. package/dist/esm/index.d.ts.map +1 -1
  34. package/dist/esm/index.js +1 -1
  35. package/dist/esm/index.js.map +1 -1
  36. package/dist/esm.tsbuildinfo +1 -1
  37. package/dist/js/{next/components → components}/DragDrop/DragButton.d.ts +5 -1
  38. package/dist/js/components/DragDrop/DragButton.d.ts.map +1 -0
  39. package/dist/js/{next/components → components}/DragDrop/DragButton.js +4 -5
  40. package/dist/js/components/DragDrop/DragButton.js.map +1 -0
  41. package/dist/js/components/DragDrop/DragDropContainer.d.ts +41 -0
  42. package/dist/js/components/DragDrop/DragDropContainer.d.ts.map +1 -0
  43. package/dist/js/components/DragDrop/DragDropContainer.js +151 -0
  44. package/dist/js/components/DragDrop/DragDropContainer.js.map +1 -0
  45. package/dist/js/{next/components → components}/DragDrop/DragDropSort.d.ts +8 -14
  46. package/dist/js/components/DragDrop/DragDropSort.d.ts.map +1 -0
  47. package/dist/js/components/DragDrop/DragDropSort.js +26 -0
  48. package/dist/js/components/DragDrop/DragDropSort.js.map +1 -0
  49. package/dist/js/components/DragDrop/Draggable.d.ts.map +1 -0
  50. package/dist/js/components/DragDrop/Draggable.js.map +1 -0
  51. package/dist/js/components/DragDrop/DraggableDataListItem.d.ts.map +1 -0
  52. package/dist/js/components/DragDrop/DraggableDataListItem.js.map +1 -0
  53. package/dist/js/components/DragDrop/DraggableDualListSelectorListItem.d.ts.map +1 -0
  54. package/dist/js/{next/components → components}/DragDrop/DraggableDualListSelectorListItem.js +2 -2
  55. package/dist/js/components/DragDrop/DraggableDualListSelectorListItem.js.map +1 -0
  56. package/dist/js/components/DragDrop/Droppable.d.ts +22 -0
  57. package/dist/js/components/DragDrop/Droppable.d.ts.map +1 -0
  58. package/dist/js/components/DragDrop/Droppable.js +32 -0
  59. package/dist/js/components/DragDrop/Droppable.js.map +1 -0
  60. package/dist/js/components/DragDrop/index.d.ts +4 -0
  61. package/dist/js/components/DragDrop/index.d.ts.map +1 -0
  62. package/dist/js/{next/components → components}/DragDrop/index.js +2 -0
  63. package/dist/js/components/DragDrop/index.js.map +1 -0
  64. package/dist/js/components/index.d.ts.map +1 -0
  65. package/dist/js/components/index.js.map +1 -0
  66. package/dist/js/index.d.ts +1 -1
  67. package/dist/js/index.d.ts.map +1 -1
  68. package/dist/js/index.js +1 -1
  69. package/dist/js/index.js.map +1 -1
  70. package/package.json +6 -11
  71. package/src/components/DragDrop/DragButton.tsx +39 -0
  72. package/src/components/DragDrop/DragDropContainer.tsx +305 -0
  73. package/src/components/DragDrop/DragDropSort.tsx +67 -0
  74. package/src/{next/components → components}/DragDrop/DraggableDualListSelectorListItem.tsx +1 -1
  75. package/src/components/DragDrop/Droppable.tsx +76 -0
  76. package/src/{next/components → components}/DragDrop/__tests__/DragDrop.test.tsx +5 -0
  77. package/src/components/DragDrop/__tests__/__snapshots__/DragDrop.test.tsx.snap +149 -0
  78. package/src/{next/components → components}/DragDrop/examples/DataListDraggable.tsx +1 -0
  79. package/src/{next/components → components}/DragDrop/examples/DragDrop.md +3 -4
  80. package/src/components/DragDrop/examples/DragDropContainerBasic.tsx +45 -0
  81. package/src/components/DragDrop/examples/DragDropContainerDataList.tsx +75 -0
  82. package/src/components/DragDrop/examples/DragDropContainerDualListSelector.tsx +191 -0
  83. package/src/{next/components → components}/DragDrop/examples/DragDropDemos.md +26 -3
  84. package/src/{next/components → components}/DragDrop/examples/DualListSelectorDraggable.tsx +8 -12
  85. package/src/components/DragDrop/index.ts +3 -0
  86. package/src/index.ts +1 -1
  87. package/dist/esm/next/components/DragDrop/DragButton.d.ts.map +0 -1
  88. package/dist/esm/next/components/DragDrop/DragButton.js +0 -14
  89. package/dist/esm/next/components/DragDrop/DragButton.js.map +0 -1
  90. package/dist/esm/next/components/DragDrop/DragDropSort.d.ts.map +0 -1
  91. package/dist/esm/next/components/DragDrop/DragDropSort.js +0 -70
  92. package/dist/esm/next/components/DragDrop/DragDropSort.js.map +0 -1
  93. package/dist/esm/next/components/DragDrop/Draggable.d.ts.map +0 -1
  94. package/dist/esm/next/components/DragDrop/Draggable.js.map +0 -1
  95. package/dist/esm/next/components/DragDrop/DraggableDataListItem.d.ts.map +0 -1
  96. package/dist/esm/next/components/DragDrop/DraggableDataListItem.js.map +0 -1
  97. package/dist/esm/next/components/DragDrop/DraggableDualListSelectorListItem.d.ts.map +0 -1
  98. package/dist/esm/next/components/DragDrop/DraggableDualListSelectorListItem.js.map +0 -1
  99. package/dist/esm/next/components/DragDrop/Droppable.d.ts +0 -16
  100. package/dist/esm/next/components/DragDrop/Droppable.d.ts.map +0 -1
  101. package/dist/esm/next/components/DragDrop/Droppable.js +0 -11
  102. package/dist/esm/next/components/DragDrop/Droppable.js.map +0 -1
  103. package/dist/esm/next/components/DragDrop/DroppableContext.d.ts +0 -6
  104. package/dist/esm/next/components/DragDrop/DroppableContext.d.ts.map +0 -1
  105. package/dist/esm/next/components/DragDrop/DroppableContext.js +0 -6
  106. package/dist/esm/next/components/DragDrop/DroppableContext.js.map +0 -1
  107. package/dist/esm/next/components/DragDrop/index.d.ts +0 -2
  108. package/dist/esm/next/components/DragDrop/index.d.ts.map +0 -1
  109. package/dist/esm/next/components/DragDrop/index.js +0 -2
  110. package/dist/esm/next/components/DragDrop/index.js.map +0 -1
  111. package/dist/esm/next/components/index.d.ts.map +0 -1
  112. package/dist/esm/next/components/index.js.map +0 -1
  113. package/dist/esm/next/index.d.ts +0 -2
  114. package/dist/esm/next/index.d.ts.map +0 -1
  115. package/dist/esm/next/index.js +0 -2
  116. package/dist/esm/next/index.js.map +0 -1
  117. package/dist/js/next/components/DragDrop/DragButton.d.ts.map +0 -1
  118. package/dist/js/next/components/DragDrop/DragButton.js.map +0 -1
  119. package/dist/js/next/components/DragDrop/DragDropSort.d.ts.map +0 -1
  120. package/dist/js/next/components/DragDrop/DragDropSort.js +0 -74
  121. package/dist/js/next/components/DragDrop/DragDropSort.js.map +0 -1
  122. package/dist/js/next/components/DragDrop/Draggable.d.ts.map +0 -1
  123. package/dist/js/next/components/DragDrop/Draggable.js.map +0 -1
  124. package/dist/js/next/components/DragDrop/DraggableDataListItem.d.ts.map +0 -1
  125. package/dist/js/next/components/DragDrop/DraggableDataListItem.js.map +0 -1
  126. package/dist/js/next/components/DragDrop/DraggableDualListSelectorListItem.d.ts.map +0 -1
  127. package/dist/js/next/components/DragDrop/DraggableDualListSelectorListItem.js.map +0 -1
  128. package/dist/js/next/components/DragDrop/Droppable.d.ts +0 -16
  129. package/dist/js/next/components/DragDrop/Droppable.d.ts.map +0 -1
  130. package/dist/js/next/components/DragDrop/Droppable.js +0 -15
  131. package/dist/js/next/components/DragDrop/Droppable.js.map +0 -1
  132. package/dist/js/next/components/DragDrop/DroppableContext.d.ts +0 -6
  133. package/dist/js/next/components/DragDrop/DroppableContext.d.ts.map +0 -1
  134. package/dist/js/next/components/DragDrop/DroppableContext.js +0 -10
  135. package/dist/js/next/components/DragDrop/DroppableContext.js.map +0 -1
  136. package/dist/js/next/components/DragDrop/index.d.ts +0 -2
  137. package/dist/js/next/components/DragDrop/index.d.ts.map +0 -1
  138. package/dist/js/next/components/DragDrop/index.js.map +0 -1
  139. package/dist/js/next/components/index.d.ts.map +0 -1
  140. package/dist/js/next/components/index.js.map +0 -1
  141. package/dist/js/next/index.d.ts +0 -2
  142. package/dist/js/next/index.d.ts.map +0 -1
  143. package/dist/js/next/index.js +0 -5
  144. package/dist/js/next/index.js.map +0 -1
  145. package/src/next/components/DragDrop/DragButton.tsx +0 -27
  146. package/src/next/components/DragDrop/DragDropSort.tsx +0 -182
  147. package/src/next/components/DragDrop/Droppable.tsx +0 -27
  148. package/src/next/components/DragDrop/DroppableContext.ts +0 -6
  149. package/src/next/components/DragDrop/__tests__/__snapshots__/DragDrop.test.tsx.snap +0 -59
  150. package/src/next/components/DragDrop/examples/BasicSortingWithDragButton.tsx +0 -20
  151. package/src/next/components/DragDrop/index.ts +0 -1
  152. package/src/next/index.ts +0 -1
  153. /package/dist/esm/{next/components → components}/DragDrop/Draggable.d.ts +0 -0
  154. /package/dist/esm/{next/components → components}/DragDrop/Draggable.js +0 -0
  155. /package/dist/esm/{next/components → components}/DragDrop/DraggableDataListItem.d.ts +0 -0
  156. /package/dist/esm/{next/components → components}/DragDrop/DraggableDataListItem.js +0 -0
  157. /package/dist/esm/{next/components → components}/DragDrop/DraggableDualListSelectorListItem.d.ts +0 -0
  158. /package/dist/esm/{next/components → components}/index.d.ts +0 -0
  159. /package/dist/esm/{next/components → components}/index.js +0 -0
  160. /package/dist/js/{next/components → components}/DragDrop/Draggable.d.ts +0 -0
  161. /package/dist/js/{next/components → components}/DragDrop/Draggable.js +0 -0
  162. /package/dist/js/{next/components → components}/DragDrop/DraggableDataListItem.d.ts +0 -0
  163. /package/dist/js/{next/components → components}/DragDrop/DraggableDataListItem.js +0 -0
  164. /package/dist/js/{next/components → components}/DragDrop/DraggableDualListSelectorListItem.d.ts +0 -0
  165. /package/dist/js/{next/components → components}/index.d.ts +0 -0
  166. /package/dist/js/{next/components → components}/index.js +0 -0
  167. /package/src/{next/components → components}/DragDrop/Draggable.tsx +0 -0
  168. /package/src/{next/components → components}/DragDrop/DraggableDataListItem.tsx +0 -0
  169. /package/src/{next/components → components}/DragDrop/examples/BasicSorting.tsx +0 -0
  170. /package/src/{next/components → components}/index.ts +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/next/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './components';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/next/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DragButton.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/DragButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC;IACzE,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAU/D,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DragButton.js","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/DragButton.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,2DAA+C;AAC/C,mHAA0F;AAC1F,2GAAiF;AACjF,0HAAyF;AAWlF,MAAM,UAAU,GAA6C,CAAC,EAAwC,EAAE,EAAE;QAA5C,EAAE,SAAS,OAA6B,EAAxB,KAAK,sBAArB,aAAuB,CAAF;IAAwB,OAAA,CAChH,8CACE,SAAS,EAAE,IAAA,kBAAG,EAAC,SAAS,EAAE,gBAAY,CAAC,MAAM,EAAE,gBAAY,CAAC,SAAS,CAAC,KAAK,CAAC,gBACjE,aAAa,IACpB,KAAK;QAET,8BAAM,SAAS,EAAE,IAAA,kBAAG,EAAC,mBAAgB,CAAC,yBAAyB,CAAC;YAC9D,oBAAC,4BAAgB,OAAG,CACf,CACA,CACV,CAAA;CAAA,CAAC;AAVW,QAAA,UAAU,cAUrB;AACF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DragDropSort.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/DragDropSort.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAIL,eAAe,EAKf,YAAY,EACZ,cAAc,EACf,MAAM,eAAe,CAAC;AAYvB,oBAAY,wBAAwB,GAAG,YAAY,CAAC;AACpD,oBAAY,0BAA0B,GAAG,cAAc,CAAC;AAExD,MAAM,WAAW,eAAe;IAC9B,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,+CAA+C;IAC/C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,mEAAmE;IACnE,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD;iFAC6E;IAC7E,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC9B,wCAAwC;IACxC,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,kDAAkD;IAClD,MAAM,EAAE,CAAC,KAAK,EAAE,wBAAwB,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClH,2DAA2D;IAC3D,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,0BAA0B,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE;;;;;SAKK;IACL,OAAO,CAAC,EAAE,SAAS,GAAG,mBAAmB,GAAG,UAAU,GAAG,sBAAsB,GAAG,iBAAiB,CAAC;CACrG;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAyHnE,CAAC"}
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DragDropSort = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- const react_styles_1 = require("@patternfly/react-styles");
7
- const core_1 = require("@dnd-kit/core");
8
- const sortable_1 = require("@dnd-kit/sortable");
9
- const Draggable_1 = require("./Draggable");
10
- const DraggableDataListItem_1 = require("./DraggableDataListItem");
11
- const DraggableDualListSelectorListItem_1 = require("./DraggableDualListSelectorListItem");
12
- const drag_drop_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/DragDrop/drag-drop"));
13
- const DragDropSort = (_a) => {
14
- var { items, onDrop = () => { }, onDrag = () => { }, variant = 'default', children } = _a, props = tslib_1.__rest(_a, ["items", "onDrop", "onDrag", "variant", "children"]);
15
- const [activeId, setActiveId] = React.useState(null);
16
- const itemIds = React.useMemo(() => (items ? Array.from(items, (item) => item.id) : []), [items]);
17
- const getItemById = (id) => items.find((item) => item.id === id);
18
- const sensors = (0, core_1.useSensors)((0, core_1.useSensor)(core_1.PointerSensor), (0, core_1.useSensor)(core_1.KeyboardSensor, {
19
- coordinateGetter: sortable_1.sortableKeyboardCoordinates
20
- }));
21
- const handleDragEnd = (event) => {
22
- const { active, over } = event;
23
- const oldIndex = itemIds.indexOf(active.id);
24
- const newIndex = itemIds.indexOf(over.id);
25
- const newItems = (0, sortable_1.arrayMove)(items, oldIndex, newIndex);
26
- onDrop(event, newItems, oldIndex, newIndex);
27
- setActiveId(null);
28
- };
29
- const handleDragStart = (event) => {
30
- setActiveId(event.active.id);
31
- onDrag(event, itemIds.indexOf(event.active.id));
32
- };
33
- const getDragOverlay = () => {
34
- if (!activeId) {
35
- return;
36
- }
37
- const item = getItemById(activeId);
38
- let content;
39
- switch (variant) {
40
- case 'DualListSelectorList':
41
- content = (React.createElement(DraggableDualListSelectorListItem_1.DraggableDualListSelectorListItem, Object.assign({ key: item.id, id: item.id }, item.props), item.content));
42
- break;
43
- case 'DataList':
44
- content = (React.createElement(DraggableDataListItem_1.DraggableDataListItem, Object.assign({ key: item.id, id: item.id }, item.props), item.content));
45
- break;
46
- default:
47
- content = (React.createElement(Draggable_1.Draggable, Object.assign({ useDragButton: variant === 'defaultWithHandle', key: item.id, id: item.id }, item.props), item.content));
48
- }
49
- return (React.createElement("div", { className: (0, react_styles_1.css)(drag_drop_1.default.draggable, drag_drop_1.default.modifiers.dragging), style: {
50
- '--pf-v5-c-draggable--m-dragging--BackgroundColor': 'var(--pf-v5-global--BackgroundColor--100)'
51
- } }, content));
52
- };
53
- const renderedChildren = (React.createElement(sortable_1.SortableContext, { items: itemIds, strategy: sortable_1.verticalListSortingStrategy, id: "droppable" },
54
- items.map((item) => {
55
- switch (variant) {
56
- case 'DualListSelectorList':
57
- return (React.createElement(DraggableDualListSelectorListItem_1.DraggableDualListSelectorListItem, Object.assign({ key: item.id, id: item.id }, item.props), item.content));
58
- case 'DataList':
59
- return (React.createElement(DraggableDataListItem_1.DraggableDataListItem, Object.assign({ key: item.id, id: item.id }, item.props), item.content));
60
- default:
61
- return (React.createElement(Draggable_1.Draggable, Object.assign({ useDragButton: variant === 'defaultWithHandle', key: item.id, id: item.id }, item.props), item.content));
62
- }
63
- }),
64
- React.createElement(core_1.DragOverlay, null, activeId && getDragOverlay())));
65
- return (React.createElement(core_1.DndContext, Object.assign({ sensors: sensors, collisionDetection: core_1.closestCenter, onDragEnd: handleDragEnd, onDragStart: handleDragStart }, props),
66
- children &&
67
- React.cloneElement(children, {
68
- children: renderedChildren
69
- }),
70
- !children && React.createElement("div", null, renderedChildren)));
71
- };
72
- exports.DragDropSort = DragDropSort;
73
- exports.DragDropSort.displayName = 'DragDropSort';
74
- //# sourceMappingURL=DragDropSort.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DragDropSort.js","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/DragDropSort.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,2DAA+C;AAC/C,wCAWuB;AACvB,gDAK2B;AAC3B,2CAAwC;AACxC,mEAAgE;AAChE,2FAAwF;AACxF,mHAAgF;AAoCzE,MAAM,YAAY,GAA+C,CAAC,EAOrD,EAAE,EAAE;QAPiD,EACvE,KA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AC3B,QAAQ,EAAE,gBAAgB;aAC3B,CAAC;QACH,CAAC,QAAQ,IAAI,iCAAM,gBAAgB,CAAO,CAChC,CACd,CAAC;AACJ,CAAC,CAAC;AAzHW,QAAA,YAAY,gBAyHvB;AACF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Draggable.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/Draggable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;IACrE,uCAAuC;IACvC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0EAA0E;IAC1E,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAsC7D,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Draggable.js","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/Draggable.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,gDAAgD;AAChD,kDAAyC;AACzC,2DAA+C;AAC/C,mHAAgF;AAChF,6CAA0C;AAanC,MAAM,SAAS,GAA4C,CAAC,EAMlD,EAAE,EAAE;QAN8C,EACjE,QAAQ,EACR,EAAE,EACF,SAAS,EACT,aAAa,GAAG,KAAK,OAEN,EADZ,KAAK,sBALyD,gDAMlE,CADS;IAER,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,IAAA,sBAAW,EAAC;QAC3F,EAAE;KACH,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG;QACZ,SAAS,EAAE,eAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC5C,UAAU;KACX,CAAC;IAEF,OAAO,aAAa,CAAC,CAAC,CAAC,CACrB,2CACE,SAAS,EAAE,IAAA,kBAAG,EAAC,UAAU,IAAI,mBAAM,CAAC,SAAS,EAAE,UAAU,IAAI,mBAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,EAClG,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,KAAK,IACR,KAAK;QAET,oBAAC,uBAAU,oBAAK,UAAU,EAAM,SAAS,EAAI;QAC5C,QAAQ,CACL,CACP,CAAC,CAAC,CAAC,CACF,2CACE,SAAS,EAAE,IAAA,kBAAG,EAAC,UAAU,IAAI,mBAAM,CAAC,SAAS,EAAE,UAAU,IAAI,mBAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,EAClG,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,KAAK,IACR,SAAS,EACT,UAAU,EACV,KAAK,GAER,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC;AAtCW,QAAA,SAAS,aAsCpB;AACF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DraggableDataListItem.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/DraggableDataListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,MAAM,WAAW,2BAA2B;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,0BAA2B,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IAChF,uCAAuC;IACvC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,iBAAiB,CAAC,0BAA0B,CAoCrF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DraggableDataListItem.js","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/DraggableDataListItem.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,gDAAgD;AAChD,kDAAyC;AACzC,2DAA+C;AAC/C,mHAAgF;AAChF,mHAAoF;AACpF,6CAA0C;AAC1C,uDAA0E;AAgBnE,MAAM,qBAAqB,GAAwD,CAAC,EAK9D,EAAE,EAAE;QAL0D,EACzF,QAAQ,EACR,EAAE,EACF,SAAS,OAEkB,EADxB,KAAK,sBAJiF,+BAK1F,CADS;IAER,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,IAAA,sBAAW,EAAC;QAC3F,EAAE;KACH,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG;QACZ,SAAS,EAAE,eAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC5C,UAAU;KACX,CAAC;IAEF,OAAO,CACL,0CACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,IAAA,kBAAG,EACZ,mBAAM,CAAC,YAAY,EACnB,UAAU,IAAI,mBAAU,CAAC,SAAS,EAClC,UAAU,IAAI,mBAAU,CAAC,SAAS,CAAC,QAAQ,EAC3C,SAAS,CACV,IACG,KAAK,IACT,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,KAAK;QAEZ,oBAAC,4BAAe;YACd,oBAAC,4BAAe;gBACd,oBAAC,uBAAU,kBAAC,SAAS,EAAE,IAAA,kBAAG,EAAC,mBAAM,CAAC,2BAA2B,CAAC,IAAM,UAAU,EAAM,SAAS,EAAI,CACjF;YACjB,QAAQ,CACO,CACf,CACN,CAAC;AACJ,CAAC,CAAC;AApCW,QAAA,qBAAqB,yBAoChC;AACF,6BAAqB,CAAC,WAAW,GAAG,uBAAuB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DraggableDualListSelectorListItem.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/DraggableDualListSelectorListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,MAAM,WAAW,sCAAuC,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IAC5F,uCAAuC;IACvC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0EAA0E;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2DAA2D;IAC3D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kDAAkD;IAClD,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,aAAa,EAAE,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtG,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IAC1C,uEAAuE;IACvE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,iCAAiC,EAAE,KAAK,CAAC,iBAAiB,CAAC,sCAAsC,CA6D7G,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DraggableDualListSelectorListItem.js","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/DraggableDualListSelectorListItem.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,gDAAgD;AAChD,kDAAyC;AACzC,2DAA+C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AoB,CAAC,EAC3C,SAAS,EAAE,CAAC,CAAsB,EAAE,EAAE;oBACpC,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;wBACrC,QAAQ,CAAC,aAA6B,CAAC,KAAK,EAAE,CAAC;wBAChD,CAAC,CAAC,cAAc,EAAE,CAAC;qBACpB;gBACH,CAAC,mBACc,UAAU,EACzB,OAAO,EAAE,CAAC,CAAmB,EAAE,EAAE;oBAC/B,gBAAgB,CAAC,EAAE,CAAC,CAAC;oBACrB,cAAc,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACxB,CAAC,EACD,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,CAAC;gBAEZ,8BAAM,SAAS,EAAE,IAAA,kBAAG,EAAC,4BAAM,CAAC,wBAAwB,CAAC;oBACnD,8BAAM,SAAS,EAAE,IAAA,kBAAG,EAAC,4BAAM,CAAC,wBAAwB,CAAC,IAAG,QAAQ,CAAQ,CACnE,CACF,CACH,CACH,CACN,CAAC;AACJ,CAAC,CAAC;AA7DW,QAAA,iCAAiC,qCA6D5C;AACF,yCAAiC,CAAC,WAAW,GAAG,mCAAmC,CAAC"}
@@ -1,16 +0,0 @@
1
- import * as React from 'react';
2
- interface DroppableProps extends React.HTMLProps<HTMLDivElement> {
3
- /** Content rendered inside DragDrop */
4
- children?: React.ReactNode;
5
- /** Class to add to outer div */
6
- className?: string;
7
- /** Name of zone that items can be dragged between. Should specify if there is more than one Droppable on the page. */
8
- zone?: string;
9
- /** Id to be passed back on drop events */
10
- droppableId?: string;
11
- /** Don't wrap the component in a div. Requires passing a single child. */
12
- hasNoWrapper?: boolean;
13
- }
14
- export declare const Droppable: React.FunctionComponent<DroppableProps>;
15
- export {};
16
- //# sourceMappingURL=Droppable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Droppable.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/Droppable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,UAAU,cAAe,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;IAC9D,uCAAuC;IACvC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sHAAsH;IACtH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAS7D,CAAC"}
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Droppable = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- const core_1 = require("@dnd-kit/core");
7
- const Droppable = (_a) => {
8
- var { children } = _a, props = tslib_1.__rest(_a, ["children"]);
9
- const { isOver, setNodeRef } = (0, core_1.useDroppable)({ id: 'droppable' });
10
- const style = { color: isOver ? 'green' : undefined };
11
- return (React.createElement("div", Object.assign({ ref: setNodeRef, style: style }, props), children));
12
- };
13
- exports.Droppable = Droppable;
14
- exports.Droppable.displayName = 'Droppable';
15
- //# sourceMappingURL=Droppable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Droppable.js","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/Droppable.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,wCAA6C;AAetC,MAAM,SAAS,GAA4C,CAAC,EAAsC,EAAE,EAAE;QAA1C,EAAE,QAAQ,OAA4B,EAAvB,KAAK,sBAApB,YAAsB,CAAF;IACrF,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,mBAAY,EAAC,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;IACjE,MAAM,KAAK,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAEtD,OAAO,CACL,2CAAK,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,IAAM,KAAK,GAC1C,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,SAAS,aASpB;AACF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- export declare const DroppableContext: React.Context<{
3
- zone: string;
4
- droppableId: string;
5
- }>;
6
- //# sourceMappingURL=DroppableContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DroppableContext.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/DroppableContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,gBAAgB;;;EAG3B,CAAC"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DroppableContext = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- exports.DroppableContext = React.createContext({
7
- zone: 'defaultDroppableZone',
8
- droppableId: 'defaultDroppableId'
9
- });
10
- //# sourceMappingURL=DroppableContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DroppableContext.js","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/DroppableContext.ts"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAElB,QAAA,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAAC;IAClD,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,oBAAoB;CAClC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './DragDropSort';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/next/components/DragDrop/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/next/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/next/components/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B"}
@@ -1,2 +0,0 @@
1
- export * from './components';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/next/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./components"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/next/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B"}
@@ -1,27 +0,0 @@
1
- import * as React from 'react';
2
- import { css } from '@patternfly/react-styles';
3
- import dragButtonStyles from '@patternfly/react-styles/css/components/DataList/data-list';
4
- import buttonStyles from '@patternfly/react-styles/css/components/Button/button';
5
- import GripVerticalIcon from '@patternfly/react-icons/dist/esm/icons/grip-vertical-icon';
6
-
7
- export interface DragButtonProps extends React.HTMLProps<HTMLButtonElement> {
8
- /** Additional classes added to the drag button */
9
- className?: string;
10
- /** Sets button type */
11
- type?: 'button' | 'submit' | 'reset';
12
- /** Flag indicating if drag is disabled for the item */
13
- isDisabled?: boolean;
14
- }
15
-
16
- export const DragButton: React.FunctionComponent<DragButtonProps> = ({ className, ...props }: DragButtonProps) => (
17
- <button
18
- className={css(className, buttonStyles.button, buttonStyles.modifiers.plain)}
19
- aria-label="Drag button"
20
- {...props}
21
- >
22
- <span className={css(dragButtonStyles.dataListItemDraggableIcon)}>
23
- <GripVerticalIcon />
24
- </span>
25
- </button>
26
- );
27
- DragButton.displayName = 'DragButton';
@@ -1,182 +0,0 @@
1
- import * as React from 'react';
2
- import { css } from '@patternfly/react-styles';
3
- import {
4
- DndContext,
5
- closestCenter,
6
- DragOverlay,
7
- DndContextProps,
8
- KeyboardSensor,
9
- PointerSensor,
10
- useSensor,
11
- useSensors,
12
- DragEndEvent,
13
- DragStartEvent
14
- } from '@dnd-kit/core';
15
- import {
16
- arrayMove,
17
- SortableContext,
18
- sortableKeyboardCoordinates,
19
- verticalListSortingStrategy
20
- } from '@dnd-kit/sortable';
21
- import { Draggable } from './Draggable';
22
- import { DraggableDataListItem } from './DraggableDataListItem';
23
- import { DraggableDualListSelectorListItem } from './DraggableDualListSelectorListItem';
24
- import styles from '@patternfly/react-styles/css/components/DragDrop/drag-drop';
25
-
26
- export type DragDropSortDragEndEvent = DragEndEvent;
27
- export type DragDropSortDragStartEvent = DragStartEvent;
28
-
29
- export interface DraggableObject {
30
- /** Unique id of the draggable object */
31
- id: string;
32
- /** Content rendered in the draggable object */
33
- content: React.ReactNode;
34
- /** Props spread to the rendered wrapper of the draggable object */
35
- props?: any;
36
- }
37
-
38
- /**
39
- * DragDropSortProps extends dnd-kit's props which may be viewed at https://docs.dndkit.com/api-documentation/context-provider#props.
40
- */
41
- export interface DragDropSortProps extends DndContextProps {
42
- /** Custom defined content wrapper for draggable items. By default, draggable items are wrapped in a styled div.
43
- * Intended to be a 'DataList' or 'DualListSelectorList' without children. */
44
- children?: React.ReactElement;
45
- /** Sorted array of draggable objects */
46
- items: DraggableObject[];
47
- /** Callback when user drops a draggable object */
48
- onDrop: (event: DragDropSortDragEndEvent, items: DraggableObject[], oldIndex?: number, newIndex?: number) => void;
49
- /** Callback when use begins dragging a draggable object */
50
- onDrag?: (event: DragDropSortDragStartEvent, oldIndex: number) => void;
51
- /** The variant determines which component wraps the draggable object.
52
- * Default and defaultWithHandle varaints wrap the draggable object in a div.
53
- * DataList vairant wraps the draggable object in a DataListItem
54
- * DualListSelectorList variant wraps the draggable objects in a DualListSelectorListItem and a div.pf-c-dual-list-selector__item-text element
55
- * TableComposable variant wraps the draggable objects in TODO
56
- * */
57
- variant?: 'default' | 'defaultWithHandle' | 'DataList' | 'DualListSelectorList' | 'TableComposable';
58
- }
59
-
60
- export const DragDropSort: React.FunctionComponent<DragDropSortProps> = ({
61
- items,
62
- onDrop = () => {},
63
- onDrag = () => {},
64
- variant = 'default',
65
- children,
66
- ...props
67
- }: DragDropSortProps) => {
68
- const [activeId, setActiveId] = React.useState<string>(null);
69
- const itemIds = React.useMemo(() => (items ? Array.from(items, (item) => item.id as string) : []), [items]);
70
-
71
- const getItemById = (id: string): DraggableObject => items.find((item) => item.id === id);
72
-
73
- const sensors = useSensors(
74
- useSensor(PointerSensor),
75
- useSensor(KeyboardSensor, {
76
- coordinateGetter: sortableKeyboardCoordinates
77
- })
78
- );
79
-
80
- const handleDragEnd = (event: DragEndEvent) => {
81
- const { active, over } = event;
82
- const oldIndex = itemIds.indexOf(active.id as string);
83
- const newIndex = itemIds.indexOf(over.id as string);
84
- const newItems = arrayMove(items, oldIndex, newIndex);
85
- onDrop(event, newItems, oldIndex, newIndex);
86
- setActiveId(null);
87
- };
88
-
89
- const handleDragStart = (event: DragStartEvent) => {
90
- setActiveId(event.active.id as string);
91
- onDrag(event, itemIds.indexOf(event.active.id as string));
92
- };
93
-
94
- const getDragOverlay = () => {
95
- if (!activeId) {
96
- return;
97
- }
98
- const item = getItemById(activeId);
99
-
100
- let content;
101
- switch (variant) {
102
- case 'DualListSelectorList':
103
- content = (
104
- <DraggableDualListSelectorListItem key={item.id} id={item.id} {...item.props}>
105
- {item.content}
106
- </DraggableDualListSelectorListItem>
107
- );
108
- break;
109
- case 'DataList':
110
- content = (
111
- <DraggableDataListItem key={item.id} id={item.id} {...item.props}>
112
- {item.content}
113
- </DraggableDataListItem>
114
- );
115
- break;
116
- default:
117
- content = (
118
- <Draggable useDragButton={variant === 'defaultWithHandle'} key={item.id} id={item.id} {...item.props}>
119
- {item.content}
120
- </Draggable>
121
- );
122
- }
123
-
124
- return (
125
- <div
126
- className={css(styles.draggable, styles.modifiers.dragging)}
127
- style={
128
- {
129
- '--pf-v5-c-draggable--m-dragging--BackgroundColor': 'var(--pf-v5-global--BackgroundColor--100)'
130
- } as React.CSSProperties
131
- }
132
- >
133
- {content}
134
- </div>
135
- );
136
- };
137
-
138
- const renderedChildren = (
139
- <SortableContext items={itemIds} strategy={verticalListSortingStrategy} id="droppable">
140
- {items.map((item: DraggableObject) => {
141
- switch (variant) {
142
- case 'DualListSelectorList':
143
- return (
144
- <DraggableDualListSelectorListItem key={item.id} id={item.id} {...item.props}>
145
- {item.content}
146
- </DraggableDualListSelectorListItem>
147
- );
148
- case 'DataList':
149
- return (
150
- <DraggableDataListItem key={item.id} id={item.id} {...item.props}>
151
- {item.content}
152
- </DraggableDataListItem>
153
- );
154
- default:
155
- return (
156
- <Draggable useDragButton={variant === 'defaultWithHandle'} key={item.id} id={item.id} {...item.props}>
157
- {item.content}
158
- </Draggable>
159
- );
160
- }
161
- })}
162
- <DragOverlay>{activeId && getDragOverlay()}</DragOverlay>
163
- </SortableContext>
164
- );
165
-
166
- return (
167
- <DndContext
168
- sensors={sensors}
169
- collisionDetection={closestCenter}
170
- onDragEnd={handleDragEnd}
171
- onDragStart={handleDragStart}
172
- {...props}
173
- >
174
- {children &&
175
- React.cloneElement(children, {
176
- children: renderedChildren
177
- })}
178
- {!children && <div>{renderedChildren}</div>}
179
- </DndContext>
180
- );
181
- };
182
- DragDropSort.displayName = 'DragDropSort';
@@ -1,27 +0,0 @@
1
- import * as React from 'react';
2
- import { useDroppable } from '@dnd-kit/core';
3
-
4
- interface DroppableProps extends React.HTMLProps<HTMLDivElement> {
5
- /** Content rendered inside DragDrop */
6
- children?: React.ReactNode;
7
- /** Class to add to outer div */
8
- className?: string;
9
- /** Name of zone that items can be dragged between. Should specify if there is more than one Droppable on the page. */
10
- zone?: string;
11
- /** Id to be passed back on drop events */
12
- droppableId?: string;
13
- /** Don't wrap the component in a div. Requires passing a single child. */
14
- hasNoWrapper?: boolean;
15
- }
16
-
17
- export const Droppable: React.FunctionComponent<DroppableProps> = ({ children, ...props }: DroppableProps) => {
18
- const { isOver, setNodeRef } = useDroppable({ id: 'droppable' });
19
- const style = { color: isOver ? 'green' : undefined };
20
-
21
- return (
22
- <div ref={setNodeRef} style={style} {...props}>
23
- {children}
24
- </div>
25
- );
26
- };
27
- Droppable.displayName = 'Droppable';
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
-
3
- export const DroppableContext = React.createContext({
4
- zone: 'defaultDroppableZone',
5
- droppableId: 'defaultDroppableId'
6
- });
@@ -1,59 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`renders some divs 1`] = `
4
- <DocumentFragment>
5
- <div
6
- class="pf-c-droppable pf-m-dragging"
7
- >
8
- <div>
9
- <div
10
- aria-describedby="DndDescribedBy-0"
11
- aria-disabled="false"
12
- aria-roledescription="sortable"
13
- class=""
14
- role="button"
15
- tabindex="0"
16
- >
17
- one
18
- </div>
19
- <div
20
- aria-describedby="DndDescribedBy-0"
21
- aria-disabled="false"
22
- aria-roledescription="sortable"
23
- class=""
24
- role="button"
25
- tabindex="0"
26
- >
27
- two
28
- </div>
29
- <div
30
- aria-describedby="DndDescribedBy-0"
31
- aria-disabled="false"
32
- aria-roledescription="sortable"
33
- class=""
34
- role="button"
35
- tabindex="0"
36
- >
37
- three
38
- </div>
39
- </div>
40
- <div
41
- id="DndDescribedBy-0"
42
- style="display: none;"
43
- >
44
-
45
- To pick up a draggable item, press the space bar.
46
- While dragging, use the arrow keys to move the item.
47
- Press space again to drop the item in its new position, or press escape to cancel.
48
-
49
- </div>
50
- <div
51
- aria-atomic="true"
52
- aria-live="assertive"
53
- id="DndLiveRegion-0"
54
- role="status"
55
- style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
56
- />
57
- </div>
58
- </DocumentFragment>
59
- `;
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import { DragDropSort, DraggableObject } from '@patternfly/react-drag-drop';
3
-
4
- export const BasicSortingWithDragButton: React.FunctionComponent = () => {
5
- const [items, setItems] = React.useState<DraggableObject[]>([
6
- { id: 'with-button-1', content: 'one' },
7
- { id: 'with-button-2', content: 'two' },
8
- { id: 'with-button-3', content: 'three' }
9
- ]);
10
-
11
- return (
12
- <DragDropSort
13
- items={items}
14
- variant="defaultWithHandle"
15
- onDrop={(_, newItems) => {
16
- setItems(newItems);
17
- }}
18
- />
19
- );
20
- };
@@ -1 +0,0 @@
1
- export * from './DragDropSort';
package/src/next/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './components';
File without changes