@natoora-libs/core 0.1.6 → 0.1.7
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/components/index.cjs +633 -226
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +90 -53
- package/dist/components/index.d.ts +90 -53
- package/dist/components/index.js +629 -205
- package/dist/components/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -11,11 +11,11 @@ var __export = (target, all) => {
|
|
|
11
11
|
for (var name in all)
|
|
12
12
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
13
|
};
|
|
14
|
-
var __copyProps = (to, from, except,
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
15
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
16
|
for (let key of __getOwnPropNames(from))
|
|
17
17
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
19
|
}
|
|
20
20
|
return to;
|
|
21
21
|
};
|
|
@@ -376,6 +376,7 @@ __export(components_exports, {
|
|
|
376
376
|
SectionName: () => SectionName_default,
|
|
377
377
|
SmartSelect: () => SmartSelect_default,
|
|
378
378
|
SmartTableHeader: () => SmartTableHeader_default,
|
|
379
|
+
SmartTableHeaderFilterMenu: () => SmartTableHeaderFilterMenu_default,
|
|
379
380
|
SquareButton: () => SquareButton_default,
|
|
380
381
|
SquareLabel: () => SquareLabel_default,
|
|
381
382
|
Switch: () => Switch_default,
|
|
@@ -4596,7 +4597,7 @@ var drawerAppList = [
|
|
|
4596
4597
|
featureNames: [featureName_default.CUSTOMERS],
|
|
4597
4598
|
pinned: "customers",
|
|
4598
4599
|
icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(icons_default.SvgIconAccount, {}),
|
|
4599
|
-
url: `/
|
|
4600
|
+
url: `/react/customers`,
|
|
4600
4601
|
children: [
|
|
4601
4602
|
{
|
|
4602
4603
|
name: "Sites",
|
|
@@ -6407,10 +6408,11 @@ var RenderContentList = ({
|
|
|
6407
6408
|
const sections = items.map((item) => ({
|
|
6408
6409
|
id: transformNameToID(item),
|
|
6409
6410
|
element: document.getElementById(transformNameToID(item))
|
|
6410
|
-
}));
|
|
6411
|
+
})).filter(({ element }) => element !== null);
|
|
6411
6412
|
if (observer.current) {
|
|
6412
6413
|
observer.current.disconnect();
|
|
6413
6414
|
}
|
|
6415
|
+
if (sections.length === 0) return;
|
|
6414
6416
|
observer.current = new IntersectionObserver(
|
|
6415
6417
|
(entries) => {
|
|
6416
6418
|
const visibleSection = entries.find((entry) => entry.isIntersecting);
|
|
@@ -6442,11 +6444,18 @@ var RenderContentList = ({
|
|
|
6442
6444
|
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
6443
6445
|
import_material47.ListItemButton,
|
|
6444
6446
|
{
|
|
6445
|
-
component: "a",
|
|
6446
|
-
href: `#${id}`,
|
|
6447
|
-
onClick: () => setActive(id),
|
|
6448
6447
|
selected: active === id,
|
|
6449
6448
|
classes: { root: classes.root, selected: classes.selected },
|
|
6449
|
+
onClick: () => {
|
|
6450
|
+
setActive(id);
|
|
6451
|
+
const element = document.getElementById(id);
|
|
6452
|
+
if (element) {
|
|
6453
|
+
element.scrollIntoView({
|
|
6454
|
+
behavior: "smooth",
|
|
6455
|
+
block: "start"
|
|
6456
|
+
});
|
|
6457
|
+
}
|
|
6458
|
+
},
|
|
6450
6459
|
children: [
|
|
6451
6460
|
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_material47.ListItemText, { primary: item }),
|
|
6452
6461
|
warningItems?.includes(item) && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_material47.Tooltip, { title: warningMessage, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_icons_material10.WarningAmber, { color: "warning" }) })
|
|
@@ -7350,14 +7359,226 @@ var LabelledSwitch = (0, import_mui50.withStyles)(LSwitch, (theme) => ({
|
|
|
7350
7359
|
}));
|
|
7351
7360
|
var Switch_default = (0, import_react31.memo)(LabelledSwitch);
|
|
7352
7361
|
|
|
7353
|
-
// src/components/
|
|
7354
|
-
var import_react32 = require("react");
|
|
7362
|
+
// src/components/SmartTableHeaderFilterMenu/SmartTableHeaderFilterMenu.tsx
|
|
7363
|
+
var import_react32 = __toESM(require("react"), 1);
|
|
7364
|
+
var import_icons_material14 = require("@mui/icons-material");
|
|
7365
|
+
var import_Check = __toESM(require("@mui/icons-material/Check"), 1);
|
|
7355
7366
|
var import_material58 = require("@mui/material");
|
|
7367
|
+
var import_classnames3 = __toESM(require("classnames"), 1);
|
|
7356
7368
|
var import_mui51 = require("tss-react/mui");
|
|
7357
7369
|
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
7358
|
-
var useStyles45 = (0, import_mui51.makeStyles)()(() => ({
|
|
7370
|
+
var useStyles45 = (0, import_mui51.makeStyles)()((theme) => ({
|
|
7371
|
+
filterMenu: {
|
|
7372
|
+
display: "flex",
|
|
7373
|
+
flexDirection: "column",
|
|
7374
|
+
gap: theme.spacing(0.5)
|
|
7375
|
+
},
|
|
7376
|
+
filter: {
|
|
7377
|
+
display: "flex",
|
|
7378
|
+
alignItems: "center",
|
|
7379
|
+
justifyContent: "space-between",
|
|
7380
|
+
padding: theme.spacing(0, 3)
|
|
7381
|
+
},
|
|
7382
|
+
applyFilterButtonsContainer: {
|
|
7383
|
+
display: "flex",
|
|
7384
|
+
padding: theme.spacing(0, 1)
|
|
7385
|
+
},
|
|
7386
|
+
saveAsDefaultButton: {
|
|
7387
|
+
color: theme.palette.primary.main
|
|
7388
|
+
}
|
|
7389
|
+
}));
|
|
7390
|
+
var resolveFilterOption = (filterOption) => {
|
|
7391
|
+
if (typeof filterOption === "object") {
|
|
7392
|
+
return filterOption?.label || filterOption?.name || "";
|
|
7393
|
+
}
|
|
7394
|
+
return filterOption;
|
|
7395
|
+
};
|
|
7396
|
+
var findFilterIndex = (filters, filterOption) => filters.findIndex((item) => {
|
|
7397
|
+
if (typeof item === "string" && typeof filterOption === "string") {
|
|
7398
|
+
return item === filterOption;
|
|
7399
|
+
}
|
|
7400
|
+
if (typeof item === "object" && typeof filterOption === "object") {
|
|
7401
|
+
return item.id === filterOption.id;
|
|
7402
|
+
}
|
|
7403
|
+
return false;
|
|
7404
|
+
});
|
|
7405
|
+
var SmartTableHeaderFilterMenu = ({
|
|
7406
|
+
headCell,
|
|
7407
|
+
numActiveFilters,
|
|
7408
|
+
headerFilters,
|
|
7409
|
+
shouldShowCheckOnFilter,
|
|
7410
|
+
onApplyFilters
|
|
7411
|
+
}) => {
|
|
7412
|
+
const { classes } = useStyles45();
|
|
7413
|
+
const [anchorEl, setAnchorEl] = (0, import_react32.useState)(null);
|
|
7414
|
+
const [selectedFilters, setSelectedFilters] = (0, import_react32.useState)(
|
|
7415
|
+
headerFilters[headCell.id] ?? []
|
|
7416
|
+
);
|
|
7417
|
+
const filterOptions = headCell.filterOptionsQuery?.data ?? [];
|
|
7418
|
+
const numFilterOptions = filterOptions.length ?? 0;
|
|
7419
|
+
const numCurrentSelectedFilters = selectedFilters.length;
|
|
7420
|
+
const handleFilterMenuOpen = (event) => {
|
|
7421
|
+
if (!numFilterOptions) {
|
|
7422
|
+
headCell.filterOptionsQuery?.refetch();
|
|
7423
|
+
}
|
|
7424
|
+
setAnchorEl(event.currentTarget);
|
|
7425
|
+
};
|
|
7426
|
+
const handleFilterMenuClose = () => {
|
|
7427
|
+
setSelectedFilters(headerFilters[headCell.id]);
|
|
7428
|
+
setAnchorEl(null);
|
|
7429
|
+
};
|
|
7430
|
+
const handleFilterOptionClick = (option) => {
|
|
7431
|
+
const selectedIndex = findFilterIndex(selectedFilters, option);
|
|
7432
|
+
let newSelected;
|
|
7433
|
+
if (selectedIndex === -1) {
|
|
7434
|
+
if (typeof option === "string") {
|
|
7435
|
+
newSelected = [...selectedFilters, option];
|
|
7436
|
+
} else {
|
|
7437
|
+
newSelected = [...selectedFilters, option];
|
|
7438
|
+
}
|
|
7439
|
+
} else {
|
|
7440
|
+
newSelected = selectedFilters.filter(
|
|
7441
|
+
(_, index) => index !== selectedIndex
|
|
7442
|
+
);
|
|
7443
|
+
}
|
|
7444
|
+
setSelectedFilters(newSelected);
|
|
7445
|
+
};
|
|
7446
|
+
const handleApplyFilters = (shouldSave) => {
|
|
7447
|
+
const updatedFilters = {
|
|
7448
|
+
...headerFilters,
|
|
7449
|
+
[headCell.id]: [...selectedFilters]
|
|
7450
|
+
};
|
|
7451
|
+
onApplyFilters?.(updatedFilters, shouldSave);
|
|
7452
|
+
setAnchorEl(null);
|
|
7453
|
+
};
|
|
7454
|
+
(0, import_react32.useEffect)(() => {
|
|
7455
|
+
setSelectedFilters(headerFilters[headCell.id] ?? []);
|
|
7456
|
+
}, [headerFilters, headCell.id]);
|
|
7457
|
+
const isOptionChecked = (0, import_react32.useMemo)(() => (resolvedOption) => !!selectedFilters?.some(
|
|
7458
|
+
(value) => resolveFilterOption(value) === resolvedOption
|
|
7459
|
+
), [selectedFilters]);
|
|
7460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
|
|
7461
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7462
|
+
import_material58.IconButton,
|
|
7463
|
+
{
|
|
7464
|
+
disableRipple: true,
|
|
7465
|
+
onClick: handleFilterMenuOpen,
|
|
7466
|
+
"data-testid": "filter-menu-button",
|
|
7467
|
+
style: { padding: 0 },
|
|
7468
|
+
className: (0, import_classnames3.default)("filter-menu-trigger", {
|
|
7469
|
+
"has-active-filters": !!numActiveFilters
|
|
7470
|
+
}),
|
|
7471
|
+
children: numActiveFilters ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7472
|
+
import_material58.Chip,
|
|
7473
|
+
{
|
|
7474
|
+
sx: { height: 24 },
|
|
7475
|
+
label: numActiveFilters,
|
|
7476
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_icons_material14.FilterList, { style: { fontSize: 18 }, color: "primary" })
|
|
7477
|
+
}
|
|
7478
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_icons_material14.FilterList, { style: { fontSize: 18 } })
|
|
7479
|
+
}
|
|
7480
|
+
),
|
|
7481
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7482
|
+
import_material58.Menu,
|
|
7483
|
+
{
|
|
7484
|
+
open: !!anchorEl,
|
|
7485
|
+
onClose: handleFilterMenuClose,
|
|
7486
|
+
anchorEl,
|
|
7487
|
+
"data-testid": "filter-menu",
|
|
7488
|
+
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
7489
|
+
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
7490
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_material58.Box, { className: classes.filterMenu, children: [
|
|
7491
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material58.Box, { px: 3, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7492
|
+
import_material58.FormControlLabel,
|
|
7493
|
+
{
|
|
7494
|
+
label: "Select All",
|
|
7495
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7496
|
+
import_material58.Checkbox,
|
|
7497
|
+
{
|
|
7498
|
+
disableRipple: true,
|
|
7499
|
+
checked: numCurrentSelectedFilters === numFilterOptions,
|
|
7500
|
+
indeterminate: numCurrentSelectedFilters > 0 && numCurrentSelectedFilters < numFilterOptions,
|
|
7501
|
+
onChange: ({ target: { checked } }) => {
|
|
7502
|
+
if (checked) {
|
|
7503
|
+
setSelectedFilters([...filterOptions]);
|
|
7504
|
+
} else {
|
|
7505
|
+
setSelectedFilters([]);
|
|
7506
|
+
}
|
|
7507
|
+
}
|
|
7508
|
+
}
|
|
7509
|
+
)
|
|
7510
|
+
}
|
|
7511
|
+
) }),
|
|
7512
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material58.Divider, {}),
|
|
7513
|
+
filterOptions.map(
|
|
7514
|
+
(option) => {
|
|
7515
|
+
const resolvedOption = resolveFilterOption(option);
|
|
7516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
7517
|
+
import_material58.Box,
|
|
7518
|
+
{
|
|
7519
|
+
className: classes.filter,
|
|
7520
|
+
children: [
|
|
7521
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7522
|
+
import_material58.FormControlLabel,
|
|
7523
|
+
{
|
|
7524
|
+
label: resolvedOption,
|
|
7525
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7526
|
+
import_material58.Checkbox,
|
|
7527
|
+
{
|
|
7528
|
+
disableRipple: true,
|
|
7529
|
+
onChange: () => handleFilterOptionClick(option),
|
|
7530
|
+
checked: isOptionChecked(resolvedOption)
|
|
7531
|
+
}
|
|
7532
|
+
)
|
|
7533
|
+
},
|
|
7534
|
+
resolvedOption
|
|
7535
|
+
),
|
|
7536
|
+
shouldShowCheckOnFilter?.(headCell.id, option) ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_Check.default, { fontSize: "small", color: "action" }) : null
|
|
7537
|
+
]
|
|
7538
|
+
},
|
|
7539
|
+
resolvedOption
|
|
7540
|
+
);
|
|
7541
|
+
}
|
|
7542
|
+
),
|
|
7543
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material58.Divider, {}),
|
|
7544
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_material58.Box, { className: classes.applyFilterButtonsContainer, children: [
|
|
7545
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7546
|
+
ExtendedButton_default,
|
|
7547
|
+
{
|
|
7548
|
+
copy: "Save as Default",
|
|
7549
|
+
buttonType: "button",
|
|
7550
|
+
variant: "text",
|
|
7551
|
+
tooltip: "Persists those filters for future visits",
|
|
7552
|
+
className: classes.saveAsDefaultButton,
|
|
7553
|
+
onClick: () => handleApplyFilters(true)
|
|
7554
|
+
}
|
|
7555
|
+
),
|
|
7556
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7557
|
+
ExtendedButton_default,
|
|
7558
|
+
{
|
|
7559
|
+
copy: "Apply",
|
|
7560
|
+
color: "primary",
|
|
7561
|
+
buttonType: "submit",
|
|
7562
|
+
onClick: () => handleApplyFilters(false)
|
|
7563
|
+
}
|
|
7564
|
+
)
|
|
7565
|
+
] })
|
|
7566
|
+
] })
|
|
7567
|
+
}
|
|
7568
|
+
)
|
|
7569
|
+
] });
|
|
7570
|
+
};
|
|
7571
|
+
var SmartTableHeaderFilterMenu_default = import_react32.default.memo(SmartTableHeaderFilterMenu);
|
|
7572
|
+
|
|
7573
|
+
// src/components/SmartTableHeader/SmartTableHeader.tsx
|
|
7574
|
+
var import_react33 = require("react");
|
|
7575
|
+
var import_material59 = require("@mui/material");
|
|
7576
|
+
var import_mui52 = require("tss-react/mui");
|
|
7577
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
7578
|
+
var useStyles46 = (0, import_mui52.makeStyles)()((theme) => ({
|
|
7359
7579
|
root: {
|
|
7360
7580
|
backgroundColor: colors.neutral100,
|
|
7581
|
+
height: theme.spacing(6),
|
|
7361
7582
|
"& .MuiTableSortLabel-root": {
|
|
7362
7583
|
fontWeight: 600,
|
|
7363
7584
|
fontSize: ".875rem"
|
|
@@ -7374,51 +7595,133 @@ var useStyles45 = (0, import_mui51.makeStyles)()(() => ({
|
|
|
7374
7595
|
top: 20,
|
|
7375
7596
|
width: 1
|
|
7376
7597
|
},
|
|
7377
|
-
|
|
7598
|
+
tableHeaderContent: {
|
|
7378
7599
|
borderBottom: "1px solid",
|
|
7379
7600
|
borderBottomColor: colors.neutral250,
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7601
|
+
whiteSpace: "nowrap",
|
|
7602
|
+
"& .filter-menu-trigger": {
|
|
7603
|
+
visibility: "hidden",
|
|
7604
|
+
opacity: 0,
|
|
7605
|
+
transition: "visibility 0.1s, opacity 0.1s ease-in"
|
|
7606
|
+
},
|
|
7607
|
+
"&:hover .filter-menu-trigger, & .filter-menu-trigger.has-active-filters": {
|
|
7608
|
+
visibility: "visible",
|
|
7609
|
+
opacity: 1
|
|
7610
|
+
},
|
|
7611
|
+
"&:hover .MuiTableSortLabel-root": {
|
|
7612
|
+
"& .MuiTableSortLabel-icon": {
|
|
7613
|
+
opacity: 1
|
|
7614
|
+
}
|
|
7615
|
+
}
|
|
7616
|
+
},
|
|
7617
|
+
filterMenu: {
|
|
7618
|
+
display: "flex",
|
|
7619
|
+
flexDirection: "column",
|
|
7620
|
+
gap: theme.spacing(0.5)
|
|
7621
|
+
},
|
|
7622
|
+
filterCheckboxDropdown: {
|
|
7623
|
+
display: "flex",
|
|
7624
|
+
flexDirection: "column",
|
|
7625
|
+
padding: theme.spacing(0, 3)
|
|
7626
|
+
},
|
|
7627
|
+
applyFilterButtonsContainer: {
|
|
7628
|
+
display: "flex",
|
|
7629
|
+
padding: theme.spacing(0, 1)
|
|
7383
7630
|
}
|
|
7384
7631
|
}));
|
|
7385
|
-
var SmartTableHeader = (
|
|
7386
|
-
|
|
7387
|
-
|
|
7632
|
+
var SmartTableHeader = ({
|
|
7633
|
+
order,
|
|
7634
|
+
orderBy,
|
|
7635
|
+
headCells,
|
|
7636
|
+
numSelected,
|
|
7637
|
+
numRows,
|
|
7638
|
+
enableCheckboxSelection = false,
|
|
7639
|
+
headerFilters,
|
|
7640
|
+
onRequestSort,
|
|
7641
|
+
onSelectAllClick,
|
|
7642
|
+
onApplyFilters,
|
|
7643
|
+
shouldShowCheckOnFilter
|
|
7644
|
+
}) => {
|
|
7645
|
+
const { classes } = useStyles46();
|
|
7388
7646
|
const createSortHandler = (property) => (event) => {
|
|
7389
|
-
onRequestSort
|
|
7647
|
+
onRequestSort(event, property);
|
|
7390
7648
|
};
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
{
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
}
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7649
|
+
const isSortActive = (headCellId) => orderBy === headCellId;
|
|
7650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material59.TableHead, { className: classes.root, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_material59.TableRow, { children: [
|
|
7651
|
+
enableCheckboxSelection ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material59.TableCell, { padding: "checkbox", children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
7652
|
+
import_material59.Checkbox,
|
|
7653
|
+
{
|
|
7654
|
+
color: "primary",
|
|
7655
|
+
indeterminate: numSelected > 0 && numSelected < numRows,
|
|
7656
|
+
checked: numRows > 0 && numSelected === numRows,
|
|
7657
|
+
onChange: onSelectAllClick
|
|
7658
|
+
}
|
|
7659
|
+
) }) : null,
|
|
7660
|
+
headCells.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
7661
|
+
import_material59.TableCell,
|
|
7662
|
+
{
|
|
7663
|
+
className: classes.tableHeaderContent,
|
|
7664
|
+
align: "left",
|
|
7665
|
+
sx: { width: headCell.width ?? "auto" },
|
|
7666
|
+
sortDirection: orderBy === headCell.id ? order : false,
|
|
7667
|
+
children: [
|
|
7668
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
7669
|
+
import_material59.TableSortLabel,
|
|
7670
|
+
{
|
|
7671
|
+
"data-testid": "table-sort-label",
|
|
7672
|
+
active: isSortActive(headCell.id),
|
|
7673
|
+
direction: orderBy === headCell.id ? order : "asc",
|
|
7674
|
+
onClick: createSortHandler(headCell.id),
|
|
7675
|
+
children: [
|
|
7676
|
+
headCell.renderHeader ?? headCell.label,
|
|
7677
|
+
orderBy === headCell.id ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: classes.visuallyHidden, children: order === "desc" ? "sorted descending" : "sorted ascending" }) : null
|
|
7678
|
+
]
|
|
7679
|
+
}
|
|
7680
|
+
),
|
|
7681
|
+
headCell.filterOptionsQuery ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
7682
|
+
SmartTableHeaderFilterMenu_default,
|
|
7683
|
+
{
|
|
7684
|
+
headCell,
|
|
7685
|
+
headerFilters,
|
|
7686
|
+
numActiveFilters: headerFilters[headCell.id]?.length ?? 0,
|
|
7687
|
+
onApplyFilters,
|
|
7688
|
+
shouldShowCheckOnFilter
|
|
7689
|
+
}
|
|
7690
|
+
) : null
|
|
7691
|
+
]
|
|
7692
|
+
},
|
|
7693
|
+
headCell.id
|
|
7694
|
+
))
|
|
7695
|
+
] }) });
|
|
7412
7696
|
};
|
|
7413
|
-
var SmartTableHeader_default = (0,
|
|
7697
|
+
var SmartTableHeader_default = (0, import_react33.memo)(SmartTableHeader);
|
|
7414
7698
|
|
|
7415
7699
|
// src/components/Table/Table.tsx
|
|
7416
|
-
var
|
|
7417
|
-
var
|
|
7700
|
+
var import_react34 = require("react");
|
|
7701
|
+
var import_material61 = require("@mui/material");
|
|
7418
7702
|
var import_debounce = __toESM(require_debounce(), 1);
|
|
7419
|
-
var
|
|
7703
|
+
var import_mui53 = require("tss-react/mui");
|
|
7420
7704
|
var import_uuid = require("uuid");
|
|
7421
7705
|
|
|
7706
|
+
// src/components/TableLoading/TableLoading.tsx
|
|
7707
|
+
var import_material60 = require("@mui/material");
|
|
7708
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
7709
|
+
var TableLoading = ({
|
|
7710
|
+
rowsPerPage,
|
|
7711
|
+
rowHeight
|
|
7712
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material60.Box, { children: Array.from({ length: rowsPerPage ?? 0 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
7713
|
+
import_material60.Skeleton,
|
|
7714
|
+
{
|
|
7715
|
+
animation: "pulse",
|
|
7716
|
+
"data-testid": "table-loading-skeleton",
|
|
7717
|
+
style: { margin: "8px", opacity: 0.4 },
|
|
7718
|
+
variant: "rectangular",
|
|
7719
|
+
height: rowHeight
|
|
7720
|
+
},
|
|
7721
|
+
index
|
|
7722
|
+
)) });
|
|
7723
|
+
var TableLoading_default = TableLoading;
|
|
7724
|
+
|
|
7422
7725
|
// src/components/Table/helpers.tsx
|
|
7423
7726
|
function stableSort(array, cmp) {
|
|
7424
7727
|
const stabilizedThis = array.map((el, index) => [el, index]);
|
|
@@ -7454,24 +7757,9 @@ function calculateRowsPerPage(rowHeight) {
|
|
|
7454
7757
|
return 1;
|
|
7455
7758
|
}
|
|
7456
7759
|
|
|
7457
|
-
// src/components/Table/TableLoading.tsx
|
|
7458
|
-
var import_material59 = require("@mui/material");
|
|
7459
|
-
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
7460
|
-
var TableLoading = ({ rowsPerPage = 0, rowHeight }) => /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material59.Box, { children: Array.from({ length: rowsPerPage }).map((x, i) => /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
7461
|
-
import_material59.Skeleton,
|
|
7462
|
-
{
|
|
7463
|
-
animation: "pulse",
|
|
7464
|
-
style: { margin: "8px", opacity: 0.4 },
|
|
7465
|
-
variant: "rectangular",
|
|
7466
|
-
height: rowHeight
|
|
7467
|
-
},
|
|
7468
|
-
i
|
|
7469
|
-
)) });
|
|
7470
|
-
var TableLoading_default = TableLoading;
|
|
7471
|
-
|
|
7472
7760
|
// src/components/Table/Table.tsx
|
|
7473
|
-
var
|
|
7474
|
-
var
|
|
7761
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
7762
|
+
var useStyles47 = (0, import_mui53.makeStyles)()(() => ({
|
|
7475
7763
|
root: {
|
|
7476
7764
|
height: "calc(100vh - 262px)",
|
|
7477
7765
|
overflow: "scroll"
|
|
@@ -7505,12 +7793,12 @@ var Table = ({
|
|
|
7505
7793
|
serverRendered,
|
|
7506
7794
|
updateSort
|
|
7507
7795
|
}) => {
|
|
7508
|
-
const [order, setOrder] = (0,
|
|
7509
|
-
const [orderBy, setOrderBy] = (0,
|
|
7796
|
+
const [order, setOrder] = (0, import_react34.useState)(appliedFilters?.sortDir || "desc");
|
|
7797
|
+
const [orderBy, setOrderBy] = (0, import_react34.useState)(
|
|
7510
7798
|
appliedFilters?.sortField || "delivery_date"
|
|
7511
7799
|
);
|
|
7512
|
-
const [rowsPerPage, setRowsPerPage] = (0,
|
|
7513
|
-
const { classes } =
|
|
7800
|
+
const [rowsPerPage, setRowsPerPage] = (0, import_react34.useState)(defaultRowsPerPage);
|
|
7801
|
+
const { classes } = useStyles47();
|
|
7514
7802
|
const rowHeight = 56;
|
|
7515
7803
|
const emptyRows = rowsPerPage - Math.min(rowsPerPage, data.length - page * rowsPerPage);
|
|
7516
7804
|
const handleRequestSort = (event, property) => {
|
|
@@ -7522,7 +7810,7 @@ var Table = ({
|
|
|
7522
7810
|
updateSort(property, orderDir);
|
|
7523
7811
|
}
|
|
7524
7812
|
};
|
|
7525
|
-
(0,
|
|
7813
|
+
(0, import_react34.useLayoutEffect)(() => {
|
|
7526
7814
|
if (!doNotCalculateRows) {
|
|
7527
7815
|
return;
|
|
7528
7816
|
}
|
|
@@ -7548,25 +7836,25 @@ var Table = ({
|
|
|
7548
7836
|
);
|
|
7549
7837
|
const rowsComponents = rows.map((row) => {
|
|
7550
7838
|
if (RenderItem) {
|
|
7551
|
-
return /* @__PURE__ */ (0,
|
|
7839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(RenderItem, { ...row }, row.id);
|
|
7552
7840
|
}
|
|
7553
|
-
return /* @__PURE__ */ (0,
|
|
7841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.TableRow, { hover: true, onClick: () => onRowClick?.(row), children: headCells?.map((column) => /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.TableCell, { children: row[column.id] }, column.id)) }, row.id);
|
|
7554
7842
|
});
|
|
7555
7843
|
if (emptyRows > 0 && rowsPerPage > emptyRows) {
|
|
7556
7844
|
rowsComponents.push(
|
|
7557
|
-
/* @__PURE__ */ (0,
|
|
7845
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.TableRow, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.TableCell, { colSpan: 8 }) }, (0, import_uuid.v4)())
|
|
7558
7846
|
);
|
|
7559
7847
|
}
|
|
7560
7848
|
return rowsComponents;
|
|
7561
7849
|
};
|
|
7562
|
-
return /* @__PURE__ */ (0,
|
|
7563
|
-
/* @__PURE__ */ (0,
|
|
7564
|
-
|
|
7850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.Paper, { className: classes.root, children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.Box, { className: classes.paper, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(TableLoading_default, { rowHeight, rowsPerPage }) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.TableContainer, { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(import_material61.Table, { size: "medium", stickyHeader: true, children: [
|
|
7851
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.TableHead, { className: classes.header, children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.TableRow, { children: headCells?.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
7852
|
+
import_material61.TableCell,
|
|
7565
7853
|
{
|
|
7566
7854
|
align: "left",
|
|
7567
7855
|
sortDirection: orderBy === headCell.id ? order : void 0,
|
|
7568
|
-
children: /* @__PURE__ */ (0,
|
|
7569
|
-
|
|
7856
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
7857
|
+
import_material61.TableSortLabel,
|
|
7570
7858
|
{
|
|
7571
7859
|
active: orderBy === headCell.id,
|
|
7572
7860
|
direction: orderBy === headCell.id ? order : "asc",
|
|
@@ -7577,52 +7865,61 @@ var Table = ({
|
|
|
7577
7865
|
},
|
|
7578
7866
|
headCell.id
|
|
7579
7867
|
)) }) }),
|
|
7580
|
-
/* @__PURE__ */ (0,
|
|
7868
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(import_material61.TableBody, { children: [
|
|
7581
7869
|
getTableRows(),
|
|
7582
|
-
rowsPerPage === emptyRows && /* @__PURE__ */ (0,
|
|
7870
|
+
rowsPerPage === emptyRows && /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.TableRow, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.TableCell, { colSpan: 8, align: "center", children: "Nothing to display" }) })
|
|
7583
7871
|
] })
|
|
7584
7872
|
] }) }) }) });
|
|
7585
7873
|
};
|
|
7586
7874
|
var Table_default = Table;
|
|
7587
7875
|
|
|
7588
|
-
// src/components/
|
|
7589
|
-
var
|
|
7590
|
-
var
|
|
7591
|
-
var
|
|
7876
|
+
// src/components/TableDesktop/TableDesktop.tsx
|
|
7877
|
+
var import_react35 = require("react");
|
|
7878
|
+
var import_material63 = require("@mui/material");
|
|
7879
|
+
var import_mui55 = require("tss-react/mui");
|
|
7592
7880
|
var import_uuid2 = require("uuid");
|
|
7593
7881
|
|
|
7594
|
-
// src/components/
|
|
7595
|
-
var
|
|
7596
|
-
var
|
|
7597
|
-
var
|
|
7598
|
-
var
|
|
7882
|
+
// src/components/TableEmptyResult/TableEmptyResult.tsx
|
|
7883
|
+
var import_material62 = require("@mui/material");
|
|
7884
|
+
var import_mui54 = require("tss-react/mui");
|
|
7885
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
7886
|
+
var useStyles48 = (0, import_mui54.makeStyles)()(() => ({
|
|
7599
7887
|
tableCellIcon: { padding: 24, height: "calc(100vh - 320px)" },
|
|
7600
7888
|
tableCellDefault: { padding: 24 }
|
|
7601
7889
|
}));
|
|
7602
7890
|
var TableEmptyResult = ({
|
|
7891
|
+
colSpan,
|
|
7603
7892
|
showClearFilterButton = false,
|
|
7604
7893
|
handleClickOnClearFiltersButton = () => {
|
|
7605
7894
|
}
|
|
7606
7895
|
}) => {
|
|
7607
|
-
const { classes } =
|
|
7608
|
-
return showClearFilterButton ? /* @__PURE__ */ (0,
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
variant: "
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7896
|
+
const { classes } = useStyles48();
|
|
7897
|
+
return showClearFilterButton ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material62.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
7898
|
+
import_material62.TableCell,
|
|
7899
|
+
{
|
|
7900
|
+
className: classes.tableCellIcon,
|
|
7901
|
+
colSpan,
|
|
7902
|
+
align: "center",
|
|
7903
|
+
children: [
|
|
7904
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(EmptyGlassIcon_default, {}),
|
|
7905
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material62.Typography, { variant: "h6", children: "No results found." }),
|
|
7906
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material62.Typography, { variant: "subtitle1", children: "Search without applied filters?" }),
|
|
7907
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
7908
|
+
FilledButton_default,
|
|
7909
|
+
{
|
|
7910
|
+
copy: "Search",
|
|
7911
|
+
variant: "contained",
|
|
7912
|
+
color: "primary",
|
|
7913
|
+
onClick: handleClickOnClearFiltersButton
|
|
7914
|
+
}
|
|
7915
|
+
)
|
|
7916
|
+
]
|
|
7917
|
+
}
|
|
7918
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material62.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
7919
|
+
import_material62.TableCell,
|
|
7623
7920
|
{
|
|
7624
7921
|
className: classes.tableCellDefault,
|
|
7625
|
-
colSpan
|
|
7922
|
+
colSpan,
|
|
7626
7923
|
align: "center",
|
|
7627
7924
|
children: "Nothing to display"
|
|
7628
7925
|
}
|
|
@@ -7630,9 +7927,9 @@ var TableEmptyResult = ({
|
|
|
7630
7927
|
};
|
|
7631
7928
|
var TableEmptyResult_default = TableEmptyResult;
|
|
7632
7929
|
|
|
7633
|
-
// src/components/
|
|
7634
|
-
var
|
|
7635
|
-
var
|
|
7930
|
+
// src/components/TableDesktop/TableDesktop.tsx
|
|
7931
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
7932
|
+
var useStyles49 = (0, import_mui55.makeStyles)()((theme) => ({
|
|
7636
7933
|
root: {
|
|
7637
7934
|
justifyContent: "space-between",
|
|
7638
7935
|
display: "flex",
|
|
@@ -7645,97 +7942,206 @@ var useStyles48 = (0, import_mui54.makeStyles)()(() => ({
|
|
|
7645
7942
|
justifyContent: "space-between"
|
|
7646
7943
|
},
|
|
7647
7944
|
container: {
|
|
7648
|
-
maxHeight: "100%"
|
|
7945
|
+
maxHeight: "100%",
|
|
7946
|
+
"&::-webkit-scrollbar": {
|
|
7947
|
+
width: "8px",
|
|
7948
|
+
height: "8px"
|
|
7949
|
+
},
|
|
7950
|
+
"&::-webkit-scrollbar-track": {
|
|
7951
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.grey[800] : theme.palette.grey[100]
|
|
7952
|
+
},
|
|
7953
|
+
"&::-webkit-scrollbar-thumb": {
|
|
7954
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.grey[900] : theme.palette.grey[400],
|
|
7955
|
+
borderRadius: "10px"
|
|
7956
|
+
},
|
|
7957
|
+
"&::-webkit-scrollbar-thumb:hover": {
|
|
7958
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.common.black : theme.palette.grey[500]
|
|
7959
|
+
}
|
|
7649
7960
|
}
|
|
7650
7961
|
}));
|
|
7651
|
-
var
|
|
7652
|
-
|
|
7962
|
+
var descendingComparator2 = (a, b, orderBy) => {
|
|
7963
|
+
const objA = a[orderBy];
|
|
7964
|
+
const objB = b[orderBy];
|
|
7965
|
+
const valA = typeof objA === "object" ? objA?.name : objA;
|
|
7966
|
+
const valB = typeof objB === "object" ? objB?.name : objB;
|
|
7967
|
+
if (!valA && !valB) {
|
|
7968
|
+
return 0;
|
|
7969
|
+
}
|
|
7970
|
+
if (valA && !valB) {
|
|
7653
7971
|
return -1;
|
|
7654
7972
|
}
|
|
7655
|
-
if (
|
|
7973
|
+
if (!valA && valB) {
|
|
7974
|
+
return 1;
|
|
7975
|
+
}
|
|
7976
|
+
if (valA > valB) {
|
|
7977
|
+
return -1;
|
|
7978
|
+
}
|
|
7979
|
+
if (valA < valB) {
|
|
7656
7980
|
return 1;
|
|
7657
7981
|
}
|
|
7658
7982
|
return 0;
|
|
7659
7983
|
};
|
|
7660
|
-
var stableSort2 = (array, cmp) => array.map((el, index) =>
|
|
7661
|
-
const order = cmp(a
|
|
7662
|
-
return order !== 0 ? order : a
|
|
7663
|
-
}).map((el) => el
|
|
7664
|
-
var
|
|
7984
|
+
var stableSort2 = (array, cmp) => array.map((el, index) => ({ el, index })).sort((a, b) => {
|
|
7985
|
+
const order = cmp(a.el, b.el);
|
|
7986
|
+
return order !== 0 ? order : a.index - b.index;
|
|
7987
|
+
}).map((el) => el.el);
|
|
7988
|
+
var getComparator = (order, orderBy) => order === "desc" ? (a, b) => descendingComparator2(a, b, orderBy) : (a, b) => -descendingComparator2(a, b, orderBy);
|
|
7665
7989
|
var TableDesktop = ({
|
|
7666
|
-
appliedFilters,
|
|
7667
|
-
children,
|
|
7668
7990
|
data,
|
|
7669
7991
|
headCells,
|
|
7992
|
+
RenderItem,
|
|
7993
|
+
appliedFilters,
|
|
7994
|
+
headerFilters,
|
|
7995
|
+
children,
|
|
7670
7996
|
height,
|
|
7671
7997
|
isLoading,
|
|
7672
|
-
|
|
7673
|
-
|
|
7998
|
+
rowsPerPage = 50,
|
|
7999
|
+
enableCheckboxSelection = false,
|
|
8000
|
+
disableInternalSort = false,
|
|
7674
8001
|
updateSort,
|
|
7675
8002
|
showClearFilterButton,
|
|
7676
8003
|
handleClickOnClearFiltersButton,
|
|
7677
8004
|
deleteItem,
|
|
7678
|
-
keyField
|
|
8005
|
+
keyField = "id",
|
|
8006
|
+
tableLayout = "auto",
|
|
8007
|
+
onApplyFilters,
|
|
8008
|
+
shouldShowCheckOnFilter
|
|
7679
8009
|
}) => {
|
|
7680
|
-
const [order, setOrder] = (0,
|
|
7681
|
-
|
|
7682
|
-
);
|
|
7683
|
-
const [orderBy, setOrderBy] = (0, import_react34.useState)(
|
|
8010
|
+
const [order, setOrder] = (0, import_react35.useState)(appliedFilters?.sortDir || "desc");
|
|
8011
|
+
const [orderBy, setOrderBy] = (0, import_react35.useState)(
|
|
7684
8012
|
appliedFilters?.sortField || "delivery_date"
|
|
7685
8013
|
);
|
|
7686
|
-
const [
|
|
7687
|
-
const
|
|
8014
|
+
const [selected, setSelected] = (0, import_react35.useState)([]);
|
|
8015
|
+
const [page] = (0, import_react35.useState)(0);
|
|
8016
|
+
const { classes } = useStyles49();
|
|
7688
8017
|
const rowHeight = 56;
|
|
8018
|
+
const emptyRows = (0, import_react35.useMemo)(
|
|
8019
|
+
() => rowsPerPage - data.length,
|
|
8020
|
+
[rowsPerPage, data]
|
|
8021
|
+
);
|
|
8022
|
+
const visibleHeadCells = (0, import_react35.useMemo)(
|
|
8023
|
+
() => headCells.filter((headCell) => headCell?.enabled ?? true),
|
|
8024
|
+
[headCells]
|
|
8025
|
+
);
|
|
8026
|
+
const handleSelectAllClick = (0, import_react35.useCallback)(
|
|
8027
|
+
(event) => {
|
|
8028
|
+
if (event.target.checked) {
|
|
8029
|
+
const newSelected = data.map((n) => n[keyField]);
|
|
8030
|
+
setSelected(newSelected);
|
|
8031
|
+
return;
|
|
8032
|
+
}
|
|
8033
|
+
setSelected([]);
|
|
8034
|
+
},
|
|
8035
|
+
[data, keyField]
|
|
8036
|
+
);
|
|
7689
8037
|
const handleRequestSort = (event, property) => {
|
|
7690
8038
|
const isAsc = orderBy === property && order === "asc";
|
|
7691
8039
|
const orderDir = isAsc ? "desc" : "asc";
|
|
7692
8040
|
setOrder(orderDir);
|
|
7693
8041
|
setOrderBy(property);
|
|
7694
|
-
updateSort
|
|
8042
|
+
if (updateSort) {
|
|
8043
|
+
updateSort(property, orderDir);
|
|
8044
|
+
}
|
|
7695
8045
|
};
|
|
7696
|
-
const
|
|
7697
|
-
|
|
7698
|
-
|
|
8046
|
+
const handleRowCheckboxClick = (0, import_react35.useCallback)(
|
|
8047
|
+
(event, keyFieldValue) => {
|
|
8048
|
+
const selectedIndex = selected.indexOf(keyFieldValue);
|
|
8049
|
+
let newSelected = [];
|
|
8050
|
+
if (selectedIndex === -1) {
|
|
8051
|
+
newSelected = newSelected.concat(selected, keyFieldValue);
|
|
8052
|
+
} else if (selectedIndex === 0) {
|
|
8053
|
+
newSelected = newSelected.concat(selected.slice(1));
|
|
8054
|
+
} else if (selectedIndex === selected.length - 1) {
|
|
8055
|
+
newSelected = newSelected.concat(selected.slice(0, -1));
|
|
8056
|
+
} else if (selectedIndex > 0) {
|
|
8057
|
+
newSelected = newSelected.concat(
|
|
8058
|
+
selected.slice(0, selectedIndex),
|
|
8059
|
+
selected.slice(selectedIndex + 1)
|
|
8060
|
+
);
|
|
8061
|
+
}
|
|
8062
|
+
setSelected(newSelected);
|
|
8063
|
+
},
|
|
8064
|
+
[selected]
|
|
8065
|
+
);
|
|
8066
|
+
const renderTableRows = (0, import_react35.useMemo)(() => {
|
|
8067
|
+
const sortedData = disableInternalSort ? data : stableSort2(data, getComparator(order, orderBy));
|
|
8068
|
+
return sortedData.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((row, index) => {
|
|
8069
|
+
const isItemSelected = selected.includes(row[keyField]);
|
|
8070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
8071
|
+
RenderItem,
|
|
8072
|
+
{
|
|
8073
|
+
...{
|
|
8074
|
+
...row,
|
|
8075
|
+
index,
|
|
8076
|
+
deleteItem,
|
|
8077
|
+
isItemSelected,
|
|
8078
|
+
enableCheckboxSelection,
|
|
8079
|
+
keyFieldValue: row[keyField],
|
|
8080
|
+
handleRowCheckboxClick,
|
|
8081
|
+
visibleHeadCells
|
|
8082
|
+
}
|
|
8083
|
+
},
|
|
8084
|
+
row[keyField] ?? index
|
|
8085
|
+
);
|
|
8086
|
+
});
|
|
8087
|
+
}, [
|
|
8088
|
+
data,
|
|
8089
|
+
order,
|
|
8090
|
+
orderBy,
|
|
8091
|
+
page,
|
|
8092
|
+
rowsPerPage,
|
|
8093
|
+
selected,
|
|
8094
|
+
enableCheckboxSelection,
|
|
8095
|
+
disableInternalSort,
|
|
8096
|
+
deleteItem,
|
|
8097
|
+
keyField,
|
|
8098
|
+
handleRowCheckboxClick,
|
|
8099
|
+
visibleHeadCells,
|
|
8100
|
+
RenderItem
|
|
8101
|
+
]);
|
|
8102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: classes.root, style: { height }, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material63.Paper, { className: classes.paper, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_jsx_runtime115.Fragment, { children: [...Array(Math.floor(rowsPerPage ?? 50))].map(() => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
8103
|
+
import_material63.Skeleton,
|
|
7699
8104
|
{
|
|
7700
8105
|
animation: "pulse",
|
|
7701
8106
|
style: { margin: "8px", opacity: 0.4 },
|
|
7702
8107
|
variant: "rectangular",
|
|
7703
|
-
height: rowHeight
|
|
8108
|
+
height: rowHeight,
|
|
8109
|
+
"data-testid": "loading-skeleton"
|
|
7704
8110
|
},
|
|
7705
|
-
|
|
7706
|
-
)) }) : /* @__PURE__ */ (0,
|
|
7707
|
-
/* @__PURE__ */ (0,
|
|
7708
|
-
|
|
8111
|
+
(0, import_uuid2.v4)()
|
|
8112
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(import_jsx_runtime115.Fragment, { children: [
|
|
8113
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material63.TableContainer, { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
8114
|
+
import_material63.Table,
|
|
7709
8115
|
{
|
|
7710
8116
|
"aria-labelledby": "tableTitle",
|
|
7711
8117
|
"aria-label": "sticky table",
|
|
7712
8118
|
stickyHeader: true,
|
|
8119
|
+
style: { tableLayout },
|
|
7713
8120
|
children: [
|
|
7714
|
-
/* @__PURE__ */ (0,
|
|
8121
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
7715
8122
|
SmartTableHeader_default,
|
|
7716
8123
|
{
|
|
7717
|
-
headCells,
|
|
8124
|
+
headCells: visibleHeadCells,
|
|
7718
8125
|
order,
|
|
7719
8126
|
orderBy,
|
|
7720
|
-
|
|
8127
|
+
numSelected: selected.length,
|
|
8128
|
+
numRows: data.length,
|
|
8129
|
+
enableCheckboxSelection,
|
|
8130
|
+
headerFilters: headerFilters ?? {},
|
|
8131
|
+
onRequestSort: handleRequestSort,
|
|
8132
|
+
onSelectAllClick: handleSelectAllClick,
|
|
8133
|
+
onApplyFilters,
|
|
8134
|
+
shouldShowCheckOnFilter
|
|
7721
8135
|
}
|
|
7722
8136
|
),
|
|
7723
|
-
/* @__PURE__ */ (0,
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
rowsPerPage === emptyRows && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
7732
|
-
TableEmptyResult_default,
|
|
7733
|
-
{
|
|
7734
|
-
showClearFilterButton,
|
|
7735
|
-
handleClickOnClearFiltersButton
|
|
7736
|
-
}
|
|
7737
|
-
)
|
|
7738
|
-
] })
|
|
8137
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material63.TableBody, { children: rowsPerPage !== emptyRows ? renderTableRows : /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
8138
|
+
TableEmptyResult_default,
|
|
8139
|
+
{
|
|
8140
|
+
colSpan: enableCheckboxSelection ? visibleHeadCells.length + 1 : visibleHeadCells.length,
|
|
8141
|
+
showClearFilterButton,
|
|
8142
|
+
handleClickOnClearFiltersButton
|
|
8143
|
+
}
|
|
8144
|
+
) })
|
|
7739
8145
|
]
|
|
7740
8146
|
}
|
|
7741
8147
|
) }),
|
|
@@ -7745,12 +8151,12 @@ var TableDesktop = ({
|
|
|
7745
8151
|
var TableDesktop_default = TableDesktop;
|
|
7746
8152
|
|
|
7747
8153
|
// src/components/TableHeader/TableHeader.tsx
|
|
7748
|
-
var
|
|
7749
|
-
var
|
|
7750
|
-
var
|
|
7751
|
-
var
|
|
7752
|
-
var
|
|
7753
|
-
var
|
|
8154
|
+
var import_react36 = require("react");
|
|
8155
|
+
var import_icons_material15 = require("@mui/icons-material");
|
|
8156
|
+
var import_material64 = require("@mui/material");
|
|
8157
|
+
var import_mui56 = require("tss-react/mui");
|
|
8158
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
8159
|
+
var useStyles50 = (0, import_mui56.makeStyles)()(() => ({
|
|
7754
8160
|
sortLabel: {
|
|
7755
8161
|
"& .MuiTableSortLabel-icon": {
|
|
7756
8162
|
opacity: 1
|
|
@@ -7758,9 +8164,9 @@ var useStyles49 = (0, import_mui55.makeStyles)()(() => ({
|
|
|
7758
8164
|
}
|
|
7759
8165
|
}));
|
|
7760
8166
|
var TableHeader = ({ cells, onSort = null }) => {
|
|
7761
|
-
const [sortableCells, setSortableCells] = (0,
|
|
7762
|
-
const { classes } =
|
|
7763
|
-
(0,
|
|
8167
|
+
const [sortableCells, setSortableCells] = (0, import_react36.useState)([]);
|
|
8168
|
+
const { classes } = useStyles50();
|
|
8169
|
+
(0, import_react36.useEffect)(() => {
|
|
7764
8170
|
setSortableCells(cells);
|
|
7765
8171
|
}, []);
|
|
7766
8172
|
const getNewSortDirection = (direction) => {
|
|
@@ -7794,24 +8200,24 @@ var TableHeader = ({ cells, onSort = null }) => {
|
|
|
7794
8200
|
});
|
|
7795
8201
|
setSortableCells(sortedCells);
|
|
7796
8202
|
};
|
|
7797
|
-
return /* @__PURE__ */ (0,
|
|
7798
|
-
|
|
8203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material64.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material64.TableRow, { children: sortableCells.map((cell, key) => /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material64.TableCell, { children: cell.isSortable ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
8204
|
+
import_material64.TableSortLabel,
|
|
7799
8205
|
{
|
|
7800
8206
|
className: classes.sortLabel,
|
|
7801
8207
|
direction: cell?.direction || "asc",
|
|
7802
|
-
IconComponent:
|
|
8208
|
+
IconComponent: import_icons_material15.ImportExport,
|
|
7803
8209
|
onClick: () => handleSortClick(cell),
|
|
7804
8210
|
children: cell.label
|
|
7805
8211
|
}
|
|
7806
8212
|
) : cell.label }, cell.label || key)) }) });
|
|
7807
8213
|
};
|
|
7808
|
-
var TableHeader_default = (0,
|
|
8214
|
+
var TableHeader_default = (0, import_react36.memo)(TableHeader);
|
|
7809
8215
|
|
|
7810
8216
|
// src/components/TextDivider/TextDivider.tsx
|
|
7811
|
-
var
|
|
7812
|
-
var
|
|
7813
|
-
var
|
|
7814
|
-
var
|
|
8217
|
+
var import_material65 = require("@mui/material");
|
|
8218
|
+
var import_mui57 = require("tss-react/mui");
|
|
8219
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
8220
|
+
var useStyles51 = (0, import_mui57.makeStyles)()(() => ({
|
|
7815
8221
|
icon: {
|
|
7816
8222
|
fontSize: 20
|
|
7817
8223
|
},
|
|
@@ -7845,21 +8251,21 @@ var TextDivider = ({
|
|
|
7845
8251
|
iconPosition = "left",
|
|
7846
8252
|
titleWeight = "400"
|
|
7847
8253
|
}) => {
|
|
7848
|
-
const { classes } =
|
|
8254
|
+
const { classes } = useStyles51();
|
|
7849
8255
|
const iconColor = color ?? colors.neutral900;
|
|
7850
|
-
return /* @__PURE__ */ (0,
|
|
7851
|
-
|
|
8256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
8257
|
+
import_material65.Box,
|
|
7852
8258
|
{
|
|
7853
8259
|
display: "flex",
|
|
7854
8260
|
alignItems: "center",
|
|
7855
8261
|
justifyContent: "space-between",
|
|
7856
8262
|
className: classes.container,
|
|
7857
8263
|
children: [
|
|
7858
|
-
/* @__PURE__ */ (0,
|
|
7859
|
-
/* @__PURE__ */ (0,
|
|
7860
|
-
Icon3 && iconPosition === "left" && /* @__PURE__ */ (0,
|
|
7861
|
-
/* @__PURE__ */ (0,
|
|
7862
|
-
|
|
8264
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_material65.Divider, { className: classes.leftDivider }),
|
|
8265
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_material65.Button, { onClick, disabled: !onClick, className: classes.button, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_material65.Box, { className: classes.center, children: [
|
|
8266
|
+
Icon3 && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Icon3, { className: classes.icon, style: { color: iconColor } }),
|
|
8267
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
8268
|
+
import_material65.Typography,
|
|
7863
8269
|
{
|
|
7864
8270
|
color: "textSecondary",
|
|
7865
8271
|
className: classes.title,
|
|
@@ -7867,9 +8273,9 @@ var TextDivider = ({
|
|
|
7867
8273
|
children: title
|
|
7868
8274
|
}
|
|
7869
8275
|
),
|
|
7870
|
-
Icon3 && iconPosition === "right" && /* @__PURE__ */ (0,
|
|
8276
|
+
Icon3 && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Icon3, { className: classes.icon, style: { color: iconColor } })
|
|
7871
8277
|
] }) }),
|
|
7872
|
-
/* @__PURE__ */ (0,
|
|
8278
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_material65.Divider, { className: classes.rightDivider })
|
|
7873
8279
|
]
|
|
7874
8280
|
}
|
|
7875
8281
|
);
|
|
@@ -7878,11 +8284,11 @@ var TextDivider_default = TextDivider;
|
|
|
7878
8284
|
|
|
7879
8285
|
// src/components/ThemedDateRangePicker/ThemedDateRangePicker.tsx
|
|
7880
8286
|
var import_react_dates = require("react-dates");
|
|
7881
|
-
var
|
|
8287
|
+
var import_mui58 = require("tss-react/mui");
|
|
7882
8288
|
var import_initialize = require("react-dates/initialize");
|
|
7883
8289
|
var import_datepicker = require("react-dates/lib/css/_datepicker.css");
|
|
7884
|
-
var
|
|
7885
|
-
var
|
|
8290
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
8291
|
+
var useStyles52 = (0, import_mui58.makeStyles)()((theme) => ({
|
|
7886
8292
|
wrapper: {
|
|
7887
8293
|
"& .DateRangePicker": {
|
|
7888
8294
|
backgroundColor: theme.palette.mode === "dark" ? theme.palette.grey[900] : colors.neutral100,
|
|
@@ -7976,17 +8382,17 @@ var ThemedDateRangePicker = ({
|
|
|
7976
8382
|
className,
|
|
7977
8383
|
...props
|
|
7978
8384
|
}) => {
|
|
7979
|
-
const { classes, cx } =
|
|
7980
|
-
return /* @__PURE__ */ (0,
|
|
8385
|
+
const { classes, cx } = useStyles52();
|
|
8386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: cx(classes.wrapper, className), children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_react_dates.DateRangePicker, { ...props }) });
|
|
7981
8387
|
};
|
|
7982
8388
|
var ThemedDateRangePicker_default = ThemedDateRangePicker;
|
|
7983
8389
|
|
|
7984
8390
|
// src/components/TheToolbar/TheToolbar.tsx
|
|
7985
|
-
var
|
|
7986
|
-
var
|
|
7987
|
-
var
|
|
7988
|
-
var
|
|
7989
|
-
var
|
|
8391
|
+
var import_react37 = require("react");
|
|
8392
|
+
var import_material66 = require("@mui/material");
|
|
8393
|
+
var import_mui59 = require("tss-react/mui");
|
|
8394
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
8395
|
+
var useStyles53 = (0, import_mui59.makeStyles)()((theme) => ({
|
|
7990
8396
|
menuButton: {
|
|
7991
8397
|
color: theme.palette.primary.contrastText
|
|
7992
8398
|
},
|
|
@@ -8023,10 +8429,10 @@ var TheToolbar = ({
|
|
|
8023
8429
|
handleOpen,
|
|
8024
8430
|
LeftDrawer: LeftDrawer2
|
|
8025
8431
|
}) => {
|
|
8026
|
-
const { classes } =
|
|
8027
|
-
return /* @__PURE__ */ (0,
|
|
8028
|
-
/* @__PURE__ */ (0,
|
|
8029
|
-
/* @__PURE__ */ (0,
|
|
8432
|
+
const { classes } = useStyles53();
|
|
8433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_material66.Box, { children: [
|
|
8434
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.AppBar, { children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_material66.Toolbar, { className: classes.topBar, children: [
|
|
8435
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
8030
8436
|
RoundButton_default,
|
|
8031
8437
|
{
|
|
8032
8438
|
className: classes.menuButton,
|
|
@@ -8035,7 +8441,7 @@ var TheToolbar = ({
|
|
|
8035
8441
|
onClick: handleOpen
|
|
8036
8442
|
}
|
|
8037
8443
|
),
|
|
8038
|
-
/* @__PURE__ */ (0,
|
|
8444
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
8039
8445
|
CompanyLogo_default,
|
|
8040
8446
|
{
|
|
8041
8447
|
size: "small",
|
|
@@ -8045,29 +8451,29 @@ var TheToolbar = ({
|
|
|
8045
8451
|
}
|
|
8046
8452
|
)
|
|
8047
8453
|
] }) }),
|
|
8048
|
-
/* @__PURE__ */ (0,
|
|
8454
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.Box, { className: classes.offset }),
|
|
8049
8455
|
LeftDrawer2
|
|
8050
8456
|
] });
|
|
8051
8457
|
};
|
|
8052
|
-
var TheToolbar_default = (0,
|
|
8458
|
+
var TheToolbar_default = (0, import_react37.memo)(TheToolbar);
|
|
8053
8459
|
|
|
8054
8460
|
// src/components/ToastMessage/ToastMessage.tsx
|
|
8055
|
-
var
|
|
8056
|
-
var
|
|
8461
|
+
var import_material67 = require("@mui/material");
|
|
8462
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
8057
8463
|
var ToastMessage = ({
|
|
8058
8464
|
toastType,
|
|
8059
8465
|
toastMessage,
|
|
8060
8466
|
open,
|
|
8061
8467
|
onClose
|
|
8062
|
-
}) => /* @__PURE__ */ (0,
|
|
8063
|
-
|
|
8468
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
8469
|
+
import_material67.Snackbar,
|
|
8064
8470
|
{
|
|
8065
8471
|
open,
|
|
8066
8472
|
autoHideDuration: 1500,
|
|
8067
8473
|
onClose,
|
|
8068
8474
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
8069
|
-
children: /* @__PURE__ */ (0,
|
|
8070
|
-
|
|
8475
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
8476
|
+
import_material67.Alert,
|
|
8071
8477
|
{
|
|
8072
8478
|
elevation: 6,
|
|
8073
8479
|
variant: "filled",
|
|
@@ -8093,10 +8499,10 @@ var ToastMessage = ({
|
|
|
8093
8499
|
var ToastMessage_default = ToastMessage;
|
|
8094
8500
|
|
|
8095
8501
|
// src/components/TwoButtonDialog/TwoButtonDialog.tsx
|
|
8096
|
-
var
|
|
8097
|
-
var
|
|
8098
|
-
var
|
|
8099
|
-
var
|
|
8502
|
+
var import_material68 = require("@mui/material");
|
|
8503
|
+
var import_mui60 = require("tss-react/mui");
|
|
8504
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
8505
|
+
var useStyles54 = (0, import_mui60.makeStyles)()((theme) => ({
|
|
8100
8506
|
paper: {
|
|
8101
8507
|
padding: theme.spacing(2)
|
|
8102
8508
|
},
|
|
@@ -8124,21 +8530,21 @@ var TwoButtonDialog = ({
|
|
|
8124
8530
|
cancelLabel = "CANCEL",
|
|
8125
8531
|
cancelButton
|
|
8126
8532
|
}) => {
|
|
8127
|
-
const { classes } =
|
|
8128
|
-
return /* @__PURE__ */ (0,
|
|
8129
|
-
|
|
8533
|
+
const { classes } = useStyles54();
|
|
8534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
8535
|
+
import_material68.Dialog,
|
|
8130
8536
|
{
|
|
8131
8537
|
open,
|
|
8132
8538
|
disableEnforceFocus: true,
|
|
8133
8539
|
maxWidth: "sm",
|
|
8134
8540
|
fullWidth: true,
|
|
8135
8541
|
closeAfterTransition: true,
|
|
8136
|
-
BackdropComponent:
|
|
8542
|
+
BackdropComponent: import_material68.Backdrop,
|
|
8137
8543
|
BackdropProps: { timeout: 500 },
|
|
8138
|
-
children: /* @__PURE__ */ (0,
|
|
8139
|
-
/* @__PURE__ */ (0,
|
|
8140
|
-
/* @__PURE__ */ (0,
|
|
8141
|
-
|
|
8544
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Fade, { in: open, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_material68.Paper, { className: classes.paper, children: [
|
|
8545
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_material68.Box, { className: classes.mb, children: [
|
|
8546
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Typography, { variant: "h5", component: "div", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
8547
|
+
import_material68.Box,
|
|
8142
8548
|
{
|
|
8143
8549
|
sx: {
|
|
8144
8550
|
fontWeight: 600
|
|
@@ -8146,23 +8552,23 @@ var TwoButtonDialog = ({
|
|
|
8146
8552
|
children: title
|
|
8147
8553
|
}
|
|
8148
8554
|
) }),
|
|
8149
|
-
/* @__PURE__ */ (0,
|
|
8150
|
-
|
|
8555
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
8556
|
+
import_material68.Box,
|
|
8151
8557
|
{
|
|
8152
8558
|
className: classes.mt,
|
|
8153
8559
|
sx: {
|
|
8154
8560
|
fontWeight: 600
|
|
8155
8561
|
},
|
|
8156
8562
|
children: [
|
|
8157
|
-
subtitle1 && /* @__PURE__ */ (0,
|
|
8158
|
-
subtitle2 && /* @__PURE__ */ (0,
|
|
8563
|
+
subtitle1 && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Typography, { variant: "subtitle1", children: subtitle1 }),
|
|
8564
|
+
subtitle2 && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Typography, { variant: "subtitle1", children: subtitle2 })
|
|
8159
8565
|
]
|
|
8160
8566
|
}
|
|
8161
8567
|
)
|
|
8162
8568
|
] }),
|
|
8163
|
-
/* @__PURE__ */ (0,
|
|
8164
|
-
/* @__PURE__ */ (0,
|
|
8165
|
-
/* @__PURE__ */ (0,
|
|
8569
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Divider, {}),
|
|
8570
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_material68.Box, { className: classes.buttonContainer, children: [
|
|
8571
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
8166
8572
|
FilledButton_default,
|
|
8167
8573
|
{
|
|
8168
8574
|
copy: cancelLabel,
|
|
@@ -8175,7 +8581,7 @@ var TwoButtonDialog = ({
|
|
|
8175
8581
|
}
|
|
8176
8582
|
}
|
|
8177
8583
|
),
|
|
8178
|
-
/* @__PURE__ */ (0,
|
|
8584
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
8179
8585
|
FilledButton_default,
|
|
8180
8586
|
{
|
|
8181
8587
|
color: "primary",
|
|
@@ -8184,7 +8590,7 @@ var TwoButtonDialog = ({
|
|
|
8184
8590
|
}
|
|
8185
8591
|
)
|
|
8186
8592
|
] }),
|
|
8187
|
-
/* @__PURE__ */ (0,
|
|
8593
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Loading_default, { isLoading: dialogLoading })
|
|
8188
8594
|
] }) })
|
|
8189
8595
|
}
|
|
8190
8596
|
);
|
|
@@ -8192,10 +8598,10 @@ var TwoButtonDialog = ({
|
|
|
8192
8598
|
var TwoButtonDialog_default = TwoButtonDialog;
|
|
8193
8599
|
|
|
8194
8600
|
// src/components/icons/IconChart.tsx
|
|
8195
|
-
var
|
|
8601
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
8196
8602
|
var SvgIconChart = (props) => {
|
|
8197
8603
|
const { fill } = props;
|
|
8198
|
-
return /* @__PURE__ */ (0,
|
|
8604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
8199
8605
|
"svg",
|
|
8200
8606
|
{
|
|
8201
8607
|
width: "20",
|
|
@@ -8204,7 +8610,7 @@ var SvgIconChart = (props) => {
|
|
|
8204
8610
|
fill: "none",
|
|
8205
8611
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8206
8612
|
...props,
|
|
8207
|
-
children: /* @__PURE__ */ (0,
|
|
8613
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
8208
8614
|
"path",
|
|
8209
8615
|
{
|
|
8210
8616
|
d: "M2.49967 11.6667L2.91634 11.725L6.72467 7.91667C6.57467 7.375 6.71634 6.75833 7.15801 6.325C7.80801 5.66667 8.85801 5.66667 9.50801 6.325C9.94967 6.75833 10.0913 7.375 9.94134 7.91667L12.083 10.0583L12.4997 10C12.6497 10 12.7913 10 12.9163 10.0583L15.8913 7.08333C15.833 6.95833 15.833 6.81667 15.833 6.66667C15.833 6.22464 16.0086 5.80072 16.3212 5.48816C16.6337 5.17559 17.0576 5 17.4997 5C17.9417 5 18.3656 5.17559 18.6782 5.48816C18.9907 5.80072 19.1663 6.22464 19.1663 6.66667C19.1663 7.10869 18.9907 7.53262 18.6782 7.84518C18.3656 8.15774 17.9417 8.33333 17.4997 8.33333C17.3497 8.33333 17.208 8.33333 17.083 8.275L14.108 11.25C14.1663 11.375 14.1663 11.5167 14.1663 11.6667C14.1663 12.1087 13.9907 12.5326 13.6782 12.8452C13.3656 13.1577 12.9417 13.3333 12.4997 13.3333C12.0576 13.3333 11.6337 13.1577 11.3212 12.8452C11.0086 12.5326 10.833 12.1087 10.833 11.6667L10.8913 11.25L8.74967 9.10833C8.48301 9.16667 8.18301 9.16667 7.91634 9.10833L4.10801 12.9167L4.16634 13.3333C4.16634 13.7754 3.99075 14.1993 3.67819 14.5118C3.36563 14.8244 2.9417 15 2.49967 15C2.05765 15 1.63372 14.8244 1.32116 14.5118C1.0086 14.1993 0.833008 13.7754 0.833008 13.3333C0.833008 12.8913 1.0086 12.4674 1.32116 12.1548C1.63372 11.8423 2.05765 11.6667 2.49967 11.6667Z",
|
|
@@ -8276,6 +8682,7 @@ var IconChart_default = SvgIconChart;
|
|
|
8276
8682
|
SectionName,
|
|
8277
8683
|
SmartSelect,
|
|
8278
8684
|
SmartTableHeader,
|
|
8685
|
+
SmartTableHeaderFilterMenu,
|
|
8279
8686
|
SquareButton,
|
|
8280
8687
|
SquareLabel,
|
|
8281
8688
|
Switch,
|