@natoora-libs/core 0.1.4 → 0.1.6

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.
@@ -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, desc) => {
14
+ var __copyProps = (to, from, except, desc2) => {
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: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
19
19
  }
20
20
  return to;
21
21
  };
@@ -376,7 +376,6 @@ __export(components_exports, {
376
376
  SectionName: () => SectionName_default,
377
377
  SmartSelect: () => SmartSelect_default,
378
378
  SmartTableHeader: () => SmartTableHeader_default,
379
- SmartTableHeaderFilterMenu: () => SmartTableHeaderFilterMenu_default,
380
379
  SquareButton: () => SquareButton_default,
381
380
  SquareLabel: () => SquareLabel_default,
382
381
  Switch: () => Switch_default,
@@ -4597,7 +4596,7 @@ var drawerAppList = [
4597
4596
  featureNames: [featureName_default.CUSTOMERS],
4598
4597
  pinned: "customers",
4599
4598
  icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(icons_default.SvgIconAccount, {}),
4600
- url: `/react/customers`,
4599
+ url: `/customer-list`,
4601
4600
  children: [
4602
4601
  {
4603
4602
  name: "Sites",
@@ -6408,11 +6407,10 @@ var RenderContentList = ({
6408
6407
  const sections = items.map((item) => ({
6409
6408
  id: transformNameToID(item),
6410
6409
  element: document.getElementById(transformNameToID(item))
6411
- })).filter(({ element }) => element !== null);
6410
+ }));
6412
6411
  if (observer.current) {
6413
6412
  observer.current.disconnect();
6414
6413
  }
6415
- if (sections.length === 0) return;
6416
6414
  observer.current = new IntersectionObserver(
6417
6415
  (entries) => {
6418
6416
  const visibleSection = entries.find((entry) => entry.isIntersecting);
@@ -6444,18 +6442,11 @@ var RenderContentList = ({
6444
6442
  return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
6445
6443
  import_material47.ListItemButton,
6446
6444
  {
6445
+ component: "a",
6446
+ href: `#${id}`,
6447
+ onClick: () => setActive(id),
6447
6448
  selected: active === id,
6448
6449
  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
- },
6459
6450
  children: [
6460
6451
  /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_material47.ListItemText, { primary: item }),
6461
6452
  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" }) })
@@ -6617,94 +6608,87 @@ var ScrollableDialog = ({
6617
6608
  const [bodyHeight, setBodyHeight] = (0, import_react26.useState)(0);
6618
6609
  const [hasScrollBar, setHasScrollBar] = (0, import_react26.useState)(false);
6619
6610
  const [maxDialogHeight, setMaxDialogHeight] = (0, import_react26.useState)(0);
6620
- const [screenHeight, setScreenHeight] = (0, import_react26.useState)(0);
6621
6611
  const { classes, cx } = useStyles37();
6622
- const setDialogBodyMaxHeight = () => {
6623
- const titleHeight = document.querySelector("#dialog-title")?.clientHeight || 0;
6624
- const headerHeight = document.querySelector("#dialog-header")?.clientHeight || 0;
6625
- const footerHeight2 = document.querySelector("#dialog-footer")?.clientHeight || 0;
6626
- const titleMargin = 48;
6627
- setBodyHeight(
6628
- maxDialogHeight - headerHeight - titleHeight - titleMargin - footerHeight2
6629
- );
6630
- };
6612
+ const headerRef = (0, import_react26.useRef)(null);
6613
+ const footerRef = (0, import_react26.useRef)(null);
6614
+ const titleRef = (0, import_react26.useRef)(null);
6615
+ const bodyRef = (0, import_react26.useRef)(null);
6616
+ const DIALOG_MARGIN = 65;
6617
+ const DEFAULT_MAX_HEIGHT = 728;
6618
+ const TITLE_MARGIN = 48;
6631
6619
  (0, import_react26.useEffect)(() => {
6632
- setScreenHeight(window.innerHeight);
6620
+ const handleResize = () => {
6621
+ const screenHeight = window.innerHeight;
6622
+ const newMaxHeight = screenHeight < DEFAULT_MAX_HEIGHT + DIALOG_MARGIN ? screenHeight - DIALOG_MARGIN : DEFAULT_MAX_HEIGHT;
6623
+ setMaxDialogHeight(newMaxHeight);
6624
+ };
6625
+ handleResize();
6626
+ window.addEventListener("resize", handleResize);
6627
+ return () => window.removeEventListener("resize", handleResize);
6633
6628
  }, []);
6629
+ const measureHeights = () => {
6630
+ const titleHeight = titleRef.current?.clientHeight || 0;
6631
+ const headerHeight = headerRef.current?.clientHeight || 0;
6632
+ const footerHeight2 = footerRef.current?.clientHeight || 0;
6633
+ const contentHeight = maxDialogHeight - titleHeight - headerHeight - footerHeight2 - TITLE_MARGIN;
6634
+ setBodyHeight(contentHeight);
6635
+ const scrollHeight = bodyRef.current?.scrollHeight || 0;
6636
+ setHasScrollBar(scrollHeight > contentHeight);
6637
+ };
6634
6638
  (0, import_react26.useEffect)(() => {
6635
- if (!header) {
6636
- return;
6637
- }
6638
- setDialogBodyMaxHeight();
6639
- }, [header]);
6640
- (0, import_react26.useEffect)(() => {
6641
- if (!body) {
6642
- return;
6643
- }
6644
- const bodyScrollBarHeight = document.querySelector("#dialog-body")?.scrollHeight || 0;
6645
- setHasScrollBar(bodyScrollBarHeight > bodyHeight);
6646
- }, [body]);
6647
- (0, import_react26.useEffect)(() => {
6648
- if (!isOpen) {
6649
- setBodyHeight(0);
6639
+ if (isOpen) {
6640
+ requestAnimationFrame(measureHeights);
6650
6641
  }
6651
- }, [isOpen]);
6652
- (0, import_react26.useEffect)(() => {
6653
- if (!screenHeight) {
6654
- return;
6642
+ }, [isOpen, header, footer, title, maxDialogHeight]);
6643
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_material49.Dialog, { className: classes.dialog, fullWidth: true, maxWidth: false, open: isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6644
+ import_material49.Fade,
6645
+ {
6646
+ in: isOpen,
6647
+ onEntered: () => {
6648
+ requestAnimationFrame(measureHeights);
6649
+ },
6650
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_material49.Paper, { className: classes.wrapper, children: [
6651
+ header ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: classes.header, id: "dialog-header", children: header }) : null,
6652
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: classes.body, children: [
6653
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6654
+ import_material49.Typography,
6655
+ {
6656
+ className: classes.title,
6657
+ id: "dialog-title",
6658
+ variant: "h6",
6659
+ children: title
6660
+ }
6661
+ ),
6662
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6663
+ "div",
6664
+ {
6665
+ className: cx(classes.scrollableContainer, {
6666
+ [classes.smallContainer]: !hasScrollBar
6667
+ }),
6668
+ id: "dialog-body",
6669
+ style: {
6670
+ maxHeight: bodyHeight
6671
+ },
6672
+ children: body
6673
+ }
6674
+ )
6675
+ ] }),
6676
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_material49.Divider, {}),
6677
+ footer ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6678
+ import_material49.Box,
6679
+ {
6680
+ className: classes.footer,
6681
+ id: "dialog-footer",
6682
+ sx: {
6683
+ display: "flex",
6684
+ justifyContent: "center"
6685
+ },
6686
+ children: footer
6687
+ }
6688
+ ) : null
6689
+ ] })
6655
6690
  }
6656
- const dialogMargin = 65;
6657
- const defaultDialogMaxHeight = 728;
6658
- const necessaryHeight = defaultDialogMaxHeight + dialogMargin;
6659
- setMaxDialogHeight(
6660
- screenHeight < necessaryHeight ? screenHeight - dialogMargin : defaultDialogMaxHeight
6661
- );
6662
- }, [screenHeight]);
6663
- (0, import_react26.useEffect)(() => {
6664
- if (isOpen && maxDialogHeight) {
6665
- setDialogBodyMaxHeight();
6666
- }
6667
- }, [isOpen, maxDialogHeight, header]);
6668
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_material49.Dialog, { className: classes.dialog, fullWidth: true, maxWidth: false, open: isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_material49.Fade, { in: isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_material49.Paper, { className: classes.wrapper, children: [
6669
- header ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: classes.header, id: "dialog-header", children: header }) : null,
6670
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: classes.body, children: [
6671
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6672
- import_material49.Typography,
6673
- {
6674
- className: classes.title,
6675
- id: "dialog-title",
6676
- variant: "h6",
6677
- children: title
6678
- }
6679
- ),
6680
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6681
- "div",
6682
- {
6683
- className: cx(classes.scrollableContainer, {
6684
- [classes.smallContainer]: !hasScrollBar
6685
- }),
6686
- id: "dialog-body",
6687
- style: {
6688
- maxHeight: bodyHeight
6689
- },
6690
- children: body
6691
- }
6692
- )
6693
- ] }),
6694
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_material49.Divider, {}),
6695
- footer ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6696
- import_material49.Box,
6697
- {
6698
- className: classes.footer,
6699
- id: "dialog-footer",
6700
- sx: {
6701
- display: "flex",
6702
- justifyContent: "center"
6703
- },
6704
- children: footer
6705
- }
6706
- ) : null
6707
- ] }) }) });
6691
+ ) });
6708
6692
  };
6709
6693
  var ScrollableDialog_default = ScrollableDialog;
6710
6694
 
@@ -6714,7 +6698,7 @@ var import_mui44 = require("tss-react/mui");
6714
6698
 
6715
6699
  // src/components/SearchWithFilters/SearchWithFilters.tsx
6716
6700
  var import_react27 = require("react");
6717
- var React2 = __toESM(require("react"), 1);
6701
+ var React3 = __toESM(require("react"), 1);
6718
6702
  var import_icons_material11 = require("@mui/icons-material");
6719
6703
  var import_material50 = require("@mui/material");
6720
6704
  var import_mui43 = require("tss-react/mui");
@@ -6807,7 +6791,7 @@ var SearchWithFilters = ({
6807
6791
  )
6808
6792
  ] });
6809
6793
  };
6810
- var SearchWithFilters_default = React2.memo(SearchWithFilters);
6794
+ var SearchWithFilters_default = React3.memo(SearchWithFilters);
6811
6795
 
6812
6796
  // src/components/SearchAndFilterHeader/SearchAndFilterHeader.tsx
6813
6797
  var import_jsx_runtime103 = require("react/jsx-runtime");
@@ -6870,7 +6854,7 @@ var SearchAndFilterHeader = ({
6870
6854
  var SearchAndFilterHeader_default = SearchAndFilterHeader;
6871
6855
 
6872
6856
  // src/components/SearchAndFilterHeader/SearchAndFilterHeaderForTable.tsx
6873
- var React3 = __toESM(require("react"), 1);
6857
+ var React4 = __toESM(require("react"), 1);
6874
6858
  var import_material53 = require("@mui/material");
6875
6859
  var import_mui46 = require("tss-react/mui");
6876
6860
 
@@ -7050,7 +7034,7 @@ var SearchAndFilterHeaderForTable = (props) => {
7050
7034
  /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_material53.Box, { children: button })
7051
7035
  ] });
7052
7036
  };
7053
- var SearchAndFilterHeaderForTable_default = React3.memo(SearchAndFilterHeaderForTable);
7037
+ var SearchAndFilterHeaderForTable_default = React4.memo(SearchAndFilterHeaderForTable);
7054
7038
 
7055
7039
  // src/components/SectionName/SectionName.tsx
7056
7040
  var import_icons_material13 = require("@mui/icons-material");
@@ -7366,205 +7350,14 @@ var LabelledSwitch = (0, import_mui50.withStyles)(LSwitch, (theme) => ({
7366
7350
  }));
7367
7351
  var Switch_default = (0, import_react31.memo)(LabelledSwitch);
7368
7352
 
7369
- // src/components/SmartTableHeaderFilterMenu/SmartTableHeaderFilterMenu.tsx
7370
- var import_react32 = __toESM(require("react"), 1);
7371
- var import_icons_material14 = require("@mui/icons-material");
7353
+ // src/components/Table/SmartTableHeader.tsx
7354
+ var import_react32 = require("react");
7372
7355
  var import_material58 = require("@mui/material");
7373
- var import_classnames3 = __toESM(require("classnames"), 1);
7374
7356
  var import_mui51 = require("tss-react/mui");
7375
7357
  var import_jsx_runtime110 = require("react/jsx-runtime");
7376
- var useStyles45 = (0, import_mui51.makeStyles)()((theme) => ({
7377
- filterMenu: {
7378
- display: "flex",
7379
- flexDirection: "column",
7380
- gap: theme.spacing(0.5)
7381
- },
7382
- filterCheckboxDropdown: {
7383
- display: "flex",
7384
- flexDirection: "column",
7385
- padding: theme.spacing(0, 3)
7386
- },
7387
- applyFilterButtonsContainer: {
7388
- display: "flex",
7389
- padding: theme.spacing(0, 1)
7390
- }
7391
- }));
7392
- var resolveFilterOption = (filterOption) => {
7393
- if (typeof filterOption === "object") {
7394
- return filterOption?.label || filterOption?.name || "";
7395
- }
7396
- return filterOption;
7397
- };
7398
- var findFilterIndex = (filters, filterOption) => filters.findIndex((item) => {
7399
- if (typeof item === "string" && typeof filterOption === "string") {
7400
- return item === filterOption;
7401
- }
7402
- if (typeof item === "object" && typeof filterOption === "object") {
7403
- return item.id === filterOption.id;
7404
- }
7405
- return false;
7406
- });
7407
- var SmartTableHeaderFilterMenu = ({
7408
- headCell,
7409
- hasActiveFilters,
7410
- headerFilters,
7411
- onApplyFilters
7412
- }) => {
7413
- const { classes } = useStyles45();
7414
- const [anchorEl, setAnchorEl] = (0, import_react32.useState)(null);
7415
- const [shouldSave, setShouldSave] = (0, import_react32.useState)(false);
7416
- const [selectedFilters, setSelectedFilters] = (0, import_react32.useState)(
7417
- headerFilters[headCell.id] ?? []
7418
- );
7419
- const handleFilterMenuOpen = (event) => {
7420
- if (!headCell.filterOptionsQuery?.data?.length) {
7421
- headCell.filterOptionsQuery?.refetch();
7422
- }
7423
- setAnchorEl(event.currentTarget);
7424
- };
7425
- const handleFilterMenuClose = () => {
7426
- setSelectedFilters(headerFilters[headCell.id]);
7427
- setAnchorEl(null);
7428
- setShouldSave(false);
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
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
7447
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7448
- import_material58.IconButton,
7449
- {
7450
- disableRipple: true,
7451
- onClick: handleFilterMenuOpen,
7452
- "data-testid": "filter-menu-button",
7453
- style: { padding: 0 },
7454
- className: (0, import_classnames3.default)("filter-menu-trigger", {
7455
- "has-active-filters": hasActiveFilters
7456
- }),
7457
- children: hasActiveFilters ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7458
- import_material58.Chip,
7459
- {
7460
- sx: { height: 24 },
7461
- label: headerFilters[headCell.id]?.length,
7462
- icon: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_icons_material14.FilterList, { style: { fontSize: 18 }, color: "primary" })
7463
- }
7464
- ) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_icons_material14.FilterList, { style: { fontSize: 18 } })
7465
- }
7466
- ),
7467
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7468
- import_material58.Menu,
7469
- {
7470
- open: !!anchorEl,
7471
- onClose: handleFilterMenuClose,
7472
- anchorEl,
7473
- "data-testid": "filter-menu",
7474
- anchorOrigin: { vertical: "bottom", horizontal: "right" },
7475
- transformOrigin: { vertical: "top", horizontal: "right" },
7476
- children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_material58.Box, { className: classes.filterMenu, children: [
7477
- headCell.filterOptionsQuery?.data?.map(
7478
- (option) => {
7479
- const resolvedOption = resolveFilterOption(option);
7480
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7481
- import_material58.FormControl,
7482
- {
7483
- className: classes.filterCheckboxDropdown,
7484
- children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7485
- import_material58.FormControlLabel,
7486
- {
7487
- label: resolvedOption,
7488
- control: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7489
- import_material58.Checkbox,
7490
- {
7491
- disableRipple: true,
7492
- onChange: () => handleFilterOptionClick(option),
7493
- checked: selectedFilters?.some(
7494
- (value) => resolveFilterOption(value) === resolvedOption
7495
- ) ?? false
7496
- }
7497
- )
7498
- }
7499
- )
7500
- },
7501
- resolvedOption
7502
- );
7503
- }
7504
- ),
7505
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material58.Divider, {}),
7506
- /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_material58.FormControl, { className: classes.filterCheckboxDropdown, children: [
7507
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7508
- import_material58.FormControlLabel,
7509
- {
7510
- label: "Save Filters",
7511
- control: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7512
- import_material58.Checkbox,
7513
- {
7514
- disableRipple: true,
7515
- checked: shouldSave,
7516
- onChange: (e) => setShouldSave(e.target.checked)
7517
- }
7518
- )
7519
- }
7520
- ),
7521
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material58.FormHelperText, { sx: { margin: 0 }, children: "Filters auto-apply on return." })
7522
- ] }),
7523
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material58.Divider, {}),
7524
- /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_material58.Box, { className: classes.applyFilterButtonsContainer, children: [
7525
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7526
- ExtendedButton_default,
7527
- {
7528
- buttonType: "button",
7529
- copy: "Deselect All",
7530
- variant: "text",
7531
- onClick: () => setSelectedFilters([])
7532
- }
7533
- ),
7534
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7535
- ExtendedButton_default,
7536
- {
7537
- copy: "Apply",
7538
- color: "primary",
7539
- buttonType: "submit",
7540
- onClick: () => {
7541
- const updatedFilters = {
7542
- ...headerFilters,
7543
- [headCell.id]: [...selectedFilters]
7544
- };
7545
- onApplyFilters?.(updatedFilters, shouldSave);
7546
- setAnchorEl(null);
7547
- setShouldSave(false);
7548
- }
7549
- }
7550
- )
7551
- ] })
7552
- ] })
7553
- }
7554
- )
7555
- ] });
7556
- };
7557
- var SmartTableHeaderFilterMenu_default = import_react32.default.memo(SmartTableHeaderFilterMenu);
7558
-
7559
- // src/components/SmartTableHeader/SmartTableHeader.tsx
7560
- var import_react33 = require("react");
7561
- var import_material59 = require("@mui/material");
7562
- var import_mui52 = require("tss-react/mui");
7563
- var import_jsx_runtime111 = require("react/jsx-runtime");
7564
- var useStyles46 = (0, import_mui52.makeStyles)()((theme) => ({
7358
+ var useStyles45 = (0, import_mui51.makeStyles)()(() => ({
7565
7359
  root: {
7566
7360
  backgroundColor: colors.neutral100,
7567
- height: theme.spacing(6),
7568
7361
  "& .MuiTableSortLabel-root": {
7569
7362
  fontWeight: 600,
7570
7363
  fontSize: ".875rem"
@@ -7581,130 +7374,51 @@ var useStyles46 = (0, import_mui52.makeStyles)()((theme) => ({
7581
7374
  top: 20,
7582
7375
  width: 1
7583
7376
  },
7584
- tableHeaderContent: {
7377
+ containerTh: {
7585
7378
  borderBottom: "1px solid",
7586
7379
  borderBottomColor: colors.neutral250,
7587
- whiteSpace: "nowrap",
7588
- "& .filter-menu-trigger": {
7589
- visibility: "hidden",
7590
- opacity: 0,
7591
- transition: "visibility 0.1s, opacity 0.1s ease-in"
7592
- },
7593
- "&:hover .filter-menu-trigger, & .filter-menu-trigger.has-active-filters": {
7594
- visibility: "visible",
7595
- opacity: 1
7596
- },
7597
- "&:hover .MuiTableSortLabel-root": {
7598
- "& .MuiTableSortLabel-icon": {
7599
- opacity: 1
7600
- }
7601
- }
7602
- },
7603
- filterMenu: {
7604
- display: "flex",
7605
- flexDirection: "column",
7606
- gap: theme.spacing(0.5)
7607
- },
7608
- filterCheckboxDropdown: {
7609
- display: "flex",
7610
- flexDirection: "column",
7611
- padding: theme.spacing(0, 3)
7612
- },
7613
- applyFilterButtonsContainer: {
7614
- display: "flex",
7615
- padding: theme.spacing(0, 1)
7380
+ backgroundColor: colors.neutral100,
7381
+ outline: "1px solid",
7382
+ outlineColor: colors.neutral100
7616
7383
  }
7617
7384
  }));
7618
- var SmartTableHeader = ({
7619
- order,
7620
- orderBy,
7621
- headCells,
7622
- numSelected,
7623
- numRows,
7624
- enableCheckboxSelection = false,
7625
- headerFilters,
7626
- onRequestSort,
7627
- onSelectAllClick,
7628
- onApplyFilters
7629
- }) => {
7630
- const { classes } = useStyles46();
7385
+ var SmartTableHeader = (props) => {
7386
+ const { classes } = useStyles45();
7387
+ const { order, orderBy, onRequestSort } = props;
7631
7388
  const createSortHandler = (property) => (event) => {
7632
- onRequestSort(event, property);
7389
+ onRequestSort?.(event, property);
7633
7390
  };
7634
- const isSortActive = (headCellId) => orderBy === headCellId;
7635
- return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material59.TableHead, { className: classes.root, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_material59.TableRow, { children: [
7636
- enableCheckboxSelection ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material59.TableCell, { padding: "checkbox", children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
7637
- import_material59.Checkbox,
7638
- {
7639
- color: "primary",
7640
- indeterminate: numSelected > 0 && numSelected < numRows,
7641
- checked: numRows > 0 && numSelected === numRows,
7642
- onChange: onSelectAllClick
7643
- }
7644
- ) }) : null,
7645
- headCells.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
7646
- import_material59.TableCell,
7647
- {
7648
- className: classes.tableHeaderContent,
7649
- align: "left",
7650
- sortDirection: orderBy === headCell.id ? order : false,
7651
- children: [
7652
- /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
7653
- import_material59.TableSortLabel,
7654
- {
7655
- "data-testid": "table-sort-label",
7656
- active: isSortActive(headCell.id),
7657
- direction: orderBy === headCell.id ? order : "asc",
7658
- onClick: createSortHandler(headCell.id),
7659
- children: [
7660
- headCell.renderHeader ?? headCell.label,
7661
- orderBy === headCell.id ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: classes.visuallyHidden, children: order === "desc" ? "sorted descending" : "sorted ascending" }) : null
7662
- ]
7663
- }
7664
- ),
7665
- headCell.filterOptionsQuery ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
7666
- SmartTableHeaderFilterMenu_default,
7667
- {
7668
- headCell,
7669
- headerFilters,
7670
- hasActiveFilters: !!headerFilters[headCell.id]?.length,
7671
- onApplyFilters
7672
- }
7673
- ) : null
7674
- ]
7675
- },
7676
- headCell.id
7677
- ))
7678
- ] }) });
7391
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material58.TableHead, { className: classes.root, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material58.TableRow, { children: props.headCells.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7392
+ import_material58.TableCell,
7393
+ {
7394
+ className: classes.containerTh,
7395
+ align: "left",
7396
+ sortDirection: orderBy === headCell.id ? order : false,
7397
+ children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
7398
+ import_material58.TableSortLabel,
7399
+ {
7400
+ active: orderBy === headCell.id,
7401
+ direction: orderBy === headCell.id ? order : "asc",
7402
+ onClick: createSortHandler(headCell.id),
7403
+ children: [
7404
+ headCell.label,
7405
+ orderBy === headCell.id ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: classes.visuallyHidden, children: order === "desc" ? "sorted descending" : "sorted ascending" }) : null
7406
+ ]
7407
+ }
7408
+ )
7409
+ },
7410
+ headCell.id
7411
+ )) }) });
7679
7412
  };
7680
- var SmartTableHeader_default = (0, import_react33.memo)(SmartTableHeader);
7413
+ var SmartTableHeader_default = (0, import_react32.memo)(SmartTableHeader);
7681
7414
 
7682
7415
  // src/components/Table/Table.tsx
7683
- var import_react34 = require("react");
7684
- var import_material61 = require("@mui/material");
7416
+ var import_react33 = require("react");
7417
+ var import_material60 = require("@mui/material");
7685
7418
  var import_debounce = __toESM(require_debounce(), 1);
7686
- var import_mui53 = require("tss-react/mui");
7419
+ var import_mui52 = require("tss-react/mui");
7687
7420
  var import_uuid = require("uuid");
7688
7421
 
7689
- // src/components/TableLoading/TableLoading.tsx
7690
- var import_material60 = require("@mui/material");
7691
- var import_jsx_runtime112 = require("react/jsx-runtime");
7692
- var TableLoading = ({
7693
- rowsPerPage,
7694
- rowHeight
7695
- }) => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material60.Box, { children: Array.from({ length: rowsPerPage ?? 0 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
7696
- import_material60.Skeleton,
7697
- {
7698
- animation: "pulse",
7699
- "data-testid": "table-loading-skeleton",
7700
- style: { margin: "8px", opacity: 0.4 },
7701
- variant: "rectangular",
7702
- height: rowHeight
7703
- },
7704
- index
7705
- )) });
7706
- var TableLoading_default = TableLoading;
7707
-
7708
7422
  // src/components/Table/helpers.tsx
7709
7423
  function stableSort(array, cmp) {
7710
7424
  const stabilizedThis = array.map((el, index) => [el, index]);
@@ -7740,9 +7454,24 @@ function calculateRowsPerPage(rowHeight) {
7740
7454
  return 1;
7741
7455
  }
7742
7456
 
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
+
7743
7472
  // src/components/Table/Table.tsx
7744
- var import_jsx_runtime113 = require("react/jsx-runtime");
7745
- var useStyles47 = (0, import_mui53.makeStyles)()(() => ({
7473
+ var import_jsx_runtime112 = require("react/jsx-runtime");
7474
+ var useStyles46 = (0, import_mui52.makeStyles)()(() => ({
7746
7475
  root: {
7747
7476
  height: "calc(100vh - 262px)",
7748
7477
  overflow: "scroll"
@@ -7776,12 +7505,12 @@ var Table = ({
7776
7505
  serverRendered,
7777
7506
  updateSort
7778
7507
  }) => {
7779
- const [order, setOrder] = (0, import_react34.useState)(appliedFilters?.sortDir || "desc");
7780
- const [orderBy, setOrderBy] = (0, import_react34.useState)(
7508
+ const [order, setOrder] = (0, import_react33.useState)(appliedFilters?.sortDir || "desc");
7509
+ const [orderBy, setOrderBy] = (0, import_react33.useState)(
7781
7510
  appliedFilters?.sortField || "delivery_date"
7782
7511
  );
7783
- const [rowsPerPage, setRowsPerPage] = (0, import_react34.useState)(defaultRowsPerPage);
7784
- const { classes } = useStyles47();
7512
+ const [rowsPerPage, setRowsPerPage] = (0, import_react33.useState)(defaultRowsPerPage);
7513
+ const { classes } = useStyles46();
7785
7514
  const rowHeight = 56;
7786
7515
  const emptyRows = rowsPerPage - Math.min(rowsPerPage, data.length - page * rowsPerPage);
7787
7516
  const handleRequestSort = (event, property) => {
@@ -7793,7 +7522,7 @@ var Table = ({
7793
7522
  updateSort(property, orderDir);
7794
7523
  }
7795
7524
  };
7796
- (0, import_react34.useLayoutEffect)(() => {
7525
+ (0, import_react33.useLayoutEffect)(() => {
7797
7526
  if (!doNotCalculateRows) {
7798
7527
  return;
7799
7528
  }
@@ -7819,25 +7548,25 @@ var Table = ({
7819
7548
  );
7820
7549
  const rowsComponents = rows.map((row) => {
7821
7550
  if (RenderItem) {
7822
- return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(RenderItem, { ...row }, row.id);
7551
+ return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(RenderItem, { ...row }, row.id);
7823
7552
  }
7824
- 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);
7553
+ return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material60.TableRow, { hover: true, onClick: () => onRowClick?.(row), children: headCells?.map((column) => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material60.TableCell, { children: row[column.id] }, column.id)) }, row.id);
7825
7554
  });
7826
7555
  if (emptyRows > 0 && rowsPerPage > emptyRows) {
7827
7556
  rowsComponents.push(
7828
- /* @__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)())
7557
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material60.TableRow, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material60.TableCell, { colSpan: 8 }) }, (0, import_uuid.v4)())
7829
7558
  );
7830
7559
  }
7831
7560
  return rowsComponents;
7832
7561
  };
7833
- 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: [
7834
- /* @__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)(
7835
- import_material61.TableCell,
7562
+ return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material60.Paper, { className: classes.root, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material60.Box, { className: classes.paper, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(TableLoading_default, { rowHeight, rowsPerPage }) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material60.TableContainer, { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_material60.Table, { size: "medium", stickyHeader: true, children: [
7563
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material60.TableHead, { className: classes.header, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material60.TableRow, { children: headCells?.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
7564
+ import_material60.TableCell,
7836
7565
  {
7837
7566
  align: "left",
7838
7567
  sortDirection: orderBy === headCell.id ? order : void 0,
7839
- children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
7840
- import_material61.TableSortLabel,
7568
+ children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
7569
+ import_material60.TableSortLabel,
7841
7570
  {
7842
7571
  active: orderBy === headCell.id,
7843
7572
  direction: orderBy === headCell.id ? order : "asc",
@@ -7848,61 +7577,52 @@ var Table = ({
7848
7577
  },
7849
7578
  headCell.id
7850
7579
  )) }) }),
7851
- /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(import_material61.TableBody, { children: [
7580
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_material60.TableBody, { children: [
7852
7581
  getTableRows(),
7853
- 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" }) })
7582
+ rowsPerPage === emptyRows && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material60.TableRow, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material60.TableCell, { colSpan: 8, align: "center", children: "Nothing to display" }) })
7854
7583
  ] })
7855
7584
  ] }) }) }) });
7856
7585
  };
7857
7586
  var Table_default = Table;
7858
7587
 
7859
- // src/components/TableDesktop/TableDesktop.tsx
7860
- var import_react35 = require("react");
7861
- var import_material63 = require("@mui/material");
7862
- var import_mui55 = require("tss-react/mui");
7863
- var import_uuid2 = require("uuid");
7864
-
7865
- // src/components/TableEmptyResult/TableEmptyResult.tsx
7588
+ // src/components/Table/TableDesktop.tsx
7589
+ var import_react34 = require("react");
7866
7590
  var import_material62 = require("@mui/material");
7867
7591
  var import_mui54 = require("tss-react/mui");
7868
- var import_jsx_runtime114 = require("react/jsx-runtime");
7869
- var useStyles48 = (0, import_mui54.makeStyles)()(() => ({
7592
+ var import_uuid2 = require("uuid");
7593
+
7594
+ // src/components/Table/TableEmptyResult.tsx
7595
+ var import_material61 = require("@mui/material");
7596
+ var import_mui53 = require("tss-react/mui");
7597
+ var import_jsx_runtime113 = require("react/jsx-runtime");
7598
+ var useStyles47 = (0, import_mui53.makeStyles)()(() => ({
7870
7599
  tableCellIcon: { padding: 24, height: "calc(100vh - 320px)" },
7871
7600
  tableCellDefault: { padding: 24 }
7872
7601
  }));
7873
7602
  var TableEmptyResult = ({
7874
- colSpan,
7875
7603
  showClearFilterButton = false,
7876
7604
  handleClickOnClearFiltersButton = () => {
7877
7605
  }
7878
7606
  }) => {
7879
- const { classes } = useStyles48();
7880
- return showClearFilterButton ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material62.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
7881
- import_material62.TableCell,
7882
- {
7883
- className: classes.tableCellIcon,
7884
- colSpan,
7885
- align: "center",
7886
- children: [
7887
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(EmptyGlassIcon_default, {}),
7888
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material62.Typography, { variant: "h6", children: "No results found." }),
7889
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material62.Typography, { variant: "subtitle1", children: "Search without applied filters?" }),
7890
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
7891
- FilledButton_default,
7892
- {
7893
- copy: "Search",
7894
- variant: "contained",
7895
- color: "primary",
7896
- onClick: handleClickOnClearFiltersButton
7897
- }
7898
- )
7899
- ]
7900
- }
7901
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material62.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
7902
- import_material62.TableCell,
7607
+ const { classes } = useStyles47();
7608
+ return showClearFilterButton ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(import_material61.TableCell, { className: classes.tableCellIcon, colSpan: 8, align: "center", children: [
7609
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(EmptyGlassIcon_default, {}),
7610
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.Typography, { variant: "h6", children: "No results found." }),
7611
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.Typography, { variant: "subtitle1", children: "Search without applied filters?" }),
7612
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
7613
+ FilledButton_default,
7614
+ {
7615
+ copy: "Search",
7616
+ variant: "contained",
7617
+ color: "primary",
7618
+ onClick: handleClickOnClearFiltersButton
7619
+ }
7620
+ )
7621
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material61.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
7622
+ import_material61.TableCell,
7903
7623
  {
7904
7624
  className: classes.tableCellDefault,
7905
- colSpan,
7625
+ colSpan: 8,
7906
7626
  align: "center",
7907
7627
  children: "Nothing to display"
7908
7628
  }
@@ -7910,9 +7630,9 @@ var TableEmptyResult = ({
7910
7630
  };
7911
7631
  var TableEmptyResult_default = TableEmptyResult;
7912
7632
 
7913
- // src/components/TableDesktop/TableDesktop.tsx
7914
- var import_jsx_runtime115 = require("react/jsx-runtime");
7915
- var useStyles49 = (0, import_mui55.makeStyles)()((theme) => ({
7633
+ // src/components/Table/TableDesktop.tsx
7634
+ var import_jsx_runtime114 = require("react/jsx-runtime");
7635
+ var useStyles48 = (0, import_mui54.makeStyles)()(() => ({
7916
7636
  root: {
7917
7637
  justifyContent: "space-between",
7918
7638
  display: "flex",
@@ -7925,202 +7645,97 @@ var useStyles49 = (0, import_mui55.makeStyles)()((theme) => ({
7925
7645
  justifyContent: "space-between"
7926
7646
  },
7927
7647
  container: {
7928
- maxHeight: "100%",
7929
- "&::-webkit-scrollbar": {
7930
- width: "8px",
7931
- height: "8px"
7932
- },
7933
- "&::-webkit-scrollbar-track": {
7934
- backgroundColor: theme.palette.mode === "dark" ? theme.palette.grey[800] : theme.palette.grey[100]
7935
- },
7936
- "&::-webkit-scrollbar-thumb": {
7937
- backgroundColor: theme.palette.mode === "dark" ? theme.palette.grey[900] : theme.palette.grey[400],
7938
- borderRadius: "10px"
7939
- },
7940
- "&::-webkit-scrollbar-thumb:hover": {
7941
- backgroundColor: theme.palette.mode === "dark" ? theme.palette.common.black : theme.palette.grey[500]
7942
- }
7648
+ maxHeight: "100%"
7943
7649
  }
7944
7650
  }));
7945
- var descendingComparator2 = (a, b, orderBy) => {
7946
- const objA = a[orderBy];
7947
- const objB = b[orderBy];
7948
- const valA = typeof objA === "object" ? objA?.name : objA;
7949
- const valB = typeof objB === "object" ? objB?.name : objB;
7950
- if (!valA && !valB) {
7951
- return 0;
7952
- }
7953
- if (valA && !valB) {
7954
- return -1;
7955
- }
7956
- if (!valA && valB) {
7957
- return 1;
7958
- }
7959
- if (valA > valB) {
7651
+ var desc = (a, b, orderBy) => {
7652
+ if (b[orderBy] < a[orderBy]) {
7960
7653
  return -1;
7961
7654
  }
7962
- if (valA < valB) {
7655
+ if (b[orderBy] > a[orderBy]) {
7963
7656
  return 1;
7964
7657
  }
7965
7658
  return 0;
7966
7659
  };
7967
- var stableSort2 = (array, cmp) => array.map((el, index) => ({ el, index })).sort((a, b) => {
7968
- const order = cmp(a.el, b.el);
7969
- return order !== 0 ? order : a.index - b.index;
7970
- }).map((el) => el.el);
7971
- var getComparator = (order, orderBy) => order === "desc" ? (a, b) => descendingComparator2(a, b, orderBy) : (a, b) => -descendingComparator2(a, b, orderBy);
7660
+ var stableSort2 = (array, cmp) => array.map((el, index) => [el, index]).sort((a, b) => {
7661
+ const order = cmp(a[0], b[0]);
7662
+ return order !== 0 ? order : a[1] - b[1];
7663
+ }).map((el) => el[0]);
7664
+ var getSorting2 = (order, orderBy) => order === "desc" ? (a, b) => desc(a, b, orderBy) : (a, b) => -desc(a, b, orderBy);
7972
7665
  var TableDesktop = ({
7973
- data,
7974
- headCells,
7975
- RenderItem,
7976
7666
  appliedFilters,
7977
- headerFilters,
7978
7667
  children,
7668
+ data,
7669
+ headCells,
7979
7670
  height,
7980
7671
  isLoading,
7981
- rowsPerPage = 50,
7982
- enableCheckboxSelection = false,
7983
- disableInternalSort = false,
7672
+ RenderItem,
7673
+ rowsPerPage,
7984
7674
  updateSort,
7985
7675
  showClearFilterButton,
7986
7676
  handleClickOnClearFiltersButton,
7987
7677
  deleteItem,
7988
- keyField = "id",
7989
- onApplyFilters
7678
+ keyField
7990
7679
  }) => {
7991
- const [order, setOrder] = (0, import_react35.useState)(appliedFilters?.sortDir || "desc");
7992
- const [orderBy, setOrderBy] = (0, import_react35.useState)(
7680
+ const [order, setOrder] = (0, import_react34.useState)(
7681
+ appliedFilters?.sortDir || "desc"
7682
+ );
7683
+ const [orderBy, setOrderBy] = (0, import_react34.useState)(
7993
7684
  appliedFilters?.sortField || "delivery_date"
7994
7685
  );
7995
- const [selected, setSelected] = (0, import_react35.useState)([]);
7996
- const [page] = (0, import_react35.useState)(0);
7997
- const { classes } = useStyles49();
7686
+ const [page] = (0, import_react34.useState)(0);
7687
+ const { classes } = useStyles48();
7998
7688
  const rowHeight = 56;
7999
- const emptyRows = (0, import_react35.useMemo)(
8000
- () => rowsPerPage - data.length,
8001
- [rowsPerPage, data]
8002
- );
8003
- const visibleHeadCells = (0, import_react35.useMemo)(
8004
- () => headCells.filter((headCell) => headCell?.enabled ?? true),
8005
- [headCells]
8006
- );
8007
- const handleSelectAllClick = (0, import_react35.useCallback)(
8008
- (event) => {
8009
- if (event.target.checked) {
8010
- const newSelected = data.map((n) => n[keyField]);
8011
- setSelected(newSelected);
8012
- return;
8013
- }
8014
- setSelected([]);
8015
- },
8016
- [data, keyField]
8017
- );
8018
7689
  const handleRequestSort = (event, property) => {
8019
7690
  const isAsc = orderBy === property && order === "asc";
8020
7691
  const orderDir = isAsc ? "desc" : "asc";
8021
7692
  setOrder(orderDir);
8022
7693
  setOrderBy(property);
8023
- if (updateSort) {
8024
- updateSort(property, orderDir);
8025
- }
7694
+ updateSort(property, orderDir);
8026
7695
  };
8027
- const handleRowCheckboxClick = (0, import_react35.useCallback)(
8028
- (event, keyFieldValue) => {
8029
- const selectedIndex = selected.indexOf(keyFieldValue);
8030
- let newSelected = [];
8031
- if (selectedIndex === -1) {
8032
- newSelected = newSelected.concat(selected, keyFieldValue);
8033
- } else if (selectedIndex === 0) {
8034
- newSelected = newSelected.concat(selected.slice(1));
8035
- } else if (selectedIndex === selected.length - 1) {
8036
- newSelected = newSelected.concat(selected.slice(0, -1));
8037
- } else if (selectedIndex > 0) {
8038
- newSelected = newSelected.concat(
8039
- selected.slice(0, selectedIndex),
8040
- selected.slice(selectedIndex + 1)
8041
- );
8042
- }
8043
- setSelected(newSelected);
8044
- },
8045
- [selected]
8046
- );
8047
- const renderTableRows = (0, import_react35.useMemo)(() => {
8048
- const sortedData = disableInternalSort ? data : stableSort2(data, getComparator(order, orderBy));
8049
- return sortedData.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((row, index) => {
8050
- const isItemSelected = selected.includes(row[keyField]);
8051
- return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
8052
- RenderItem,
8053
- {
8054
- ...{
8055
- ...row,
8056
- index,
8057
- deleteItem,
8058
- isItemSelected,
8059
- enableCheckboxSelection,
8060
- keyFieldValue: row[keyField],
8061
- handleRowCheckboxClick,
8062
- visibleHeadCells
8063
- }
8064
- },
8065
- row[keyField] ?? index
8066
- );
8067
- });
8068
- }, [
8069
- data,
8070
- order,
8071
- orderBy,
8072
- page,
8073
- rowsPerPage,
8074
- selected,
8075
- enableCheckboxSelection,
8076
- disableInternalSort,
8077
- deleteItem,
8078
- keyField,
8079
- handleRowCheckboxClick,
8080
- visibleHeadCells,
8081
- RenderItem
8082
- ]);
8083
- 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)(
8084
- import_material63.Skeleton,
7696
+ const emptyRows = rowsPerPage - data.length;
7697
+ return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: classes.root, style: { height }, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material62.Paper, { className: classes.paper, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { children: [...Array(Math.floor(rowsPerPage))].map(() => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
7698
+ import_material62.Skeleton,
8085
7699
  {
8086
7700
  animation: "pulse",
8087
7701
  style: { margin: "8px", opacity: 0.4 },
8088
7702
  variant: "rectangular",
8089
- height: rowHeight,
8090
- "data-testid": "loading-skeleton"
7703
+ height: rowHeight
8091
7704
  },
8092
- (0, import_uuid2.v4)()
8093
- )) }) : /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(import_jsx_runtime115.Fragment, { children: [
8094
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material63.TableContainer, { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
8095
- import_material63.Table,
7705
+ Math.random()
7706
+ )) }) : /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_jsx_runtime114.Fragment, { children: [
7707
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material62.TableContainer, { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
7708
+ import_material62.Table,
8096
7709
  {
8097
7710
  "aria-labelledby": "tableTitle",
8098
7711
  "aria-label": "sticky table",
8099
7712
  stickyHeader: true,
8100
7713
  children: [
8101
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
7714
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
8102
7715
  SmartTableHeader_default,
8103
7716
  {
8104
- headCells: visibleHeadCells,
7717
+ headCells,
8105
7718
  order,
8106
7719
  orderBy,
8107
- numSelected: selected.length,
8108
- numRows: data.length,
8109
- enableCheckboxSelection,
8110
- headerFilters: headerFilters ?? {},
8111
- onRequestSort: handleRequestSort,
8112
- onSelectAllClick: handleSelectAllClick,
8113
- onApplyFilters
7720
+ onRequestSort: handleRequestSort
8114
7721
  }
8115
7722
  ),
8116
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material63.TableBody, { children: rowsPerPage !== emptyRows ? renderTableRows : /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
8117
- TableEmptyResult_default,
8118
- {
8119
- colSpan: enableCheckboxSelection ? visibleHeadCells.length + 1 : visibleHeadCells.length,
8120
- showClearFilterButton,
8121
- handleClickOnClearFiltersButton
8122
- }
8123
- ) })
7723
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_material62.TableBody, { children: [
7724
+ stableSort2(data, getSorting2(order, orderBy)).slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
7725
+ RenderItem,
7726
+ {
7727
+ ...{ ...item, index, deleteItem }
7728
+ },
7729
+ item[keyField] || (0, import_uuid2.v4)()
7730
+ )),
7731
+ rowsPerPage === emptyRows && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
7732
+ TableEmptyResult_default,
7733
+ {
7734
+ showClearFilterButton,
7735
+ handleClickOnClearFiltersButton
7736
+ }
7737
+ )
7738
+ ] })
8124
7739
  ]
8125
7740
  }
8126
7741
  ) }),
@@ -8130,12 +7745,12 @@ var TableDesktop = ({
8130
7745
  var TableDesktop_default = TableDesktop;
8131
7746
 
8132
7747
  // src/components/TableHeader/TableHeader.tsx
8133
- var import_react36 = require("react");
8134
- var import_icons_material15 = require("@mui/icons-material");
8135
- var import_material64 = require("@mui/material");
8136
- var import_mui56 = require("tss-react/mui");
8137
- var import_jsx_runtime116 = require("react/jsx-runtime");
8138
- var useStyles50 = (0, import_mui56.makeStyles)()(() => ({
7748
+ var import_react35 = require("react");
7749
+ var import_icons_material14 = require("@mui/icons-material");
7750
+ var import_material63 = require("@mui/material");
7751
+ var import_mui55 = require("tss-react/mui");
7752
+ var import_jsx_runtime115 = require("react/jsx-runtime");
7753
+ var useStyles49 = (0, import_mui55.makeStyles)()(() => ({
8139
7754
  sortLabel: {
8140
7755
  "& .MuiTableSortLabel-icon": {
8141
7756
  opacity: 1
@@ -8143,9 +7758,9 @@ var useStyles50 = (0, import_mui56.makeStyles)()(() => ({
8143
7758
  }
8144
7759
  }));
8145
7760
  var TableHeader = ({ cells, onSort = null }) => {
8146
- const [sortableCells, setSortableCells] = (0, import_react36.useState)([]);
8147
- const { classes } = useStyles50();
8148
- (0, import_react36.useEffect)(() => {
7761
+ const [sortableCells, setSortableCells] = (0, import_react35.useState)([]);
7762
+ const { classes } = useStyles49();
7763
+ (0, import_react35.useEffect)(() => {
8149
7764
  setSortableCells(cells);
8150
7765
  }, []);
8151
7766
  const getNewSortDirection = (direction) => {
@@ -8179,24 +7794,24 @@ var TableHeader = ({ cells, onSort = null }) => {
8179
7794
  });
8180
7795
  setSortableCells(sortedCells);
8181
7796
  };
8182
- 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)(
8183
- import_material64.TableSortLabel,
7797
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material63.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material63.TableRow, { children: sortableCells.map((cell, key) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material63.TableCell, { children: cell.isSortable ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
7798
+ import_material63.TableSortLabel,
8184
7799
  {
8185
7800
  className: classes.sortLabel,
8186
7801
  direction: cell?.direction || "asc",
8187
- IconComponent: import_icons_material15.ImportExport,
7802
+ IconComponent: import_icons_material14.ImportExport,
8188
7803
  onClick: () => handleSortClick(cell),
8189
7804
  children: cell.label
8190
7805
  }
8191
7806
  ) : cell.label }, cell.label || key)) }) });
8192
7807
  };
8193
- var TableHeader_default = (0, import_react36.memo)(TableHeader);
7808
+ var TableHeader_default = (0, import_react35.memo)(TableHeader);
8194
7809
 
8195
7810
  // src/components/TextDivider/TextDivider.tsx
8196
- var import_material65 = require("@mui/material");
8197
- var import_mui57 = require("tss-react/mui");
8198
- var import_jsx_runtime117 = require("react/jsx-runtime");
8199
- var useStyles51 = (0, import_mui57.makeStyles)()(() => ({
7811
+ var import_material64 = require("@mui/material");
7812
+ var import_mui56 = require("tss-react/mui");
7813
+ var import_jsx_runtime116 = require("react/jsx-runtime");
7814
+ var useStyles50 = (0, import_mui56.makeStyles)()(() => ({
8200
7815
  icon: {
8201
7816
  fontSize: 20
8202
7817
  },
@@ -8230,21 +7845,21 @@ var TextDivider = ({
8230
7845
  iconPosition = "left",
8231
7846
  titleWeight = "400"
8232
7847
  }) => {
8233
- const { classes } = useStyles51();
7848
+ const { classes } = useStyles50();
8234
7849
  const iconColor = color ?? colors.neutral900;
8235
- return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
8236
- import_material65.Box,
7850
+ return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
7851
+ import_material64.Box,
8237
7852
  {
8238
7853
  display: "flex",
8239
7854
  alignItems: "center",
8240
7855
  justifyContent: "space-between",
8241
7856
  className: classes.container,
8242
7857
  children: [
8243
- /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_material65.Divider, { className: classes.leftDivider }),
8244
- /* @__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: [
8245
- Icon3 && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Icon3, { className: classes.icon, style: { color: iconColor } }),
8246
- /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
8247
- import_material65.Typography,
7858
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material64.Divider, { className: classes.leftDivider }),
7859
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material64.Button, { onClick, disabled: !onClick, className: classes.button, children: /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_material64.Box, { className: classes.center, children: [
7860
+ Icon3 && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Icon3, { className: classes.icon, style: { color: iconColor } }),
7861
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
7862
+ import_material64.Typography,
8248
7863
  {
8249
7864
  color: "textSecondary",
8250
7865
  className: classes.title,
@@ -8252,9 +7867,9 @@ var TextDivider = ({
8252
7867
  children: title
8253
7868
  }
8254
7869
  ),
8255
- Icon3 && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Icon3, { className: classes.icon, style: { color: iconColor } })
7870
+ Icon3 && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Icon3, { className: classes.icon, style: { color: iconColor } })
8256
7871
  ] }) }),
8257
- /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_material65.Divider, { className: classes.rightDivider })
7872
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material64.Divider, { className: classes.rightDivider })
8258
7873
  ]
8259
7874
  }
8260
7875
  );
@@ -8263,11 +7878,11 @@ var TextDivider_default = TextDivider;
8263
7878
 
8264
7879
  // src/components/ThemedDateRangePicker/ThemedDateRangePicker.tsx
8265
7880
  var import_react_dates = require("react-dates");
8266
- var import_mui58 = require("tss-react/mui");
7881
+ var import_mui57 = require("tss-react/mui");
8267
7882
  var import_initialize = require("react-dates/initialize");
8268
7883
  var import_datepicker = require("react-dates/lib/css/_datepicker.css");
8269
- var import_jsx_runtime118 = require("react/jsx-runtime");
8270
- var useStyles52 = (0, import_mui58.makeStyles)()((theme) => ({
7884
+ var import_jsx_runtime117 = require("react/jsx-runtime");
7885
+ var useStyles51 = (0, import_mui57.makeStyles)()((theme) => ({
8271
7886
  wrapper: {
8272
7887
  "& .DateRangePicker": {
8273
7888
  backgroundColor: theme.palette.mode === "dark" ? theme.palette.grey[900] : colors.neutral100,
@@ -8361,17 +7976,17 @@ var ThemedDateRangePicker = ({
8361
7976
  className,
8362
7977
  ...props
8363
7978
  }) => {
8364
- const { classes, cx } = useStyles52();
8365
- 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 }) });
7979
+ const { classes, cx } = useStyles51();
7980
+ return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: cx(classes.wrapper, className), children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_react_dates.DateRangePicker, { ...props }) });
8366
7981
  };
8367
7982
  var ThemedDateRangePicker_default = ThemedDateRangePicker;
8368
7983
 
8369
7984
  // src/components/TheToolbar/TheToolbar.tsx
8370
- var import_react37 = require("react");
8371
- var import_material66 = require("@mui/material");
8372
- var import_mui59 = require("tss-react/mui");
8373
- var import_jsx_runtime119 = require("react/jsx-runtime");
8374
- var useStyles53 = (0, import_mui59.makeStyles)()((theme) => ({
7985
+ var import_react36 = require("react");
7986
+ var import_material65 = require("@mui/material");
7987
+ var import_mui58 = require("tss-react/mui");
7988
+ var import_jsx_runtime118 = require("react/jsx-runtime");
7989
+ var useStyles52 = (0, import_mui58.makeStyles)()((theme) => ({
8375
7990
  menuButton: {
8376
7991
  color: theme.palette.primary.contrastText
8377
7992
  },
@@ -8408,10 +8023,10 @@ var TheToolbar = ({
8408
8023
  handleOpen,
8409
8024
  LeftDrawer: LeftDrawer2
8410
8025
  }) => {
8411
- const { classes } = useStyles53();
8412
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_material66.Box, { children: [
8413
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.AppBar, { children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_material66.Toolbar, { className: classes.topBar, children: [
8414
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
8026
+ const { classes } = useStyles52();
8027
+ return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_material65.Box, { children: [
8028
+ /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.AppBar, { children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_material65.Toolbar, { className: classes.topBar, children: [
8029
+ /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
8415
8030
  RoundButton_default,
8416
8031
  {
8417
8032
  className: classes.menuButton,
@@ -8420,7 +8035,7 @@ var TheToolbar = ({
8420
8035
  onClick: handleOpen
8421
8036
  }
8422
8037
  ),
8423
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
8038
+ /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
8424
8039
  CompanyLogo_default,
8425
8040
  {
8426
8041
  size: "small",
@@ -8430,29 +8045,29 @@ var TheToolbar = ({
8430
8045
  }
8431
8046
  )
8432
8047
  ] }) }),
8433
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.Box, { className: classes.offset }),
8048
+ /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.Box, { className: classes.offset }),
8434
8049
  LeftDrawer2
8435
8050
  ] });
8436
8051
  };
8437
- var TheToolbar_default = (0, import_react37.memo)(TheToolbar);
8052
+ var TheToolbar_default = (0, import_react36.memo)(TheToolbar);
8438
8053
 
8439
8054
  // src/components/ToastMessage/ToastMessage.tsx
8440
- var import_material67 = require("@mui/material");
8441
- var import_jsx_runtime120 = require("react/jsx-runtime");
8055
+ var import_material66 = require("@mui/material");
8056
+ var import_jsx_runtime119 = require("react/jsx-runtime");
8442
8057
  var ToastMessage = ({
8443
8058
  toastType,
8444
8059
  toastMessage,
8445
8060
  open,
8446
8061
  onClose
8447
- }) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
8448
- import_material67.Snackbar,
8062
+ }) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
8063
+ import_material66.Snackbar,
8449
8064
  {
8450
8065
  open,
8451
8066
  autoHideDuration: 1500,
8452
8067
  onClose,
8453
8068
  anchorOrigin: { vertical: "top", horizontal: "right" },
8454
- children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
8455
- import_material67.Alert,
8069
+ children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
8070
+ import_material66.Alert,
8456
8071
  {
8457
8072
  elevation: 6,
8458
8073
  variant: "filled",
@@ -8478,10 +8093,10 @@ var ToastMessage = ({
8478
8093
  var ToastMessage_default = ToastMessage;
8479
8094
 
8480
8095
  // src/components/TwoButtonDialog/TwoButtonDialog.tsx
8481
- var import_material68 = require("@mui/material");
8482
- var import_mui60 = require("tss-react/mui");
8483
- var import_jsx_runtime121 = require("react/jsx-runtime");
8484
- var useStyles54 = (0, import_mui60.makeStyles)()((theme) => ({
8096
+ var import_material67 = require("@mui/material");
8097
+ var import_mui59 = require("tss-react/mui");
8098
+ var import_jsx_runtime120 = require("react/jsx-runtime");
8099
+ var useStyles53 = (0, import_mui59.makeStyles)()((theme) => ({
8485
8100
  paper: {
8486
8101
  padding: theme.spacing(2)
8487
8102
  },
@@ -8509,23 +8124,21 @@ var TwoButtonDialog = ({
8509
8124
  cancelLabel = "CANCEL",
8510
8125
  cancelButton
8511
8126
  }) => {
8512
- const { classes } = useStyles54();
8513
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
8514
- import_material68.Dialog,
8127
+ const { classes } = useStyles53();
8128
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
8129
+ import_material67.Dialog,
8515
8130
  {
8516
8131
  open,
8517
8132
  disableEnforceFocus: true,
8518
8133
  maxWidth: "sm",
8519
8134
  fullWidth: true,
8520
8135
  closeAfterTransition: true,
8521
- BackdropComponent: import_material68.Backdrop,
8522
- BackdropProps: {
8523
- timeout: 500
8524
- },
8525
- 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: [
8526
- /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_material68.Box, { className: classes.mb, children: [
8527
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Typography, { variant: "h5", component: "div", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
8528
- import_material68.Box,
8136
+ BackdropComponent: import_material67.Backdrop,
8137
+ BackdropProps: { timeout: 500 },
8138
+ children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Fade, { in: open, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_material67.Paper, { className: classes.paper, children: [
8139
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_material67.Box, { className: classes.mb, children: [
8140
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Typography, { variant: "h5", component: "div", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
8141
+ import_material67.Box,
8529
8142
  {
8530
8143
  sx: {
8531
8144
  fontWeight: 600
@@ -8533,23 +8146,23 @@ var TwoButtonDialog = ({
8533
8146
  children: title
8534
8147
  }
8535
8148
  ) }),
8536
- /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
8537
- import_material68.Box,
8149
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
8150
+ import_material67.Box,
8538
8151
  {
8539
8152
  className: classes.mt,
8540
8153
  sx: {
8541
8154
  fontWeight: 600
8542
8155
  },
8543
8156
  children: [
8544
- subtitle1 && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Typography, { variant: "subtitle1", children: subtitle1 }),
8545
- subtitle2 && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Typography, { variant: "subtitle1", children: subtitle2 })
8157
+ subtitle1 && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Typography, { variant: "subtitle1", children: subtitle1 }),
8158
+ subtitle2 && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Typography, { variant: "subtitle1", children: subtitle2 })
8546
8159
  ]
8547
8160
  }
8548
8161
  )
8549
8162
  ] }),
8550
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Divider, {}),
8551
- /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_material68.Box, { className: classes.buttonContainer, children: [
8552
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
8163
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Divider, {}),
8164
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_material67.Box, { className: classes.buttonContainer, children: [
8165
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
8553
8166
  FilledButton_default,
8554
8167
  {
8555
8168
  copy: cancelLabel,
@@ -8562,7 +8175,7 @@ var TwoButtonDialog = ({
8562
8175
  }
8563
8176
  }
8564
8177
  ),
8565
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
8178
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
8566
8179
  FilledButton_default,
8567
8180
  {
8568
8181
  color: "primary",
@@ -8571,7 +8184,7 @@ var TwoButtonDialog = ({
8571
8184
  }
8572
8185
  )
8573
8186
  ] }),
8574
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Loading_default, { isLoading: dialogLoading })
8187
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Loading_default, { isLoading: dialogLoading })
8575
8188
  ] }) })
8576
8189
  }
8577
8190
  );
@@ -8579,10 +8192,10 @@ var TwoButtonDialog = ({
8579
8192
  var TwoButtonDialog_default = TwoButtonDialog;
8580
8193
 
8581
8194
  // src/components/icons/IconChart.tsx
8582
- var import_jsx_runtime122 = require("react/jsx-runtime");
8195
+ var import_jsx_runtime121 = require("react/jsx-runtime");
8583
8196
  var SvgIconChart = (props) => {
8584
8197
  const { fill } = props;
8585
- return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
8198
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
8586
8199
  "svg",
8587
8200
  {
8588
8201
  width: "20",
@@ -8591,7 +8204,7 @@ var SvgIconChart = (props) => {
8591
8204
  fill: "none",
8592
8205
  xmlns: "http://www.w3.org/2000/svg",
8593
8206
  ...props,
8594
- children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
8207
+ children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
8595
8208
  "path",
8596
8209
  {
8597
8210
  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",
@@ -8663,7 +8276,6 @@ var IconChart_default = SvgIconChart;
8663
8276
  SectionName,
8664
8277
  SmartSelect,
8665
8278
  SmartTableHeader,
8666
- SmartTableHeaderFilterMenu,
8667
8279
  SquareButton,
8668
8280
  SquareLabel,
8669
8281
  Switch,