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