@natoora-libs/core 0.2.1-dev-doug-1 → 0.2.2-dev-doug-1

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.
@@ -383,6 +383,7 @@ __export(components_exports, {
383
383
  SearchWithFilters: () => SearchWithFilters_default,
384
384
  SearchWithFiltersForTable: () => SearchWithFiltersForTable_default,
385
385
  SectionName: () => SectionName_default,
386
+ SmartMultipleSelect: () => SmartMultipleSelect,
386
387
  SmartSelect: () => SmartSelect_default,
387
388
  SmartTableHeader: () => SmartTableHeader,
388
389
  SmartTableHeaderFilterMenu: () => SmartTableHeaderFilterMenu,
@@ -6509,7 +6510,7 @@ var import_mui41 = require("tss-react/mui");
6509
6510
 
6510
6511
  // src/utils/useGetActiveSection.ts
6511
6512
  var import_react28 = require("react");
6512
- var transformNameToID = (name) => name.replaceAll(" ", "-").toLocaleLowerCase();
6513
+ var transformNameToID = (name) => name.replaceAll(" ", "_").toLocaleLowerCase();
6513
6514
 
6514
6515
  // src/components/RenderContentList/RenderContentList.tsx
6515
6516
  var import_jsx_runtime106 = require("react/jsx-runtime");
@@ -6592,7 +6593,7 @@ var RenderContentList = ({
6592
6593
  },
6593
6594
  children: [
6594
6595
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_material53.ListItemText, { primary: item }),
6595
- warningItems?.includes(item) && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_material53.Tooltip, { title: warningMessage, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_icons_material8.WarningAmber, { color: "warning" }) })
6596
+ (warningItems?.includes(item) || warningItems?.includes(id)) && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_material53.Tooltip, { title: warningMessage, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_icons_material8.WarningAmber, { color: "warning" }) })
6596
6597
  ]
6597
6598
  },
6598
6599
  id
@@ -7302,18 +7303,113 @@ var SectionName = ({
7302
7303
  };
7303
7304
  var SectionName_default = SectionName;
7304
7305
 
7305
- // src/components/SmartSelect/SmartSelect.tsx
7306
+ // src/components/SmartMultipleSelect/SmartMultipleSelect.tsx
7306
7307
  var import_react34 = require("react");
7307
7308
  var import_material62 = require("@mui/material");
7308
- var import_mui49 = require("tss-react/mui");
7309
7309
  var import_jsx_runtime115 = require("react/jsx-runtime");
7310
+ var SmartMultipleSelect = ({
7311
+ inputLabel,
7312
+ variant = "standard",
7313
+ size,
7314
+ values,
7315
+ defaultValues,
7316
+ onChange,
7317
+ onOpen,
7318
+ onClose,
7319
+ menuOptions,
7320
+ isLoading,
7321
+ disabled,
7322
+ emptyMessage = "No options.",
7323
+ helperText
7324
+ }) => {
7325
+ const [localValues, setLocalValues] = (0, import_react34.useState)(defaultValues ?? []);
7326
+ const handleChangeOption = (option) => {
7327
+ let newValues = [];
7328
+ const selectedIndex = localValues.findIndex(
7329
+ (val) => val.value === option.value
7330
+ );
7331
+ if (selectedIndex === -1) {
7332
+ newValues = [...localValues, option];
7333
+ } else {
7334
+ newValues = localValues.filter((_, i) => i !== selectedIndex);
7335
+ }
7336
+ setLocalValues(newValues);
7337
+ onChange?.(newValues);
7338
+ };
7339
+ const renderMenuContent = () => !menuOptions?.length ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
7340
+ import_material62.Box,
7341
+ {
7342
+ sx: { display: "flex", justifyContent: "center", alignItems: "center" },
7343
+ children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.Typography, { children: emptyMessage })
7344
+ }
7345
+ ) : /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.Box, { sx: { display: "flex", flexDirection: "column" }, children: menuOptions?.map((option, index) => {
7346
+ const selectedValues = values ?? localValues ?? [];
7347
+ const isSelected = selectedValues.some(
7348
+ (selected) => selected.value === option.value
7349
+ );
7350
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
7351
+ import_material62.Box,
7352
+ {
7353
+ onClick: () => handleChangeOption(option),
7354
+ sx: {
7355
+ p: 0.5,
7356
+ display: "flex",
7357
+ cursor: "pointer",
7358
+ backgroundColor: isSelected ? colors.lightBlueBackground : void 0
7359
+ },
7360
+ children: [
7361
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.Checkbox, { disableRipple: true, sx: { py: 0.5 }, checked: isSelected }),
7362
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.ListItemText, { primary: option.label })
7363
+ ]
7364
+ },
7365
+ option.value ?? index
7366
+ );
7367
+ }) });
7368
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(import_material62.FormControl, { fullWidth: true, variant, children: [
7369
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.InputLabel, { children: inputLabel }),
7370
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
7371
+ import_material62.Select,
7372
+ {
7373
+ multiple: true,
7374
+ size,
7375
+ disabled,
7376
+ value: values ?? localValues,
7377
+ defaultValue: defaultValues,
7378
+ onOpen,
7379
+ onClose: () => onClose?.(localValues),
7380
+ renderValue: (selectedValues) => {
7381
+ const valuesString = selectedValues.map((v) => v.label)?.join(", ");
7382
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(DynamicOverflowTooltip, { tooltipDescription: valuesString, children: valuesString });
7383
+ },
7384
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
7385
+ import_material62.Box,
7386
+ {
7387
+ sx: {
7388
+ display: "flex",
7389
+ justifyContent: "center",
7390
+ alignItems: "center"
7391
+ },
7392
+ children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.CircularProgress, { size: 24 })
7393
+ }
7394
+ ) : renderMenuContent()
7395
+ }
7396
+ ),
7397
+ helperText && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.FormHelperText, { children: helperText })
7398
+ ] });
7399
+ };
7400
+
7401
+ // src/components/SmartSelect/SmartSelect.tsx
7402
+ var import_react35 = require("react");
7403
+ var import_material63 = require("@mui/material");
7404
+ var import_mui49 = require("tss-react/mui");
7405
+ var import_jsx_runtime116 = require("react/jsx-runtime");
7310
7406
  var useStyles44 = (0, import_mui49.makeStyles)()(() => ({
7311
7407
  container: {
7312
7408
  display: "flex",
7313
7409
  flexDirection: "column"
7314
7410
  }
7315
7411
  }));
7316
- var SmartSelect = (0, import_react34.forwardRef)(
7412
+ var SmartSelect = (0, import_react35.forwardRef)(
7317
7413
  ({
7318
7414
  value,
7319
7415
  defaultOption,
@@ -7333,9 +7429,9 @@ var SmartSelect = (0, import_react34.forwardRef)(
7333
7429
  menuProps
7334
7430
  }, ref) => {
7335
7431
  const { classes } = useStyles44();
7336
- const [open, setOpen] = (0, import_react34.useState)(false);
7337
- const [localOptions, setLocalOptions] = (0, import_react34.useState)(options || []);
7338
- (0, import_react34.useEffect)(() => {
7432
+ const [open, setOpen] = (0, import_react35.useState)(false);
7433
+ const [localOptions, setLocalOptions] = (0, import_react35.useState)(options || []);
7434
+ (0, import_react35.useEffect)(() => {
7339
7435
  if (options) {
7340
7436
  setLocalOptions(options);
7341
7437
  }
@@ -7374,8 +7470,8 @@ var SmartSelect = (0, import_react34.forwardRef)(
7374
7470
  onChange(selectedOption);
7375
7471
  }
7376
7472
  };
7377
- return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
7378
- import_material62.FormControl,
7473
+ return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
7474
+ import_material63.FormControl,
7379
7475
  {
7380
7476
  fullWidth: true,
7381
7477
  size,
@@ -7385,16 +7481,16 @@ var SmartSelect = (0, import_react34.forwardRef)(
7385
7481
  "data-testid": dataTestId,
7386
7482
  disabled,
7387
7483
  children: [
7388
- inputLabel && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
7389
- import_material62.InputLabel,
7484
+ inputLabel && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
7485
+ import_material63.InputLabel,
7390
7486
  {
7391
7487
  id: "smart-select-label",
7392
7488
  "data-testid": `${dataTestId}-label`,
7393
7489
  children: inputLabel
7394
7490
  }
7395
7491
  ),
7396
- /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
7397
- import_material62.Select,
7492
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
7493
+ import_material63.Select,
7398
7494
  {
7399
7495
  ref,
7400
7496
  size,
@@ -7411,26 +7507,26 @@ var SmartSelect = (0, import_react34.forwardRef)(
7411
7507
  MenuProps: menuProps,
7412
7508
  label: inputLabel,
7413
7509
  children: [
7414
- isFetching && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
7415
- import_material62.MenuItem,
7510
+ isFetching && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
7511
+ import_material63.MenuItem,
7416
7512
  {
7417
7513
  disabled: true,
7418
7514
  "data-testid": `${dataTestId}-loading`,
7419
7515
  id: `${dataTestId}-loading`,
7420
- children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.CircularProgress, { size: 24 })
7516
+ children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material63.CircularProgress, { size: 24 })
7421
7517
  }
7422
7518
  ),
7423
- (defaultOption === null || !defaultOptionLabelIsValid || !defaultOptionValueIsValid) && !isFetching && options?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.MenuItem, { disabled: true, "data-testid": `${dataTestId}-empty-message`, children: emptyMessage }),
7424
- localOptions.length === 0 && !isFetching && options?.length !== 0 && defaultOptionLabelIsValid && defaultOptionValueIsValid && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
7425
- import_material62.MenuItem,
7519
+ (defaultOption === null || !defaultOptionLabelIsValid || !defaultOptionValueIsValid) && !isFetching && options?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material63.MenuItem, { disabled: true, "data-testid": `${dataTestId}-empty-message`, children: emptyMessage }),
7520
+ localOptions.length === 0 && !isFetching && options?.length !== 0 && defaultOptionLabelIsValid && defaultOptionValueIsValid && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
7521
+ import_material63.MenuItem,
7426
7522
  {
7427
7523
  value: defaultOption?.value,
7428
7524
  "data-testid": `${dataTestId}-default-option`,
7429
7525
  children: defaultOption?.label
7430
7526
  }
7431
7527
  ),
7432
- !isFetching && combinedOptions.length > 0 && combinedOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
7433
- import_material62.MenuItem,
7528
+ !isFetching && combinedOptions.length > 0 && combinedOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
7529
+ import_material63.MenuItem,
7434
7530
  {
7435
7531
  value: option?.value,
7436
7532
  "data-testid": `${dataTestId}-option-${option?.value}`,
@@ -7442,7 +7538,7 @@ var SmartSelect = (0, import_react34.forwardRef)(
7442
7538
  ]
7443
7539
  }
7444
7540
  ),
7445
- helperText && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.FormHelperText, { "data-testid": `${dataTestId}-helper-text`, children: helperText })
7541
+ helperText && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material63.FormHelperText, { "data-testid": `${dataTestId}-helper-text`, children: helperText })
7446
7542
  ]
7447
7543
  }
7448
7544
  );
@@ -7451,15 +7547,15 @@ var SmartSelect = (0, import_react34.forwardRef)(
7451
7547
  var SmartSelect_default = SmartSelect;
7452
7548
 
7453
7549
  // src/components/SquareLabel/SquareLabel.tsx
7454
- var import_react35 = require("react");
7455
- var import_material63 = require("@mui/material");
7456
- var import_colors51 = require("@mui/material/colors");
7550
+ var import_react36 = require("react");
7551
+ var import_material64 = require("@mui/material");
7552
+ var import_colors52 = require("@mui/material/colors");
7457
7553
  var import_mui50 = require("tss-react/mui");
7458
- var import_jsx_runtime116 = require("react/jsx-runtime");
7554
+ var import_jsx_runtime117 = require("react/jsx-runtime");
7459
7555
  var useStyles45 = (0, import_mui50.makeStyles)()((theme) => ({
7460
7556
  red: {
7461
- backgroundColor: import_colors51.red["50"],
7462
- color: import_colors51.red["500"],
7557
+ backgroundColor: import_colors52.red["50"],
7558
+ color: import_colors52.red["500"],
7463
7559
  padding: theme.spacing(1.5),
7464
7560
  borderRadius: "5px",
7465
7561
  marginTop: theme.spacing(1),
@@ -7470,15 +7566,15 @@ var useStyles45 = (0, import_mui50.makeStyles)()((theme) => ({
7470
7566
  }));
7471
7567
  var SquareLabel = ({ color, copy }) => {
7472
7568
  const { classes } = useStyles45();
7473
- return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material63.Typography, { className: classes[color], children: copy });
7569
+ return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_material64.Typography, { className: classes[color], children: copy });
7474
7570
  };
7475
- var SquareLabel_default = (0, import_react35.memo)(SquareLabel);
7571
+ var SquareLabel_default = (0, import_react36.memo)(SquareLabel);
7476
7572
 
7477
7573
  // src/components/Switch/Switch.tsx
7478
- var import_react36 = require("react");
7479
- var import_material64 = require("@mui/material");
7574
+ var import_react37 = require("react");
7575
+ var import_material65 = require("@mui/material");
7480
7576
  var import_mui51 = require("tss-react/mui");
7481
- var import_jsx_runtime117 = require("react/jsx-runtime");
7577
+ var import_jsx_runtime118 = require("react/jsx-runtime");
7482
7578
  var LSwitch = ({
7483
7579
  checked,
7484
7580
  labelOn,
@@ -7486,8 +7582,8 @@ var LSwitch = ({
7486
7582
  handleChange,
7487
7583
  classes,
7488
7584
  disabled
7489
- }) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: classes.c_switch, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
7490
- import_material64.Grid,
7585
+ }) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: classes.c_switch, children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
7586
+ import_material65.Grid,
7491
7587
  {
7492
7588
  component: "label",
7493
7589
  container: true,
@@ -7496,9 +7592,9 @@ var LSwitch = ({
7496
7592
  alignItems: "center"
7497
7593
  },
7498
7594
  children: [
7499
- labelOff && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_material64.Grid, { children: labelOff }),
7500
- /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_material64.Grid, { children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
7501
- import_material64.Switch,
7595
+ labelOff && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.Grid, { children: labelOff }),
7596
+ /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.Grid, { children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7597
+ import_material65.Switch,
7502
7598
  {
7503
7599
  checked,
7504
7600
  color: "primary",
@@ -7506,7 +7602,7 @@ var LSwitch = ({
7506
7602
  disabled
7507
7603
  }
7508
7604
  ) }),
7509
- labelOn && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_material64.Grid, { children: labelOn })
7605
+ labelOn && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.Grid, { children: labelOn })
7510
7606
  ]
7511
7607
  }
7512
7608
  ) });
@@ -7528,13 +7624,13 @@ var LabelledSwitch = (0, import_mui51.withStyles)(LSwitch, (theme) => ({
7528
7624
  fontSize: "1rem"
7529
7625
  }
7530
7626
  }));
7531
- var Switch_default = (0, import_react36.memo)(LabelledSwitch);
7627
+ var Switch_default = (0, import_react37.memo)(LabelledSwitch);
7532
7628
 
7533
7629
  // src/components/SmartTableHeaderFilterMenu/SmartTableHeaderFilterMenu.tsx
7534
- var import_react37 = require("react");
7535
- var import_material65 = require("@mui/material");
7630
+ var import_react38 = require("react");
7631
+ var import_material66 = require("@mui/material");
7536
7632
  var import_classnames3 = __toESM(require("classnames"), 1);
7537
- var import_jsx_runtime118 = require("react/jsx-runtime");
7633
+ var import_jsx_runtime119 = require("react/jsx-runtime");
7538
7634
  var MAX_WIDTH = 276;
7539
7635
  var findFilterIndex = (filters, filterOption) => filters.findIndex((item) => {
7540
7636
  if (typeof item === "string" && typeof filterOption === "string") {
@@ -7552,15 +7648,18 @@ var SmartTableHeaderFilterMenu = ({
7552
7648
  shouldShowCheckOnFilter,
7553
7649
  onApplyFilters
7554
7650
  }) => {
7555
- const [anchorEl, setAnchorEl] = (0, import_react37.useState)(null);
7556
- const [filterOptionsData, setFilterOptionsData] = (0, import_react37.useState)();
7557
- const [selectedFilterOptions, setSelectedFilterOptions] = (0, import_react37.useState)(headerFilters[headCell.id] ?? []);
7651
+ const [anchorEl, setAnchorEl] = (0, import_react38.useState)(null);
7652
+ const [filterOptionsData, setFilterOptionsData] = (0, import_react38.useState)();
7653
+ const [selectedFilterOptions, setSelectedFilterOptions] = (0, import_react38.useState)(headerFilters[headCell.id] ?? []);
7558
7654
  const numFilterOptions = filterOptionsData?.length ?? 0;
7559
- (0, import_react37.useEffect)(() => {
7655
+ (0, import_react38.useEffect)(() => {
7560
7656
  if (headCell.filterOptions) {
7561
7657
  setFilterOptionsData(headCell.filterOptions);
7562
7658
  } else if (headCell.filterType === "boolean") {
7563
- setFilterOptionsData([{ id: "true", label: "Yes" }, { id: "false", label: "No" }]);
7659
+ setFilterOptionsData([
7660
+ { id: "true", label: "Yes" },
7661
+ { id: "false", label: "No" }
7662
+ ]);
7564
7663
  }
7565
7664
  }, [headCell.filterOptions]);
7566
7665
  const handleFilterMenuOpen = (event) => {
@@ -7609,11 +7708,11 @@ var SmartTableHeaderFilterMenu = ({
7609
7708
  onApplyFilters?.(updatedFilters, shouldSave);
7610
7709
  setAnchorEl(null);
7611
7710
  };
7612
- (0, import_react37.useEffect)(() => {
7711
+ (0, import_react38.useEffect)(() => {
7613
7712
  setSelectedFilterOptions(headerFilters[headCell.id] ?? []);
7614
7713
  }, [headerFilters, headCell.id]);
7615
- return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_jsx_runtime118.Fragment, { children: [
7616
- /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7714
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_jsx_runtime119.Fragment, { children: [
7715
+ /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7617
7716
  ActiveFiltersIconButton,
7618
7717
  {
7619
7718
  numActiveFilters,
@@ -7623,8 +7722,8 @@ var SmartTableHeaderFilterMenu = ({
7623
7722
  })
7624
7723
  }
7625
7724
  ),
7626
- /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7627
- import_material65.Menu,
7725
+ /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7726
+ import_material66.Menu,
7628
7727
  {
7629
7728
  open: !!anchorEl,
7630
7729
  onClose: handleFilterMenuClose,
@@ -7637,7 +7736,7 @@ var SmartTableHeaderFilterMenu = ({
7637
7736
  },
7638
7737
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
7639
7738
  transformOrigin: { vertical: "top", horizontal: "right" },
7640
- children: headCell.filterType === "autocomplete" ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7739
+ children: headCell.filterType === "autocomplete" ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7641
7740
  AutocompleteFilterMenuContent,
7642
7741
  {
7643
7742
  columnId: headCell.id,
@@ -7650,7 +7749,7 @@ var SmartTableHeaderFilterMenu = ({
7650
7749
  onApplyFiltersClick: handleApplyFiltersClick,
7651
7750
  shouldShowCheckOnFilter
7652
7751
  }
7653
- ) : /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7752
+ ) : /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7654
7753
  CheckboxFilterMenuContent,
7655
7754
  {
7656
7755
  columnId: headCell.id,
@@ -7670,10 +7769,10 @@ var SmartTableHeaderFilterMenu = ({
7670
7769
  };
7671
7770
 
7672
7771
  // src/components/SmartTableHeader/SmartTableHeader.tsx
7673
- var import_react38 = require("react");
7674
- var import_material66 = require("@mui/material");
7675
- var import_jsx_runtime119 = require("react/jsx-runtime");
7676
- var SmartTableHeader = (0, import_react38.memo)(
7772
+ var import_react39 = require("react");
7773
+ var import_material67 = require("@mui/material");
7774
+ var import_jsx_runtime120 = require("react/jsx-runtime");
7775
+ var SmartTableHeader = (0, import_react39.memo)(
7677
7776
  ({
7678
7777
  order,
7679
7778
  orderBy,
@@ -7691,19 +7790,26 @@ var SmartTableHeader = (0, import_react38.memo)(
7691
7790
  onRequestSort(event, property);
7692
7791
  };
7693
7792
  const isSortActive = (headCellId) => orderBy === headCellId;
7694
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_material66.TableRow, { children: [
7695
- enableCheckboxSelection ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.TableCell, { padding: "checkbox", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7696
- import_material66.Checkbox,
7793
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_material67.TableRow, { children: [
7794
+ enableCheckboxSelection ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
7795
+ import_material67.TableCell,
7697
7796
  {
7698
- color: "primary",
7699
- disableRipple: true,
7700
- indeterminate: numSelectedRows > 0 && numSelectedRows < numRows,
7701
- checked: numRows > 0 && numSelectedRows === numRows,
7702
- onChange: onSelectAllClick
7797
+ padding: "checkbox",
7798
+ sx: { backgroundColor: colors.neutral100 },
7799
+ children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
7800
+ import_material67.Checkbox,
7801
+ {
7802
+ color: "primary",
7803
+ disableRipple: true,
7804
+ indeterminate: numSelectedRows > 0 && numSelectedRows < numRows,
7805
+ checked: numRows > 0 && numSelectedRows === numRows,
7806
+ onChange: onSelectAllClick
7807
+ }
7808
+ )
7703
7809
  }
7704
- ) }) : null,
7705
- headCells.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7706
- import_material66.TableCell,
7810
+ ) : null,
7811
+ headCells.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
7812
+ import_material67.TableCell,
7707
7813
  {
7708
7814
  align: "left",
7709
7815
  width: headCell.width ?? "auto",
@@ -7726,23 +7832,15 @@ var SmartTableHeader = (0, import_react38.memo)(
7726
7832
  }
7727
7833
  }
7728
7834
  },
7729
- children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
7730
- import_material66.Box,
7835
+ children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
7836
+ import_material67.Box,
7731
7837
  {
7732
7838
  display: "flex",
7733
7839
  flexDirection: "row",
7734
7840
  gap: headCell.disableSort ? 1 : 0,
7735
7841
  children: [
7736
- headCell.disableSort ? headCell.renderHeader ?? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.Tooltip, { title: headCell.labelTooltip ?? "", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7737
- import_material66.Typography,
7738
- {
7739
- variant: "subtitle2",
7740
- mt: 0.25,
7741
- mb: -0.25,
7742
- children: headCell.label
7743
- }
7744
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.Tooltip, { title: headCell.labelTooltip ?? "", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
7745
- import_material66.TableSortLabel,
7842
+ headCell.disableSort ? headCell.renderHeader ?? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Tooltip, { title: headCell.labelTooltip ?? "", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Typography, { variant: "subtitle2", mt: 0.25, mb: -0.25, children: headCell.label }) }) : /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Tooltip, { title: headCell.labelTooltip ?? "", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
7843
+ import_material67.TableSortLabel,
7746
7844
  {
7747
7845
  "data-testid": "table-sort-label",
7748
7846
  active: isSortActive(headCell.id),
@@ -7750,7 +7848,7 @@ var SmartTableHeader = (0, import_react38.memo)(
7750
7848
  onClick: createSortHandler(headCell.id),
7751
7849
  children: [
7752
7850
  headCell.renderHeader ?? headCell.label,
7753
- orderBy === headCell.id ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7851
+ orderBy === headCell.id ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
7754
7852
  "span",
7755
7853
  {
7756
7854
  style: {
@@ -7770,7 +7868,7 @@ var SmartTableHeader = (0, import_react38.memo)(
7770
7868
  ]
7771
7869
  }
7772
7870
  ) }),
7773
- headCell.filterType ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7871
+ headCell.filterType ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
7774
7872
  SmartTableHeaderFilterMenu,
7775
7873
  {
7776
7874
  headCell,
@@ -7791,20 +7889,20 @@ var SmartTableHeader = (0, import_react38.memo)(
7791
7889
  );
7792
7890
 
7793
7891
  // src/components/Table/Table.tsx
7794
- var import_react39 = require("react");
7795
- var import_material68 = require("@mui/material");
7892
+ var import_react40 = require("react");
7893
+ var import_material69 = require("@mui/material");
7796
7894
  var import_debounce = __toESM(require_debounce(), 1);
7797
7895
  var import_mui52 = require("tss-react/mui");
7798
7896
  var import_uuid = require("uuid");
7799
7897
 
7800
7898
  // src/components/TableLoading/TableLoading.tsx
7801
- var import_material67 = require("@mui/material");
7802
- var import_jsx_runtime120 = require("react/jsx-runtime");
7899
+ var import_material68 = require("@mui/material");
7900
+ var import_jsx_runtime121 = require("react/jsx-runtime");
7803
7901
  var TableLoading = ({
7804
7902
  rowsPerPage,
7805
7903
  rowHeight
7806
- }) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Box, { children: Array.from({ length: rowsPerPage ?? 0 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
7807
- import_material67.Skeleton,
7904
+ }) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Box, { children: Array.from({ length: rowsPerPage ?? 0 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
7905
+ import_material68.Skeleton,
7808
7906
  {
7809
7907
  animation: "pulse",
7810
7908
  "data-testid": "table-loading-skeleton",
@@ -7852,7 +7950,7 @@ function calculateRowsPerPage(rowHeight) {
7852
7950
  }
7853
7951
 
7854
7952
  // src/components/Table/Table.tsx
7855
- var import_jsx_runtime121 = require("react/jsx-runtime");
7953
+ var import_jsx_runtime122 = require("react/jsx-runtime");
7856
7954
  var useStyles46 = (0, import_mui52.makeStyles)()(() => ({
7857
7955
  root: {
7858
7956
  height: "calc(100vh - 262px)",
@@ -7887,11 +7985,11 @@ var Table = ({
7887
7985
  serverRendered,
7888
7986
  updateSort
7889
7987
  }) => {
7890
- const [order, setOrder] = (0, import_react39.useState)(appliedFilters?.sortDir || "desc");
7891
- const [orderBy, setOrderBy] = (0, import_react39.useState)(
7988
+ const [order, setOrder] = (0, import_react40.useState)(appliedFilters?.sortDir || "desc");
7989
+ const [orderBy, setOrderBy] = (0, import_react40.useState)(
7892
7990
  appliedFilters?.sortField || "delivery_date"
7893
7991
  );
7894
- const [rowsPerPage, setRowsPerPage] = (0, import_react39.useState)(defaultRowsPerPage);
7992
+ const [rowsPerPage, setRowsPerPage] = (0, import_react40.useState)(defaultRowsPerPage);
7895
7993
  const { classes } = useStyles46();
7896
7994
  const rowHeight = 56;
7897
7995
  const emptyRows = rowsPerPage - Math.min(rowsPerPage, data.length - page * rowsPerPage);
@@ -7904,7 +8002,7 @@ var Table = ({
7904
8002
  updateSort(property, orderDir);
7905
8003
  }
7906
8004
  };
7907
- (0, import_react39.useLayoutEffect)(() => {
8005
+ (0, import_react40.useLayoutEffect)(() => {
7908
8006
  if (!doNotCalculateRows) {
7909
8007
  return;
7910
8008
  }
@@ -7930,25 +8028,25 @@ var Table = ({
7930
8028
  );
7931
8029
  const rowsComponents = rows.map((row) => {
7932
8030
  if (RenderItem) {
7933
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(RenderItem, { ...row }, row.id);
8031
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(RenderItem, { ...row }, row.id);
7934
8032
  }
7935
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.TableRow, { hover: true, onClick: () => onRowClick?.(row), children: headCells?.map((column) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.TableCell, { children: row[column.id] }, column.id)) }, row.id);
8033
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableRow, { hover: true, onClick: () => onRowClick?.(row), children: headCells?.map((column) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableCell, { children: row[column.id] }, column.id)) }, row.id);
7936
8034
  });
7937
8035
  if (emptyRows > 0 && rowsPerPage > emptyRows) {
7938
8036
  rowsComponents.push(
7939
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.TableRow, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.TableCell, { colSpan: 8 }) }, (0, import_uuid.v4)())
8037
+ /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableRow, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableCell, { colSpan: 8 }) }, (0, import_uuid.v4)())
7940
8038
  );
7941
8039
  }
7942
8040
  return rowsComponents;
7943
8041
  };
7944
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Paper, { className: classes.root, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Box, { className: classes.paper, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(TableLoading_default, { rowHeight, rowsPerPage }) : /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.TableContainer, { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_material68.Table, { size: "medium", stickyHeader: true, children: [
7945
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.TableHead, { className: classes.header, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.TableRow, { children: headCells?.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
7946
- import_material68.TableCell,
8042
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.Paper, { className: classes.root, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.Box, { className: classes.paper, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(TableLoading_default, { rowHeight, rowsPerPage }) : /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableContainer, { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_material69.Table, { size: "medium", stickyHeader: true, children: [
8043
+ /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableHead, { className: classes.header, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableRow, { children: headCells?.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
8044
+ import_material69.TableCell,
7947
8045
  {
7948
8046
  align: "left",
7949
8047
  sortDirection: orderBy === headCell.id ? order : void 0,
7950
- children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
7951
- import_material68.TableSortLabel,
8048
+ children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
8049
+ import_material69.TableSortLabel,
7952
8050
  {
7953
8051
  active: orderBy === headCell.id,
7954
8052
  direction: orderBy === headCell.id ? order : "asc",
@@ -7959,29 +8057,29 @@ var Table = ({
7959
8057
  },
7960
8058
  headCell.id
7961
8059
  )) }) }),
7962
- /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_material68.TableBody, { children: [
8060
+ /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_material69.TableBody, { children: [
7963
8061
  getTableRows(),
7964
- rowsPerPage === emptyRows && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.TableRow, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.TableCell, { colSpan: 8, align: "center", children: "Nothing to display" }) })
8062
+ rowsPerPage === emptyRows && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableRow, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableCell, { colSpan: 8, align: "center", children: "Nothing to display" }) })
7965
8063
  ] })
7966
8064
  ] }) }) }) });
7967
8065
  };
7968
8066
  var Table_default = Table;
7969
8067
 
7970
8068
  // src/components/TableDesktop/TableDesktop.tsx
7971
- var import_react40 = require("react");
7972
- var import_material73 = require("@mui/material");
8069
+ var import_react41 = require("react");
8070
+ var import_material74 = require("@mui/material");
7973
8071
 
7974
8072
  // src/components/TableDesktopLoadingState/TableDesktopLoadingState.tsx
7975
- var import_material69 = require("@mui/material");
7976
- var import_jsx_runtime122 = require("react/jsx-runtime");
8073
+ var import_material70 = require("@mui/material");
8074
+ var import_jsx_runtime123 = require("react/jsx-runtime");
7977
8075
  var getRange = (n) => Array.from({ length: n }, (_, i) => i + 1);
7978
8076
  var TableDesktopLoadingState = ({
7979
8077
  numRows,
7980
8078
  numColumns,
7981
8079
  rowHeight = 56
7982
8080
  }) => {
7983
- return getRange(numRows).map((rowNum) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableRow, { children: getRange(numColumns).map((colNum) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
7984
- import_material69.Skeleton,
8081
+ return getRange(numRows).map((rowNum) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_material70.TableRow, { children: getRange(numColumns).map((colNum) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_material70.TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
8082
+ import_material70.Skeleton,
7985
8083
  {
7986
8084
  animation: "pulse",
7987
8085
  variant: "rounded",
@@ -7999,11 +8097,11 @@ var import_TableRow = __toESM(require("@mui/material/TableRow"), 1);
7999
8097
  var import_Typography = __toESM(require("@mui/material/Typography"), 1);
8000
8098
 
8001
8099
  // src/components/Buttons/BaseButton/BaseIconButton.tsx
8002
- var import_material70 = require("@mui/material");
8003
- var import_jsx_runtime123 = require("react/jsx-runtime");
8100
+ var import_material71 = require("@mui/material");
8101
+ var import_jsx_runtime124 = require("react/jsx-runtime");
8004
8102
  var BaseIconButton = ({ icon, sx, ...props }) => {
8005
- return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
8006
- import_material70.Button,
8103
+ return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
8104
+ import_material71.Button,
8007
8105
  {
8008
8106
  sx: {
8009
8107
  display: "flex",
@@ -8023,10 +8121,10 @@ var BaseIconButton = ({ icon, sx, ...props }) => {
8023
8121
  };
8024
8122
 
8025
8123
  // src/components/TableDesktopNoColumnsMessage/TableDesktopNoColumnsMessage.tsx
8026
- var import_jsx_runtime124 = require("react/jsx-runtime");
8124
+ var import_jsx_runtime125 = require("react/jsx-runtime");
8027
8125
  var TableDesktopNoColumnsMessage = ({
8028
8126
  onClickNoColumnsMessageOpenMenu
8029
- }) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_TableBody.default, { children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_TableRow.default, { children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
8127
+ }) => /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_TableBody.default, { children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_TableRow.default, { children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
8030
8128
  import_TableCell.default,
8031
8129
  {
8032
8130
  sx: {
@@ -8039,9 +8137,9 @@ var TableDesktopNoColumnsMessage = ({
8039
8137
  alignItems: "center"
8040
8138
  },
8041
8139
  children: [
8042
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_Typography.default, { variant: "subtitle2", fontSize: 16, children: "Customise your view" }),
8043
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_Typography.default, { variant: "subtitle1", align: "center", color: "textSecondary", children: "Open the menu to customise your table and search." }),
8044
- /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
8140
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_Typography.default, { variant: "subtitle2", fontSize: 16, children: "Customise your view" }),
8141
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_Typography.default, { variant: "subtitle1", align: "center", color: "textSecondary", children: "Open the menu to customise your table and search." }),
8142
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
8045
8143
  import_Typography.default,
8046
8144
  {
8047
8145
  variant: "subtitle1",
@@ -8054,18 +8152,18 @@ var TableDesktopNoColumnsMessage = ({
8054
8152
  },
8055
8153
  children: [
8056
8154
  "Tips: ",
8057
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_Typography.default, { component: "strong", children: "Save as default" }),
8155
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_Typography.default, { component: "strong", children: "Save as default" }),
8058
8156
  " to keep these columns for future views"
8059
8157
  ]
8060
8158
  }
8061
8159
  ),
8062
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
8160
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
8063
8161
  BaseIconButton,
8064
8162
  {
8065
8163
  variant: "contained",
8066
8164
  color: "primary",
8067
8165
  onClick: onClickNoColumnsMessageOpenMenu,
8068
- icon: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(IconTableEdit_default, { fill: colors.white }),
8166
+ icon: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(IconTableEdit_default, { fill: colors.white }),
8069
8167
  children: "OPEN MENU"
8070
8168
  }
8071
8169
  )
@@ -8074,7 +8172,7 @@ var TableDesktopNoColumnsMessage = ({
8074
8172
  ) }) });
8075
8173
 
8076
8174
  // src/components/TableDesktopRows/TableDesktopRows.tsx
8077
- var import_jsx_runtime125 = require("react/jsx-runtime");
8175
+ var import_jsx_runtime126 = require("react/jsx-runtime");
8078
8176
  var descendingComparator2 = (a, b, orderBy) => {
8079
8177
  const objA = a[orderBy];
8080
8178
  const objB = b[orderBy];
@@ -8120,7 +8218,7 @@ var TableDesktopRows = ({
8120
8218
  const sortedData = disableInternalSort ? data : stableSort2(data, getComparator(order, orderBy));
8121
8219
  return sortedData.map((row, index) => {
8122
8220
  const isItemSelected = selectedRows.has(row[keyField]);
8123
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
8221
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
8124
8222
  RenderItem,
8125
8223
  {
8126
8224
  ...{
@@ -8142,8 +8240,8 @@ var TableDesktopRows = ({
8142
8240
  };
8143
8241
 
8144
8242
  // src/components/TableDesktopRowSelectionBar/TableDesktopRowSelectionBar.tsx
8145
- var import_material71 = require("@mui/material");
8146
- var import_jsx_runtime126 = require("react/jsx-runtime");
8243
+ var import_material72 = require("@mui/material");
8244
+ var import_jsx_runtime127 = require("react/jsx-runtime");
8147
8245
  var TableDesktopRowSelectionBar = ({
8148
8246
  isEveryRowInPageSelected,
8149
8247
  isRowsFromAllPagesSelected,
@@ -8162,8 +8260,8 @@ var TableDesktopRowSelectionBar = ({
8162
8260
  }
8163
8261
  return `${numSelectedRows} row${numSelectedRows > 1 ? "s" : ""} selected.`;
8164
8262
  };
8165
- return isAnyRowSelected ? /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
8166
- import_material71.Box,
8263
+ return isAnyRowSelected ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
8264
+ import_material72.Box,
8167
8265
  {
8168
8266
  sx: {
8169
8267
  p: 1,
@@ -8175,22 +8273,22 @@ var TableDesktopRowSelectionBar = ({
8175
8273
  backgroundColor: colors.neutral150
8176
8274
  },
8177
8275
  children: [
8178
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material71.Typography, { children: getSelectedRowsText() }),
8179
- !isRowsFromAllPagesSelected ? /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material71.Button, { onClick: onSelectRowsFromAllPagesClick, children: [
8276
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material72.Typography, { children: getSelectedRowsText() }),
8277
+ !isRowsFromAllPagesSelected ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material72.Button, { onClick: onSelectRowsFromAllPagesClick, children: [
8180
8278
  "Select all ",
8181
8279
  totalRowCount,
8182
8280
  " rows from all pages based on your filters"
8183
8281
  ] }) : null,
8184
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material71.Button, { onClick: onClearSelectionClick, children: "Clear Selection" })
8282
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material72.Button, { onClick: onClearSelectionClick, children: "Clear Selection" })
8185
8283
  ]
8186
8284
  }
8187
8285
  ) : null;
8188
8286
  };
8189
8287
 
8190
8288
  // src/components/TableEmptyResult/TableEmptyResult.tsx
8191
- var import_material72 = require("@mui/material");
8289
+ var import_material73 = require("@mui/material");
8192
8290
  var import_mui53 = require("tss-react/mui");
8193
- var import_jsx_runtime127 = require("react/jsx-runtime");
8291
+ var import_jsx_runtime128 = require("react/jsx-runtime");
8194
8292
  var useStyles47 = (0, import_mui53.makeStyles)()(() => ({
8195
8293
  tableCellIcon: { padding: 24, height: "calc(100vh - 320px)" },
8196
8294
  tableCellDefault: { padding: 24 }
@@ -8202,17 +8300,17 @@ var TableEmptyResult = ({
8202
8300
  }
8203
8301
  }) => {
8204
8302
  const { classes } = useStyles47();
8205
- return showClearFilterButton ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material72.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
8206
- import_material72.TableCell,
8303
+ return showClearFilterButton ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material73.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
8304
+ import_material73.TableCell,
8207
8305
  {
8208
8306
  className: classes.tableCellIcon,
8209
8307
  colSpan,
8210
8308
  align: "center",
8211
8309
  children: [
8212
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(EmptyGlassIcon_default, {}),
8213
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material72.Typography, { variant: "h6", children: "No results found." }),
8214
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material72.Typography, { variant: "subtitle1", children: "Search without applied filters?" }),
8215
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
8310
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(EmptyGlassIcon_default, {}),
8311
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material73.Typography, { variant: "h6", children: "No results found." }),
8312
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material73.Typography, { variant: "subtitle1", children: "Search without applied filters?" }),
8313
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8216
8314
  FilledButton_default,
8217
8315
  {
8218
8316
  copy: "Search",
@@ -8223,8 +8321,8 @@ var TableEmptyResult = ({
8223
8321
  )
8224
8322
  ]
8225
8323
  }
8226
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material72.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
8227
- import_material72.TableCell,
8324
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material73.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8325
+ import_material73.TableCell,
8228
8326
  {
8229
8327
  className: classes.tableCellDefault,
8230
8328
  colSpan,
@@ -8236,7 +8334,7 @@ var TableEmptyResult = ({
8236
8334
  var TableEmptyResult_default = TableEmptyResult;
8237
8335
 
8238
8336
  // src/components/TableDesktop/TableDesktop.tsx
8239
- var import_jsx_runtime128 = require("react/jsx-runtime");
8337
+ var import_jsx_runtime129 = require("react/jsx-runtime");
8240
8338
  var TableDesktop = ({
8241
8339
  data = [],
8242
8340
  headCells,
@@ -8263,24 +8361,24 @@ var TableDesktop = ({
8263
8361
  shouldShowCheckOnFilter,
8264
8362
  refetchData
8265
8363
  }) => {
8266
- const tableToolbarMenuButtonRef = (0, import_react40.useRef)(null);
8267
- const [tableToolbarMenuAnchor, setTableToolbarMenuAnchor] = (0, import_react40.useState)(null);
8268
- const [order, setOrder] = (0, import_react40.useState)(appliedFilters?.sortDir || "desc");
8269
- const [orderBy, setOrderBy] = (0, import_react40.useState)(
8364
+ const tableToolbarMenuButtonRef = (0, import_react41.useRef)(null);
8365
+ const [tableToolbarMenuAnchor, setTableToolbarMenuAnchor] = (0, import_react41.useState)(null);
8366
+ const [order, setOrder] = (0, import_react41.useState)(appliedFilters?.sortDir || "desc");
8367
+ const [orderBy, setOrderBy] = (0, import_react41.useState)(
8270
8368
  appliedFilters?.sortField || "delivery_date"
8271
8369
  );
8272
- const [selectedRows, setSelectedRows] = (0, import_react40.useState)(
8370
+ const [selectedRows, setSelectedRows] = (0, import_react41.useState)(
8273
8371
  /* @__PURE__ */ new Set()
8274
8372
  );
8275
- const [isRowsFromAllPagesSelected, setIsRowsFromAllPagesSelected] = (0, import_react40.useState)(false);
8276
- const [isBulkChangesMode, setIsBulkChangesMode] = (0, import_react40.useState)(false);
8373
+ const [isRowsFromAllPagesSelected, setIsRowsFromAllPagesSelected] = (0, import_react41.useState)(false);
8374
+ const [isBulkChangesMode, setIsBulkChangesMode] = (0, import_react41.useState)(false);
8277
8375
  const numRows = data.length;
8278
- const numSelectedRows = (0, import_react40.useMemo)(() => {
8376
+ const numSelectedRows = (0, import_react41.useMemo)(() => {
8279
8377
  const currentPageIds = new Set(data.map((row) => row[keyField]));
8280
8378
  return [...selectedRows].filter((id) => currentPageIds.has(id)).length;
8281
8379
  }, [data, selectedRows, keyField]);
8282
8380
  const isEveryRowInPageSelected = numRows > 0 && numSelectedRows === numRows;
8283
- const visibleHeadCells = (0, import_react40.useMemo)(
8381
+ const visibleHeadCells = (0, import_react41.useMemo)(
8284
8382
  () => headCells.filter((headCell) => headCell?.enabled ?? true),
8285
8383
  [headCells]
8286
8384
  );
@@ -8343,7 +8441,7 @@ var TableDesktop = ({
8343
8441
  resetSelectedRows();
8344
8442
  }
8345
8443
  };
8346
- (0, import_react40.useEffect)(() => {
8444
+ (0, import_react41.useEffect)(() => {
8347
8445
  if (isRowsFromAllPagesSelected) {
8348
8446
  selectAllRowsInPage();
8349
8447
  selectAllRowsInPage();
@@ -8351,7 +8449,7 @@ var TableDesktop = ({
8351
8449
  }, [isRowsFromAllPagesSelected, data]);
8352
8450
  const renderBody = () => {
8353
8451
  if (isLoading) {
8354
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8452
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8355
8453
  TableDesktopLoadingState,
8356
8454
  {
8357
8455
  numRows: Math.min(rowsPerPage, 10),
@@ -8361,7 +8459,7 @@ var TableDesktop = ({
8361
8459
  );
8362
8460
  }
8363
8461
  if (numRows === 0) {
8364
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8462
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8365
8463
  TableEmptyResult_default,
8366
8464
  {
8367
8465
  showClearFilterButton,
@@ -8370,7 +8468,7 @@ var TableDesktop = ({
8370
8468
  }
8371
8469
  );
8372
8470
  }
8373
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8471
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8374
8472
  TableDesktopRows,
8375
8473
  {
8376
8474
  data,
@@ -8389,8 +8487,8 @@ var TableDesktop = ({
8389
8487
  }
8390
8488
  );
8391
8489
  };
8392
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8393
- import_material73.Box,
8490
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8491
+ import_material74.Box,
8394
8492
  {
8395
8493
  sx: {
8396
8494
  height,
@@ -8398,8 +8496,8 @@ var TableDesktop = ({
8398
8496
  justifyContent: "space-between",
8399
8497
  justifyItems: "stretch"
8400
8498
  },
8401
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
8402
- import_material73.Paper,
8499
+ children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
8500
+ import_material74.Paper,
8403
8501
  {
8404
8502
  sx: {
8405
8503
  width: "100%",
@@ -8423,7 +8521,7 @@ var TableDesktop = ({
8423
8521
  isBulkChangesMode,
8424
8522
  onChangeBulkChangesMode: handleChangeBulkChangesMode
8425
8523
  }) : null,
8426
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8524
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8427
8525
  TableDesktopRowSelectionBar,
8428
8526
  {
8429
8527
  isEveryRowInPageSelected,
@@ -8434,8 +8532,8 @@ var TableDesktop = ({
8434
8532
  onClearSelectionClick: handleClearSelectionClick
8435
8533
  }
8436
8534
  ),
8437
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8438
- import_material73.TableContainer,
8535
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8536
+ import_material74.TableContainer,
8439
8537
  {
8440
8538
  sx: {
8441
8539
  flexGrow: 1,
@@ -8456,13 +8554,13 @@ var TableDesktop = ({
8456
8554
  backgroundColor: (theme) => theme.palette.grey[500]
8457
8555
  }
8458
8556
  },
8459
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material73.Table, { stickyHeader: true, "aria-label": "sticky-table", sx: { tableLayout }, children: visibleHeadCells.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8557
+ children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material74.Table, { stickyHeader: true, "aria-label": "sticky-table", sx: { tableLayout }, children: visibleHeadCells.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8460
8558
  TableDesktopNoColumnsMessage,
8461
8559
  {
8462
8560
  onClickNoColumnsMessageOpenMenu: handleClickToolbarMenuOpen
8463
8561
  }
8464
- ) : /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
8465
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8562
+ ) : /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_jsx_runtime129.Fragment, { children: [
8563
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8466
8564
  SmartTableHeader,
8467
8565
  {
8468
8566
  order,
@@ -8478,7 +8576,7 @@ var TableDesktop = ({
8478
8576
  shouldShowCheckOnFilter
8479
8577
  }
8480
8578
  ),
8481
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material73.TableBody, { children: renderBody() })
8579
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material74.TableBody, { children: renderBody() })
8482
8580
  ] }) })
8483
8581
  }
8484
8582
  ),
@@ -8495,99 +8593,141 @@ var TableDesktop = ({
8495
8593
  };
8496
8594
 
8497
8595
  // src/components/TableDesktopEditableField/TableDesktopEditableField.tsx
8498
- var import_material75 = require("@mui/material");
8596
+ var import_react45 = require("react");
8597
+ var import_Delete = __toESM(require("@mui/icons-material/Delete"), 1);
8598
+ var import_material76 = require("@mui/material");
8599
+ var import_x_date_pickers = require("@mui/x-date-pickers");
8600
+ var import_moment3 = __toESM(require("moment"), 1);
8499
8601
 
8500
- // src/components/TableDesktopEditableField/TableDesktopSmartSelect.tsx
8501
- var import_react41 = require("react");
8502
- var import_jsx_runtime129 = require("react/jsx-runtime");
8503
- var TableDesktopSmartSelect = (0, import_react41.memo)(
8504
- ({
8505
- ref,
8506
- initialValue,
8507
- inputLabel,
8508
- field,
8509
- fieldName,
8510
- rowId,
8511
- disabled,
8512
- variant = "standard",
8513
- size,
8514
- filterOptions,
8515
- refetchFilterOptions,
8516
- isFetchingFilterOptions,
8517
- onUpdateEditableCell
8518
- }) => {
8519
- const [value, setValue] = (0, import_react41.useState)(
8520
- initialValue
8521
- );
8522
- const [options, setOptions] = (0, import_react41.useState)();
8523
- const valueId = resolveObjectType(value, "id");
8524
- const valueLabel = resolveObjectType(value, fieldName);
8525
- (0, import_react41.useEffect)(() => {
8526
- if (filterOptions) {
8527
- const parsedOptions = filterOptions?.map(
8528
- (option) => ({
8529
- value: resolveObjectType(option, "id"),
8530
- label: String(resolveObjectType(option, fieldName))
8531
- })
8532
- );
8533
- setOptions(parsedOptions);
8534
- }
8535
- }, [filterOptions]);
8536
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8537
- SmartSelect_default,
8538
- {
8539
- ref,
8540
- value: valueId,
8541
- inputLabel,
8542
- options,
8543
- disabled,
8544
- variant,
8545
- size,
8546
- refetch: refetchFilterOptions,
8547
- isFetching: isFetchingFilterOptions,
8548
- defaultOption: {
8549
- value: valueId ?? "",
8550
- label: String(valueLabel ?? "")
8551
- },
8552
- onChange: ({ value: id, label: name }) => {
8553
- if (!id || !name) {
8554
- return;
8555
- }
8556
- setValue({ id, name });
8557
- if (!onUpdateEditableCell) {
8558
- return;
8559
- }
8560
- onUpdateEditableCell(rowId ?? 0, field, id, name);
8602
+ // src/components/TableDesktopEditableField/TableDesktopSmartMultipleSelect.tsx
8603
+ var import_react42 = require("react");
8604
+ var import_jsx_runtime130 = require("react/jsx-runtime");
8605
+ var TableDesktopSmartMultipleSelect = ({
8606
+ initialValue,
8607
+ inputLabel,
8608
+ columnId,
8609
+ fieldName,
8610
+ rowId,
8611
+ disabled,
8612
+ variant = "standard",
8613
+ size,
8614
+ filterOptions,
8615
+ refetchFilterOptions,
8616
+ isFetchingFilterOptions,
8617
+ onUpdateEditableCell
8618
+ }) => {
8619
+ const defaultValues = (0, import_react42.useMemo)(() => {
8620
+ return initialValue.map((val) => ({
8621
+ value: val.id,
8622
+ label: val[fieldName].toString()
8623
+ }));
8624
+ }, [initialValue]);
8625
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8626
+ SmartMultipleSelect,
8627
+ {
8628
+ inputLabel,
8629
+ size,
8630
+ variant,
8631
+ disabled,
8632
+ defaultValues,
8633
+ menuOptions: filterOptions,
8634
+ isLoading: isFetchingFilterOptions,
8635
+ onOpen: () => {
8636
+ if (!filterOptions?.length) {
8637
+ refetchFilterOptions?.();
8561
8638
  }
8639
+ },
8640
+ onClose: (values) => {
8641
+ const optionsValues = values.map((option) => option.value ?? "");
8642
+ onUpdateEditableCell?.({
8643
+ rowId,
8644
+ columnId,
8645
+ value: optionsValues,
8646
+ label: optionsValues
8647
+ });
8562
8648
  }
8563
- );
8564
- }
8565
- );
8649
+ }
8650
+ );
8651
+ };
8652
+
8653
+ // src/components/TableDesktopEditableField/TableDesktopSmartSelect.tsx
8654
+ var import_react43 = require("react");
8655
+ var import_jsx_runtime131 = require("react/jsx-runtime");
8656
+ var TableDesktopSmartSelect = ({
8657
+ ref,
8658
+ initialValue,
8659
+ inputLabel,
8660
+ columnId,
8661
+ fieldName,
8662
+ rowId,
8663
+ disabled,
8664
+ variant = "standard",
8665
+ size,
8666
+ allowBlankOption,
8667
+ filterOptions,
8668
+ refetchFilterOptions,
8669
+ isFetchingFilterOptions,
8670
+ onUpdateEditableCell
8671
+ }) => {
8672
+ const [value, setValue] = (0, import_react43.useState)(
8673
+ initialValue
8674
+ );
8675
+ const valueId = resolveObjectType(value ?? "", "id");
8676
+ const valueLabel = resolveObjectType(value ?? "", fieldName);
8677
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8678
+ SmartSelect_default,
8679
+ {
8680
+ ref,
8681
+ value: valueId,
8682
+ allowBlankOption,
8683
+ inputLabel,
8684
+ options: filterOptions,
8685
+ disabled,
8686
+ variant,
8687
+ size,
8688
+ refetch: refetchFilterOptions,
8689
+ isFetching: isFetchingFilterOptions,
8690
+ defaultOption: {
8691
+ value: valueId ?? "",
8692
+ label: String(valueLabel ?? "")
8693
+ },
8694
+ onChange: ({ value: id, label }) => {
8695
+ setValue({ id: id ?? "", name: label ?? "" });
8696
+ onUpdateEditableCell?.({
8697
+ rowId,
8698
+ columnId,
8699
+ value: id || null,
8700
+ label: label ?? ""
8701
+ });
8702
+ }
8703
+ }
8704
+ );
8705
+ };
8566
8706
 
8567
8707
  // src/components/TableDesktopEditableField/TableDesktopTextField.tsx
8568
- var import_react42 = require("react");
8569
- var import_material74 = require("@mui/material");
8570
- var import_jsx_runtime130 = require("react/jsx-runtime");
8708
+ var import_react44 = require("react");
8709
+ var import_material75 = require("@mui/material");
8710
+ var import_jsx_runtime132 = require("react/jsx-runtime");
8571
8711
  var TableDesktopTextField = ({
8572
8712
  rowId,
8573
8713
  initialValue,
8574
8714
  inputLabel,
8575
8715
  disabled,
8576
- field,
8716
+ columnId,
8577
8717
  type,
8578
8718
  variant = "standard",
8579
8719
  size,
8580
8720
  validateInput,
8581
8721
  onUpdateEditableCell
8582
8722
  }) => {
8583
- const [input, setInput] = (0, import_react42.useState)(initialValue);
8584
- const oldValue = (0, import_react42.useRef)(initialValue);
8585
- const isDirty = (0, import_react42.useMemo)(
8723
+ const [input, setInput] = (0, import_react44.useState)(initialValue);
8724
+ const oldValue = (0, import_react44.useRef)(initialValue);
8725
+ const isDirty = (0, import_react44.useMemo)(
8586
8726
  () => input !== oldValue.current,
8587
8727
  [input, oldValue.current]
8588
8728
  );
8589
- const hasValidationError = (0, import_react42.useMemo)(
8590
- () => isDirty && !validateInput?.(input),
8729
+ const hasValidationError = (0, import_react44.useMemo)(
8730
+ () => isDirty && validateInput && !validateInput(input),
8591
8731
  [input, validateInput]
8592
8732
  );
8593
8733
  const commitValue = (value) => {
@@ -8596,7 +8736,7 @@ var TableDesktopTextField = ({
8596
8736
  return;
8597
8737
  }
8598
8738
  oldValue.current = value;
8599
- onUpdateEditableCell(rowId ?? 0, field, value, value);
8739
+ onUpdateEditableCell({ rowId, columnId, value, label: value });
8600
8740
  };
8601
8741
  const handleKeyDown = (e) => {
8602
8742
  if (e.key === "Enter") {
@@ -8604,8 +8744,8 @@ var TableDesktopTextField = ({
8604
8744
  commitValue(input);
8605
8745
  }
8606
8746
  };
8607
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8608
- import_material74.TextField,
8747
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8748
+ import_material75.TextField,
8609
8749
  {
8610
8750
  fullWidth: true,
8611
8751
  variant,
@@ -8627,6 +8767,9 @@ var TableDesktopTextField = ({
8627
8767
  slotProps: {
8628
8768
  input: {
8629
8769
  inputMode: type === "numeric" ? "numeric" : void 0
8770
+ },
8771
+ htmlInput: {
8772
+ maxLength: 1e3
8630
8773
  }
8631
8774
  }
8632
8775
  }
@@ -8634,63 +8777,98 @@ var TableDesktopTextField = ({
8634
8777
  };
8635
8778
 
8636
8779
  // src/components/TableDesktopEditableField/TableDesktopEditableField.tsx
8637
- var import_jsx_runtime131 = require("react/jsx-runtime");
8780
+ var import_jsx_runtime133 = require("react/jsx-runtime");
8638
8781
  var TableDesktopEditableField = ({
8639
8782
  editInitialValue,
8640
8783
  rowId,
8641
- field,
8642
- fieldName,
8643
8784
  disabled,
8644
- inputLabel,
8645
8785
  showCheckboxLabel = false,
8646
8786
  variant = "standard",
8647
8787
  size,
8648
- editableCellType,
8649
- filterOptions,
8650
- refetchFilterOptions,
8651
- isFetchingFilterOptions,
8652
- validateInput,
8653
- onUpdateEditableCell
8788
+ onUpdateEditableCell,
8789
+ headCell: {
8790
+ id: columnId,
8791
+ fieldName = "",
8792
+ label: inputLabel = "",
8793
+ editableCellType,
8794
+ filterOptions,
8795
+ refetchFilterOptions,
8796
+ isFetchingFilterOptions,
8797
+ validateInput,
8798
+ allowBlankSelectOption
8799
+ }
8654
8800
  }) => {
8801
+ const [parsedFilterOptions, setParsedFilterOptions] = (0, import_react45.useState)();
8802
+ (0, import_react45.useEffect)(() => {
8803
+ if (filterOptions && editableCellType === "select" || editableCellType === "multipleSelect") {
8804
+ const parsedOptions = filterOptions?.map(
8805
+ (option) => ({
8806
+ value: resolveObjectType(option, "id"),
8807
+ label: String(resolveObjectType(option, fieldName))
8808
+ })
8809
+ );
8810
+ setParsedFilterOptions(parsedOptions);
8811
+ }
8812
+ }, [filterOptions, editableCellType]);
8655
8813
  const editableComponents = {
8656
- select: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8814
+ select: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8657
8815
  TableDesktopSmartSelect,
8658
8816
  {
8659
8817
  rowId,
8660
- field,
8818
+ columnId,
8661
8819
  fieldName,
8662
8820
  disabled,
8663
8821
  variant,
8664
8822
  size,
8823
+ allowBlankOption: allowBlankSelectOption,
8665
8824
  initialValue: editInitialValue,
8666
8825
  inputLabel,
8667
- filterOptions,
8826
+ filterOptions: parsedFilterOptions,
8668
8827
  refetchFilterOptions,
8669
8828
  isFetchingFilterOptions,
8670
8829
  onUpdateEditableCell
8671
8830
  }
8672
8831
  ),
8673
- checkbox: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8674
- import_material75.FormControlLabel,
8832
+ multipleSelect: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8833
+ TableDesktopSmartMultipleSelect,
8834
+ {
8835
+ rowId,
8836
+ columnId,
8837
+ fieldName,
8838
+ disabled,
8839
+ variant,
8840
+ size,
8841
+ initialValue: editInitialValue,
8842
+ inputLabel,
8843
+ filterOptions: parsedFilterOptions,
8844
+ refetchFilterOptions,
8845
+ isFetchingFilterOptions,
8846
+ onUpdateEditableCell
8847
+ }
8848
+ ),
8849
+ checkbox: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8850
+ import_material76.FormControlLabel,
8675
8851
  {
8676
8852
  label: showCheckboxLabel ? inputLabel : "",
8677
- control: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8678
- import_material75.Checkbox,
8853
+ control: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8854
+ import_material76.Checkbox,
8679
8855
  {
8680
8856
  disableRipple: true,
8681
8857
  disabled,
8682
8858
  defaultChecked: editInitialValue,
8683
8859
  onChange: ({ target: { checked } }) => {
8684
- if (!onUpdateEditableCell) {
8685
- return;
8686
- }
8687
- onUpdateEditableCell(rowId ?? 0, field, checked, checked);
8860
+ onUpdateEditableCell?.({
8861
+ rowId,
8862
+ columnId,
8863
+ value: checked,
8864
+ label: checked
8865
+ });
8688
8866
  }
8689
8867
  }
8690
8868
  )
8691
8869
  }
8692
8870
  ),
8693
- text: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8871
+ text: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8694
8872
  TableDesktopTextField,
8695
8873
  {
8696
8874
  type: "text",
@@ -8698,14 +8876,14 @@ var TableDesktopEditableField = ({
8698
8876
  disabled,
8699
8877
  variant,
8700
8878
  size,
8701
- field,
8879
+ columnId,
8702
8880
  initialValue: editInitialValue ?? "",
8703
8881
  inputLabel: inputLabel ?? "",
8704
8882
  validateInput,
8705
8883
  onUpdateEditableCell
8706
8884
  }
8707
8885
  ),
8708
- numeric: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8886
+ numeric: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8709
8887
  TableDesktopTextField,
8710
8888
  {
8711
8889
  type: "numeric",
@@ -8713,21 +8891,80 @@ var TableDesktopEditableField = ({
8713
8891
  disabled,
8714
8892
  variant,
8715
8893
  size,
8716
- field,
8894
+ columnId,
8717
8895
  initialValue: editInitialValue ?? "",
8718
8896
  inputLabel: inputLabel ?? "",
8719
8897
  validateInput,
8720
8898
  onUpdateEditableCell
8721
8899
  }
8900
+ ),
8901
+ date: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8902
+ import_x_date_pickers.DatePicker,
8903
+ {
8904
+ defaultValue: (0, import_moment3.default)(editInitialValue),
8905
+ label: inputLabel,
8906
+ format: "DD/MM/YYYY",
8907
+ sx: { overflowY: "hidden" },
8908
+ onAccept: (value) => {
8909
+ const formattedValue = value?.format("YYYY-MM-DD") ?? null;
8910
+ const formattedLabel = value?.format("DD/MM/YYYY") ?? null;
8911
+ onUpdateEditableCell?.({
8912
+ rowId,
8913
+ columnId,
8914
+ value: formattedValue,
8915
+ label: formattedLabel
8916
+ });
8917
+ },
8918
+ slots: { clearIcon: import_Delete.default },
8919
+ slotProps: {
8920
+ field: { clearable: true },
8921
+ clearButton: { sx: { p: 0.5 } },
8922
+ openPickerButton: { sx: { p: 0 } },
8923
+ textField: {
8924
+ variant: "standard",
8925
+ error: false
8926
+ }
8927
+ }
8928
+ }
8929
+ ),
8930
+ time: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8931
+ import_x_date_pickers.TimePicker,
8932
+ {
8933
+ defaultValue: (0, import_moment3.default)(editInitialValue, "HH:mm:ss"),
8934
+ label: inputLabel,
8935
+ sx: { overflowY: "hidden" },
8936
+ onAccept: (value) => {
8937
+ const formattedValue = value?.format("HH:mm") ?? null;
8938
+ onUpdateEditableCell?.({
8939
+ rowId,
8940
+ columnId,
8941
+ value: formattedValue,
8942
+ label: formattedValue
8943
+ });
8944
+ },
8945
+ slots: { clearIcon: import_Delete.default },
8946
+ slotProps: {
8947
+ field: { clearable: true },
8948
+ clearButton: { sx: { p: 0.5 } },
8949
+ openPickerButton: { sx: { p: 0 } },
8950
+ textField: {
8951
+ variant: "standard",
8952
+ error: false
8953
+ }
8954
+ }
8955
+ }
8722
8956
  )
8723
8957
  };
8958
+ if (!editableCellType) {
8959
+ return null;
8960
+ }
8724
8961
  return editableComponents[editableCellType];
8725
8962
  };
8726
8963
 
8727
8964
  // src/components/TableDesktopFooter/TableDesktopFooter.tsx
8728
8965
  var import_Refresh = __toESM(require("@mui/icons-material/Refresh"), 1);
8729
- var import_material76 = require("@mui/material");
8730
- var import_jsx_runtime132 = require("react/jsx-runtime");
8966
+ var import_material77 = require("@mui/material");
8967
+ var import_jsx_runtime134 = require("react/jsx-runtime");
8731
8968
  var TableDesktopFooter = ({
8732
8969
  numPages,
8733
8970
  page,
@@ -8738,8 +8975,8 @@ var TableDesktopFooter = ({
8738
8975
  refetchData,
8739
8976
  isFetching
8740
8977
  }) => {
8741
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
8742
- import_material76.Box,
8978
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
8979
+ import_material77.Box,
8743
8980
  {
8744
8981
  sx: {
8745
8982
  py: 1,
@@ -8750,8 +8987,8 @@ var TableDesktopFooter = ({
8750
8987
  borderTop: `1px solid ${colors.neutral300}`
8751
8988
  },
8752
8989
  children: [
8753
- refetchData ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
8754
- import_material76.Button,
8990
+ refetchData ? /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
8991
+ import_material77.Button,
8755
8992
  {
8756
8993
  disableRipple: true,
8757
8994
  variant: "outlined",
@@ -8765,7 +9002,7 @@ var TableDesktopFooter = ({
8765
9002
  borderColor: colors.neutral600
8766
9003
  },
8767
9004
  children: [
8768
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
9005
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
8769
9006
  import_Refresh.default,
8770
9007
  {
8771
9008
  fontSize: "small",
@@ -8776,22 +9013,22 @@ var TableDesktopFooter = ({
8776
9013
  ]
8777
9014
  }
8778
9015
  ) : null,
8779
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material76.Box, { sx: { display: "flex", ml: "auto", py: 1 }, children: [
8780
- pageSize && pageSizeOptions && onPageSizeChange ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material76.Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
8781
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material76.Typography, { children: "Rows per page:" }),
8782
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8783
- import_material76.Select,
9016
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material77.Box, { sx: { display: "flex", ml: "auto", py: 1 }, children: [
9017
+ pageSize && pageSizeOptions && onPageSizeChange ? /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material77.Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
9018
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material77.Typography, { children: "Rows per page:" }),
9019
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9020
+ import_material77.Select,
8784
9021
  {
8785
9022
  value: pageSize,
8786
9023
  onChange: onPageSizeChange,
8787
9024
  size: "small",
8788
9025
  variant: "standard",
8789
- children: pageSizeOptions.map((pageSizeOption) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material76.MenuItem, { value: pageSizeOption, children: pageSizeOption }, pageSizeOption))
9026
+ children: pageSizeOptions.map((pageSizeOption) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material77.MenuItem, { value: pageSizeOption, children: pageSizeOption }, pageSizeOption))
8790
9027
  }
8791
9028
  )
8792
9029
  ] }) : null,
8793
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8794
- import_material76.Pagination,
9030
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9031
+ import_material77.Pagination,
8795
9032
  {
8796
9033
  color: "standard",
8797
9034
  count: numPages,
@@ -8806,15 +9043,15 @@ var TableDesktopFooter = ({
8806
9043
  };
8807
9044
 
8808
9045
  // src/components/TableDesktopCell/TableDesktopCell.tsx
8809
- var import_react43 = require("react");
9046
+ var import_react46 = require("react");
8810
9047
  var import_Check3 = __toESM(require("@mui/icons-material/Check"), 1);
8811
9048
  var import_Close = __toESM(require("@mui/icons-material/Close"), 1);
8812
9049
  var import_Edit = __toESM(require("@mui/icons-material/Edit"), 1);
8813
- var import_material77 = require("@mui/material");
8814
- var import_jsx_runtime133 = require("react/jsx-runtime");
9050
+ var import_material78 = require("@mui/material");
9051
+ var import_jsx_runtime135 = require("react/jsx-runtime");
8815
9052
  var getReadOnlyBooleanIcon = (value) => {
8816
9053
  if (value) {
8817
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_Check3.default, { sx: { fontSize: 16 } });
9054
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_Check3.default, { sx: { fontSize: 16 } });
8818
9055
  }
8819
9056
  return "-";
8820
9057
  };
@@ -8828,36 +9065,28 @@ var getCellBackgroundColor = (isCellInEditMode) => ({
8828
9065
  background: isCellInEditMode ? colors.lightBlueBackground : colors.neutral100
8829
9066
  });
8830
9067
  var TableDesktopCell = ({
8831
- inputLabel,
8832
9068
  editInitialValue,
8833
9069
  rowId,
8834
- field,
8835
- fieldName,
8836
- width,
8837
- enableEditMode,
8838
9070
  disabled,
9071
+ enableEditMode,
8839
9072
  readOnlyValue,
8840
- editableCellType,
8841
- filterOptions,
8842
- refetchFilterOptions,
8843
- isFetchingFilterOptions,
8844
- validateInput,
8845
- onUpdateEditableCell,
8846
- onCellClick
9073
+ onCellClick,
9074
+ headCell
8847
9075
  }) => {
8848
- const [isCellHovered, setIsCellHovered] = (0, import_react43.useState)(false);
8849
- const [isCellInEditMode, setIsCellInEditMode] = (0, import_react43.useState)(false);
8850
- (0, import_react43.useEffect)(() => {
9076
+ const [isCellHovered, setIsCellHovered] = (0, import_react46.useState)(false);
9077
+ const [isCellInEditMode, setIsCellInEditMode] = (0, import_react46.useState)(false);
9078
+ const { width, editableCellType } = headCell;
9079
+ (0, import_react46.useEffect)(() => {
8851
9080
  const handleKeyDown = (e) => {
8852
9081
  if (e.key === "Escape") {
8853
9082
  setIsCellInEditMode(false);
8854
9083
  }
8855
9084
  };
8856
9085
  if (isCellInEditMode) {
8857
- window.addEventListener("keydown", handleKeyDown);
9086
+ globalThis.addEventListener("keydown", handleKeyDown);
8858
9087
  }
8859
9088
  return () => {
8860
- window.removeEventListener("keydown", handleKeyDown);
9089
+ globalThis.removeEventListener("keydown", handleKeyDown);
8861
9090
  };
8862
9091
  }, [isCellInEditMode]);
8863
9092
  const handleEditClick = (e) => {
@@ -8865,8 +9094,8 @@ var TableDesktopCell = ({
8865
9094
  setIsCellInEditMode((prev) => !prev);
8866
9095
  };
8867
9096
  const isCellEditable = !!enableEditMode && !!editableCellType && !disabled;
8868
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8869
- import_material77.TableCell,
9097
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9098
+ import_material78.TableCell,
8870
9099
  {
8871
9100
  align: "left",
8872
9101
  onMouseEnter: () => isCellEditable && setIsCellHovered(true),
@@ -8881,9 +9110,9 @@ var TableDesktopCell = ({
8881
9110
  ":hover": isCellEditable ? getCellBackgroundColor(isCellInEditMode) : void 0,
8882
9111
  background: enableEditMode && isCellInEditMode ? colors.lightBlueBackground : void 0
8883
9112
  },
8884
- children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(DynamicOverflowTooltip, { tooltipDescription: String(readOnlyValue), arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
8885
- enableEditMode && isCellHovered ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material77.Tooltip, { title: isCellInEditMode ? "" : "Toggle Edit Mode", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8886
- import_material77.IconButton,
9113
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DynamicOverflowTooltip, { tooltipDescription: String(readOnlyValue), arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, { children: [
9114
+ enableEditMode && isCellHovered ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material78.Tooltip, { title: isCellInEditMode ? "" : "Toggle Edit Mode", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9115
+ import_material78.IconButton,
8887
9116
  {
8888
9117
  onClick: handleEditClick,
8889
9118
  sx: {
@@ -8897,24 +9126,17 @@ var TableDesktopCell = ({
8897
9126
  backgroundColor: isCellInEditMode ? colors.lightBlueBackground : colors.neutral150
8898
9127
  }
8899
9128
  },
8900
- children: isCellInEditMode ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_Close.default, { fontSize: "small", color: "error" }) : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_Edit.default, { fontSize: "small" })
9129
+ children: isCellInEditMode ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_Close.default, { fontSize: "small", color: "error" }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_Edit.default, { fontSize: "small" })
8901
9130
  }
8902
9131
  ) }) : null,
8903
- enableEditMode && isCellInEditMode && editableCellType ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
9132
+ enableEditMode && isCellInEditMode && editableCellType ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
8904
9133
  TableDesktopEditableField,
8905
9134
  {
8906
9135
  editInitialValue,
8907
9136
  rowId,
8908
- field,
8909
- fieldName,
8910
9137
  disabled,
8911
- inputLabel: inputLabel ?? "",
8912
- editableCellType,
8913
- filterOptions,
8914
- refetchFilterOptions,
8915
- isFetchingFilterOptions,
8916
- validateInput,
8917
- onUpdateEditableCell
9138
+ headCell,
9139
+ onUpdateEditableCell: headCell.onUpdateEditableCell
8918
9140
  }
8919
9141
  ) : renderReadOnlyValue(readOnlyValue)
8920
9142
  ] }) })
@@ -8923,12 +9145,12 @@ var TableDesktopCell = ({
8923
9145
  };
8924
9146
 
8925
9147
  // src/components/TableDesktopToolbar/TableDesktopToolbar.tsx
8926
- var import_react44 = require("react");
9148
+ var import_react47 = require("react");
8927
9149
  var import_Download = __toESM(require("@mui/icons-material/Download"), 1);
8928
9150
  var import_KeyboardArrowLeft2 = __toESM(require("@mui/icons-material/KeyboardArrowLeft"), 1);
8929
9151
  var import_KeyboardArrowRight2 = __toESM(require("@mui/icons-material/KeyboardArrowRight"), 1);
8930
- var import_material78 = require("@mui/material");
8931
- var import_jsx_runtime134 = require("react/jsx-runtime");
9152
+ var import_material79 = require("@mui/material");
9153
+ var import_jsx_runtime136 = require("react/jsx-runtime");
8932
9154
  var TableDesktopToolbar = ({
8933
9155
  toolbarLabel,
8934
9156
  headCells,
@@ -8950,12 +9172,12 @@ var TableDesktopToolbar = ({
8950
9172
  renderTableColumnConfigurationMenu,
8951
9173
  renderInfoIcons
8952
9174
  }) => {
8953
- const scrollRef = (0, import_react44.useRef)(null);
8954
- const [bulkChanges, setBulkChanges] = (0, import_react44.useState)([]);
8955
- const [isBulkChangesDialogOpen, setIsBulkChangesDialogOpen] = (0, import_react44.useState)(false);
8956
- const [isExportCsvDialogOpen, setIsExportCsvDialogOpen] = (0, import_react44.useState)(false);
8957
- const [resetCounter, setResetCounter] = (0, import_react44.useState)(0);
8958
- const visibleEditableColumns = (0, import_react44.useMemo)(
9175
+ const scrollRef = (0, import_react47.useRef)(null);
9176
+ const [bulkChanges, setBulkChanges] = (0, import_react47.useState)([]);
9177
+ const [isBulkChangesDialogOpen, setIsBulkChangesDialogOpen] = (0, import_react47.useState)(false);
9178
+ const [isExportCsvDialogOpen, setIsExportCsvDialogOpen] = (0, import_react47.useState)(false);
9179
+ const [resetCounter, setResetCounter] = (0, import_react47.useState)(0);
9180
+ const visibleEditableColumns = (0, import_react47.useMemo)(
8959
9181
  () => headCells.filter(
8960
9182
  (headCell) => headCell?.enabled && !!headCell?.editableCellType
8961
9183
  ),
@@ -8972,13 +9194,17 @@ var TableDesktopToolbar = ({
8972
9194
  refetchData?.();
8973
9195
  }
8974
9196
  };
8975
- const handleUpdateEditableCell = (_rowId, field, value, label) => {
9197
+ const handleUpdateEditableCell = ({
9198
+ columnId,
9199
+ value,
9200
+ label
9201
+ }) => {
8976
9202
  setBulkChanges((prev) => {
8977
- return [...prev, { field, value, label }];
9203
+ return [...prev, { field: columnId, value, label }];
8978
9204
  });
8979
9205
  };
8980
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
8981
- import_material78.Box,
9206
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
9207
+ import_material79.Box,
8982
9208
  {
8983
9209
  sx: {
8984
9210
  borderBottom: "1px solid",
@@ -8986,8 +9212,8 @@ var TableDesktopToolbar = ({
8986
9212
  maxWidth: "100%"
8987
9213
  },
8988
9214
  children: [
8989
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
8990
- import_material78.Box,
9215
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
9216
+ import_material79.Box,
8991
9217
  {
8992
9218
  sx: {
8993
9219
  py: 1,
@@ -8998,8 +9224,8 @@ var TableDesktopToolbar = ({
8998
9224
  background: isBulkChangesMode ? colors.neutral150 : void 0
8999
9225
  },
9000
9226
  children: [
9001
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
9002
- import_material78.Box,
9227
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
9228
+ import_material79.Box,
9003
9229
  {
9004
9230
  sx: {
9005
9231
  py: 1,
@@ -9009,21 +9235,21 @@ var TableDesktopToolbar = ({
9009
9235
  whiteSpace: "nowrap"
9010
9236
  },
9011
9237
  children: [
9012
- toolbarLabel ? /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
9013
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material78.Typography, { variant: "subtitle2", color: "textSecondary", children: toolbarLabel }),
9014
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material78.Divider, { orientation: "vertical", sx: { height: 0.75, py: 2.5 } })
9238
+ toolbarLabel ? /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, { children: [
9239
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material79.Typography, { variant: "subtitle2", color: "textSecondary", children: toolbarLabel }),
9240
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material79.Divider, { orientation: "vertical", sx: { height: 0.75, py: 2.5 } })
9015
9241
  ] }) : null,
9016
- renderBulkChangesDialog && refetchData ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9017
- import_material78.Tooltip,
9242
+ renderBulkChangesDialog && refetchData ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9243
+ import_material79.Tooltip,
9018
9244
  {
9019
9245
  title: disableBulkChangesMode ? "Access denied, you don\u2019t have permission to use this feature." : "",
9020
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9021
- import_material78.FormControlLabel,
9246
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9247
+ import_material79.FormControlLabel,
9022
9248
  {
9023
9249
  label: "Bulk Changes Mode",
9024
9250
  disabled: disableBulkChangesMode || !visibleEditableColumns.length,
9025
- control: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9026
- import_material78.Switch,
9251
+ control: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9252
+ import_material79.Switch,
9027
9253
  {
9028
9254
  size: "small",
9029
9255
  "aria-label": "bulk-changes-mode-switch",
@@ -9037,17 +9263,17 @@ var TableDesktopToolbar = ({
9037
9263
  ]
9038
9264
  }
9039
9265
  ),
9040
- isScrollable && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9041
- import_material78.IconButton,
9266
+ isScrollable && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9267
+ import_material79.IconButton,
9042
9268
  {
9043
9269
  "aria-label": "scroll-left",
9044
9270
  sx: { padding: 0, alignSelf: "center" },
9045
9271
  onClick: () => scroll("left"),
9046
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_KeyboardArrowLeft2.default, {})
9272
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_KeyboardArrowLeft2.default, {})
9047
9273
  }
9048
9274
  ),
9049
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9050
- import_material78.Box,
9275
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9276
+ import_material79.Box,
9051
9277
  {
9052
9278
  ref: scrollRef,
9053
9279
  sx: {
@@ -9063,56 +9289,40 @@ var TableDesktopToolbar = ({
9063
9289
  display: "none"
9064
9290
  }
9065
9291
  },
9066
- children: isBulkChangesMode ? visibleEditableColumns.map(
9067
- ({
9068
- id,
9069
- fieldName,
9070
- label,
9071
- editableCellType,
9072
- filterOptions,
9073
- refetchFilterOptions,
9074
- isFetchingFilterOptions,
9075
- validateInput,
9076
- width
9077
- }) => editableCellType && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9078
- import_material78.Box,
9292
+ children: isBulkChangesMode ? visibleEditableColumns.map((headCell) => {
9293
+ const { id, width, editableCellType } = headCell;
9294
+ return editableCellType && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9295
+ import_material79.Box,
9079
9296
  {
9080
9297
  sx: { width, flex: "0 0 auto" },
9081
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9298
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9082
9299
  TableDesktopEditableField,
9083
9300
  {
9084
- field: id,
9301
+ headCell,
9085
9302
  size: "small",
9086
9303
  variant: "outlined",
9087
9304
  showCheckboxLabel: true,
9088
- fieldName: fieldName ?? "",
9089
- inputLabel: label ?? "",
9090
- editableCellType,
9091
- filterOptions,
9092
- refetchFilterOptions,
9093
- isFetchingFilterOptions,
9094
- validateInput,
9095
9305
  onUpdateEditableCell: handleUpdateEditableCell
9096
9306
  }
9097
9307
  )
9098
9308
  },
9099
9309
  `${id}-${resetCounter}`
9100
- )
9101
- ) : null
9310
+ );
9311
+ }) : null
9102
9312
  }
9103
9313
  ),
9104
- isScrollable && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9105
- import_material78.IconButton,
9314
+ isScrollable && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9315
+ import_material79.IconButton,
9106
9316
  {
9107
9317
  "aria-label": "scroll-right",
9108
9318
  sx: { p: 0, alignSelf: "center" },
9109
9319
  onClick: () => scroll("right"),
9110
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_KeyboardArrowRight2.default, {})
9320
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_KeyboardArrowRight2.default, {})
9111
9321
  }
9112
9322
  ),
9113
- isBulkChangesMode ? /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
9114
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9115
- import_material78.Button,
9323
+ isBulkChangesMode ? /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, { children: [
9324
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9325
+ import_material79.Button,
9116
9326
  {
9117
9327
  variant: "outlined",
9118
9328
  sx: { borderRadius: 25, alignSelf: "center" },
@@ -9124,8 +9334,8 @@ var TableDesktopToolbar = ({
9124
9334
  children: "RESET"
9125
9335
  }
9126
9336
  ),
9127
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9128
- import_material78.Button,
9337
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9338
+ import_material79.Button,
9129
9339
  {
9130
9340
  variant: "contained",
9131
9341
  "aria-label": "bulk-changes-apply-button",
@@ -9135,26 +9345,26 @@ var TableDesktopToolbar = ({
9135
9345
  children: "APPLY"
9136
9346
  }
9137
9347
  )
9138
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material78.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
9348
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material79.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
9139
9349
  renderInfoIcons,
9140
- renderExportCsvDialog ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material78.Tooltip, { title: "Download Customer List", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9141
- import_material78.IconButton,
9350
+ renderExportCsvDialog ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material79.Tooltip, { title: "Download Customer List", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9351
+ import_material79.IconButton,
9142
9352
  {
9143
9353
  disableRipple: true,
9144
9354
  disabled: isDataEmpty,
9145
9355
  "aria-label": "export-csv-button",
9146
9356
  onClick: () => setIsExportCsvDialogOpen(true),
9147
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_Download.default, { fill: colors.neutral750 })
9357
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_Download.default, { fill: colors.neutral750 })
9148
9358
  }
9149
9359
  ) }) }) : null,
9150
- renderTableColumnConfigurationMenu ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material78.Tooltip, { title: "Table Column Configuration", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9151
- import_material78.IconButton,
9360
+ renderTableColumnConfigurationMenu ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material79.Tooltip, { title: "Table Column Configuration", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9361
+ import_material79.IconButton,
9152
9362
  {
9153
9363
  disableRipple: true,
9154
9364
  "aria-label": "table-column-config-button",
9155
9365
  ref: tableToolbarMenuButtonRef,
9156
9366
  onClick: onClickToolbarMenuOpen,
9157
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(IconTableEdit_default, { fill: colors.neutral750 })
9367
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconTableEdit_default, { fill: colors.neutral750 })
9158
9368
  }
9159
9369
  ) }) : null
9160
9370
  ] })
@@ -9187,11 +9397,11 @@ var TableDesktopToolbar = ({
9187
9397
  };
9188
9398
 
9189
9399
  // src/components/TableHeader/TableHeader.tsx
9190
- var import_react45 = require("react");
9400
+ var import_react48 = require("react");
9191
9401
  var import_icons_material12 = require("@mui/icons-material");
9192
- var import_material79 = require("@mui/material");
9402
+ var import_material80 = require("@mui/material");
9193
9403
  var import_mui54 = require("tss-react/mui");
9194
- var import_jsx_runtime135 = require("react/jsx-runtime");
9404
+ var import_jsx_runtime137 = require("react/jsx-runtime");
9195
9405
  var useStyles48 = (0, import_mui54.makeStyles)()(() => ({
9196
9406
  sortLabel: {
9197
9407
  "& .MuiTableSortLabel-icon": {
@@ -9200,9 +9410,9 @@ var useStyles48 = (0, import_mui54.makeStyles)()(() => ({
9200
9410
  }
9201
9411
  }));
9202
9412
  var TableHeader = ({ cells, onSort = null }) => {
9203
- const [sortableCells, setSortableCells] = (0, import_react45.useState)([]);
9413
+ const [sortableCells, setSortableCells] = (0, import_react48.useState)([]);
9204
9414
  const { classes } = useStyles48();
9205
- (0, import_react45.useEffect)(() => {
9415
+ (0, import_react48.useEffect)(() => {
9206
9416
  setSortableCells(cells);
9207
9417
  }, []);
9208
9418
  const getNewSortDirection = (direction) => {
@@ -9236,8 +9446,8 @@ var TableHeader = ({ cells, onSort = null }) => {
9236
9446
  });
9237
9447
  setSortableCells(sortedCells);
9238
9448
  };
9239
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material79.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material79.TableRow, { children: sortableCells.map((cell, key) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material79.TableCell, { children: cell.isSortable ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9240
- import_material79.TableSortLabel,
9449
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material80.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material80.TableRow, { children: sortableCells.map((cell, key) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material80.TableCell, { children: cell.isSortable ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
9450
+ import_material80.TableSortLabel,
9241
9451
  {
9242
9452
  className: classes.sortLabel,
9243
9453
  direction: cell?.direction || "asc",
@@ -9247,12 +9457,12 @@ var TableHeader = ({ cells, onSort = null }) => {
9247
9457
  }
9248
9458
  ) : cell.label }, cell.label || key)) }) });
9249
9459
  };
9250
- var TableHeader_default = (0, import_react45.memo)(TableHeader);
9460
+ var TableHeader_default = (0, import_react48.memo)(TableHeader);
9251
9461
 
9252
9462
  // src/components/TextDivider/TextDivider.tsx
9253
- var import_material80 = require("@mui/material");
9463
+ var import_material81 = require("@mui/material");
9254
9464
  var import_mui55 = require("tss-react/mui");
9255
- var import_jsx_runtime136 = require("react/jsx-runtime");
9465
+ var import_jsx_runtime138 = require("react/jsx-runtime");
9256
9466
  var useStyles49 = (0, import_mui55.makeStyles)()(() => ({
9257
9467
  icon: {
9258
9468
  fontSize: 20
@@ -9289,19 +9499,19 @@ var TextDivider = ({
9289
9499
  }) => {
9290
9500
  const { classes } = useStyles49();
9291
9501
  const iconColor = color ?? colors.neutral900;
9292
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
9293
- import_material80.Box,
9502
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
9503
+ import_material81.Box,
9294
9504
  {
9295
9505
  display: "flex",
9296
9506
  alignItems: "center",
9297
9507
  justifyContent: "space-between",
9298
9508
  className: classes.container,
9299
9509
  children: [
9300
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material80.Divider, { className: classes.leftDivider }),
9301
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material80.Button, { onClick, disabled: !onClick, className: classes.button, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material80.Box, { className: classes.center, children: [
9302
- Icon2 && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Icon2, { className: classes.icon, style: { color: iconColor } }),
9303
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9304
- import_material80.Typography,
9510
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material81.Divider, { className: classes.leftDivider }),
9511
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material81.Button, { onClick, disabled: !onClick, className: classes.button, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material81.Box, { className: classes.center, children: [
9512
+ Icon2 && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon2, { className: classes.icon, style: { color: iconColor } }),
9513
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9514
+ import_material81.Typography,
9305
9515
  {
9306
9516
  color: "textSecondary",
9307
9517
  className: classes.title,
@@ -9309,9 +9519,9 @@ var TextDivider = ({
9309
9519
  children: title
9310
9520
  }
9311
9521
  ),
9312
- Icon2 && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Icon2, { className: classes.icon, style: { color: iconColor } })
9522
+ Icon2 && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon2, { className: classes.icon, style: { color: iconColor } })
9313
9523
  ] }) }),
9314
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material80.Divider, { className: classes.rightDivider })
9524
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material81.Divider, { className: classes.rightDivider })
9315
9525
  ]
9316
9526
  }
9317
9527
  );
@@ -9323,7 +9533,7 @@ var import_react_dates = require("react-dates");
9323
9533
  var import_mui56 = require("tss-react/mui");
9324
9534
  var import_initialize = require("react-dates/initialize");
9325
9535
  var import_datepicker = require("react-dates/lib/css/_datepicker.css");
9326
- var import_jsx_runtime137 = require("react/jsx-runtime");
9536
+ var import_jsx_runtime139 = require("react/jsx-runtime");
9327
9537
  var useStyles50 = (0, import_mui56.makeStyles)()((theme) => ({
9328
9538
  wrapper: {
9329
9539
  "& .DateRangePicker": {
@@ -9419,15 +9629,15 @@ var ThemedDateRangePicker = ({
9419
9629
  ...props
9420
9630
  }) => {
9421
9631
  const { classes, cx } = useStyles50();
9422
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: cx(classes.wrapper, className), children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_react_dates.DateRangePicker, { ...props }) });
9632
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: cx(classes.wrapper, className), children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_react_dates.DateRangePicker, { ...props }) });
9423
9633
  };
9424
9634
  var ThemedDateRangePicker_default = ThemedDateRangePicker;
9425
9635
 
9426
9636
  // src/components/TheToolbar/TheToolbar.tsx
9427
- var import_react46 = require("react");
9428
- var import_material81 = require("@mui/material");
9637
+ var import_react49 = require("react");
9638
+ var import_material82 = require("@mui/material");
9429
9639
  var import_mui57 = require("tss-react/mui");
9430
- var import_jsx_runtime138 = require("react/jsx-runtime");
9640
+ var import_jsx_runtime140 = require("react/jsx-runtime");
9431
9641
  var useStyles51 = (0, import_mui57.makeStyles)()((theme) => ({
9432
9642
  menuButton: {
9433
9643
  color: theme.palette.primary.contrastText
@@ -9447,9 +9657,9 @@ var TheToolbar = ({
9447
9657
  rightSection
9448
9658
  }) => {
9449
9659
  const { classes } = useStyles51();
9450
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material81.Box, { children: [
9451
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material81.AppBar, { children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material81.Toolbar, { className: classes.topBar, children: [
9452
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9660
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material82.Box, { children: [
9661
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material82.AppBar, { children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material82.Toolbar, { className: classes.topBar, children: [
9662
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
9453
9663
  RoundButton_default,
9454
9664
  {
9455
9665
  className: classes.menuButton,
@@ -9458,7 +9668,7 @@ var TheToolbar = ({
9458
9668
  onClick: handleOpen
9459
9669
  }
9460
9670
  ),
9461
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9671
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
9462
9672
  CompanyLogo_default,
9463
9673
  {
9464
9674
  size: "small",
@@ -9467,31 +9677,31 @@ var TheToolbar = ({
9467
9677
  imageLogoLightSmall
9468
9678
  }
9469
9679
  ),
9470
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material81.Box, { ml: 2, children: leftSection }),
9471
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material81.Box, { ml: "auto", children: rightSection })
9680
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material82.Box, { ml: 2, children: leftSection }),
9681
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material82.Box, { ml: "auto", children: rightSection })
9472
9682
  ] }) }),
9473
9683
  LeftDrawer
9474
9684
  ] });
9475
9685
  };
9476
- var TheToolbar_default = (0, import_react46.memo)(TheToolbar);
9686
+ var TheToolbar_default = (0, import_react49.memo)(TheToolbar);
9477
9687
 
9478
9688
  // src/components/ToastMessage/ToastMessage.tsx
9479
- var import_material82 = require("@mui/material");
9480
- var import_jsx_runtime139 = require("react/jsx-runtime");
9689
+ var import_material83 = require("@mui/material");
9690
+ var import_jsx_runtime141 = require("react/jsx-runtime");
9481
9691
  var ToastMessage = ({
9482
9692
  toastType,
9483
9693
  toastMessage,
9484
9694
  open,
9485
9695
  onClose
9486
- }) => /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
9487
- import_material82.Snackbar,
9696
+ }) => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
9697
+ import_material83.Snackbar,
9488
9698
  {
9489
9699
  open,
9490
9700
  autoHideDuration: 1500,
9491
9701
  onClose,
9492
9702
  anchorOrigin: { vertical: "top", horizontal: "right" },
9493
- children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
9494
- import_material82.Alert,
9703
+ children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
9704
+ import_material83.Alert,
9495
9705
  {
9496
9706
  elevation: 6,
9497
9707
  variant: "filled",
@@ -9517,9 +9727,9 @@ var ToastMessage = ({
9517
9727
  var ToastMessage_default = ToastMessage;
9518
9728
 
9519
9729
  // src/components/TwoButtonDialog/TwoButtonDialog.tsx
9520
- var import_material83 = require("@mui/material");
9730
+ var import_material84 = require("@mui/material");
9521
9731
  var import_mui58 = require("tss-react/mui");
9522
- var import_jsx_runtime140 = require("react/jsx-runtime");
9732
+ var import_jsx_runtime142 = require("react/jsx-runtime");
9523
9733
  var useStyles52 = (0, import_mui58.makeStyles)()((theme) => ({
9524
9734
  paper: {
9525
9735
  padding: theme.spacing(2)
@@ -9549,20 +9759,20 @@ var TwoButtonDialog = ({
9549
9759
  cancelButton
9550
9760
  }) => {
9551
9761
  const { classes } = useStyles52();
9552
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
9553
- import_material83.Dialog,
9762
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
9763
+ import_material84.Dialog,
9554
9764
  {
9555
9765
  open,
9556
9766
  disableEnforceFocus: true,
9557
9767
  maxWidth: "sm",
9558
9768
  fullWidth: true,
9559
9769
  closeAfterTransition: true,
9560
- BackdropComponent: import_material83.Backdrop,
9770
+ BackdropComponent: import_material84.Backdrop,
9561
9771
  BackdropProps: { timeout: 500 },
9562
- children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material83.Fade, { in: open, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material83.Paper, { className: classes.paper, children: [
9563
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material83.Box, { className: classes.mb, children: [
9564
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material83.Typography, { variant: "h5", component: "div", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
9565
- import_material83.Box,
9772
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material84.Fade, { in: open, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material84.Paper, { className: classes.paper, children: [
9773
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material84.Box, { className: classes.mb, children: [
9774
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material84.Typography, { variant: "h5", component: "div", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
9775
+ import_material84.Box,
9566
9776
  {
9567
9777
  sx: {
9568
9778
  fontWeight: 600
@@ -9570,23 +9780,23 @@ var TwoButtonDialog = ({
9570
9780
  children: title
9571
9781
  }
9572
9782
  ) }),
9573
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
9574
- import_material83.Box,
9783
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
9784
+ import_material84.Box,
9575
9785
  {
9576
9786
  className: classes.mt,
9577
9787
  sx: {
9578
9788
  fontWeight: 600
9579
9789
  },
9580
9790
  children: [
9581
- subtitle1 && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material83.Typography, { variant: "subtitle1", children: subtitle1 }),
9582
- subtitle2 && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material83.Typography, { variant: "subtitle1", children: subtitle2 })
9791
+ subtitle1 && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material84.Typography, { variant: "subtitle1", children: subtitle1 }),
9792
+ subtitle2 && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material84.Typography, { variant: "subtitle1", children: subtitle2 })
9583
9793
  ]
9584
9794
  }
9585
9795
  )
9586
9796
  ] }),
9587
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material83.Divider, {}),
9588
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material83.Box, { className: classes.buttonContainer, children: [
9589
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
9797
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material84.Divider, {}),
9798
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material84.Box, { className: classes.buttonContainer, children: [
9799
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
9590
9800
  FilledButton_default,
9591
9801
  {
9592
9802
  copy: cancelLabel,
@@ -9599,7 +9809,7 @@ var TwoButtonDialog = ({
9599
9809
  }
9600
9810
  }
9601
9811
  ),
9602
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
9812
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
9603
9813
  FilledButton_default,
9604
9814
  {
9605
9815
  color: "primary",
@@ -9608,7 +9818,7 @@ var TwoButtonDialog = ({
9608
9818
  }
9609
9819
  )
9610
9820
  ] }),
9611
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Loading_default, { isLoading: dialogLoading })
9821
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Loading_default, { isLoading: dialogLoading })
9612
9822
  ] }) })
9613
9823
  }
9614
9824
  );
@@ -9616,30 +9826,30 @@ var TwoButtonDialog = ({
9616
9826
  var TwoButtonDialog_default = TwoButtonDialog;
9617
9827
 
9618
9828
  // src/components/UserBust/UserBust.tsx
9619
- var import_react47 = require("react");
9620
- var import_material84 = require("@mui/material");
9621
- var import_jsx_runtime141 = require("react/jsx-runtime");
9622
- var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { children: [
9623
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
9624
- import_material84.Avatar,
9829
+ var import_react50 = require("react");
9830
+ var import_material85 = require("@mui/material");
9831
+ var import_jsx_runtime143 = require("react/jsx-runtime");
9832
+ var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { children: [
9833
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
9834
+ import_material85.Avatar,
9625
9835
  {
9626
9836
  src: user.profile_picture,
9627
9837
  alt: "user_avatar",
9628
9838
  style: { width: avatarProps.width, height: avatarProps.height }
9629
9839
  }
9630
9840
  ),
9631
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { style: { paddingTop: 16 }, children: [
9632
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material84.Typography, { ...typographyProps.name, children: `${user.first_name} ${user.last_name}` }),
9633
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material84.Typography, { ...typographyProps.username, children: user.username })
9841
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { style: { paddingTop: 16 }, children: [
9842
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material85.Typography, { ...typographyProps.name, children: `${user.first_name} ${user.last_name}` }),
9843
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material85.Typography, { ...typographyProps.username, children: user.username })
9634
9844
  ] })
9635
9845
  ] });
9636
- var UserBust_default = (0, import_react47.memo)(UserBust);
9846
+ var UserBust_default = (0, import_react50.memo)(UserBust);
9637
9847
 
9638
9848
  // src/components/icons/IconChart.tsx
9639
- var import_jsx_runtime142 = require("react/jsx-runtime");
9849
+ var import_jsx_runtime144 = require("react/jsx-runtime");
9640
9850
  var SvgIconChart = (props) => {
9641
9851
  const { fill } = props;
9642
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
9852
+ return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
9643
9853
  "svg",
9644
9854
  {
9645
9855
  width: "20",
@@ -9648,7 +9858,7 @@ var SvgIconChart = (props) => {
9648
9858
  fill: "none",
9649
9859
  xmlns: "http://www.w3.org/2000/svg",
9650
9860
  ...props,
9651
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
9861
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
9652
9862
  "path",
9653
9863
  {
9654
9864
  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",
@@ -9727,6 +9937,7 @@ var IconChart_default = SvgIconChart;
9727
9937
  SearchWithFilters,
9728
9938
  SearchWithFiltersForTable,
9729
9939
  SectionName,
9940
+ SmartMultipleSelect,
9730
9941
  SmartSelect,
9731
9942
  SmartTableHeader,
9732
9943
  SmartTableHeaderFilterMenu,