@jetbrains/ring-ui-built 8.0.0-beta.13 → 8.0.0-beta.15
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/components/_helpers/table.js +1 -1
- package/components/auth/iframe-flow.js +0 -1
- package/components/auth-dialog/auth-dialog.js +0 -1
- package/components/auth-dialog-service/auth-dialog-service.js +0 -1
- package/components/collapsible-group/collapsible-group.d.ts +2 -1
- package/components/collapsible-group/collapsible-group.js +74 -77
- package/components/column-resize/column-group.js +69 -0
- package/components/column-resize/column-resize-drag.js +147 -0
- package/components/column-resize/column-resize-handle.js +86 -0
- package/components/column-resize/column-sizing-context.js +200 -0
- package/components/confirm/confirm.js +0 -1
- package/components/confirm-service/confirm-service.js +0 -1
- package/components/dialog/dialog.js +11 -2
- package/components/internal/column-indicator-vertical-span.js +23 -0
- package/components/internal/drag-auto-scroll.js +118 -0
- package/components/internal/reorder-handle.js +198 -210
- package/components/internal/table-header.js +152 -113
- package/components/island/content.d.ts +2 -4
- package/components/island/content.js +21 -21
- package/components/island/island.js +0 -1
- package/components/login-dialog/login-dialog.js +0 -1
- package/components/login-dialog/service.js +0 -1
- package/components/style.css +1 -1
- package/components/table/default-item-renderer.js +6 -4
- package/components/table/internal/column-indicator-vertical-span.d.ts +8 -0
- package/components/table/internal/column-resize/column-group.d.ts +8 -0
- package/components/table/internal/column-resize/column-resize-drag.d.ts +27 -0
- package/components/table/internal/column-resize/column-resize-handle.d.ts +5 -0
- package/components/table/internal/column-resize/column-sizing-context.d.ts +27 -0
- package/components/table/internal/drag-auto-scroll.d.ts +18 -0
- package/components/table/item-virtualization.d.ts +2 -1
- package/components/table/table-const.d.ts +6 -0
- package/components/table/table-const.js +7 -1
- package/components/table/table-primitives.js +2 -0
- package/components/table/table-props.d.ts +39 -0
- package/components/table/table.d.ts +8 -0
- package/components/table/table.js +239 -165
- package/components/user-agreement/service.js +0 -1
- package/components/user-agreement/user-agreement.js +0 -1
- package/package.json +1 -2
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
|
-
import { useRef, use, useEffectEvent, useEffect } from 'react';
|
|
2
|
+
import { useRef, use, useLayoutEffect, useEffectEvent, useEffect } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import dragIcon from '@jetbrains/icons/drag-12px';
|
|
5
|
-
import { TablePropsContext } from '../table/table-const.js';
|
|
5
|
+
import { TablePropsContext, itemBeingReorderedAttribute } from '../table/table-const.js';
|
|
6
6
|
import Icon from '../icon/icon.js';
|
|
7
7
|
import { useComposedRef } from '../global/compose-refs.js';
|
|
8
8
|
import { parseCssDuration } from '../global/parse-css-duration.js';
|
|
9
9
|
import { ReorderAnimationContext } from './reorder-animation-context.js';
|
|
10
10
|
import { ReorderLayoutContext } from './reorder-layout-context.js';
|
|
11
|
+
import { startDragAutoScroll } from './drag-auto-scroll.js';
|
|
12
|
+
import { getColumnIndicatorVerticalSpan } from './column-indicator-vertical-span.js';
|
|
11
13
|
import { s as styles } from '../_helpers/table.js';
|
|
12
14
|
import { jsx } from 'react/jsx-runtime';
|
|
13
15
|
import 'util-deprecate';
|
|
@@ -19,17 +21,14 @@ import '../global/schedule-with-cleanup.js';
|
|
|
19
21
|
|
|
20
22
|
const columnDragFrameAdjustmentPx = -1;
|
|
21
23
|
const itemDragFrameAdjustmentPx = -2;
|
|
22
|
-
const scrollAreaPx = 100;
|
|
23
|
-
const scrollStepPx = 100;
|
|
24
|
-
const scrollIntervalMs = 200;
|
|
25
24
|
function ReorderHandle(t0) {
|
|
26
25
|
var _columns$index$name;
|
|
27
|
-
const $ = c(
|
|
28
|
-
if ($[0] !== "
|
|
29
|
-
for (let $i = 0; $i <
|
|
26
|
+
const $ = c(118);
|
|
27
|
+
if ($[0] !== "9be7b418c8b1a4f630af091ae097a0074676d70f95ff9d04163ab1f0f6db4408") {
|
|
28
|
+
for (let $i = 0; $i < 118; $i += 1) {
|
|
30
29
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
31
30
|
}
|
|
32
|
-
$[0] = "
|
|
31
|
+
$[0] = "9be7b418c8b1a4f630af091ae097a0074676d70f95ff9d04163ab1f0f6db4408";
|
|
33
32
|
}
|
|
34
33
|
let className;
|
|
35
34
|
let direction;
|
|
@@ -322,8 +321,37 @@ function ReorderHandle(t0) {
|
|
|
322
321
|
}
|
|
323
322
|
const renderInsertionIndicator = t8;
|
|
324
323
|
let t9;
|
|
325
|
-
if ($[48] !==
|
|
326
|
-
t9 = function
|
|
324
|
+
if ($[48] !== getClosestInsertionPointLocal || $[49] !== renderInsertionIndicator || $[50] !== translateButton) {
|
|
325
|
+
t9 = function updateDragVisuals(clientX_2, clientY_2) {
|
|
326
|
+
translateButton(clientX_2, clientY_2);
|
|
327
|
+
const insertionPoint = getClosestInsertionPointLocal(clientX_2, clientY_2);
|
|
328
|
+
if (insertionPoint) {
|
|
329
|
+
renderInsertionIndicator(insertionPoint);
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
$[48] = getClosestInsertionPointLocal;
|
|
333
|
+
$[49] = renderInsertionIndicator;
|
|
334
|
+
$[50] = translateButton;
|
|
335
|
+
$[51] = t9;
|
|
336
|
+
} else {
|
|
337
|
+
t9 = $[51];
|
|
338
|
+
}
|
|
339
|
+
const updateDragVisuals = t9;
|
|
340
|
+
const updateDragVisualsRef = useRef(updateDragVisuals);
|
|
341
|
+
let t10;
|
|
342
|
+
if ($[52] !== updateDragVisuals) {
|
|
343
|
+
t10 = () => {
|
|
344
|
+
updateDragVisualsRef.current = updateDragVisuals;
|
|
345
|
+
};
|
|
346
|
+
$[52] = updateDragVisuals;
|
|
347
|
+
$[53] = t10;
|
|
348
|
+
} else {
|
|
349
|
+
t10 = $[53];
|
|
350
|
+
}
|
|
351
|
+
useLayoutEffect(t10);
|
|
352
|
+
let t11;
|
|
353
|
+
if ($[54] !== onUserDrag) {
|
|
354
|
+
t11 = function cleanupDrag() {
|
|
327
355
|
if (activeDragRef.current) {
|
|
328
356
|
activeDragRef.current.cleanup();
|
|
329
357
|
activeDragRef.current = null;
|
|
@@ -337,15 +365,15 @@ function ReorderHandle(t0) {
|
|
|
337
365
|
getInsertionIndicator()?.remove();
|
|
338
366
|
onUserDrag?.(undefined);
|
|
339
367
|
};
|
|
340
|
-
$[
|
|
341
|
-
$[
|
|
368
|
+
$[54] = onUserDrag;
|
|
369
|
+
$[55] = t11;
|
|
342
370
|
} else {
|
|
343
|
-
|
|
371
|
+
t11 = $[55];
|
|
344
372
|
}
|
|
345
|
-
const cleanupDrag =
|
|
346
|
-
let
|
|
347
|
-
if ($[
|
|
348
|
-
|
|
373
|
+
const cleanupDrag = t11;
|
|
374
|
+
let t12;
|
|
375
|
+
if ($[56] !== cleanupDrag || $[57] !== isColumn || $[58] !== onUserDrag) {
|
|
376
|
+
t12 = function animateNoChangeThenCleanup() {
|
|
349
377
|
const drag_2 = activeDragRef.current;
|
|
350
378
|
if (drag_2?.state !== "is-dragging") {
|
|
351
379
|
return;
|
|
@@ -380,28 +408,32 @@ function ReorderHandle(t0) {
|
|
|
380
408
|
const ringEaseMs = parseCssDuration(window.getComputedStyle(document.documentElement).getPropertyValue("--ring-ease"));
|
|
381
409
|
setTimeout(cleanupDrag, ringEaseMs);
|
|
382
410
|
};
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
411
|
+
$[56] = cleanupDrag;
|
|
412
|
+
$[57] = isColumn;
|
|
413
|
+
$[58] = onUserDrag;
|
|
414
|
+
$[59] = t12;
|
|
387
415
|
} else {
|
|
388
|
-
|
|
416
|
+
t12 = $[59];
|
|
389
417
|
}
|
|
390
|
-
const animateNoChangeThenCleanup =
|
|
391
|
-
let
|
|
392
|
-
if ($[
|
|
393
|
-
|
|
418
|
+
const animateNoChangeThenCleanup = t12;
|
|
419
|
+
let t13;
|
|
420
|
+
if ($[60] !== animateNoChangeThenCleanup || $[61] !== getItemBounds || $[62] !== index || $[63] !== isColumn || $[64] !== onPointerDown || $[65] !== onUserDrag || $[66] !== renderDragFrame || $[67] !== tableProps?.scrollerRef?.current) {
|
|
421
|
+
t13 = function handlePointerDown(e) {
|
|
394
422
|
var _getItemBounds2;
|
|
395
423
|
onPointerDown?.(e);
|
|
396
|
-
if (e.defaultPrevented) {
|
|
424
|
+
if (e.defaultPrevented || activeDragRef.current) {
|
|
397
425
|
return;
|
|
398
426
|
}
|
|
399
427
|
const {
|
|
400
|
-
clientX:
|
|
401
|
-
clientY:
|
|
428
|
+
clientX: clientX_3,
|
|
429
|
+
clientY: clientY_3,
|
|
402
430
|
pointerId,
|
|
403
431
|
currentTarget
|
|
404
432
|
} = e;
|
|
433
|
+
const table = currentTarget.closest("table");
|
|
434
|
+
if (!table) {
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
405
437
|
const {
|
|
406
438
|
start: initialItemStart_2,
|
|
407
439
|
end: initialItemEnd_0
|
|
@@ -411,22 +443,14 @@ function ReorderHandle(t0) {
|
|
|
411
443
|
};
|
|
412
444
|
let indicatorStart_1;
|
|
413
445
|
let indicatorSize_1;
|
|
446
|
+
let itemRow;
|
|
414
447
|
if (isColumn) {
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
if (!thead || !table) {
|
|
448
|
+
const span = getColumnIndicatorVerticalSpan(currentTarget);
|
|
449
|
+
if (!span) {
|
|
418
450
|
return;
|
|
419
451
|
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
} = thead.getBoundingClientRect();
|
|
423
|
-
indicatorStart_1 = headerTop;
|
|
424
|
-
const {
|
|
425
|
-
bottom: tableBottom
|
|
426
|
-
} = table.getBoundingClientRect();
|
|
427
|
-
const visibleTableHeight = tableBottom - headerTop;
|
|
428
|
-
const viewportBottomRelativeToHeaderTop = window.innerHeight - headerTop;
|
|
429
|
-
indicatorSize_1 = `min(${visibleTableHeight}px, calc(${viewportBottomRelativeToHeaderTop}px - .5rem))`;
|
|
452
|
+
indicatorStart_1 = span.top;
|
|
453
|
+
indicatorSize_1 = span.height;
|
|
430
454
|
} else {
|
|
431
455
|
const tr = currentTarget.closest("tr");
|
|
432
456
|
const tbody = tr?.closest("tbody");
|
|
@@ -441,6 +465,7 @@ function ReorderHandle(t0) {
|
|
|
441
465
|
const visibleItemWidth = itemRight - itemLeft;
|
|
442
466
|
const viewportRightRelativeToTableLeft = window.innerWidth - itemLeft;
|
|
443
467
|
indicatorSize_1 = `min(${visibleItemWidth}px, calc(${viewportRightRelativeToTableLeft}px - .5rem))`;
|
|
468
|
+
itemRow = tr;
|
|
444
469
|
}
|
|
445
470
|
const keydownListener = function keydownListener(keyEvent) {
|
|
446
471
|
if (keyEvent.key === "Escape") {
|
|
@@ -452,62 +477,45 @@ function ReorderHandle(t0) {
|
|
|
452
477
|
currentTarget.setPointerCapture(pointerId);
|
|
453
478
|
document.addEventListener("keydown", keydownListener);
|
|
454
479
|
currentTarget.style.cursor = "grabbing";
|
|
480
|
+
const autoScroll = startDragAutoScroll(isColumn ? "x" : "y", table, isColumn ? undefined : tableProps?.scrollerRef?.current, (x, y) => updateDragVisualsRef.current(x, y));
|
|
481
|
+
itemRow?.setAttribute(itemBeingReorderedAttribute, "");
|
|
455
482
|
activeDragRef.current = {
|
|
456
483
|
state: "is-dragging",
|
|
457
|
-
startX:
|
|
458
|
-
startY:
|
|
484
|
+
startX: clientX_3,
|
|
485
|
+
startY: clientY_3,
|
|
459
486
|
initialItemStart: initialItemStart_2,
|
|
460
487
|
initialItemEnd: initialItemEnd_0,
|
|
461
488
|
indicatorStart: indicatorStart_1,
|
|
462
489
|
indicatorSize: indicatorSize_1,
|
|
490
|
+
autoScroll,
|
|
463
491
|
cleanup: () => {
|
|
492
|
+
autoScroll.stop();
|
|
493
|
+
itemRow?.removeAttribute(itemBeingReorderedAttribute);
|
|
464
494
|
currentTarget.releasePointerCapture(pointerId);
|
|
465
495
|
document.removeEventListener("keydown", keydownListener);
|
|
466
496
|
currentTarget.style.removeProperty("cursor");
|
|
467
497
|
}
|
|
468
498
|
};
|
|
469
|
-
renderDragFrame(
|
|
499
|
+
renderDragFrame(clientX_3, clientY_3);
|
|
470
500
|
onUserDrag?.("pointerdown");
|
|
471
501
|
e.preventDefault();
|
|
472
502
|
};
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
$[
|
|
503
|
+
$[60] = animateNoChangeThenCleanup;
|
|
504
|
+
$[61] = getItemBounds;
|
|
505
|
+
$[62] = index;
|
|
506
|
+
$[63] = isColumn;
|
|
507
|
+
$[64] = onPointerDown;
|
|
508
|
+
$[65] = onUserDrag;
|
|
509
|
+
$[66] = renderDragFrame;
|
|
510
|
+
$[67] = tableProps?.scrollerRef?.current;
|
|
511
|
+
$[68] = t13;
|
|
481
512
|
} else {
|
|
482
|
-
|
|
513
|
+
t13 = $[68];
|
|
483
514
|
}
|
|
484
|
-
const handlePointerDown =
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
if ($[62] !== scrollerRef?.current) {
|
|
489
|
-
t12 = function scrollThrottled(scrollDirection) {
|
|
490
|
-
const now = performance.now();
|
|
491
|
-
if (now > lastScrolledRef.current + scrollIntervalMs) {
|
|
492
|
-
var _scrollerRef$current;
|
|
493
|
-
lastScrolledRef.current = now;
|
|
494
|
-
const top = scrollDirection === "up" ? -scrollStepPx : scrollStepPx;
|
|
495
|
-
const scroller = (_scrollerRef$current = scrollerRef?.current) !== null && _scrollerRef$current !== void 0 ? _scrollerRef$current : window;
|
|
496
|
-
scroller?.scrollBy({
|
|
497
|
-
top,
|
|
498
|
-
behavior: "smooth"
|
|
499
|
-
});
|
|
500
|
-
}
|
|
501
|
-
};
|
|
502
|
-
$[62] = scrollerRef?.current;
|
|
503
|
-
$[63] = t12;
|
|
504
|
-
} else {
|
|
505
|
-
t12 = $[63];
|
|
506
|
-
}
|
|
507
|
-
const scrollThrottled = t12;
|
|
508
|
-
let t13;
|
|
509
|
-
if ($[64] !== getClosestInsertionPointLocal || $[65] !== isColumn || $[66] !== onPointerMove || $[67] !== onUserDrag || $[68] !== renderDragFrame || $[69] !== renderInsertionIndicator || $[70] !== scrollThrottled || $[71] !== scrollerRef?.current || $[72] !== translateButton) {
|
|
510
|
-
t13 = function handlePointerMove(e_0) {
|
|
515
|
+
const handlePointerDown = t13;
|
|
516
|
+
let t14;
|
|
517
|
+
if ($[69] !== isColumn || $[70] !== onPointerMove || $[71] !== onUserDrag || $[72] !== renderDragFrame || $[73] !== updateDragVisuals) {
|
|
518
|
+
t14 = function handlePointerMove(e_0) {
|
|
511
519
|
onPointerMove?.(e_0);
|
|
512
520
|
if (e_0.defaultPrevented) {
|
|
513
521
|
return;
|
|
@@ -517,47 +525,27 @@ function ReorderHandle(t0) {
|
|
|
517
525
|
return;
|
|
518
526
|
}
|
|
519
527
|
const {
|
|
520
|
-
clientX:
|
|
521
|
-
clientY:
|
|
528
|
+
clientX: clientX_4,
|
|
529
|
+
clientY: clientY_4
|
|
522
530
|
} = e_0;
|
|
523
|
-
renderDragFrame(
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
renderInsertionIndicator(insertionPoint);
|
|
528
|
-
}
|
|
529
|
-
onUserDrag?.(isColumn ? clientX_3 - drag_3.startX : clientY_3 - drag_3.startY);
|
|
530
|
-
if (!isColumn) {
|
|
531
|
-
var _scrollerRect$top;
|
|
532
|
-
const scrollerRect = scrollerRef?.current?.getBoundingClientRect();
|
|
533
|
-
const scrollerTop = (_scrollerRect$top = scrollerRect?.top) !== null && _scrollerRect$top !== void 0 ? _scrollerRect$top : 0;
|
|
534
|
-
const scrollerBottom = scrollerRect ? Math.min(scrollerRect.bottom, window.innerHeight) : window.innerHeight;
|
|
535
|
-
if (clientY_3 < scrollerTop + scrollAreaPx) {
|
|
536
|
-
scrollThrottled("up");
|
|
537
|
-
} else {
|
|
538
|
-
if (clientY_3 > scrollerBottom - scrollAreaPx) {
|
|
539
|
-
scrollThrottled("down");
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
}
|
|
531
|
+
renderDragFrame(clientX_4, clientY_4);
|
|
532
|
+
updateDragVisuals(clientX_4, clientY_4);
|
|
533
|
+
onUserDrag?.(isColumn ? clientX_4 - drag_3.startX : clientY_4 - drag_3.startY);
|
|
534
|
+
drag_3.autoScroll.update(clientX_4, clientY_4);
|
|
543
535
|
};
|
|
544
|
-
$[
|
|
545
|
-
$[
|
|
546
|
-
$[
|
|
547
|
-
$[
|
|
548
|
-
$[
|
|
549
|
-
$[
|
|
550
|
-
$[70] = scrollThrottled;
|
|
551
|
-
$[71] = scrollerRef?.current;
|
|
552
|
-
$[72] = translateButton;
|
|
553
|
-
$[73] = t13;
|
|
536
|
+
$[69] = isColumn;
|
|
537
|
+
$[70] = onPointerMove;
|
|
538
|
+
$[71] = onUserDrag;
|
|
539
|
+
$[72] = renderDragFrame;
|
|
540
|
+
$[73] = updateDragVisuals;
|
|
541
|
+
$[74] = t14;
|
|
554
542
|
} else {
|
|
555
|
-
|
|
543
|
+
t14 = $[74];
|
|
556
544
|
}
|
|
557
|
-
const handlePointerMove =
|
|
558
|
-
let
|
|
559
|
-
if ($[
|
|
560
|
-
|
|
545
|
+
const handlePointerMove = t14;
|
|
546
|
+
let t15;
|
|
547
|
+
if ($[75] !== animateNoChangeThenCleanup || $[76] !== cleanupDrag || $[77] !== getClosestInsertionPointLocal || $[78] !== index || $[79] !== onPointerUp || $[80] !== onReorder) {
|
|
548
|
+
t15 = function handlePointerUp(e_1) {
|
|
561
549
|
onPointerUp?.(e_1);
|
|
562
550
|
if (e_1.defaultPrevented) {
|
|
563
551
|
return;
|
|
@@ -566,10 +554,10 @@ function ReorderHandle(t0) {
|
|
|
566
554
|
return;
|
|
567
555
|
}
|
|
568
556
|
const {
|
|
569
|
-
clientX:
|
|
570
|
-
clientY:
|
|
557
|
+
clientX: clientX_5,
|
|
558
|
+
clientY: clientY_5
|
|
571
559
|
} = e_1;
|
|
572
|
-
const insertionPoint_0 = getClosestInsertionPointLocal(
|
|
560
|
+
const insertionPoint_0 = getClosestInsertionPointLocal(clientX_5, clientY_5);
|
|
573
561
|
const insertionIndex_1 = insertionPoint_0 && insertionPoint_0.itemIndex + (insertionPoint_0.after ? 1 : 0);
|
|
574
562
|
if (insertionIndex_1 == null || insertionIndex_1 === index || insertionIndex_1 === index + 1) {
|
|
575
563
|
animateNoChangeThenCleanup();
|
|
@@ -578,20 +566,20 @@ function ReorderHandle(t0) {
|
|
|
578
566
|
cleanupDrag();
|
|
579
567
|
onReorder(insertionIndex_1);
|
|
580
568
|
};
|
|
581
|
-
$[
|
|
582
|
-
$[
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
585
|
-
$[
|
|
586
|
-
$[
|
|
587
|
-
$[
|
|
569
|
+
$[75] = animateNoChangeThenCleanup;
|
|
570
|
+
$[76] = cleanupDrag;
|
|
571
|
+
$[77] = getClosestInsertionPointLocal;
|
|
572
|
+
$[78] = index;
|
|
573
|
+
$[79] = onPointerUp;
|
|
574
|
+
$[80] = onReorder;
|
|
575
|
+
$[81] = t15;
|
|
588
576
|
} else {
|
|
589
|
-
|
|
577
|
+
t15 = $[81];
|
|
590
578
|
}
|
|
591
|
-
const handlePointerUp =
|
|
592
|
-
let
|
|
593
|
-
if ($[
|
|
594
|
-
|
|
579
|
+
const handlePointerUp = t15;
|
|
580
|
+
let t16;
|
|
581
|
+
if ($[82] !== canReorder || $[83] !== columns || $[84] !== data || $[85] !== index || $[86] !== isColumn || $[87] !== onKeyDown || $[88] !== onReorder) {
|
|
582
|
+
t16 = function handleKeyDown(e_2) {
|
|
595
583
|
onKeyDown?.(e_2);
|
|
596
584
|
if (e_2.defaultPrevented) {
|
|
597
585
|
return;
|
|
@@ -615,106 +603,106 @@ function ReorderHandle(t0) {
|
|
|
615
603
|
}
|
|
616
604
|
}
|
|
617
605
|
};
|
|
618
|
-
$[
|
|
619
|
-
$[
|
|
620
|
-
$[
|
|
621
|
-
$[
|
|
622
|
-
$[
|
|
623
|
-
$[
|
|
624
|
-
$[
|
|
625
|
-
$[
|
|
606
|
+
$[82] = canReorder;
|
|
607
|
+
$[83] = columns;
|
|
608
|
+
$[84] = data;
|
|
609
|
+
$[85] = index;
|
|
610
|
+
$[86] = isColumn;
|
|
611
|
+
$[87] = onKeyDown;
|
|
612
|
+
$[88] = onReorder;
|
|
613
|
+
$[89] = t16;
|
|
626
614
|
} else {
|
|
627
|
-
|
|
615
|
+
t16 = $[89];
|
|
628
616
|
}
|
|
629
|
-
const handleKeyDown =
|
|
630
|
-
let
|
|
631
|
-
if ($[
|
|
632
|
-
|
|
617
|
+
const handleKeyDown = t16;
|
|
618
|
+
let t17;
|
|
619
|
+
if ($[90] !== animateNoChangeThenCleanup || $[91] !== onPointerCancel) {
|
|
620
|
+
t17 = function handlePointerCancel(e_3) {
|
|
633
621
|
onPointerCancel?.(e_3);
|
|
634
622
|
if (!e_3.defaultPrevented) {
|
|
635
623
|
animateNoChangeThenCleanup();
|
|
636
624
|
}
|
|
637
625
|
};
|
|
638
|
-
$[
|
|
639
|
-
$[
|
|
640
|
-
$[
|
|
626
|
+
$[90] = animateNoChangeThenCleanup;
|
|
627
|
+
$[91] = onPointerCancel;
|
|
628
|
+
$[92] = t17;
|
|
641
629
|
} else {
|
|
642
|
-
|
|
630
|
+
t17 = $[92];
|
|
643
631
|
}
|
|
644
|
-
const handlePointerCancel =
|
|
645
|
-
let
|
|
646
|
-
if ($[
|
|
647
|
-
|
|
632
|
+
const handlePointerCancel = t17;
|
|
633
|
+
let t18;
|
|
634
|
+
if ($[93] !== animateNoChangeThenCleanup || $[94] !== onLostPointerCapture) {
|
|
635
|
+
t18 = function handleLostPointerCapture(e_4) {
|
|
648
636
|
onLostPointerCapture?.(e_4);
|
|
649
637
|
if (!e_4.defaultPrevented) {
|
|
650
638
|
animateNoChangeThenCleanup();
|
|
651
639
|
}
|
|
652
640
|
};
|
|
653
|
-
$[
|
|
654
|
-
$[
|
|
655
|
-
$[
|
|
641
|
+
$[93] = animateNoChangeThenCleanup;
|
|
642
|
+
$[94] = onLostPointerCapture;
|
|
643
|
+
$[95] = t18;
|
|
656
644
|
} else {
|
|
657
|
-
|
|
645
|
+
t18 = $[95];
|
|
658
646
|
}
|
|
659
|
-
const handleLostPointerCapture =
|
|
660
|
-
let
|
|
661
|
-
if ($[
|
|
662
|
-
|
|
647
|
+
const handleLostPointerCapture = t18;
|
|
648
|
+
let t19;
|
|
649
|
+
if ($[96] !== cleanupDrag) {
|
|
650
|
+
t19 = () => {
|
|
663
651
|
if (activeDragRef.current) {
|
|
664
652
|
cleanupDrag();
|
|
665
653
|
}
|
|
666
654
|
};
|
|
667
|
-
$[
|
|
668
|
-
$[
|
|
655
|
+
$[96] = cleanupDrag;
|
|
656
|
+
$[97] = t19;
|
|
669
657
|
} else {
|
|
670
|
-
|
|
671
|
-
}
|
|
672
|
-
const cleanupComponent = useEffectEvent(t18);
|
|
673
|
-
let t19;
|
|
674
|
-
if ($[97] !== cleanupComponent) {
|
|
675
|
-
t19 = () => cleanupComponent;
|
|
676
|
-
$[97] = cleanupComponent;
|
|
677
|
-
$[98] = t19;
|
|
678
|
-
} else {
|
|
679
|
-
t19 = $[98];
|
|
658
|
+
t19 = $[97];
|
|
680
659
|
}
|
|
660
|
+
const cleanupComponent = useEffectEvent(t19);
|
|
681
661
|
let t20;
|
|
682
|
-
if ($[
|
|
683
|
-
t20 =
|
|
662
|
+
if ($[98] !== cleanupComponent) {
|
|
663
|
+
t20 = () => cleanupComponent;
|
|
664
|
+
$[98] = cleanupComponent;
|
|
684
665
|
$[99] = t20;
|
|
685
666
|
} else {
|
|
686
667
|
t20 = $[99];
|
|
687
668
|
}
|
|
688
|
-
|
|
669
|
+
let t21;
|
|
670
|
+
if ($[100] === Symbol.for("react.memo_cache_sentinel")) {
|
|
671
|
+
t21 = [];
|
|
672
|
+
$[100] = t21;
|
|
673
|
+
} else {
|
|
674
|
+
t21 = $[100];
|
|
675
|
+
}
|
|
676
|
+
useEffect(t20, t21);
|
|
689
677
|
const hint = isColumn ? `Reorder column ${(_columns$index$name = columns?.[index]?.name) !== null && _columns$index$name !== void 0 ? _columns$index$name : String(columns?.[index]?.key)}.` : `Reorder item ${index + 1}.`;
|
|
690
678
|
const description = isColumn ? "Use Left and Right arrow keys to move the column." : "Use Up and Down arrow keys to move the item.";
|
|
691
679
|
const shortcuts = isColumn ? "ArrowLeft ArrowRight" : "ArrowUp ArrowDown";
|
|
692
|
-
const
|
|
693
|
-
let
|
|
694
|
-
if ($[
|
|
695
|
-
|
|
696
|
-
$[
|
|
697
|
-
$[101] = t21;
|
|
680
|
+
const t22 = isColumn ? styles.columnReorderHandle : styles.itemReorderHandle;
|
|
681
|
+
let t23;
|
|
682
|
+
if ($[101] !== className || $[102] !== t22) {
|
|
683
|
+
t23 = classNames(styles.tableButton, t22, className);
|
|
684
|
+
$[101] = className;
|
|
698
685
|
$[102] = t22;
|
|
686
|
+
$[103] = t23;
|
|
699
687
|
} else {
|
|
700
|
-
|
|
688
|
+
t23 = $[103];
|
|
701
689
|
}
|
|
702
|
-
let
|
|
703
|
-
if ($[
|
|
704
|
-
|
|
690
|
+
let t24;
|
|
691
|
+
if ($[104] === Symbol.for("react.memo_cache_sentinel")) {
|
|
692
|
+
t24 = /*#__PURE__*/jsx(Icon, {
|
|
705
693
|
glyph: dragIcon,
|
|
706
694
|
"aria-hidden": "true"
|
|
707
695
|
});
|
|
708
|
-
$[
|
|
696
|
+
$[104] = t24;
|
|
709
697
|
} else {
|
|
710
|
-
|
|
698
|
+
t24 = $[104];
|
|
711
699
|
}
|
|
712
|
-
let
|
|
713
|
-
if ($[
|
|
714
|
-
|
|
700
|
+
let t25;
|
|
701
|
+
if ($[105] !== composedRef || $[106] !== description || $[107] !== handleKeyDown || $[108] !== handleLostPointerCapture || $[109] !== handlePointerCancel || $[110] !== handlePointerDown || $[111] !== handlePointerMove || $[112] !== handlePointerUp || $[113] !== hint || $[114] !== restProps || $[115] !== shortcuts || $[116] !== t23) {
|
|
702
|
+
t25 = /*#__PURE__*/jsx("button", {
|
|
715
703
|
ref: composedRef,
|
|
716
704
|
type: "button",
|
|
717
|
-
className:
|
|
705
|
+
className: t23,
|
|
718
706
|
"aria-label": hint,
|
|
719
707
|
"aria-description": description,
|
|
720
708
|
"aria-keyshortcuts": shortcuts,
|
|
@@ -725,25 +713,25 @@ function ReorderHandle(t0) {
|
|
|
725
713
|
onPointerCancel: handlePointerCancel,
|
|
726
714
|
onLostPointerCapture: handleLostPointerCapture,
|
|
727
715
|
...restProps,
|
|
728
|
-
children:
|
|
716
|
+
children: t24
|
|
729
717
|
});
|
|
730
|
-
$[
|
|
731
|
-
$[
|
|
732
|
-
$[
|
|
733
|
-
$[
|
|
734
|
-
$[
|
|
735
|
-
$[
|
|
736
|
-
$[
|
|
737
|
-
$[
|
|
738
|
-
$[
|
|
739
|
-
$[
|
|
740
|
-
$[
|
|
741
|
-
$[
|
|
742
|
-
$[
|
|
718
|
+
$[105] = composedRef;
|
|
719
|
+
$[106] = description;
|
|
720
|
+
$[107] = handleKeyDown;
|
|
721
|
+
$[108] = handleLostPointerCapture;
|
|
722
|
+
$[109] = handlePointerCancel;
|
|
723
|
+
$[110] = handlePointerDown;
|
|
724
|
+
$[111] = handlePointerMove;
|
|
725
|
+
$[112] = handlePointerUp;
|
|
726
|
+
$[113] = hint;
|
|
727
|
+
$[114] = restProps;
|
|
728
|
+
$[115] = shortcuts;
|
|
729
|
+
$[116] = t23;
|
|
730
|
+
$[117] = t25;
|
|
743
731
|
} else {
|
|
744
|
-
|
|
732
|
+
t25 = $[117];
|
|
745
733
|
}
|
|
746
|
-
return
|
|
734
|
+
return t25;
|
|
747
735
|
}
|
|
748
736
|
function _temp() {}
|
|
749
737
|
|