@natoora-libs/core 0.2.4 → 0.2.5-dev-prod-list-bulk-changes-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{TableDesktop-4tjwQjmc.d.cts → TableDesktop-Z0KE59L4.d.cts} +21 -13
- package/dist/{TableDesktop-4tjwQjmc.d.ts → TableDesktop-Z0KE59L4.d.ts} +21 -13
- package/dist/components/index.cjs +810 -582
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +28 -26
- package/dist/components/index.d.ts +28 -26
- package/dist/components/index.js +776 -539
- 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 +10 -9
|
@@ -383,6 +383,7 @@ __export(components_exports, {
|
|
|
383
383
|
SearchWithFilters: () => SearchWithFilters_default,
|
|
384
384
|
SearchWithFiltersForTable: () => SearchWithFiltersForTable_default,
|
|
385
385
|
SectionName: () => SectionName_default,
|
|
386
|
+
SmartMultipleSelect: () => SmartMultipleSelect,
|
|
386
387
|
SmartSelect: () => SmartSelect_default,
|
|
387
388
|
SmartTableHeader: () => SmartTableHeader,
|
|
388
389
|
SmartTableHeaderFilterMenu: () => SmartTableHeaderFilterMenu,
|
|
@@ -1288,7 +1289,7 @@ var AutocompleteFilterMenuContent = ({
|
|
|
1288
1289
|
onFilterOptionChange,
|
|
1289
1290
|
onApplyFiltersClick,
|
|
1290
1291
|
shouldShowCheckOnFilter,
|
|
1291
|
-
|
|
1292
|
+
onAutocompleteSearch,
|
|
1292
1293
|
filterOptions
|
|
1293
1294
|
}) => {
|
|
1294
1295
|
const renderLoading = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_material10.Skeleton, { variant: "rounded", height: 26, sx: { m: 1 } });
|
|
@@ -1321,7 +1322,7 @@ var AutocompleteFilterMenuContent = ({
|
|
|
1321
1322
|
minCharacters: 3,
|
|
1322
1323
|
sx: { backgroundColor: colors.neutral200 },
|
|
1323
1324
|
onSearch: (value) => {
|
|
1324
|
-
|
|
1325
|
+
onAutocompleteSearch?.(value);
|
|
1325
1326
|
}
|
|
1326
1327
|
}
|
|
1327
1328
|
),
|
|
@@ -3729,7 +3730,7 @@ var CheckboxFilterMenuContent = ({
|
|
|
3729
3730
|
)
|
|
3730
3731
|
}
|
|
3731
3732
|
),
|
|
3732
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_material23.Divider, {}),
|
|
3733
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_material23.Divider, { sx: { mt: 0.5 } }),
|
|
3733
3734
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
3734
3735
|
import_material23.Box,
|
|
3735
3736
|
{
|
|
@@ -7302,18 +7303,124 @@ var SectionName = ({
|
|
|
7302
7303
|
};
|
|
7303
7304
|
var SectionName_default = SectionName;
|
|
7304
7305
|
|
|
7305
|
-
// src/components/
|
|
7306
|
+
// src/components/SmartMultipleSelect/SmartMultipleSelect.tsx
|
|
7306
7307
|
var import_react34 = require("react");
|
|
7307
7308
|
var import_material62 = require("@mui/material");
|
|
7308
|
-
var import_mui49 = require("tss-react/mui");
|
|
7309
7309
|
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
7310
|
+
var SmartMultipleSelect = ({
|
|
7311
|
+
inputLabel,
|
|
7312
|
+
variant = "standard",
|
|
7313
|
+
size,
|
|
7314
|
+
error,
|
|
7315
|
+
values,
|
|
7316
|
+
defaultValues,
|
|
7317
|
+
onChange,
|
|
7318
|
+
onOpen,
|
|
7319
|
+
onClose,
|
|
7320
|
+
menuOptions,
|
|
7321
|
+
isLoading,
|
|
7322
|
+
disabled,
|
|
7323
|
+
emptyMessage = "No options.",
|
|
7324
|
+
helperText
|
|
7325
|
+
}) => {
|
|
7326
|
+
const [localValues, setLocalValues] = (0, import_react34.useState)(defaultValues ?? []);
|
|
7327
|
+
const handleChangeOption = (option) => {
|
|
7328
|
+
let newValues = [];
|
|
7329
|
+
const selectedIndex = localValues.findIndex(
|
|
7330
|
+
(val) => val.value === option.value
|
|
7331
|
+
);
|
|
7332
|
+
if (selectedIndex === -1) {
|
|
7333
|
+
newValues = [...localValues, option];
|
|
7334
|
+
} else {
|
|
7335
|
+
newValues = localValues.filter((_, i) => i !== selectedIndex);
|
|
7336
|
+
}
|
|
7337
|
+
setLocalValues(newValues);
|
|
7338
|
+
onChange?.(newValues);
|
|
7339
|
+
};
|
|
7340
|
+
const renderMenuContent = () => !menuOptions?.length ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
7341
|
+
import_material62.Box,
|
|
7342
|
+
{
|
|
7343
|
+
sx: { display: "flex", justifyContent: "center", alignItems: "center" },
|
|
7344
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.Typography, { children: emptyMessage })
|
|
7345
|
+
}
|
|
7346
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.Box, { sx: { display: "flex", flexDirection: "column" }, children: menuOptions?.map((option, index) => {
|
|
7347
|
+
const selectedValues = values ?? localValues ?? [];
|
|
7348
|
+
const isSelected = selectedValues.some(
|
|
7349
|
+
(selected) => selected.value === option.value
|
|
7350
|
+
);
|
|
7351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
7352
|
+
import_material62.Box,
|
|
7353
|
+
{
|
|
7354
|
+
onClick: () => handleChangeOption(option),
|
|
7355
|
+
sx: {
|
|
7356
|
+
p: 0.5,
|
|
7357
|
+
display: "flex",
|
|
7358
|
+
cursor: "pointer",
|
|
7359
|
+
backgroundColor: isSelected ? colors.lightBlueBackground : void 0
|
|
7360
|
+
},
|
|
7361
|
+
children: [
|
|
7362
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.Checkbox, { disableRipple: true, sx: { py: 0.5 }, checked: isSelected }),
|
|
7363
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.ListItemText, { primary: option.label })
|
|
7364
|
+
]
|
|
7365
|
+
},
|
|
7366
|
+
option.value ?? index
|
|
7367
|
+
);
|
|
7368
|
+
}) });
|
|
7369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
7370
|
+
import_material62.FormControl,
|
|
7371
|
+
{
|
|
7372
|
+
fullWidth: true,
|
|
7373
|
+
variant,
|
|
7374
|
+
size,
|
|
7375
|
+
disabled,
|
|
7376
|
+
error,
|
|
7377
|
+
children: [
|
|
7378
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.InputLabel, { children: inputLabel }),
|
|
7379
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
7380
|
+
import_material62.Select,
|
|
7381
|
+
{
|
|
7382
|
+
multiple: true,
|
|
7383
|
+
label: inputLabel,
|
|
7384
|
+
error,
|
|
7385
|
+
value: values ?? localValues,
|
|
7386
|
+
defaultValue: defaultValues,
|
|
7387
|
+
onOpen,
|
|
7388
|
+
onClose: () => onClose?.(localValues),
|
|
7389
|
+
renderValue: (selectedValues) => {
|
|
7390
|
+
const valuesString = selectedValues.map((v) => v.label)?.join(", ");
|
|
7391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(DynamicOverflowTooltip, { tooltipDescription: valuesString, children: valuesString });
|
|
7392
|
+
},
|
|
7393
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
7394
|
+
import_material62.Box,
|
|
7395
|
+
{
|
|
7396
|
+
sx: {
|
|
7397
|
+
display: "flex",
|
|
7398
|
+
justifyContent: "center",
|
|
7399
|
+
alignItems: "center"
|
|
7400
|
+
},
|
|
7401
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.CircularProgress, { size: 24 })
|
|
7402
|
+
}
|
|
7403
|
+
) : renderMenuContent()
|
|
7404
|
+
}
|
|
7405
|
+
),
|
|
7406
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material62.FormHelperText, { children: helperText })
|
|
7407
|
+
]
|
|
7408
|
+
}
|
|
7409
|
+
);
|
|
7410
|
+
};
|
|
7411
|
+
|
|
7412
|
+
// src/components/SmartSelect/SmartSelect.tsx
|
|
7413
|
+
var import_react35 = require("react");
|
|
7414
|
+
var import_material63 = require("@mui/material");
|
|
7415
|
+
var import_mui49 = require("tss-react/mui");
|
|
7416
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
7310
7417
|
var useStyles44 = (0, import_mui49.makeStyles)()(() => ({
|
|
7311
7418
|
container: {
|
|
7312
7419
|
display: "flex",
|
|
7313
7420
|
flexDirection: "column"
|
|
7314
7421
|
}
|
|
7315
7422
|
}));
|
|
7316
|
-
var SmartSelect = (0,
|
|
7423
|
+
var SmartSelect = (0, import_react35.forwardRef)(
|
|
7317
7424
|
({
|
|
7318
7425
|
value,
|
|
7319
7426
|
defaultOption,
|
|
@@ -7333,9 +7440,9 @@ var SmartSelect = (0, import_react34.forwardRef)(
|
|
|
7333
7440
|
menuProps
|
|
7334
7441
|
}, ref) => {
|
|
7335
7442
|
const { classes } = useStyles44();
|
|
7336
|
-
const [open, setOpen] = (0,
|
|
7337
|
-
const [localOptions, setLocalOptions] = (0,
|
|
7338
|
-
(0,
|
|
7443
|
+
const [open, setOpen] = (0, import_react35.useState)(false);
|
|
7444
|
+
const [localOptions, setLocalOptions] = (0, import_react35.useState)(options || []);
|
|
7445
|
+
(0, import_react35.useEffect)(() => {
|
|
7339
7446
|
if (options) {
|
|
7340
7447
|
setLocalOptions(options);
|
|
7341
7448
|
}
|
|
@@ -7374,8 +7481,8 @@ var SmartSelect = (0, import_react34.forwardRef)(
|
|
|
7374
7481
|
onChange(selectedOption);
|
|
7375
7482
|
}
|
|
7376
7483
|
};
|
|
7377
|
-
return /* @__PURE__ */ (0,
|
|
7378
|
-
|
|
7484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
7485
|
+
import_material63.FormControl,
|
|
7379
7486
|
{
|
|
7380
7487
|
fullWidth: true,
|
|
7381
7488
|
size,
|
|
@@ -7385,16 +7492,16 @@ var SmartSelect = (0, import_react34.forwardRef)(
|
|
|
7385
7492
|
"data-testid": dataTestId,
|
|
7386
7493
|
disabled,
|
|
7387
7494
|
children: [
|
|
7388
|
-
inputLabel && /* @__PURE__ */ (0,
|
|
7389
|
-
|
|
7495
|
+
inputLabel && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
7496
|
+
import_material63.InputLabel,
|
|
7390
7497
|
{
|
|
7391
7498
|
id: "smart-select-label",
|
|
7392
7499
|
"data-testid": `${dataTestId}-label`,
|
|
7393
7500
|
children: inputLabel
|
|
7394
7501
|
}
|
|
7395
7502
|
),
|
|
7396
|
-
/* @__PURE__ */ (0,
|
|
7397
|
-
|
|
7503
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
7504
|
+
import_material63.Select,
|
|
7398
7505
|
{
|
|
7399
7506
|
ref,
|
|
7400
7507
|
size,
|
|
@@ -7411,26 +7518,26 @@ var SmartSelect = (0, import_react34.forwardRef)(
|
|
|
7411
7518
|
MenuProps: menuProps,
|
|
7412
7519
|
label: inputLabel,
|
|
7413
7520
|
children: [
|
|
7414
|
-
isFetching && /* @__PURE__ */ (0,
|
|
7415
|
-
|
|
7521
|
+
isFetching && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
7522
|
+
import_material63.MenuItem,
|
|
7416
7523
|
{
|
|
7417
7524
|
disabled: true,
|
|
7418
7525
|
"data-testid": `${dataTestId}-loading`,
|
|
7419
7526
|
id: `${dataTestId}-loading`,
|
|
7420
|
-
children: /* @__PURE__ */ (0,
|
|
7527
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material63.CircularProgress, { size: 24 })
|
|
7421
7528
|
}
|
|
7422
7529
|
),
|
|
7423
|
-
(defaultOption === null || !defaultOptionLabelIsValid || !defaultOptionValueIsValid) && !isFetching && options?.length === 0 && /* @__PURE__ */ (0,
|
|
7424
|
-
localOptions.length === 0 && !isFetching && options?.length !== 0 && defaultOptionLabelIsValid && defaultOptionValueIsValid && /* @__PURE__ */ (0,
|
|
7425
|
-
|
|
7530
|
+
(defaultOption === null || !defaultOptionLabelIsValid || !defaultOptionValueIsValid) && !isFetching && options?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material63.MenuItem, { disabled: true, "data-testid": `${dataTestId}-empty-message`, children: emptyMessage }),
|
|
7531
|
+
localOptions.length === 0 && !isFetching && options?.length !== 0 && defaultOptionLabelIsValid && defaultOptionValueIsValid && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
7532
|
+
import_material63.MenuItem,
|
|
7426
7533
|
{
|
|
7427
7534
|
value: defaultOption?.value,
|
|
7428
7535
|
"data-testid": `${dataTestId}-default-option`,
|
|
7429
7536
|
children: defaultOption?.label
|
|
7430
7537
|
}
|
|
7431
7538
|
),
|
|
7432
|
-
!isFetching && combinedOptions.length > 0 && combinedOptions.map((option) => /* @__PURE__ */ (0,
|
|
7433
|
-
|
|
7539
|
+
!isFetching && combinedOptions.length > 0 && combinedOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
7540
|
+
import_material63.MenuItem,
|
|
7434
7541
|
{
|
|
7435
7542
|
value: option?.value,
|
|
7436
7543
|
"data-testid": `${dataTestId}-option-${option?.value}`,
|
|
@@ -7442,7 +7549,7 @@ var SmartSelect = (0, import_react34.forwardRef)(
|
|
|
7442
7549
|
]
|
|
7443
7550
|
}
|
|
7444
7551
|
),
|
|
7445
|
-
helperText && /* @__PURE__ */ (0,
|
|
7552
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_material63.FormHelperText, { "data-testid": `${dataTestId}-helper-text`, children: helperText })
|
|
7446
7553
|
]
|
|
7447
7554
|
}
|
|
7448
7555
|
);
|
|
@@ -7451,15 +7558,15 @@ var SmartSelect = (0, import_react34.forwardRef)(
|
|
|
7451
7558
|
var SmartSelect_default = SmartSelect;
|
|
7452
7559
|
|
|
7453
7560
|
// src/components/SquareLabel/SquareLabel.tsx
|
|
7454
|
-
var
|
|
7455
|
-
var
|
|
7456
|
-
var
|
|
7561
|
+
var import_react36 = require("react");
|
|
7562
|
+
var import_material64 = require("@mui/material");
|
|
7563
|
+
var import_colors52 = require("@mui/material/colors");
|
|
7457
7564
|
var import_mui50 = require("tss-react/mui");
|
|
7458
|
-
var
|
|
7565
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
7459
7566
|
var useStyles45 = (0, import_mui50.makeStyles)()((theme) => ({
|
|
7460
7567
|
red: {
|
|
7461
|
-
backgroundColor:
|
|
7462
|
-
color:
|
|
7568
|
+
backgroundColor: import_colors52.red["50"],
|
|
7569
|
+
color: import_colors52.red["500"],
|
|
7463
7570
|
padding: theme.spacing(1.5),
|
|
7464
7571
|
borderRadius: "5px",
|
|
7465
7572
|
marginTop: theme.spacing(1),
|
|
@@ -7470,15 +7577,15 @@ var useStyles45 = (0, import_mui50.makeStyles)()((theme) => ({
|
|
|
7470
7577
|
}));
|
|
7471
7578
|
var SquareLabel = ({ color, copy }) => {
|
|
7472
7579
|
const { classes } = useStyles45();
|
|
7473
|
-
return /* @__PURE__ */ (0,
|
|
7580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_material64.Typography, { className: classes[color], children: copy });
|
|
7474
7581
|
};
|
|
7475
|
-
var SquareLabel_default = (0,
|
|
7582
|
+
var SquareLabel_default = (0, import_react36.memo)(SquareLabel);
|
|
7476
7583
|
|
|
7477
7584
|
// src/components/Switch/Switch.tsx
|
|
7478
|
-
var
|
|
7479
|
-
var
|
|
7585
|
+
var import_react37 = require("react");
|
|
7586
|
+
var import_material65 = require("@mui/material");
|
|
7480
7587
|
var import_mui51 = require("tss-react/mui");
|
|
7481
|
-
var
|
|
7588
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
7482
7589
|
var LSwitch = ({
|
|
7483
7590
|
checked,
|
|
7484
7591
|
labelOn,
|
|
@@ -7486,8 +7593,8 @@ var LSwitch = ({
|
|
|
7486
7593
|
handleChange,
|
|
7487
7594
|
classes,
|
|
7488
7595
|
disabled
|
|
7489
|
-
}) => /* @__PURE__ */ (0,
|
|
7490
|
-
|
|
7596
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: classes.c_switch, children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
7597
|
+
import_material65.Grid,
|
|
7491
7598
|
{
|
|
7492
7599
|
component: "label",
|
|
7493
7600
|
container: true,
|
|
@@ -7496,9 +7603,9 @@ var LSwitch = ({
|
|
|
7496
7603
|
alignItems: "center"
|
|
7497
7604
|
},
|
|
7498
7605
|
children: [
|
|
7499
|
-
labelOff && /* @__PURE__ */ (0,
|
|
7500
|
-
/* @__PURE__ */ (0,
|
|
7501
|
-
|
|
7606
|
+
labelOff && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.Grid, { children: labelOff }),
|
|
7607
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.Grid, { children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
7608
|
+
import_material65.Switch,
|
|
7502
7609
|
{
|
|
7503
7610
|
checked,
|
|
7504
7611
|
color: "primary",
|
|
@@ -7506,7 +7613,7 @@ var LSwitch = ({
|
|
|
7506
7613
|
disabled
|
|
7507
7614
|
}
|
|
7508
7615
|
) }),
|
|
7509
|
-
labelOn && /* @__PURE__ */ (0,
|
|
7616
|
+
labelOn && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.Grid, { children: labelOn })
|
|
7510
7617
|
]
|
|
7511
7618
|
}
|
|
7512
7619
|
) });
|
|
@@ -7528,13 +7635,13 @@ var LabelledSwitch = (0, import_mui51.withStyles)(LSwitch, (theme) => ({
|
|
|
7528
7635
|
fontSize: "1rem"
|
|
7529
7636
|
}
|
|
7530
7637
|
}));
|
|
7531
|
-
var Switch_default = (0,
|
|
7638
|
+
var Switch_default = (0, import_react37.memo)(LabelledSwitch);
|
|
7532
7639
|
|
|
7533
7640
|
// src/components/SmartTableHeaderFilterMenu/SmartTableHeaderFilterMenu.tsx
|
|
7534
|
-
var
|
|
7535
|
-
var
|
|
7641
|
+
var import_react38 = require("react");
|
|
7642
|
+
var import_material66 = require("@mui/material");
|
|
7536
7643
|
var import_classnames3 = __toESM(require("classnames"), 1);
|
|
7537
|
-
var
|
|
7644
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
7538
7645
|
var MAX_WIDTH = 276;
|
|
7539
7646
|
var findFilterIndex = (filters, filterOption) => filters.findIndex((item) => {
|
|
7540
7647
|
if (typeof item === "string" && typeof filterOption === "string") {
|
|
@@ -7545,138 +7652,138 @@ var findFilterIndex = (filters, filterOption) => filters.findIndex((item) => {
|
|
|
7545
7652
|
}
|
|
7546
7653
|
return false;
|
|
7547
7654
|
});
|
|
7548
|
-
var SmartTableHeaderFilterMenu = (
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7655
|
+
var SmartTableHeaderFilterMenu = ({
|
|
7656
|
+
headCell,
|
|
7657
|
+
numActiveFilters,
|
|
7658
|
+
headerFilters,
|
|
7659
|
+
shouldShowCheckOnFilter,
|
|
7660
|
+
onApplyFilters
|
|
7661
|
+
}) => {
|
|
7662
|
+
const [anchorEl, setAnchorEl] = (0, import_react38.useState)(null);
|
|
7663
|
+
const [filterOptionsData, setFilterOptionsData] = (0, import_react38.useState)();
|
|
7664
|
+
const [selectedFilterOptions, setSelectedFilterOptions] = (0, import_react38.useState)(headerFilters[headCell.id] ?? []);
|
|
7665
|
+
const numFilterOptions = filterOptionsData?.length ?? 0;
|
|
7666
|
+
(0, import_react38.useEffect)(() => {
|
|
7667
|
+
if (headCell.filterOptions) {
|
|
7668
|
+
setFilterOptionsData(headCell.filterOptions);
|
|
7669
|
+
} else if (headCell.filterType === "boolean") {
|
|
7670
|
+
setFilterOptionsData([
|
|
7671
|
+
{ id: "true", label: "Yes" },
|
|
7672
|
+
{ id: "false", label: "No" }
|
|
7673
|
+
]);
|
|
7674
|
+
}
|
|
7675
|
+
}, [headCell.filterOptions]);
|
|
7676
|
+
const handleFilterMenuOpen = (event) => {
|
|
7677
|
+
if (!numFilterOptions && headCell.filterType === "default") {
|
|
7678
|
+
headCell.refetchFilterOptions?.();
|
|
7679
|
+
}
|
|
7680
|
+
setAnchorEl(event.currentTarget);
|
|
7681
|
+
};
|
|
7682
|
+
const handleFilterMenuClose = () => {
|
|
7683
|
+
setSelectedFilterOptions(headerFilters[headCell.id]);
|
|
7684
|
+
setAnchorEl(null);
|
|
7685
|
+
};
|
|
7686
|
+
const handleSelectAllChange = (checked) => {
|
|
7687
|
+
if (checked) {
|
|
7688
|
+
setSelectedFilterOptions([
|
|
7689
|
+
...filterOptionsData ?? []
|
|
7690
|
+
]);
|
|
7691
|
+
return;
|
|
7692
|
+
}
|
|
7693
|
+
setSelectedFilterOptions([]);
|
|
7694
|
+
};
|
|
7695
|
+
const handleFilterOptionChange = (option) => {
|
|
7696
|
+
const selectedIndex = findFilterIndex(selectedFilterOptions, option);
|
|
7697
|
+
let newSelected;
|
|
7698
|
+
if (selectedIndex === -1) {
|
|
7699
|
+
if (typeof option === "string") {
|
|
7700
|
+
newSelected = [...selectedFilterOptions, option];
|
|
7701
|
+
} else {
|
|
7702
|
+
newSelected = [
|
|
7703
|
+
...selectedFilterOptions,
|
|
7704
|
+
option
|
|
7705
|
+
];
|
|
7571
7706
|
}
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7707
|
+
} else {
|
|
7708
|
+
newSelected = selectedFilterOptions.filter(
|
|
7709
|
+
(_, index) => index !== selectedIndex
|
|
7710
|
+
);
|
|
7711
|
+
}
|
|
7712
|
+
setSelectedFilterOptions(newSelected);
|
|
7713
|
+
};
|
|
7714
|
+
const handleApplyFiltersClick = (shouldSave) => {
|
|
7715
|
+
const updatedFilters = {
|
|
7716
|
+
...headerFilters,
|
|
7717
|
+
[headCell.id]: [...selectedFilterOptions]
|
|
7577
7718
|
};
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7719
|
+
onApplyFilters?.(updatedFilters, shouldSave);
|
|
7720
|
+
setAnchorEl(null);
|
|
7721
|
+
};
|
|
7722
|
+
(0, import_react38.useEffect)(() => {
|
|
7723
|
+
setSelectedFilterOptions(headerFilters[headCell.id] ?? []);
|
|
7724
|
+
}, [headerFilters, headCell.id]);
|
|
7725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_jsx_runtime119.Fragment, { children: [
|
|
7726
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
7727
|
+
ActiveFiltersIconButton,
|
|
7728
|
+
{
|
|
7729
|
+
numActiveFilters,
|
|
7730
|
+
handleClick: handleFilterMenuOpen,
|
|
7731
|
+
className: (0, import_classnames3.default)("filter-menu-trigger", {
|
|
7732
|
+
"has-active-filters": !!numActiveFilters || !!anchorEl
|
|
7733
|
+
})
|
|
7584
7734
|
}
|
|
7585
|
-
|
|
7586
|
-
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
}
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7735
|
+
),
|
|
7736
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
7737
|
+
import_material66.Menu,
|
|
7738
|
+
{
|
|
7739
|
+
open: !!anchorEl,
|
|
7740
|
+
onClose: handleFilterMenuClose,
|
|
7741
|
+
anchorEl,
|
|
7742
|
+
"data-testid": "filter-menu",
|
|
7743
|
+
slotProps: {
|
|
7744
|
+
list: {
|
|
7745
|
+
sx: { p: 0, maxWidth: MAX_WIDTH }
|
|
7746
|
+
}
|
|
7747
|
+
},
|
|
7748
|
+
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
7749
|
+
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
7750
|
+
children: headCell.filterType === "autocomplete" ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
7751
|
+
AutocompleteFilterMenuContent,
|
|
7752
|
+
{
|
|
7753
|
+
columnId: headCell.id,
|
|
7754
|
+
labelFieldName: headCell.fieldName ?? "",
|
|
7755
|
+
isLoading: headCell.isFetchingFilterOptions,
|
|
7756
|
+
filterOptions: filterOptionsData,
|
|
7757
|
+
onAutocompleteSearch: headCell.onAutocompleteSearch,
|
|
7758
|
+
selectedFilterOptions,
|
|
7759
|
+
onFilterOptionChange: handleFilterOptionChange,
|
|
7760
|
+
onApplyFiltersClick: handleApplyFiltersClick,
|
|
7761
|
+
shouldShowCheckOnFilter
|
|
7762
|
+
}
|
|
7763
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
7764
|
+
CheckboxFilterMenuContent,
|
|
7765
|
+
{
|
|
7766
|
+
columnId: headCell.id,
|
|
7767
|
+
labelFieldName: headCell.fieldName ?? "",
|
|
7768
|
+
isLoading: headCell.isFetchingFilterOptions,
|
|
7769
|
+
selectedFilterOptions,
|
|
7770
|
+
filterOptions: filterOptionsData ?? [],
|
|
7771
|
+
onSelectAllChange: handleSelectAllChange,
|
|
7772
|
+
onFilterOptionChange: handleFilterOptionChange,
|
|
7773
|
+
onApplyFiltersClick: handleApplyFiltersClick,
|
|
7774
|
+
shouldShowCheckOnFilter
|
|
7775
|
+
}
|
|
7776
|
+
)
|
|
7603
7777
|
}
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
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
|
-
);
|
|
7778
|
+
)
|
|
7779
|
+
] });
|
|
7780
|
+
};
|
|
7674
7781
|
|
|
7675
7782
|
// src/components/SmartTableHeader/SmartTableHeader.tsx
|
|
7676
|
-
var
|
|
7677
|
-
var
|
|
7678
|
-
var
|
|
7679
|
-
var SmartTableHeader = (0,
|
|
7783
|
+
var import_react39 = require("react");
|
|
7784
|
+
var import_material67 = require("@mui/material");
|
|
7785
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
7786
|
+
var SmartTableHeader = (0, import_react39.memo)(
|
|
7680
7787
|
({
|
|
7681
7788
|
order,
|
|
7682
7789
|
orderBy,
|
|
@@ -7694,19 +7801,26 @@ var SmartTableHeader = (0, import_react38.memo)(
|
|
|
7694
7801
|
onRequestSort(event, property);
|
|
7695
7802
|
};
|
|
7696
7803
|
const isSortActive = (headCellId) => orderBy === headCellId;
|
|
7697
|
-
return /* @__PURE__ */ (0,
|
|
7698
|
-
enableCheckboxSelection ? /* @__PURE__ */ (0,
|
|
7699
|
-
|
|
7804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_material67.TableRow, { children: [
|
|
7805
|
+
enableCheckboxSelection ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
7806
|
+
import_material67.TableCell,
|
|
7700
7807
|
{
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7808
|
+
padding: "checkbox",
|
|
7809
|
+
sx: { backgroundColor: colors.neutral100 },
|
|
7810
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
7811
|
+
import_material67.Checkbox,
|
|
7812
|
+
{
|
|
7813
|
+
color: "primary",
|
|
7814
|
+
disableRipple: true,
|
|
7815
|
+
indeterminate: numSelectedRows > 0 && numSelectedRows < numRows,
|
|
7816
|
+
checked: numRows > 0 && numSelectedRows === numRows,
|
|
7817
|
+
onChange: onSelectAllClick
|
|
7818
|
+
}
|
|
7819
|
+
)
|
|
7706
7820
|
}
|
|
7707
|
-
)
|
|
7708
|
-
headCells.map((headCell) => /* @__PURE__ */ (0,
|
|
7709
|
-
|
|
7821
|
+
) : null,
|
|
7822
|
+
headCells.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
7823
|
+
import_material67.TableCell,
|
|
7710
7824
|
{
|
|
7711
7825
|
align: "left",
|
|
7712
7826
|
width: headCell.width ?? "auto",
|
|
@@ -7729,31 +7843,23 @@ var SmartTableHeader = (0, import_react38.memo)(
|
|
|
7729
7843
|
}
|
|
7730
7844
|
}
|
|
7731
7845
|
},
|
|
7732
|
-
children: /* @__PURE__ */ (0,
|
|
7733
|
-
|
|
7846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
7847
|
+
import_material67.Box,
|
|
7734
7848
|
{
|
|
7735
7849
|
display: "flex",
|
|
7736
7850
|
flexDirection: "row",
|
|
7737
7851
|
gap: headCell.disableSort ? 1 : 0,
|
|
7738
7852
|
children: [
|
|
7739
|
-
headCell.disableSort ? headCell.
|
|
7740
|
-
|
|
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,
|
|
7853
|
+
headCell.disableSort ? headCell.renderHeader ?? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Tooltip, { title: headCell.labelTooltip ?? "", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Typography, { variant: "subtitle2", mt: 0.25, mb: -0.25, children: headCell.label }) }) : /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Tooltip, { title: headCell.labelTooltip ?? "", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
7854
|
+
import_material67.TableSortLabel,
|
|
7749
7855
|
{
|
|
7750
7856
|
"data-testid": "table-sort-label",
|
|
7751
7857
|
active: isSortActive(headCell.id),
|
|
7752
7858
|
direction: orderBy === headCell.id ? order : "asc",
|
|
7753
7859
|
onClick: createSortHandler(headCell.id),
|
|
7754
7860
|
children: [
|
|
7755
|
-
headCell.
|
|
7756
|
-
orderBy === headCell.id ? /* @__PURE__ */ (0,
|
|
7861
|
+
headCell.renderHeader ?? headCell.label,
|
|
7862
|
+
orderBy === headCell.id ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
7757
7863
|
"span",
|
|
7758
7864
|
{
|
|
7759
7865
|
style: {
|
|
@@ -7773,7 +7879,7 @@ var SmartTableHeader = (0, import_react38.memo)(
|
|
|
7773
7879
|
]
|
|
7774
7880
|
}
|
|
7775
7881
|
) }),
|
|
7776
|
-
headCell.
|
|
7882
|
+
headCell.filterType ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
7777
7883
|
SmartTableHeaderFilterMenu,
|
|
7778
7884
|
{
|
|
7779
7885
|
headCell,
|
|
@@ -7794,20 +7900,20 @@ var SmartTableHeader = (0, import_react38.memo)(
|
|
|
7794
7900
|
);
|
|
7795
7901
|
|
|
7796
7902
|
// src/components/Table/Table.tsx
|
|
7797
|
-
var
|
|
7798
|
-
var
|
|
7903
|
+
var import_react40 = require("react");
|
|
7904
|
+
var import_material69 = require("@mui/material");
|
|
7799
7905
|
var import_debounce = __toESM(require_debounce(), 1);
|
|
7800
7906
|
var import_mui52 = require("tss-react/mui");
|
|
7801
7907
|
var import_uuid = require("uuid");
|
|
7802
7908
|
|
|
7803
7909
|
// src/components/TableLoading/TableLoading.tsx
|
|
7804
|
-
var
|
|
7805
|
-
var
|
|
7910
|
+
var import_material68 = require("@mui/material");
|
|
7911
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
7806
7912
|
var TableLoading = ({
|
|
7807
7913
|
rowsPerPage,
|
|
7808
7914
|
rowHeight
|
|
7809
|
-
}) => /* @__PURE__ */ (0,
|
|
7810
|
-
|
|
7915
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_material68.Box, { children: Array.from({ length: rowsPerPage ?? 0 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
7916
|
+
import_material68.Skeleton,
|
|
7811
7917
|
{
|
|
7812
7918
|
animation: "pulse",
|
|
7813
7919
|
"data-testid": "table-loading-skeleton",
|
|
@@ -7855,7 +7961,7 @@ function calculateRowsPerPage(rowHeight) {
|
|
|
7855
7961
|
}
|
|
7856
7962
|
|
|
7857
7963
|
// src/components/Table/Table.tsx
|
|
7858
|
-
var
|
|
7964
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
7859
7965
|
var useStyles46 = (0, import_mui52.makeStyles)()(() => ({
|
|
7860
7966
|
root: {
|
|
7861
7967
|
height: "calc(100vh - 262px)",
|
|
@@ -7890,11 +7996,11 @@ var Table = ({
|
|
|
7890
7996
|
serverRendered,
|
|
7891
7997
|
updateSort
|
|
7892
7998
|
}) => {
|
|
7893
|
-
const [order, setOrder] = (0,
|
|
7894
|
-
const [orderBy, setOrderBy] = (0,
|
|
7999
|
+
const [order, setOrder] = (0, import_react40.useState)(appliedFilters?.sortDir || "desc");
|
|
8000
|
+
const [orderBy, setOrderBy] = (0, import_react40.useState)(
|
|
7895
8001
|
appliedFilters?.sortField || "delivery_date"
|
|
7896
8002
|
);
|
|
7897
|
-
const [rowsPerPage, setRowsPerPage] = (0,
|
|
8003
|
+
const [rowsPerPage, setRowsPerPage] = (0, import_react40.useState)(defaultRowsPerPage);
|
|
7898
8004
|
const { classes } = useStyles46();
|
|
7899
8005
|
const rowHeight = 56;
|
|
7900
8006
|
const emptyRows = rowsPerPage - Math.min(rowsPerPage, data.length - page * rowsPerPage);
|
|
@@ -7907,7 +8013,7 @@ var Table = ({
|
|
|
7907
8013
|
updateSort(property, orderDir);
|
|
7908
8014
|
}
|
|
7909
8015
|
};
|
|
7910
|
-
(0,
|
|
8016
|
+
(0, import_react40.useLayoutEffect)(() => {
|
|
7911
8017
|
if (!doNotCalculateRows) {
|
|
7912
8018
|
return;
|
|
7913
8019
|
}
|
|
@@ -7933,25 +8039,25 @@ var Table = ({
|
|
|
7933
8039
|
);
|
|
7934
8040
|
const rowsComponents = rows.map((row) => {
|
|
7935
8041
|
if (RenderItem) {
|
|
7936
|
-
return /* @__PURE__ */ (0,
|
|
8042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(RenderItem, { ...row }, row.id);
|
|
7937
8043
|
}
|
|
7938
|
-
return /* @__PURE__ */ (0,
|
|
8044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableRow, { hover: true, onClick: () => onRowClick?.(row), children: headCells?.map((column) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableCell, { children: row[column.id] }, column.id)) }, row.id);
|
|
7939
8045
|
});
|
|
7940
8046
|
if (emptyRows > 0 && rowsPerPage > emptyRows) {
|
|
7941
8047
|
rowsComponents.push(
|
|
7942
|
-
/* @__PURE__ */ (0,
|
|
8048
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableRow, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableCell, { colSpan: 8 }) }, (0, import_uuid.v4)())
|
|
7943
8049
|
);
|
|
7944
8050
|
}
|
|
7945
8051
|
return rowsComponents;
|
|
7946
8052
|
};
|
|
7947
|
-
return /* @__PURE__ */ (0,
|
|
7948
|
-
/* @__PURE__ */ (0,
|
|
7949
|
-
|
|
8053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.Paper, { className: classes.root, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.Box, { className: classes.paper, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(TableLoading_default, { rowHeight, rowsPerPage }) : /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableContainer, { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_material69.Table, { size: "medium", stickyHeader: true, children: [
|
|
8054
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableHead, { className: classes.header, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableRow, { children: headCells?.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
8055
|
+
import_material69.TableCell,
|
|
7950
8056
|
{
|
|
7951
8057
|
align: "left",
|
|
7952
8058
|
sortDirection: orderBy === headCell.id ? order : void 0,
|
|
7953
|
-
children: /* @__PURE__ */ (0,
|
|
7954
|
-
|
|
8059
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
8060
|
+
import_material69.TableSortLabel,
|
|
7955
8061
|
{
|
|
7956
8062
|
active: orderBy === headCell.id,
|
|
7957
8063
|
direction: orderBy === headCell.id ? order : "asc",
|
|
@@ -7962,29 +8068,29 @@ var Table = ({
|
|
|
7962
8068
|
},
|
|
7963
8069
|
headCell.id
|
|
7964
8070
|
)) }) }),
|
|
7965
|
-
/* @__PURE__ */ (0,
|
|
8071
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_material69.TableBody, { children: [
|
|
7966
8072
|
getTableRows(),
|
|
7967
|
-
rowsPerPage === emptyRows && /* @__PURE__ */ (0,
|
|
8073
|
+
rowsPerPage === emptyRows && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableRow, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.TableCell, { colSpan: 8, align: "center", children: "Nothing to display" }) })
|
|
7968
8074
|
] })
|
|
7969
8075
|
] }) }) }) });
|
|
7970
8076
|
};
|
|
7971
8077
|
var Table_default = Table;
|
|
7972
8078
|
|
|
7973
8079
|
// src/components/TableDesktop/TableDesktop.tsx
|
|
7974
|
-
var
|
|
7975
|
-
var
|
|
8080
|
+
var import_react41 = require("react");
|
|
8081
|
+
var import_material74 = require("@mui/material");
|
|
7976
8082
|
|
|
7977
8083
|
// src/components/TableDesktopLoadingState/TableDesktopLoadingState.tsx
|
|
7978
|
-
var
|
|
7979
|
-
var
|
|
8084
|
+
var import_material70 = require("@mui/material");
|
|
8085
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
7980
8086
|
var getRange = (n) => Array.from({ length: n }, (_, i) => i + 1);
|
|
7981
8087
|
var TableDesktopLoadingState = ({
|
|
7982
8088
|
numRows,
|
|
7983
8089
|
numColumns,
|
|
7984
8090
|
rowHeight = 56
|
|
7985
8091
|
}) => {
|
|
7986
|
-
return getRange(numRows).map((rowNum) => /* @__PURE__ */ (0,
|
|
7987
|
-
|
|
8092
|
+
return getRange(numRows).map((rowNum) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_material70.TableRow, { children: getRange(numColumns).map((colNum) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_material70.TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
8093
|
+
import_material70.Skeleton,
|
|
7988
8094
|
{
|
|
7989
8095
|
animation: "pulse",
|
|
7990
8096
|
variant: "rounded",
|
|
@@ -8002,11 +8108,11 @@ var import_TableRow = __toESM(require("@mui/material/TableRow"), 1);
|
|
|
8002
8108
|
var import_Typography = __toESM(require("@mui/material/Typography"), 1);
|
|
8003
8109
|
|
|
8004
8110
|
// src/components/Buttons/BaseButton/BaseIconButton.tsx
|
|
8005
|
-
var
|
|
8006
|
-
var
|
|
8111
|
+
var import_material71 = require("@mui/material");
|
|
8112
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
8007
8113
|
var BaseIconButton = ({ icon, sx, ...props }) => {
|
|
8008
|
-
return /* @__PURE__ */ (0,
|
|
8009
|
-
|
|
8114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
8115
|
+
import_material71.Button,
|
|
8010
8116
|
{
|
|
8011
8117
|
sx: {
|
|
8012
8118
|
display: "flex",
|
|
@@ -8026,10 +8132,10 @@ var BaseIconButton = ({ icon, sx, ...props }) => {
|
|
|
8026
8132
|
};
|
|
8027
8133
|
|
|
8028
8134
|
// src/components/TableDesktopNoColumnsMessage/TableDesktopNoColumnsMessage.tsx
|
|
8029
|
-
var
|
|
8135
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
8030
8136
|
var TableDesktopNoColumnsMessage = ({
|
|
8031
8137
|
onClickNoColumnsMessageOpenMenu
|
|
8032
|
-
}) => /* @__PURE__ */ (0,
|
|
8138
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_TableBody.default, { children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_TableRow.default, { children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
8033
8139
|
import_TableCell.default,
|
|
8034
8140
|
{
|
|
8035
8141
|
sx: {
|
|
@@ -8042,9 +8148,9 @@ var TableDesktopNoColumnsMessage = ({
|
|
|
8042
8148
|
alignItems: "center"
|
|
8043
8149
|
},
|
|
8044
8150
|
children: [
|
|
8045
|
-
/* @__PURE__ */ (0,
|
|
8046
|
-
/* @__PURE__ */ (0,
|
|
8047
|
-
/* @__PURE__ */ (0,
|
|
8151
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_Typography.default, { variant: "subtitle2", fontSize: 16, children: "Customise your view" }),
|
|
8152
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_Typography.default, { variant: "subtitle1", align: "center", color: "textSecondary", children: "Open the menu to customise your table and search." }),
|
|
8153
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
8048
8154
|
import_Typography.default,
|
|
8049
8155
|
{
|
|
8050
8156
|
variant: "subtitle1",
|
|
@@ -8057,18 +8163,18 @@ var TableDesktopNoColumnsMessage = ({
|
|
|
8057
8163
|
},
|
|
8058
8164
|
children: [
|
|
8059
8165
|
"Tips: ",
|
|
8060
|
-
/* @__PURE__ */ (0,
|
|
8166
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_Typography.default, { component: "strong", children: "Save as default" }),
|
|
8061
8167
|
" to keep these columns for future views"
|
|
8062
8168
|
]
|
|
8063
8169
|
}
|
|
8064
8170
|
),
|
|
8065
|
-
/* @__PURE__ */ (0,
|
|
8171
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
8066
8172
|
BaseIconButton,
|
|
8067
8173
|
{
|
|
8068
8174
|
variant: "contained",
|
|
8069
8175
|
color: "primary",
|
|
8070
8176
|
onClick: onClickNoColumnsMessageOpenMenu,
|
|
8071
|
-
icon: /* @__PURE__ */ (0,
|
|
8177
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(IconTableEdit_default, { fill: colors.white }),
|
|
8072
8178
|
children: "OPEN MENU"
|
|
8073
8179
|
}
|
|
8074
8180
|
)
|
|
@@ -8077,7 +8183,7 @@ var TableDesktopNoColumnsMessage = ({
|
|
|
8077
8183
|
) }) });
|
|
8078
8184
|
|
|
8079
8185
|
// src/components/TableDesktopRows/TableDesktopRows.tsx
|
|
8080
|
-
var
|
|
8186
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
8081
8187
|
var descendingComparator2 = (a, b, orderBy) => {
|
|
8082
8188
|
const objA = a[orderBy];
|
|
8083
8189
|
const objB = b[orderBy];
|
|
@@ -8109,7 +8215,7 @@ var TableDesktopRows = ({
|
|
|
8109
8215
|
data,
|
|
8110
8216
|
RenderItem,
|
|
8111
8217
|
visibleHeadCells,
|
|
8112
|
-
|
|
8218
|
+
getRowId,
|
|
8113
8219
|
order,
|
|
8114
8220
|
orderBy,
|
|
8115
8221
|
disableInternalSort,
|
|
@@ -8122,8 +8228,9 @@ var TableDesktopRows = ({
|
|
|
8122
8228
|
}) => {
|
|
8123
8229
|
const sortedData = disableInternalSort ? data : stableSort2(data, getComparator(order, orderBy));
|
|
8124
8230
|
return sortedData.map((row, index) => {
|
|
8125
|
-
const
|
|
8126
|
-
|
|
8231
|
+
const rowId = getRowId(row);
|
|
8232
|
+
const isItemSelected = selectedRows.has(rowId);
|
|
8233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
8127
8234
|
RenderItem,
|
|
8128
8235
|
{
|
|
8129
8236
|
...{
|
|
@@ -8134,19 +8241,19 @@ var TableDesktopRows = ({
|
|
|
8134
8241
|
enableEditMode,
|
|
8135
8242
|
enableCheckboxSelection,
|
|
8136
8243
|
rowHeight,
|
|
8137
|
-
rowId
|
|
8244
|
+
rowId,
|
|
8138
8245
|
onRowCheckboxChange,
|
|
8139
8246
|
visibleHeadCells
|
|
8140
8247
|
}
|
|
8141
8248
|
},
|
|
8142
|
-
|
|
8249
|
+
rowId ?? index
|
|
8143
8250
|
);
|
|
8144
8251
|
});
|
|
8145
8252
|
};
|
|
8146
8253
|
|
|
8147
8254
|
// src/components/TableDesktopRowSelectionBar/TableDesktopRowSelectionBar.tsx
|
|
8148
|
-
var
|
|
8149
|
-
var
|
|
8255
|
+
var import_material72 = require("@mui/material");
|
|
8256
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
8150
8257
|
var TableDesktopRowSelectionBar = ({
|
|
8151
8258
|
isEveryRowInPageSelected,
|
|
8152
8259
|
isRowsFromAllPagesSelected,
|
|
@@ -8165,8 +8272,8 @@ var TableDesktopRowSelectionBar = ({
|
|
|
8165
8272
|
}
|
|
8166
8273
|
return `${numSelectedRows} row${numSelectedRows > 1 ? "s" : ""} selected.`;
|
|
8167
8274
|
};
|
|
8168
|
-
return isAnyRowSelected ? /* @__PURE__ */ (0,
|
|
8169
|
-
|
|
8275
|
+
return isAnyRowSelected ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
8276
|
+
import_material72.Box,
|
|
8170
8277
|
{
|
|
8171
8278
|
sx: {
|
|
8172
8279
|
p: 1,
|
|
@@ -8178,22 +8285,22 @@ var TableDesktopRowSelectionBar = ({
|
|
|
8178
8285
|
backgroundColor: colors.neutral150
|
|
8179
8286
|
},
|
|
8180
8287
|
children: [
|
|
8181
|
-
/* @__PURE__ */ (0,
|
|
8182
|
-
!isRowsFromAllPagesSelected ? /* @__PURE__ */ (0,
|
|
8288
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material72.Typography, { children: getSelectedRowsText() }),
|
|
8289
|
+
!isRowsFromAllPagesSelected ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material72.Button, { onClick: onSelectRowsFromAllPagesClick, children: [
|
|
8183
8290
|
"Select all ",
|
|
8184
8291
|
totalRowCount,
|
|
8185
8292
|
" rows from all pages based on your filters"
|
|
8186
8293
|
] }) : null,
|
|
8187
|
-
/* @__PURE__ */ (0,
|
|
8294
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material72.Button, { onClick: onClearSelectionClick, children: "Clear Selection" })
|
|
8188
8295
|
]
|
|
8189
8296
|
}
|
|
8190
8297
|
) : null;
|
|
8191
8298
|
};
|
|
8192
8299
|
|
|
8193
8300
|
// src/components/TableEmptyResult/TableEmptyResult.tsx
|
|
8194
|
-
var
|
|
8301
|
+
var import_material73 = require("@mui/material");
|
|
8195
8302
|
var import_mui53 = require("tss-react/mui");
|
|
8196
|
-
var
|
|
8303
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
8197
8304
|
var useStyles47 = (0, import_mui53.makeStyles)()(() => ({
|
|
8198
8305
|
tableCellIcon: { padding: 24, height: "calc(100vh - 320px)" },
|
|
8199
8306
|
tableCellDefault: { padding: 24 }
|
|
@@ -8205,17 +8312,17 @@ var TableEmptyResult = ({
|
|
|
8205
8312
|
}
|
|
8206
8313
|
}) => {
|
|
8207
8314
|
const { classes } = useStyles47();
|
|
8208
|
-
return showClearFilterButton ? /* @__PURE__ */ (0,
|
|
8209
|
-
|
|
8315
|
+
return showClearFilterButton ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material73.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
8316
|
+
import_material73.TableCell,
|
|
8210
8317
|
{
|
|
8211
8318
|
className: classes.tableCellIcon,
|
|
8212
8319
|
colSpan,
|
|
8213
8320
|
align: "center",
|
|
8214
8321
|
children: [
|
|
8215
|
-
/* @__PURE__ */ (0,
|
|
8216
|
-
/* @__PURE__ */ (0,
|
|
8217
|
-
/* @__PURE__ */ (0,
|
|
8218
|
-
/* @__PURE__ */ (0,
|
|
8322
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(EmptyGlassIcon_default, {}),
|
|
8323
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material73.Typography, { variant: "h6", children: "No results found." }),
|
|
8324
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material73.Typography, { variant: "subtitle1", children: "Search without applied filters?" }),
|
|
8325
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
8219
8326
|
FilledButton_default,
|
|
8220
8327
|
{
|
|
8221
8328
|
copy: "Search",
|
|
@@ -8226,8 +8333,8 @@ var TableEmptyResult = ({
|
|
|
8226
8333
|
)
|
|
8227
8334
|
]
|
|
8228
8335
|
}
|
|
8229
|
-
) }) : /* @__PURE__ */ (0,
|
|
8230
|
-
|
|
8336
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material73.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
8337
|
+
import_material73.TableCell,
|
|
8231
8338
|
{
|
|
8232
8339
|
className: classes.tableCellDefault,
|
|
8233
8340
|
colSpan,
|
|
@@ -8239,7 +8346,13 @@ var TableEmptyResult = ({
|
|
|
8239
8346
|
var TableEmptyResult_default = TableEmptyResult;
|
|
8240
8347
|
|
|
8241
8348
|
// src/components/TableDesktop/TableDesktop.tsx
|
|
8242
|
-
var
|
|
8349
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
8350
|
+
var resolveKeyValue = (keyField, rowData) => {
|
|
8351
|
+
if (typeof keyField === "string") {
|
|
8352
|
+
return rowData[keyField];
|
|
8353
|
+
}
|
|
8354
|
+
return keyField?.(rowData);
|
|
8355
|
+
};
|
|
8243
8356
|
var TableDesktop = ({
|
|
8244
8357
|
data = [],
|
|
8245
8358
|
headCells,
|
|
@@ -8266,24 +8379,24 @@ var TableDesktop = ({
|
|
|
8266
8379
|
shouldShowCheckOnFilter,
|
|
8267
8380
|
refetchData
|
|
8268
8381
|
}) => {
|
|
8269
|
-
const tableToolbarMenuButtonRef = (0,
|
|
8270
|
-
const [tableToolbarMenuAnchor, setTableToolbarMenuAnchor] = (0,
|
|
8271
|
-
const [order, setOrder] = (0,
|
|
8272
|
-
const [orderBy, setOrderBy] = (0,
|
|
8382
|
+
const tableToolbarMenuButtonRef = (0, import_react41.useRef)(null);
|
|
8383
|
+
const [tableToolbarMenuAnchor, setTableToolbarMenuAnchor] = (0, import_react41.useState)(null);
|
|
8384
|
+
const [order, setOrder] = (0, import_react41.useState)(appliedFilters?.sortDir || "desc");
|
|
8385
|
+
const [orderBy, setOrderBy] = (0, import_react41.useState)(
|
|
8273
8386
|
appliedFilters?.sortField || "delivery_date"
|
|
8274
8387
|
);
|
|
8275
|
-
const [selectedRows, setSelectedRows] = (0,
|
|
8276
|
-
|
|
8277
|
-
);
|
|
8278
|
-
const [isRowsFromAllPagesSelected, setIsRowsFromAllPagesSelected] = (0, import_react40.useState)(false);
|
|
8279
|
-
const [isBulkChangesMode, setIsBulkChangesMode] = (0, import_react40.useState)(false);
|
|
8388
|
+
const [selectedRows, setSelectedRows] = (0, import_react41.useState)(/* @__PURE__ */ new Set());
|
|
8389
|
+
const [isRowsFromAllPagesSelected, setIsRowsFromAllPagesSelected] = (0, import_react41.useState)(false);
|
|
8390
|
+
const [isBulkChangesMode, setIsBulkChangesMode] = (0, import_react41.useState)(false);
|
|
8280
8391
|
const numRows = data.length;
|
|
8281
|
-
const numSelectedRows = (0,
|
|
8282
|
-
const currentPageIds = new Set(
|
|
8392
|
+
const numSelectedRows = (0, import_react41.useMemo)(() => {
|
|
8393
|
+
const currentPageIds = new Set(
|
|
8394
|
+
data.map((row) => resolveKeyValue(keyField, row))
|
|
8395
|
+
);
|
|
8283
8396
|
return [...selectedRows].filter((id) => currentPageIds.has(id)).length;
|
|
8284
8397
|
}, [data, selectedRows, keyField]);
|
|
8285
8398
|
const isEveryRowInPageSelected = numRows > 0 && numSelectedRows === numRows;
|
|
8286
|
-
const visibleHeadCells = (0,
|
|
8399
|
+
const visibleHeadCells = (0, import_react41.useMemo)(
|
|
8287
8400
|
() => headCells.filter((headCell) => headCell?.enabled ?? true),
|
|
8288
8401
|
[headCells]
|
|
8289
8402
|
);
|
|
@@ -8300,7 +8413,9 @@ var TableDesktop = ({
|
|
|
8300
8413
|
}
|
|
8301
8414
|
};
|
|
8302
8415
|
const selectAllRowsInPage = () => {
|
|
8303
|
-
const allRowsIds = new Set(
|
|
8416
|
+
const allRowsIds = new Set(
|
|
8417
|
+
data.map((row) => resolveKeyValue(keyField, row))
|
|
8418
|
+
);
|
|
8304
8419
|
setSelectedRows(allRowsIds);
|
|
8305
8420
|
};
|
|
8306
8421
|
const resetSelectedRows = () => {
|
|
@@ -8346,7 +8461,7 @@ var TableDesktop = ({
|
|
|
8346
8461
|
resetSelectedRows();
|
|
8347
8462
|
}
|
|
8348
8463
|
};
|
|
8349
|
-
(0,
|
|
8464
|
+
(0, import_react41.useEffect)(() => {
|
|
8350
8465
|
if (isRowsFromAllPagesSelected) {
|
|
8351
8466
|
selectAllRowsInPage();
|
|
8352
8467
|
selectAllRowsInPage();
|
|
@@ -8354,7 +8469,7 @@ var TableDesktop = ({
|
|
|
8354
8469
|
}, [isRowsFromAllPagesSelected, data]);
|
|
8355
8470
|
const renderBody = () => {
|
|
8356
8471
|
if (isLoading) {
|
|
8357
|
-
return /* @__PURE__ */ (0,
|
|
8472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
8358
8473
|
TableDesktopLoadingState,
|
|
8359
8474
|
{
|
|
8360
8475
|
numRows: Math.min(rowsPerPage, 10),
|
|
@@ -8364,7 +8479,7 @@ var TableDesktop = ({
|
|
|
8364
8479
|
);
|
|
8365
8480
|
}
|
|
8366
8481
|
if (numRows === 0) {
|
|
8367
|
-
return /* @__PURE__ */ (0,
|
|
8482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
8368
8483
|
TableEmptyResult_default,
|
|
8369
8484
|
{
|
|
8370
8485
|
showClearFilterButton,
|
|
@@ -8373,13 +8488,13 @@ var TableDesktop = ({
|
|
|
8373
8488
|
}
|
|
8374
8489
|
);
|
|
8375
8490
|
}
|
|
8376
|
-
return /* @__PURE__ */ (0,
|
|
8491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
8377
8492
|
TableDesktopRows,
|
|
8378
8493
|
{
|
|
8379
8494
|
data,
|
|
8380
8495
|
RenderItem,
|
|
8381
8496
|
visibleHeadCells,
|
|
8382
|
-
keyField,
|
|
8497
|
+
getRowId: (rowData) => resolveKeyValue(keyField, rowData),
|
|
8383
8498
|
order,
|
|
8384
8499
|
orderBy,
|
|
8385
8500
|
disableInternalSort,
|
|
@@ -8392,8 +8507,8 @@ var TableDesktop = ({
|
|
|
8392
8507
|
}
|
|
8393
8508
|
);
|
|
8394
8509
|
};
|
|
8395
|
-
return /* @__PURE__ */ (0,
|
|
8396
|
-
|
|
8510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
8511
|
+
import_material74.Box,
|
|
8397
8512
|
{
|
|
8398
8513
|
sx: {
|
|
8399
8514
|
height,
|
|
@@ -8401,8 +8516,8 @@ var TableDesktop = ({
|
|
|
8401
8516
|
justifyContent: "space-between",
|
|
8402
8517
|
justifyItems: "stretch"
|
|
8403
8518
|
},
|
|
8404
|
-
children: /* @__PURE__ */ (0,
|
|
8405
|
-
|
|
8519
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
8520
|
+
import_material74.Paper,
|
|
8406
8521
|
{
|
|
8407
8522
|
sx: {
|
|
8408
8523
|
width: "100%",
|
|
@@ -8426,7 +8541,7 @@ var TableDesktop = ({
|
|
|
8426
8541
|
isBulkChangesMode,
|
|
8427
8542
|
onChangeBulkChangesMode: handleChangeBulkChangesMode
|
|
8428
8543
|
}) : null,
|
|
8429
|
-
/* @__PURE__ */ (0,
|
|
8544
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
8430
8545
|
TableDesktopRowSelectionBar,
|
|
8431
8546
|
{
|
|
8432
8547
|
isEveryRowInPageSelected,
|
|
@@ -8437,8 +8552,8 @@ var TableDesktop = ({
|
|
|
8437
8552
|
onClearSelectionClick: handleClearSelectionClick
|
|
8438
8553
|
}
|
|
8439
8554
|
),
|
|
8440
|
-
/* @__PURE__ */ (0,
|
|
8441
|
-
|
|
8555
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
8556
|
+
import_material74.TableContainer,
|
|
8442
8557
|
{
|
|
8443
8558
|
sx: {
|
|
8444
8559
|
flexGrow: 1,
|
|
@@ -8459,13 +8574,13 @@ var TableDesktop = ({
|
|
|
8459
8574
|
backgroundColor: (theme) => theme.palette.grey[500]
|
|
8460
8575
|
}
|
|
8461
8576
|
},
|
|
8462
|
-
children: /* @__PURE__ */ (0,
|
|
8577
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material74.Table, { stickyHeader: true, "aria-label": "sticky-table", sx: { tableLayout }, children: visibleHeadCells.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
8463
8578
|
TableDesktopNoColumnsMessage,
|
|
8464
8579
|
{
|
|
8465
8580
|
onClickNoColumnsMessageOpenMenu: handleClickToolbarMenuOpen
|
|
8466
8581
|
}
|
|
8467
|
-
) : /* @__PURE__ */ (0,
|
|
8468
|
-
/* @__PURE__ */ (0,
|
|
8582
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_jsx_runtime129.Fragment, { children: [
|
|
8583
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
8469
8584
|
SmartTableHeader,
|
|
8470
8585
|
{
|
|
8471
8586
|
order,
|
|
@@ -8481,7 +8596,7 @@ var TableDesktop = ({
|
|
|
8481
8596
|
shouldShowCheckOnFilter
|
|
8482
8597
|
}
|
|
8483
8598
|
),
|
|
8484
|
-
/* @__PURE__ */ (0,
|
|
8599
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material74.TableBody, { children: renderBody() })
|
|
8485
8600
|
] }) })
|
|
8486
8601
|
}
|
|
8487
8602
|
),
|
|
@@ -8498,99 +8613,142 @@ var TableDesktop = ({
|
|
|
8498
8613
|
};
|
|
8499
8614
|
|
|
8500
8615
|
// src/components/TableDesktopEditableField/TableDesktopEditableField.tsx
|
|
8501
|
-
var
|
|
8616
|
+
var import_react45 = require("react");
|
|
8617
|
+
var import_Delete = __toESM(require("@mui/icons-material/Delete"), 1);
|
|
8618
|
+
var import_material76 = require("@mui/material");
|
|
8619
|
+
var import_x_date_pickers = require("@mui/x-date-pickers");
|
|
8620
|
+
var import_moment3 = __toESM(require("moment"), 1);
|
|
8502
8621
|
|
|
8503
|
-
// src/components/TableDesktopEditableField/
|
|
8504
|
-
var
|
|
8505
|
-
var
|
|
8506
|
-
var
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
);
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
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);
|
|
8622
|
+
// src/components/TableDesktopEditableField/TableDesktopSmartMultipleSelect.tsx
|
|
8623
|
+
var import_react42 = require("react");
|
|
8624
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
8625
|
+
var TableDesktopSmartMultipleSelect = ({
|
|
8626
|
+
initialValue,
|
|
8627
|
+
inputLabel,
|
|
8628
|
+
columnId,
|
|
8629
|
+
fieldName,
|
|
8630
|
+
rowId,
|
|
8631
|
+
disabled,
|
|
8632
|
+
variant = "standard",
|
|
8633
|
+
size,
|
|
8634
|
+
filterOptions,
|
|
8635
|
+
refetchFilterOptions,
|
|
8636
|
+
isFetchingFilterOptions,
|
|
8637
|
+
onUpdateEditableCell
|
|
8638
|
+
}) => {
|
|
8639
|
+
const defaultValues = (0, import_react42.useMemo)(() => {
|
|
8640
|
+
return initialValue?.map((val) => ({
|
|
8641
|
+
value: val.id,
|
|
8642
|
+
label: val[fieldName].toString()
|
|
8643
|
+
}));
|
|
8644
|
+
}, [initialValue]);
|
|
8645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
8646
|
+
SmartMultipleSelect,
|
|
8647
|
+
{
|
|
8648
|
+
inputLabel,
|
|
8649
|
+
size,
|
|
8650
|
+
variant,
|
|
8651
|
+
disabled,
|
|
8652
|
+
defaultValues,
|
|
8653
|
+
menuOptions: filterOptions,
|
|
8654
|
+
isLoading: isFetchingFilterOptions,
|
|
8655
|
+
onOpen: () => {
|
|
8656
|
+
if (!filterOptions?.length) {
|
|
8657
|
+
refetchFilterOptions?.();
|
|
8564
8658
|
}
|
|
8659
|
+
},
|
|
8660
|
+
onClose: (values) => {
|
|
8661
|
+
const optionsValues = values.map((option) => option.value ?? "");
|
|
8662
|
+
const optionsLabels = values.map((option) => option.label ?? "");
|
|
8663
|
+
onUpdateEditableCell?.({
|
|
8664
|
+
rowId,
|
|
8665
|
+
columnId,
|
|
8666
|
+
value: optionsValues,
|
|
8667
|
+
label: optionsLabels
|
|
8668
|
+
});
|
|
8565
8669
|
}
|
|
8566
|
-
|
|
8567
|
-
|
|
8568
|
-
|
|
8670
|
+
}
|
|
8671
|
+
);
|
|
8672
|
+
};
|
|
8673
|
+
|
|
8674
|
+
// src/components/TableDesktopEditableField/TableDesktopSmartSelect.tsx
|
|
8675
|
+
var import_react43 = require("react");
|
|
8676
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
8677
|
+
var TableDesktopSmartSelect = ({
|
|
8678
|
+
ref,
|
|
8679
|
+
initialValue,
|
|
8680
|
+
inputLabel,
|
|
8681
|
+
columnId,
|
|
8682
|
+
fieldName,
|
|
8683
|
+
rowId,
|
|
8684
|
+
disabled,
|
|
8685
|
+
variant = "standard",
|
|
8686
|
+
size,
|
|
8687
|
+
allowBlankOption,
|
|
8688
|
+
filterOptions,
|
|
8689
|
+
refetchFilterOptions,
|
|
8690
|
+
isFetchingFilterOptions,
|
|
8691
|
+
onUpdateEditableCell
|
|
8692
|
+
}) => {
|
|
8693
|
+
const [value, setValue] = (0, import_react43.useState)(
|
|
8694
|
+
initialValue
|
|
8695
|
+
);
|
|
8696
|
+
const valueId = resolveObjectType(value ?? "", "id");
|
|
8697
|
+
const valueLabel = resolveObjectType(value ?? "", fieldName);
|
|
8698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
8699
|
+
SmartSelect_default,
|
|
8700
|
+
{
|
|
8701
|
+
ref,
|
|
8702
|
+
value: valueId,
|
|
8703
|
+
allowBlankOption,
|
|
8704
|
+
inputLabel,
|
|
8705
|
+
options: filterOptions,
|
|
8706
|
+
disabled,
|
|
8707
|
+
variant,
|
|
8708
|
+
size,
|
|
8709
|
+
refetch: refetchFilterOptions,
|
|
8710
|
+
isFetching: isFetchingFilterOptions,
|
|
8711
|
+
defaultOption: {
|
|
8712
|
+
value: valueId ?? "",
|
|
8713
|
+
label: String(valueLabel ?? "")
|
|
8714
|
+
},
|
|
8715
|
+
onChange: ({ value: id, label }) => {
|
|
8716
|
+
setValue({ id: id ?? "", name: label ?? "" });
|
|
8717
|
+
onUpdateEditableCell?.({
|
|
8718
|
+
rowId,
|
|
8719
|
+
columnId,
|
|
8720
|
+
value: id || null,
|
|
8721
|
+
label: label ?? ""
|
|
8722
|
+
});
|
|
8723
|
+
}
|
|
8724
|
+
}
|
|
8725
|
+
);
|
|
8726
|
+
};
|
|
8569
8727
|
|
|
8570
8728
|
// src/components/TableDesktopEditableField/TableDesktopTextField.tsx
|
|
8571
|
-
var
|
|
8572
|
-
var
|
|
8573
|
-
var
|
|
8729
|
+
var import_react44 = require("react");
|
|
8730
|
+
var import_material75 = require("@mui/material");
|
|
8731
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
8574
8732
|
var TableDesktopTextField = ({
|
|
8575
8733
|
rowId,
|
|
8576
8734
|
initialValue,
|
|
8577
8735
|
inputLabel,
|
|
8578
8736
|
disabled,
|
|
8579
|
-
|
|
8737
|
+
columnId,
|
|
8580
8738
|
type,
|
|
8581
8739
|
variant = "standard",
|
|
8582
8740
|
size,
|
|
8583
8741
|
validateInput,
|
|
8584
8742
|
onUpdateEditableCell
|
|
8585
8743
|
}) => {
|
|
8586
|
-
const [input, setInput] = (0,
|
|
8587
|
-
const oldValue = (0,
|
|
8588
|
-
const isDirty = (0,
|
|
8744
|
+
const [input, setInput] = (0, import_react44.useState)(initialValue);
|
|
8745
|
+
const oldValue = (0, import_react44.useRef)(initialValue);
|
|
8746
|
+
const isDirty = (0, import_react44.useMemo)(
|
|
8589
8747
|
() => input !== oldValue.current,
|
|
8590
8748
|
[input, oldValue.current]
|
|
8591
8749
|
);
|
|
8592
|
-
const hasValidationError = (0,
|
|
8593
|
-
() => isDirty && !validateInput
|
|
8750
|
+
const hasValidationError = (0, import_react44.useMemo)(
|
|
8751
|
+
() => isDirty && validateInput && !validateInput(input),
|
|
8594
8752
|
[input, validateInput]
|
|
8595
8753
|
);
|
|
8596
8754
|
const commitValue = (value) => {
|
|
@@ -8599,7 +8757,7 @@ var TableDesktopTextField = ({
|
|
|
8599
8757
|
return;
|
|
8600
8758
|
}
|
|
8601
8759
|
oldValue.current = value;
|
|
8602
|
-
onUpdateEditableCell(rowId
|
|
8760
|
+
onUpdateEditableCell({ rowId, columnId, value, label: value });
|
|
8603
8761
|
};
|
|
8604
8762
|
const handleKeyDown = (e) => {
|
|
8605
8763
|
if (e.key === "Enter") {
|
|
@@ -8607,8 +8765,8 @@ var TableDesktopTextField = ({
|
|
|
8607
8765
|
commitValue(input);
|
|
8608
8766
|
}
|
|
8609
8767
|
};
|
|
8610
|
-
return /* @__PURE__ */ (0,
|
|
8611
|
-
|
|
8768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8769
|
+
import_material75.TextField,
|
|
8612
8770
|
{
|
|
8613
8771
|
fullWidth: true,
|
|
8614
8772
|
variant,
|
|
@@ -8630,6 +8788,9 @@ var TableDesktopTextField = ({
|
|
|
8630
8788
|
slotProps: {
|
|
8631
8789
|
input: {
|
|
8632
8790
|
inputMode: type === "numeric" ? "numeric" : void 0
|
|
8791
|
+
},
|
|
8792
|
+
htmlInput: {
|
|
8793
|
+
maxLength: 1e3
|
|
8633
8794
|
}
|
|
8634
8795
|
}
|
|
8635
8796
|
}
|
|
@@ -8637,63 +8798,98 @@ var TableDesktopTextField = ({
|
|
|
8637
8798
|
};
|
|
8638
8799
|
|
|
8639
8800
|
// src/components/TableDesktopEditableField/TableDesktopEditableField.tsx
|
|
8640
|
-
var
|
|
8801
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
8641
8802
|
var TableDesktopEditableField = ({
|
|
8642
8803
|
editInitialValue,
|
|
8643
8804
|
rowId,
|
|
8644
|
-
field,
|
|
8645
|
-
fieldName,
|
|
8646
8805
|
disabled,
|
|
8647
|
-
inputLabel,
|
|
8648
8806
|
showCheckboxLabel = false,
|
|
8649
8807
|
variant = "standard",
|
|
8650
8808
|
size,
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8809
|
+
onUpdateEditableCell,
|
|
8810
|
+
headCell: {
|
|
8811
|
+
id: columnId,
|
|
8812
|
+
fieldName = "",
|
|
8813
|
+
label: inputLabel = "",
|
|
8814
|
+
editableCellType,
|
|
8815
|
+
filterOptions,
|
|
8816
|
+
refetchFilterOptions,
|
|
8817
|
+
isFetchingFilterOptions,
|
|
8818
|
+
validateInput,
|
|
8819
|
+
allowBlankSelectOption
|
|
8820
|
+
}
|
|
8657
8821
|
}) => {
|
|
8822
|
+
const [parsedFilterOptions, setParsedFilterOptions] = (0, import_react45.useState)();
|
|
8823
|
+
(0, import_react45.useEffect)(() => {
|
|
8824
|
+
if (filterOptions && editableCellType === "select" || editableCellType === "multipleSelect") {
|
|
8825
|
+
const parsedOptions = filterOptions?.map(
|
|
8826
|
+
(option) => ({
|
|
8827
|
+
value: resolveObjectType(option, "id"),
|
|
8828
|
+
label: String(resolveObjectType(option, fieldName))
|
|
8829
|
+
})
|
|
8830
|
+
);
|
|
8831
|
+
setParsedFilterOptions(parsedOptions);
|
|
8832
|
+
}
|
|
8833
|
+
}, [filterOptions, editableCellType]);
|
|
8658
8834
|
const editableComponents = {
|
|
8659
|
-
select: /* @__PURE__ */ (0,
|
|
8835
|
+
select: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
8660
8836
|
TableDesktopSmartSelect,
|
|
8661
8837
|
{
|
|
8662
8838
|
rowId,
|
|
8663
|
-
|
|
8839
|
+
columnId,
|
|
8840
|
+
fieldName,
|
|
8841
|
+
disabled,
|
|
8842
|
+
variant,
|
|
8843
|
+
size,
|
|
8844
|
+
allowBlankOption: allowBlankSelectOption,
|
|
8845
|
+
initialValue: editInitialValue,
|
|
8846
|
+
inputLabel,
|
|
8847
|
+
filterOptions: parsedFilterOptions,
|
|
8848
|
+
refetchFilterOptions,
|
|
8849
|
+
isFetchingFilterOptions,
|
|
8850
|
+
onUpdateEditableCell
|
|
8851
|
+
}
|
|
8852
|
+
),
|
|
8853
|
+
multipleSelect: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
8854
|
+
TableDesktopSmartMultipleSelect,
|
|
8855
|
+
{
|
|
8856
|
+
rowId,
|
|
8857
|
+
columnId,
|
|
8664
8858
|
fieldName,
|
|
8665
8859
|
disabled,
|
|
8666
8860
|
variant,
|
|
8667
8861
|
size,
|
|
8668
8862
|
initialValue: editInitialValue,
|
|
8669
8863
|
inputLabel,
|
|
8670
|
-
filterOptions,
|
|
8864
|
+
filterOptions: parsedFilterOptions,
|
|
8671
8865
|
refetchFilterOptions,
|
|
8672
8866
|
isFetchingFilterOptions,
|
|
8673
8867
|
onUpdateEditableCell
|
|
8674
8868
|
}
|
|
8675
8869
|
),
|
|
8676
|
-
checkbox: /* @__PURE__ */ (0,
|
|
8677
|
-
|
|
8870
|
+
checkbox: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
8871
|
+
import_material76.FormControlLabel,
|
|
8678
8872
|
{
|
|
8679
8873
|
label: showCheckboxLabel ? inputLabel : "",
|
|
8680
|
-
control: /* @__PURE__ */ (0,
|
|
8681
|
-
|
|
8874
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
8875
|
+
import_material76.Checkbox,
|
|
8682
8876
|
{
|
|
8683
8877
|
disableRipple: true,
|
|
8684
8878
|
disabled,
|
|
8685
8879
|
defaultChecked: editInitialValue,
|
|
8686
8880
|
onChange: ({ target: { checked } }) => {
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8881
|
+
onUpdateEditableCell?.({
|
|
8882
|
+
rowId,
|
|
8883
|
+
columnId,
|
|
8884
|
+
value: checked,
|
|
8885
|
+
label: checked
|
|
8886
|
+
});
|
|
8691
8887
|
}
|
|
8692
8888
|
}
|
|
8693
8889
|
)
|
|
8694
8890
|
}
|
|
8695
8891
|
),
|
|
8696
|
-
text: /* @__PURE__ */ (0,
|
|
8892
|
+
text: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
8697
8893
|
TableDesktopTextField,
|
|
8698
8894
|
{
|
|
8699
8895
|
type: "text",
|
|
@@ -8701,14 +8897,14 @@ var TableDesktopEditableField = ({
|
|
|
8701
8897
|
disabled,
|
|
8702
8898
|
variant,
|
|
8703
8899
|
size,
|
|
8704
|
-
|
|
8900
|
+
columnId,
|
|
8705
8901
|
initialValue: editInitialValue ?? "",
|
|
8706
8902
|
inputLabel: inputLabel ?? "",
|
|
8707
8903
|
validateInput,
|
|
8708
8904
|
onUpdateEditableCell
|
|
8709
8905
|
}
|
|
8710
8906
|
),
|
|
8711
|
-
numeric: /* @__PURE__ */ (0,
|
|
8907
|
+
numeric: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
8712
8908
|
TableDesktopTextField,
|
|
8713
8909
|
{
|
|
8714
8910
|
type: "numeric",
|
|
@@ -8716,21 +8912,80 @@ var TableDesktopEditableField = ({
|
|
|
8716
8912
|
disabled,
|
|
8717
8913
|
variant,
|
|
8718
8914
|
size,
|
|
8719
|
-
|
|
8915
|
+
columnId,
|
|
8720
8916
|
initialValue: editInitialValue ?? "",
|
|
8721
8917
|
inputLabel: inputLabel ?? "",
|
|
8722
8918
|
validateInput,
|
|
8723
8919
|
onUpdateEditableCell
|
|
8724
8920
|
}
|
|
8921
|
+
),
|
|
8922
|
+
date: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
8923
|
+
import_x_date_pickers.DatePicker,
|
|
8924
|
+
{
|
|
8925
|
+
defaultValue: editInitialValue ? (0, import_moment3.default)(editInitialValue, "HH:mm:ss") : void 0,
|
|
8926
|
+
label: inputLabel,
|
|
8927
|
+
format: "DD/MM/YYYY",
|
|
8928
|
+
onAccept: (value) => {
|
|
8929
|
+
const formattedValue = value?.format("YYYY-MM-DD") ?? null;
|
|
8930
|
+
const formattedLabel = value?.format("DD/MM/YYYY") ?? null;
|
|
8931
|
+
onUpdateEditableCell?.({
|
|
8932
|
+
rowId,
|
|
8933
|
+
columnId,
|
|
8934
|
+
value: formattedValue,
|
|
8935
|
+
label: formattedLabel
|
|
8936
|
+
});
|
|
8937
|
+
},
|
|
8938
|
+
slots: { clearIcon: import_Delete.default },
|
|
8939
|
+
slotProps: {
|
|
8940
|
+
field: { clearable: true },
|
|
8941
|
+
clearButton: { sx: { p: 0.5 } },
|
|
8942
|
+
openPickerButton: { sx: { p: 0 } },
|
|
8943
|
+
textField: {
|
|
8944
|
+
variant,
|
|
8945
|
+
size,
|
|
8946
|
+
error: false
|
|
8947
|
+
}
|
|
8948
|
+
}
|
|
8949
|
+
}
|
|
8950
|
+
),
|
|
8951
|
+
time: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
8952
|
+
import_x_date_pickers.TimePicker,
|
|
8953
|
+
{
|
|
8954
|
+
defaultValue: editInitialValue ? (0, import_moment3.default)(editInitialValue, "HH:mm:ss") : void 0,
|
|
8955
|
+
label: inputLabel,
|
|
8956
|
+
onAccept: (value) => {
|
|
8957
|
+
const formattedValue = value?.format("HH:mm") ?? null;
|
|
8958
|
+
onUpdateEditableCell?.({
|
|
8959
|
+
rowId,
|
|
8960
|
+
columnId,
|
|
8961
|
+
value: formattedValue,
|
|
8962
|
+
label: formattedValue
|
|
8963
|
+
});
|
|
8964
|
+
},
|
|
8965
|
+
slots: { clearIcon: import_Delete.default },
|
|
8966
|
+
slotProps: {
|
|
8967
|
+
field: { clearable: true },
|
|
8968
|
+
clearButton: { sx: { p: 0.5 } },
|
|
8969
|
+
openPickerButton: { sx: { p: 0 } },
|
|
8970
|
+
textField: {
|
|
8971
|
+
variant,
|
|
8972
|
+
size,
|
|
8973
|
+
error: false
|
|
8974
|
+
}
|
|
8975
|
+
}
|
|
8976
|
+
}
|
|
8725
8977
|
)
|
|
8726
8978
|
};
|
|
8979
|
+
if (!editableCellType) {
|
|
8980
|
+
return null;
|
|
8981
|
+
}
|
|
8727
8982
|
return editableComponents[editableCellType];
|
|
8728
8983
|
};
|
|
8729
8984
|
|
|
8730
8985
|
// src/components/TableDesktopFooter/TableDesktopFooter.tsx
|
|
8731
8986
|
var import_Refresh = __toESM(require("@mui/icons-material/Refresh"), 1);
|
|
8732
|
-
var
|
|
8733
|
-
var
|
|
8987
|
+
var import_material77 = require("@mui/material");
|
|
8988
|
+
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
8734
8989
|
var TableDesktopFooter = ({
|
|
8735
8990
|
numPages,
|
|
8736
8991
|
page,
|
|
@@ -8741,8 +8996,8 @@ var TableDesktopFooter = ({
|
|
|
8741
8996
|
refetchData,
|
|
8742
8997
|
isFetching
|
|
8743
8998
|
}) => {
|
|
8744
|
-
return /* @__PURE__ */ (0,
|
|
8745
|
-
|
|
8999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
9000
|
+
import_material77.Box,
|
|
8746
9001
|
{
|
|
8747
9002
|
sx: {
|
|
8748
9003
|
py: 1,
|
|
@@ -8753,8 +9008,8 @@ var TableDesktopFooter = ({
|
|
|
8753
9008
|
borderTop: `1px solid ${colors.neutral300}`
|
|
8754
9009
|
},
|
|
8755
9010
|
children: [
|
|
8756
|
-
refetchData ? /* @__PURE__ */ (0,
|
|
8757
|
-
|
|
9011
|
+
refetchData ? /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
9012
|
+
import_material77.Button,
|
|
8758
9013
|
{
|
|
8759
9014
|
disableRipple: true,
|
|
8760
9015
|
variant: "outlined",
|
|
@@ -8768,7 +9023,7 @@ var TableDesktopFooter = ({
|
|
|
8768
9023
|
borderColor: colors.neutral600
|
|
8769
9024
|
},
|
|
8770
9025
|
children: [
|
|
8771
|
-
/* @__PURE__ */ (0,
|
|
9026
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
8772
9027
|
import_Refresh.default,
|
|
8773
9028
|
{
|
|
8774
9029
|
fontSize: "small",
|
|
@@ -8779,22 +9034,22 @@ var TableDesktopFooter = ({
|
|
|
8779
9034
|
]
|
|
8780
9035
|
}
|
|
8781
9036
|
) : null,
|
|
8782
|
-
/* @__PURE__ */ (0,
|
|
8783
|
-
pageSize && pageSizeOptions && onPageSizeChange ? /* @__PURE__ */ (0,
|
|
8784
|
-
/* @__PURE__ */ (0,
|
|
8785
|
-
/* @__PURE__ */ (0,
|
|
8786
|
-
|
|
9037
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material77.Box, { sx: { display: "flex", ml: "auto", py: 1 }, children: [
|
|
9038
|
+
pageSize && pageSizeOptions && onPageSizeChange ? /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material77.Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
|
|
9039
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material77.Typography, { children: "Rows per page:" }),
|
|
9040
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9041
|
+
import_material77.Select,
|
|
8787
9042
|
{
|
|
8788
9043
|
value: pageSize,
|
|
8789
9044
|
onChange: onPageSizeChange,
|
|
8790
9045
|
size: "small",
|
|
8791
9046
|
variant: "standard",
|
|
8792
|
-
children: pageSizeOptions.map((pageSizeOption) => /* @__PURE__ */ (0,
|
|
9047
|
+
children: pageSizeOptions.map((pageSizeOption) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material77.MenuItem, { value: pageSizeOption, children: pageSizeOption }, pageSizeOption))
|
|
8793
9048
|
}
|
|
8794
9049
|
)
|
|
8795
9050
|
] }) : null,
|
|
8796
|
-
/* @__PURE__ */ (0,
|
|
8797
|
-
|
|
9051
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9052
|
+
import_material77.Pagination,
|
|
8798
9053
|
{
|
|
8799
9054
|
color: "standard",
|
|
8800
9055
|
count: numPages,
|
|
@@ -8809,15 +9064,15 @@ var TableDesktopFooter = ({
|
|
|
8809
9064
|
};
|
|
8810
9065
|
|
|
8811
9066
|
// src/components/TableDesktopCell/TableDesktopCell.tsx
|
|
8812
|
-
var
|
|
9067
|
+
var import_react46 = require("react");
|
|
8813
9068
|
var import_Check3 = __toESM(require("@mui/icons-material/Check"), 1);
|
|
8814
9069
|
var import_Close = __toESM(require("@mui/icons-material/Close"), 1);
|
|
8815
9070
|
var import_Edit = __toESM(require("@mui/icons-material/Edit"), 1);
|
|
8816
|
-
var
|
|
8817
|
-
var
|
|
9071
|
+
var import_material78 = require("@mui/material");
|
|
9072
|
+
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
8818
9073
|
var getReadOnlyBooleanIcon = (value) => {
|
|
8819
9074
|
if (value) {
|
|
8820
|
-
return /* @__PURE__ */ (0,
|
|
9075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_Check3.default, { sx: { fontSize: 16 } });
|
|
8821
9076
|
}
|
|
8822
9077
|
return "-";
|
|
8823
9078
|
};
|
|
@@ -8831,36 +9086,28 @@ var getCellBackgroundColor = (isCellInEditMode) => ({
|
|
|
8831
9086
|
background: isCellInEditMode ? colors.lightBlueBackground : colors.neutral100
|
|
8832
9087
|
});
|
|
8833
9088
|
var TableDesktopCell = ({
|
|
8834
|
-
inputLabel,
|
|
8835
9089
|
editInitialValue,
|
|
8836
9090
|
rowId,
|
|
8837
|
-
field,
|
|
8838
|
-
fieldName,
|
|
8839
|
-
width,
|
|
8840
|
-
enableEditMode,
|
|
8841
9091
|
disabled,
|
|
9092
|
+
enableEditMode,
|
|
8842
9093
|
readOnlyValue,
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
refetchFilterOptions,
|
|
8846
|
-
isFetchingFilterOptions,
|
|
8847
|
-
validateInput,
|
|
8848
|
-
onUpdateEditableCell,
|
|
8849
|
-
onCellClick
|
|
9094
|
+
onCellClick,
|
|
9095
|
+
headCell
|
|
8850
9096
|
}) => {
|
|
8851
|
-
const [isCellHovered, setIsCellHovered] = (0,
|
|
8852
|
-
const [isCellInEditMode, setIsCellInEditMode] = (0,
|
|
8853
|
-
|
|
9097
|
+
const [isCellHovered, setIsCellHovered] = (0, import_react46.useState)(false);
|
|
9098
|
+
const [isCellInEditMode, setIsCellInEditMode] = (0, import_react46.useState)(false);
|
|
9099
|
+
const { width, editableCellType } = headCell;
|
|
9100
|
+
(0, import_react46.useEffect)(() => {
|
|
8854
9101
|
const handleKeyDown = (e) => {
|
|
8855
9102
|
if (e.key === "Escape") {
|
|
8856
9103
|
setIsCellInEditMode(false);
|
|
8857
9104
|
}
|
|
8858
9105
|
};
|
|
8859
9106
|
if (isCellInEditMode) {
|
|
8860
|
-
|
|
9107
|
+
globalThis.addEventListener("keydown", handleKeyDown);
|
|
8861
9108
|
}
|
|
8862
9109
|
return () => {
|
|
8863
|
-
|
|
9110
|
+
globalThis.removeEventListener("keydown", handleKeyDown);
|
|
8864
9111
|
};
|
|
8865
9112
|
}, [isCellInEditMode]);
|
|
8866
9113
|
const handleEditClick = (e) => {
|
|
@@ -8868,8 +9115,8 @@ var TableDesktopCell = ({
|
|
|
8868
9115
|
setIsCellInEditMode((prev) => !prev);
|
|
8869
9116
|
};
|
|
8870
9117
|
const isCellEditable = !!enableEditMode && !!editableCellType && !disabled;
|
|
8871
|
-
return /* @__PURE__ */ (0,
|
|
8872
|
-
|
|
9118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
9119
|
+
import_material78.TableCell,
|
|
8873
9120
|
{
|
|
8874
9121
|
align: "left",
|
|
8875
9122
|
onMouseEnter: () => isCellEditable && setIsCellHovered(true),
|
|
@@ -8880,13 +9127,12 @@ var TableDesktopCell = ({
|
|
|
8880
9127
|
width: width ?? "auto",
|
|
8881
9128
|
position: "relative",
|
|
8882
9129
|
cursor: disabled || !enableEditMode ? "default" : "pointer",
|
|
8883
|
-
opacity: disabled ? 0.2 : 1,
|
|
8884
9130
|
":hover": isCellEditable ? getCellBackgroundColor(isCellInEditMode) : void 0,
|
|
8885
9131
|
background: enableEditMode && isCellInEditMode ? colors.lightBlueBackground : void 0
|
|
8886
9132
|
},
|
|
8887
|
-
children: /* @__PURE__ */ (0,
|
|
8888
|
-
enableEditMode && isCellHovered ? /* @__PURE__ */ (0,
|
|
8889
|
-
|
|
9133
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DynamicOverflowTooltip, { tooltipDescription: String(readOnlyValue), arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, { children: [
|
|
9134
|
+
enableEditMode && isCellHovered ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material78.Tooltip, { title: isCellInEditMode ? "" : "Toggle Edit Mode", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
9135
|
+
import_material78.IconButton,
|
|
8890
9136
|
{
|
|
8891
9137
|
onClick: handleEditClick,
|
|
8892
9138
|
sx: {
|
|
@@ -8900,24 +9146,17 @@ var TableDesktopCell = ({
|
|
|
8900
9146
|
backgroundColor: isCellInEditMode ? colors.lightBlueBackground : colors.neutral150
|
|
8901
9147
|
}
|
|
8902
9148
|
},
|
|
8903
|
-
children: isCellInEditMode ? /* @__PURE__ */ (0,
|
|
9149
|
+
children: isCellInEditMode ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_Close.default, { fontSize: "small", color: "error" }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_Edit.default, { fontSize: "small" })
|
|
8904
9150
|
}
|
|
8905
9151
|
) }) : null,
|
|
8906
|
-
enableEditMode && isCellInEditMode && editableCellType ? /* @__PURE__ */ (0,
|
|
9152
|
+
enableEditMode && isCellInEditMode && editableCellType ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
8907
9153
|
TableDesktopEditableField,
|
|
8908
9154
|
{
|
|
8909
9155
|
editInitialValue,
|
|
8910
9156
|
rowId,
|
|
8911
|
-
field,
|
|
8912
|
-
fieldName,
|
|
8913
9157
|
disabled,
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
filterOptions,
|
|
8917
|
-
refetchFilterOptions,
|
|
8918
|
-
isFetchingFilterOptions,
|
|
8919
|
-
validateInput,
|
|
8920
|
-
onUpdateEditableCell
|
|
9158
|
+
headCell,
|
|
9159
|
+
onUpdateEditableCell: headCell.onUpdateEditableCell
|
|
8921
9160
|
}
|
|
8922
9161
|
) : renderReadOnlyValue(readOnlyValue)
|
|
8923
9162
|
] }) })
|
|
@@ -8926,12 +9165,12 @@ var TableDesktopCell = ({
|
|
|
8926
9165
|
};
|
|
8927
9166
|
|
|
8928
9167
|
// src/components/TableDesktopToolbar/TableDesktopToolbar.tsx
|
|
8929
|
-
var
|
|
9168
|
+
var import_react47 = require("react");
|
|
8930
9169
|
var import_Download = __toESM(require("@mui/icons-material/Download"), 1);
|
|
8931
9170
|
var import_KeyboardArrowLeft2 = __toESM(require("@mui/icons-material/KeyboardArrowLeft"), 1);
|
|
8932
9171
|
var import_KeyboardArrowRight2 = __toESM(require("@mui/icons-material/KeyboardArrowRight"), 1);
|
|
8933
|
-
var
|
|
8934
|
-
var
|
|
9172
|
+
var import_material79 = require("@mui/material");
|
|
9173
|
+
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
8935
9174
|
var TableDesktopToolbar = ({
|
|
8936
9175
|
toolbarLabel,
|
|
8937
9176
|
headCells,
|
|
@@ -8953,12 +9192,12 @@ var TableDesktopToolbar = ({
|
|
|
8953
9192
|
renderTableColumnConfigurationMenu,
|
|
8954
9193
|
renderInfoIcons
|
|
8955
9194
|
}) => {
|
|
8956
|
-
const scrollRef = (0,
|
|
8957
|
-
const [bulkChanges, setBulkChanges] = (0,
|
|
8958
|
-
const [isBulkChangesDialogOpen, setIsBulkChangesDialogOpen] = (0,
|
|
8959
|
-
const [isExportCsvDialogOpen, setIsExportCsvDialogOpen] = (0,
|
|
8960
|
-
const [resetCounter, setResetCounter] = (0,
|
|
8961
|
-
const visibleEditableColumns = (0,
|
|
9195
|
+
const scrollRef = (0, import_react47.useRef)(null);
|
|
9196
|
+
const [bulkChanges, setBulkChanges] = (0, import_react47.useState)([]);
|
|
9197
|
+
const [isBulkChangesDialogOpen, setIsBulkChangesDialogOpen] = (0, import_react47.useState)(false);
|
|
9198
|
+
const [isExportCsvDialogOpen, setIsExportCsvDialogOpen] = (0, import_react47.useState)(false);
|
|
9199
|
+
const [resetCounter, setResetCounter] = (0, import_react47.useState)(0);
|
|
9200
|
+
const visibleEditableColumns = (0, import_react47.useMemo)(
|
|
8962
9201
|
() => headCells.filter(
|
|
8963
9202
|
(headCell) => headCell?.enabled && !!headCell?.editableCellType
|
|
8964
9203
|
),
|
|
@@ -8975,13 +9214,17 @@ var TableDesktopToolbar = ({
|
|
|
8975
9214
|
refetchData?.();
|
|
8976
9215
|
}
|
|
8977
9216
|
};
|
|
8978
|
-
const handleUpdateEditableCell = (
|
|
9217
|
+
const handleUpdateEditableCell = ({
|
|
9218
|
+
columnId,
|
|
9219
|
+
value,
|
|
9220
|
+
label
|
|
9221
|
+
}) => {
|
|
8979
9222
|
setBulkChanges((prev) => {
|
|
8980
|
-
return [...prev, { field, value, label }];
|
|
9223
|
+
return [...prev, { field: columnId, value, label }];
|
|
8981
9224
|
});
|
|
8982
9225
|
};
|
|
8983
|
-
return /* @__PURE__ */ (0,
|
|
8984
|
-
|
|
9226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
|
|
9227
|
+
import_material79.Box,
|
|
8985
9228
|
{
|
|
8986
9229
|
sx: {
|
|
8987
9230
|
borderBottom: "1px solid",
|
|
@@ -8989,8 +9232,8 @@ var TableDesktopToolbar = ({
|
|
|
8989
9232
|
maxWidth: "100%"
|
|
8990
9233
|
},
|
|
8991
9234
|
children: [
|
|
8992
|
-
/* @__PURE__ */ (0,
|
|
8993
|
-
|
|
9235
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
|
|
9236
|
+
import_material79.Box,
|
|
8994
9237
|
{
|
|
8995
9238
|
sx: {
|
|
8996
9239
|
py: 1,
|
|
@@ -9001,8 +9244,8 @@ var TableDesktopToolbar = ({
|
|
|
9001
9244
|
background: isBulkChangesMode ? colors.neutral150 : void 0
|
|
9002
9245
|
},
|
|
9003
9246
|
children: [
|
|
9004
|
-
/* @__PURE__ */ (0,
|
|
9005
|
-
|
|
9247
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
|
|
9248
|
+
import_material79.Box,
|
|
9006
9249
|
{
|
|
9007
9250
|
sx: {
|
|
9008
9251
|
py: 1,
|
|
@@ -9012,21 +9255,21 @@ var TableDesktopToolbar = ({
|
|
|
9012
9255
|
whiteSpace: "nowrap"
|
|
9013
9256
|
},
|
|
9014
9257
|
children: [
|
|
9015
|
-
toolbarLabel ? /* @__PURE__ */ (0,
|
|
9016
|
-
/* @__PURE__ */ (0,
|
|
9017
|
-
/* @__PURE__ */ (0,
|
|
9258
|
+
toolbarLabel ? /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, { children: [
|
|
9259
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material79.Typography, { variant: "subtitle2", color: "textSecondary", children: toolbarLabel }),
|
|
9260
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material79.Divider, { orientation: "vertical", sx: { height: 0.75, py: 2.5 } })
|
|
9018
9261
|
] }) : null,
|
|
9019
|
-
renderBulkChangesDialog && refetchData ? /* @__PURE__ */ (0,
|
|
9020
|
-
|
|
9262
|
+
renderBulkChangesDialog && refetchData ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9263
|
+
import_material79.Tooltip,
|
|
9021
9264
|
{
|
|
9022
9265
|
title: disableBulkChangesMode ? "Access denied, you don\u2019t have permission to use this feature." : "",
|
|
9023
|
-
children: /* @__PURE__ */ (0,
|
|
9024
|
-
|
|
9266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9267
|
+
import_material79.FormControlLabel,
|
|
9025
9268
|
{
|
|
9026
9269
|
label: "Bulk Changes Mode",
|
|
9027
9270
|
disabled: disableBulkChangesMode || !visibleEditableColumns.length,
|
|
9028
|
-
control: /* @__PURE__ */ (0,
|
|
9029
|
-
|
|
9271
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9272
|
+
import_material79.Switch,
|
|
9030
9273
|
{
|
|
9031
9274
|
size: "small",
|
|
9032
9275
|
"aria-label": "bulk-changes-mode-switch",
|
|
@@ -9040,17 +9283,17 @@ var TableDesktopToolbar = ({
|
|
|
9040
9283
|
]
|
|
9041
9284
|
}
|
|
9042
9285
|
),
|
|
9043
|
-
isScrollable && /* @__PURE__ */ (0,
|
|
9044
|
-
|
|
9286
|
+
isScrollable && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9287
|
+
import_material79.IconButton,
|
|
9045
9288
|
{
|
|
9046
9289
|
"aria-label": "scroll-left",
|
|
9047
9290
|
sx: { padding: 0, alignSelf: "center" },
|
|
9048
9291
|
onClick: () => scroll("left"),
|
|
9049
|
-
children: /* @__PURE__ */ (0,
|
|
9292
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_KeyboardArrowLeft2.default, {})
|
|
9050
9293
|
}
|
|
9051
9294
|
),
|
|
9052
|
-
/* @__PURE__ */ (0,
|
|
9053
|
-
|
|
9295
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9296
|
+
import_material79.Box,
|
|
9054
9297
|
{
|
|
9055
9298
|
ref: scrollRef,
|
|
9056
9299
|
sx: {
|
|
@@ -9066,56 +9309,40 @@ var TableDesktopToolbar = ({
|
|
|
9066
9309
|
display: "none"
|
|
9067
9310
|
}
|
|
9068
9311
|
},
|
|
9069
|
-
children: isBulkChangesMode ? visibleEditableColumns.map(
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
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,
|
|
9312
|
+
children: isBulkChangesMode ? visibleEditableColumns.map((headCell) => {
|
|
9313
|
+
const { id, width, editableCellType } = headCell;
|
|
9314
|
+
return editableCellType && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9315
|
+
import_material79.Box,
|
|
9082
9316
|
{
|
|
9083
9317
|
sx: { width, flex: "0 0 auto" },
|
|
9084
|
-
children: /* @__PURE__ */ (0,
|
|
9318
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9085
9319
|
TableDesktopEditableField,
|
|
9086
9320
|
{
|
|
9087
|
-
|
|
9321
|
+
headCell,
|
|
9088
9322
|
size: "small",
|
|
9089
9323
|
variant: "outlined",
|
|
9090
9324
|
showCheckboxLabel: true,
|
|
9091
|
-
fieldName: fieldName ?? "",
|
|
9092
|
-
inputLabel: label ?? "",
|
|
9093
|
-
editableCellType,
|
|
9094
|
-
filterOptions,
|
|
9095
|
-
refetchFilterOptions,
|
|
9096
|
-
isFetchingFilterOptions,
|
|
9097
|
-
validateInput,
|
|
9098
9325
|
onUpdateEditableCell: handleUpdateEditableCell
|
|
9099
9326
|
}
|
|
9100
9327
|
)
|
|
9101
9328
|
},
|
|
9102
9329
|
`${id}-${resetCounter}`
|
|
9103
|
-
)
|
|
9104
|
-
) : null
|
|
9330
|
+
);
|
|
9331
|
+
}) : null
|
|
9105
9332
|
}
|
|
9106
9333
|
),
|
|
9107
|
-
isScrollable && /* @__PURE__ */ (0,
|
|
9108
|
-
|
|
9334
|
+
isScrollable && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9335
|
+
import_material79.IconButton,
|
|
9109
9336
|
{
|
|
9110
9337
|
"aria-label": "scroll-right",
|
|
9111
9338
|
sx: { p: 0, alignSelf: "center" },
|
|
9112
9339
|
onClick: () => scroll("right"),
|
|
9113
|
-
children: /* @__PURE__ */ (0,
|
|
9340
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_KeyboardArrowRight2.default, {})
|
|
9114
9341
|
}
|
|
9115
9342
|
),
|
|
9116
|
-
isBulkChangesMode ? /* @__PURE__ */ (0,
|
|
9117
|
-
/* @__PURE__ */ (0,
|
|
9118
|
-
|
|
9343
|
+
isBulkChangesMode ? /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, { children: [
|
|
9344
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9345
|
+
import_material79.Button,
|
|
9119
9346
|
{
|
|
9120
9347
|
variant: "outlined",
|
|
9121
9348
|
sx: { borderRadius: 25, alignSelf: "center" },
|
|
@@ -9127,8 +9354,8 @@ var TableDesktopToolbar = ({
|
|
|
9127
9354
|
children: "RESET"
|
|
9128
9355
|
}
|
|
9129
9356
|
),
|
|
9130
|
-
/* @__PURE__ */ (0,
|
|
9131
|
-
|
|
9357
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9358
|
+
import_material79.Button,
|
|
9132
9359
|
{
|
|
9133
9360
|
variant: "contained",
|
|
9134
9361
|
"aria-label": "bulk-changes-apply-button",
|
|
@@ -9138,26 +9365,26 @@ var TableDesktopToolbar = ({
|
|
|
9138
9365
|
children: "APPLY"
|
|
9139
9366
|
}
|
|
9140
9367
|
)
|
|
9141
|
-
] }) : /* @__PURE__ */ (0,
|
|
9368
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material79.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
9142
9369
|
renderInfoIcons,
|
|
9143
|
-
renderExportCsvDialog ? /* @__PURE__ */ (0,
|
|
9144
|
-
|
|
9370
|
+
renderExportCsvDialog ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material79.Tooltip, { title: "Download List", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9371
|
+
import_material79.IconButton,
|
|
9145
9372
|
{
|
|
9146
9373
|
disableRipple: true,
|
|
9147
9374
|
disabled: isDataEmpty,
|
|
9148
9375
|
"aria-label": "export-csv-button",
|
|
9149
9376
|
onClick: () => setIsExportCsvDialogOpen(true),
|
|
9150
|
-
children: /* @__PURE__ */ (0,
|
|
9377
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_Download.default, { fill: colors.neutral750 })
|
|
9151
9378
|
}
|
|
9152
9379
|
) }) }) : null,
|
|
9153
|
-
renderTableColumnConfigurationMenu ? /* @__PURE__ */ (0,
|
|
9154
|
-
|
|
9380
|
+
renderTableColumnConfigurationMenu ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material79.Tooltip, { title: "Table Column Configuration", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9381
|
+
import_material79.IconButton,
|
|
9155
9382
|
{
|
|
9156
9383
|
disableRipple: true,
|
|
9157
9384
|
"aria-label": "table-column-config-button",
|
|
9158
9385
|
ref: tableToolbarMenuButtonRef,
|
|
9159
9386
|
onClick: onClickToolbarMenuOpen,
|
|
9160
|
-
children: /* @__PURE__ */ (0,
|
|
9387
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconTableEdit_default, { fill: colors.neutral750 })
|
|
9161
9388
|
}
|
|
9162
9389
|
) }) : null
|
|
9163
9390
|
] })
|
|
@@ -9190,11 +9417,11 @@ var TableDesktopToolbar = ({
|
|
|
9190
9417
|
};
|
|
9191
9418
|
|
|
9192
9419
|
// src/components/TableHeader/TableHeader.tsx
|
|
9193
|
-
var
|
|
9420
|
+
var import_react48 = require("react");
|
|
9194
9421
|
var import_icons_material12 = require("@mui/icons-material");
|
|
9195
|
-
var
|
|
9422
|
+
var import_material80 = require("@mui/material");
|
|
9196
9423
|
var import_mui54 = require("tss-react/mui");
|
|
9197
|
-
var
|
|
9424
|
+
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
9198
9425
|
var useStyles48 = (0, import_mui54.makeStyles)()(() => ({
|
|
9199
9426
|
sortLabel: {
|
|
9200
9427
|
"& .MuiTableSortLabel-icon": {
|
|
@@ -9203,9 +9430,9 @@ var useStyles48 = (0, import_mui54.makeStyles)()(() => ({
|
|
|
9203
9430
|
}
|
|
9204
9431
|
}));
|
|
9205
9432
|
var TableHeader = ({ cells, onSort = null }) => {
|
|
9206
|
-
const [sortableCells, setSortableCells] = (0,
|
|
9433
|
+
const [sortableCells, setSortableCells] = (0, import_react48.useState)([]);
|
|
9207
9434
|
const { classes } = useStyles48();
|
|
9208
|
-
(0,
|
|
9435
|
+
(0, import_react48.useEffect)(() => {
|
|
9209
9436
|
setSortableCells(cells);
|
|
9210
9437
|
}, []);
|
|
9211
9438
|
const getNewSortDirection = (direction) => {
|
|
@@ -9239,8 +9466,8 @@ var TableHeader = ({ cells, onSort = null }) => {
|
|
|
9239
9466
|
});
|
|
9240
9467
|
setSortableCells(sortedCells);
|
|
9241
9468
|
};
|
|
9242
|
-
return /* @__PURE__ */ (0,
|
|
9243
|
-
|
|
9469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material80.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material80.TableRow, { children: sortableCells.map((cell, key) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material80.TableCell, { children: cell.isSortable ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
9470
|
+
import_material80.TableSortLabel,
|
|
9244
9471
|
{
|
|
9245
9472
|
className: classes.sortLabel,
|
|
9246
9473
|
direction: cell?.direction || "asc",
|
|
@@ -9250,12 +9477,12 @@ var TableHeader = ({ cells, onSort = null }) => {
|
|
|
9250
9477
|
}
|
|
9251
9478
|
) : cell.label }, cell.label || key)) }) });
|
|
9252
9479
|
};
|
|
9253
|
-
var TableHeader_default = (0,
|
|
9480
|
+
var TableHeader_default = (0, import_react48.memo)(TableHeader);
|
|
9254
9481
|
|
|
9255
9482
|
// src/components/TextDivider/TextDivider.tsx
|
|
9256
|
-
var
|
|
9483
|
+
var import_material81 = require("@mui/material");
|
|
9257
9484
|
var import_mui55 = require("tss-react/mui");
|
|
9258
|
-
var
|
|
9485
|
+
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
9259
9486
|
var useStyles49 = (0, import_mui55.makeStyles)()(() => ({
|
|
9260
9487
|
icon: {
|
|
9261
9488
|
fontSize: 20
|
|
@@ -9292,19 +9519,19 @@ var TextDivider = ({
|
|
|
9292
9519
|
}) => {
|
|
9293
9520
|
const { classes } = useStyles49();
|
|
9294
9521
|
const iconColor = color ?? colors.neutral900;
|
|
9295
|
-
return /* @__PURE__ */ (0,
|
|
9296
|
-
|
|
9522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
|
|
9523
|
+
import_material81.Box,
|
|
9297
9524
|
{
|
|
9298
9525
|
display: "flex",
|
|
9299
9526
|
alignItems: "center",
|
|
9300
9527
|
justifyContent: "space-between",
|
|
9301
9528
|
className: classes.container,
|
|
9302
9529
|
children: [
|
|
9303
|
-
/* @__PURE__ */ (0,
|
|
9304
|
-
/* @__PURE__ */ (0,
|
|
9305
|
-
Icon2 && iconPosition === "left" && /* @__PURE__ */ (0,
|
|
9306
|
-
/* @__PURE__ */ (0,
|
|
9307
|
-
|
|
9530
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material81.Divider, { className: classes.leftDivider }),
|
|
9531
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material81.Button, { onClick, disabled: !onClick, className: classes.button, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material81.Box, { className: classes.center, children: [
|
|
9532
|
+
Icon2 && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon2, { className: classes.icon, style: { color: iconColor } }),
|
|
9533
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
9534
|
+
import_material81.Typography,
|
|
9308
9535
|
{
|
|
9309
9536
|
color: "textSecondary",
|
|
9310
9537
|
className: classes.title,
|
|
@@ -9312,9 +9539,9 @@ var TextDivider = ({
|
|
|
9312
9539
|
children: title
|
|
9313
9540
|
}
|
|
9314
9541
|
),
|
|
9315
|
-
Icon2 && iconPosition === "right" && /* @__PURE__ */ (0,
|
|
9542
|
+
Icon2 && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon2, { className: classes.icon, style: { color: iconColor } })
|
|
9316
9543
|
] }) }),
|
|
9317
|
-
/* @__PURE__ */ (0,
|
|
9544
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material81.Divider, { className: classes.rightDivider })
|
|
9318
9545
|
]
|
|
9319
9546
|
}
|
|
9320
9547
|
);
|
|
@@ -9326,7 +9553,7 @@ var import_react_dates = require("react-dates");
|
|
|
9326
9553
|
var import_mui56 = require("tss-react/mui");
|
|
9327
9554
|
var import_initialize = require("react-dates/initialize");
|
|
9328
9555
|
var import_datepicker = require("react-dates/lib/css/_datepicker.css");
|
|
9329
|
-
var
|
|
9556
|
+
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
9330
9557
|
var useStyles50 = (0, import_mui56.makeStyles)()((theme) => ({
|
|
9331
9558
|
wrapper: {
|
|
9332
9559
|
"& .DateRangePicker": {
|
|
@@ -9422,15 +9649,15 @@ var ThemedDateRangePicker = ({
|
|
|
9422
9649
|
...props
|
|
9423
9650
|
}) => {
|
|
9424
9651
|
const { classes, cx } = useStyles50();
|
|
9425
|
-
return /* @__PURE__ */ (0,
|
|
9652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: cx(classes.wrapper, className), children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_react_dates.DateRangePicker, { ...props }) });
|
|
9426
9653
|
};
|
|
9427
9654
|
var ThemedDateRangePicker_default = ThemedDateRangePicker;
|
|
9428
9655
|
|
|
9429
9656
|
// src/components/TheToolbar/TheToolbar.tsx
|
|
9430
|
-
var
|
|
9431
|
-
var
|
|
9657
|
+
var import_react49 = require("react");
|
|
9658
|
+
var import_material82 = require("@mui/material");
|
|
9432
9659
|
var import_mui57 = require("tss-react/mui");
|
|
9433
|
-
var
|
|
9660
|
+
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
9434
9661
|
var useStyles51 = (0, import_mui57.makeStyles)()((theme) => ({
|
|
9435
9662
|
menuButton: {
|
|
9436
9663
|
color: theme.palette.primary.contrastText
|
|
@@ -9450,9 +9677,9 @@ var TheToolbar = ({
|
|
|
9450
9677
|
rightSection
|
|
9451
9678
|
}) => {
|
|
9452
9679
|
const { classes } = useStyles51();
|
|
9453
|
-
return /* @__PURE__ */ (0,
|
|
9454
|
-
/* @__PURE__ */ (0,
|
|
9455
|
-
/* @__PURE__ */ (0,
|
|
9680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material82.Box, { children: [
|
|
9681
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material82.AppBar, { children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material82.Toolbar, { className: classes.topBar, children: [
|
|
9682
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9456
9683
|
RoundButton_default,
|
|
9457
9684
|
{
|
|
9458
9685
|
className: classes.menuButton,
|
|
@@ -9461,7 +9688,7 @@ var TheToolbar = ({
|
|
|
9461
9688
|
onClick: handleOpen
|
|
9462
9689
|
}
|
|
9463
9690
|
),
|
|
9464
|
-
/* @__PURE__ */ (0,
|
|
9691
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9465
9692
|
CompanyLogo_default,
|
|
9466
9693
|
{
|
|
9467
9694
|
size: "small",
|
|
@@ -9470,31 +9697,31 @@ var TheToolbar = ({
|
|
|
9470
9697
|
imageLogoLightSmall
|
|
9471
9698
|
}
|
|
9472
9699
|
),
|
|
9473
|
-
/* @__PURE__ */ (0,
|
|
9474
|
-
/* @__PURE__ */ (0,
|
|
9700
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material82.Box, { ml: 2, children: leftSection }),
|
|
9701
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material82.Box, { ml: "auto", children: rightSection })
|
|
9475
9702
|
] }) }),
|
|
9476
9703
|
LeftDrawer
|
|
9477
9704
|
] });
|
|
9478
9705
|
};
|
|
9479
|
-
var TheToolbar_default = (0,
|
|
9706
|
+
var TheToolbar_default = (0, import_react49.memo)(TheToolbar);
|
|
9480
9707
|
|
|
9481
9708
|
// src/components/ToastMessage/ToastMessage.tsx
|
|
9482
|
-
var
|
|
9483
|
-
var
|
|
9709
|
+
var import_material83 = require("@mui/material");
|
|
9710
|
+
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
9484
9711
|
var ToastMessage = ({
|
|
9485
9712
|
toastType,
|
|
9486
9713
|
toastMessage,
|
|
9487
9714
|
open,
|
|
9488
9715
|
onClose
|
|
9489
|
-
}) => /* @__PURE__ */ (0,
|
|
9490
|
-
|
|
9716
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
9717
|
+
import_material83.Snackbar,
|
|
9491
9718
|
{
|
|
9492
9719
|
open,
|
|
9493
9720
|
autoHideDuration: 1500,
|
|
9494
9721
|
onClose,
|
|
9495
9722
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
9496
|
-
children: /* @__PURE__ */ (0,
|
|
9497
|
-
|
|
9723
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
9724
|
+
import_material83.Alert,
|
|
9498
9725
|
{
|
|
9499
9726
|
elevation: 6,
|
|
9500
9727
|
variant: "filled",
|
|
@@ -9520,9 +9747,9 @@ var ToastMessage = ({
|
|
|
9520
9747
|
var ToastMessage_default = ToastMessage;
|
|
9521
9748
|
|
|
9522
9749
|
// src/components/TwoButtonDialog/TwoButtonDialog.tsx
|
|
9523
|
-
var
|
|
9750
|
+
var import_material84 = require("@mui/material");
|
|
9524
9751
|
var import_mui58 = require("tss-react/mui");
|
|
9525
|
-
var
|
|
9752
|
+
var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
9526
9753
|
var useStyles52 = (0, import_mui58.makeStyles)()((theme) => ({
|
|
9527
9754
|
paper: {
|
|
9528
9755
|
padding: theme.spacing(2)
|
|
@@ -9552,20 +9779,20 @@ var TwoButtonDialog = ({
|
|
|
9552
9779
|
cancelButton
|
|
9553
9780
|
}) => {
|
|
9554
9781
|
const { classes } = useStyles52();
|
|
9555
|
-
return /* @__PURE__ */ (0,
|
|
9556
|
-
|
|
9782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
9783
|
+
import_material84.Dialog,
|
|
9557
9784
|
{
|
|
9558
9785
|
open,
|
|
9559
9786
|
disableEnforceFocus: true,
|
|
9560
9787
|
maxWidth: "sm",
|
|
9561
9788
|
fullWidth: true,
|
|
9562
9789
|
closeAfterTransition: true,
|
|
9563
|
-
BackdropComponent:
|
|
9790
|
+
BackdropComponent: import_material84.Backdrop,
|
|
9564
9791
|
BackdropProps: { timeout: 500 },
|
|
9565
|
-
children: /* @__PURE__ */ (0,
|
|
9566
|
-
/* @__PURE__ */ (0,
|
|
9567
|
-
/* @__PURE__ */ (0,
|
|
9568
|
-
|
|
9792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material84.Fade, { in: open, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material84.Paper, { className: classes.paper, children: [
|
|
9793
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material84.Box, { className: classes.mb, children: [
|
|
9794
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material84.Typography, { variant: "h5", component: "div", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
9795
|
+
import_material84.Box,
|
|
9569
9796
|
{
|
|
9570
9797
|
sx: {
|
|
9571
9798
|
fontWeight: 600
|
|
@@ -9573,23 +9800,23 @@ var TwoButtonDialog = ({
|
|
|
9573
9800
|
children: title
|
|
9574
9801
|
}
|
|
9575
9802
|
) }),
|
|
9576
|
-
/* @__PURE__ */ (0,
|
|
9577
|
-
|
|
9803
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
|
|
9804
|
+
import_material84.Box,
|
|
9578
9805
|
{
|
|
9579
9806
|
className: classes.mt,
|
|
9580
9807
|
sx: {
|
|
9581
9808
|
fontWeight: 600
|
|
9582
9809
|
},
|
|
9583
9810
|
children: [
|
|
9584
|
-
subtitle1 && /* @__PURE__ */ (0,
|
|
9585
|
-
subtitle2 && /* @__PURE__ */ (0,
|
|
9811
|
+
subtitle1 && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material84.Typography, { variant: "subtitle1", children: subtitle1 }),
|
|
9812
|
+
subtitle2 && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material84.Typography, { variant: "subtitle1", children: subtitle2 })
|
|
9586
9813
|
]
|
|
9587
9814
|
}
|
|
9588
9815
|
)
|
|
9589
9816
|
] }),
|
|
9590
|
-
/* @__PURE__ */ (0,
|
|
9591
|
-
/* @__PURE__ */ (0,
|
|
9592
|
-
/* @__PURE__ */ (0,
|
|
9817
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material84.Divider, {}),
|
|
9818
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material84.Box, { className: classes.buttonContainer, children: [
|
|
9819
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
9593
9820
|
FilledButton_default,
|
|
9594
9821
|
{
|
|
9595
9822
|
copy: cancelLabel,
|
|
@@ -9602,7 +9829,7 @@ var TwoButtonDialog = ({
|
|
|
9602
9829
|
}
|
|
9603
9830
|
}
|
|
9604
9831
|
),
|
|
9605
|
-
/* @__PURE__ */ (0,
|
|
9832
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
9606
9833
|
FilledButton_default,
|
|
9607
9834
|
{
|
|
9608
9835
|
color: "primary",
|
|
@@ -9611,7 +9838,7 @@ var TwoButtonDialog = ({
|
|
|
9611
9838
|
}
|
|
9612
9839
|
)
|
|
9613
9840
|
] }),
|
|
9614
|
-
/* @__PURE__ */ (0,
|
|
9841
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Loading_default, { isLoading: dialogLoading })
|
|
9615
9842
|
] }) })
|
|
9616
9843
|
}
|
|
9617
9844
|
);
|
|
@@ -9619,30 +9846,30 @@ var TwoButtonDialog = ({
|
|
|
9619
9846
|
var TwoButtonDialog_default = TwoButtonDialog;
|
|
9620
9847
|
|
|
9621
9848
|
// src/components/UserBust/UserBust.tsx
|
|
9622
|
-
var
|
|
9623
|
-
var
|
|
9624
|
-
var
|
|
9625
|
-
var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0,
|
|
9626
|
-
/* @__PURE__ */ (0,
|
|
9627
|
-
|
|
9849
|
+
var import_react50 = require("react");
|
|
9850
|
+
var import_material85 = require("@mui/material");
|
|
9851
|
+
var import_jsx_runtime143 = require("react/jsx-runtime");
|
|
9852
|
+
var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { children: [
|
|
9853
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
9854
|
+
import_material85.Avatar,
|
|
9628
9855
|
{
|
|
9629
9856
|
src: user.profile_picture,
|
|
9630
9857
|
alt: "user_avatar",
|
|
9631
9858
|
style: { width: avatarProps.width, height: avatarProps.height }
|
|
9632
9859
|
}
|
|
9633
9860
|
),
|
|
9634
|
-
/* @__PURE__ */ (0,
|
|
9635
|
-
/* @__PURE__ */ (0,
|
|
9636
|
-
/* @__PURE__ */ (0,
|
|
9861
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { style: { paddingTop: 16 }, children: [
|
|
9862
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material85.Typography, { ...typographyProps.name, children: `${user.first_name} ${user.last_name}` }),
|
|
9863
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material85.Typography, { ...typographyProps.username, children: user.username })
|
|
9637
9864
|
] })
|
|
9638
9865
|
] });
|
|
9639
|
-
var UserBust_default = (0,
|
|
9866
|
+
var UserBust_default = (0, import_react50.memo)(UserBust);
|
|
9640
9867
|
|
|
9641
9868
|
// src/components/icons/IconChart.tsx
|
|
9642
|
-
var
|
|
9869
|
+
var import_jsx_runtime144 = require("react/jsx-runtime");
|
|
9643
9870
|
var SvgIconChart = (props) => {
|
|
9644
9871
|
const { fill } = props;
|
|
9645
|
-
return /* @__PURE__ */ (0,
|
|
9872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
9646
9873
|
"svg",
|
|
9647
9874
|
{
|
|
9648
9875
|
width: "20",
|
|
@@ -9651,7 +9878,7 @@ var SvgIconChart = (props) => {
|
|
|
9651
9878
|
fill: "none",
|
|
9652
9879
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9653
9880
|
...props,
|
|
9654
|
-
children: /* @__PURE__ */ (0,
|
|
9881
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
9655
9882
|
"path",
|
|
9656
9883
|
{
|
|
9657
9884
|
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",
|
|
@@ -9730,6 +9957,7 @@ var IconChart_default = SvgIconChart;
|
|
|
9730
9957
|
SearchWithFilters,
|
|
9731
9958
|
SearchWithFiltersForTable,
|
|
9732
9959
|
SectionName,
|
|
9960
|
+
SmartMultipleSelect,
|
|
9733
9961
|
SmartSelect,
|
|
9734
9962
|
SmartTableHeader,
|
|
9735
9963
|
SmartTableHeaderFilterMenu,
|