schummar-table 0.7.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +441 -387
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/mui4Theme.js +5 -5
- package/dist/cjs/mui4Theme.js.map +1 -1
- package/dist/cjs/mui5Theme.js +6 -6
- package/dist/cjs/mui5Theme.js.map +1 -1
- package/dist/cjs/tableTheme.js +20 -7
- package/dist/cjs/tableTheme.js.map +1 -1
- package/dist/es/index.js +442 -388
- package/dist/es/index.js.map +1 -1
- package/dist/es/mui4Theme.js +5 -5
- package/dist/es/mui4Theme.js.map +1 -1
- package/dist/es/mui5Theme.js +6 -6
- package/dist/es/mui5Theme.js.map +1 -1
- package/dist/es/tableTheme.js +20 -7
- package/dist/es/tableTheme.js.map +1 -1
- package/dist/types/components/columnFooter.d.ts +1 -0
- package/dist/types/components/columnHeader.d.ts +1 -2
- package/dist/types/components/virtualized.d.ts +2 -1
- package/dist/types/theme/defaultTheme/defaultClasses.d.ts +3 -0
- package/dist/types/types.d.ts +12 -3
- package/package.json +11 -11
package/dist/cjs/index.js
CHANGED
|
@@ -44,7 +44,7 @@ const TableMemoContext = react.createContext(/* @__PURE__ */ new Map());
|
|
|
44
44
|
function TableMemoContextProvider({
|
|
45
45
|
children
|
|
46
46
|
}) {
|
|
47
|
-
return jsxRuntime.jsx(TableMemoContext.Provider, {
|
|
47
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TableMemoContext.Provider, {
|
|
48
48
|
value: react.useMemo(() => /* @__PURE__ */ new Map(), []),
|
|
49
49
|
children
|
|
50
50
|
});
|
|
@@ -401,7 +401,7 @@ const noopParentId = () => void 0;
|
|
|
401
401
|
function calcProps(props) {
|
|
402
402
|
const cache = useTableMemo();
|
|
403
403
|
return react.useMemo(() => {
|
|
404
|
-
var
|
|
404
|
+
var _f, _g, _h, _i, _j, _k, _l;
|
|
405
405
|
let id;
|
|
406
406
|
if (props.id instanceof Function || Array.isArray(props.id)) {
|
|
407
407
|
id = cache("id", props.id);
|
|
@@ -426,10 +426,11 @@ function calcProps(props) {
|
|
|
426
426
|
const mapColumn = ({
|
|
427
427
|
id: _id,
|
|
428
428
|
header = ((_a) => (_a = defCol == null ? void 0 : defCol.header) != null ? _a : null)(),
|
|
429
|
+
footer = ((_b) => (_b = defCol == null ? void 0 : defCol.footer) != null ? _b : null)(),
|
|
429
430
|
value,
|
|
430
|
-
renderCell = ((
|
|
431
|
-
exportCell = ((
|
|
432
|
-
sortBy = ((
|
|
431
|
+
renderCell = ((_c) => (_c = defCol == null ? void 0 : defCol.renderCell) != null ? _c : asString)(),
|
|
432
|
+
exportCell = ((_d) => (_d = defCol == null ? void 0 : defCol.exportCell) != null ? _d : asString)(),
|
|
433
|
+
sortBy = ((_e) => (_e = defCol == null ? void 0 : defCol.sortBy) != null ? _e : [(v) => typeof v === "number" || v instanceof Date ? v : String(v)])(),
|
|
433
434
|
cannotHide = defCol == null ? void 0 : defCol.cannotHide,
|
|
434
435
|
classes = defCol == null ? void 0 : defCol.classes,
|
|
435
436
|
filter = defCol == null ? void 0 : defCol.filter,
|
|
@@ -439,7 +440,8 @@ function calcProps(props) {
|
|
|
439
440
|
const cacheKey = typeof id2 === "string" ? `s${id2}` : `n${id2}`;
|
|
440
441
|
return {
|
|
441
442
|
id: id2,
|
|
442
|
-
header,
|
|
443
|
+
header: header instanceof Function ? cache(`columns.${cacheKey}.header`, header) : header,
|
|
444
|
+
footer: footer instanceof Function ? cache(`columns.${cacheKey}.footer`, footer) : footer,
|
|
443
445
|
value: cache(`columns.${cacheKey}.value`, value),
|
|
444
446
|
renderCell: cache(`columns.${cacheKey}.renderCell`, renderCell),
|
|
445
447
|
exportCell,
|
|
@@ -472,13 +474,14 @@ function calcProps(props) {
|
|
|
472
474
|
columns,
|
|
473
475
|
wrapCell,
|
|
474
476
|
rowAction,
|
|
475
|
-
enableSelection: (
|
|
476
|
-
selectSyncChildren: (
|
|
477
|
-
stickyHeader: (
|
|
477
|
+
enableSelection: (_f = props.enableSelection) != null ? _f : true,
|
|
478
|
+
selectSyncChildren: (_g = props.selectSyncChildren) != null ? _g : true,
|
|
479
|
+
stickyHeader: (_h = props.stickyHeader) != null ? _h : true,
|
|
480
|
+
stickyFooter: (_i = props.stickyFooter) != null ? _i : true,
|
|
478
481
|
enableExport,
|
|
479
|
-
enableColumnSelection: (
|
|
480
|
-
enableColumnResize: (
|
|
481
|
-
enableColumnReorder: (
|
|
482
|
+
enableColumnSelection: (_j = props.enableColumnSelection) != null ? _j : true,
|
|
483
|
+
enableColumnResize: (_k = props.enableColumnResize) != null ? _k : true,
|
|
484
|
+
enableColumnReorder: (_l = props.enableColumnReorder) != null ? _l : true
|
|
482
485
|
});
|
|
483
486
|
}, [props]);
|
|
484
487
|
}
|
|
@@ -618,14 +621,259 @@ function useCssVariables() {
|
|
|
618
621
|
"--secondaryContrastText": colors.secondary.contrastText
|
|
619
622
|
}));
|
|
620
623
|
}
|
|
624
|
+
function ColumnFooter() {
|
|
625
|
+
const table = useTableContext();
|
|
626
|
+
const columnId = useColumnContext();
|
|
627
|
+
const stickyFooter = table.useState("props.stickyFooter");
|
|
628
|
+
const columnStyleOverride = table.useState((state) => state.columnStyleOverride.get(columnId), {
|
|
629
|
+
throttle: 16
|
|
630
|
+
});
|
|
631
|
+
const columnClasses = table.useState((state) => {
|
|
632
|
+
var _a;
|
|
633
|
+
return (_a = state.activeColumns.find((column) => column.id === columnId)) == null ? void 0 : _a.classes;
|
|
634
|
+
});
|
|
635
|
+
const classes = useTheme((theme) => theme.classes);
|
|
636
|
+
const content = table.useState((state) => {
|
|
637
|
+
const column = state.activeColumns.find((column2) => column2.id === columnId);
|
|
638
|
+
if ((column == null ? void 0 : column.footer) instanceof Function) {
|
|
639
|
+
const items = state.activeItems;
|
|
640
|
+
const values = items.map((item) => column == null ? void 0 : column.value(item.value));
|
|
641
|
+
return column == null ? void 0 : column.footer(values, items);
|
|
642
|
+
}
|
|
643
|
+
return column == null ? void 0 : column.footer;
|
|
644
|
+
});
|
|
645
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
646
|
+
className: cx(classes == null ? void 0 : classes.footerCell, columnClasses == null ? void 0 : columnClasses.footerCell),
|
|
647
|
+
css: [tableTheme.defaultClasses.footerCell, columnStyleOverride, stickyFooter && tableTheme.defaultClasses.stickyBottom, stickyFooter instanceof Object && stickyFooter],
|
|
648
|
+
children: content
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
const FilterControlContext = react.createContext(() => void 0);
|
|
652
|
+
function FilterControl() {
|
|
653
|
+
const table = useTableContext();
|
|
654
|
+
const columnId = useColumnContext();
|
|
655
|
+
const IconButton2 = useTheme((t) => t.components.IconButton);
|
|
656
|
+
const Popover = useTheme((t) => t.components.Popover);
|
|
657
|
+
const FilterList2 = useTheme((t) => t.icons.FilterList);
|
|
658
|
+
const ArrowDropDown2 = useTheme((t) => t.icons.ArrowDropDown);
|
|
659
|
+
const cssVariables = useCssVariables();
|
|
660
|
+
const [anchor, setAnchor] = react.useState(null);
|
|
661
|
+
const isActive = table.useState((state) => {
|
|
662
|
+
const filter2 = state.filters.get(columnId);
|
|
663
|
+
const filterValue = state.filterValues.get(columnId);
|
|
664
|
+
return filter2 !== void 0 && filterValue !== void 0 && filter2.isActive(filterValue);
|
|
665
|
+
});
|
|
666
|
+
const filter = table.useState((state) => {
|
|
667
|
+
var _a;
|
|
668
|
+
return (_a = state.activeColumns.find((column) => column.id === columnId)) == null ? void 0 : _a.filter;
|
|
669
|
+
});
|
|
670
|
+
function reset() {
|
|
671
|
+
table.update((state) => {
|
|
672
|
+
state.filterValues.delete(columnId);
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
const close = react.useCallback(function() {
|
|
676
|
+
setAnchor(null);
|
|
677
|
+
}, []);
|
|
678
|
+
if (!filter)
|
|
679
|
+
return null;
|
|
680
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(FilterControlContext.Provider, {
|
|
681
|
+
value: close,
|
|
682
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
683
|
+
onClick: (e) => setAnchor(e.currentTarget),
|
|
684
|
+
onContextMenu: (e) => {
|
|
685
|
+
reset();
|
|
686
|
+
e.preventDefault();
|
|
687
|
+
return false;
|
|
688
|
+
},
|
|
689
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconButton2, {
|
|
690
|
+
css: [{
|
|
691
|
+
color: "#b0bac9"
|
|
692
|
+
}, isActive && {
|
|
693
|
+
color: "var(--primaryMain) !important"
|
|
694
|
+
}],
|
|
695
|
+
children: isActive ? /* @__PURE__ */ jsxRuntime.jsx(FilterList2, {}) : /* @__PURE__ */ jsxRuntime.jsx(ArrowDropDown2, {})
|
|
696
|
+
})
|
|
697
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
698
|
+
onPointerDown: (e) => {
|
|
699
|
+
e.stopPropagation();
|
|
700
|
+
},
|
|
701
|
+
onPointerMove: (e) => {
|
|
702
|
+
e.stopPropagation();
|
|
703
|
+
},
|
|
704
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Popover, {
|
|
705
|
+
open: true,
|
|
706
|
+
hidden: !anchor,
|
|
707
|
+
onClose: () => setAnchor(null),
|
|
708
|
+
anchorEl: anchor != null ? anchor : document.body,
|
|
709
|
+
css: cssVariables,
|
|
710
|
+
children: filter
|
|
711
|
+
})
|
|
712
|
+
})]
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
function ResizeHandle() {
|
|
716
|
+
const table = useTableContext();
|
|
717
|
+
const columnId = useColumnContext();
|
|
718
|
+
const enabled = table.useState("props.enableColumnResize");
|
|
719
|
+
function onPointerDown(e) {
|
|
720
|
+
e.stopPropagation();
|
|
721
|
+
const div = e.target;
|
|
722
|
+
div.setPointerCapture(e.pointerId);
|
|
723
|
+
}
|
|
724
|
+
function onPointerMove(e) {
|
|
725
|
+
e.stopPropagation();
|
|
726
|
+
const div = e.target;
|
|
727
|
+
if (!div.hasPointerCapture(e.pointerId))
|
|
728
|
+
return;
|
|
729
|
+
const parent = div.parentElement;
|
|
730
|
+
const width = Math.max(e.clientX - parent.getBoundingClientRect().left + 5, 50);
|
|
731
|
+
table.update((state) => {
|
|
732
|
+
state.columnWidths.set(columnId, `${width}px`);
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
function onPointerUp(e) {
|
|
736
|
+
e.stopPropagation();
|
|
737
|
+
const div = e.target;
|
|
738
|
+
div.releasePointerCapture(e.pointerId);
|
|
739
|
+
}
|
|
740
|
+
function onDoubleClick(e) {
|
|
741
|
+
table.update((state) => {
|
|
742
|
+
if (e.getModifierState("Control")) {
|
|
743
|
+
state.columnWidths.delete(columnId);
|
|
744
|
+
} else {
|
|
745
|
+
state.columnWidths.set(columnId, "max-content");
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ResizeHandleView, {
|
|
750
|
+
enabled,
|
|
751
|
+
onPointerDown: enabled ? onPointerDown : void 0,
|
|
752
|
+
onPointerMove: enabled ? onPointerMove : void 0,
|
|
753
|
+
onPointerUp: enabled ? onPointerUp : void 0,
|
|
754
|
+
onDoubleClick: enabled ? onDoubleClick : void 0
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
function ResizeHandleView(_a) {
|
|
758
|
+
var _b = _a, {
|
|
759
|
+
enabled
|
|
760
|
+
} = _b, props = __objRest(_b, [
|
|
761
|
+
"enabled"
|
|
762
|
+
]);
|
|
763
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadValues({
|
|
764
|
+
css: {
|
|
765
|
+
alignSelf: "stretch",
|
|
766
|
+
padding: "0 5px",
|
|
767
|
+
cursor: enabled ? "col-resize" : "initial",
|
|
768
|
+
display: "flex",
|
|
769
|
+
alignItems: "center",
|
|
770
|
+
"&:after": {
|
|
771
|
+
content: '""',
|
|
772
|
+
width: 1,
|
|
773
|
+
height: "1.5em",
|
|
774
|
+
background: "#c9cfda",
|
|
775
|
+
transition: "transform 300ms"
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}, props));
|
|
779
|
+
}
|
|
780
|
+
function SortComponent({
|
|
781
|
+
children
|
|
782
|
+
}) {
|
|
783
|
+
const table = useTableContext();
|
|
784
|
+
const columnId = useColumnContext();
|
|
785
|
+
const Badge2 = useTheme((t) => t.components.Badge);
|
|
786
|
+
const ArrowUpward2 = useTheme((t) => t.icons.ArrowUpward);
|
|
787
|
+
const {
|
|
788
|
+
direction,
|
|
789
|
+
index
|
|
790
|
+
} = table.useState((state) => {
|
|
791
|
+
var _a, _b;
|
|
792
|
+
const index2 = (_a = state.sort.findIndex((s) => s.columnId === columnId)) != null ? _a : -1;
|
|
793
|
+
return {
|
|
794
|
+
direction: (_b = state.sort[index2]) == null ? void 0 : _b.direction,
|
|
795
|
+
index: index2 >= 0 && state.sort.length > 1 ? index2 + 1 : void 0
|
|
796
|
+
};
|
|
797
|
+
});
|
|
798
|
+
function toggle2(e, off) {
|
|
799
|
+
const {
|
|
800
|
+
props: {
|
|
801
|
+
sort: controlledSort,
|
|
802
|
+
onSortChange
|
|
803
|
+
}
|
|
804
|
+
} = table.getState();
|
|
805
|
+
const newDirection = direction === "asc" ? "desc" : "asc";
|
|
806
|
+
const newSort = e.getModifierState("Control") || off ? table.getState().sort.filter((s) => s.columnId !== columnId) : [];
|
|
807
|
+
if (!off) {
|
|
808
|
+
newSort.push({
|
|
809
|
+
columnId,
|
|
810
|
+
direction: newDirection
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
onSortChange == null ? void 0 : onSortChange(newSort);
|
|
814
|
+
if (!controlledSort) {
|
|
815
|
+
table.update((state) => {
|
|
816
|
+
state.sort = newSort;
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
e.preventDefault();
|
|
820
|
+
return false;
|
|
821
|
+
}
|
|
822
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
823
|
+
css: {
|
|
824
|
+
userSelect: "none",
|
|
825
|
+
display: "grid",
|
|
826
|
+
gridTemplateColumns: "minmax(0, 1fr) max-content",
|
|
827
|
+
alignItems: "center",
|
|
828
|
+
cursor: "pointer",
|
|
829
|
+
"& > div": {
|
|
830
|
+
overflow: "hidden",
|
|
831
|
+
textOverflow: "ellipsis"
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
onClick: (e) => toggle2(e),
|
|
835
|
+
onContextMenu: (e) => toggle2(e, true),
|
|
836
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
837
|
+
children
|
|
838
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Badge2, {
|
|
839
|
+
badgeContent: index,
|
|
840
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
841
|
+
css: [{
|
|
842
|
+
transition: "all 300ms",
|
|
843
|
+
fontSize: "0.8em"
|
|
844
|
+
}, !direction && {
|
|
845
|
+
opacity: 0
|
|
846
|
+
}, direction === "desc" && {
|
|
847
|
+
transform: "rotate3d(0, 0, 1, 180deg)"
|
|
848
|
+
}],
|
|
849
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ArrowUpward2, {})
|
|
850
|
+
})
|
|
851
|
+
})]
|
|
852
|
+
});
|
|
853
|
+
}
|
|
621
854
|
const ColumnHeaderContext = new react$1.StoreScope({
|
|
622
855
|
items: /* @__PURE__ */ new Map()
|
|
623
856
|
});
|
|
624
|
-
function ColumnHeader(
|
|
857
|
+
function ColumnHeader() {
|
|
625
858
|
const ref = react.useRef(null);
|
|
626
859
|
const columnId = useColumnContext();
|
|
627
860
|
const table = useTableContext();
|
|
628
861
|
const enabled = table.useState("props.enableColumnReorder");
|
|
862
|
+
const columnStyleOverride = table.useState((state) => state.columnStyleOverride.get(columnId), {
|
|
863
|
+
throttle: 16
|
|
864
|
+
});
|
|
865
|
+
const stickyHeader = table.useState("props.stickyHeader");
|
|
866
|
+
const classes = useTheme((theme) => theme.classes);
|
|
867
|
+
const {
|
|
868
|
+
header,
|
|
869
|
+
columnClasses
|
|
870
|
+
} = table.useState((state) => {
|
|
871
|
+
const column = state.activeColumns.find((column2) => column2.id === columnId);
|
|
872
|
+
return {
|
|
873
|
+
header: column == null ? void 0 : column.header,
|
|
874
|
+
columnClasses: column == null ? void 0 : column.classes
|
|
875
|
+
};
|
|
876
|
+
});
|
|
629
877
|
const store = ColumnHeaderContext.useStore();
|
|
630
878
|
const draggingStart = react.useRef();
|
|
631
879
|
const clone = react.useRef();
|
|
@@ -744,24 +992,31 @@ function ColumnHeader(props) {
|
|
|
744
992
|
clone.current = void 0;
|
|
745
993
|
});
|
|
746
994
|
}
|
|
747
|
-
return jsxRuntime.
|
|
748
|
-
|
|
995
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
996
|
+
ref,
|
|
997
|
+
className: cx(classes == null ? void 0 : classes.headerCell, columnClasses == null ? void 0 : columnClasses.headerCell),
|
|
998
|
+
css: [{
|
|
749
999
|
position: "relative",
|
|
750
1000
|
userSelect: "none"
|
|
751
|
-
},
|
|
752
|
-
ref,
|
|
1001
|
+
}, tableTheme.defaultClasses.headerCell, columnStyleOverride, stickyHeader && tableTheme.defaultClasses.sticky, stickyHeader instanceof Object && stickyHeader],
|
|
753
1002
|
onPointerDown: enabled ? onPointerDown : void 0,
|
|
754
1003
|
onPointerMove: enabled ? onPointerMove : void 0,
|
|
755
1004
|
onPointerUp: enabled ? onPointerUp : void 0,
|
|
756
|
-
children:
|
|
757
|
-
|
|
1005
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(SortComponent, {
|
|
1006
|
+
children: header
|
|
1007
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1008
|
+
css: {
|
|
1009
|
+
flex: 1
|
|
1010
|
+
}
|
|
1011
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(FilterControl, {}), /* @__PURE__ */ jsxRuntime.jsx(ResizeHandle, {})]
|
|
1012
|
+
});
|
|
758
1013
|
}
|
|
759
1014
|
function FormControlLabel({
|
|
760
1015
|
control,
|
|
761
1016
|
label,
|
|
762
1017
|
disabled
|
|
763
1018
|
}) {
|
|
764
|
-
return jsxRuntime.jsxs("label", {
|
|
1019
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("label", {
|
|
765
1020
|
css: [{
|
|
766
1021
|
display: "flex",
|
|
767
1022
|
alignItems: "center",
|
|
@@ -773,7 +1028,7 @@ function FormControlLabel({
|
|
|
773
1028
|
}, disabled && {
|
|
774
1029
|
color: "rgba(0, 0, 0, 0.26)"
|
|
775
1030
|
}],
|
|
776
|
-
children: [control, jsxRuntime.jsx("span", {
|
|
1031
|
+
children: [control, /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
777
1032
|
css: {
|
|
778
1033
|
marginLeft: "var(--spacing)"
|
|
779
1034
|
},
|
|
@@ -811,27 +1066,27 @@ function ColumnSelection() {
|
|
|
811
1066
|
}
|
|
812
1067
|
onHiddenColumnsChange == null ? void 0 : onHiddenColumnsChange(newValue);
|
|
813
1068
|
};
|
|
814
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
815
|
-
children: [jsxRuntime.jsx(IconButton2, {
|
|
1069
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1070
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(IconButton2, {
|
|
816
1071
|
onClick: (e) => setAnchorEl(anchorEl ? null : e.currentTarget),
|
|
817
|
-
children: jsxRuntime.jsx(Settings2, {})
|
|
818
|
-
}), jsxRuntime.jsx(Popover, {
|
|
1072
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Settings2, {})
|
|
1073
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Popover, {
|
|
819
1074
|
anchorEl,
|
|
820
1075
|
open: !!anchorEl,
|
|
821
1076
|
onClose: () => setAnchorEl(null),
|
|
822
1077
|
css: cssVariables,
|
|
823
|
-
children: jsxRuntime.jsxs("div", {
|
|
1078
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
824
1079
|
css: {
|
|
825
1080
|
padding: `calc(var(--spacing) * 2)`,
|
|
826
1081
|
display: "grid"
|
|
827
1082
|
},
|
|
828
|
-
children: [jsxRuntime.jsx("div", {
|
|
1083
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
829
1084
|
css: {
|
|
830
1085
|
marginBottom: "var(--spacing)"
|
|
831
1086
|
},
|
|
832
1087
|
children: selectColumns
|
|
833
|
-
}), columns.map((column) => jsxRuntime.jsx(FormControlLabel, {
|
|
834
|
-
control: jsxRuntime.jsx(Checkbox2, {
|
|
1088
|
+
}), columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(FormControlLabel, {
|
|
1089
|
+
control: /* @__PURE__ */ jsxRuntime.jsx(Checkbox2, {
|
|
835
1090
|
checked: !hiddenColumns.has(column.id),
|
|
836
1091
|
onChange: () => toggle2(column),
|
|
837
1092
|
disabled: column.cannotHide
|
|
@@ -885,20 +1140,20 @@ function Export$1() {
|
|
|
885
1140
|
a.click();
|
|
886
1141
|
document.body.removeChild(a);
|
|
887
1142
|
};
|
|
888
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
889
|
-
children: [jsxRuntime.jsx(IconButton2, {
|
|
1143
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1144
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(IconButton2, {
|
|
890
1145
|
onClick: (e) => setAnchor(anchor ? null : e.currentTarget),
|
|
891
|
-
children: jsxRuntime.jsx(Export2, {
|
|
1146
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Export2, {
|
|
892
1147
|
css: !!anchor && {
|
|
893
1148
|
color: "var(--primaryMain)"
|
|
894
1149
|
}
|
|
895
1150
|
})
|
|
896
|
-
}), jsxRuntime.jsx(Popover, {
|
|
1151
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Popover, {
|
|
897
1152
|
open: !!anchor,
|
|
898
1153
|
onClose: () => setAnchor(null),
|
|
899
1154
|
anchorEl: anchor,
|
|
900
1155
|
css: cssVariables,
|
|
901
|
-
children: jsxRuntime.jsxs("div", {
|
|
1156
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
902
1157
|
css: {
|
|
903
1158
|
padding: `calc(var(--spacing) * 2)`,
|
|
904
1159
|
display: "grid",
|
|
@@ -908,17 +1163,17 @@ function Export$1() {
|
|
|
908
1163
|
justifyContent: "start"
|
|
909
1164
|
}
|
|
910
1165
|
},
|
|
911
|
-
children: [jsxRuntime.jsx("div", {
|
|
1166
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
912
1167
|
css: {
|
|
913
1168
|
marginBottom: "var(--spacing)"
|
|
914
1169
|
},
|
|
915
1170
|
children: exportTitle
|
|
916
|
-
}), jsxRuntime.jsx(Button2, {
|
|
917
|
-
startIcon: jsxRuntime.jsx(Clipboard2, {}),
|
|
1171
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Button2, {
|
|
1172
|
+
startIcon: /* @__PURE__ */ jsxRuntime.jsx(Clipboard2, {}),
|
|
918
1173
|
onClick: copy,
|
|
919
1174
|
children: exportCopy
|
|
920
|
-
}), jsxRuntime.jsx(Button2, {
|
|
921
|
-
startIcon: jsxRuntime.jsx(Export2, {}),
|
|
1175
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Button2, {
|
|
1176
|
+
startIcon: /* @__PURE__ */ jsxRuntime.jsx(Export2, {}),
|
|
922
1177
|
onClick: download,
|
|
923
1178
|
children: exportDownload
|
|
924
1179
|
})]
|
|
@@ -926,138 +1181,9 @@ function Export$1() {
|
|
|
926
1181
|
})]
|
|
927
1182
|
});
|
|
928
1183
|
}
|
|
929
|
-
const FilterControlContext = react.createContext(() => void 0);
|
|
930
|
-
function FilterControl() {
|
|
931
|
-
const table = useTableContext();
|
|
932
|
-
const columnId = useColumnContext();
|
|
933
|
-
const IconButton2 = useTheme((t) => t.components.IconButton);
|
|
934
|
-
const Popover = useTheme((t) => t.components.Popover);
|
|
935
|
-
const FilterList2 = useTheme((t) => t.icons.FilterList);
|
|
936
|
-
const ArrowDropDown2 = useTheme((t) => t.icons.ArrowDropDown);
|
|
937
|
-
const cssVariables = useCssVariables();
|
|
938
|
-
const [anchor, setAnchor] = react.useState(null);
|
|
939
|
-
const isActive = table.useState((state) => {
|
|
940
|
-
const filter2 = state.filters.get(columnId);
|
|
941
|
-
const filterValue = state.filterValues.get(columnId);
|
|
942
|
-
return filter2 !== void 0 && filterValue !== void 0 && filter2.isActive(filterValue);
|
|
943
|
-
});
|
|
944
|
-
const filter = table.useState((state) => {
|
|
945
|
-
var _a;
|
|
946
|
-
return (_a = state.activeColumns.find((column) => column.id === columnId)) == null ? void 0 : _a.filter;
|
|
947
|
-
});
|
|
948
|
-
function reset() {
|
|
949
|
-
table.update((state) => {
|
|
950
|
-
state.filterValues.delete(columnId);
|
|
951
|
-
});
|
|
952
|
-
}
|
|
953
|
-
const close = react.useCallback(function() {
|
|
954
|
-
setAnchor(null);
|
|
955
|
-
}, []);
|
|
956
|
-
if (!filter)
|
|
957
|
-
return null;
|
|
958
|
-
return jsxRuntime.jsxs(FilterControlContext.Provider, {
|
|
959
|
-
value: close,
|
|
960
|
-
children: [jsxRuntime.jsx("div", {
|
|
961
|
-
onClick: (e) => setAnchor(e.currentTarget),
|
|
962
|
-
onContextMenu: (e) => {
|
|
963
|
-
reset();
|
|
964
|
-
e.preventDefault();
|
|
965
|
-
return false;
|
|
966
|
-
},
|
|
967
|
-
children: jsxRuntime.jsx(IconButton2, {
|
|
968
|
-
css: [{
|
|
969
|
-
color: "#b0bac9"
|
|
970
|
-
}, isActive && {
|
|
971
|
-
color: "var(--primaryMain) !important"
|
|
972
|
-
}],
|
|
973
|
-
children: isActive ? jsxRuntime.jsx(FilterList2, {}) : jsxRuntime.jsx(ArrowDropDown2, {})
|
|
974
|
-
})
|
|
975
|
-
}), jsxRuntime.jsx("div", {
|
|
976
|
-
onPointerDown: (e) => {
|
|
977
|
-
e.stopPropagation();
|
|
978
|
-
},
|
|
979
|
-
onPointerMove: (e) => {
|
|
980
|
-
e.stopPropagation();
|
|
981
|
-
},
|
|
982
|
-
children: jsxRuntime.jsx(Popover, {
|
|
983
|
-
open: true,
|
|
984
|
-
hidden: !anchor,
|
|
985
|
-
onClose: () => setAnchor(null),
|
|
986
|
-
anchorEl: anchor != null ? anchor : document.body,
|
|
987
|
-
css: cssVariables,
|
|
988
|
-
children: filter
|
|
989
|
-
})
|
|
990
|
-
})]
|
|
991
|
-
});
|
|
992
|
-
}
|
|
993
|
-
function ResizeHandle() {
|
|
994
|
-
const table = useTableContext();
|
|
995
|
-
const columnId = useColumnContext();
|
|
996
|
-
const enabled = table.useState("props.enableColumnResize");
|
|
997
|
-
function onPointerDown(e) {
|
|
998
|
-
e.stopPropagation();
|
|
999
|
-
const div = e.target;
|
|
1000
|
-
div.setPointerCapture(e.pointerId);
|
|
1001
|
-
}
|
|
1002
|
-
function onPointerMove(e) {
|
|
1003
|
-
e.stopPropagation();
|
|
1004
|
-
const div = e.target;
|
|
1005
|
-
if (!div.hasPointerCapture(e.pointerId))
|
|
1006
|
-
return;
|
|
1007
|
-
const parent = div.parentElement;
|
|
1008
|
-
const width = Math.max(e.clientX - parent.getBoundingClientRect().left + 5, 50);
|
|
1009
|
-
table.update((state) => {
|
|
1010
|
-
state.columnWidths.set(columnId, `${width}px`);
|
|
1011
|
-
});
|
|
1012
|
-
}
|
|
1013
|
-
function onPointerUp(e) {
|
|
1014
|
-
e.stopPropagation();
|
|
1015
|
-
const div = e.target;
|
|
1016
|
-
div.releasePointerCapture(e.pointerId);
|
|
1017
|
-
}
|
|
1018
|
-
function onDoubleClick(e) {
|
|
1019
|
-
table.update((state) => {
|
|
1020
|
-
if (e.getModifierState("Control")) {
|
|
1021
|
-
state.columnWidths.delete(columnId);
|
|
1022
|
-
} else {
|
|
1023
|
-
state.columnWidths.set(columnId, "max-content");
|
|
1024
|
-
}
|
|
1025
|
-
});
|
|
1026
|
-
}
|
|
1027
|
-
return jsxRuntime.jsx(ResizeHandleView, {
|
|
1028
|
-
enabled,
|
|
1029
|
-
onPointerDown: enabled ? onPointerDown : void 0,
|
|
1030
|
-
onPointerMove: enabled ? onPointerMove : void 0,
|
|
1031
|
-
onPointerUp: enabled ? onPointerUp : void 0,
|
|
1032
|
-
onDoubleClick: enabled ? onDoubleClick : void 0
|
|
1033
|
-
});
|
|
1034
|
-
}
|
|
1035
|
-
function ResizeHandleView(_a) {
|
|
1036
|
-
var _b = _a, {
|
|
1037
|
-
enabled
|
|
1038
|
-
} = _b, props = __objRest(_b, [
|
|
1039
|
-
"enabled"
|
|
1040
|
-
]);
|
|
1041
|
-
return jsxRuntime.jsx("div", __spreadValues({
|
|
1042
|
-
css: {
|
|
1043
|
-
alignSelf: "stretch",
|
|
1044
|
-
padding: "0 5px",
|
|
1045
|
-
cursor: enabled ? "col-resize" : "initial",
|
|
1046
|
-
display: "flex",
|
|
1047
|
-
alignItems: "center",
|
|
1048
|
-
"&:after": {
|
|
1049
|
-
content: '""',
|
|
1050
|
-
width: 1,
|
|
1051
|
-
height: "1.5em",
|
|
1052
|
-
background: "#c9cfda",
|
|
1053
|
-
transition: "transform 300ms"
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
}, props));
|
|
1057
|
-
}
|
|
1058
1184
|
const defaultWrapCell = (content) => {
|
|
1059
1185
|
if (typeof content === "string") {
|
|
1060
|
-
return jsxRuntime.jsx("span", {
|
|
1186
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
1061
1187
|
css: tableTheme.defaultClasses.text,
|
|
1062
1188
|
title: content,
|
|
1063
1189
|
children: content
|
|
@@ -1092,7 +1218,7 @@ const Cell = react.memo(function Cell2({
|
|
|
1092
1218
|
if (!column || !item)
|
|
1093
1219
|
return null;
|
|
1094
1220
|
const content = column.renderCell(column.value(item.value), item.value);
|
|
1095
|
-
return jsxRuntime.jsx("div", {
|
|
1221
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1096
1222
|
className: className2,
|
|
1097
1223
|
css: [tableTheme.defaultClasses.cell, columnStyleOverride],
|
|
1098
1224
|
children: wrapCell(content, column.value(item.value), item.value, rowIndex)
|
|
@@ -1141,21 +1267,21 @@ function ExpandControl({
|
|
|
1141
1267
|
}
|
|
1142
1268
|
}
|
|
1143
1269
|
if (isExpanded && hasDeferredChildren && !hasChildren) {
|
|
1144
|
-
return jsxRuntime.jsx(Spinner2, {
|
|
1270
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Spinner2, {
|
|
1145
1271
|
css: {
|
|
1146
1272
|
margin: "0 var(--spacing)"
|
|
1147
1273
|
}
|
|
1148
1274
|
});
|
|
1149
1275
|
}
|
|
1150
|
-
return jsxRuntime.jsx(IconButton2, {
|
|
1276
|
+
return /* @__PURE__ */ jsxRuntime.jsx(IconButton2, {
|
|
1151
1277
|
onClick: toggle2,
|
|
1152
|
-
children: jsxRuntime.jsx("span", {
|
|
1278
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
1153
1279
|
css: {
|
|
1154
1280
|
display: "inline-flex",
|
|
1155
1281
|
transition: "all 300ms",
|
|
1156
1282
|
transform: isExpanded ? "rotate3d(0, 0, 1, 90deg)" : "rotate3d(0, 0, 1, 0deg)"
|
|
1157
1283
|
},
|
|
1158
|
-
children: jsxRuntime.jsx(ChevronRight2, {})
|
|
1284
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRight2, {})
|
|
1159
1285
|
})
|
|
1160
1286
|
});
|
|
1161
1287
|
}
|
|
@@ -1215,7 +1341,7 @@ function SelectComponent({
|
|
|
1215
1341
|
state.lastSelectedId = itemId;
|
|
1216
1342
|
});
|
|
1217
1343
|
}
|
|
1218
|
-
return jsxRuntime.jsx(Checkbox2, {
|
|
1344
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Checkbox2, {
|
|
1219
1345
|
css: {
|
|
1220
1346
|
justifySelf: "start",
|
|
1221
1347
|
color: "#c9cfda"
|
|
@@ -1273,110 +1399,36 @@ const Row = react.memo(function Row2({
|
|
|
1273
1399
|
var _a, _b;
|
|
1274
1400
|
return (_b = (_a = table.getState().props).debugRender) == null ? void 0 : _b.call(_a, "render row", itemId);
|
|
1275
1401
|
});
|
|
1276
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1277
|
-
children: [jsxRuntime.jsx("div", {
|
|
1402
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1403
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1278
1404
|
className: className2,
|
|
1279
1405
|
css: [tableTheme.defaultClasses.cellFill],
|
|
1280
1406
|
ref: divRef
|
|
1281
|
-
}), jsxRuntime.jsxs("div", {
|
|
1407
|
+
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
1282
1408
|
className: className2,
|
|
1283
1409
|
css: [tableTheme.defaultClasses.cell, tableTheme.defaultClasses.firstCell],
|
|
1284
|
-
children: [jsxRuntime.jsx("div", {
|
|
1410
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1285
1411
|
css: {
|
|
1286
1412
|
width: indent * 20
|
|
1287
1413
|
}
|
|
1288
|
-
}), enableSelection && jsxRuntime.jsx(SelectComponent, {
|
|
1414
|
+
}), enableSelection && /* @__PURE__ */ jsxRuntime.jsx(SelectComponent, {
|
|
1289
1415
|
itemId
|
|
1290
|
-
}), (hasChildren || hasDeferredChildren) && jsxRuntime.jsx(ExpandControl, {
|
|
1416
|
+
}), (hasChildren || hasDeferredChildren) && /* @__PURE__ */ jsxRuntime.jsx(ExpandControl, {
|
|
1291
1417
|
itemId,
|
|
1292
1418
|
hasDeferredChildren
|
|
1293
1419
|
}), rowAction]
|
|
1294
|
-
}), columnIds.map((columnId) => jsxRuntime.jsx(ColumnContext.Provider, {
|
|
1420
|
+
}), columnIds.map((columnId) => /* @__PURE__ */ jsxRuntime.jsx(ColumnContext.Provider, {
|
|
1295
1421
|
value: columnId,
|
|
1296
|
-
children: jsxRuntime.jsx(Cell, {
|
|
1422
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Cell, {
|
|
1297
1423
|
itemId,
|
|
1298
1424
|
rowIndex
|
|
1299
1425
|
})
|
|
1300
|
-
}, columnId)), jsxRuntime.jsx("div", {
|
|
1426
|
+
}, columnId)), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1301
1427
|
className: className2,
|
|
1302
1428
|
css: [tableTheme.defaultClasses.cellFill]
|
|
1303
1429
|
})]
|
|
1304
1430
|
});
|
|
1305
1431
|
});
|
|
1306
|
-
function SortComponent({
|
|
1307
|
-
children
|
|
1308
|
-
}) {
|
|
1309
|
-
const table = useTableContext();
|
|
1310
|
-
const columnId = useColumnContext();
|
|
1311
|
-
const Badge2 = useTheme((t) => t.components.Badge);
|
|
1312
|
-
const ArrowUpward2 = useTheme((t) => t.icons.ArrowUpward);
|
|
1313
|
-
const {
|
|
1314
|
-
direction,
|
|
1315
|
-
index
|
|
1316
|
-
} = table.useState((state) => {
|
|
1317
|
-
var _a, _b;
|
|
1318
|
-
const index2 = (_a = state.sort.findIndex((s) => s.columnId === columnId)) != null ? _a : -1;
|
|
1319
|
-
return {
|
|
1320
|
-
direction: (_b = state.sort[index2]) == null ? void 0 : _b.direction,
|
|
1321
|
-
index: index2 >= 0 && state.sort.length > 1 ? index2 + 1 : void 0
|
|
1322
|
-
};
|
|
1323
|
-
});
|
|
1324
|
-
function toggle2(e, off) {
|
|
1325
|
-
const {
|
|
1326
|
-
props: {
|
|
1327
|
-
sort: controlledSort,
|
|
1328
|
-
onSortChange
|
|
1329
|
-
}
|
|
1330
|
-
} = table.getState();
|
|
1331
|
-
const newDirection = direction === "asc" ? "desc" : "asc";
|
|
1332
|
-
const newSort = e.getModifierState("Control") || off ? table.getState().sort.filter((s) => s.columnId !== columnId) : [];
|
|
1333
|
-
if (!off) {
|
|
1334
|
-
newSort.push({
|
|
1335
|
-
columnId,
|
|
1336
|
-
direction: newDirection
|
|
1337
|
-
});
|
|
1338
|
-
}
|
|
1339
|
-
onSortChange == null ? void 0 : onSortChange(newSort);
|
|
1340
|
-
if (!controlledSort) {
|
|
1341
|
-
table.update((state) => {
|
|
1342
|
-
state.sort = newSort;
|
|
1343
|
-
});
|
|
1344
|
-
}
|
|
1345
|
-
e.preventDefault();
|
|
1346
|
-
return false;
|
|
1347
|
-
}
|
|
1348
|
-
return jsxRuntime.jsxs("div", {
|
|
1349
|
-
css: {
|
|
1350
|
-
userSelect: "none",
|
|
1351
|
-
display: "grid",
|
|
1352
|
-
gridTemplateColumns: "minmax(0, 1fr) max-content",
|
|
1353
|
-
alignItems: "center",
|
|
1354
|
-
cursor: "pointer",
|
|
1355
|
-
"& > div": {
|
|
1356
|
-
overflow: "hidden",
|
|
1357
|
-
textOverflow: "ellipsis"
|
|
1358
|
-
}
|
|
1359
|
-
},
|
|
1360
|
-
onClick: (e) => toggle2(e),
|
|
1361
|
-
onContextMenu: (e) => toggle2(e, true),
|
|
1362
|
-
children: [jsxRuntime.jsx("div", {
|
|
1363
|
-
children
|
|
1364
|
-
}), jsxRuntime.jsx(Badge2, {
|
|
1365
|
-
badgeContent: index,
|
|
1366
|
-
children: jsxRuntime.jsx("span", {
|
|
1367
|
-
css: [{
|
|
1368
|
-
transition: "all 300ms",
|
|
1369
|
-
fontSize: "0.8em"
|
|
1370
|
-
}, !direction && {
|
|
1371
|
-
opacity: 0
|
|
1372
|
-
}, direction === "desc" && {
|
|
1373
|
-
transform: "rotate3d(0, 0, 1, 180deg)"
|
|
1374
|
-
}],
|
|
1375
|
-
children: jsxRuntime.jsx(ArrowUpward2, {})
|
|
1376
|
-
})
|
|
1377
|
-
})]
|
|
1378
|
-
});
|
|
1379
|
-
}
|
|
1380
1432
|
function throttle(fn, ms) {
|
|
1381
1433
|
let last = 0;
|
|
1382
1434
|
let lastArgs;
|
|
@@ -1429,9 +1481,11 @@ const relativeOffset = (x, y) => {
|
|
|
1429
1481
|
function Virtualized(_c) {
|
|
1430
1482
|
var _d = _c, {
|
|
1431
1483
|
header,
|
|
1484
|
+
footer,
|
|
1432
1485
|
children
|
|
1433
1486
|
} = _d, props = __objRest(_d, [
|
|
1434
1487
|
"header",
|
|
1488
|
+
"footer",
|
|
1435
1489
|
"children"
|
|
1436
1490
|
]);
|
|
1437
1491
|
var _a, _b;
|
|
@@ -1513,19 +1567,19 @@ function Virtualized(_c) {
|
|
|
1513
1567
|
var _a2, _b2;
|
|
1514
1568
|
return (_b2 = (_a2 = table.getState().props).debugRender) == null ? void 0 : _b2.call(_a2, `Virtualalized render ${from} to ${to}`);
|
|
1515
1569
|
});
|
|
1516
|
-
return jsxRuntime.jsxs("div", __spreadProps(__spreadValues({}, props), {
|
|
1517
|
-
children: [header, virtual && jsxRuntime.jsx("div", {
|
|
1570
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", __spreadProps(__spreadValues({}, props), {
|
|
1571
|
+
children: [header, virtual && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1518
1572
|
style: {
|
|
1519
1573
|
gridColumn: "1 / -1",
|
|
1520
1574
|
height: before
|
|
1521
1575
|
},
|
|
1522
1576
|
ref: probeRef
|
|
1523
|
-
}), children(itemIds, from), virtual && jsxRuntime.jsx("div", {
|
|
1577
|
+
}), children(itemIds, from), virtual && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1524
1578
|
style: {
|
|
1525
1579
|
gridColumn: "1 / -1",
|
|
1526
1580
|
height: after
|
|
1527
1581
|
}
|
|
1528
|
-
})]
|
|
1582
|
+
}), footer]
|
|
1529
1583
|
}));
|
|
1530
1584
|
}
|
|
1531
1585
|
const TableContext = react.createContext(null);
|
|
@@ -1548,10 +1602,10 @@ function Table(props) {
|
|
|
1548
1602
|
var _a, _b;
|
|
1549
1603
|
return (_b = (_a = table.getState().props).debugRender) == null ? void 0 : _b.call(_a, "render table");
|
|
1550
1604
|
});
|
|
1551
|
-
return jsxRuntime.jsx(TableContext.Provider, {
|
|
1605
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TableContext.Provider, {
|
|
1552
1606
|
value: table,
|
|
1553
|
-
children: jsxRuntime.jsx(TableMemoContextProvider, {
|
|
1554
|
-
children: jsxRuntime.jsx(TableLoadingState, {})
|
|
1607
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(TableMemoContextProvider, {
|
|
1608
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(TableLoadingState, {})
|
|
1555
1609
|
})
|
|
1556
1610
|
});
|
|
1557
1611
|
}
|
|
@@ -1563,10 +1617,10 @@ function TableLoadingState() {
|
|
|
1563
1617
|
const handle = setTimeout(() => setShowLoading(true), 500);
|
|
1564
1618
|
return () => clearTimeout(handle);
|
|
1565
1619
|
});
|
|
1566
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1567
|
-
children: [!isHydrated && showLoading && jsxRuntime.jsx("div", {
|
|
1620
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1621
|
+
children: [!isHydrated && showLoading && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1568
1622
|
children: loadingText
|
|
1569
|
-
}), jsxRuntime.jsx(TableInner, {
|
|
1623
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(TableInner, {
|
|
1570
1624
|
hidden: !isHydrated
|
|
1571
1625
|
})]
|
|
1572
1626
|
});
|
|
@@ -1579,17 +1633,15 @@ const TableInner = react.memo(function TableInner2({
|
|
|
1579
1633
|
const activeColumns = table.useState((state) => state.activeColumns.map((column) => ({
|
|
1580
1634
|
id: column.id,
|
|
1581
1635
|
width: column.width,
|
|
1582
|
-
classes: column.classes
|
|
1583
|
-
header: column.header
|
|
1636
|
+
classes: column.classes
|
|
1584
1637
|
})));
|
|
1585
1638
|
const columnWidths = table.useState("columnWidths", {
|
|
1586
1639
|
throttle: 16
|
|
1587
1640
|
});
|
|
1588
|
-
const
|
|
1589
|
-
|
|
1590
|
-
});
|
|
1591
|
-
const classes = table.useState("props.classes");
|
|
1641
|
+
const hasFooter = table.useState((state) => state.activeColumns.some((column) => column.footer));
|
|
1642
|
+
const classes = useTheme((theme) => theme.classes);
|
|
1592
1643
|
const stickyHeader = table.useState("props.stickyHeader");
|
|
1644
|
+
const stickyFooter = table.useState("props.stickyFooter");
|
|
1593
1645
|
const enableSelection = table.useState("props.enableSelection");
|
|
1594
1646
|
const enableColumnSelection = table.useState("props.enableColumnSelection");
|
|
1595
1647
|
const enableExport = table.useState((state) => !!state.props.enableExport.copy || !!state.props.enableExport.download);
|
|
@@ -1598,7 +1650,7 @@ const TableInner = react.memo(function TableInner2({
|
|
|
1598
1650
|
var _a, _b;
|
|
1599
1651
|
return (_b = (_a = table.getState().props).debugRender) == null ? void 0 : _b.call(_a, "render table inner");
|
|
1600
1652
|
});
|
|
1601
|
-
return jsxRuntime.jsx(Virtualized, {
|
|
1653
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Virtualized, {
|
|
1602
1654
|
className: classes == null ? void 0 : classes.table,
|
|
1603
1655
|
css: [cssVariables, tableTheme.defaultClasses.table, {
|
|
1604
1656
|
gridTemplateColumns: [
|
|
@@ -1613,38 +1665,40 @@ const TableInner = react.memo(function TableInner2({
|
|
|
1613
1665
|
}, hidden && {
|
|
1614
1666
|
visibility: "hidden"
|
|
1615
1667
|
}],
|
|
1616
|
-
header: jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1617
|
-
children: [jsxRuntime.jsx("div", {
|
|
1668
|
+
header: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1669
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1618
1670
|
className: classes == null ? void 0 : classes.headerCell,
|
|
1619
1671
|
css: [tableTheme.defaultClasses.headerFill, stickyHeader && tableTheme.defaultClasses.sticky, stickyHeader instanceof Object && stickyHeader]
|
|
1620
|
-
}), jsxRuntime.jsxs("div", {
|
|
1672
|
+
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
1621
1673
|
className: classes == null ? void 0 : classes.headerCell,
|
|
1622
1674
|
css: [tableTheme.defaultClasses.headerCell, stickyHeader && tableTheme.defaultClasses.sticky, stickyHeader instanceof Object && stickyHeader],
|
|
1623
|
-
children: [enableSelection && jsxRuntime.jsx(SelectComponent, {}), enableColumnSelection && jsxRuntime.jsx(ColumnSelection, {}), enableExport && jsxRuntime.jsx(Export$1, {}), jsxRuntime.jsx(ResizeHandleView, {})]
|
|
1624
|
-
}), jsxRuntime.jsx(ColumnHeaderContext.Provider, {
|
|
1625
|
-
children: activeColumns.map((column) => {
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
className: cx(classes == null ? void 0 : classes.headerCell, (_a = column.classes) == null ? void 0 : _a.headerCell),
|
|
1631
|
-
css: [tableTheme.defaultClasses.headerCell, columnStyleOverride.get(column.id), stickyHeader && tableTheme.defaultClasses.sticky, stickyHeader instanceof Object && stickyHeader],
|
|
1632
|
-
children: [jsxRuntime.jsx(SortComponent, {
|
|
1633
|
-
children: column.header
|
|
1634
|
-
}), jsxRuntime.jsx("div", {
|
|
1635
|
-
css: {
|
|
1636
|
-
flex: 1
|
|
1637
|
-
}
|
|
1638
|
-
}), jsxRuntime.jsx(FilterControl, {}), jsxRuntime.jsx(ResizeHandle, {})]
|
|
1639
|
-
}, column.id)
|
|
1640
|
-
}, column.id);
|
|
1641
|
-
})
|
|
1642
|
-
}), jsxRuntime.jsx("div", {
|
|
1675
|
+
children: [enableSelection && /* @__PURE__ */ jsxRuntime.jsx(SelectComponent, {}), enableColumnSelection && /* @__PURE__ */ jsxRuntime.jsx(ColumnSelection, {}), enableExport && /* @__PURE__ */ jsxRuntime.jsx(Export$1, {}), /* @__PURE__ */ jsxRuntime.jsx(ResizeHandleView, {})]
|
|
1676
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(ColumnHeaderContext.Provider, {
|
|
1677
|
+
children: activeColumns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(ColumnContext.Provider, {
|
|
1678
|
+
value: column.id,
|
|
1679
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ColumnHeader, {})
|
|
1680
|
+
}, column.id))
|
|
1681
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1643
1682
|
className: classes == null ? void 0 : classes.headerCell,
|
|
1644
1683
|
css: [tableTheme.defaultClasses.headerFill, stickyHeader && tableTheme.defaultClasses.sticky, stickyHeader instanceof Object && stickyHeader]
|
|
1645
1684
|
})]
|
|
1646
1685
|
}),
|
|
1647
|
-
|
|
1686
|
+
footer: hasFooter && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1687
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1688
|
+
className: classes == null ? void 0 : classes.footerCell,
|
|
1689
|
+
css: [tableTheme.defaultClasses.footerFill, stickyFooter && tableTheme.defaultClasses.stickyBottom, stickyFooter instanceof Object && stickyFooter]
|
|
1690
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1691
|
+
className: classes == null ? void 0 : classes.footerCell,
|
|
1692
|
+
css: [tableTheme.defaultClasses.footerFill, stickyFooter && tableTheme.defaultClasses.stickyBottom, stickyFooter instanceof Object && stickyFooter]
|
|
1693
|
+
}), activeColumns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(ColumnContext.Provider, {
|
|
1694
|
+
value: column.id,
|
|
1695
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ColumnFooter, {})
|
|
1696
|
+
}, column.id)), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1697
|
+
className: classes == null ? void 0 : classes.footerCell,
|
|
1698
|
+
css: [tableTheme.defaultClasses.footerFill, stickyFooter && tableTheme.defaultClasses.stickyBottom, stickyFooter instanceof Object && stickyFooter]
|
|
1699
|
+
})]
|
|
1700
|
+
}),
|
|
1701
|
+
children: (itemIds, startIndex) => itemIds.map((itemId, index) => /* @__PURE__ */ jsxRuntime.jsx(Row, {
|
|
1648
1702
|
itemId,
|
|
1649
1703
|
rowIndex: startIndex + index
|
|
1650
1704
|
}, itemId))
|
|
@@ -1657,7 +1711,7 @@ const defaultColors = {
|
|
|
1657
1711
|
function Spinner({
|
|
1658
1712
|
className: className2
|
|
1659
1713
|
}) {
|
|
1660
|
-
return jsxRuntime.jsxs("div", {
|
|
1714
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
1661
1715
|
className: className2,
|
|
1662
1716
|
css: react$2.css`
|
|
1663
1717
|
display: inline-block;
|
|
@@ -1695,7 +1749,7 @@ function Spinner({
|
|
|
1695
1749
|
}
|
|
1696
1750
|
}
|
|
1697
1751
|
`,
|
|
1698
|
-
children: [jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {}), jsxRuntime.jsx("div", {})]
|
|
1752
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {}), /* @__PURE__ */ jsxRuntime.jsx("div", {}), /* @__PURE__ */ jsxRuntime.jsx("div", {})]
|
|
1699
1753
|
});
|
|
1700
1754
|
}
|
|
1701
1755
|
const Badge = ({
|
|
@@ -1704,14 +1758,14 @@ const Badge = ({
|
|
|
1704
1758
|
}) => {
|
|
1705
1759
|
if (!open)
|
|
1706
1760
|
return null;
|
|
1707
|
-
return jsxRuntime.jsxs("span", {
|
|
1761
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", {
|
|
1708
1762
|
css: {
|
|
1709
1763
|
display: "inline-flex",
|
|
1710
1764
|
position: "relative",
|
|
1711
1765
|
flexShrink: 0,
|
|
1712
1766
|
verticalAlign: "middle"
|
|
1713
1767
|
},
|
|
1714
|
-
children: [children, jsxRuntime.jsx("span", {
|
|
1768
|
+
children: [children, /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
1715
1769
|
css: [{
|
|
1716
1770
|
top: 0,
|
|
1717
1771
|
right: 0,
|
|
@@ -1749,7 +1803,7 @@ const Button = (_e) => {
|
|
|
1749
1803
|
"children",
|
|
1750
1804
|
"variant"
|
|
1751
1805
|
]);
|
|
1752
|
-
return jsxRuntime.jsxs("button", __spreadProps(__spreadValues({
|
|
1806
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("button", __spreadProps(__spreadValues({
|
|
1753
1807
|
css: [{
|
|
1754
1808
|
padding: `var(--spacing) calc(var(--spacing) * 2)`,
|
|
1755
1809
|
display: "inline-flex",
|
|
@@ -1784,12 +1838,12 @@ const Button = (_e) => {
|
|
|
1784
1838
|
}
|
|
1785
1839
|
}]
|
|
1786
1840
|
}, props), {
|
|
1787
|
-
children: [startIcon && jsxRuntime.jsx("span", {
|
|
1841
|
+
children: [startIcon && /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
1788
1842
|
css: {
|
|
1789
1843
|
marginRight: `calc(var(--spacing) * 2)`
|
|
1790
1844
|
},
|
|
1791
1845
|
children: startIcon
|
|
1792
|
-
}), jsxRuntime.jsx("span", {
|
|
1846
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
1793
1847
|
children
|
|
1794
1848
|
})]
|
|
1795
1849
|
}));
|
|
@@ -1800,7 +1854,7 @@ const Checkbox = (_g) => {
|
|
|
1800
1854
|
} = _h, props = __objRest(_h, [
|
|
1801
1855
|
"className"
|
|
1802
1856
|
]);
|
|
1803
|
-
return jsxRuntime.jsxs("label", {
|
|
1857
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("label", {
|
|
1804
1858
|
css: [{
|
|
1805
1859
|
padding: "calc(var(--spacing) * 1.8)",
|
|
1806
1860
|
display: "flex",
|
|
@@ -1814,9 +1868,9 @@ const Checkbox = (_g) => {
|
|
|
1814
1868
|
color: "rgba(0, 0, 0, 0.26)"
|
|
1815
1869
|
}],
|
|
1816
1870
|
className: className2,
|
|
1817
|
-
children: [jsxRuntime.jsx("input", __spreadValues({
|
|
1871
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("input", __spreadValues({
|
|
1818
1872
|
type: "checkbox"
|
|
1819
|
-
}, props)), props.checked ? jsxRuntime.jsx("svg", {
|
|
1873
|
+
}, props)), props.checked ? /* @__PURE__ */ jsxRuntime.jsx("svg", {
|
|
1820
1874
|
css: {
|
|
1821
1875
|
fontSize: "1.25rem",
|
|
1822
1876
|
width: "1em",
|
|
@@ -1826,10 +1880,10 @@ const Checkbox = (_g) => {
|
|
|
1826
1880
|
focusable: "false",
|
|
1827
1881
|
viewBox: "0 0 24 24",
|
|
1828
1882
|
"aria-hidden": "true",
|
|
1829
|
-
children: jsxRuntime.jsx("path", {
|
|
1883
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
1830
1884
|
d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
|
1831
1885
|
})
|
|
1832
|
-
}) : jsxRuntime.jsx("svg", {
|
|
1886
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("svg", {
|
|
1833
1887
|
css: {
|
|
1834
1888
|
fontSize: "1.25rem",
|
|
1835
1889
|
width: "1em",
|
|
@@ -1839,14 +1893,14 @@ const Checkbox = (_g) => {
|
|
|
1839
1893
|
focusable: "false",
|
|
1840
1894
|
viewBox: "0 0 24 24",
|
|
1841
1895
|
"aria-hidden": "true",
|
|
1842
|
-
children: jsxRuntime.jsx("path", {
|
|
1896
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
1843
1897
|
d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
|
|
1844
1898
|
})
|
|
1845
1899
|
})]
|
|
1846
1900
|
});
|
|
1847
1901
|
};
|
|
1848
1902
|
const IconButton = (props) => {
|
|
1849
|
-
return jsxRuntime.jsx("button", __spreadValues({
|
|
1903
|
+
return /* @__PURE__ */ jsxRuntime.jsx("button", __spreadValues({
|
|
1850
1904
|
css: {
|
|
1851
1905
|
padding: "var(--spacing)",
|
|
1852
1906
|
borderRadius: "50%",
|
|
@@ -1879,12 +1933,12 @@ const TextField = (_i) => {
|
|
|
1879
1933
|
]);
|
|
1880
1934
|
var _a;
|
|
1881
1935
|
const [focus, setFocus] = react.useState(false);
|
|
1882
|
-
return jsxRuntime.jsx("div", {
|
|
1936
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
1883
1937
|
className: className2,
|
|
1884
1938
|
css: {
|
|
1885
1939
|
display: "flex"
|
|
1886
1940
|
},
|
|
1887
|
-
children: jsxRuntime.jsxs("span", {
|
|
1941
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("span", {
|
|
1888
1942
|
css: [{
|
|
1889
1943
|
flex: 1,
|
|
1890
1944
|
display: "flex",
|
|
@@ -1895,7 +1949,7 @@ const TextField = (_i) => {
|
|
|
1895
1949
|
border: "2px solid var(--primaryMain)",
|
|
1896
1950
|
margin: -1
|
|
1897
1951
|
}],
|
|
1898
|
-
children: [jsxRuntime.jsx("input", __spreadProps(__spreadValues({
|
|
1952
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("input", __spreadProps(__spreadValues({
|
|
1899
1953
|
ref: inputRef
|
|
1900
1954
|
}, props), {
|
|
1901
1955
|
value: (_a = props.value) != null ? _a : "",
|
|
@@ -1929,7 +1983,7 @@ const IconDefaultStyle = react$2.css({
|
|
|
1929
1983
|
color: "inherit"
|
|
1930
1984
|
});
|
|
1931
1985
|
function Icon(svg) {
|
|
1932
|
-
return (props) => jsxRuntime.jsx(react$2.ClassNames, {
|
|
1986
|
+
return (props) => /* @__PURE__ */ jsxRuntime.jsx(react$2.ClassNames, {
|
|
1933
1987
|
children: ({
|
|
1934
1988
|
css: css2
|
|
1935
1989
|
}) => react.cloneElement(svg, __spreadProps(__spreadValues({}, props), {
|
|
@@ -1937,120 +1991,120 @@ function Icon(svg) {
|
|
|
1937
1991
|
}))
|
|
1938
1992
|
});
|
|
1939
1993
|
}
|
|
1940
|
-
const Settings = Icon(jsxRuntime.jsxs("svg", {
|
|
1994
|
+
const Settings = Icon(/* @__PURE__ */ jsxRuntime.jsxs("svg", {
|
|
1941
1995
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1942
1996
|
height: "24px",
|
|
1943
1997
|
viewBox: "0 0 24 24",
|
|
1944
1998
|
width: "24px",
|
|
1945
1999
|
fill: "currentColor",
|
|
1946
|
-
children: [jsxRuntime.jsx("path", {
|
|
2000
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
1947
2001
|
d: "M0 0h24v24H0V0z",
|
|
1948
2002
|
fill: "none"
|
|
1949
|
-
}), jsxRuntime.jsx("path", {
|
|
2003
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
1950
2004
|
d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"
|
|
1951
2005
|
})]
|
|
1952
2006
|
}));
|
|
1953
|
-
const Export = Icon(jsxRuntime.jsxs("svg", {
|
|
2007
|
+
const Export = Icon(/* @__PURE__ */ jsxRuntime.jsxs("svg", {
|
|
1954
2008
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1955
2009
|
enableBackground: "new 0 0 24 24",
|
|
1956
2010
|
height: "24px",
|
|
1957
2011
|
viewBox: "0 0 24 24",
|
|
1958
2012
|
width: "24px",
|
|
1959
2013
|
fill: "currentColor",
|
|
1960
|
-
children: [jsxRuntime.jsx("g", {
|
|
1961
|
-
children: jsxRuntime.jsx("rect", {
|
|
2014
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("g", {
|
|
2015
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("rect", {
|
|
1962
2016
|
fill: "none",
|
|
1963
2017
|
height: "24",
|
|
1964
2018
|
width: "24"
|
|
1965
2019
|
})
|
|
1966
|
-
}), jsxRuntime.jsx("g", {
|
|
1967
|
-
children: jsxRuntime.jsx("path", {
|
|
2020
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("g", {
|
|
2021
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
1968
2022
|
d: "M18,15v3H6v-3H4v3c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2v-3H18z M17,11l-1.41-1.41L13,12.17V4h-2v8.17L8.41,9.59L7,11l5,5 L17,11z"
|
|
1969
2023
|
})
|
|
1970
2024
|
})]
|
|
1971
2025
|
}));
|
|
1972
|
-
const Clipboard = Icon(jsxRuntime.jsxs("svg", {
|
|
2026
|
+
const Clipboard = Icon(/* @__PURE__ */ jsxRuntime.jsxs("svg", {
|
|
1973
2027
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1974
2028
|
height: "24px",
|
|
1975
2029
|
viewBox: "0 0 24 24",
|
|
1976
2030
|
width: "24px",
|
|
1977
2031
|
fill: "currentColor",
|
|
1978
|
-
children: [jsxRuntime.jsx("path", {
|
|
2032
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
1979
2033
|
d: "M0 0h24v24H0V0z",
|
|
1980
2034
|
fill: "none"
|
|
1981
|
-
}), jsxRuntime.jsx("path", {
|
|
2035
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
1982
2036
|
d: "M19 2h-4.18C14.4.84 13.3 0 12 0S9.6.84 9.18 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"
|
|
1983
2037
|
})]
|
|
1984
2038
|
}));
|
|
1985
|
-
const ChevronRight = Icon(jsxRuntime.jsxs("svg", {
|
|
2039
|
+
const ChevronRight = Icon(/* @__PURE__ */ jsxRuntime.jsxs("svg", {
|
|
1986
2040
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1987
2041
|
height: "24px",
|
|
1988
2042
|
viewBox: "0 0 24 24",
|
|
1989
2043
|
width: "24px",
|
|
1990
2044
|
fill: "currentColor",
|
|
1991
|
-
children: [jsxRuntime.jsx("path", {
|
|
2045
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
1992
2046
|
d: "M0 0h24v24H0V0z",
|
|
1993
2047
|
fill: "none"
|
|
1994
|
-
}), jsxRuntime.jsx("path", {
|
|
2048
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
1995
2049
|
d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"
|
|
1996
2050
|
})]
|
|
1997
2051
|
}));
|
|
1998
|
-
const Search = Icon(jsxRuntime.jsxs("svg", {
|
|
2052
|
+
const Search = Icon(/* @__PURE__ */ jsxRuntime.jsxs("svg", {
|
|
1999
2053
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2000
2054
|
height: "24px",
|
|
2001
2055
|
viewBox: "0 0 24 24",
|
|
2002
2056
|
width: "24px",
|
|
2003
2057
|
fill: "currentColor",
|
|
2004
|
-
children: [jsxRuntime.jsx("path", {
|
|
2058
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
2005
2059
|
d: "M0 0h24v24H0V0z",
|
|
2006
2060
|
fill: "none"
|
|
2007
|
-
}), jsxRuntime.jsx("path", {
|
|
2061
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
2008
2062
|
d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
|
|
2009
2063
|
})]
|
|
2010
2064
|
}));
|
|
2011
|
-
const Clear = Icon(jsxRuntime.jsxs("svg", {
|
|
2065
|
+
const Clear = Icon(/* @__PURE__ */ jsxRuntime.jsxs("svg", {
|
|
2012
2066
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2013
2067
|
height: "24px",
|
|
2014
2068
|
viewBox: "0 0 24 24",
|
|
2015
2069
|
width: "24px",
|
|
2016
2070
|
fill: "currentColor",
|
|
2017
|
-
children: [jsxRuntime.jsx("path", {
|
|
2071
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
2018
2072
|
d: "M0 0h24v24H0V0z",
|
|
2019
2073
|
fill: "none"
|
|
2020
|
-
}), jsxRuntime.jsx("path", {
|
|
2074
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
2021
2075
|
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
2022
2076
|
})]
|
|
2023
2077
|
}));
|
|
2024
|
-
const ArrowDropDown = Icon(jsxRuntime.jsxs("svg", {
|
|
2078
|
+
const ArrowDropDown = Icon(/* @__PURE__ */ jsxRuntime.jsxs("svg", {
|
|
2025
2079
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2026
2080
|
height: "24px",
|
|
2027
2081
|
viewBox: "0 0 24 24",
|
|
2028
2082
|
width: "24px",
|
|
2029
2083
|
fill: "currentColor",
|
|
2030
|
-
children: [jsxRuntime.jsx("path", {
|
|
2084
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
2031
2085
|
d: "M0 0h24v24H0V0z",
|
|
2032
2086
|
fill: "none"
|
|
2033
|
-
}), jsxRuntime.jsx("path", {
|
|
2087
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
2034
2088
|
d: "M7 10l5 5 5-5H7z"
|
|
2035
2089
|
})]
|
|
2036
2090
|
}));
|
|
2037
|
-
const FilterList = Icon(jsxRuntime.jsx("svg", {
|
|
2091
|
+
const FilterList = Icon(/* @__PURE__ */ jsxRuntime.jsx("svg", {
|
|
2038
2092
|
viewBox: "0 0 24 24",
|
|
2039
|
-
children: jsxRuntime.jsx("path", {
|
|
2093
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
2040
2094
|
fill: "currentColor",
|
|
2041
2095
|
d: "M14,12V19.88C14.04,20.18 13.94,20.5 13.71,20.71C13.32,21.1 12.69,21.1 12.3,20.71L10.29,18.7C10.06,18.47 9.96,18.16 10,17.87V12H9.97L4.21,4.62C3.87,4.19 3.95,3.56 4.38,3.22C4.57,3.08 4.78,3 5,3V3H19V3C19.22,3 19.43,3.08 19.62,3.22C20.05,3.56 20.13,4.19 19.79,4.62L14.03,12H14Z"
|
|
2042
2096
|
})
|
|
2043
2097
|
}));
|
|
2044
|
-
const ArrowUpward = Icon(jsxRuntime.jsxs("svg", {
|
|
2098
|
+
const ArrowUpward = Icon(/* @__PURE__ */ jsxRuntime.jsxs("svg", {
|
|
2045
2099
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2046
2100
|
height: "24px",
|
|
2047
2101
|
viewBox: "0 0 24 24",
|
|
2048
2102
|
width: "24px",
|
|
2049
2103
|
fill: "currentColor",
|
|
2050
|
-
children: [jsxRuntime.jsx("path", {
|
|
2104
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
2051
2105
|
d: "M0 0h24v24H0V0z",
|
|
2052
2106
|
fill: "none"
|
|
2053
|
-
}), jsxRuntime.jsx("path", {
|
|
2107
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("path", {
|
|
2054
2108
|
d: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"
|
|
2055
2109
|
})]
|
|
2056
2110
|
}));
|
|
@@ -2133,7 +2187,7 @@ function AutoFocusTextField(props) {
|
|
|
2133
2187
|
ref.current.focus();
|
|
2134
2188
|
}
|
|
2135
2189
|
}, [visible]);
|
|
2136
|
-
return jsxRuntime.jsx(TextField2, __spreadProps(__spreadValues({}, props), {
|
|
2190
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TextField2, __spreadProps(__spreadValues({}, props), {
|
|
2137
2191
|
inputRef: ref
|
|
2138
2192
|
}));
|
|
2139
2193
|
}
|
|
@@ -2191,7 +2245,7 @@ function DateInput({
|
|
|
2191
2245
|
}), [locale]);
|
|
2192
2246
|
const parts = format.formatToParts(value != null ? value : defaultDate);
|
|
2193
2247
|
const isEmpty = !value;
|
|
2194
|
-
return jsxRuntime.jsx("div", {
|
|
2248
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
2195
2249
|
css: {
|
|
2196
2250
|
display: "flex",
|
|
2197
2251
|
alignItems: "baseline"
|
|
@@ -2199,8 +2253,8 @@ function DateInput({
|
|
|
2199
2253
|
children: parts.map(({
|
|
2200
2254
|
type,
|
|
2201
2255
|
value: value2
|
|
2202
|
-
}, index) => jsxRuntime.jsx(react.Fragment, {
|
|
2203
|
-
children: isIncludedType(type) ? jsxRuntime.jsx("input", {
|
|
2256
|
+
}, index) => /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, {
|
|
2257
|
+
children: isIncludedType(type) ? /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
2204
2258
|
className,
|
|
2205
2259
|
css: {
|
|
2206
2260
|
width: `${length(type, value2)}ch`,
|
|
@@ -2227,7 +2281,7 @@ function DateInput({
|
|
|
2227
2281
|
},
|
|
2228
2282
|
onFocus: (e) => e.target.select(),
|
|
2229
2283
|
onBlur: commit
|
|
2230
|
-
}) : type === "literal" ? jsxRuntime.jsx("span", {
|
|
2284
|
+
}) : type === "literal" ? /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
2231
2285
|
children: value2
|
|
2232
2286
|
}) : null
|
|
2233
2287
|
}, index))
|
|
@@ -2365,8 +2419,8 @@ function DatePicker({
|
|
|
2365
2419
|
});
|
|
2366
2420
|
return (year) => format(new Date(year, 0, 1));
|
|
2367
2421
|
}, [locale]);
|
|
2368
|
-
return jsxRuntime.jsxs("div", {
|
|
2369
|
-
children: [jsxRuntime.jsxs("div", {
|
|
2422
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
2423
|
+
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
2370
2424
|
css: {
|
|
2371
2425
|
display: "grid",
|
|
2372
2426
|
gridAutoFlow: "column",
|
|
@@ -2374,12 +2428,12 @@ function DatePicker({
|
|
|
2374
2428
|
alignItems: "baseline",
|
|
2375
2429
|
gap: "var(--spacing)"
|
|
2376
2430
|
},
|
|
2377
|
-
children: [jsxRuntime.jsx(DateInput, {
|
|
2431
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(DateInput, {
|
|
2378
2432
|
value: min != null ? min : null,
|
|
2379
2433
|
onChange: (date) => set(date != null ? date : void 0, max, "min"),
|
|
2380
2434
|
locale
|
|
2381
|
-
}), rangeSelect && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2382
|
-
children: [" - ", jsxRuntime.jsx(DateInput, {
|
|
2435
|
+
}), rangeSelect && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2436
|
+
children: [" - ", /* @__PURE__ */ jsxRuntime.jsx(DateInput, {
|
|
2383
2437
|
value: max != null ? max : null,
|
|
2384
2438
|
onChange: (date) => set(min, date != null ? date : void 0, "max"),
|
|
2385
2439
|
locale
|
|
@@ -2389,11 +2443,11 @@ function DatePicker({
|
|
|
2389
2443
|
month,
|
|
2390
2444
|
year,
|
|
2391
2445
|
weeks
|
|
2392
|
-
}) => jsxRuntime.jsxs("div", {
|
|
2446
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
2393
2447
|
css: {
|
|
2394
2448
|
display: "grid"
|
|
2395
2449
|
},
|
|
2396
|
-
children: [jsxRuntime.jsxs("div", {
|
|
2450
|
+
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
2397
2451
|
css: {
|
|
2398
2452
|
margin: "calc(var(--spacing) * 4) 0",
|
|
2399
2453
|
display: "grid",
|
|
@@ -2401,32 +2455,32 @@ function DatePicker({
|
|
|
2401
2455
|
justifyContent: "space-between",
|
|
2402
2456
|
alignItems: "center"
|
|
2403
2457
|
},
|
|
2404
|
-
children: [jsxRuntime.jsx(IconButton2, __spreadProps(__spreadValues({}, getBackProps({
|
|
2458
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(IconButton2, __spreadProps(__spreadValues({}, getBackProps({
|
|
2405
2459
|
calendars
|
|
2406
2460
|
})), {
|
|
2407
|
-
children: jsxRuntime.jsx(ChevronRight2, {
|
|
2461
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRight2, {
|
|
2408
2462
|
css: {
|
|
2409
2463
|
transform: "rotate3d(0, 0, 1, 180deg)"
|
|
2410
2464
|
}
|
|
2411
2465
|
})
|
|
2412
|
-
})), jsxRuntime.jsxs("div", {
|
|
2466
|
+
})), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
2413
2467
|
css: {
|
|
2414
2468
|
display: "flex"
|
|
2415
2469
|
},
|
|
2416
2470
|
children: [formatMonth(month), " ", formatYear(year)]
|
|
2417
|
-
}), jsxRuntime.jsx(IconButton2, __spreadProps(__spreadValues({}, getForwardProps({
|
|
2471
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(IconButton2, __spreadProps(__spreadValues({}, getForwardProps({
|
|
2418
2472
|
calendars
|
|
2419
2473
|
})), {
|
|
2420
|
-
children: jsxRuntime.jsx(ChevronRight2, {})
|
|
2474
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRight2, {})
|
|
2421
2475
|
}))]
|
|
2422
|
-
}), jsxRuntime.jsxs("div", {
|
|
2476
|
+
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
2423
2477
|
css: {
|
|
2424
2478
|
justifySelf: "center",
|
|
2425
2479
|
display: "grid",
|
|
2426
2480
|
gridTemplateColumns: "repeat(7, max-content)",
|
|
2427
2481
|
fontWeight: "bold"
|
|
2428
2482
|
},
|
|
2429
|
-
children: [weekDays.map((_v, weekDay) => jsxRuntime.jsx("div", {
|
|
2483
|
+
children: [weekDays.map((_v, weekDay) => /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
2430
2484
|
css: {
|
|
2431
2485
|
justifySelf: "center",
|
|
2432
2486
|
marginBottom: "var(--spacing)"
|
|
@@ -2434,7 +2488,7 @@ function DatePicker({
|
|
|
2434
2488
|
children: formatWeekday(weekDay)
|
|
2435
2489
|
}, weekDay)), weeks.map((week, index) => week.map((dateObj, dayIndex) => {
|
|
2436
2490
|
if (!dateObj) {
|
|
2437
|
-
return jsxRuntime.jsx("div", {});
|
|
2491
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
2438
2492
|
}
|
|
2439
2493
|
const {
|
|
2440
2494
|
prevMonth,
|
|
@@ -2453,7 +2507,7 @@ function DatePicker({
|
|
|
2453
2507
|
min: hovered,
|
|
2454
2508
|
max: min
|
|
2455
2509
|
}));
|
|
2456
|
-
return jsxRuntime.jsx("button", __spreadProps(__spreadValues({
|
|
2510
|
+
return /* @__PURE__ */ jsxRuntime.jsx("button", __spreadProps(__spreadValues({
|
|
2457
2511
|
css: [{
|
|
2458
2512
|
padding: 10,
|
|
2459
2513
|
border: "1px solid transparent",
|
|
@@ -2489,28 +2543,28 @@ function DatePicker({
|
|
|
2489
2543
|
}), `${index}-${dayIndex}`);
|
|
2490
2544
|
}))]
|
|
2491
2545
|
})]
|
|
2492
|
-
}, `${month}${year}`)), jsxRuntime.jsxs("div", {
|
|
2546
|
+
}, `${month}${year}`)), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
2493
2547
|
css: {
|
|
2494
2548
|
marginTop: "var(--spacing)",
|
|
2495
2549
|
display: "grid",
|
|
2496
2550
|
gridAutoFlow: "column",
|
|
2497
2551
|
justifyContent: "center"
|
|
2498
2552
|
},
|
|
2499
|
-
children: [jsxRuntime.jsx(Button2, {
|
|
2553
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(Button2, {
|
|
2500
2554
|
variant: "text",
|
|
2501
2555
|
onClick: () => {
|
|
2502
2556
|
setDirty(void 0);
|
|
2503
2557
|
onChange(today());
|
|
2504
2558
|
},
|
|
2505
2559
|
children: textToday
|
|
2506
|
-
}), jsxRuntime.jsx(Button2, {
|
|
2560
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Button2, {
|
|
2507
2561
|
variant: "text",
|
|
2508
2562
|
onClick: () => {
|
|
2509
2563
|
setDirty(void 0);
|
|
2510
2564
|
onChange(thisWeek(firstDayOfWeek));
|
|
2511
2565
|
},
|
|
2512
2566
|
children: textThisWeek
|
|
2513
|
-
}), jsxRuntime.jsx(Button2, {
|
|
2567
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Button2, {
|
|
2514
2568
|
variant: "text",
|
|
2515
2569
|
onClick: () => {
|
|
2516
2570
|
setDirty(void 0);
|
|
@@ -2568,12 +2622,12 @@ function DateFilter(_k) {
|
|
|
2568
2622
|
return dateIntersect(filterValue, value2);
|
|
2569
2623
|
}
|
|
2570
2624
|
}));
|
|
2571
|
-
return jsxRuntime.jsx("div", {
|
|
2625
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
2572
2626
|
css: {
|
|
2573
2627
|
padding: "calc(var(--spacing) * 2)",
|
|
2574
2628
|
display: "grid"
|
|
2575
2629
|
},
|
|
2576
|
-
children: jsxRuntime.jsx(DatePicker, {
|
|
2630
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DatePicker, {
|
|
2577
2631
|
rangeSelect: !singleSelect,
|
|
2578
2632
|
value,
|
|
2579
2633
|
onChange,
|
|
@@ -2634,45 +2688,45 @@ function SelectFilter(_m) {
|
|
|
2634
2688
|
});
|
|
2635
2689
|
const [query, setQuery] = react.useState("");
|
|
2636
2690
|
const filtered = options.filter((option) => !query || stringValue(option).toLowerCase().includes(query.toLowerCase()));
|
|
2637
|
-
return jsxRuntime.jsxs("div", {
|
|
2691
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
2638
2692
|
css: {
|
|
2639
2693
|
padding: "calc(var(--spacing) * 2)",
|
|
2640
2694
|
display: "grid",
|
|
2641
2695
|
gap: "var(--spacing)"
|
|
2642
2696
|
},
|
|
2643
|
-
children: [jsxRuntime.jsx(AutoFocusTextField, {
|
|
2697
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(AutoFocusTextField, {
|
|
2644
2698
|
value: query,
|
|
2645
2699
|
onChange: (e) => setQuery(e.target.value),
|
|
2646
|
-
endIcon: jsxRuntime.jsx(IconButton2, {
|
|
2700
|
+
endIcon: /* @__PURE__ */ jsxRuntime.jsx(IconButton2, {
|
|
2647
2701
|
onClick: () => setQuery(""),
|
|
2648
|
-
children: !query ? jsxRuntime.jsx(Search2, {}) : jsxRuntime.jsx(Clear2, {})
|
|
2702
|
+
children: !query ? /* @__PURE__ */ jsxRuntime.jsx(Search2, {}) : /* @__PURE__ */ jsxRuntime.jsx(Clear2, {})
|
|
2649
2703
|
}),
|
|
2650
2704
|
css: {
|
|
2651
2705
|
marginBottom: "var(--spacing)"
|
|
2652
2706
|
}
|
|
2653
|
-
}), jsxRuntime.jsxs("div", {
|
|
2707
|
+
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
2654
2708
|
css: {
|
|
2655
2709
|
maxHeight: "20em",
|
|
2656
2710
|
overflowY: "auto"
|
|
2657
2711
|
},
|
|
2658
|
-
children: [jsxRuntime.jsx(FormControlLabel, {
|
|
2712
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(FormControlLabel, {
|
|
2659
2713
|
disabled: value.size === 0,
|
|
2660
|
-
control: jsxRuntime.jsx(Checkbox2, {
|
|
2714
|
+
control: /* @__PURE__ */ jsxRuntime.jsx(Checkbox2, {
|
|
2661
2715
|
disabled: value.size === 0,
|
|
2662
2716
|
checked: value.size > 0,
|
|
2663
2717
|
onChange: () => onChange(/* @__PURE__ */ new Set())
|
|
2664
2718
|
}),
|
|
2665
|
-
label: jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2719
|
+
label: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2666
2720
|
children: ["<", selected(value.size), ">"]
|
|
2667
2721
|
})
|
|
2668
|
-
}), filtered.map((option, index) => jsxRuntime.jsx(FormControlLabel, {
|
|
2669
|
-
control: jsxRuntime.jsx(Checkbox2, {
|
|
2722
|
+
}), filtered.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(FormControlLabel, {
|
|
2723
|
+
control: /* @__PURE__ */ jsxRuntime.jsx(Checkbox2, {
|
|
2670
2724
|
checked: value.has(option),
|
|
2671
2725
|
onChange: () => onChange(toggle(value, option, singleSelect))
|
|
2672
2726
|
}),
|
|
2673
2727
|
label: render(option)
|
|
2674
2728
|
}, index))]
|
|
2675
|
-
}), filtered.length === 0 && jsxRuntime.jsx("span", {
|
|
2729
|
+
}), filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
2676
2730
|
css: {
|
|
2677
2731
|
textAlign: "center"
|
|
2678
2732
|
},
|
|
@@ -2800,17 +2854,17 @@ function TextFilter(_o) {
|
|
|
2800
2854
|
return compare(value2, filterValue);
|
|
2801
2855
|
}
|
|
2802
2856
|
}));
|
|
2803
|
-
return jsxRuntime.jsx("div", {
|
|
2857
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
2804
2858
|
css: {
|
|
2805
2859
|
padding: `calc(var(--spacing) * 2)`,
|
|
2806
2860
|
display: "grid"
|
|
2807
2861
|
},
|
|
2808
|
-
children: jsxRuntime.jsx(AutoFocusTextField, {
|
|
2862
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(AutoFocusTextField, {
|
|
2809
2863
|
value,
|
|
2810
2864
|
onChange: (e) => onChange(e.target.value),
|
|
2811
|
-
endIcon: jsxRuntime.jsx(IconButton2, {
|
|
2865
|
+
endIcon: /* @__PURE__ */ jsxRuntime.jsx(IconButton2, {
|
|
2812
2866
|
onClick: () => onChange(""),
|
|
2813
|
-
children: !value ? jsxRuntime.jsx(Search2, {}) : jsxRuntime.jsx(Clear2, {})
|
|
2867
|
+
children: !value ? /* @__PURE__ */ jsxRuntime.jsx(Search2, {}) : /* @__PURE__ */ jsxRuntime.jsx(Clear2, {})
|
|
2814
2868
|
})
|
|
2815
2869
|
})
|
|
2816
2870
|
});
|