@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.
@@ -6262,7 +6262,7 @@ import { makeStyles as makeStyles35 } from "tss-react/mui";
6262
6262
 
6263
6263
  // src/utils/useGetActiveSection.ts
6264
6264
  import { useEffect as useEffect6, useState as useState10 } from "react";
6265
- var transformNameToID = (name) => name.replaceAll(" ", "-").toLocaleLowerCase();
6265
+ var transformNameToID = (name) => name.replaceAll(" ", "_").toLocaleLowerCase();
6266
6266
 
6267
6267
  // src/components/RenderContentList/RenderContentList.tsx
6268
6268
  import { jsx as jsx105, jsxs as jsxs69 } from "react/jsx-runtime";
@@ -6345,7 +6345,7 @@ var RenderContentList = ({
6345
6345
  },
6346
6346
  children: [
6347
6347
  /* @__PURE__ */ jsx105(ListItemText4, { primary: item }),
6348
- warningItems?.includes(item) && /* @__PURE__ */ jsx105(Tooltip7, { title: warningMessage, children: /* @__PURE__ */ jsx105(WarningAmber, { color: "warning" }) })
6348
+ (warningItems?.includes(item) || warningItems?.includes(id)) && /* @__PURE__ */ jsx105(Tooltip7, { title: warningMessage, children: /* @__PURE__ */ jsx105(WarningAmber, { color: "warning" }) })
6349
6349
  ]
6350
6350
  },
6351
6351
  id
@@ -7063,18 +7063,123 @@ var SectionName = ({
7063
7063
  };
7064
7064
  var SectionName_default = SectionName;
7065
7065
 
7066
- // src/components/SmartSelect/SmartSelect.tsx
7067
- import { forwardRef as forwardRef2, useState as useState15, useEffect as useEffect10 } from "react";
7066
+ // src/components/SmartMultipleSelect/SmartMultipleSelect.tsx
7067
+ import { useState as useState15 } from "react";
7068
7068
  import {
7069
+ Box as Box35,
7070
+ Checkbox as Checkbox6,
7069
7071
  CircularProgress as CircularProgress4,
7070
7072
  FormControl as FormControl4,
7071
7073
  FormHelperText as FormHelperText3,
7072
7074
  InputLabel as InputLabel4,
7075
+ ListItemText as ListItemText5,
7076
+ Select as Select3,
7077
+ Typography as Typography28
7078
+ } from "@mui/material";
7079
+ import { jsx as jsx114, jsxs as jsxs78 } from "react/jsx-runtime";
7080
+ var SmartMultipleSelect = ({
7081
+ inputLabel,
7082
+ variant = "standard",
7083
+ size,
7084
+ values,
7085
+ defaultValues,
7086
+ onChange,
7087
+ onOpen,
7088
+ onClose,
7089
+ menuOptions,
7090
+ isLoading,
7091
+ disabled,
7092
+ emptyMessage = "No options.",
7093
+ helperText
7094
+ }) => {
7095
+ const [localValues, setLocalValues] = useState15(defaultValues ?? []);
7096
+ const handleChangeOption = (option) => {
7097
+ let newValues = [];
7098
+ const selectedIndex = localValues.findIndex(
7099
+ (val) => val.value === option.value
7100
+ );
7101
+ if (selectedIndex === -1) {
7102
+ newValues = [...localValues, option];
7103
+ } else {
7104
+ newValues = localValues.filter((_, i) => i !== selectedIndex);
7105
+ }
7106
+ setLocalValues(newValues);
7107
+ onChange?.(newValues);
7108
+ };
7109
+ const renderMenuContent = () => !menuOptions?.length ? /* @__PURE__ */ jsx114(
7110
+ Box35,
7111
+ {
7112
+ sx: { display: "flex", justifyContent: "center", alignItems: "center" },
7113
+ children: /* @__PURE__ */ jsx114(Typography28, { children: emptyMessage })
7114
+ }
7115
+ ) : /* @__PURE__ */ jsx114(Box35, { sx: { display: "flex", flexDirection: "column" }, children: menuOptions?.map((option, index) => {
7116
+ const selectedValues = values ?? localValues ?? [];
7117
+ const isSelected = selectedValues.some(
7118
+ (selected) => selected.value === option.value
7119
+ );
7120
+ return /* @__PURE__ */ jsxs78(
7121
+ Box35,
7122
+ {
7123
+ onClick: () => handleChangeOption(option),
7124
+ sx: {
7125
+ p: 0.5,
7126
+ display: "flex",
7127
+ cursor: "pointer",
7128
+ backgroundColor: isSelected ? colors.lightBlueBackground : void 0
7129
+ },
7130
+ children: [
7131
+ /* @__PURE__ */ jsx114(Checkbox6, { disableRipple: true, sx: { py: 0.5 }, checked: isSelected }),
7132
+ /* @__PURE__ */ jsx114(ListItemText5, { primary: option.label })
7133
+ ]
7134
+ },
7135
+ option.value ?? index
7136
+ );
7137
+ }) });
7138
+ return /* @__PURE__ */ jsxs78(FormControl4, { fullWidth: true, variant, children: [
7139
+ /* @__PURE__ */ jsx114(InputLabel4, { children: inputLabel }),
7140
+ /* @__PURE__ */ jsx114(
7141
+ Select3,
7142
+ {
7143
+ multiple: true,
7144
+ size,
7145
+ disabled,
7146
+ value: values ?? localValues,
7147
+ defaultValue: defaultValues,
7148
+ onOpen,
7149
+ onClose: () => onClose?.(localValues),
7150
+ renderValue: (selectedValues) => {
7151
+ const valuesString = selectedValues.map((v) => v.label)?.join(", ");
7152
+ return /* @__PURE__ */ jsx114(DynamicOverflowTooltip, { tooltipDescription: valuesString, children: valuesString });
7153
+ },
7154
+ children: isLoading ? /* @__PURE__ */ jsx114(
7155
+ Box35,
7156
+ {
7157
+ sx: {
7158
+ display: "flex",
7159
+ justifyContent: "center",
7160
+ alignItems: "center"
7161
+ },
7162
+ children: /* @__PURE__ */ jsx114(CircularProgress4, { size: 24 })
7163
+ }
7164
+ ) : renderMenuContent()
7165
+ }
7166
+ ),
7167
+ helperText && /* @__PURE__ */ jsx114(FormHelperText3, { children: helperText })
7168
+ ] });
7169
+ };
7170
+
7171
+ // src/components/SmartSelect/SmartSelect.tsx
7172
+ import { forwardRef as forwardRef2, useState as useState16, useEffect as useEffect10 } from "react";
7173
+ import {
7174
+ CircularProgress as CircularProgress5,
7175
+ FormControl as FormControl5,
7176
+ FormHelperText as FormHelperText4,
7177
+ InputLabel as InputLabel5,
7073
7178
  MenuItem as MenuItem3,
7074
- Select as Select3
7179
+ Select as Select4
7075
7180
  } from "@mui/material";
7076
7181
  import { makeStyles as makeStyles43 } from "tss-react/mui";
7077
- import { jsx as jsx114, jsxs as jsxs78 } from "react/jsx-runtime";
7182
+ import { jsx as jsx115, jsxs as jsxs79 } from "react/jsx-runtime";
7078
7183
  var useStyles43 = makeStyles43()(() => ({
7079
7184
  container: {
7080
7185
  display: "flex",
@@ -7101,8 +7206,8 @@ var SmartSelect = forwardRef2(
7101
7206
  menuProps
7102
7207
  }, ref) => {
7103
7208
  const { classes } = useStyles43();
7104
- const [open, setOpen] = useState15(false);
7105
- const [localOptions, setLocalOptions] = useState15(options || []);
7209
+ const [open, setOpen] = useState16(false);
7210
+ const [localOptions, setLocalOptions] = useState16(options || []);
7106
7211
  useEffect10(() => {
7107
7212
  if (options) {
7108
7213
  setLocalOptions(options);
@@ -7142,8 +7247,8 @@ var SmartSelect = forwardRef2(
7142
7247
  onChange(selectedOption);
7143
7248
  }
7144
7249
  };
7145
- return /* @__PURE__ */ jsxs78(
7146
- FormControl4,
7250
+ return /* @__PURE__ */ jsxs79(
7251
+ FormControl5,
7147
7252
  {
7148
7253
  fullWidth: true,
7149
7254
  size,
@@ -7153,16 +7258,16 @@ var SmartSelect = forwardRef2(
7153
7258
  "data-testid": dataTestId,
7154
7259
  disabled,
7155
7260
  children: [
7156
- inputLabel && /* @__PURE__ */ jsx114(
7157
- InputLabel4,
7261
+ inputLabel && /* @__PURE__ */ jsx115(
7262
+ InputLabel5,
7158
7263
  {
7159
7264
  id: "smart-select-label",
7160
7265
  "data-testid": `${dataTestId}-label`,
7161
7266
  children: inputLabel
7162
7267
  }
7163
7268
  ),
7164
- /* @__PURE__ */ jsxs78(
7165
- Select3,
7269
+ /* @__PURE__ */ jsxs79(
7270
+ Select4,
7166
7271
  {
7167
7272
  ref,
7168
7273
  size,
@@ -7179,17 +7284,17 @@ var SmartSelect = forwardRef2(
7179
7284
  MenuProps: menuProps,
7180
7285
  label: inputLabel,
7181
7286
  children: [
7182
- isFetching && /* @__PURE__ */ jsx114(
7287
+ isFetching && /* @__PURE__ */ jsx115(
7183
7288
  MenuItem3,
7184
7289
  {
7185
7290
  disabled: true,
7186
7291
  "data-testid": `${dataTestId}-loading`,
7187
7292
  id: `${dataTestId}-loading`,
7188
- children: /* @__PURE__ */ jsx114(CircularProgress4, { size: 24 })
7293
+ children: /* @__PURE__ */ jsx115(CircularProgress5, { size: 24 })
7189
7294
  }
7190
7295
  ),
7191
- (defaultOption === null || !defaultOptionLabelIsValid || !defaultOptionValueIsValid) && !isFetching && options?.length === 0 && /* @__PURE__ */ jsx114(MenuItem3, { disabled: true, "data-testid": `${dataTestId}-empty-message`, children: emptyMessage }),
7192
- localOptions.length === 0 && !isFetching && options?.length !== 0 && defaultOptionLabelIsValid && defaultOptionValueIsValid && /* @__PURE__ */ jsx114(
7296
+ (defaultOption === null || !defaultOptionLabelIsValid || !defaultOptionValueIsValid) && !isFetching && options?.length === 0 && /* @__PURE__ */ jsx115(MenuItem3, { disabled: true, "data-testid": `${dataTestId}-empty-message`, children: emptyMessage }),
7297
+ localOptions.length === 0 && !isFetching && options?.length !== 0 && defaultOptionLabelIsValid && defaultOptionValueIsValid && /* @__PURE__ */ jsx115(
7193
7298
  MenuItem3,
7194
7299
  {
7195
7300
  value: defaultOption?.value,
@@ -7197,7 +7302,7 @@ var SmartSelect = forwardRef2(
7197
7302
  children: defaultOption?.label
7198
7303
  }
7199
7304
  ),
7200
- !isFetching && combinedOptions.length > 0 && combinedOptions.map((option) => /* @__PURE__ */ jsx114(
7305
+ !isFetching && combinedOptions.length > 0 && combinedOptions.map((option) => /* @__PURE__ */ jsx115(
7201
7306
  MenuItem3,
7202
7307
  {
7203
7308
  value: option?.value,
@@ -7210,7 +7315,7 @@ var SmartSelect = forwardRef2(
7210
7315
  ]
7211
7316
  }
7212
7317
  ),
7213
- helperText && /* @__PURE__ */ jsx114(FormHelperText3, { "data-testid": `${dataTestId}-helper-text`, children: helperText })
7318
+ helperText && /* @__PURE__ */ jsx115(FormHelperText4, { "data-testid": `${dataTestId}-helper-text`, children: helperText })
7214
7319
  ]
7215
7320
  }
7216
7321
  );
@@ -7220,10 +7325,10 @@ var SmartSelect_default = SmartSelect;
7220
7325
 
7221
7326
  // src/components/SquareLabel/SquareLabel.tsx
7222
7327
  import { memo as memo19 } from "react";
7223
- import { Typography as Typography28 } from "@mui/material";
7328
+ import { Typography as Typography29 } from "@mui/material";
7224
7329
  import { red as red2 } from "@mui/material/colors";
7225
7330
  import { makeStyles as makeStyles44 } from "tss-react/mui";
7226
- import { jsx as jsx115 } from "react/jsx-runtime";
7331
+ import { jsx as jsx116 } from "react/jsx-runtime";
7227
7332
  var useStyles44 = makeStyles44()((theme) => ({
7228
7333
  red: {
7229
7334
  backgroundColor: red2["50"],
@@ -7238,7 +7343,7 @@ var useStyles44 = makeStyles44()((theme) => ({
7238
7343
  }));
7239
7344
  var SquareLabel = ({ color, copy }) => {
7240
7345
  const { classes } = useStyles44();
7241
- return /* @__PURE__ */ jsx115(Typography28, { className: classes[color], children: copy });
7346
+ return /* @__PURE__ */ jsx116(Typography29, { className: classes[color], children: copy });
7242
7347
  };
7243
7348
  var SquareLabel_default = memo19(SquareLabel);
7244
7349
 
@@ -7246,7 +7351,7 @@ var SquareLabel_default = memo19(SquareLabel);
7246
7351
  import { memo as memo20 } from "react";
7247
7352
  import { Grid as Grid2, Switch } from "@mui/material";
7248
7353
  import { withStyles as withStyles6 } from "tss-react/mui";
7249
- import { jsx as jsx116, jsxs as jsxs79 } from "react/jsx-runtime";
7354
+ import { jsx as jsx117, jsxs as jsxs80 } from "react/jsx-runtime";
7250
7355
  var LSwitch = ({
7251
7356
  checked,
7252
7357
  labelOn,
@@ -7254,7 +7359,7 @@ var LSwitch = ({
7254
7359
  handleChange,
7255
7360
  classes,
7256
7361
  disabled
7257
- }) => /* @__PURE__ */ jsx116("div", { className: classes.c_switch, children: /* @__PURE__ */ jsxs79(
7362
+ }) => /* @__PURE__ */ jsx117("div", { className: classes.c_switch, children: /* @__PURE__ */ jsxs80(
7258
7363
  Grid2,
7259
7364
  {
7260
7365
  component: "label",
@@ -7264,8 +7369,8 @@ var LSwitch = ({
7264
7369
  alignItems: "center"
7265
7370
  },
7266
7371
  children: [
7267
- labelOff && /* @__PURE__ */ jsx116(Grid2, { children: labelOff }),
7268
- /* @__PURE__ */ jsx116(Grid2, { children: /* @__PURE__ */ jsx116(
7372
+ labelOff && /* @__PURE__ */ jsx117(Grid2, { children: labelOff }),
7373
+ /* @__PURE__ */ jsx117(Grid2, { children: /* @__PURE__ */ jsx117(
7269
7374
  Switch,
7270
7375
  {
7271
7376
  checked,
@@ -7274,7 +7379,7 @@ var LSwitch = ({
7274
7379
  disabled
7275
7380
  }
7276
7381
  ) }),
7277
- labelOn && /* @__PURE__ */ jsx116(Grid2, { children: labelOn })
7382
+ labelOn && /* @__PURE__ */ jsx117(Grid2, { children: labelOn })
7278
7383
  ]
7279
7384
  }
7280
7385
  ) });
@@ -7299,10 +7404,10 @@ var LabelledSwitch = withStyles6(LSwitch, (theme) => ({
7299
7404
  var Switch_default = memo20(LabelledSwitch);
7300
7405
 
7301
7406
  // src/components/SmartTableHeaderFilterMenu/SmartTableHeaderFilterMenu.tsx
7302
- import { useState as useState16, useEffect as useEffect11 } from "react";
7407
+ import { useState as useState17, useEffect as useEffect11 } from "react";
7303
7408
  import { Menu as Menu4 } from "@mui/material";
7304
7409
  import classNames3 from "classnames";
7305
- import { Fragment as Fragment13, jsx as jsx117, jsxs as jsxs80 } from "react/jsx-runtime";
7410
+ import { Fragment as Fragment13, jsx as jsx118, jsxs as jsxs81 } from "react/jsx-runtime";
7306
7411
  var MAX_WIDTH = 276;
7307
7412
  var findFilterIndex = (filters, filterOption) => filters.findIndex((item) => {
7308
7413
  if (typeof item === "string" && typeof filterOption === "string") {
@@ -7320,15 +7425,18 @@ var SmartTableHeaderFilterMenu = ({
7320
7425
  shouldShowCheckOnFilter,
7321
7426
  onApplyFilters
7322
7427
  }) => {
7323
- const [anchorEl, setAnchorEl] = useState16(null);
7324
- const [filterOptionsData, setFilterOptionsData] = useState16();
7325
- const [selectedFilterOptions, setSelectedFilterOptions] = useState16(headerFilters[headCell.id] ?? []);
7428
+ const [anchorEl, setAnchorEl] = useState17(null);
7429
+ const [filterOptionsData, setFilterOptionsData] = useState17();
7430
+ const [selectedFilterOptions, setSelectedFilterOptions] = useState17(headerFilters[headCell.id] ?? []);
7326
7431
  const numFilterOptions = filterOptionsData?.length ?? 0;
7327
7432
  useEffect11(() => {
7328
7433
  if (headCell.filterOptions) {
7329
7434
  setFilterOptionsData(headCell.filterOptions);
7330
7435
  } else if (headCell.filterType === "boolean") {
7331
- setFilterOptionsData([{ id: "true", label: "Yes" }, { id: "false", label: "No" }]);
7436
+ setFilterOptionsData([
7437
+ { id: "true", label: "Yes" },
7438
+ { id: "false", label: "No" }
7439
+ ]);
7332
7440
  }
7333
7441
  }, [headCell.filterOptions]);
7334
7442
  const handleFilterMenuOpen = (event) => {
@@ -7380,8 +7488,8 @@ var SmartTableHeaderFilterMenu = ({
7380
7488
  useEffect11(() => {
7381
7489
  setSelectedFilterOptions(headerFilters[headCell.id] ?? []);
7382
7490
  }, [headerFilters, headCell.id]);
7383
- return /* @__PURE__ */ jsxs80(Fragment13, { children: [
7384
- /* @__PURE__ */ jsx117(
7491
+ return /* @__PURE__ */ jsxs81(Fragment13, { children: [
7492
+ /* @__PURE__ */ jsx118(
7385
7493
  ActiveFiltersIconButton,
7386
7494
  {
7387
7495
  numActiveFilters,
@@ -7391,7 +7499,7 @@ var SmartTableHeaderFilterMenu = ({
7391
7499
  })
7392
7500
  }
7393
7501
  ),
7394
- /* @__PURE__ */ jsx117(
7502
+ /* @__PURE__ */ jsx118(
7395
7503
  Menu4,
7396
7504
  {
7397
7505
  open: !!anchorEl,
@@ -7405,7 +7513,7 @@ var SmartTableHeaderFilterMenu = ({
7405
7513
  },
7406
7514
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
7407
7515
  transformOrigin: { vertical: "top", horizontal: "right" },
7408
- children: headCell.filterType === "autocomplete" ? /* @__PURE__ */ jsx117(
7516
+ children: headCell.filterType === "autocomplete" ? /* @__PURE__ */ jsx118(
7409
7517
  AutocompleteFilterMenuContent,
7410
7518
  {
7411
7519
  columnId: headCell.id,
@@ -7418,7 +7526,7 @@ var SmartTableHeaderFilterMenu = ({
7418
7526
  onApplyFiltersClick: handleApplyFiltersClick,
7419
7527
  shouldShowCheckOnFilter
7420
7528
  }
7421
- ) : /* @__PURE__ */ jsx117(
7529
+ ) : /* @__PURE__ */ jsx118(
7422
7530
  CheckboxFilterMenuContent,
7423
7531
  {
7424
7532
  columnId: headCell.id,
@@ -7440,16 +7548,16 @@ var SmartTableHeaderFilterMenu = ({
7440
7548
  // src/components/SmartTableHeader/SmartTableHeader.tsx
7441
7549
  import { memo as memo21 } from "react";
7442
7550
  import {
7443
- Box as Box35,
7444
- Checkbox as Checkbox6,
7551
+ Box as Box36,
7552
+ Checkbox as Checkbox7,
7445
7553
  TableCell,
7446
7554
  TableHead,
7447
7555
  TableRow,
7448
7556
  TableSortLabel,
7449
7557
  Tooltip as Tooltip9,
7450
- Typography as Typography29
7558
+ Typography as Typography30
7451
7559
  } from "@mui/material";
7452
- import { jsx as jsx118, jsxs as jsxs81 } from "react/jsx-runtime";
7560
+ import { jsx as jsx119, jsxs as jsxs82 } from "react/jsx-runtime";
7453
7561
  var SmartTableHeader = memo21(
7454
7562
  ({
7455
7563
  order,
@@ -7468,18 +7576,25 @@ var SmartTableHeader = memo21(
7468
7576
  onRequestSort(event, property);
7469
7577
  };
7470
7578
  const isSortActive = (headCellId) => orderBy === headCellId;
7471
- return /* @__PURE__ */ jsx118(TableHead, { children: /* @__PURE__ */ jsxs81(TableRow, { children: [
7472
- enableCheckboxSelection ? /* @__PURE__ */ jsx118(TableCell, { padding: "checkbox", children: /* @__PURE__ */ jsx118(
7473
- Checkbox6,
7579
+ return /* @__PURE__ */ jsx119(TableHead, { children: /* @__PURE__ */ jsxs82(TableRow, { children: [
7580
+ enableCheckboxSelection ? /* @__PURE__ */ jsx119(
7581
+ TableCell,
7474
7582
  {
7475
- color: "primary",
7476
- disableRipple: true,
7477
- indeterminate: numSelectedRows > 0 && numSelectedRows < numRows,
7478
- checked: numRows > 0 && numSelectedRows === numRows,
7479
- onChange: onSelectAllClick
7583
+ padding: "checkbox",
7584
+ sx: { backgroundColor: colors.neutral100 },
7585
+ children: /* @__PURE__ */ jsx119(
7586
+ Checkbox7,
7587
+ {
7588
+ color: "primary",
7589
+ disableRipple: true,
7590
+ indeterminate: numSelectedRows > 0 && numSelectedRows < numRows,
7591
+ checked: numRows > 0 && numSelectedRows === numRows,
7592
+ onChange: onSelectAllClick
7593
+ }
7594
+ )
7480
7595
  }
7481
- ) }) : null,
7482
- headCells.map((headCell) => /* @__PURE__ */ jsx118(
7596
+ ) : null,
7597
+ headCells.map((headCell) => /* @__PURE__ */ jsx119(
7483
7598
  TableCell,
7484
7599
  {
7485
7600
  align: "left",
@@ -7503,22 +7618,14 @@ var SmartTableHeader = memo21(
7503
7618
  }
7504
7619
  }
7505
7620
  },
7506
- children: /* @__PURE__ */ jsxs81(
7507
- Box35,
7621
+ children: /* @__PURE__ */ jsxs82(
7622
+ Box36,
7508
7623
  {
7509
7624
  display: "flex",
7510
7625
  flexDirection: "row",
7511
7626
  gap: headCell.disableSort ? 1 : 0,
7512
7627
  children: [
7513
- headCell.disableSort ? headCell.renderHeader ?? /* @__PURE__ */ jsx118(Tooltip9, { title: headCell.labelTooltip ?? "", arrow: true, children: /* @__PURE__ */ jsx118(
7514
- Typography29,
7515
- {
7516
- variant: "subtitle2",
7517
- mt: 0.25,
7518
- mb: -0.25,
7519
- children: headCell.label
7520
- }
7521
- ) }) : /* @__PURE__ */ jsx118(Tooltip9, { title: headCell.labelTooltip ?? "", arrow: true, children: /* @__PURE__ */ jsxs81(
7628
+ headCell.disableSort ? headCell.renderHeader ?? /* @__PURE__ */ jsx119(Tooltip9, { title: headCell.labelTooltip ?? "", arrow: true, children: /* @__PURE__ */ jsx119(Typography30, { variant: "subtitle2", mt: 0.25, mb: -0.25, children: headCell.label }) }) : /* @__PURE__ */ jsx119(Tooltip9, { title: headCell.labelTooltip ?? "", arrow: true, children: /* @__PURE__ */ jsxs82(
7522
7629
  TableSortLabel,
7523
7630
  {
7524
7631
  "data-testid": "table-sort-label",
@@ -7527,7 +7634,7 @@ var SmartTableHeader = memo21(
7527
7634
  onClick: createSortHandler(headCell.id),
7528
7635
  children: [
7529
7636
  headCell.renderHeader ?? headCell.label,
7530
- orderBy === headCell.id ? /* @__PURE__ */ jsx118(
7637
+ orderBy === headCell.id ? /* @__PURE__ */ jsx119(
7531
7638
  "span",
7532
7639
  {
7533
7640
  style: {
@@ -7547,7 +7654,7 @@ var SmartTableHeader = memo21(
7547
7654
  ]
7548
7655
  }
7549
7656
  ) }),
7550
- headCell.filterType ? /* @__PURE__ */ jsx118(
7657
+ headCell.filterType ? /* @__PURE__ */ jsx119(
7551
7658
  SmartTableHeaderFilterMenu,
7552
7659
  {
7553
7660
  headCell,
@@ -7569,9 +7676,9 @@ var SmartTableHeader = memo21(
7569
7676
 
7570
7677
  // src/components/Table/Table.tsx
7571
7678
  var import_debounce = __toESM(require_debounce(), 1);
7572
- import { useLayoutEffect, useState as useState17 } from "react";
7679
+ import { useLayoutEffect, useState as useState18 } from "react";
7573
7680
  import {
7574
- Box as Box37,
7681
+ Box as Box38,
7575
7682
  Paper as Paper11,
7576
7683
  Table as MUITable,
7577
7684
  TableBody,
@@ -7585,12 +7692,12 @@ import { makeStyles as makeStyles45 } from "tss-react/mui";
7585
7692
  import { v4 as uuidv4 } from "uuid";
7586
7693
 
7587
7694
  // src/components/TableLoading/TableLoading.tsx
7588
- import { Box as Box36, Skeleton as Skeleton4 } from "@mui/material";
7589
- import { jsx as jsx119 } from "react/jsx-runtime";
7695
+ import { Box as Box37, Skeleton as Skeleton4 } from "@mui/material";
7696
+ import { jsx as jsx120 } from "react/jsx-runtime";
7590
7697
  var TableLoading = ({
7591
7698
  rowsPerPage,
7592
7699
  rowHeight
7593
- }) => /* @__PURE__ */ jsx119(Box36, { children: Array.from({ length: rowsPerPage ?? 0 }).map((_, index) => /* @__PURE__ */ jsx119(
7700
+ }) => /* @__PURE__ */ jsx120(Box37, { children: Array.from({ length: rowsPerPage ?? 0 }).map((_, index) => /* @__PURE__ */ jsx120(
7594
7701
  Skeleton4,
7595
7702
  {
7596
7703
  animation: "pulse",
@@ -7639,7 +7746,7 @@ function calculateRowsPerPage(rowHeight) {
7639
7746
  }
7640
7747
 
7641
7748
  // src/components/Table/Table.tsx
7642
- import { jsx as jsx120, jsxs as jsxs82 } from "react/jsx-runtime";
7749
+ import { jsx as jsx121, jsxs as jsxs83 } from "react/jsx-runtime";
7643
7750
  var useStyles45 = makeStyles45()(() => ({
7644
7751
  root: {
7645
7752
  height: "calc(100vh - 262px)",
@@ -7674,11 +7781,11 @@ var Table = ({
7674
7781
  serverRendered,
7675
7782
  updateSort
7676
7783
  }) => {
7677
- const [order, setOrder] = useState17(appliedFilters?.sortDir || "desc");
7678
- const [orderBy, setOrderBy] = useState17(
7784
+ const [order, setOrder] = useState18(appliedFilters?.sortDir || "desc");
7785
+ const [orderBy, setOrderBy] = useState18(
7679
7786
  appliedFilters?.sortField || "delivery_date"
7680
7787
  );
7681
- const [rowsPerPage, setRowsPerPage] = useState17(defaultRowsPerPage);
7788
+ const [rowsPerPage, setRowsPerPage] = useState18(defaultRowsPerPage);
7682
7789
  const { classes } = useStyles45();
7683
7790
  const rowHeight = 56;
7684
7791
  const emptyRows = rowsPerPage - Math.min(rowsPerPage, data.length - page * rowsPerPage);
@@ -7717,24 +7824,24 @@ var Table = ({
7717
7824
  );
7718
7825
  const rowsComponents = rows.map((row) => {
7719
7826
  if (RenderItem) {
7720
- return /* @__PURE__ */ jsx120(RenderItem, { ...row }, row.id);
7827
+ return /* @__PURE__ */ jsx121(RenderItem, { ...row }, row.id);
7721
7828
  }
7722
- return /* @__PURE__ */ jsx120(TableRow2, { hover: true, onClick: () => onRowClick?.(row), children: headCells?.map((column) => /* @__PURE__ */ jsx120(TableCell2, { children: row[column.id] }, column.id)) }, row.id);
7829
+ return /* @__PURE__ */ jsx121(TableRow2, { hover: true, onClick: () => onRowClick?.(row), children: headCells?.map((column) => /* @__PURE__ */ jsx121(TableCell2, { children: row[column.id] }, column.id)) }, row.id);
7723
7830
  });
7724
7831
  if (emptyRows > 0 && rowsPerPage > emptyRows) {
7725
7832
  rowsComponents.push(
7726
- /* @__PURE__ */ jsx120(TableRow2, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ jsx120(TableCell2, { colSpan: 8 }) }, uuidv4())
7833
+ /* @__PURE__ */ jsx121(TableRow2, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ jsx121(TableCell2, { colSpan: 8 }) }, uuidv4())
7727
7834
  );
7728
7835
  }
7729
7836
  return rowsComponents;
7730
7837
  };
7731
- return /* @__PURE__ */ jsx120(Paper11, { className: classes.root, children: /* @__PURE__ */ jsx120(Box37, { className: classes.paper, children: isLoading ? /* @__PURE__ */ jsx120(TableLoading_default, { rowHeight, rowsPerPage }) : /* @__PURE__ */ jsx120(TableContainer, { className: classes.container, children: /* @__PURE__ */ jsxs82(MUITable, { size: "medium", stickyHeader: true, children: [
7732
- /* @__PURE__ */ jsx120(TableHead2, { className: classes.header, children: /* @__PURE__ */ jsx120(TableRow2, { children: headCells?.map((headCell) => /* @__PURE__ */ jsx120(
7838
+ return /* @__PURE__ */ jsx121(Paper11, { className: classes.root, children: /* @__PURE__ */ jsx121(Box38, { className: classes.paper, children: isLoading ? /* @__PURE__ */ jsx121(TableLoading_default, { rowHeight, rowsPerPage }) : /* @__PURE__ */ jsx121(TableContainer, { className: classes.container, children: /* @__PURE__ */ jsxs83(MUITable, { size: "medium", stickyHeader: true, children: [
7839
+ /* @__PURE__ */ jsx121(TableHead2, { className: classes.header, children: /* @__PURE__ */ jsx121(TableRow2, { children: headCells?.map((headCell) => /* @__PURE__ */ jsx121(
7733
7840
  TableCell2,
7734
7841
  {
7735
7842
  align: "left",
7736
7843
  sortDirection: orderBy === headCell.id ? order : void 0,
7737
- children: /* @__PURE__ */ jsx120(
7844
+ children: /* @__PURE__ */ jsx121(
7738
7845
  TableSortLabel2,
7739
7846
  {
7740
7847
  active: orderBy === headCell.id,
@@ -7746,9 +7853,9 @@ var Table = ({
7746
7853
  },
7747
7854
  headCell.id
7748
7855
  )) }) }),
7749
- /* @__PURE__ */ jsxs82(TableBody, { children: [
7856
+ /* @__PURE__ */ jsxs83(TableBody, { children: [
7750
7857
  getTableRows(),
7751
- rowsPerPage === emptyRows && /* @__PURE__ */ jsx120(TableRow2, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ jsx120(TableCell2, { colSpan: 8, align: "center", children: "Nothing to display" }) })
7858
+ rowsPerPage === emptyRows && /* @__PURE__ */ jsx121(TableRow2, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ jsx121(TableCell2, { colSpan: 8, align: "center", children: "Nothing to display" }) })
7752
7859
  ] })
7753
7860
  ] }) }) }) });
7754
7861
  };
@@ -7757,22 +7864,22 @@ var Table_default = Table;
7757
7864
  // src/components/TableDesktop/TableDesktop.tsx
7758
7865
  import {
7759
7866
  useMemo as useMemo3,
7760
- useState as useState18,
7867
+ useState as useState19,
7761
7868
  useEffect as useEffect12,
7762
7869
  useRef as useRef7
7763
7870
  } from "react";
7764
- import { Paper as Paper12, Table as Table2, TableBody as TableBody3, TableContainer as TableContainer2, Box as Box39 } from "@mui/material";
7871
+ import { Paper as Paper12, Table as Table2, TableBody as TableBody3, TableContainer as TableContainer2, Box as Box40 } from "@mui/material";
7765
7872
 
7766
7873
  // src/components/TableDesktopLoadingState/TableDesktopLoadingState.tsx
7767
7874
  import { Skeleton as Skeleton5, TableCell as TableCell3, TableRow as TableRow3 } from "@mui/material";
7768
- import { jsx as jsx121 } from "react/jsx-runtime";
7875
+ import { jsx as jsx122 } from "react/jsx-runtime";
7769
7876
  var getRange = (n) => Array.from({ length: n }, (_, i) => i + 1);
7770
7877
  var TableDesktopLoadingState = ({
7771
7878
  numRows,
7772
7879
  numColumns,
7773
7880
  rowHeight = 56
7774
7881
  }) => {
7775
- return getRange(numRows).map((rowNum) => /* @__PURE__ */ jsx121(TableRow3, { children: getRange(numColumns).map((colNum) => /* @__PURE__ */ jsx121(TableCell3, { children: /* @__PURE__ */ jsx121(
7882
+ return getRange(numRows).map((rowNum) => /* @__PURE__ */ jsx122(TableRow3, { children: getRange(numColumns).map((colNum) => /* @__PURE__ */ jsx122(TableCell3, { children: /* @__PURE__ */ jsx122(
7776
7883
  Skeleton5,
7777
7884
  {
7778
7885
  animation: "pulse",
@@ -7788,13 +7895,13 @@ var TableDesktopLoadingState = ({
7788
7895
  import TableBody2 from "@mui/material/TableBody";
7789
7896
  import TableCell4 from "@mui/material/TableCell";
7790
7897
  import TableRow4 from "@mui/material/TableRow";
7791
- import Typography30 from "@mui/material/Typography";
7898
+ import Typography31 from "@mui/material/Typography";
7792
7899
 
7793
7900
  // src/components/Buttons/BaseButton/BaseIconButton.tsx
7794
7901
  import { Button as Button16 } from "@mui/material";
7795
- import { jsxs as jsxs83 } from "react/jsx-runtime";
7902
+ import { jsxs as jsxs84 } from "react/jsx-runtime";
7796
7903
  var BaseIconButton = ({ icon, sx, ...props }) => {
7797
- return /* @__PURE__ */ jsxs83(
7904
+ return /* @__PURE__ */ jsxs84(
7798
7905
  Button16,
7799
7906
  {
7800
7907
  sx: {
@@ -7815,10 +7922,10 @@ var BaseIconButton = ({ icon, sx, ...props }) => {
7815
7922
  };
7816
7923
 
7817
7924
  // src/components/TableDesktopNoColumnsMessage/TableDesktopNoColumnsMessage.tsx
7818
- import { jsx as jsx122, jsxs as jsxs84 } from "react/jsx-runtime";
7925
+ import { jsx as jsx123, jsxs as jsxs85 } from "react/jsx-runtime";
7819
7926
  var TableDesktopNoColumnsMessage = ({
7820
7927
  onClickNoColumnsMessageOpenMenu
7821
- }) => /* @__PURE__ */ jsx122(TableBody2, { children: /* @__PURE__ */ jsx122(TableRow4, { children: /* @__PURE__ */ jsxs84(
7928
+ }) => /* @__PURE__ */ jsx123(TableBody2, { children: /* @__PURE__ */ jsx123(TableRow4, { children: /* @__PURE__ */ jsxs85(
7822
7929
  TableCell4,
7823
7930
  {
7824
7931
  sx: {
@@ -7831,10 +7938,10 @@ var TableDesktopNoColumnsMessage = ({
7831
7938
  alignItems: "center"
7832
7939
  },
7833
7940
  children: [
7834
- /* @__PURE__ */ jsx122(Typography30, { variant: "subtitle2", fontSize: 16, children: "Customise your view" }),
7835
- /* @__PURE__ */ jsx122(Typography30, { variant: "subtitle1", align: "center", color: "textSecondary", children: "Open the menu to customise your table and search." }),
7836
- /* @__PURE__ */ jsxs84(
7837
- Typography30,
7941
+ /* @__PURE__ */ jsx123(Typography31, { variant: "subtitle2", fontSize: 16, children: "Customise your view" }),
7942
+ /* @__PURE__ */ jsx123(Typography31, { variant: "subtitle1", align: "center", color: "textSecondary", children: "Open the menu to customise your table and search." }),
7943
+ /* @__PURE__ */ jsxs85(
7944
+ Typography31,
7838
7945
  {
7839
7946
  variant: "subtitle1",
7840
7947
  align: "center",
@@ -7846,18 +7953,18 @@ var TableDesktopNoColumnsMessage = ({
7846
7953
  },
7847
7954
  children: [
7848
7955
  "Tips: ",
7849
- /* @__PURE__ */ jsx122(Typography30, { component: "strong", children: "Save as default" }),
7956
+ /* @__PURE__ */ jsx123(Typography31, { component: "strong", children: "Save as default" }),
7850
7957
  " to keep these columns for future views"
7851
7958
  ]
7852
7959
  }
7853
7960
  ),
7854
- /* @__PURE__ */ jsx122(
7961
+ /* @__PURE__ */ jsx123(
7855
7962
  BaseIconButton,
7856
7963
  {
7857
7964
  variant: "contained",
7858
7965
  color: "primary",
7859
7966
  onClick: onClickNoColumnsMessageOpenMenu,
7860
- icon: /* @__PURE__ */ jsx122(IconTableEdit_default, { fill: colors.white }),
7967
+ icon: /* @__PURE__ */ jsx123(IconTableEdit_default, { fill: colors.white }),
7861
7968
  children: "OPEN MENU"
7862
7969
  }
7863
7970
  )
@@ -7866,7 +7973,7 @@ var TableDesktopNoColumnsMessage = ({
7866
7973
  ) }) });
7867
7974
 
7868
7975
  // src/components/TableDesktopRows/TableDesktopRows.tsx
7869
- import { jsx as jsx123 } from "react/jsx-runtime";
7976
+ import { jsx as jsx124 } from "react/jsx-runtime";
7870
7977
  var descendingComparator2 = (a, b, orderBy) => {
7871
7978
  const objA = a[orderBy];
7872
7979
  const objB = b[orderBy];
@@ -7912,7 +8019,7 @@ var TableDesktopRows = ({
7912
8019
  const sortedData = disableInternalSort ? data : stableSort2(data, getComparator(order, orderBy));
7913
8020
  return sortedData.map((row, index) => {
7914
8021
  const isItemSelected = selectedRows.has(row[keyField]);
7915
- return /* @__PURE__ */ jsx123(
8022
+ return /* @__PURE__ */ jsx124(
7916
8023
  RenderItem,
7917
8024
  {
7918
8025
  ...{
@@ -7934,8 +8041,8 @@ var TableDesktopRows = ({
7934
8041
  };
7935
8042
 
7936
8043
  // src/components/TableDesktopRowSelectionBar/TableDesktopRowSelectionBar.tsx
7937
- import { Box as Box38, Button as Button17, Typography as Typography31 } from "@mui/material";
7938
- import { jsx as jsx124, jsxs as jsxs85 } from "react/jsx-runtime";
8044
+ import { Box as Box39, Button as Button17, Typography as Typography32 } from "@mui/material";
8045
+ import { jsx as jsx125, jsxs as jsxs86 } from "react/jsx-runtime";
7939
8046
  var TableDesktopRowSelectionBar = ({
7940
8047
  isEveryRowInPageSelected,
7941
8048
  isRowsFromAllPagesSelected,
@@ -7954,8 +8061,8 @@ var TableDesktopRowSelectionBar = ({
7954
8061
  }
7955
8062
  return `${numSelectedRows} row${numSelectedRows > 1 ? "s" : ""} selected.`;
7956
8063
  };
7957
- return isAnyRowSelected ? /* @__PURE__ */ jsxs85(
7958
- Box38,
8064
+ return isAnyRowSelected ? /* @__PURE__ */ jsxs86(
8065
+ Box39,
7959
8066
  {
7960
8067
  sx: {
7961
8068
  p: 1,
@@ -7967,22 +8074,22 @@ var TableDesktopRowSelectionBar = ({
7967
8074
  backgroundColor: colors.neutral150
7968
8075
  },
7969
8076
  children: [
7970
- /* @__PURE__ */ jsx124(Typography31, { children: getSelectedRowsText() }),
7971
- !isRowsFromAllPagesSelected ? /* @__PURE__ */ jsxs85(Button17, { onClick: onSelectRowsFromAllPagesClick, children: [
8077
+ /* @__PURE__ */ jsx125(Typography32, { children: getSelectedRowsText() }),
8078
+ !isRowsFromAllPagesSelected ? /* @__PURE__ */ jsxs86(Button17, { onClick: onSelectRowsFromAllPagesClick, children: [
7972
8079
  "Select all ",
7973
8080
  totalRowCount,
7974
8081
  " rows from all pages based on your filters"
7975
8082
  ] }) : null,
7976
- /* @__PURE__ */ jsx124(Button17, { onClick: onClearSelectionClick, children: "Clear Selection" })
8083
+ /* @__PURE__ */ jsx125(Button17, { onClick: onClearSelectionClick, children: "Clear Selection" })
7977
8084
  ]
7978
8085
  }
7979
8086
  ) : null;
7980
8087
  };
7981
8088
 
7982
8089
  // src/components/TableEmptyResult/TableEmptyResult.tsx
7983
- import { TableCell as TableCell5, TableRow as TableRow5, Typography as Typography32 } from "@mui/material";
8090
+ import { TableCell as TableCell5, TableRow as TableRow5, Typography as Typography33 } from "@mui/material";
7984
8091
  import { makeStyles as makeStyles46 } from "tss-react/mui";
7985
- import { jsx as jsx125, jsxs as jsxs86 } from "react/jsx-runtime";
8092
+ import { jsx as jsx126, jsxs as jsxs87 } from "react/jsx-runtime";
7986
8093
  var useStyles46 = makeStyles46()(() => ({
7987
8094
  tableCellIcon: { padding: 24, height: "calc(100vh - 320px)" },
7988
8095
  tableCellDefault: { padding: 24 }
@@ -7994,17 +8101,17 @@ var TableEmptyResult = ({
7994
8101
  }
7995
8102
  }) => {
7996
8103
  const { classes } = useStyles46();
7997
- return showClearFilterButton ? /* @__PURE__ */ jsx125(TableRow5, { children: /* @__PURE__ */ jsxs86(
8104
+ return showClearFilterButton ? /* @__PURE__ */ jsx126(TableRow5, { children: /* @__PURE__ */ jsxs87(
7998
8105
  TableCell5,
7999
8106
  {
8000
8107
  className: classes.tableCellIcon,
8001
8108
  colSpan,
8002
8109
  align: "center",
8003
8110
  children: [
8004
- /* @__PURE__ */ jsx125(EmptyGlassIcon_default, {}),
8005
- /* @__PURE__ */ jsx125(Typography32, { variant: "h6", children: "No results found." }),
8006
- /* @__PURE__ */ jsx125(Typography32, { variant: "subtitle1", children: "Search without applied filters?" }),
8007
- /* @__PURE__ */ jsx125(
8111
+ /* @__PURE__ */ jsx126(EmptyGlassIcon_default, {}),
8112
+ /* @__PURE__ */ jsx126(Typography33, { variant: "h6", children: "No results found." }),
8113
+ /* @__PURE__ */ jsx126(Typography33, { variant: "subtitle1", children: "Search without applied filters?" }),
8114
+ /* @__PURE__ */ jsx126(
8008
8115
  FilledButton_default,
8009
8116
  {
8010
8117
  copy: "Search",
@@ -8015,7 +8122,7 @@ var TableEmptyResult = ({
8015
8122
  )
8016
8123
  ]
8017
8124
  }
8018
- ) }) : /* @__PURE__ */ jsx125(TableRow5, { children: /* @__PURE__ */ jsx125(
8125
+ ) }) : /* @__PURE__ */ jsx126(TableRow5, { children: /* @__PURE__ */ jsx126(
8019
8126
  TableCell5,
8020
8127
  {
8021
8128
  className: classes.tableCellDefault,
@@ -8028,7 +8135,7 @@ var TableEmptyResult = ({
8028
8135
  var TableEmptyResult_default = TableEmptyResult;
8029
8136
 
8030
8137
  // src/components/TableDesktop/TableDesktop.tsx
8031
- import { Fragment as Fragment14, jsx as jsx126, jsxs as jsxs87 } from "react/jsx-runtime";
8138
+ import { Fragment as Fragment14, jsx as jsx127, jsxs as jsxs88 } from "react/jsx-runtime";
8032
8139
  var TableDesktop = ({
8033
8140
  data = [],
8034
8141
  headCells,
@@ -8056,16 +8163,16 @@ var TableDesktop = ({
8056
8163
  refetchData
8057
8164
  }) => {
8058
8165
  const tableToolbarMenuButtonRef = useRef7(null);
8059
- const [tableToolbarMenuAnchor, setTableToolbarMenuAnchor] = useState18(null);
8060
- const [order, setOrder] = useState18(appliedFilters?.sortDir || "desc");
8061
- const [orderBy, setOrderBy] = useState18(
8166
+ const [tableToolbarMenuAnchor, setTableToolbarMenuAnchor] = useState19(null);
8167
+ const [order, setOrder] = useState19(appliedFilters?.sortDir || "desc");
8168
+ const [orderBy, setOrderBy] = useState19(
8062
8169
  appliedFilters?.sortField || "delivery_date"
8063
8170
  );
8064
- const [selectedRows, setSelectedRows] = useState18(
8171
+ const [selectedRows, setSelectedRows] = useState19(
8065
8172
  /* @__PURE__ */ new Set()
8066
8173
  );
8067
- const [isRowsFromAllPagesSelected, setIsRowsFromAllPagesSelected] = useState18(false);
8068
- const [isBulkChangesMode, setIsBulkChangesMode] = useState18(false);
8174
+ const [isRowsFromAllPagesSelected, setIsRowsFromAllPagesSelected] = useState19(false);
8175
+ const [isBulkChangesMode, setIsBulkChangesMode] = useState19(false);
8069
8176
  const numRows = data.length;
8070
8177
  const numSelectedRows = useMemo3(() => {
8071
8178
  const currentPageIds = new Set(data.map((row) => row[keyField]));
@@ -8143,7 +8250,7 @@ var TableDesktop = ({
8143
8250
  }, [isRowsFromAllPagesSelected, data]);
8144
8251
  const renderBody = () => {
8145
8252
  if (isLoading) {
8146
- return /* @__PURE__ */ jsx126(
8253
+ return /* @__PURE__ */ jsx127(
8147
8254
  TableDesktopLoadingState,
8148
8255
  {
8149
8256
  numRows: Math.min(rowsPerPage, 10),
@@ -8153,7 +8260,7 @@ var TableDesktop = ({
8153
8260
  );
8154
8261
  }
8155
8262
  if (numRows === 0) {
8156
- return /* @__PURE__ */ jsx126(
8263
+ return /* @__PURE__ */ jsx127(
8157
8264
  TableEmptyResult_default,
8158
8265
  {
8159
8266
  showClearFilterButton,
@@ -8162,7 +8269,7 @@ var TableDesktop = ({
8162
8269
  }
8163
8270
  );
8164
8271
  }
8165
- return /* @__PURE__ */ jsx126(
8272
+ return /* @__PURE__ */ jsx127(
8166
8273
  TableDesktopRows,
8167
8274
  {
8168
8275
  data,
@@ -8181,8 +8288,8 @@ var TableDesktop = ({
8181
8288
  }
8182
8289
  );
8183
8290
  };
8184
- return /* @__PURE__ */ jsx126(
8185
- Box39,
8291
+ return /* @__PURE__ */ jsx127(
8292
+ Box40,
8186
8293
  {
8187
8294
  sx: {
8188
8295
  height,
@@ -8190,7 +8297,7 @@ var TableDesktop = ({
8190
8297
  justifyContent: "space-between",
8191
8298
  justifyItems: "stretch"
8192
8299
  },
8193
- children: /* @__PURE__ */ jsxs87(
8300
+ children: /* @__PURE__ */ jsxs88(
8194
8301
  Paper12,
8195
8302
  {
8196
8303
  sx: {
@@ -8215,7 +8322,7 @@ var TableDesktop = ({
8215
8322
  isBulkChangesMode,
8216
8323
  onChangeBulkChangesMode: handleChangeBulkChangesMode
8217
8324
  }) : null,
8218
- /* @__PURE__ */ jsx126(
8325
+ /* @__PURE__ */ jsx127(
8219
8326
  TableDesktopRowSelectionBar,
8220
8327
  {
8221
8328
  isEveryRowInPageSelected,
@@ -8226,7 +8333,7 @@ var TableDesktop = ({
8226
8333
  onClearSelectionClick: handleClearSelectionClick
8227
8334
  }
8228
8335
  ),
8229
- /* @__PURE__ */ jsx126(
8336
+ /* @__PURE__ */ jsx127(
8230
8337
  TableContainer2,
8231
8338
  {
8232
8339
  sx: {
@@ -8248,13 +8355,13 @@ var TableDesktop = ({
8248
8355
  backgroundColor: (theme) => theme.palette.grey[500]
8249
8356
  }
8250
8357
  },
8251
- children: /* @__PURE__ */ jsx126(Table2, { stickyHeader: true, "aria-label": "sticky-table", sx: { tableLayout }, children: visibleHeadCells.length === 0 ? /* @__PURE__ */ jsx126(
8358
+ children: /* @__PURE__ */ jsx127(Table2, { stickyHeader: true, "aria-label": "sticky-table", sx: { tableLayout }, children: visibleHeadCells.length === 0 ? /* @__PURE__ */ jsx127(
8252
8359
  TableDesktopNoColumnsMessage,
8253
8360
  {
8254
8361
  onClickNoColumnsMessageOpenMenu: handleClickToolbarMenuOpen
8255
8362
  }
8256
- ) : /* @__PURE__ */ jsxs87(Fragment14, { children: [
8257
- /* @__PURE__ */ jsx126(
8363
+ ) : /* @__PURE__ */ jsxs88(Fragment14, { children: [
8364
+ /* @__PURE__ */ jsx127(
8258
8365
  SmartTableHeader,
8259
8366
  {
8260
8367
  order,
@@ -8270,7 +8377,7 @@ var TableDesktop = ({
8270
8377
  shouldShowCheckOnFilter
8271
8378
  }
8272
8379
  ),
8273
- /* @__PURE__ */ jsx126(TableBody3, { children: renderBody() })
8380
+ /* @__PURE__ */ jsx127(TableBody3, { children: renderBody() })
8274
8381
  ] }) })
8275
8382
  }
8276
8383
  ),
@@ -8287,99 +8394,141 @@ var TableDesktop = ({
8287
8394
  };
8288
8395
 
8289
8396
  // src/components/TableDesktopEditableField/TableDesktopEditableField.tsx
8290
- import { Checkbox as Checkbox7, FormControlLabel as FormControlLabel5 } from "@mui/material";
8397
+ import { useEffect as useEffect13, useState as useState22 } from "react";
8398
+ import DeleteIcon from "@mui/icons-material/Delete";
8399
+ import { Checkbox as Checkbox8, FormControlLabel as FormControlLabel5 } from "@mui/material";
8400
+ import { DatePicker, TimePicker } from "@mui/x-date-pickers";
8401
+ import moment2 from "moment";
8402
+
8403
+ // src/components/TableDesktopEditableField/TableDesktopSmartMultipleSelect.tsx
8404
+ import { useMemo as useMemo4 } from "react";
8405
+ import { jsx as jsx128 } from "react/jsx-runtime";
8406
+ var TableDesktopSmartMultipleSelect = ({
8407
+ initialValue,
8408
+ inputLabel,
8409
+ columnId,
8410
+ fieldName,
8411
+ rowId,
8412
+ disabled,
8413
+ variant = "standard",
8414
+ size,
8415
+ filterOptions,
8416
+ refetchFilterOptions,
8417
+ isFetchingFilterOptions,
8418
+ onUpdateEditableCell
8419
+ }) => {
8420
+ const defaultValues = useMemo4(() => {
8421
+ return initialValue.map((val) => ({
8422
+ value: val.id,
8423
+ label: val[fieldName].toString()
8424
+ }));
8425
+ }, [initialValue]);
8426
+ return /* @__PURE__ */ jsx128(
8427
+ SmartMultipleSelect,
8428
+ {
8429
+ inputLabel,
8430
+ size,
8431
+ variant,
8432
+ disabled,
8433
+ defaultValues,
8434
+ menuOptions: filterOptions,
8435
+ isLoading: isFetchingFilterOptions,
8436
+ onOpen: () => {
8437
+ if (!filterOptions?.length) {
8438
+ refetchFilterOptions?.();
8439
+ }
8440
+ },
8441
+ onClose: (values) => {
8442
+ const optionsValues = values.map((option) => option.value ?? "");
8443
+ onUpdateEditableCell?.({
8444
+ rowId,
8445
+ columnId,
8446
+ value: optionsValues,
8447
+ label: optionsValues
8448
+ });
8449
+ }
8450
+ }
8451
+ );
8452
+ };
8291
8453
 
8292
8454
  // src/components/TableDesktopEditableField/TableDesktopSmartSelect.tsx
8293
- import { useState as useState19, memo as memo22, useEffect as useEffect13 } from "react";
8294
- import { jsx as jsx127 } from "react/jsx-runtime";
8295
- var TableDesktopSmartSelect = memo22(
8296
- ({
8297
- ref,
8298
- initialValue,
8299
- inputLabel,
8300
- field,
8301
- fieldName,
8302
- rowId,
8303
- disabled,
8304
- variant = "standard",
8305
- size,
8306
- filterOptions,
8307
- refetchFilterOptions,
8308
- isFetchingFilterOptions,
8309
- onUpdateEditableCell
8310
- }) => {
8311
- const [value, setValue] = useState19(
8312
- initialValue
8313
- );
8314
- const [options, setOptions] = useState19();
8315
- const valueId = resolveObjectType(value, "id");
8316
- const valueLabel = resolveObjectType(value, fieldName);
8317
- useEffect13(() => {
8318
- if (filterOptions) {
8319
- const parsedOptions = filterOptions?.map(
8320
- (option) => ({
8321
- value: resolveObjectType(option, "id"),
8322
- label: String(resolveObjectType(option, fieldName))
8323
- })
8324
- );
8325
- setOptions(parsedOptions);
8326
- }
8327
- }, [filterOptions]);
8328
- return /* @__PURE__ */ jsx127(
8329
- SmartSelect_default,
8330
- {
8331
- ref,
8332
- value: valueId,
8333
- inputLabel,
8334
- options,
8335
- disabled,
8336
- variant,
8337
- size,
8338
- refetch: refetchFilterOptions,
8339
- isFetching: isFetchingFilterOptions,
8340
- defaultOption: {
8341
- value: valueId ?? "",
8342
- label: String(valueLabel ?? "")
8343
- },
8344
- onChange: ({ value: id, label: name }) => {
8345
- if (!id || !name) {
8346
- return;
8347
- }
8348
- setValue({ id, name });
8349
- if (!onUpdateEditableCell) {
8350
- return;
8351
- }
8352
- onUpdateEditableCell(rowId ?? 0, field, id, name);
8353
- }
8455
+ import { useState as useState20 } from "react";
8456
+ import { jsx as jsx129 } from "react/jsx-runtime";
8457
+ var TableDesktopSmartSelect = ({
8458
+ ref,
8459
+ initialValue,
8460
+ inputLabel,
8461
+ columnId,
8462
+ fieldName,
8463
+ rowId,
8464
+ disabled,
8465
+ variant = "standard",
8466
+ size,
8467
+ allowBlankOption,
8468
+ filterOptions,
8469
+ refetchFilterOptions,
8470
+ isFetchingFilterOptions,
8471
+ onUpdateEditableCell
8472
+ }) => {
8473
+ const [value, setValue] = useState20(
8474
+ initialValue
8475
+ );
8476
+ const valueId = resolveObjectType(value ?? "", "id");
8477
+ const valueLabel = resolveObjectType(value ?? "", fieldName);
8478
+ return /* @__PURE__ */ jsx129(
8479
+ SmartSelect_default,
8480
+ {
8481
+ ref,
8482
+ value: valueId,
8483
+ allowBlankOption,
8484
+ inputLabel,
8485
+ options: filterOptions,
8486
+ disabled,
8487
+ variant,
8488
+ size,
8489
+ refetch: refetchFilterOptions,
8490
+ isFetching: isFetchingFilterOptions,
8491
+ defaultOption: {
8492
+ value: valueId ?? "",
8493
+ label: String(valueLabel ?? "")
8494
+ },
8495
+ onChange: ({ value: id, label }) => {
8496
+ setValue({ id: id ?? "", name: label ?? "" });
8497
+ onUpdateEditableCell?.({
8498
+ rowId,
8499
+ columnId,
8500
+ value: id || null,
8501
+ label: label ?? ""
8502
+ });
8354
8503
  }
8355
- );
8356
- }
8357
- );
8504
+ }
8505
+ );
8506
+ };
8358
8507
 
8359
8508
  // src/components/TableDesktopEditableField/TableDesktopTextField.tsx
8360
- import { useMemo as useMemo4, useState as useState20, useRef as useRef8 } from "react";
8509
+ import { useMemo as useMemo5, useState as useState21, useRef as useRef8 } from "react";
8361
8510
  import { TextField as TextField8 } from "@mui/material";
8362
- import { jsx as jsx128 } from "react/jsx-runtime";
8511
+ import { jsx as jsx130 } from "react/jsx-runtime";
8363
8512
  var TableDesktopTextField = ({
8364
8513
  rowId,
8365
8514
  initialValue,
8366
8515
  inputLabel,
8367
8516
  disabled,
8368
- field,
8517
+ columnId,
8369
8518
  type,
8370
8519
  variant = "standard",
8371
8520
  size,
8372
8521
  validateInput,
8373
8522
  onUpdateEditableCell
8374
8523
  }) => {
8375
- const [input, setInput] = useState20(initialValue);
8524
+ const [input, setInput] = useState21(initialValue);
8376
8525
  const oldValue = useRef8(initialValue);
8377
- const isDirty = useMemo4(
8526
+ const isDirty = useMemo5(
8378
8527
  () => input !== oldValue.current,
8379
8528
  [input, oldValue.current]
8380
8529
  );
8381
- const hasValidationError = useMemo4(
8382
- () => isDirty && !validateInput?.(input),
8530
+ const hasValidationError = useMemo5(
8531
+ () => isDirty && validateInput && !validateInput(input),
8383
8532
  [input, validateInput]
8384
8533
  );
8385
8534
  const commitValue = (value) => {
@@ -8388,7 +8537,7 @@ var TableDesktopTextField = ({
8388
8537
  return;
8389
8538
  }
8390
8539
  oldValue.current = value;
8391
- onUpdateEditableCell(rowId ?? 0, field, value, value);
8540
+ onUpdateEditableCell({ rowId, columnId, value, label: value });
8392
8541
  };
8393
8542
  const handleKeyDown = (e) => {
8394
8543
  if (e.key === "Enter") {
@@ -8396,7 +8545,7 @@ var TableDesktopTextField = ({
8396
8545
  commitValue(input);
8397
8546
  }
8398
8547
  };
8399
- return /* @__PURE__ */ jsx128(
8548
+ return /* @__PURE__ */ jsx130(
8400
8549
  TextField8,
8401
8550
  {
8402
8551
  fullWidth: true,
@@ -8419,6 +8568,9 @@ var TableDesktopTextField = ({
8419
8568
  slotProps: {
8420
8569
  input: {
8421
8570
  inputMode: type === "numeric" ? "numeric" : void 0
8571
+ },
8572
+ htmlInput: {
8573
+ maxLength: 1e3
8422
8574
  }
8423
8575
  }
8424
8576
  }
@@ -8426,63 +8578,98 @@ var TableDesktopTextField = ({
8426
8578
  };
8427
8579
 
8428
8580
  // src/components/TableDesktopEditableField/TableDesktopEditableField.tsx
8429
- import { jsx as jsx129 } from "react/jsx-runtime";
8581
+ import { jsx as jsx131 } from "react/jsx-runtime";
8430
8582
  var TableDesktopEditableField = ({
8431
8583
  editInitialValue,
8432
8584
  rowId,
8433
- field,
8434
- fieldName,
8435
8585
  disabled,
8436
- inputLabel,
8437
8586
  showCheckboxLabel = false,
8438
8587
  variant = "standard",
8439
8588
  size,
8440
- editableCellType,
8441
- filterOptions,
8442
- refetchFilterOptions,
8443
- isFetchingFilterOptions,
8444
- validateInput,
8445
- onUpdateEditableCell
8589
+ onUpdateEditableCell,
8590
+ headCell: {
8591
+ id: columnId,
8592
+ fieldName = "",
8593
+ label: inputLabel = "",
8594
+ editableCellType,
8595
+ filterOptions,
8596
+ refetchFilterOptions,
8597
+ isFetchingFilterOptions,
8598
+ validateInput,
8599
+ allowBlankSelectOption
8600
+ }
8446
8601
  }) => {
8602
+ const [parsedFilterOptions, setParsedFilterOptions] = useState22();
8603
+ useEffect13(() => {
8604
+ if (filterOptions && editableCellType === "select" || editableCellType === "multipleSelect") {
8605
+ const parsedOptions = filterOptions?.map(
8606
+ (option) => ({
8607
+ value: resolveObjectType(option, "id"),
8608
+ label: String(resolveObjectType(option, fieldName))
8609
+ })
8610
+ );
8611
+ setParsedFilterOptions(parsedOptions);
8612
+ }
8613
+ }, [filterOptions, editableCellType]);
8447
8614
  const editableComponents = {
8448
- select: /* @__PURE__ */ jsx129(
8615
+ select: /* @__PURE__ */ jsx131(
8449
8616
  TableDesktopSmartSelect,
8450
8617
  {
8451
8618
  rowId,
8452
- field,
8619
+ columnId,
8620
+ fieldName,
8621
+ disabled,
8622
+ variant,
8623
+ size,
8624
+ allowBlankOption: allowBlankSelectOption,
8625
+ initialValue: editInitialValue,
8626
+ inputLabel,
8627
+ filterOptions: parsedFilterOptions,
8628
+ refetchFilterOptions,
8629
+ isFetchingFilterOptions,
8630
+ onUpdateEditableCell
8631
+ }
8632
+ ),
8633
+ multipleSelect: /* @__PURE__ */ jsx131(
8634
+ TableDesktopSmartMultipleSelect,
8635
+ {
8636
+ rowId,
8637
+ columnId,
8453
8638
  fieldName,
8454
8639
  disabled,
8455
8640
  variant,
8456
8641
  size,
8457
8642
  initialValue: editInitialValue,
8458
8643
  inputLabel,
8459
- filterOptions,
8644
+ filterOptions: parsedFilterOptions,
8460
8645
  refetchFilterOptions,
8461
8646
  isFetchingFilterOptions,
8462
8647
  onUpdateEditableCell
8463
8648
  }
8464
8649
  ),
8465
- checkbox: /* @__PURE__ */ jsx129(
8650
+ checkbox: /* @__PURE__ */ jsx131(
8466
8651
  FormControlLabel5,
8467
8652
  {
8468
8653
  label: showCheckboxLabel ? inputLabel : "",
8469
- control: /* @__PURE__ */ jsx129(
8470
- Checkbox7,
8654
+ control: /* @__PURE__ */ jsx131(
8655
+ Checkbox8,
8471
8656
  {
8472
8657
  disableRipple: true,
8473
8658
  disabled,
8474
8659
  defaultChecked: editInitialValue,
8475
8660
  onChange: ({ target: { checked } }) => {
8476
- if (!onUpdateEditableCell) {
8477
- return;
8478
- }
8479
- onUpdateEditableCell(rowId ?? 0, field, checked, checked);
8661
+ onUpdateEditableCell?.({
8662
+ rowId,
8663
+ columnId,
8664
+ value: checked,
8665
+ label: checked
8666
+ });
8480
8667
  }
8481
8668
  }
8482
8669
  )
8483
8670
  }
8484
8671
  ),
8485
- text: /* @__PURE__ */ jsx129(
8672
+ text: /* @__PURE__ */ jsx131(
8486
8673
  TableDesktopTextField,
8487
8674
  {
8488
8675
  type: "text",
@@ -8490,14 +8677,14 @@ var TableDesktopEditableField = ({
8490
8677
  disabled,
8491
8678
  variant,
8492
8679
  size,
8493
- field,
8680
+ columnId,
8494
8681
  initialValue: editInitialValue ?? "",
8495
8682
  inputLabel: inputLabel ?? "",
8496
8683
  validateInput,
8497
8684
  onUpdateEditableCell
8498
8685
  }
8499
8686
  ),
8500
- numeric: /* @__PURE__ */ jsx129(
8687
+ numeric: /* @__PURE__ */ jsx131(
8501
8688
  TableDesktopTextField,
8502
8689
  {
8503
8690
  type: "numeric",
@@ -8505,29 +8692,88 @@ var TableDesktopEditableField = ({
8505
8692
  disabled,
8506
8693
  variant,
8507
8694
  size,
8508
- field,
8695
+ columnId,
8509
8696
  initialValue: editInitialValue ?? "",
8510
8697
  inputLabel: inputLabel ?? "",
8511
8698
  validateInput,
8512
8699
  onUpdateEditableCell
8513
8700
  }
8701
+ ),
8702
+ date: /* @__PURE__ */ jsx131(
8703
+ DatePicker,
8704
+ {
8705
+ defaultValue: moment2(editInitialValue),
8706
+ label: inputLabel,
8707
+ format: "DD/MM/YYYY",
8708
+ sx: { overflowY: "hidden" },
8709
+ onAccept: (value) => {
8710
+ const formattedValue = value?.format("YYYY-MM-DD") ?? null;
8711
+ const formattedLabel = value?.format("DD/MM/YYYY") ?? null;
8712
+ onUpdateEditableCell?.({
8713
+ rowId,
8714
+ columnId,
8715
+ value: formattedValue,
8716
+ label: formattedLabel
8717
+ });
8718
+ },
8719
+ slots: { clearIcon: DeleteIcon },
8720
+ slotProps: {
8721
+ field: { clearable: true },
8722
+ clearButton: { sx: { p: 0.5 } },
8723
+ openPickerButton: { sx: { p: 0 } },
8724
+ textField: {
8725
+ variant: "standard",
8726
+ error: false
8727
+ }
8728
+ }
8729
+ }
8730
+ ),
8731
+ time: /* @__PURE__ */ jsx131(
8732
+ TimePicker,
8733
+ {
8734
+ defaultValue: moment2(editInitialValue, "HH:mm:ss"),
8735
+ label: inputLabel,
8736
+ sx: { overflowY: "hidden" },
8737
+ onAccept: (value) => {
8738
+ const formattedValue = value?.format("HH:mm") ?? null;
8739
+ onUpdateEditableCell?.({
8740
+ rowId,
8741
+ columnId,
8742
+ value: formattedValue,
8743
+ label: formattedValue
8744
+ });
8745
+ },
8746
+ slots: { clearIcon: DeleteIcon },
8747
+ slotProps: {
8748
+ field: { clearable: true },
8749
+ clearButton: { sx: { p: 0.5 } },
8750
+ openPickerButton: { sx: { p: 0 } },
8751
+ textField: {
8752
+ variant: "standard",
8753
+ error: false
8754
+ }
8755
+ }
8756
+ }
8514
8757
  )
8515
8758
  };
8759
+ if (!editableCellType) {
8760
+ return null;
8761
+ }
8516
8762
  return editableComponents[editableCellType];
8517
8763
  };
8518
8764
 
8519
8765
  // src/components/TableDesktopFooter/TableDesktopFooter.tsx
8520
8766
  import Refresh3 from "@mui/icons-material/Refresh";
8521
8767
  import {
8522
- Box as Box40,
8768
+ Box as Box41,
8523
8769
  Button as Button18,
8524
8770
  MenuItem as MenuItem4,
8525
8771
  Pagination as Pagination2,
8526
- Select as Select4,
8772
+ Select as Select5,
8527
8773
  Stack,
8528
- Typography as Typography33
8774
+ Typography as Typography34
8529
8775
  } from "@mui/material";
8530
- import { jsx as jsx130, jsxs as jsxs88 } from "react/jsx-runtime";
8776
+ import { jsx as jsx132, jsxs as jsxs89 } from "react/jsx-runtime";
8531
8777
  var TableDesktopFooter = ({
8532
8778
  numPages,
8533
8779
  page,
@@ -8538,8 +8784,8 @@ var TableDesktopFooter = ({
8538
8784
  refetchData,
8539
8785
  isFetching
8540
8786
  }) => {
8541
- return /* @__PURE__ */ jsxs88(
8542
- Box40,
8787
+ return /* @__PURE__ */ jsxs89(
8788
+ Box41,
8543
8789
  {
8544
8790
  sx: {
8545
8791
  py: 1,
@@ -8550,7 +8796,7 @@ var TableDesktopFooter = ({
8550
8796
  borderTop: `1px solid ${colors.neutral300}`
8551
8797
  },
8552
8798
  children: [
8553
- refetchData ? /* @__PURE__ */ jsxs88(
8799
+ refetchData ? /* @__PURE__ */ jsxs89(
8554
8800
  Button18,
8555
8801
  {
8556
8802
  disableRipple: true,
@@ -8565,7 +8811,7 @@ var TableDesktopFooter = ({
8565
8811
  borderColor: colors.neutral600
8566
8812
  },
8567
8813
  children: [
8568
- /* @__PURE__ */ jsx130(
8814
+ /* @__PURE__ */ jsx132(
8569
8815
  Refresh3,
8570
8816
  {
8571
8817
  fontSize: "small",
@@ -8576,21 +8822,21 @@ var TableDesktopFooter = ({
8576
8822
  ]
8577
8823
  }
8578
8824
  ) : null,
8579
- /* @__PURE__ */ jsxs88(Box40, { sx: { display: "flex", ml: "auto", py: 1 }, children: [
8580
- pageSize && pageSizeOptions && onPageSizeChange ? /* @__PURE__ */ jsxs88(Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
8581
- /* @__PURE__ */ jsx130(Typography33, { children: "Rows per page:" }),
8582
- /* @__PURE__ */ jsx130(
8583
- Select4,
8825
+ /* @__PURE__ */ jsxs89(Box41, { sx: { display: "flex", ml: "auto", py: 1 }, children: [
8826
+ pageSize && pageSizeOptions && onPageSizeChange ? /* @__PURE__ */ jsxs89(Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
8827
+ /* @__PURE__ */ jsx132(Typography34, { children: "Rows per page:" }),
8828
+ /* @__PURE__ */ jsx132(
8829
+ Select5,
8584
8830
  {
8585
8831
  value: pageSize,
8586
8832
  onChange: onPageSizeChange,
8587
8833
  size: "small",
8588
8834
  variant: "standard",
8589
- children: pageSizeOptions.map((pageSizeOption) => /* @__PURE__ */ jsx130(MenuItem4, { value: pageSizeOption, children: pageSizeOption }, pageSizeOption))
8835
+ children: pageSizeOptions.map((pageSizeOption) => /* @__PURE__ */ jsx132(MenuItem4, { value: pageSizeOption, children: pageSizeOption }, pageSizeOption))
8590
8836
  }
8591
8837
  )
8592
8838
  ] }) : null,
8593
- /* @__PURE__ */ jsx130(
8839
+ /* @__PURE__ */ jsx132(
8594
8840
  Pagination2,
8595
8841
  {
8596
8842
  color: "standard",
@@ -8606,15 +8852,15 @@ var TableDesktopFooter = ({
8606
8852
  };
8607
8853
 
8608
8854
  // src/components/TableDesktopCell/TableDesktopCell.tsx
8609
- import { useEffect as useEffect14, useState as useState21 } from "react";
8855
+ import { useEffect as useEffect14, useState as useState23 } from "react";
8610
8856
  import CheckIcon3 from "@mui/icons-material/Check";
8611
8857
  import CloseIcon from "@mui/icons-material/Close";
8612
8858
  import EditIcon from "@mui/icons-material/Edit";
8613
8859
  import { IconButton as IconButton5, TableCell as TableCell6, Tooltip as Tooltip10 } from "@mui/material";
8614
- import { Fragment as Fragment15, jsx as jsx131, jsxs as jsxs89 } from "react/jsx-runtime";
8860
+ import { Fragment as Fragment15, jsx as jsx133, jsxs as jsxs90 } from "react/jsx-runtime";
8615
8861
  var getReadOnlyBooleanIcon = (value) => {
8616
8862
  if (value) {
8617
- return /* @__PURE__ */ jsx131(CheckIcon3, { sx: { fontSize: 16 } });
8863
+ return /* @__PURE__ */ jsx133(CheckIcon3, { sx: { fontSize: 16 } });
8618
8864
  }
8619
8865
  return "-";
8620
8866
  };
@@ -8628,25 +8874,17 @@ var getCellBackgroundColor = (isCellInEditMode) => ({
8628
8874
  background: isCellInEditMode ? colors.lightBlueBackground : colors.neutral100
8629
8875
  });
8630
8876
  var TableDesktopCell = ({
8631
- inputLabel,
8632
8877
  editInitialValue,
8633
8878
  rowId,
8634
- field,
8635
- fieldName,
8636
- width,
8637
- enableEditMode,
8638
8879
  disabled,
8880
+ enableEditMode,
8639
8881
  readOnlyValue,
8640
- editableCellType,
8641
- filterOptions,
8642
- refetchFilterOptions,
8643
- isFetchingFilterOptions,
8644
- validateInput,
8645
- onUpdateEditableCell,
8646
- onCellClick
8882
+ onCellClick,
8883
+ headCell
8647
8884
  }) => {
8648
- const [isCellHovered, setIsCellHovered] = useState21(false);
8649
- const [isCellInEditMode, setIsCellInEditMode] = useState21(false);
8885
+ const [isCellHovered, setIsCellHovered] = useState23(false);
8886
+ const [isCellInEditMode, setIsCellInEditMode] = useState23(false);
8887
+ const { width, editableCellType } = headCell;
8650
8888
  useEffect14(() => {
8651
8889
  const handleKeyDown = (e) => {
8652
8890
  if (e.key === "Escape") {
@@ -8654,10 +8892,10 @@ var TableDesktopCell = ({
8654
8892
  }
8655
8893
  };
8656
8894
  if (isCellInEditMode) {
8657
- window.addEventListener("keydown", handleKeyDown);
8895
+ globalThis.addEventListener("keydown", handleKeyDown);
8658
8896
  }
8659
8897
  return () => {
8660
- window.removeEventListener("keydown", handleKeyDown);
8898
+ globalThis.removeEventListener("keydown", handleKeyDown);
8661
8899
  };
8662
8900
  }, [isCellInEditMode]);
8663
8901
  const handleEditClick = (e) => {
@@ -8665,7 +8903,7 @@ var TableDesktopCell = ({
8665
8903
  setIsCellInEditMode((prev) => !prev);
8666
8904
  };
8667
8905
  const isCellEditable = !!enableEditMode && !!editableCellType && !disabled;
8668
- return /* @__PURE__ */ jsx131(
8906
+ return /* @__PURE__ */ jsx133(
8669
8907
  TableCell6,
8670
8908
  {
8671
8909
  align: "left",
@@ -8681,8 +8919,8 @@ var TableDesktopCell = ({
8681
8919
  ":hover": isCellEditable ? getCellBackgroundColor(isCellInEditMode) : void 0,
8682
8920
  background: enableEditMode && isCellInEditMode ? colors.lightBlueBackground : void 0
8683
8921
  },
8684
- children: /* @__PURE__ */ jsx131(DynamicOverflowTooltip, { tooltipDescription: String(readOnlyValue), arrow: true, children: /* @__PURE__ */ jsxs89(Fragment15, { children: [
8685
- enableEditMode && isCellHovered ? /* @__PURE__ */ jsx131(Tooltip10, { title: isCellInEditMode ? "" : "Toggle Edit Mode", children: /* @__PURE__ */ jsx131(
8922
+ children: /* @__PURE__ */ jsx133(DynamicOverflowTooltip, { tooltipDescription: String(readOnlyValue), arrow: true, children: /* @__PURE__ */ jsxs90(Fragment15, { children: [
8923
+ enableEditMode && isCellHovered ? /* @__PURE__ */ jsx133(Tooltip10, { title: isCellInEditMode ? "" : "Toggle Edit Mode", children: /* @__PURE__ */ jsx133(
8686
8924
  IconButton5,
8687
8925
  {
8688
8926
  onClick: handleEditClick,
@@ -8697,24 +8935,17 @@ var TableDesktopCell = ({
8697
8935
  backgroundColor: isCellInEditMode ? colors.lightBlueBackground : colors.neutral150
8698
8936
  }
8699
8937
  },
8700
- children: isCellInEditMode ? /* @__PURE__ */ jsx131(CloseIcon, { fontSize: "small", color: "error" }) : /* @__PURE__ */ jsx131(EditIcon, { fontSize: "small" })
8938
+ children: isCellInEditMode ? /* @__PURE__ */ jsx133(CloseIcon, { fontSize: "small", color: "error" }) : /* @__PURE__ */ jsx133(EditIcon, { fontSize: "small" })
8701
8939
  }
8702
8940
  ) }) : null,
8703
- enableEditMode && isCellInEditMode && editableCellType ? /* @__PURE__ */ jsx131(
8941
+ enableEditMode && isCellInEditMode && editableCellType ? /* @__PURE__ */ jsx133(
8704
8942
  TableDesktopEditableField,
8705
8943
  {
8706
8944
  editInitialValue,
8707
8945
  rowId,
8708
- field,
8709
- fieldName,
8710
8946
  disabled,
8711
- inputLabel: inputLabel ?? "",
8712
- editableCellType,
8713
- filterOptions,
8714
- refetchFilterOptions,
8715
- isFetchingFilterOptions,
8716
- validateInput,
8717
- onUpdateEditableCell
8947
+ headCell,
8948
+ onUpdateEditableCell: headCell.onUpdateEditableCell
8718
8949
  }
8719
8950
  ) : renderReadOnlyValue(readOnlyValue)
8720
8951
  ] }) })
@@ -8724,24 +8955,24 @@ var TableDesktopCell = ({
8724
8955
 
8725
8956
  // src/components/TableDesktopToolbar/TableDesktopToolbar.tsx
8726
8957
  import {
8727
- useState as useState22,
8728
- useMemo as useMemo5,
8958
+ useState as useState24,
8959
+ useMemo as useMemo6,
8729
8960
  useRef as useRef9
8730
8961
  } from "react";
8731
8962
  import Download from "@mui/icons-material/Download";
8732
8963
  import KeyboardArrowLeft2 from "@mui/icons-material/KeyboardArrowLeft";
8733
8964
  import KeyboardArrowRight2 from "@mui/icons-material/KeyboardArrowRight";
8734
8965
  import {
8735
- Box as Box41,
8966
+ Box as Box42,
8736
8967
  Button as Button19,
8737
8968
  Divider as Divider11,
8738
8969
  FormControlLabel as FormControlLabel6,
8739
8970
  IconButton as IconButton6,
8740
8971
  Switch as Switch2,
8741
8972
  Tooltip as Tooltip11,
8742
- Typography as Typography34
8973
+ Typography as Typography35
8743
8974
  } from "@mui/material";
8744
- import { Fragment as Fragment16, jsx as jsx132, jsxs as jsxs90 } from "react/jsx-runtime";
8975
+ import { Fragment as Fragment16, jsx as jsx134, jsxs as jsxs91 } from "react/jsx-runtime";
8745
8976
  var TableDesktopToolbar = ({
8746
8977
  toolbarLabel,
8747
8978
  headCells,
@@ -8764,11 +8995,11 @@ var TableDesktopToolbar = ({
8764
8995
  renderInfoIcons
8765
8996
  }) => {
8766
8997
  const scrollRef = useRef9(null);
8767
- const [bulkChanges, setBulkChanges] = useState22([]);
8768
- const [isBulkChangesDialogOpen, setIsBulkChangesDialogOpen] = useState22(false);
8769
- const [isExportCsvDialogOpen, setIsExportCsvDialogOpen] = useState22(false);
8770
- const [resetCounter, setResetCounter] = useState22(0);
8771
- const visibleEditableColumns = useMemo5(
8998
+ const [bulkChanges, setBulkChanges] = useState24([]);
8999
+ const [isBulkChangesDialogOpen, setIsBulkChangesDialogOpen] = useState24(false);
9000
+ const [isExportCsvDialogOpen, setIsExportCsvDialogOpen] = useState24(false);
9001
+ const [resetCounter, setResetCounter] = useState24(0);
9002
+ const visibleEditableColumns = useMemo6(
8772
9003
  () => headCells.filter(
8773
9004
  (headCell) => headCell?.enabled && !!headCell?.editableCellType
8774
9005
  ),
@@ -8785,13 +9016,17 @@ var TableDesktopToolbar = ({
8785
9016
  refetchData?.();
8786
9017
  }
8787
9018
  };
8788
- const handleUpdateEditableCell = (_rowId, field, value, label) => {
9019
+ const handleUpdateEditableCell = ({
9020
+ columnId,
9021
+ value,
9022
+ label
9023
+ }) => {
8789
9024
  setBulkChanges((prev) => {
8790
- return [...prev, { field, value, label }];
9025
+ return [...prev, { field: columnId, value, label }];
8791
9026
  });
8792
9027
  };
8793
- return /* @__PURE__ */ jsxs90(
8794
- Box41,
9028
+ return /* @__PURE__ */ jsxs91(
9029
+ Box42,
8795
9030
  {
8796
9031
  sx: {
8797
9032
  borderBottom: "1px solid",
@@ -8799,8 +9034,8 @@ var TableDesktopToolbar = ({
8799
9034
  maxWidth: "100%"
8800
9035
  },
8801
9036
  children: [
8802
- /* @__PURE__ */ jsxs90(
8803
- Box41,
9037
+ /* @__PURE__ */ jsxs91(
9038
+ Box42,
8804
9039
  {
8805
9040
  sx: {
8806
9041
  py: 1,
@@ -8811,8 +9046,8 @@ var TableDesktopToolbar = ({
8811
9046
  background: isBulkChangesMode ? colors.neutral150 : void 0
8812
9047
  },
8813
9048
  children: [
8814
- /* @__PURE__ */ jsxs90(
8815
- Box41,
9049
+ /* @__PURE__ */ jsxs91(
9050
+ Box42,
8816
9051
  {
8817
9052
  sx: {
8818
9053
  py: 1,
@@ -8822,20 +9057,20 @@ var TableDesktopToolbar = ({
8822
9057
  whiteSpace: "nowrap"
8823
9058
  },
8824
9059
  children: [
8825
- toolbarLabel ? /* @__PURE__ */ jsxs90(Fragment16, { children: [
8826
- /* @__PURE__ */ jsx132(Typography34, { variant: "subtitle2", color: "textSecondary", children: toolbarLabel }),
8827
- /* @__PURE__ */ jsx132(Divider11, { orientation: "vertical", sx: { height: 0.75, py: 2.5 } })
9060
+ toolbarLabel ? /* @__PURE__ */ jsxs91(Fragment16, { children: [
9061
+ /* @__PURE__ */ jsx134(Typography35, { variant: "subtitle2", color: "textSecondary", children: toolbarLabel }),
9062
+ /* @__PURE__ */ jsx134(Divider11, { orientation: "vertical", sx: { height: 0.75, py: 2.5 } })
8828
9063
  ] }) : null,
8829
- renderBulkChangesDialog && refetchData ? /* @__PURE__ */ jsx132(
9064
+ renderBulkChangesDialog && refetchData ? /* @__PURE__ */ jsx134(
8830
9065
  Tooltip11,
8831
9066
  {
8832
9067
  title: disableBulkChangesMode ? "Access denied, you don\u2019t have permission to use this feature." : "",
8833
- children: /* @__PURE__ */ jsx132(
9068
+ children: /* @__PURE__ */ jsx134(
8834
9069
  FormControlLabel6,
8835
9070
  {
8836
9071
  label: "Bulk Changes Mode",
8837
9072
  disabled: disableBulkChangesMode || !visibleEditableColumns.length,
8838
- control: /* @__PURE__ */ jsx132(
9073
+ control: /* @__PURE__ */ jsx134(
8839
9074
  Switch2,
8840
9075
  {
8841
9076
  size: "small",
@@ -8850,17 +9085,17 @@ var TableDesktopToolbar = ({
8850
9085
  ]
8851
9086
  }
8852
9087
  ),
8853
- isScrollable && /* @__PURE__ */ jsx132(
9088
+ isScrollable && /* @__PURE__ */ jsx134(
8854
9089
  IconButton6,
8855
9090
  {
8856
9091
  "aria-label": "scroll-left",
8857
9092
  sx: { padding: 0, alignSelf: "center" },
8858
9093
  onClick: () => scroll("left"),
8859
- children: /* @__PURE__ */ jsx132(KeyboardArrowLeft2, {})
9094
+ children: /* @__PURE__ */ jsx134(KeyboardArrowLeft2, {})
8860
9095
  }
8861
9096
  ),
8862
- /* @__PURE__ */ jsx132(
8863
- Box41,
9097
+ /* @__PURE__ */ jsx134(
9098
+ Box42,
8864
9099
  {
8865
9100
  ref: scrollRef,
8866
9101
  sx: {
@@ -8876,55 +9111,39 @@ var TableDesktopToolbar = ({
8876
9111
  display: "none"
8877
9112
  }
8878
9113
  },
8879
- children: isBulkChangesMode ? visibleEditableColumns.map(
8880
- ({
8881
- id,
8882
- fieldName,
8883
- label,
8884
- editableCellType,
8885
- filterOptions,
8886
- refetchFilterOptions,
8887
- isFetchingFilterOptions,
8888
- validateInput,
8889
- width
8890
- }) => editableCellType && /* @__PURE__ */ jsx132(
8891
- Box41,
9114
+ children: isBulkChangesMode ? visibleEditableColumns.map((headCell) => {
9115
+ const { id, width, editableCellType } = headCell;
9116
+ return editableCellType && /* @__PURE__ */ jsx134(
9117
+ Box42,
8892
9118
  {
8893
9119
  sx: { width, flex: "0 0 auto" },
8894
- children: /* @__PURE__ */ jsx132(
9120
+ children: /* @__PURE__ */ jsx134(
8895
9121
  TableDesktopEditableField,
8896
9122
  {
8897
- field: id,
9123
+ headCell,
8898
9124
  size: "small",
8899
9125
  variant: "outlined",
8900
9126
  showCheckboxLabel: true,
8901
- fieldName: fieldName ?? "",
8902
- inputLabel: label ?? "",
8903
- editableCellType,
8904
- filterOptions,
8905
- refetchFilterOptions,
8906
- isFetchingFilterOptions,
8907
- validateInput,
8908
9127
  onUpdateEditableCell: handleUpdateEditableCell
8909
9128
  }
8910
9129
  )
8911
9130
  },
8912
9131
  `${id}-${resetCounter}`
8913
- )
8914
- ) : null
9132
+ );
9133
+ }) : null
8915
9134
  }
8916
9135
  ),
8917
- isScrollable && /* @__PURE__ */ jsx132(
9136
+ isScrollable && /* @__PURE__ */ jsx134(
8918
9137
  IconButton6,
8919
9138
  {
8920
9139
  "aria-label": "scroll-right",
8921
9140
  sx: { p: 0, alignSelf: "center" },
8922
9141
  onClick: () => scroll("right"),
8923
- children: /* @__PURE__ */ jsx132(KeyboardArrowRight2, {})
9142
+ children: /* @__PURE__ */ jsx134(KeyboardArrowRight2, {})
8924
9143
  }
8925
9144
  ),
8926
- isBulkChangesMode ? /* @__PURE__ */ jsxs90(Fragment16, { children: [
8927
- /* @__PURE__ */ jsx132(
9145
+ isBulkChangesMode ? /* @__PURE__ */ jsxs91(Fragment16, { children: [
9146
+ /* @__PURE__ */ jsx134(
8928
9147
  Button19,
8929
9148
  {
8930
9149
  variant: "outlined",
@@ -8937,7 +9156,7 @@ var TableDesktopToolbar = ({
8937
9156
  children: "RESET"
8938
9157
  }
8939
9158
  ),
8940
- /* @__PURE__ */ jsx132(
9159
+ /* @__PURE__ */ jsx134(
8941
9160
  Button19,
8942
9161
  {
8943
9162
  variant: "contained",
@@ -8948,26 +9167,26 @@ var TableDesktopToolbar = ({
8948
9167
  children: "APPLY"
8949
9168
  }
8950
9169
  )
8951
- ] }) : /* @__PURE__ */ jsxs90(Box41, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
9170
+ ] }) : /* @__PURE__ */ jsxs91(Box42, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
8952
9171
  renderInfoIcons,
8953
- renderExportCsvDialog ? /* @__PURE__ */ jsx132(Tooltip11, { title: "Download Customer List", children: /* @__PURE__ */ jsx132("span", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx132(
9172
+ renderExportCsvDialog ? /* @__PURE__ */ jsx134(Tooltip11, { title: "Download Customer List", children: /* @__PURE__ */ jsx134("span", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx134(
8954
9173
  IconButton6,
8955
9174
  {
8956
9175
  disableRipple: true,
8957
9176
  disabled: isDataEmpty,
8958
9177
  "aria-label": "export-csv-button",
8959
9178
  onClick: () => setIsExportCsvDialogOpen(true),
8960
- children: /* @__PURE__ */ jsx132(Download, { fill: colors.neutral750 })
9179
+ children: /* @__PURE__ */ jsx134(Download, { fill: colors.neutral750 })
8961
9180
  }
8962
9181
  ) }) }) : null,
8963
- renderTableColumnConfigurationMenu ? /* @__PURE__ */ jsx132(Tooltip11, { title: "Table Column Configuration", children: /* @__PURE__ */ jsx132(
9182
+ renderTableColumnConfigurationMenu ? /* @__PURE__ */ jsx134(Tooltip11, { title: "Table Column Configuration", children: /* @__PURE__ */ jsx134(
8964
9183
  IconButton6,
8965
9184
  {
8966
9185
  disableRipple: true,
8967
9186
  "aria-label": "table-column-config-button",
8968
9187
  ref: tableToolbarMenuButtonRef,
8969
9188
  onClick: onClickToolbarMenuOpen,
8970
- children: /* @__PURE__ */ jsx132(IconTableEdit_default, { fill: colors.neutral750 })
9189
+ children: /* @__PURE__ */ jsx134(IconTableEdit_default, { fill: colors.neutral750 })
8971
9190
  }
8972
9191
  ) }) : null
8973
9192
  ] })
@@ -9000,11 +9219,11 @@ var TableDesktopToolbar = ({
9000
9219
  };
9001
9220
 
9002
9221
  // src/components/TableHeader/TableHeader.tsx
9003
- import { memo as memo23, useEffect as useEffect15, useState as useState23 } from "react";
9222
+ import { memo as memo22, useEffect as useEffect15, useState as useState25 } from "react";
9004
9223
  import { ImportExport as ImportExportIcon } from "@mui/icons-material";
9005
9224
  import { TableCell as TableCell7, TableHead as TableHead3, TableRow as TableRow6, TableSortLabel as TableSortLabel3 } from "@mui/material";
9006
9225
  import { makeStyles as makeStyles47 } from "tss-react/mui";
9007
- import { jsx as jsx133 } from "react/jsx-runtime";
9226
+ import { jsx as jsx135 } from "react/jsx-runtime";
9008
9227
  var useStyles47 = makeStyles47()(() => ({
9009
9228
  sortLabel: {
9010
9229
  "& .MuiTableSortLabel-icon": {
@@ -9013,7 +9232,7 @@ var useStyles47 = makeStyles47()(() => ({
9013
9232
  }
9014
9233
  }));
9015
9234
  var TableHeader = ({ cells, onSort = null }) => {
9016
- const [sortableCells, setSortableCells] = useState23([]);
9235
+ const [sortableCells, setSortableCells] = useState25([]);
9017
9236
  const { classes } = useStyles47();
9018
9237
  useEffect15(() => {
9019
9238
  setSortableCells(cells);
@@ -9049,7 +9268,7 @@ var TableHeader = ({ cells, onSort = null }) => {
9049
9268
  });
9050
9269
  setSortableCells(sortedCells);
9051
9270
  };
9052
- return /* @__PURE__ */ jsx133(TableHead3, { children: /* @__PURE__ */ jsx133(TableRow6, { children: sortableCells.map((cell, key) => /* @__PURE__ */ jsx133(TableCell7, { children: cell.isSortable ? /* @__PURE__ */ jsx133(
9271
+ return /* @__PURE__ */ jsx135(TableHead3, { children: /* @__PURE__ */ jsx135(TableRow6, { children: sortableCells.map((cell, key) => /* @__PURE__ */ jsx135(TableCell7, { children: cell.isSortable ? /* @__PURE__ */ jsx135(
9053
9272
  TableSortLabel3,
9054
9273
  {
9055
9274
  className: classes.sortLabel,
@@ -9060,12 +9279,12 @@ var TableHeader = ({ cells, onSort = null }) => {
9060
9279
  }
9061
9280
  ) : cell.label }, cell.label || key)) }) });
9062
9281
  };
9063
- var TableHeader_default = memo23(TableHeader);
9282
+ var TableHeader_default = memo22(TableHeader);
9064
9283
 
9065
9284
  // src/components/TextDivider/TextDivider.tsx
9066
- import { Box as Box42, Typography as Typography35, Divider as Divider12, Button as Button20 } from "@mui/material";
9285
+ import { Box as Box43, Typography as Typography36, Divider as Divider12, Button as Button20 } from "@mui/material";
9067
9286
  import { makeStyles as makeStyles48 } from "tss-react/mui";
9068
- import { jsx as jsx134, jsxs as jsxs91 } from "react/jsx-runtime";
9287
+ import { jsx as jsx136, jsxs as jsxs92 } from "react/jsx-runtime";
9069
9288
  var useStyles48 = makeStyles48()(() => ({
9070
9289
  icon: {
9071
9290
  fontSize: 20
@@ -9102,19 +9321,19 @@ var TextDivider = ({
9102
9321
  }) => {
9103
9322
  const { classes } = useStyles48();
9104
9323
  const iconColor = color ?? colors.neutral900;
9105
- return /* @__PURE__ */ jsxs91(
9106
- Box42,
9324
+ return /* @__PURE__ */ jsxs92(
9325
+ Box43,
9107
9326
  {
9108
9327
  display: "flex",
9109
9328
  alignItems: "center",
9110
9329
  justifyContent: "space-between",
9111
9330
  className: classes.container,
9112
9331
  children: [
9113
- /* @__PURE__ */ jsx134(Divider12, { className: classes.leftDivider }),
9114
- /* @__PURE__ */ jsx134(Button20, { onClick, disabled: !onClick, className: classes.button, children: /* @__PURE__ */ jsxs91(Box42, { className: classes.center, children: [
9115
- Icon2 && iconPosition === "left" && /* @__PURE__ */ jsx134(Icon2, { className: classes.icon, style: { color: iconColor } }),
9116
- /* @__PURE__ */ jsx134(
9117
- Typography35,
9332
+ /* @__PURE__ */ jsx136(Divider12, { className: classes.leftDivider }),
9333
+ /* @__PURE__ */ jsx136(Button20, { onClick, disabled: !onClick, className: classes.button, children: /* @__PURE__ */ jsxs92(Box43, { className: classes.center, children: [
9334
+ Icon2 && iconPosition === "left" && /* @__PURE__ */ jsx136(Icon2, { className: classes.icon, style: { color: iconColor } }),
9335
+ /* @__PURE__ */ jsx136(
9336
+ Typography36,
9118
9337
  {
9119
9338
  color: "textSecondary",
9120
9339
  className: classes.title,
@@ -9122,9 +9341,9 @@ var TextDivider = ({
9122
9341
  children: title
9123
9342
  }
9124
9343
  ),
9125
- Icon2 && iconPosition === "right" && /* @__PURE__ */ jsx134(Icon2, { className: classes.icon, style: { color: iconColor } })
9344
+ Icon2 && iconPosition === "right" && /* @__PURE__ */ jsx136(Icon2, { className: classes.icon, style: { color: iconColor } })
9126
9345
  ] }) }),
9127
- /* @__PURE__ */ jsx134(Divider12, { className: classes.rightDivider })
9346
+ /* @__PURE__ */ jsx136(Divider12, { className: classes.rightDivider })
9128
9347
  ]
9129
9348
  }
9130
9349
  );
@@ -9136,7 +9355,7 @@ import { DateRangePicker } from "react-dates";
9136
9355
  import { makeStyles as makeStyles49 } from "tss-react/mui";
9137
9356
  import "react-dates/initialize";
9138
9357
  import "react-dates/lib/css/_datepicker.css";
9139
- import { jsx as jsx135 } from "react/jsx-runtime";
9358
+ import { jsx as jsx137 } from "react/jsx-runtime";
9140
9359
  var useStyles49 = makeStyles49()((theme) => ({
9141
9360
  wrapper: {
9142
9361
  "& .DateRangePicker": {
@@ -9232,15 +9451,15 @@ var ThemedDateRangePicker = ({
9232
9451
  ...props
9233
9452
  }) => {
9234
9453
  const { classes, cx } = useStyles49();
9235
- return /* @__PURE__ */ jsx135("div", { className: cx(classes.wrapper, className), children: /* @__PURE__ */ jsx135(DateRangePicker, { ...props }) });
9454
+ return /* @__PURE__ */ jsx137("div", { className: cx(classes.wrapper, className), children: /* @__PURE__ */ jsx137(DateRangePicker, { ...props }) });
9236
9455
  };
9237
9456
  var ThemedDateRangePicker_default = ThemedDateRangePicker;
9238
9457
 
9239
9458
  // src/components/TheToolbar/TheToolbar.tsx
9240
- import { memo as memo24 } from "react";
9241
- import { AppBar, Box as Box43, Toolbar } from "@mui/material";
9459
+ import { memo as memo23 } from "react";
9460
+ import { AppBar, Box as Box44, Toolbar } from "@mui/material";
9242
9461
  import { makeStyles as makeStyles50 } from "tss-react/mui";
9243
- import { jsx as jsx136, jsxs as jsxs92 } from "react/jsx-runtime";
9462
+ import { jsx as jsx138, jsxs as jsxs93 } from "react/jsx-runtime";
9244
9463
  var useStyles50 = makeStyles50()((theme) => ({
9245
9464
  menuButton: {
9246
9465
  color: theme.palette.primary.contrastText
@@ -9260,9 +9479,9 @@ var TheToolbar = ({
9260
9479
  rightSection
9261
9480
  }) => {
9262
9481
  const { classes } = useStyles50();
9263
- return /* @__PURE__ */ jsxs92(Box43, { children: [
9264
- /* @__PURE__ */ jsx136(AppBar, { children: /* @__PURE__ */ jsxs92(Toolbar, { className: classes.topBar, children: [
9265
- /* @__PURE__ */ jsx136(
9482
+ return /* @__PURE__ */ jsxs93(Box44, { children: [
9483
+ /* @__PURE__ */ jsx138(AppBar, { children: /* @__PURE__ */ jsxs93(Toolbar, { className: classes.topBar, children: [
9484
+ /* @__PURE__ */ jsx138(
9266
9485
  RoundButton_default,
9267
9486
  {
9268
9487
  className: classes.menuButton,
@@ -9271,7 +9490,7 @@ var TheToolbar = ({
9271
9490
  onClick: handleOpen
9272
9491
  }
9273
9492
  ),
9274
- /* @__PURE__ */ jsx136(
9493
+ /* @__PURE__ */ jsx138(
9275
9494
  CompanyLogo_default,
9276
9495
  {
9277
9496
  size: "small",
@@ -9280,30 +9499,30 @@ var TheToolbar = ({
9280
9499
  imageLogoLightSmall
9281
9500
  }
9282
9501
  ),
9283
- /* @__PURE__ */ jsx136(Box43, { ml: 2, children: leftSection }),
9284
- /* @__PURE__ */ jsx136(Box43, { ml: "auto", children: rightSection })
9502
+ /* @__PURE__ */ jsx138(Box44, { ml: 2, children: leftSection }),
9503
+ /* @__PURE__ */ jsx138(Box44, { ml: "auto", children: rightSection })
9285
9504
  ] }) }),
9286
9505
  LeftDrawer
9287
9506
  ] });
9288
9507
  };
9289
- var TheToolbar_default = memo24(TheToolbar);
9508
+ var TheToolbar_default = memo23(TheToolbar);
9290
9509
 
9291
9510
  // src/components/ToastMessage/ToastMessage.tsx
9292
9511
  import { Alert as MuiAlert, Snackbar } from "@mui/material";
9293
- import { jsx as jsx137 } from "react/jsx-runtime";
9512
+ import { jsx as jsx139 } from "react/jsx-runtime";
9294
9513
  var ToastMessage = ({
9295
9514
  toastType,
9296
9515
  toastMessage,
9297
9516
  open,
9298
9517
  onClose
9299
- }) => /* @__PURE__ */ jsx137(
9518
+ }) => /* @__PURE__ */ jsx139(
9300
9519
  Snackbar,
9301
9520
  {
9302
9521
  open,
9303
9522
  autoHideDuration: 1500,
9304
9523
  onClose,
9305
9524
  anchorOrigin: { vertical: "top", horizontal: "right" },
9306
- children: /* @__PURE__ */ jsx137(
9525
+ children: /* @__PURE__ */ jsx139(
9307
9526
  MuiAlert,
9308
9527
  {
9309
9528
  elevation: 6,
@@ -9331,16 +9550,16 @@ var ToastMessage_default = ToastMessage;
9331
9550
 
9332
9551
  // src/components/TwoButtonDialog/TwoButtonDialog.tsx
9333
9552
  import {
9334
- Typography as Typography36,
9553
+ Typography as Typography37,
9335
9554
  Dialog as Dialog5,
9336
9555
  Backdrop,
9337
- Box as Box44,
9556
+ Box as Box45,
9338
9557
  Divider as Divider13,
9339
9558
  Paper as Paper13,
9340
9559
  Fade as Fade2
9341
9560
  } from "@mui/material";
9342
9561
  import { makeStyles as makeStyles51 } from "tss-react/mui";
9343
- import { jsx as jsx138, jsxs as jsxs93 } from "react/jsx-runtime";
9562
+ import { jsx as jsx140, jsxs as jsxs94 } from "react/jsx-runtime";
9344
9563
  var useStyles51 = makeStyles51()((theme) => ({
9345
9564
  paper: {
9346
9565
  padding: theme.spacing(2)
@@ -9370,7 +9589,7 @@ var TwoButtonDialog = ({
9370
9589
  cancelButton
9371
9590
  }) => {
9372
9591
  const { classes } = useStyles51();
9373
- return /* @__PURE__ */ jsx138(
9592
+ return /* @__PURE__ */ jsx140(
9374
9593
  Dialog5,
9375
9594
  {
9376
9595
  open,
@@ -9380,10 +9599,10 @@ var TwoButtonDialog = ({
9380
9599
  closeAfterTransition: true,
9381
9600
  BackdropComponent: Backdrop,
9382
9601
  BackdropProps: { timeout: 500 },
9383
- children: /* @__PURE__ */ jsx138(Fade2, { in: open, children: /* @__PURE__ */ jsxs93(Paper13, { className: classes.paper, children: [
9384
- /* @__PURE__ */ jsxs93(Box44, { className: classes.mb, children: [
9385
- /* @__PURE__ */ jsx138(Typography36, { variant: "h5", component: "div", children: /* @__PURE__ */ jsx138(
9386
- Box44,
9602
+ children: /* @__PURE__ */ jsx140(Fade2, { in: open, children: /* @__PURE__ */ jsxs94(Paper13, { className: classes.paper, children: [
9603
+ /* @__PURE__ */ jsxs94(Box45, { className: classes.mb, children: [
9604
+ /* @__PURE__ */ jsx140(Typography37, { variant: "h5", component: "div", children: /* @__PURE__ */ jsx140(
9605
+ Box45,
9387
9606
  {
9388
9607
  sx: {
9389
9608
  fontWeight: 600
@@ -9391,23 +9610,23 @@ var TwoButtonDialog = ({
9391
9610
  children: title
9392
9611
  }
9393
9612
  ) }),
9394
- /* @__PURE__ */ jsxs93(
9395
- Box44,
9613
+ /* @__PURE__ */ jsxs94(
9614
+ Box45,
9396
9615
  {
9397
9616
  className: classes.mt,
9398
9617
  sx: {
9399
9618
  fontWeight: 600
9400
9619
  },
9401
9620
  children: [
9402
- subtitle1 && /* @__PURE__ */ jsx138(Typography36, { variant: "subtitle1", children: subtitle1 }),
9403
- subtitle2 && /* @__PURE__ */ jsx138(Typography36, { variant: "subtitle1", children: subtitle2 })
9621
+ subtitle1 && /* @__PURE__ */ jsx140(Typography37, { variant: "subtitle1", children: subtitle1 }),
9622
+ subtitle2 && /* @__PURE__ */ jsx140(Typography37, { variant: "subtitle1", children: subtitle2 })
9404
9623
  ]
9405
9624
  }
9406
9625
  )
9407
9626
  ] }),
9408
- /* @__PURE__ */ jsx138(Divider13, {}),
9409
- /* @__PURE__ */ jsxs93(Box44, { className: classes.buttonContainer, children: [
9410
- /* @__PURE__ */ jsx138(
9627
+ /* @__PURE__ */ jsx140(Divider13, {}),
9628
+ /* @__PURE__ */ jsxs94(Box45, { className: classes.buttonContainer, children: [
9629
+ /* @__PURE__ */ jsx140(
9411
9630
  FilledButton_default,
9412
9631
  {
9413
9632
  copy: cancelLabel,
@@ -9420,7 +9639,7 @@ var TwoButtonDialog = ({
9420
9639
  }
9421
9640
  }
9422
9641
  ),
9423
- /* @__PURE__ */ jsx138(
9642
+ /* @__PURE__ */ jsx140(
9424
9643
  FilledButton_default,
9425
9644
  {
9426
9645
  color: "primary",
@@ -9429,7 +9648,7 @@ var TwoButtonDialog = ({
9429
9648
  }
9430
9649
  )
9431
9650
  ] }),
9432
- /* @__PURE__ */ jsx138(Loading_default, { isLoading: dialogLoading })
9651
+ /* @__PURE__ */ jsx140(Loading_default, { isLoading: dialogLoading })
9433
9652
  ] }) })
9434
9653
  }
9435
9654
  );
@@ -9437,11 +9656,11 @@ var TwoButtonDialog = ({
9437
9656
  var TwoButtonDialog_default = TwoButtonDialog;
9438
9657
 
9439
9658
  // src/components/UserBust/UserBust.tsx
9440
- import { memo as memo25 } from "react";
9441
- import { Avatar as Avatar2, Typography as Typography37 } from "@mui/material";
9442
- import { jsx as jsx139, jsxs as jsxs94 } from "react/jsx-runtime";
9443
- var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ jsxs94("div", { children: [
9444
- /* @__PURE__ */ jsx139(
9659
+ import { memo as memo24 } from "react";
9660
+ import { Avatar as Avatar2, Typography as Typography38 } from "@mui/material";
9661
+ import { jsx as jsx141, jsxs as jsxs95 } from "react/jsx-runtime";
9662
+ var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ jsxs95("div", { children: [
9663
+ /* @__PURE__ */ jsx141(
9445
9664
  Avatar2,
9446
9665
  {
9447
9666
  src: user.profile_picture,
@@ -9449,18 +9668,18 @@ var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ jsxs9
9449
9668
  style: { width: avatarProps.width, height: avatarProps.height }
9450
9669
  }
9451
9670
  ),
9452
- /* @__PURE__ */ jsxs94("div", { style: { paddingTop: 16 }, children: [
9453
- /* @__PURE__ */ jsx139(Typography37, { ...typographyProps.name, children: `${user.first_name} ${user.last_name}` }),
9454
- /* @__PURE__ */ jsx139(Typography37, { ...typographyProps.username, children: user.username })
9671
+ /* @__PURE__ */ jsxs95("div", { style: { paddingTop: 16 }, children: [
9672
+ /* @__PURE__ */ jsx141(Typography38, { ...typographyProps.name, children: `${user.first_name} ${user.last_name}` }),
9673
+ /* @__PURE__ */ jsx141(Typography38, { ...typographyProps.username, children: user.username })
9455
9674
  ] })
9456
9675
  ] });
9457
- var UserBust_default = memo25(UserBust);
9676
+ var UserBust_default = memo24(UserBust);
9458
9677
 
9459
9678
  // src/components/icons/IconChart.tsx
9460
- import { jsx as jsx140 } from "react/jsx-runtime";
9679
+ import { jsx as jsx142 } from "react/jsx-runtime";
9461
9680
  var SvgIconChart = (props) => {
9462
9681
  const { fill } = props;
9463
- return /* @__PURE__ */ jsx140(
9682
+ return /* @__PURE__ */ jsx142(
9464
9683
  "svg",
9465
9684
  {
9466
9685
  width: "20",
@@ -9469,7 +9688,7 @@ var SvgIconChart = (props) => {
9469
9688
  fill: "none",
9470
9689
  xmlns: "http://www.w3.org/2000/svg",
9471
9690
  ...props,
9472
- children: /* @__PURE__ */ jsx140(
9691
+ children: /* @__PURE__ */ jsx142(
9473
9692
  "path",
9474
9693
  {
9475
9694
  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",
@@ -9547,6 +9766,7 @@ export {
9547
9766
  SearchWithFilters_default as SearchWithFilters,
9548
9767
  SearchWithFiltersForTable_default as SearchWithFiltersForTable,
9549
9768
  SectionName_default as SectionName,
9769
+ SmartMultipleSelect,
9550
9770
  SmartSelect_default as SmartSelect,
9551
9771
  SmartTableHeader,
9552
9772
  SmartTableHeaderFilterMenu,