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