react-science 16.0.0 → 17.0.0
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/lib/components/fullscreen/fullscreen_context.provider.d.ts +6 -2
- package/lib/components/fullscreen/fullscreen_context.provider.d.ts.map +1 -1
- package/lib/components/fullscreen/fullscreen_context.provider.js +1 -5
- package/lib/components/fullscreen/fullscreen_context.provider.js.map +1 -1
- package/lib/components/pdnd.cjs +29 -0
- package/lib/components/pdnd.cjs.map +1 -0
- package/lib/components/pdnd.d.cts +10 -0
- package/lib/components/pdnd.d.cts.map +1 -0
- package/lib/components/root-layout/css-reset/customPreflight.d.ts.map +1 -1
- package/lib/components/root-layout/css-reset/customPreflight.js +6 -0
- package/lib/components/root-layout/css-reset/customPreflight.js.map +1 -1
- package/lib/components/root-layout/root_layout.d.ts.map +1 -1
- package/lib/components/root-layout/root_layout.js +12 -5
- package/lib/components/root-layout/root_layout.js.map +1 -1
- package/lib/components/table/flash_row/flashed_row_context.d.ts +3 -0
- package/lib/components/table/flash_row/flashed_row_context.d.ts.map +1 -0
- package/lib/components/table/flash_row/flashed_row_context.js +10 -0
- package/lib/components/table/flash_row/flashed_row_context.js.map +1 -0
- package/lib/components/table/{reorder_rows/dropped_item_provider.d.ts → flash_row/flashed_row_provider.d.ts} +2 -2
- package/lib/components/table/flash_row/flashed_row_provider.d.ts.map +1 -0
- package/lib/components/table/flash_row/flashed_row_provider.js +8 -0
- package/lib/components/table/flash_row/flashed_row_provider.js.map +1 -0
- package/lib/components/table/flash_row/use_flash_row_effect.d.ts +3 -0
- package/lib/components/table/flash_row/use_flash_row_effect.d.ts.map +1 -0
- package/lib/components/table/flash_row/use_flash_row_effect.js +21 -0
- package/lib/components/table/flash_row/use_flash_row_effect.js.map +1 -0
- package/lib/components/table/index.d.ts +1 -0
- package/lib/components/table/index.d.ts.map +1 -1
- package/lib/components/table/index.js +1 -0
- package/lib/components/table/index.js.map +1 -1
- package/lib/components/table/preview_table.d.ts +5 -0
- package/lib/components/table/preview_table.d.ts.map +1 -0
- package/lib/components/table/preview_table.js +8 -0
- package/lib/components/table/preview_table.js.map +1 -0
- package/lib/components/table/preview_table_context.d.ts +9 -0
- package/lib/components/table/preview_table_context.d.ts.map +1 -0
- package/lib/components/table/preview_table_context.js +15 -0
- package/lib/components/table/preview_table_context.js.map +1 -0
- package/lib/components/table/reorder_rows/draggable_row_tr.d.ts +3 -3
- package/lib/components/table/reorder_rows/draggable_row_tr.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/draggable_row_tr.js +15 -25
- package/lib/components/table/reorder_rows/draggable_row_tr.js.map +1 -1
- package/lib/components/table/reorder_rows/item_order_provider.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/item_order_provider.js +1 -2
- package/lib/components/table/reorder_rows/item_order_provider.js.map +1 -1
- package/lib/components/table/reorder_rows/table_drag_row_handler.d.ts +3 -1
- package/lib/components/table/reorder_rows/table_drag_row_handler.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/table_drag_row_handler.js +12 -2
- package/lib/components/table/reorder_rows/table_drag_row_handler.js.map +1 -1
- package/lib/components/table/reorder_rows/use_drop_monitor.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/use_drop_monitor.js +5 -8
- package/lib/components/table/reorder_rows/use_drop_monitor.js.map +1 -1
- package/lib/components/table/table_body.d.ts.map +1 -1
- package/lib/components/table/table_body.js +3 -3
- package/lib/components/table/table_body.js.map +1 -1
- package/lib/components/table/table_root.d.ts +5 -1
- package/lib/components/table/table_root.d.ts.map +1 -1
- package/lib/components/table/table_root.js +44 -45
- package/lib/components/table/table_root.js.map +1 -1
- package/lib/components/table/table_row.d.ts +8 -0
- package/lib/components/table/table_row.d.ts.map +1 -0
- package/lib/components/table/table_row.js +10 -0
- package/lib/components/table/table_row.js.map +1 -0
- package/lib/components/table/table_scroll_container.d.ts +33 -0
- package/lib/components/table/table_scroll_container.d.ts.map +1 -0
- package/lib/components/table/table_scroll_container.js +33 -0
- package/lib/components/table/table_scroll_container.js.map +1 -0
- package/lib/components/table/table_utils.d.ts +13 -4
- package/lib/components/table/table_utils.d.ts.map +1 -1
- package/lib/components/table/use_table_scroll.d.ts +20 -1
- package/lib/components/table/use_table_scroll.d.ts.map +1 -1
- package/lib/components/table/use_table_scroll.js +16 -8
- package/lib/components/table/use_table_scroll.js.map +1 -1
- package/package.json +1 -1
- package/src/components/fullscreen/fullscreen_context.provider.tsx +7 -14
- package/src/components/pdnd.cts +20 -0
- package/src/components/root-layout/css-reset/customPreflight.ts +6 -0
- package/src/components/root-layout/root_layout.tsx +30 -18
- package/src/components/table/flash_row/flashed_row_context.ts +23 -0
- package/src/components/table/flash_row/flashed_row_provider.tsx +13 -0
- package/src/components/table/flash_row/use_flash_row_effect.ts +30 -0
- package/src/components/table/index.ts +1 -0
- package/src/components/table/preview_table.tsx +18 -0
- package/src/components/table/preview_table_context.ts +33 -0
- package/src/components/table/reorder_rows/draggable_row_tr.tsx +30 -38
- package/src/components/table/reorder_rows/item_order_provider.tsx +2 -2
- package/src/components/table/reorder_rows/table_drag_row_handler.tsx +25 -4
- package/src/components/table/reorder_rows/use_drop_monitor.ts +10 -8
- package/src/components/table/table_body.tsx +6 -8
- package/src/components/table/table_root.tsx +112 -123
- package/src/components/table/table_row.tsx +17 -0
- package/src/components/table/table_scroll_container.tsx +103 -0
- package/src/components/table/table_utils.ts +20 -4
- package/src/components/table/use_table_scroll.ts +48 -20
- package/lib/components/table/reorder_rows/dropped_item_context.d.ts +0 -3
- package/lib/components/table/reorder_rows/dropped_item_context.d.ts.map +0 -1
- package/lib/components/table/reorder_rows/dropped_item_context.js +0 -10
- package/lib/components/table/reorder_rows/dropped_item_context.js.map +0 -1
- package/lib/components/table/reorder_rows/dropped_item_provider.d.ts.map +0 -1
- package/lib/components/table/reorder_rows/dropped_item_provider.js +0 -8
- package/lib/components/table/reorder_rows/dropped_item_provider.js.map +0 -1
- package/src/components/table/reorder_rows/dropped_item_context.ts +0 -23
- package/src/components/table/reorder_rows/dropped_item_provider.tsx +0 -13
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { ReactNode, RefObject } from 'react';
|
|
2
2
|
interface FullscreenProps {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Callback providing the ref which should be passed to the element that can be displayed fullscreen.
|
|
5
|
+
* @param ref
|
|
6
|
+
*/
|
|
7
|
+
children: (ref: RefObject<HTMLDivElement>) => ReactNode;
|
|
4
8
|
}
|
|
5
9
|
export declare function FullScreenProvider(props: FullscreenProps): import("react/jsx-runtime").JSX.Element;
|
|
6
10
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fullscreen_context.provider.d.ts","sourceRoot":"","sources":["../../../src/components/fullscreen/fullscreen_context.provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"fullscreen_context.provider.d.ts","sourceRoot":"","sources":["../../../src/components/fullscreen/fullscreen_context.provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAalD,UAAU,eAAe;IACvB;;;OAGG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,SAAS,CAAC;CACzD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,eAAe,2CAYxD"}
|
|
@@ -55,10 +55,6 @@ function FullscreenInner(props) {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}, [isFullScreen]);
|
|
58
|
-
return (
|
|
59
|
-
width: '100%',
|
|
60
|
-
height: '100%',
|
|
61
|
-
backgroundColor: 'white',
|
|
62
|
-
}, children: children }));
|
|
58
|
+
return children(ref);
|
|
63
59
|
}
|
|
64
60
|
//# sourceMappingURL=fullscreen_context.provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fullscreen_context.provider.js","sourceRoot":"","sources":["../../../src/components/fullscreen/fullscreen_context.provider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"fullscreen_context.provider.js","sourceRoot":"","sources":["../../../src/components/fullscreen/fullscreen_context.provider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAkB3E,MAAM,UAAU,kBAAkB,CAAC,KAAsB;IACvD,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,KAAc,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAE7E,MAAM,KAAK,GAAG,OAAO,CACnB,GAAG,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,EAChC,CAAC,YAAY,EAAE,MAAM,CAAC,CACvB,CAAC;IACF,OAAO,CACL,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACtC,KAAC,eAAe,OAAK,KAAK,GAAI,GACH,CAC9B,CAAC;AACJ,CAAC;AACD,SAAS,eAAe,CAAC,KAAsB;IAC7C,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3B,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;IACjD,MAAM,GAAG,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IACtC,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,kBAAkB;YACzB,MAAM,QAAQ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AAQ,GAAG,MAAM,CAAC,QAAwB,CAAC;QACjD,IAAI,CAAC,YAAY,IAAI,QAAQ,CAAC,iBAAiB,EAAE,CAAC;YAChD,IAAI,QAAQ,CAAC,cAAc,EAAE,CAAC;gBAC5B,QAAQ,CAAC,cAAc,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE;oBACnC,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;gBACxC,CAAC,CAAC,CAAC;YACL,CAAC;iBAAM,IAAI,QAAQ,CAAC,oBAAoB,EAAE,CAAC;gBACzC,QAAQ,CAAC,oBAAoB,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE;oBACzC,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;gBACxC,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IACnB,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getReorderDestinationIndex = exports.attachClosestEdge = exports.extractClosestEdge = exports.autoScrollForElements = exports.monitorForElements = exports.dropTargetForElements = exports.draggable = exports.reorder = exports.combine = exports.setCustomNativeDragPreview = exports.pointerOutsideOfPreview = void 0;
|
|
4
|
+
// https://github.com/atlassian/pragmatic-drag-and-drop/issues/27
|
|
5
|
+
// Given how `@atlaskit/pragmatic-drag-and-drop` publishes ESM in a non-native way,
|
|
6
|
+
// we have to trick TS into using the CJS build so that our build is compatible
|
|
7
|
+
// with native ESM.
|
|
8
|
+
// We cannot use `verbatimModuleSyntax` ts config option with this pattern.
|
|
9
|
+
var pointer_outside_of_preview_1 = require("@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview");
|
|
10
|
+
Object.defineProperty(exports, "pointerOutsideOfPreview", { enumerable: true, get: function () { return pointer_outside_of_preview_1.pointerOutsideOfPreview; } });
|
|
11
|
+
var set_custom_native_drag_preview_1 = require("@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview");
|
|
12
|
+
Object.defineProperty(exports, "setCustomNativeDragPreview", { enumerable: true, get: function () { return set_custom_native_drag_preview_1.setCustomNativeDragPreview; } });
|
|
13
|
+
var combine_1 = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
14
|
+
Object.defineProperty(exports, "combine", { enumerable: true, get: function () { return combine_1.combine; } });
|
|
15
|
+
var reorder_1 = require("@atlaskit/pragmatic-drag-and-drop/reorder");
|
|
16
|
+
Object.defineProperty(exports, "reorder", { enumerable: true, get: function () { return reorder_1.reorder; } });
|
|
17
|
+
var adapter_1 = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
18
|
+
Object.defineProperty(exports, "draggable", { enumerable: true, get: function () { return adapter_1.draggable; } });
|
|
19
|
+
Object.defineProperty(exports, "dropTargetForElements", { enumerable: true, get: function () { return adapter_1.dropTargetForElements; } });
|
|
20
|
+
var adapter_2 = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
21
|
+
Object.defineProperty(exports, "monitorForElements", { enumerable: true, get: function () { return adapter_2.monitorForElements; } });
|
|
22
|
+
var element_1 = require("@atlaskit/pragmatic-drag-and-drop-auto-scroll/element");
|
|
23
|
+
Object.defineProperty(exports, "autoScrollForElements", { enumerable: true, get: function () { return element_1.autoScrollForElements; } });
|
|
24
|
+
var closest_edge_1 = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge");
|
|
25
|
+
Object.defineProperty(exports, "extractClosestEdge", { enumerable: true, get: function () { return closest_edge_1.extractClosestEdge; } });
|
|
26
|
+
Object.defineProperty(exports, "attachClosestEdge", { enumerable: true, get: function () { return closest_edge_1.attachClosestEdge; } });
|
|
27
|
+
var get_reorder_destination_index_1 = require("@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index");
|
|
28
|
+
Object.defineProperty(exports, "getReorderDestinationIndex", { enumerable: true, get: function () { return get_reorder_destination_index_1.getReorderDestinationIndex; } });
|
|
29
|
+
//# sourceMappingURL=pdnd.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdnd.cjs","sourceRoot":"","sources":["../../src/components/pdnd.cts"],"names":[],"mappings":";;;AAAA,iEAAiE;AACjE,mFAAmF;AACnF,+EAA+E;AAC/E,mBAAmB;AACnB,2EAA2E;AAC3E,mHAA+G;AAAtG,qIAAA,uBAAuB,OAAA;AAChC,2HAAsH;AAA7G,4IAAA,0BAA0B,OAAA;AACnC,qEAAoE;AAA3D,kGAAA,OAAO,OAAA;AAChB,qEAAoE;AAA3D,kGAAA,OAAO,OAAA;AAChB,6EAG2D;AAFzD,oGAAA,SAAS,OAAA;AACT,gHAAA,qBAAqB,OAAA;AAEvB,6EAAuF;AAA9E,6GAAA,kBAAkB,OAAA;AAC3B,iFAA8F;AAArF,gHAAA,qBAAqB,OAAA;AAC9B,sFAG+D;AAF7D,kHAAA,kBAAkB,OAAA;AAClB,iHAAA,iBAAiB,OAAA;AAEnB,6HAAyH;AAAhH,2IAAA,0BAA0B,OAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview';
|
|
2
|
+
export { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
|
|
3
|
+
export { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
4
|
+
export { reorder } from '@atlaskit/pragmatic-drag-and-drop/reorder';
|
|
5
|
+
export { draggable, dropTargetForElements, } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
6
|
+
export { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
7
|
+
export { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
8
|
+
export { extractClosestEdge, attachClosestEdge, } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
9
|
+
export { getReorderDestinationIndex } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index';
|
|
10
|
+
//# sourceMappingURL=pdnd.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdnd.d.cts","sourceRoot":"","sources":["../../src/components/pdnd.cts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAC/G,OAAO,EAAE,0BAA0B,EAAE,MAAM,0EAA0E,CAAC;AACtH,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EACL,SAAS,EACT,qBAAqB,GACtB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EACL,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,6EAA6E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customPreflight.d.ts","sourceRoot":"","sources":["../../../../src/components/root-layout/css-reset/customPreflight.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;SAsBtB,MAAO,
|
|
1
|
+
{"version":3,"file":"customPreflight.d.ts","sourceRoot":"","sources":["../../../../src/components/root-layout/css-reset/customPreflight.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;SAsBtB,MAAO,WAEZ;yGAKH,CAAC"}
|
|
@@ -23,5 +23,11 @@ export const CustomDivPreflight = styled.div `
|
|
|
23
23
|
width: 100%;
|
|
24
24
|
height: 100%;
|
|
25
25
|
position: relative;
|
|
26
|
+
|
|
27
|
+
&:fullscreen::backdrop,
|
|
28
|
+
*:fullscreen::backdrop {
|
|
29
|
+
/* Override user agent default */
|
|
30
|
+
background-color: white;
|
|
31
|
+
}
|
|
26
32
|
`;
|
|
27
33
|
//# sourceMappingURL=customPreflight.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customPreflight.js","sourceRoot":"","sources":["../../../../src/components/root-layout/css-reset/customPreflight.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,qFAAqF;AACrF,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"customPreflight.js","sourceRoot":"","sources":["../../../../src/components/root-layout/css-reset/customPreflight.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,qFAAqF;AACrF,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root_layout.d.ts","sourceRoot":"","sources":["../../../src/components/root-layout/root_layout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"root_layout.d.ts","sourceRoot":"","sources":["../../../src/components/root-layout/root_layout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAoB,SAAS,EAAE,MAAM,OAAO,CAAC;AAWxE,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAUD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAwChD"}
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { BlueprintProvider, FocusStyleManager } from '@blueprintjs/core';
|
|
3
3
|
import { useCallback, useState } from 'react';
|
|
4
4
|
import { AccordionProvider } from '../accordion/index.js';
|
|
5
|
+
import { FullScreenProvider } from '../fullscreen/index.js';
|
|
5
6
|
import { CustomDivPreflight } from './css-reset/customPreflight.js';
|
|
6
7
|
import { RootLayoutProvider } from './root_layout_context.provider.js';
|
|
7
8
|
FocusStyleManager.onlyShowFocusOnTabs();
|
|
@@ -14,14 +15,20 @@ const style = {
|
|
|
14
15
|
};
|
|
15
16
|
export function RootLayout(props) {
|
|
16
17
|
const [rootRef, setRootRef] = useState(typeof document !== 'undefined' ? document.body : null);
|
|
17
|
-
const
|
|
18
|
+
const refCallback = useCallback((node) => {
|
|
18
19
|
if (node !== null) {
|
|
19
20
|
setRootRef(node);
|
|
20
21
|
}
|
|
21
22
|
}, []);
|
|
22
|
-
return (_jsx(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
return (_jsx(FullScreenProvider, { children: (ref) => (_jsx(CustomDivPreflight, { id: "root-layout", ref: (node) => {
|
|
24
|
+
if (node) {
|
|
25
|
+
const mutableRef = ref;
|
|
26
|
+
mutableRef.current = node;
|
|
27
|
+
refCallback(node);
|
|
28
|
+
}
|
|
29
|
+
}, style: {
|
|
30
|
+
...style,
|
|
31
|
+
...props.style,
|
|
32
|
+
}, translate: "no", children: _jsx(BlueprintProvider, { ...(rootRef ? { portalContainer: rootRef } : undefined), children: _jsx(RootLayoutProvider, { innerRef: rootRef, children: _jsx(AccordionProvider, { children: props.children }) }) }) })) }));
|
|
26
33
|
}
|
|
27
34
|
//# sourceMappingURL=root_layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root_layout.js","sourceRoot":"","sources":["../../../src/components/root-layout/root_layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9C,O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IAAI,EAAE,CAAC;oBACT,MAAM,UAAU,GAAG,GAAuC,CAAC;oBAC3D,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC;oBAC1B,WAAW,CAAC,IAAI,CAAC,CAAC;gBACpB,CAAC;YACH,CAAC,EACD,KAAK,EAAE;gBACL,GAAG,KAAK;gBACR,GAAG,KAAK,CAAC,KAAK;aACf,EACD,SAAS,EAAC,IAAI,YAEd,KAAC,iBAAiB,OACZ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,YAExD,KAAC,kBAAkB,IAAC,QAAQ,EAAE,OAAO,YACnC,KAAC,iBAAiB,cAAE,KAAK,CAAC,QAAQ,GAAqB,GACpC,GACH,GACD,CACtB,GACkB,CACtB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const flashedRowContext: import("react").Context<[string | undefined, import("react").Dispatch<import("react").SetStateAction<string | undefined>>] | null>;
|
|
2
|
+
export declare function useFlashedRowContext(): [string | undefined, import("react").Dispatch<import("react").SetStateAction<string | undefined>>];
|
|
3
|
+
//# sourceMappingURL=flashed_row_context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flashed_row_context.d.ts","sourceRoot":"","sources":["../../../../src/components/table/flash_row/flashed_row_context.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,iBAAiB,oIAE7B,CAAC;AAEF,wBAAgB,oBAAoB,uGAUnC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
export const flashedRowContext = createContext(null);
|
|
3
|
+
export function useFlashedRowContext() {
|
|
4
|
+
const context = useContext(flashedRowContext);
|
|
5
|
+
if (!context) {
|
|
6
|
+
throw new Error('useFlashedRowContext must be used within a FlashedRowProvider');
|
|
7
|
+
}
|
|
8
|
+
return context;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=flashed_row_context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flashed_row_context.js","sourceRoot":"","sources":["../../../../src/components/table/flash_row/flashed_row_context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAOlD,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAC5C,IAAI,CACL,CAAC;AAEF,MAAM,UAAU,oBAAoB;IAClC,MAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAE9C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,+DAA+D,CAChE,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function FlashedRowProvider(props: {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
//# sourceMappingURL=
|
|
5
|
+
//# sourceMappingURL=flashed_row_provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flashed_row_provider.d.ts","sourceRoot":"","sources":["../../../../src/components/table/flash_row/flashed_row_provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAOhE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { flashedRowContext } from './flashed_row_context.js';
|
|
4
|
+
export function FlashedRowProvider(props) {
|
|
5
|
+
const value = useState();
|
|
6
|
+
return (_jsx(flashedRowContext.Provider, { value: value, children: props.children }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=flashed_row_provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flashed_row_provider.js","sourceRoot":"","sources":["../../../../src/components/table/flash_row/flashed_row_provider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,UAAU,kBAAkB,CAAC,KAA8B;IAC/D,MAAM,KAAK,GAAG,QAAQ,EAAU,CAAC;IACjC,OAAO,CACL,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACrC,KAAK,CAAC,QAAQ,GACY,CAC9B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_flash_row_effect.d.ts","sourceRoot":"","sources":["../../../../src/components/table/flash_row/use_flash_row_effect.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,SAAS,CAAC,mBAAmB,CAAC,QAW5C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Colors } from '@blueprintjs/core';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { useFlashedRowContext } from './flashed_row_context.js';
|
|
4
|
+
export function useFlashRowEffect(id, tableRowRef) {
|
|
5
|
+
const [flashedItemId, setFlashedItemId] = useFlashedRowContext();
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (flashedItemId === id && tableRowRef.current) {
|
|
8
|
+
triggerPostFlash(tableRowRef.current);
|
|
9
|
+
// In a virtualized table, prevent the flash from happening again
|
|
10
|
+
// when the component remounts
|
|
11
|
+
setFlashedItemId(undefined);
|
|
12
|
+
}
|
|
13
|
+
}, [flashedItemId, id, setFlashedItemId, tableRowRef]);
|
|
14
|
+
}
|
|
15
|
+
function triggerPostFlash(element) {
|
|
16
|
+
element.animate([{ backgroundColor: Colors.BLUE5, opacity: 0.5 }, { opacity: 0.5 }], {
|
|
17
|
+
duration: 250,
|
|
18
|
+
iterations: 1,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=use_flash_row_effect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_flash_row_effect.js","sourceRoot":"","sources":["../../../../src/components/table/flash_row/use_flash_row_effect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,UAAU,iBAAiB,CAC/B,EAAU,EACV,WAA2C;IAE3C,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,oBAAoB,EAAE,CAAC;IACjE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,aAAa,KAAK,EAAE,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;YAChD,gBAAgB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACtC,iEAAiE;YACjE,8BAA8B;YAC9B,gBAAgB,CAAC,SAAS,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC,EAAE,CAAC,aAAa,EAAE,EAAE,EAAE,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAoB;IAC5C,OAAO,CAAC,OAAO,CACb,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EACnE;QACE,QAAQ,EAAE,GAAG;QACb,UAAU,EAAE,CAAC;KACd,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview_table.d.ts","sourceRoot":"","sources":["../../../src/components/table/preview_table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQ1D,wBAAgB,YAAY,CAAC,KAAK,SAAS,OAAO,EAAE,KAAK,EAAE;IACzD,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;CACjB,2CAOA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { isPreviewTableContext, usePreviewTableProps, } from './preview_table_context.js';
|
|
3
|
+
import { Table } from './table_root.js';
|
|
4
|
+
export function PreviewTable(props) {
|
|
5
|
+
const tablePreviewProps = usePreviewTableProps();
|
|
6
|
+
return (_jsx(isPreviewTableContext.Provider, { value: true, children: _jsx(Table, { ...tablePreviewProps, noHeader: true, data: [props.row.original] }) }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=preview_table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview_table.js","sourceRoot":"","sources":["../../../src/components/table/preview_table.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,MAAM,UAAU,YAAY,CAAwB,KAEnD;IACC,MAAM,iBAAiB,GAAG,oBAAoB,EAAS,CAAC;IACxD,OAAO,CACL,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,kBACnC,KAAC,KAAK,OAAK,iBAAiB,EAAE,QAAQ,QAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAI,GACtC,CAClC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RowData } from '@tanstack/react-table';
|
|
2
|
+
import type { TableProps } from './table_root.js';
|
|
3
|
+
export type PreviewTablePropsContextValue<TData extends RowData> = Pick<TableProps<TData>, 'getTdProps' | 'columns' | 'className' | 'renderRowTr' | 'compact'>;
|
|
4
|
+
export declare const previewTablePropsContext: import("react").Context<PreviewTablePropsContextValue<unknown> | null>;
|
|
5
|
+
export declare function usePreviewTableProps<TData extends RowData>(): PreviewTablePropsContextValue<TData>;
|
|
6
|
+
export declare const PreviewTablePropsContextProvider: import("react").Provider<PreviewTablePropsContextValue<unknown> | null>;
|
|
7
|
+
export declare const isPreviewTableContext: import("react").Context<boolean>;
|
|
8
|
+
export declare function useIsPreviewTable(): boolean;
|
|
9
|
+
//# sourceMappingURL=preview_table_context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview_table_context.d.ts","sourceRoot":"","sources":["../../../src/components/table/preview_table_context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,6BAA6B,CAAC,KAAK,SAAS,OAAO,IAAI,IAAI,CACrE,UAAU,CAAC,KAAK,CAAC,EAGjB,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,CACnE,CAAC;AAEF,eAAO,MAAM,wBAAwB,wEAC+B,CAAC;AAErE,wBAAgB,oBAAoB,CAAC,KAAK,SAAS,OAAO,KAOxC,6BAA6B,CAAC,KAAK,CAAC,CACrD;AAED,eAAO,MAAM,gCAAgC,yEACV,CAAC;AAEpC,eAAO,MAAM,qBAAqB,kCAAuB,CAAC;AAE1D,wBAAgB,iBAAiB,YAEhC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
export const previewTablePropsContext = createContext(null);
|
|
3
|
+
export function usePreviewTableProps() {
|
|
4
|
+
const value = useContext(previewTablePropsContext);
|
|
5
|
+
if (value === null) {
|
|
6
|
+
throw new Error('useTablePreviewProps must be used within a TablePreviewContextProvider');
|
|
7
|
+
}
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
export const PreviewTablePropsContextProvider = previewTablePropsContext.Provider;
|
|
11
|
+
export const isPreviewTableContext = createContext(false);
|
|
12
|
+
export function useIsPreviewTable() {
|
|
13
|
+
return useContext(isPreviewTableContext);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=preview_table_context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview_table_context.js","sourceRoot":"","sources":["../../../src/components/table/preview_table_context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAWlD,MAAM,CAAC,MAAM,wBAAwB,GACnC,aAAa,CAAgD,IAAI,CAAC,CAAC;AAErE,MAAM,UAAU,oBAAoB;IAClC,MAAM,KAAK,GAAG,UAAU,CAAC,wBAAwB,CAAC,CAAC;IACnD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAC;IACJ,CAAC;IACD,OAAO,KAA6C,CAAC;AACvD,CAAC;AAED,MAAM,CAAC,MAAM,gCAAgC,GAC3C,wBAAwB,CAAC,QAAQ,CAAC;AAEpC,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAE1D,MAAM,UAAU,iBAAiB;IAC/B,OAAO,UAAU,CAAC,qBAAqB,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Row, RowData } from '@tanstack/react-table';
|
|
2
|
-
import type { TableRowPreviewRenderer,
|
|
2
|
+
import type { TableRowPreviewRenderer, TableRowTrRenderProps } from '../table_utils.js';
|
|
3
3
|
export interface TableDraggableRowTrProps<TData extends RowData> {
|
|
4
4
|
/**
|
|
5
5
|
* Props to be spread on the `tr` element.
|
|
6
6
|
*/
|
|
7
|
-
trProps:
|
|
7
|
+
trProps: TableRowTrRenderProps;
|
|
8
8
|
/**
|
|
9
9
|
* Row data.
|
|
10
10
|
*/
|
|
@@ -12,7 +12,7 @@ export interface TableDraggableRowTrProps<TData extends RowData> {
|
|
|
12
12
|
/**
|
|
13
13
|
* Preview of the row being dragged.
|
|
14
14
|
*/
|
|
15
|
-
renderRowPreview
|
|
15
|
+
renderRowPreview?: TableRowPreviewRenderer<TData>;
|
|
16
16
|
}
|
|
17
17
|
export declare function TableDraggableRowTr<TData extends RowData>(props: TableDraggableRowTrProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
//# sourceMappingURL=draggable_row_tr.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draggable_row_tr.d.ts","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/draggable_row_tr.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"draggable_row_tr.d.ts","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/draggable_row_tr.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAiB1D,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAQ3B,MAAM,WAAW,wBAAwB,CAAC,KAAK,SAAS,OAAO;IAC7D;;OAEG;IACH,OAAO,EAAE,qBAAqB,CAAC;IAC/B;;OAEG;IACH,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IAChB;;OAEG;IACH,gBAAgB,CAAC,EAAE,uBAAuB,CAAC,KAAK,CAAC,CAAC;CACnD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,SAAS,OAAO,EACvD,KAAK,EAAE,wBAAwB,CAAC,KAAK,CAAC,2CA6GvC"}
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
3
|
-
import { draggable, dropTargetForElements, } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
4
|
-
import { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview';
|
|
5
|
-
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
|
|
6
|
-
import { attachClosestEdge, extractClosestEdge, } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
7
|
-
import { Colors } from '@blueprintjs/core';
|
|
8
2
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
9
3
|
import { createPortal } from 'react-dom';
|
|
4
|
+
import { attachClosestEdge, combine, draggable, dropTargetForElements, extractClosestEdge, pointerOutsideOfPreview, setCustomNativeDragPreview, } from '../../pdnd.cjs';
|
|
10
5
|
import { assert } from '../../utils/index.js';
|
|
6
|
+
import { useFlashRowEffect } from '../flash_row/use_flash_row_effect.js';
|
|
7
|
+
import { PreviewTable } from '../preview_table.js';
|
|
8
|
+
import { useIsPreviewTable } from '../preview_table_context.js';
|
|
11
9
|
import { draggableRowContext } from './draggable_row_context.js';
|
|
12
|
-
import { useDroppedItemContext } from './dropped_item_context.js';
|
|
13
10
|
import { getItemData, isItemData } from './item_data.js';
|
|
14
11
|
import { useItemOrder } from './item_order_context.js';
|
|
15
12
|
export function TableDraggableRowTr(props) {
|
|
16
|
-
const { trProps, row, renderRowPreview } = props;
|
|
13
|
+
const { trProps, row, renderRowPreview = (row) => _jsx(PreviewTable, { row: row }), } = props;
|
|
17
14
|
const { instanceId } = useItemOrder();
|
|
18
|
-
const
|
|
15
|
+
const isPreview = useIsPreviewTable();
|
|
16
|
+
const tableRowRef = useRef(null);
|
|
19
17
|
const [state, setState] = useState(idleState);
|
|
20
|
-
const [droppedItemId, setDroppedItemId] = useDroppedItemContext();
|
|
21
18
|
const dragHandleRef = useRef(null);
|
|
22
19
|
useEffect(() => {
|
|
23
|
-
|
|
20
|
+
if (isPreview) {
|
|
21
|
+
// No drag and drop in preview
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const trElement = tableRowRef.current;
|
|
24
25
|
assert(trElement, 'tr ref is null');
|
|
25
26
|
assert(dragHandleRef.current, 'dragHandleRef is null');
|
|
26
27
|
function canDrop({ source }) {
|
|
@@ -80,28 +81,17 @@ export function TableDraggableRowTr(props) {
|
|
|
80
81
|
setState(idleState);
|
|
81
82
|
},
|
|
82
83
|
}));
|
|
83
|
-
}, [row, instanceId]);
|
|
84
|
-
|
|
85
|
-
if (droppedItemId === row.id && innerRef.current) {
|
|
86
|
-
triggerPostFlash(innerRef.current);
|
|
87
|
-
setDroppedItemId(undefined);
|
|
88
|
-
}
|
|
89
|
-
}, [droppedItemId, row.id, setDroppedItemId]);
|
|
84
|
+
}, [row, instanceId, isPreview]);
|
|
85
|
+
useFlashRowEffect(row.id, tableRowRef);
|
|
90
86
|
const value = useMemo(() => {
|
|
91
87
|
return {
|
|
92
88
|
dragHandleRef,
|
|
93
89
|
state,
|
|
94
90
|
};
|
|
95
91
|
}, [state]);
|
|
96
|
-
return (_jsxs(_Fragment, { children: [_jsx(draggableRowContext.Provider, { value: value, children: _jsx("tr", { ...trProps, ref:
|
|
92
|
+
return (_jsxs(_Fragment, { children: [_jsx(draggableRowContext.Provider, { value: value, children: _jsx("tr", { ...trProps, ref: tableRowRef }) }), state.type === 'preview' &&
|
|
97
93
|
createPortal(renderRowPreview(row), state.container)] }));
|
|
98
94
|
}
|
|
99
95
|
const idleState = { type: 'idle' };
|
|
100
96
|
const draggingState = { type: 'dragging' };
|
|
101
|
-
function triggerPostFlash(element) {
|
|
102
|
-
element.animate([{ backgroundColor: Colors.BLUE5, opacity: 0.5 }, { opacity: 0.5 }], {
|
|
103
|
-
duration: 250,
|
|
104
|
-
iterations: 1,
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
97
|
//# sourceMappingURL=draggable_row_tr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draggable_row_tr.js","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/draggable_row_tr.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"draggable_row_tr.js","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/draggable_row_tr.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EACL,iBAAi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|
|
|
1
|
-
{"version":3,"file":"item_order_provider.d.ts","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/item_order_provider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"item_order_provider.d.ts","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/item_order_provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQvC,UAAU,sBAAsB,CAAC,CAAC;IAChC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACrB,cAAc,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC/C,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,CAAC,GAAG,OAAO,EAC3C,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CA4CjC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { reorder } from '@atlaskit/pragmatic-drag-and-drop/reorder';
|
|
3
|
-
import { getReorderDestinationIndex } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index';
|
|
4
2
|
import { useCallback, useMemo, useState } from 'react';
|
|
3
|
+
import { getReorderDestinationIndex, reorder } from '../../pdnd.cjs';
|
|
5
4
|
import { itemOrderContext } from './item_order_context.js';
|
|
6
5
|
export function ItemOrderProvider(props) {
|
|
7
6
|
// Isolated instances of this component from one another
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item_order_provider.js","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/item_order_provider.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"item_order_provider.js","sourceRoot":"","sources":["../../../../src/components/table/reorder_r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
|
|
|
1
|
-
|
|
1
|
+
import type { ButtonProps } from '@blueprintjs/core';
|
|
2
|
+
export type TableDragRowHandlerProps = ButtonProps;
|
|
3
|
+
export declare function TableDragRowHandler(props: TableDragRowHandlerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
2
4
|
//# sourceMappingURL=table_drag_row_handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_drag_row_handler.d.ts","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/table_drag_row_handler.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table_drag_row_handler.d.ts","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/table_drag_row_handler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAQrD,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC;AAEnD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,kDAOlE"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from '@blueprintjs/core';
|
|
3
|
+
import { useIsPreviewTable } from '../preview_table_context.js';
|
|
3
4
|
import { useTableDraggableRowContext } from './draggable_row_context.js';
|
|
4
5
|
import { TableDropIndicator } from './drop_indicator.js';
|
|
5
|
-
export function TableDragRowHandler() {
|
|
6
|
+
export function TableDragRowHandler(props) {
|
|
7
|
+
const isInPreview = useIsPreviewTable();
|
|
8
|
+
if (isInPreview) {
|
|
9
|
+
// Do not render the drag handler in the preview table.
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
return _jsx(InternalTableDragRowHandler, { ...props });
|
|
13
|
+
}
|
|
14
|
+
function InternalTableDragRowHandler(props) {
|
|
15
|
+
const { icon = 'drag-handle-vertical', variant = 'minimal', style, ...otherProps } = props;
|
|
6
16
|
const { dragHandleRef, state } = useTableDraggableRowContext();
|
|
7
|
-
return (_jsxs(_Fragment, { children: [_jsx(Button, {
|
|
17
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { type: "button", icon: icon, ref: dragHandleRef, variant: variant, ...otherProps, style: { cursor: 'grab', ...style } }), state?.type === 'is-over' && state.closestEdge && (_jsx(TableDropIndicator, { edge: state.closestEdge }))] }));
|
|
8
18
|
}
|
|
9
19
|
//# sourceMappingURL=table_drag_row_handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_drag_row_handler.js","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/table_drag_row_handler.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"table_drag_row_handler.js","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/table_drag_row_handler.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAIzD,MAAM,UAAU,mBAAmB,CAAC,KAA+B;IACjE,MAAM,WAAW,GAAG,iBAAiB,EAAE,CAAC;IACxC,IAAI,WAAW,EAAE,CAAC;QAChB,uDAAuD;QACvD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAC,2BAA2B,OAAK,KAAK,GAAI,CAAC;AACpD,CAAC;AAED,SAAS,2BAA2B,CAAC,KAA+B;IAClE,MAAM,EACJ,IAAI,GAAG,sBAAsB,EAC7B,OAAO,GAAG,SAAS,EACnB,KAAK,EACL,GAAG,UAAU,EACd,GAAG,KAAK,CAAC;IACV,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,2BAA2B,EAAE,CAAC;IAC/D,OAAO,CACL,8BACE,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,OAAO,KACZ,UAAU,EACd,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,GACnC,EACD,KAAK,EAAE,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,WAAW,IAAI,CACjD,KAAC,kBAAkB,IAAC,IAAI,EAAE,KAAK,CAAC,WAAW,GAAI,CAChD,IACA,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_drop_monitor.d.ts","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/use_drop_monitor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_drop_monitor.d.ts","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/use_drop_monitor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAevC;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,gBAAgB,EAAE,SAAS,CAAC,OAAO,CAAC,EACpC,OAAO,EAAE,OAAO,QAmDjB"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
2
|
-
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
3
|
-
import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
4
|
-
import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
5
1
|
import { useEffect } from 'react';
|
|
2
|
+
import { autoScrollForElements, combine, extractClosestEdge, monitorForElements, } from '../../pdnd.cjs';
|
|
6
3
|
import { assert } from '../../utils/index.js';
|
|
7
|
-
import {
|
|
4
|
+
import { useFlashedRowContext } from '../flash_row/flashed_row_context.js';
|
|
8
5
|
import { isItemData } from './item_data.js';
|
|
9
6
|
import { useItemOrder } from './item_order_context.js';
|
|
10
7
|
/**
|
|
@@ -15,7 +12,7 @@ import { useItemOrder } from './item_order_context.js';
|
|
|
15
12
|
*/
|
|
16
13
|
export function useDropMonitor(scrollElementRef, enabled) {
|
|
17
14
|
const { reorderItem, items } = useItemOrder();
|
|
18
|
-
const [,
|
|
15
|
+
const [, setFlashedRow] = useFlashedRowContext();
|
|
19
16
|
useEffect(() => {
|
|
20
17
|
const scrollContainer = scrollElementRef.current;
|
|
21
18
|
assert(scrollContainer, 'Missing scroll container ref');
|
|
@@ -45,13 +42,13 @@ export function useDropMonitor(scrollElementRef, enabled) {
|
|
|
45
42
|
indexOfTarget,
|
|
46
43
|
closestEdgeOfTarget,
|
|
47
44
|
});
|
|
48
|
-
|
|
45
|
+
setFlashedRow(sourceData.id);
|
|
49
46
|
},
|
|
50
47
|
}), autoScrollForElements({
|
|
51
48
|
canScroll: canRespond,
|
|
52
49
|
element: scrollContainer,
|
|
53
50
|
}));
|
|
54
51
|
}
|
|
55
|
-
}, [items, reorderItem, scrollElementRef,
|
|
52
|
+
}, [items, reorderItem, scrollElementRef, setFlashedRow, enabled]);
|
|
56
53
|
}
|
|
57
54
|
//# sourceMappingURL=use_drop_monitor.js.map
|