@react-spectrum/table 3.5.1-nightly.3599 → 3.5.1-nightly.3600
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css +1 -1
- package/dist/main.js +390 -364
- package/dist/main.js.map +1 -1
- package/dist/module.mjs +390 -364
- package/dist/module.mjs.map +1 -1
- package/package.json +28 -28
package/dist/module.mjs
CHANGED
|
@@ -26,8 +26,28 @@ function $parcel$interopDefault(a) {
|
|
|
26
26
|
function $parcel$export(e, n, v, s) {
|
|
27
27
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
/*
|
|
30
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
31
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
32
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
33
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
34
|
+
*
|
|
35
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
36
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
37
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
38
|
+
* governing permissions and limitations under the License.
|
|
39
|
+
*/ /// <reference types="css-module-types" />
|
|
40
|
+
/*
|
|
41
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
42
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
43
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
44
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
45
|
+
*
|
|
46
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
47
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
48
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
49
|
+
* governing permissions and limitations under the License.
|
|
50
|
+
*/
|
|
31
51
|
|
|
32
52
|
|
|
33
53
|
|
|
@@ -449,33 +469,43 @@ $467944769c14687b$exports = {
|
|
|
449
469
|
|
|
450
470
|
|
|
451
471
|
|
|
452
|
-
|
|
472
|
+
/*
|
|
473
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
474
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
475
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
476
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
477
|
+
*
|
|
478
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
479
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
480
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
481
|
+
* governing permissions and limitations under the License.
|
|
482
|
+
*/
|
|
453
483
|
function $cb7d341e8868d81d$export$d9658cdf8c86807() {
|
|
454
|
-
return
|
|
484
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement("svg", {
|
|
455
485
|
xmlns: "http://www.w3.org/2000/svg",
|
|
456
486
|
width: "16",
|
|
457
487
|
height: "16",
|
|
458
488
|
viewBox: "0 0 16 16"
|
|
459
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement("g", {
|
|
489
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement("g", {
|
|
460
490
|
id: "Group_175838",
|
|
461
491
|
"data-name": "Group 175838"
|
|
462
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement("g", {
|
|
492
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement("g", {
|
|
463
493
|
id: "Ellipse_10104",
|
|
464
494
|
"data-name": "Ellipse 10104",
|
|
465
495
|
fill: "var(--spectrum-global-color-blue-600)",
|
|
466
496
|
stroke: "var(--spectrum-global-color-blue-600)",
|
|
467
497
|
strokeWidth: "2"
|
|
468
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement("circle", {
|
|
498
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement("circle", {
|
|
469
499
|
cx: "8",
|
|
470
500
|
cy: "8",
|
|
471
501
|
r: "8",
|
|
472
502
|
stroke: "none"
|
|
473
|
-
}), /*#__PURE__*/ $gyhAV$react.createElement("circle", {
|
|
503
|
+
}), /*#__PURE__*/ (0, $gyhAV$react).createElement("circle", {
|
|
474
504
|
cx: "8",
|
|
475
505
|
cy: "8",
|
|
476
506
|
r: "7",
|
|
477
507
|
fill: "none"
|
|
478
|
-
}))), /*#__PURE__*/ $gyhAV$react.createElement("path", {
|
|
508
|
+
}))), /*#__PURE__*/ (0, $gyhAV$react).createElement("path", {
|
|
479
509
|
id: "Path_104166",
|
|
480
510
|
"data-name": "Path 104166",
|
|
481
511
|
d: "M-2106-7380.263v5l2.5-2.551Z",
|
|
@@ -484,7 +514,7 @@ function $cb7d341e8868d81d$export$d9658cdf8c86807() {
|
|
|
484
514
|
stroke: "#fff",
|
|
485
515
|
strokeLinejoin: "round",
|
|
486
516
|
strokeWidth: "2"
|
|
487
|
-
}), /*#__PURE__*/ $gyhAV$react.createElement("path", {
|
|
517
|
+
}), /*#__PURE__*/ (0, $gyhAV$react).createElement("path", {
|
|
488
518
|
id: "Path_104167",
|
|
489
519
|
"data-name": "Path 104167",
|
|
490
520
|
d: "M-2106-7380.263v5l2.5-2.551Z",
|
|
@@ -493,14 +523,14 @@ function $cb7d341e8868d81d$export$d9658cdf8c86807() {
|
|
|
493
523
|
stroke: "#fff",
|
|
494
524
|
strokeLinejoin: "round",
|
|
495
525
|
strokeWidth: "2"
|
|
496
|
-
}))
|
|
526
|
+
}));
|
|
497
527
|
}
|
|
498
528
|
|
|
499
529
|
|
|
500
530
|
|
|
501
531
|
|
|
502
532
|
|
|
503
|
-
|
|
533
|
+
/* eslint-disable jsx-a11y/role-supports-aria-props */
|
|
504
534
|
|
|
505
535
|
|
|
506
536
|
|
|
@@ -682,61 +712,61 @@ $bd5d41f647a296c3$export$d3861fcb1e5f6a2b = "spectrum-Table-colResizeIndicator--
|
|
|
682
712
|
|
|
683
713
|
function $fc695d2eafc2b351$var$Resizer(props, ref) {
|
|
684
714
|
let { column: column , showResizer: showResizer } = props;
|
|
685
|
-
let { state: state , columnState: columnState , isEmpty: isEmpty } = $d14697b14e638114$export$3cb274deb6c2d854();
|
|
686
|
-
let stringFormatter = $gyhAV$useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($467944769c14687b$exports)));
|
|
687
|
-
let { direction: direction } = $gyhAV$useLocale();
|
|
688
|
-
const stateRef = $gyhAV$useRef(null);
|
|
715
|
+
let { state: state , columnState: columnState , isEmpty: isEmpty } = (0, $d14697b14e638114$export$3cb274deb6c2d854)();
|
|
716
|
+
let stringFormatter = (0, $gyhAV$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($467944769c14687b$exports))));
|
|
717
|
+
let { direction: direction } = (0, $gyhAV$useLocale)();
|
|
718
|
+
const stateRef = (0, $gyhAV$useRef)(null);
|
|
689
719
|
stateRef.current = columnState;
|
|
690
|
-
let { inputProps: inputProps , resizerProps: resizerProps } = $gyhAV$useTableColumnResize({
|
|
720
|
+
let { inputProps: inputProps , resizerProps: resizerProps } = (0, $gyhAV$useTableColumnResize)({
|
|
691
721
|
...props,
|
|
692
|
-
label: stringFormatter.format(
|
|
722
|
+
label: stringFormatter.format("columnResizer"),
|
|
693
723
|
isDisabled: isEmpty,
|
|
694
724
|
onMove: (e)=>{
|
|
695
|
-
document.body.classList.remove($gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
696
|
-
document.body.classList.remove($gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
697
|
-
document.body.classList.remove($gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
698
|
-
if (stateRef.current.getColumnMinWidth(column.key) >= stateRef.current.getColumnWidth(column.key)) document.body.classList.add(direction ===
|
|
699
|
-
else if (stateRef.current.getColumnMaxWidth(column.key) <= stateRef.current.getColumnWidth(column.key)) document.body.classList.add(direction ===
|
|
700
|
-
else document.body.classList.add($gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
725
|
+
document.body.classList.remove((0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "resize-ew"));
|
|
726
|
+
document.body.classList.remove((0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "resize-e"));
|
|
727
|
+
document.body.classList.remove((0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "resize-w"));
|
|
728
|
+
if (stateRef.current.getColumnMinWidth(column.key) >= stateRef.current.getColumnWidth(column.key)) document.body.classList.add(direction === "rtl" ? (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "resize-w") : (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "resize-e"));
|
|
729
|
+
else if (stateRef.current.getColumnMaxWidth(column.key) <= stateRef.current.getColumnWidth(column.key)) document.body.classList.add(direction === "rtl" ? (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "resize-e") : (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "resize-w"));
|
|
730
|
+
else document.body.classList.add((0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "resize-ew"));
|
|
701
731
|
props.onMoveResizer(e);
|
|
702
732
|
},
|
|
703
733
|
onMoveEnd: ()=>{
|
|
704
|
-
document.body.classList.remove($gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
705
|
-
document.body.classList.remove($gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
706
|
-
document.body.classList.remove($gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
734
|
+
document.body.classList.remove((0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "resize-ew"));
|
|
735
|
+
document.body.classList.remove((0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "resize-e"));
|
|
736
|
+
document.body.classList.remove((0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "resize-w"));
|
|
707
737
|
}
|
|
708
738
|
}, state, columnState, ref);
|
|
709
739
|
let style = {
|
|
710
740
|
cursor: undefined,
|
|
711
|
-
height:
|
|
712
|
-
display: showResizer ? undefined :
|
|
713
|
-
touchAction:
|
|
741
|
+
height: "100%",
|
|
742
|
+
display: showResizer ? undefined : "none",
|
|
743
|
+
touchAction: "none"
|
|
714
744
|
};
|
|
715
745
|
let isEResizable = columnState.getColumnMinWidth(column.key) >= columnState.getColumnWidth(column.key);
|
|
716
746
|
let isWResizable = columnState.getColumnMaxWidth(column.key) <= columnState.getColumnWidth(column.key);
|
|
717
|
-
return
|
|
747
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$react).Fragment, null, /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$FocusRing), {
|
|
718
748
|
within: true,
|
|
719
|
-
focusRingClass: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
720
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement("div", {
|
|
749
|
+
focusRingClass: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "focus-ring")
|
|
750
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
721
751
|
role: "presentation",
|
|
722
752
|
style: style,
|
|
723
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
753
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-columnResizer", {
|
|
754
|
+
"spectrum-Table-columnResizer--ewresize": !(isEResizable && isWResizable),
|
|
755
|
+
"spectrum-Table-columnResizer--eresize": direction === "rtl" ? isWResizable : isEResizable,
|
|
756
|
+
"spectrum-Table-columnResizer--wresize": direction === "rtl" ? isEResizable : isWResizable
|
|
727
757
|
}),
|
|
728
758
|
...resizerProps
|
|
729
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement($gyhAV$VisuallyHidden, null, /*#__PURE__*/ $gyhAV$react.createElement("input", {
|
|
759
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$VisuallyHidden), null, /*#__PURE__*/ (0, $gyhAV$react).createElement("input", {
|
|
730
760
|
ref: ref,
|
|
731
761
|
type: "range",
|
|
732
762
|
...inputProps
|
|
733
|
-
})))), /*#__PURE__*/ $gyhAV$react.createElement("div", {
|
|
763
|
+
})))), /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
734
764
|
"aria-hidden": true,
|
|
735
765
|
role: "presentation",
|
|
736
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
737
|
-
}))
|
|
766
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-columnResizerPlaceholder")
|
|
767
|
+
}));
|
|
738
768
|
}
|
|
739
|
-
const $fc695d2eafc2b351$export$48a76196cafe3b93 = /*#__PURE__*/ $gyhAV$react.forwardRef($fc695d2eafc2b351$var$Resizer);
|
|
769
|
+
const $fc695d2eafc2b351$export$48a76196cafe3b93 = /*#__PURE__*/ (0, $gyhAV$react).forwardRef($fc695d2eafc2b351$var$Resizer);
|
|
740
770
|
|
|
741
771
|
|
|
742
772
|
|
|
@@ -799,18 +829,18 @@ const $d14697b14e638114$var$SELECTION_CELL_DEFAULT_WIDTH = {
|
|
|
799
829
|
medium: 38,
|
|
800
830
|
large: 48
|
|
801
831
|
};
|
|
802
|
-
const $d14697b14e638114$var$TableContext = /*#__PURE__*/ $gyhAV$react.createContext(null);
|
|
832
|
+
const $d14697b14e638114$var$TableContext = /*#__PURE__*/ (0, $gyhAV$react).createContext(null);
|
|
803
833
|
function $d14697b14e638114$export$3cb274deb6c2d854() {
|
|
804
|
-
return $gyhAV$useContext($d14697b14e638114$var$TableContext);
|
|
834
|
+
return (0, $gyhAV$useContext)($d14697b14e638114$var$TableContext);
|
|
805
835
|
}
|
|
806
836
|
function $d14697b14e638114$var$TableView(props, ref) {
|
|
807
|
-
props = $gyhAV$useProviderProps(props);
|
|
837
|
+
props = (0, $gyhAV$useProviderProps)(props);
|
|
808
838
|
let { isQuiet: isQuiet , onAction: onAction } = props;
|
|
809
|
-
let { styleProps: styleProps } = $gyhAV$useStyleProps(props);
|
|
810
|
-
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = $gyhAV$useState(props.selectionStyle !==
|
|
811
|
-
let { direction: direction } = $gyhAV$useLocale();
|
|
812
|
-
let { scale: scale } = $gyhAV$useProvider();
|
|
813
|
-
const getDefaultWidth = $gyhAV$useCallback(({ hideHeader: hideHeader , isSelectionCell: isSelectionCell , showDivider: showDivider })=>{
|
|
839
|
+
let { styleProps: styleProps } = (0, $gyhAV$useStyleProps)(props);
|
|
840
|
+
let [showSelectionCheckboxes, setShowSelectionCheckboxes] = (0, $gyhAV$useState)(props.selectionStyle !== "highlight");
|
|
841
|
+
let { direction: direction } = (0, $gyhAV$useLocale)();
|
|
842
|
+
let { scale: scale } = (0, $gyhAV$useProvider)();
|
|
843
|
+
const getDefaultWidth = (0, $gyhAV$useCallback)(({ hideHeader: hideHeader , isSelectionCell: isSelectionCell , showDivider: showDivider })=>{
|
|
814
844
|
if (hideHeader) {
|
|
815
845
|
let width = $d14697b14e638114$var$DEFAULT_HIDE_HEADER_CELL_WIDTH[scale];
|
|
816
846
|
return showDivider ? width + 1 : width;
|
|
@@ -818,14 +848,14 @@ function $d14697b14e638114$var$TableView(props, ref) {
|
|
|
818
848
|
}, [
|
|
819
849
|
scale
|
|
820
850
|
]);
|
|
821
|
-
let [isInResizeMode, setIsInResizeMode] = $gyhAV$useState(false);
|
|
822
|
-
let state = $gyhAV$useTableState({
|
|
851
|
+
let [isInResizeMode, setIsInResizeMode] = (0, $gyhAV$useState)(false);
|
|
852
|
+
let state = (0, $gyhAV$useTableState)({
|
|
823
853
|
...props,
|
|
824
854
|
showSelectionCheckboxes: showSelectionCheckboxes,
|
|
825
|
-
selectionBehavior: props.selectionStyle ===
|
|
855
|
+
selectionBehavior: props.selectionStyle === "highlight" ? "replace" : "toggle"
|
|
826
856
|
});
|
|
827
|
-
const columnState = $gyhAV$useTableColumnResizeState({
|
|
828
|
-
|
|
857
|
+
const columnState = (0, $gyhAV$useTableColumnResizeState)({
|
|
858
|
+
...(0, $gyhAV$mergeProps)(props, {
|
|
829
859
|
onColumnResizeEnd: ()=>{
|
|
830
860
|
setIsInResizeMode(false);
|
|
831
861
|
}
|
|
@@ -833,130 +863,129 @@ function $d14697b14e638114$var$TableView(props, ref) {
|
|
|
833
863
|
getDefaultWidth: getDefaultWidth
|
|
834
864
|
}, state.collection);
|
|
835
865
|
// If the selection behavior changes in state, we need to update showSelectionCheckboxes here due to the circular dependency...
|
|
836
|
-
let shouldShowCheckboxes = state.selectionManager.selectionBehavior !==
|
|
866
|
+
let shouldShowCheckboxes = state.selectionManager.selectionBehavior !== "replace";
|
|
837
867
|
if (shouldShowCheckboxes !== showSelectionCheckboxes) setShowSelectionCheckboxes(shouldShowCheckboxes);
|
|
838
|
-
let domRef = $gyhAV$useDOMRef(ref);
|
|
839
|
-
let headerRef = $gyhAV$useRef();
|
|
840
|
-
let bodyRef = $gyhAV$useRef();
|
|
841
|
-
let stringFormatter = $gyhAV$useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($467944769c14687b$exports)));
|
|
842
|
-
let density = props.density ||
|
|
843
|
-
let layout = $gyhAV$useMemo(()=>new $gyhAV$TableLayout({
|
|
868
|
+
let domRef = (0, $gyhAV$useDOMRef)(ref);
|
|
869
|
+
let headerRef = (0, $gyhAV$useRef)();
|
|
870
|
+
let bodyRef = (0, $gyhAV$useRef)();
|
|
871
|
+
let stringFormatter = (0, $gyhAV$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($467944769c14687b$exports))));
|
|
872
|
+
let density = props.density || "regular";
|
|
873
|
+
let layout = (0, $gyhAV$useMemo)(()=>new (0, $gyhAV$TableLayout)({
|
|
844
874
|
// If props.rowHeight is auto, then use estimated heights based on scale, otherwise use fixed heights.
|
|
845
|
-
rowHeight: props.overflowMode ===
|
|
846
|
-
estimatedRowHeight: props.overflowMode ===
|
|
847
|
-
headingHeight: props.overflowMode ===
|
|
848
|
-
estimatedHeadingHeight: props.overflowMode ===
|
|
849
|
-
})
|
|
850
|
-
, [
|
|
875
|
+
rowHeight: props.overflowMode === "wrap" ? null : $d14697b14e638114$var$ROW_HEIGHTS[density][scale],
|
|
876
|
+
estimatedRowHeight: props.overflowMode === "wrap" ? $d14697b14e638114$var$ROW_HEIGHTS[density][scale] : null,
|
|
877
|
+
headingHeight: props.overflowMode === "wrap" ? null : $d14697b14e638114$var$DEFAULT_HEADER_HEIGHT[scale],
|
|
878
|
+
estimatedHeadingHeight: props.overflowMode === "wrap" ? $d14697b14e638114$var$DEFAULT_HEADER_HEIGHT[scale] : null
|
|
879
|
+
}), [
|
|
851
880
|
props.overflowMode,
|
|
852
881
|
scale,
|
|
853
882
|
density
|
|
854
883
|
]);
|
|
855
884
|
layout.collection = state.collection;
|
|
856
885
|
layout.getColumnWidth = columnState.getColumnWidth;
|
|
857
|
-
let { gridProps: gridProps } = $gyhAV$useTable({
|
|
886
|
+
let { gridProps: gridProps } = (0, $gyhAV$useTable)({
|
|
858
887
|
...props,
|
|
859
888
|
isVirtualized: true,
|
|
860
889
|
layout: layout,
|
|
861
890
|
onRowAction: onAction
|
|
862
891
|
}, state, domRef);
|
|
863
|
-
let [headerRowHovered, setHeaderRowHovered] = $gyhAV$useState(false);
|
|
892
|
+
let [headerRowHovered, setHeaderRowHovered] = (0, $gyhAV$useState)(false);
|
|
864
893
|
let renderWrapper = (parent, reusableView, children, renderChildren)=>{
|
|
865
|
-
let style = $gyhAV$layoutInfoToStyle(reusableView.layoutInfo, direction, parent && parent.layoutInfo);
|
|
866
|
-
if (style.overflow ===
|
|
867
|
-
if (reusableView.viewType ===
|
|
894
|
+
let style = (0, $gyhAV$layoutInfoToStyle)(reusableView.layoutInfo, direction, parent && parent.layoutInfo);
|
|
895
|
+
if (style.overflow === "hidden") style.overflow = "visible"; // needed to support position: sticky
|
|
896
|
+
if (reusableView.viewType === "rowgroup") return /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$TableRowGroup, {
|
|
868
897
|
key: reusableView.key,
|
|
869
898
|
style: style
|
|
870
|
-
}, renderChildren(children))
|
|
871
|
-
if (reusableView.viewType ===
|
|
899
|
+
}, renderChildren(children));
|
|
900
|
+
if (reusableView.viewType === "header") return /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$TableHeader, {
|
|
872
901
|
key: reusableView.key,
|
|
873
902
|
style: style
|
|
874
|
-
}, renderChildren(children))
|
|
875
|
-
if (reusableView.viewType ===
|
|
903
|
+
}, renderChildren(children));
|
|
904
|
+
if (reusableView.viewType === "row") return /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$TableRow, {
|
|
876
905
|
key: reusableView.key,
|
|
877
906
|
item: reusableView.content,
|
|
878
907
|
style: style,
|
|
879
908
|
hasActions: onAction
|
|
880
|
-
}, renderChildren(children))
|
|
881
|
-
if (reusableView.viewType ===
|
|
909
|
+
}, renderChildren(children));
|
|
910
|
+
if (reusableView.viewType === "headerrow") return /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$TableHeaderRow, {
|
|
882
911
|
onHoverChange: setHeaderRowHovered,
|
|
883
912
|
key: reusableView.key,
|
|
884
913
|
style: style,
|
|
885
914
|
item: reusableView.content
|
|
886
|
-
}, renderChildren(children))
|
|
887
|
-
return
|
|
915
|
+
}, renderChildren(children));
|
|
916
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$VirtualizerItem), {
|
|
888
917
|
key: reusableView.key,
|
|
889
918
|
reusableView: reusableView,
|
|
890
919
|
parent: parent,
|
|
891
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
892
|
-
|
|
920
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-cellWrapper", (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($325bc3d43b25708b$exports))), {
|
|
921
|
+
"react-spectrum-Table-cellWrapper": !reusableView.layoutInfo.estimatedSize
|
|
893
922
|
}))
|
|
894
|
-
})
|
|
923
|
+
});
|
|
895
924
|
};
|
|
896
925
|
let renderView = (type, item)=>{
|
|
897
926
|
switch(type){
|
|
898
|
-
case
|
|
899
|
-
case
|
|
900
|
-
case
|
|
901
|
-
case
|
|
902
|
-
case
|
|
927
|
+
case "header":
|
|
928
|
+
case "rowgroup":
|
|
929
|
+
case "section":
|
|
930
|
+
case "row":
|
|
931
|
+
case "headerrow":
|
|
903
932
|
return null;
|
|
904
|
-
case
|
|
905
|
-
if (item.props.isSelectionCell) return
|
|
933
|
+
case "cell":
|
|
934
|
+
if (item.props.isSelectionCell) return /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$TableCheckboxCell, {
|
|
906
935
|
cell: item
|
|
907
|
-
})
|
|
908
|
-
return
|
|
936
|
+
});
|
|
937
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$TableCell, {
|
|
909
938
|
cell: item
|
|
910
|
-
})
|
|
911
|
-
case
|
|
939
|
+
});
|
|
940
|
+
case "placeholder":
|
|
912
941
|
// TODO: move to react-aria?
|
|
913
|
-
return
|
|
942
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
914
943
|
role: "gridcell",
|
|
915
944
|
"aria-colindex": item.index + 1,
|
|
916
945
|
"aria-colspan": item.colspan > 1 ? item.colspan : null
|
|
917
|
-
})
|
|
918
|
-
case
|
|
919
|
-
if (item.props.isSelectionCell) return
|
|
946
|
+
});
|
|
947
|
+
case "column":
|
|
948
|
+
if (item.props.isSelectionCell) return /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$TableSelectAllCell, {
|
|
920
949
|
column: item
|
|
921
|
-
})
|
|
950
|
+
});
|
|
922
951
|
// TODO: consider this case, what if we have hidden headers and a empty table
|
|
923
|
-
if (item.props.hideHeader) return
|
|
952
|
+
if (item.props.hideHeader) return /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$TooltipTrigger), {
|
|
924
953
|
placement: "top",
|
|
925
954
|
trigger: "focus"
|
|
926
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement($d14697b14e638114$var$TableColumnHeader, {
|
|
955
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$TableColumnHeader, {
|
|
927
956
|
column: item
|
|
928
|
-
}), /*#__PURE__*/ $gyhAV$react.createElement($gyhAV$Tooltip, {
|
|
957
|
+
}), /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$Tooltip), {
|
|
929
958
|
placement: "top"
|
|
930
|
-
}, item.rendered))
|
|
931
|
-
if (item.props.allowsResizing) return
|
|
959
|
+
}, item.rendered));
|
|
960
|
+
if (item.props.allowsResizing) return /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$ResizableTableColumnHeader, {
|
|
932
961
|
tableRef: domRef,
|
|
933
962
|
column: item
|
|
934
|
-
})
|
|
935
|
-
return
|
|
963
|
+
});
|
|
964
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$TableColumnHeader, {
|
|
936
965
|
column: item
|
|
937
|
-
})
|
|
938
|
-
case
|
|
939
|
-
return
|
|
966
|
+
});
|
|
967
|
+
case "loader":
|
|
968
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$CenteredWrapper, null, /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$ProgressCircle), {
|
|
940
969
|
isIndeterminate: true,
|
|
941
|
-
"aria-label": state.collection.size > 0 ? stringFormatter.format(
|
|
942
|
-
}))
|
|
943
|
-
case
|
|
970
|
+
"aria-label": state.collection.size > 0 ? stringFormatter.format("loadingMore") : stringFormatter.format("loading")
|
|
971
|
+
}));
|
|
972
|
+
case "empty":
|
|
944
973
|
{
|
|
945
974
|
let emptyState = props.renderEmptyState ? props.renderEmptyState() : null;
|
|
946
975
|
if (emptyState == null) return null;
|
|
947
|
-
return
|
|
976
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$CenteredWrapper, null, emptyState);
|
|
948
977
|
}
|
|
949
978
|
}
|
|
950
979
|
};
|
|
951
|
-
let [isVerticalScrollbarVisible, setVerticalScollbarVisible] = $gyhAV$useState(false);
|
|
952
|
-
let [isHorizontalScrollbarVisible, setHorizontalScollbarVisible] = $gyhAV$useState(false);
|
|
953
|
-
let viewport = $gyhAV$useRef({
|
|
980
|
+
let [isVerticalScrollbarVisible, setVerticalScollbarVisible] = (0, $gyhAV$useState)(false);
|
|
981
|
+
let [isHorizontalScrollbarVisible, setHorizontalScollbarVisible] = (0, $gyhAV$useState)(false);
|
|
982
|
+
let viewport = (0, $gyhAV$useRef)({
|
|
954
983
|
x: 0,
|
|
955
984
|
y: 0,
|
|
956
985
|
width: 0,
|
|
957
986
|
height: 0
|
|
958
987
|
});
|
|
959
|
-
let onVisibleRectChange = $gyhAV$useCallback((e)=>{
|
|
988
|
+
let onVisibleRectChange = (0, $gyhAV$useCallback)((e)=>{
|
|
960
989
|
if (viewport.current.width === e.width && viewport.current.height === e.height) return;
|
|
961
990
|
viewport.current = e;
|
|
962
991
|
if (bodyRef.current) {
|
|
@@ -964,17 +993,17 @@ function $d14697b14e638114$var$TableView(props, ref) {
|
|
|
964
993
|
setHorizontalScollbarVisible(bodyRef.current.clientHeight + 2 < bodyRef.current.offsetHeight);
|
|
965
994
|
}
|
|
966
995
|
}, []);
|
|
967
|
-
let { isFocusVisible: isFocusVisible , focusProps: focusProps } = $gyhAV$useFocusRing();
|
|
996
|
+
let { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $gyhAV$useFocusRing)();
|
|
968
997
|
let isEmpty = state.collection.size === 0;
|
|
969
998
|
let onFocusedResizer = ()=>{
|
|
970
999
|
bodyRef.current.scrollLeft = headerRef.current.scrollLeft;
|
|
971
1000
|
};
|
|
972
|
-
let lastResizeInteractionModality = $gyhAV$useRef(undefined);
|
|
1001
|
+
let lastResizeInteractionModality = (0, $gyhAV$useRef)(undefined);
|
|
973
1002
|
let onMoveResizer = (e)=>{
|
|
974
|
-
if (e.pointerType ===
|
|
1003
|
+
if (e.pointerType === "keyboard") lastResizeInteractionModality.current = e.pointerType;
|
|
975
1004
|
else lastResizeInteractionModality.current = undefined;
|
|
976
1005
|
};
|
|
977
|
-
return
|
|
1006
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$TableContext.Provider, {
|
|
978
1007
|
value: {
|
|
979
1008
|
state: state,
|
|
980
1009
|
layout: layout,
|
|
@@ -986,16 +1015,16 @@ function $d14697b14e638114$var$TableView(props, ref) {
|
|
|
986
1015
|
onFocusedResizer: onFocusedResizer,
|
|
987
1016
|
onMoveResizer: onMoveResizer
|
|
988
1017
|
}
|
|
989
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement($d14697b14e638114$var$TableVirtualizer, {
|
|
990
|
-
|
|
1018
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$TableVirtualizer, {
|
|
1019
|
+
...(0, $gyhAV$mergeProps)(gridProps, focusProps),
|
|
991
1020
|
...styleProps,
|
|
992
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
}, $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($325bc3d43b25708b$exports)),
|
|
1021
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table", `spectrum-Table--${density}`, {
|
|
1022
|
+
"spectrum-Table--quiet": isQuiet,
|
|
1023
|
+
"spectrum-Table--wrap": props.overflowMode === "wrap",
|
|
1024
|
+
"spectrum-Table--loadingMore": state.collection.body.props.loadingState === "loadingMore",
|
|
1025
|
+
"spectrum-Table--isVerticalScrollbarVisible": isVerticalScrollbarVisible,
|
|
1026
|
+
"spectrum-Table--isHorizontalScrollbarVisible": isHorizontalScrollbarVisible
|
|
1027
|
+
}, (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($325bc3d43b25708b$exports))), "react-spectrum-Table"), styleProps.className),
|
|
999
1028
|
layout: layout,
|
|
1000
1029
|
collection: state.collection,
|
|
1001
1030
|
focusedKey: state.selectionManager.focusedKey,
|
|
@@ -1009,28 +1038,28 @@ function $d14697b14e638114$var$TableView(props, ref) {
|
|
|
1009
1038
|
bodyRef: bodyRef,
|
|
1010
1039
|
isFocusVisible: isFocusVisible,
|
|
1011
1040
|
getColumnWidth: columnState.getColumnWidth
|
|
1012
|
-
}))
|
|
1041
|
+
}));
|
|
1013
1042
|
}
|
|
1014
1043
|
// This is a custom Virtualizer that also has a header that syncs its scroll position with the body.
|
|
1015
1044
|
function $d14697b14e638114$var$TableVirtualizer({ layout: layout , collection: collection , lastResizeInteractionModality: lastResizeInteractionModality , focusedKey: focusedKey , renderView: renderView , renderWrapper: renderWrapper , domRef: domRef , bodyRef: bodyRef , headerRef: headerRef , setTableWidth: setTableWidth , getColumnWidth: getColumnWidth , onVisibleRectChange: onVisibleRectChangeProp , isFocusVisible: isFocusVisible , ...otherProps }) {
|
|
1016
|
-
var
|
|
1017
|
-
let { direction: direction } = $gyhAV$useLocale();
|
|
1045
|
+
var ref, ref1, ref2;
|
|
1046
|
+
let { direction: direction } = (0, $gyhAV$useLocale)();
|
|
1018
1047
|
let { state: tableState , columnState: columnState } = $d14697b14e638114$export$3cb274deb6c2d854();
|
|
1019
1048
|
let loadingState = collection.body.props.loadingState;
|
|
1020
|
-
let isLoading = loadingState ===
|
|
1049
|
+
let isLoading = loadingState === "loading" || loadingState === "loadingMore";
|
|
1021
1050
|
let onLoadMore = collection.body.props.onLoadMore;
|
|
1022
|
-
let state = $gyhAV$useVirtualizerState({
|
|
1051
|
+
let state = (0, $gyhAV$useVirtualizerState)({
|
|
1023
1052
|
layout: layout,
|
|
1024
1053
|
collection: collection,
|
|
1025
1054
|
renderView: renderView,
|
|
1026
1055
|
renderWrapper: renderWrapper,
|
|
1027
1056
|
onVisibleRectChange (rect) {
|
|
1028
1057
|
bodyRef.current.scrollTop = rect.y;
|
|
1029
|
-
$gyhAV$setScrollLeft(bodyRef.current, direction, rect.x);
|
|
1058
|
+
(0, $gyhAV$setScrollLeft)(bodyRef.current, direction, rect.x);
|
|
1030
1059
|
},
|
|
1031
1060
|
transitionDuration: isLoading ? 160 : 220
|
|
1032
1061
|
});
|
|
1033
|
-
let { virtualizerProps: virtualizerProps } = $gyhAV$useVirtualizer({
|
|
1062
|
+
let { virtualizerProps: virtualizerProps } = (0, $gyhAV$useVirtualizer)({
|
|
1034
1063
|
focusedKey: focusedKey,
|
|
1035
1064
|
scrollToItem (key) {
|
|
1036
1065
|
let item = collection.getItem(key);
|
|
@@ -1038,7 +1067,7 @@ function $d14697b14e638114$var$TableVirtualizer({ layout: layout , collection: c
|
|
|
1038
1067
|
state.virtualizer.scrollToItem(key, {
|
|
1039
1068
|
duration: 0,
|
|
1040
1069
|
// Prevent scrolling to the top when clicking on column headers.
|
|
1041
|
-
shouldScrollY: (item === null || item === void 0 ? void 0 : item.type) !==
|
|
1070
|
+
shouldScrollY: (item === null || item === void 0 ? void 0 : item.type) !== "column",
|
|
1042
1071
|
// Offset scroll position by width of selection cell
|
|
1043
1072
|
// (which is sticky and will overlap the cell we're scrolling to).
|
|
1044
1073
|
offsetX: column.props.isSelectionCell ? layout.getColumnWidth(column.key) : 0
|
|
@@ -1046,7 +1075,7 @@ function $d14697b14e638114$var$TableVirtualizer({ layout: layout , collection: c
|
|
|
1046
1075
|
}
|
|
1047
1076
|
}, state, domRef);
|
|
1048
1077
|
// If columnwidths change, need to relayout.
|
|
1049
|
-
$gyhAV$useLayoutEffect(()=>{
|
|
1078
|
+
(0, $gyhAV$useLayoutEffect)(()=>{
|
|
1050
1079
|
state.virtualizer.relayoutNow({
|
|
1051
1080
|
sizeChanged: true
|
|
1052
1081
|
});
|
|
@@ -1054,10 +1083,10 @@ function $d14697b14e638114$var$TableVirtualizer({ layout: layout , collection: c
|
|
|
1054
1083
|
getColumnWidth,
|
|
1055
1084
|
state.virtualizer
|
|
1056
1085
|
]);
|
|
1057
|
-
$gyhAV$useEffect(()=>{
|
|
1058
|
-
if (lastResizeInteractionModality.current ===
|
|
1059
|
-
var ref,
|
|
1060
|
-
(ref = document.activeElement) === null || ref === void 0 ? void 0 : (
|
|
1086
|
+
(0, $gyhAV$useEffect)(()=>{
|
|
1087
|
+
if (lastResizeInteractionModality.current === "keyboard" && headerRef.current.contains(document.activeElement)) {
|
|
1088
|
+
var ref, ref1;
|
|
1089
|
+
(ref = document.activeElement) === null || ref === void 0 ? void 0 : (ref1 = ref.scrollIntoView) === null || ref1 === void 0 ? void 0 : ref1.call(ref, false);
|
|
1061
1090
|
bodyRef.current.scrollLeft = headerRef.current.scrollLeft;
|
|
1062
1091
|
}
|
|
1063
1092
|
}, [
|
|
@@ -1066,16 +1095,16 @@ function $d14697b14e638114$var$TableVirtualizer({ layout: layout , collection: c
|
|
|
1066
1095
|
bodyRef,
|
|
1067
1096
|
lastResizeInteractionModality
|
|
1068
1097
|
]);
|
|
1069
|
-
let headerHeight = ((
|
|
1098
|
+
let headerHeight = ((ref = layout.getLayoutInfo("header")) === null || ref === void 0 ? void 0 : ref.rect.height) || 0;
|
|
1070
1099
|
let visibleRect = state.virtualizer.visibleRect;
|
|
1071
1100
|
// Sync the scroll position from the table body to the header container.
|
|
1072
|
-
let onScroll = $gyhAV$useCallback(()=>{
|
|
1101
|
+
let onScroll = (0, $gyhAV$useCallback)(()=>{
|
|
1073
1102
|
headerRef.current.scrollLeft = bodyRef.current.scrollLeft;
|
|
1074
1103
|
}, [
|
|
1075
1104
|
bodyRef,
|
|
1076
1105
|
headerRef
|
|
1077
1106
|
]);
|
|
1078
|
-
let onVisibleRectChange = $gyhAV$useCallback((rect)=>{
|
|
1107
|
+
let onVisibleRectChange = (0, $gyhAV$useCallback)((rect)=>{
|
|
1079
1108
|
setTableWidth(rect.width);
|
|
1080
1109
|
state.setVisibleRect(rect);
|
|
1081
1110
|
if (!isLoading && onLoadMore) {
|
|
@@ -1089,7 +1118,7 @@ function $d14697b14e638114$var$TableVirtualizer({ layout: layout , collection: c
|
|
|
1089
1118
|
state.setVisibleRect,
|
|
1090
1119
|
state.virtualizer
|
|
1091
1120
|
]);
|
|
1092
|
-
$gyhAV$useLayoutEffect(()=>{
|
|
1121
|
+
(0, $gyhAV$useLayoutEffect)(()=>{
|
|
1093
1122
|
if (!isLoading && onLoadMore && !state.isAnimating) {
|
|
1094
1123
|
if (state.contentSize.height <= state.virtualizer.visibleRect.height) onLoadMore();
|
|
1095
1124
|
}
|
|
@@ -1101,84 +1130,83 @@ function $d14697b14e638114$var$TableVirtualizer({ layout: layout , collection: c
|
|
|
1101
1130
|
isLoading
|
|
1102
1131
|
]);
|
|
1103
1132
|
let keysBefore = [];
|
|
1104
|
-
let
|
|
1133
|
+
let key = columnState.currentlyResizingColumn;
|
|
1105
1134
|
do {
|
|
1106
|
-
keysBefore.push(
|
|
1107
|
-
|
|
1108
|
-
}while (
|
|
1109
|
-
let resizerPosition = keysBefore.reduce((acc, key)=>acc + columnState.getColumnWidth(key)
|
|
1110
|
-
, 0) - 2;
|
|
1135
|
+
keysBefore.push(key);
|
|
1136
|
+
key = tableState.collection.getKeyBefore(key);
|
|
1137
|
+
}while (key != null);
|
|
1138
|
+
let resizerPosition = keysBefore.reduce((acc, key)=>acc + columnState.getColumnWidth(key), 0) - 2;
|
|
1111
1139
|
let resizerAtEdge = resizerPosition > Math.max(state.virtualizer.contentSize.width, state.virtualizer.visibleRect.width) - 3;
|
|
1112
1140
|
// this should be fine, every movement of the resizer causes a rerender
|
|
1113
1141
|
// scrolling can cause it to lag for a moment, but it's always updated
|
|
1114
1142
|
let resizerInVisibleRegion = resizerPosition < state.virtualizer.visibleRect.width + (isNaN((ref1 = bodyRef.current) === null || ref1 === void 0 ? void 0 : ref1.scrollLeft) ? 0 : (ref2 = bodyRef.current) === null || ref2 === void 0 ? void 0 : ref2.scrollLeft);
|
|
1115
1143
|
let shouldHardCornerResizeCorner = resizerAtEdge && resizerInVisibleRegion;
|
|
1116
|
-
return
|
|
1117
|
-
|
|
1144
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$FocusScope), null, /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1145
|
+
...(0, $gyhAV$mergeProps)(otherProps, virtualizerProps),
|
|
1118
1146
|
ref: domRef
|
|
1119
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement("div", {
|
|
1147
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1120
1148
|
role: "presentation",
|
|
1121
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1149
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-headWrapper"),
|
|
1122
1150
|
style: {
|
|
1123
1151
|
width: visibleRect.width,
|
|
1124
1152
|
height: headerHeight,
|
|
1125
|
-
overflow:
|
|
1126
|
-
position:
|
|
1127
|
-
willChange: state.isScrolling ?
|
|
1153
|
+
overflow: "hidden",
|
|
1154
|
+
position: "relative",
|
|
1155
|
+
willChange: state.isScrolling ? "scroll-position" : "",
|
|
1128
1156
|
transition: state.isAnimating ? `none ${state.virtualizer.transitionDuration}ms` : undefined
|
|
1129
1157
|
},
|
|
1130
1158
|
ref: headerRef
|
|
1131
|
-
}, state.visibleViews[0]), /*#__PURE__*/ $gyhAV$react.createElement($gyhAV$ScrollView, {
|
|
1159
|
+
}, state.visibleViews[0]), /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$ScrollView), {
|
|
1132
1160
|
role: "presentation",
|
|
1133
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1134
|
-
|
|
1135
|
-
|
|
1161
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-body", {
|
|
1162
|
+
"focus-ring": isFocusVisible,
|
|
1163
|
+
"spectrum-Table-body--resizerAtTableEdge": shouldHardCornerResizeCorner
|
|
1136
1164
|
}),
|
|
1137
1165
|
tabIndex: -1,
|
|
1138
1166
|
style: {
|
|
1139
1167
|
flex: 1
|
|
1140
1168
|
},
|
|
1141
1169
|
innerStyle: {
|
|
1142
|
-
overflow:
|
|
1170
|
+
overflow: "visible",
|
|
1143
1171
|
transition: state.isAnimating ? `none ${state.virtualizer.transitionDuration}ms` : undefined
|
|
1144
1172
|
},
|
|
1145
1173
|
ref: bodyRef,
|
|
1146
1174
|
contentSize: state.contentSize,
|
|
1147
|
-
onVisibleRectChange: $gyhAV$chain(onVisibleRectChange, onVisibleRectChangeProp),
|
|
1175
|
+
onVisibleRectChange: (0, $gyhAV$chain)(onVisibleRectChange, onVisibleRectChangeProp),
|
|
1148
1176
|
onScrollStart: state.startScrolling,
|
|
1149
1177
|
onScrollEnd: state.endScrolling,
|
|
1150
1178
|
onScroll: onScroll
|
|
1151
|
-
}, state.visibleViews[1], columnState.currentlyResizingColumn != null && /*#__PURE__*/ $gyhAV$react.createElement("div", {
|
|
1152
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1179
|
+
}, state.visibleViews[1], columnState.currentlyResizingColumn != null && /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1180
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-bodyResizeIndicator"),
|
|
1153
1181
|
style: {
|
|
1154
|
-
[direction ===
|
|
1182
|
+
[direction === "ltr" ? "left" : "right"]: `${resizerPosition}px`,
|
|
1155
1183
|
height: `${Math.max(state.virtualizer.contentSize.height, state.virtualizer.visibleRect.height)}px`,
|
|
1156
|
-
display:
|
|
1184
|
+
display: "block"
|
|
1157
1185
|
}
|
|
1158
|
-
}))))
|
|
1186
|
+
}))));
|
|
1159
1187
|
}
|
|
1160
1188
|
function $d14697b14e638114$var$TableHeader({ children: children , ...otherProps }) {
|
|
1161
|
-
let { rowGroupProps: rowGroupProps } = $gyhAV$useTableRowGroup();
|
|
1162
|
-
return
|
|
1189
|
+
let { rowGroupProps: rowGroupProps } = (0, $gyhAV$useTableRowGroup)();
|
|
1190
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1163
1191
|
...rowGroupProps,
|
|
1164
1192
|
...otherProps,
|
|
1165
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1166
|
-
}, children)
|
|
1193
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-head")
|
|
1194
|
+
}, children);
|
|
1167
1195
|
}
|
|
1168
1196
|
function $d14697b14e638114$var$TableColumnHeader(props) {
|
|
1169
|
-
var ref,
|
|
1197
|
+
var ref, ref1, ref2, ref3;
|
|
1170
1198
|
let { column: column } = props;
|
|
1171
|
-
let
|
|
1199
|
+
let ref4 = (0, $gyhAV$useRef)(null);
|
|
1172
1200
|
let { state: state , isEmpty: isEmpty } = $d14697b14e638114$export$3cb274deb6c2d854();
|
|
1173
|
-
let { pressProps: pressProps , isPressed: isPressed } = $gyhAV$usePress({
|
|
1201
|
+
let { pressProps: pressProps , isPressed: isPressed } = (0, $gyhAV$usePress)({
|
|
1174
1202
|
isDisabled: isEmpty
|
|
1175
1203
|
});
|
|
1176
|
-
let { columnHeaderProps: columnHeaderProps } = $gyhAV$useTableColumnHeader({
|
|
1204
|
+
let { columnHeaderProps: columnHeaderProps } = (0, $gyhAV$useTableColumnHeader)({
|
|
1177
1205
|
node: column,
|
|
1178
1206
|
isVirtualized: true
|
|
1179
|
-
}, state,
|
|
1207
|
+
}, state, ref4);
|
|
1180
1208
|
let columnProps = column.props;
|
|
1181
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $gyhAV$useHover({
|
|
1209
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $gyhAV$useHover)({
|
|
1182
1210
|
...props,
|
|
1183
1211
|
isDisabled: isEmpty
|
|
1184
1212
|
});
|
|
@@ -1187,71 +1215,71 @@ function $d14697b14e638114$var$TableColumnHeader(props) {
|
|
|
1187
1215
|
hoverProps,
|
|
1188
1216
|
pressProps
|
|
1189
1217
|
];
|
|
1190
|
-
return
|
|
1191
|
-
focusRingClass: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1192
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement("div", {
|
|
1193
|
-
|
|
1194
|
-
ref:
|
|
1195
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
}, $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($325bc3d43b25708b$exports)),
|
|
1204
|
-
|
|
1205
|
-
|
|
1218
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$FocusRing), {
|
|
1219
|
+
focusRingClass: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "focus-ring")
|
|
1220
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1221
|
+
...(0, $gyhAV$mergeProps)(...allProps),
|
|
1222
|
+
ref: ref4,
|
|
1223
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-headCell", {
|
|
1224
|
+
"is-active": isPressed,
|
|
1225
|
+
"is-resizable": columnProps.allowsResizing,
|
|
1226
|
+
"is-sortable": columnProps.allowsSorting,
|
|
1227
|
+
"is-sorted-desc": ((ref = state.sortDescriptor) === null || ref === void 0 ? void 0 : ref.column) === column.key && ((ref1 = state.sortDescriptor) === null || ref1 === void 0 ? void 0 : ref1.direction) === "descending",
|
|
1228
|
+
"is-sorted-asc": ((ref2 = state.sortDescriptor) === null || ref2 === void 0 ? void 0 : ref2.column) === column.key && ((ref3 = state.sortDescriptor) === null || ref3 === void 0 ? void 0 : ref3.direction) === "ascending",
|
|
1229
|
+
"is-hovered": isHovered,
|
|
1230
|
+
"spectrum-Table-cell--hideHeader": columnProps.hideHeader
|
|
1231
|
+
}, (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($325bc3d43b25708b$exports))), "react-spectrum-Table-cell", {
|
|
1232
|
+
"react-spectrum-Table-cell--alignCenter": columnProps.align === "center" || column.colspan > 1,
|
|
1233
|
+
"react-spectrum-Table-cell--alignEnd": columnProps.align === "end"
|
|
1206
1234
|
}))
|
|
1207
|
-
}, columnProps.allowsSorting && /*#__PURE__*/ $gyhAV$react.createElement($gyhAV$spectrumiconsuiArrowDownSmall, {
|
|
1208
|
-
UNSAFE_className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1209
|
-
}), columnProps.hideHeader ? /*#__PURE__*/ $gyhAV$react.createElement($gyhAV$VisuallyHidden, null, column.rendered) : /*#__PURE__*/ $gyhAV$react.createElement("div", {
|
|
1210
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1211
|
-
}, column.rendered)))
|
|
1235
|
+
}, columnProps.allowsSorting && /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$spectrumiconsuiArrowDownSmall), {
|
|
1236
|
+
UNSAFE_className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-sortedIcon")
|
|
1237
|
+
}), columnProps.hideHeader ? /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$VisuallyHidden), null, column.rendered) : /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1238
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-headCellContents")
|
|
1239
|
+
}, column.rendered)));
|
|
1212
1240
|
}
|
|
1213
1241
|
let $d14697b14e638114$var$_TableColumnHeaderButton = (props, ref)=>{
|
|
1214
1242
|
let { focusProps: focusProps , ...otherProps } = props;
|
|
1215
1243
|
let { isEmpty: isEmpty } = $d14697b14e638114$export$3cb274deb6c2d854();
|
|
1216
|
-
let domRef = $gyhAV$useFocusableRef(ref);
|
|
1217
|
-
let { buttonProps: buttonProps } = $gyhAV$useButton({
|
|
1244
|
+
let domRef = (0, $gyhAV$useFocusableRef)(ref);
|
|
1245
|
+
let { buttonProps: buttonProps } = (0, $gyhAV$useButton)({
|
|
1218
1246
|
...otherProps,
|
|
1219
|
-
elementType:
|
|
1247
|
+
elementType: "div",
|
|
1220
1248
|
isDisabled: isEmpty
|
|
1221
1249
|
}, domRef);
|
|
1222
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $gyhAV$useHover({
|
|
1250
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $gyhAV$useHover)({
|
|
1223
1251
|
...otherProps,
|
|
1224
1252
|
isDisabled: isEmpty
|
|
1225
1253
|
});
|
|
1226
|
-
return
|
|
1227
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1228
|
-
|
|
1254
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1255
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-headCellContents", {
|
|
1256
|
+
"is-hovered": isHovered
|
|
1229
1257
|
}),
|
|
1230
1258
|
...hoverProps
|
|
1231
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement("div", {
|
|
1232
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1233
|
-
|
|
1259
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1260
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-headCellButton"),
|
|
1261
|
+
...(0, $gyhAV$mergeProps)(buttonProps, focusProps),
|
|
1234
1262
|
ref: domRef
|
|
1235
|
-
}, props.children))
|
|
1263
|
+
}, props.children));
|
|
1236
1264
|
};
|
|
1237
|
-
let $d14697b14e638114$var$TableColumnHeaderButton = /*#__PURE__*/ $gyhAV$react.forwardRef($d14697b14e638114$var$_TableColumnHeaderButton);
|
|
1265
|
+
let $d14697b14e638114$var$TableColumnHeaderButton = /*#__PURE__*/ (0, $gyhAV$react).forwardRef($d14697b14e638114$var$_TableColumnHeaderButton);
|
|
1238
1266
|
function $d14697b14e638114$var$ResizableTableColumnHeader(props) {
|
|
1239
|
-
var ref,
|
|
1267
|
+
var ref, ref1, ref2, ref3, ref4;
|
|
1240
1268
|
let { column: column } = props;
|
|
1241
|
-
let
|
|
1242
|
-
let triggerRef = $gyhAV$useRef(null);
|
|
1243
|
-
let resizingRef = $gyhAV$useRef(null);
|
|
1269
|
+
let ref5 = (0, $gyhAV$useRef)(null);
|
|
1270
|
+
let triggerRef = (0, $gyhAV$useRef)(null);
|
|
1271
|
+
let resizingRef = (0, $gyhAV$useRef)(null);
|
|
1244
1272
|
let { state: state , columnState: columnState , headerRowHovered: headerRowHovered , setIsInResizeMode: setIsInResizeMode , isInResizeMode: isInResizeMode , isEmpty: isEmpty , onFocusedResizer: onFocusedResizer , onMoveResizer: onMoveResizer } = $d14697b14e638114$export$3cb274deb6c2d854();
|
|
1245
|
-
let stringFormatter = $gyhAV$useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($467944769c14687b$exports)));
|
|
1246
|
-
let { pressProps: pressProps , isPressed: isPressed } = $gyhAV$usePress({
|
|
1273
|
+
let stringFormatter = (0, $gyhAV$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($467944769c14687b$exports))));
|
|
1274
|
+
let { pressProps: pressProps , isPressed: isPressed } = (0, $gyhAV$usePress)({
|
|
1247
1275
|
isDisabled: isEmpty
|
|
1248
1276
|
});
|
|
1249
|
-
let { columnHeaderProps: columnHeaderProps } = $gyhAV$useTableColumnHeader({
|
|
1277
|
+
let { columnHeaderProps: columnHeaderProps } = (0, $gyhAV$useTableColumnHeader)({
|
|
1250
1278
|
node: column,
|
|
1251
1279
|
isVirtualized: true,
|
|
1252
1280
|
hasMenu: true
|
|
1253
|
-
}, state,
|
|
1254
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $gyhAV$useHover({
|
|
1281
|
+
}, state, ref5);
|
|
1282
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $gyhAV$useHover)({
|
|
1255
1283
|
...props,
|
|
1256
1284
|
isDisabled: isEmpty
|
|
1257
1285
|
});
|
|
@@ -1261,36 +1289,36 @@ function $d14697b14e638114$var$ResizableTableColumnHeader(props) {
|
|
|
1261
1289
|
hoverProps
|
|
1262
1290
|
];
|
|
1263
1291
|
let columnProps = column.props;
|
|
1264
|
-
if (columnProps.width && columnProps.allowsResizing) throw new Error(
|
|
1265
|
-
let { isFocusVisible: isFocusVisible , focusProps: focusProps } = $gyhAV$useFocusRing();
|
|
1292
|
+
if (columnProps.width && columnProps.allowsResizing) throw new Error("Controlled state is not yet supported with column resizing. Please use defaultWidth for uncontrolled column resizing or remove the allowsResizing prop.");
|
|
1293
|
+
let { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $gyhAV$useFocusRing)();
|
|
1266
1294
|
const onMenuSelect = (key)=>{
|
|
1267
1295
|
switch(key){
|
|
1268
|
-
case
|
|
1269
|
-
state.sort(column.key,
|
|
1296
|
+
case "sort-asc":
|
|
1297
|
+
state.sort(column.key, "ascending");
|
|
1270
1298
|
break;
|
|
1271
|
-
case
|
|
1272
|
-
state.sort(column.key,
|
|
1299
|
+
case "sort-desc":
|
|
1300
|
+
state.sort(column.key, "descending");
|
|
1273
1301
|
break;
|
|
1274
|
-
case
|
|
1302
|
+
case "resize":
|
|
1275
1303
|
columnState.onColumnResizeStart(column);
|
|
1276
1304
|
setIsInResizeMode(true);
|
|
1277
1305
|
break;
|
|
1278
1306
|
}
|
|
1279
1307
|
};
|
|
1280
1308
|
let allowsSorting = (ref = column.props) === null || ref === void 0 ? void 0 : ref.allowsSorting;
|
|
1281
|
-
let items = $gyhAV$useMemo(()=>{
|
|
1309
|
+
let items = (0, $gyhAV$useMemo)(()=>{
|
|
1282
1310
|
let options = [
|
|
1283
1311
|
allowsSorting ? {
|
|
1284
|
-
label: stringFormatter.format(
|
|
1285
|
-
id:
|
|
1312
|
+
label: stringFormatter.format("sortAscending"),
|
|
1313
|
+
id: "sort-asc"
|
|
1286
1314
|
} : undefined,
|
|
1287
1315
|
allowsSorting ? {
|
|
1288
|
-
label: stringFormatter.format(
|
|
1289
|
-
id:
|
|
1316
|
+
label: stringFormatter.format("sortDescending"),
|
|
1317
|
+
id: "sort-desc"
|
|
1290
1318
|
} : undefined,
|
|
1291
1319
|
{
|
|
1292
|
-
label: stringFormatter.format(
|
|
1293
|
-
id:
|
|
1320
|
+
label: stringFormatter.format("resizeColumn"),
|
|
1321
|
+
id: "resize"
|
|
1294
1322
|
}
|
|
1295
1323
|
];
|
|
1296
1324
|
return options;
|
|
@@ -1298,8 +1326,8 @@ function $d14697b14e638114$var$ResizableTableColumnHeader(props) {
|
|
|
1298
1326
|
}, [
|
|
1299
1327
|
allowsSorting
|
|
1300
1328
|
]);
|
|
1301
|
-
let isMobile = $gyhAV$useIsMobileDevice();
|
|
1302
|
-
$gyhAV$useEffect(()=>{
|
|
1329
|
+
let isMobile = (0, $gyhAV$useIsMobileDevice)();
|
|
1330
|
+
(0, $gyhAV$useEffect)(()=>{
|
|
1303
1331
|
if (columnState.currentlyResizingColumn === column.key) {
|
|
1304
1332
|
// focusSafely won't actually focus because the focus moves from the menuitem to the body during the after transition wait
|
|
1305
1333
|
// without the immediate timeout, Android Chrome doesn't move focus to the resizer
|
|
@@ -1321,234 +1349,232 @@ function $d14697b14e638114$var$ResizableTableColumnHeader(props) {
|
|
|
1321
1349
|
column.key,
|
|
1322
1350
|
isMobile
|
|
1323
1351
|
]);
|
|
1324
|
-
let showResizer = !isEmpty && (headerRowHovered && $gyhAV$getInteractionModality() !==
|
|
1325
|
-
return
|
|
1326
|
-
focusRingClass: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1327
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement("div", {
|
|
1328
|
-
|
|
1329
|
-
ref:
|
|
1330
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
}, $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($325bc3d43b25708b$exports)),
|
|
1340
|
-
|
|
1341
|
-
|
|
1352
|
+
let showResizer = !isEmpty && (headerRowHovered && (0, $gyhAV$getInteractionModality)() !== "keyboard" || columnState.currentlyResizingColumn != null);
|
|
1353
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$FocusRing), {
|
|
1354
|
+
focusRingClass: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "focus-ring")
|
|
1355
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1356
|
+
...(0, $gyhAV$mergeProps)(...allProps),
|
|
1357
|
+
ref: ref5,
|
|
1358
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-headCell", {
|
|
1359
|
+
"is-active": isPressed,
|
|
1360
|
+
"is-resizable": columnProps.allowsResizing,
|
|
1361
|
+
"is-sortable": columnProps.allowsSorting,
|
|
1362
|
+
"is-sorted-desc": ((ref1 = state.sortDescriptor) === null || ref1 === void 0 ? void 0 : ref1.column) === column.key && ((ref2 = state.sortDescriptor) === null || ref2 === void 0 ? void 0 : ref2.direction) === "descending",
|
|
1363
|
+
"is-sorted-asc": ((ref3 = state.sortDescriptor) === null || ref3 === void 0 ? void 0 : ref3.column) === column.key && ((ref4 = state.sortDescriptor) === null || ref4 === void 0 ? void 0 : ref4.direction) === "ascending",
|
|
1364
|
+
"is-hovered": isHovered,
|
|
1365
|
+
"focus-ring": isFocusVisible,
|
|
1366
|
+
"spectrum-Table-cell--hideHeader": columnProps.hideHeader
|
|
1367
|
+
}, (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($325bc3d43b25708b$exports))), "react-spectrum-Table-cell", {
|
|
1368
|
+
"react-spectrum-Table-cell--alignCenter": columnProps.align === "center" || column.colspan > 1,
|
|
1369
|
+
"react-spectrum-Table-cell--alignEnd": columnProps.align === "end"
|
|
1342
1370
|
}))
|
|
1343
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement($gyhAV$MenuTrigger, null, /*#__PURE__*/ $gyhAV$react.createElement($d14697b14e638114$var$TableColumnHeaderButton, {
|
|
1371
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$MenuTrigger), null, /*#__PURE__*/ (0, $gyhAV$react).createElement($d14697b14e638114$var$TableColumnHeaderButton, {
|
|
1344
1372
|
ref: triggerRef,
|
|
1345
1373
|
focusProps: focusProps
|
|
1346
|
-
}, columnProps.allowsSorting && /*#__PURE__*/ $gyhAV$react.createElement($gyhAV$spectrumiconsuiArrowDownSmall, {
|
|
1347
|
-
UNSAFE_className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1348
|
-
}), columnProps.hideHeader ? /*#__PURE__*/ $gyhAV$react.createElement($gyhAV$VisuallyHidden, null, column.rendered) : /*#__PURE__*/ $gyhAV$react.createElement("div", {
|
|
1349
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1350
|
-
}, column.rendered), columnProps.allowsResizing && columnState.currentlyResizingColumn === null && /*#__PURE__*/ $gyhAV$react.createElement($gyhAV$spectrumiconsuiChevronDownMedium, {
|
|
1351
|
-
UNSAFE_className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1352
|
-
})), /*#__PURE__*/ $gyhAV$react.createElement($gyhAV$Menu, {
|
|
1374
|
+
}, columnProps.allowsSorting && /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$spectrumiconsuiArrowDownSmall), {
|
|
1375
|
+
UNSAFE_className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-sortedIcon")
|
|
1376
|
+
}), columnProps.hideHeader ? /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$VisuallyHidden), null, column.rendered) : /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1377
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-headerCellText")
|
|
1378
|
+
}, column.rendered), columnProps.allowsResizing && columnState.currentlyResizingColumn === null && /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$spectrumiconsuiChevronDownMedium), {
|
|
1379
|
+
UNSAFE_className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-menuChevron")
|
|
1380
|
+
})), /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$Menu), {
|
|
1353
1381
|
onAction: onMenuSelect,
|
|
1354
1382
|
minWidth: "size-2000",
|
|
1355
1383
|
items: items
|
|
1356
|
-
}, (item)=>/*#__PURE__*/ $gyhAV$react.createElement($gyhAV$Item, null, item.label)
|
|
1357
|
-
)), /*#__PURE__*/ $gyhAV$react.createElement($fc695d2eafc2b351$export$48a76196cafe3b93, {
|
|
1384
|
+
}, (item)=>/*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$Item), null, item.label))), /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $fc695d2eafc2b351$export$48a76196cafe3b93), {
|
|
1358
1385
|
ref: resizingRef,
|
|
1359
1386
|
column: column,
|
|
1360
1387
|
showResizer: showResizer,
|
|
1361
|
-
triggerRef: $gyhAV$useUnwrapDOMRef(triggerRef),
|
|
1388
|
+
triggerRef: (0, $gyhAV$useUnwrapDOMRef)(triggerRef),
|
|
1362
1389
|
onMoveResizer: onMoveResizer
|
|
1363
|
-
}), /*#__PURE__*/ $gyhAV$react.createElement("div", {
|
|
1390
|
+
}), /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1364
1391
|
"aria-hidden": true,
|
|
1365
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1366
|
-
|
|
1367
|
-
|
|
1392
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-colResizeIndicator", {
|
|
1393
|
+
"spectrum-Table-colResizeIndicator--visible": columnState.currentlyResizingColumn != null,
|
|
1394
|
+
"spectrum-Table-colResizeIndicator--resizing": columnState.currentlyResizingColumn === column.key
|
|
1368
1395
|
})
|
|
1369
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement("div", {
|
|
1370
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1371
|
-
|
|
1396
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1397
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-colResizeNubbin", {
|
|
1398
|
+
"spectrum-Table-colResizeNubbin--visible": isInResizeMode && columnState.currentlyResizingColumn === column.key
|
|
1372
1399
|
})
|
|
1373
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement($cb7d341e8868d81d$export$d9658cdf8c86807, null)))))
|
|
1400
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $cb7d341e8868d81d$export$d9658cdf8c86807), null)))));
|
|
1374
1401
|
}
|
|
1375
1402
|
function $d14697b14e638114$var$TableSelectAllCell({ column: column }) {
|
|
1376
|
-
let ref = $gyhAV$useRef();
|
|
1403
|
+
let ref = (0, $gyhAV$useRef)();
|
|
1377
1404
|
let { state: state } = $d14697b14e638114$export$3cb274deb6c2d854();
|
|
1378
|
-
let isSingleSelectionMode = state.selectionManager.selectionMode ===
|
|
1379
|
-
let { columnHeaderProps: columnHeaderProps } = $gyhAV$useTableColumnHeader({
|
|
1405
|
+
let isSingleSelectionMode = state.selectionManager.selectionMode === "single";
|
|
1406
|
+
let { columnHeaderProps: columnHeaderProps } = (0, $gyhAV$useTableColumnHeader)({
|
|
1380
1407
|
node: column,
|
|
1381
1408
|
isVirtualized: true
|
|
1382
1409
|
}, state, ref);
|
|
1383
|
-
let { checkboxProps: checkboxProps } = $gyhAV$useTableSelectAllCheckbox(state);
|
|
1384
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $gyhAV$useHover({
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
...$gyhAV$mergeProps(columnHeaderProps, hoverProps),
|
|
1410
|
+
let { checkboxProps: checkboxProps } = (0, $gyhAV$useTableSelectAllCheckbox)(state);
|
|
1411
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $gyhAV$useHover)({});
|
|
1412
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$FocusRing), {
|
|
1413
|
+
focusRingClass: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "focus-ring")
|
|
1414
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1415
|
+
...(0, $gyhAV$mergeProps)(columnHeaderProps, hoverProps),
|
|
1390
1416
|
ref: ref,
|
|
1391
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1392
|
-
|
|
1417
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-headCell", "spectrum-Table-checkboxCell", {
|
|
1418
|
+
"is-hovered": isHovered
|
|
1393
1419
|
})
|
|
1394
1420
|
}, /*
|
|
1395
1421
|
In single selection mode, the checkbox will be hidden.
|
|
1396
1422
|
So to avoid leaving a column header with no accessible content,
|
|
1397
1423
|
we use a VisuallyHidden component to include the aria-label from the checkbox,
|
|
1398
1424
|
which for single selection will be "Select."
|
|
1399
|
-
*/ isSingleSelectionMode && /*#__PURE__*/ $gyhAV$react.createElement($gyhAV$VisuallyHidden, null, checkboxProps[
|
|
1425
|
+
*/ isSingleSelectionMode && /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$VisuallyHidden), null, checkboxProps["aria-label"]), /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$Checkbox), {
|
|
1400
1426
|
...checkboxProps,
|
|
1401
1427
|
isEmphasized: true,
|
|
1402
1428
|
UNSAFE_style: isSingleSelectionMode ? {
|
|
1403
|
-
visibility:
|
|
1429
|
+
visibility: "hidden"
|
|
1404
1430
|
} : undefined,
|
|
1405
|
-
UNSAFE_className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1406
|
-
})))
|
|
1431
|
+
UNSAFE_className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-checkbox")
|
|
1432
|
+
})));
|
|
1407
1433
|
}
|
|
1408
1434
|
function $d14697b14e638114$var$TableRowGroup({ children: children , ...otherProps }) {
|
|
1409
|
-
let { rowGroupProps: rowGroupProps } = $gyhAV$useTableRowGroup();
|
|
1410
|
-
return
|
|
1435
|
+
let { rowGroupProps: rowGroupProps } = (0, $gyhAV$useTableRowGroup)();
|
|
1436
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1411
1437
|
...rowGroupProps,
|
|
1412
1438
|
...otherProps
|
|
1413
|
-
}, children)
|
|
1439
|
+
}, children);
|
|
1414
1440
|
}
|
|
1415
1441
|
function $d14697b14e638114$var$TableRow({ item: item , children: children , hasActions: hasActions , ...otherProps }) {
|
|
1416
|
-
var ref,
|
|
1417
|
-
let
|
|
1442
|
+
var ref, ref1, ref2;
|
|
1443
|
+
let ref3 = (0, $gyhAV$useRef)();
|
|
1418
1444
|
let { state: state , layout: layout } = $d14697b14e638114$export$3cb274deb6c2d854();
|
|
1419
|
-
let allowsInteraction = state.selectionManager.selectionMode !==
|
|
1445
|
+
let allowsInteraction = state.selectionManager.selectionMode !== "none" || hasActions;
|
|
1420
1446
|
let isDisabled = !allowsInteraction || state.disabledKeys.has(item.key);
|
|
1421
1447
|
let isSelected = state.selectionManager.isSelected(item.key);
|
|
1422
|
-
let { rowProps: rowProps } = $gyhAV$useTableRow({
|
|
1448
|
+
let { rowProps: rowProps } = (0, $gyhAV$useTableRow)({
|
|
1423
1449
|
node: item,
|
|
1424
1450
|
isVirtualized: true
|
|
1425
|
-
}, state,
|
|
1426
|
-
let { pressProps: pressProps , isPressed: isPressed } = $gyhAV$usePress({
|
|
1451
|
+
}, state, ref3);
|
|
1452
|
+
let { pressProps: pressProps , isPressed: isPressed } = (0, $gyhAV$usePress)({
|
|
1427
1453
|
isDisabled: isDisabled
|
|
1428
1454
|
});
|
|
1429
1455
|
// The row should show the focus background style when any cell inside it is focused.
|
|
1430
1456
|
// If the row itself is focused, then it should have a blue focus indicator on the left.
|
|
1431
|
-
let { isFocusVisible: isFocusVisibleWithin , focusProps: focusWithinProps } = $gyhAV$useFocusRing({
|
|
1457
|
+
let { isFocusVisible: isFocusVisibleWithin , focusProps: focusWithinProps } = (0, $gyhAV$useFocusRing)({
|
|
1432
1458
|
within: true
|
|
1433
1459
|
});
|
|
1434
|
-
let { isFocusVisible: isFocusVisible , focusProps: focusProps } = $gyhAV$useFocusRing();
|
|
1435
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $gyhAV$useHover({
|
|
1460
|
+
let { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $gyhAV$useFocusRing)();
|
|
1461
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $gyhAV$useHover)({
|
|
1436
1462
|
isDisabled: isDisabled
|
|
1437
1463
|
});
|
|
1438
|
-
let props = $gyhAV$mergeProps(rowProps, otherProps, focusWithinProps, focusProps, hoverProps, pressProps);
|
|
1439
|
-
let isFirstRow = ((ref = state.collection.rows.find((row)=>row.level === 1
|
|
1440
|
-
)) === null || ref === void 0 ? void 0 : ref.key) === item.key;
|
|
1464
|
+
let props = (0, $gyhAV$mergeProps)(rowProps, otherProps, focusWithinProps, focusProps, hoverProps, pressProps);
|
|
1465
|
+
let isFirstRow = ((ref = state.collection.rows.find((row)=>row.level === 1)) === null || ref === void 0 ? void 0 : ref.key) === item.key;
|
|
1441
1466
|
let isLastRow = item.nextKey == null;
|
|
1442
1467
|
// Figure out if the TableView content is equal or greater in height to the container. If so, we'll need to round the bottom
|
|
1443
1468
|
// border corners of the last row when selected.
|
|
1444
1469
|
let isFlushWithContainerBottom = false;
|
|
1445
1470
|
if (isLastRow) {
|
|
1446
|
-
if (((
|
|
1471
|
+
if (((ref1 = layout.getContentSize()) === null || ref1 === void 0 ? void 0 : ref1.height) >= ((ref2 = layout.virtualizer) === null || ref2 === void 0 ? void 0 : ref2.getVisibleRect().height)) isFlushWithContainerBottom = true;
|
|
1447
1472
|
}
|
|
1448
|
-
return
|
|
1473
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1449
1474
|
...props,
|
|
1450
|
-
ref:
|
|
1451
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1475
|
+
ref: ref3,
|
|
1476
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-row", {
|
|
1477
|
+
"is-active": isPressed,
|
|
1478
|
+
"is-selected": isSelected,
|
|
1479
|
+
"spectrum-Table-row--highlightSelection": state.selectionManager.selectionBehavior === "replace",
|
|
1480
|
+
"is-next-selected": state.selectionManager.isSelected(item.nextKey),
|
|
1481
|
+
"is-focused": isFocusVisibleWithin,
|
|
1482
|
+
"focus-ring": isFocusVisible,
|
|
1483
|
+
"is-hovered": isHovered,
|
|
1484
|
+
"is-disabled": isDisabled,
|
|
1485
|
+
"spectrum-Table-row--firstRow": isFirstRow,
|
|
1486
|
+
"spectrum-Table-row--lastRow": isLastRow,
|
|
1487
|
+
"spectrum-Table-row--isFlushBottom": isFlushWithContainerBottom
|
|
1463
1488
|
})
|
|
1464
|
-
}, children)
|
|
1489
|
+
}, children);
|
|
1465
1490
|
}
|
|
1466
1491
|
function $d14697b14e638114$var$TableHeaderRow({ item: item , children: children , style: style , ...props }) {
|
|
1467
1492
|
let { state: state } = $d14697b14e638114$export$3cb274deb6c2d854();
|
|
1468
|
-
let ref = $gyhAV$useRef();
|
|
1469
|
-
let { rowProps: rowProps } = $gyhAV$useTableHeaderRow({
|
|
1493
|
+
let ref = (0, $gyhAV$useRef)();
|
|
1494
|
+
let { rowProps: rowProps } = (0, $gyhAV$useTableHeaderRow)({
|
|
1470
1495
|
node: item,
|
|
1471
1496
|
isVirtualized: true
|
|
1472
1497
|
}, state, ref);
|
|
1473
|
-
let { hoverProps: hoverProps } = $gyhAV$useHover(props);
|
|
1474
|
-
return
|
|
1475
|
-
|
|
1498
|
+
let { hoverProps: hoverProps } = (0, $gyhAV$useHover)(props);
|
|
1499
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1500
|
+
...(0, $gyhAV$mergeProps)(rowProps, hoverProps),
|
|
1476
1501
|
ref: ref,
|
|
1477
1502
|
style: style
|
|
1478
|
-
}, children)
|
|
1503
|
+
}, children);
|
|
1479
1504
|
}
|
|
1480
1505
|
function $d14697b14e638114$var$TableCheckboxCell({ cell: cell }) {
|
|
1481
|
-
let ref = $gyhAV$useRef();
|
|
1506
|
+
let ref = (0, $gyhAV$useRef)();
|
|
1482
1507
|
let { state: state } = $d14697b14e638114$export$3cb274deb6c2d854();
|
|
1483
1508
|
let isDisabled = state.disabledKeys.has(cell.parentKey);
|
|
1484
|
-
let { gridCellProps: gridCellProps } = $gyhAV$useTableCell({
|
|
1509
|
+
let { gridCellProps: gridCellProps } = (0, $gyhAV$useTableCell)({
|
|
1485
1510
|
node: cell,
|
|
1486
1511
|
isVirtualized: true
|
|
1487
1512
|
}, state, ref);
|
|
1488
|
-
let { checkboxProps: checkboxProps } = $gyhAV$useTableSelectionCheckbox({
|
|
1513
|
+
let { checkboxProps: checkboxProps } = (0, $gyhAV$useTableSelectionCheckbox)({
|
|
1489
1514
|
key: cell.parentKey
|
|
1490
1515
|
}, state);
|
|
1491
|
-
return
|
|
1492
|
-
focusRingClass: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1493
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement("div", {
|
|
1516
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$FocusRing), {
|
|
1517
|
+
focusRingClass: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "focus-ring")
|
|
1518
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1494
1519
|
...gridCellProps,
|
|
1495
1520
|
ref: ref,
|
|
1496
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1497
|
-
|
|
1498
|
-
}, $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($325bc3d43b25708b$exports)),
|
|
1499
|
-
}, state.selectionManager.selectionMode !==
|
|
1521
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-cell", "spectrum-Table-checkboxCell", {
|
|
1522
|
+
"is-disabled": isDisabled
|
|
1523
|
+
}, (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($325bc3d43b25708b$exports))), "react-spectrum-Table-cell"))
|
|
1524
|
+
}, state.selectionManager.selectionMode !== "none" && /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$Checkbox), {
|
|
1500
1525
|
...checkboxProps,
|
|
1501
1526
|
isEmphasized: true,
|
|
1502
1527
|
isDisabled: isDisabled,
|
|
1503
|
-
UNSAFE_className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1504
|
-
})))
|
|
1528
|
+
UNSAFE_className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-checkbox")
|
|
1529
|
+
})));
|
|
1505
1530
|
}
|
|
1506
1531
|
function $d14697b14e638114$var$TableCell({ cell: cell }) {
|
|
1507
1532
|
let { state: state } = $d14697b14e638114$export$3cb274deb6c2d854();
|
|
1508
|
-
let ref = $gyhAV$useRef();
|
|
1533
|
+
let ref = (0, $gyhAV$useRef)();
|
|
1509
1534
|
let columnProps = cell.column.props;
|
|
1510
1535
|
let isDisabled = state.disabledKeys.has(cell.parentKey);
|
|
1511
|
-
let { gridCellProps: gridCellProps } = $gyhAV$useTableCell({
|
|
1536
|
+
let { gridCellProps: gridCellProps } = (0, $gyhAV$useTableCell)({
|
|
1512
1537
|
node: cell,
|
|
1513
1538
|
isVirtualized: true
|
|
1514
1539
|
}, state, ref);
|
|
1515
|
-
return
|
|
1516
|
-
focusRingClass: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1517
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement("div", {
|
|
1540
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement((0, $gyhAV$FocusRing), {
|
|
1541
|
+
focusRingClass: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "focus-ring")
|
|
1542
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1518
1543
|
...gridCellProps,
|
|
1519
1544
|
ref: ref,
|
|
1520
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
}, $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($325bc3d43b25708b$exports)),
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1545
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-cell", {
|
|
1546
|
+
"spectrum-Table-cell--divider": columnProps.showDivider && cell.column.nextKey !== null,
|
|
1547
|
+
"spectrum-Table-cell--hideHeader": columnProps.hideHeader,
|
|
1548
|
+
"is-disabled": isDisabled
|
|
1549
|
+
}, (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($325bc3d43b25708b$exports))), "react-spectrum-Table-cell", {
|
|
1550
|
+
"react-spectrum-Table-cell--alignStart": columnProps.align === "start",
|
|
1551
|
+
"react-spectrum-Table-cell--alignCenter": columnProps.align === "center",
|
|
1552
|
+
"react-spectrum-Table-cell--alignEnd": columnProps.align === "end"
|
|
1528
1553
|
}))
|
|
1529
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement("span", {
|
|
1530
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports)),
|
|
1531
|
-
}, cell.rendered)))
|
|
1554
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement("span", {
|
|
1555
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($bd5d41f647a296c3$exports))), "spectrum-Table-cellContents")
|
|
1556
|
+
}, cell.rendered)));
|
|
1532
1557
|
}
|
|
1533
1558
|
function $d14697b14e638114$var$CenteredWrapper({ children: children }) {
|
|
1534
1559
|
let { state: state } = $d14697b14e638114$export$3cb274deb6c2d854();
|
|
1535
|
-
return
|
|
1560
|
+
return /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1536
1561
|
role: "row",
|
|
1537
1562
|
"aria-rowindex": state.collection.headerRows.length + state.collection.size + 1,
|
|
1538
|
-
className: $gyhAV$classNames((/*@__PURE__*/$parcel$interopDefault($325bc3d43b25708b$exports)),
|
|
1539
|
-
}, /*#__PURE__*/ $gyhAV$react.createElement("div", {
|
|
1563
|
+
className: (0, $gyhAV$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($325bc3d43b25708b$exports))), "react-spectrum-Table-centeredWrapper")
|
|
1564
|
+
}, /*#__PURE__*/ (0, $gyhAV$react).createElement("div", {
|
|
1540
1565
|
role: "rowheader",
|
|
1541
1566
|
"aria-colspan": state.collection.columns.length
|
|
1542
|
-
}, children))
|
|
1567
|
+
}, children));
|
|
1543
1568
|
}
|
|
1544
1569
|
/**
|
|
1545
1570
|
* Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
|
|
1546
|
-
*/ const $d14697b14e638114$export$b3c27e869d856b7 = /*#__PURE__*/ $gyhAV$react.forwardRef($d14697b14e638114$var$TableView);
|
|
1571
|
+
*/ const $d14697b14e638114$export$b3c27e869d856b7 = /*#__PURE__*/ (0, $gyhAV$react).forwardRef($d14697b14e638114$var$TableView);
|
|
1572
|
+
|
|
1547
1573
|
|
|
1548
1574
|
|
|
1549
1575
|
|
|
1550
1576
|
// Override TS for Column to support spectrum specific props.
|
|
1551
|
-
const $e668f3d0f378a712$export$816b5d811295e6bc = $gyhAV$Column;
|
|
1577
|
+
const $e668f3d0f378a712$export$816b5d811295e6bc = (0, $gyhAV$Column);
|
|
1552
1578
|
|
|
1553
1579
|
|
|
1554
1580
|
export {$e668f3d0f378a712$export$816b5d811295e6bc as Column, $d14697b14e638114$export$b3c27e869d856b7 as TableView, $e668f3d0f378a712$re_export$TableHeader as TableHeader, $e668f3d0f378a712$re_export$TableBody as TableBody, $e668f3d0f378a712$re_export$Section as Section, $e668f3d0f378a712$re_export$Row as Row, $e668f3d0f378a712$re_export$Cell as Cell};
|