@natoora-libs/core 0.2.20-dev-doug-1 → 0.2.20-dev-doug-3
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.
|
@@ -1198,7 +1198,7 @@ var AddressFormFields = ({
|
|
|
1198
1198
|
]
|
|
1199
1199
|
}
|
|
1200
1200
|
),
|
|
1201
|
-
googlePlacesAutocompleteProps && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material6.Box, { sx: { width: "100%", display: "flex", mb: "20px" }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1201
|
+
googlePlacesAutocompleteProps && !!googlePlacesAutocompleteProps.apiKey && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_material6.Box, { sx: { width: "100%", display: "flex", mb: "20px" }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1202
1202
|
GooglePlacesAddressAutocomplete,
|
|
1203
1203
|
{
|
|
1204
1204
|
containerStyles: { width: "60%" },
|
|
@@ -1946,29 +1946,41 @@ var import_material14 = require("@mui/material");
|
|
|
1946
1946
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1947
1947
|
var SearchFieldDebounced = ({
|
|
1948
1948
|
onSearch,
|
|
1949
|
+
value: controlledValue,
|
|
1950
|
+
onChange: onChangeControlled,
|
|
1951
|
+
onKeyDown,
|
|
1949
1952
|
variant = "outlined",
|
|
1950
1953
|
hideSearchIcon = false,
|
|
1951
1954
|
initialValue = "",
|
|
1952
1955
|
debounceDelay = 500,
|
|
1953
1956
|
minCharacters = 0,
|
|
1954
1957
|
sx,
|
|
1958
|
+
width = 285,
|
|
1955
1959
|
inputProps
|
|
1956
1960
|
}) => {
|
|
1957
|
-
const [
|
|
1961
|
+
const [internalValue, setInternalValue] = (0, import_react10.useState)(initialValue);
|
|
1958
1962
|
const debounceRef = (0, import_react10.useRef)(null);
|
|
1959
1963
|
const inputSx = inputProps?.sx;
|
|
1964
|
+
const isControlled = controlledValue !== void 0;
|
|
1965
|
+
const value = isControlled ? controlledValue : internalValue;
|
|
1966
|
+
const executeSearch = (inputValue) => {
|
|
1967
|
+
const trimmedInput = inputValue.trim();
|
|
1968
|
+
if (trimmedInput.length > 0 && trimmedInput.length < minCharacters) {
|
|
1969
|
+
return;
|
|
1970
|
+
}
|
|
1971
|
+
onSearch?.(trimmedInput);
|
|
1972
|
+
};
|
|
1960
1973
|
const handleChange = (e) => {
|
|
1961
1974
|
const input = e.target.value;
|
|
1962
|
-
|
|
1975
|
+
if (!isControlled) {
|
|
1976
|
+
setInternalValue(input);
|
|
1977
|
+
}
|
|
1978
|
+
onChangeControlled?.(e);
|
|
1963
1979
|
if (debounceRef.current) {
|
|
1964
1980
|
clearTimeout(debounceRef.current);
|
|
1965
1981
|
}
|
|
1966
1982
|
debounceRef.current = window.setTimeout(() => {
|
|
1967
|
-
|
|
1968
|
-
if (trimmedInput.length < minCharacters) {
|
|
1969
|
-
return;
|
|
1970
|
-
}
|
|
1971
|
-
onSearch(trimmedInput);
|
|
1983
|
+
executeSearch(input);
|
|
1972
1984
|
}, debounceDelay);
|
|
1973
1985
|
};
|
|
1974
1986
|
(0, import_react10.useEffect)(() => {
|
|
@@ -1979,7 +1991,7 @@ var SearchFieldDebounced = ({
|
|
|
1979
1991
|
clearTimeout(debounceRef.current);
|
|
1980
1992
|
};
|
|
1981
1993
|
}, []);
|
|
1982
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material14.Box, {
|
|
1994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material14.Box, { sx: { width }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1983
1995
|
import_material14.TextField,
|
|
1984
1996
|
{
|
|
1985
1997
|
fullWidth: true,
|
|
@@ -1987,6 +1999,7 @@ var SearchFieldDebounced = ({
|
|
|
1987
1999
|
placeholder: "Search",
|
|
1988
2000
|
value,
|
|
1989
2001
|
onChange: handleChange,
|
|
2002
|
+
onKeyDown,
|
|
1990
2003
|
sx,
|
|
1991
2004
|
slotProps: {
|
|
1992
2005
|
input: {
|
|
@@ -7917,40 +7930,58 @@ var SearchAndFilterHeaderForTable = (props) => {
|
|
|
7917
7930
|
var SearchAndFilterHeaderForTable_default = React7.memo(SearchAndFilterHeaderForTable);
|
|
7918
7931
|
|
|
7919
7932
|
// src/components/SearchHeader/SearchHeader.tsx
|
|
7920
|
-
var import_react36 = require("react");
|
|
7921
7933
|
var import_material64 = require("@mui/material");
|
|
7922
7934
|
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
7923
|
-
var SearchHeader = (
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7935
|
+
var SearchHeader = ({
|
|
7936
|
+
renderButton,
|
|
7937
|
+
renderExtraAction,
|
|
7938
|
+
children,
|
|
7939
|
+
onSearch,
|
|
7940
|
+
value,
|
|
7941
|
+
onChange,
|
|
7942
|
+
onKeyDown,
|
|
7943
|
+
width
|
|
7944
|
+
}) => {
|
|
7945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
7946
|
+
import_material64.Paper,
|
|
7947
|
+
{
|
|
7948
|
+
sx: {
|
|
7949
|
+
display: "flex",
|
|
7950
|
+
flexDirection: "column",
|
|
7951
|
+
padding: 2
|
|
7952
|
+
},
|
|
7953
|
+
children: [
|
|
7954
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
7955
|
+
import_material64.Box,
|
|
7956
|
+
{
|
|
7957
|
+
sx: {
|
|
7958
|
+
display: "flex",
|
|
7959
|
+
justifyContent: "space-between",
|
|
7960
|
+
alignItems: "center"
|
|
7961
|
+
},
|
|
7962
|
+
children: [
|
|
7963
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_material64.Box, { sx: { display: "flex", gap: 1, alignItems: "center" }, children: [
|
|
7964
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
7965
|
+
SearchFieldDebounced,
|
|
7966
|
+
{
|
|
7967
|
+
width,
|
|
7968
|
+
onSearch,
|
|
7969
|
+
value,
|
|
7970
|
+
onChange,
|
|
7971
|
+
onKeyDown
|
|
7972
|
+
}
|
|
7973
|
+
),
|
|
7974
|
+
renderExtraAction
|
|
7975
|
+
] }),
|
|
7976
|
+
renderButton
|
|
7977
|
+
]
|
|
7978
|
+
}
|
|
7979
|
+
),
|
|
7980
|
+
children
|
|
7981
|
+
]
|
|
7982
|
+
}
|
|
7983
|
+
);
|
|
7984
|
+
};
|
|
7954
7985
|
|
|
7955
7986
|
// src/components/SectionName/SectionName.tsx
|
|
7956
7987
|
var import_History = __toESM(require("@mui/icons-material/History"), 1);
|
|
@@ -8055,7 +8086,7 @@ var SectionName = ({
|
|
|
8055
8086
|
var SectionName_default = SectionName;
|
|
8056
8087
|
|
|
8057
8088
|
// src/components/SmartMultipleSelect/SmartMultipleSelect.tsx
|
|
8058
|
-
var
|
|
8089
|
+
var import_react36 = require("react");
|
|
8059
8090
|
var import_material66 = require("@mui/material");
|
|
8060
8091
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
8061
8092
|
var SmartMultipleSelect = ({
|
|
@@ -8075,7 +8106,7 @@ var SmartMultipleSelect = ({
|
|
|
8075
8106
|
helperText,
|
|
8076
8107
|
menuProps
|
|
8077
8108
|
}) => {
|
|
8078
|
-
const [localValues, setLocalValues] = (0,
|
|
8109
|
+
const [localValues, setLocalValues] = (0, import_react36.useState)(defaultValues ?? []);
|
|
8079
8110
|
const handleChangeOption = (option) => {
|
|
8080
8111
|
let newValues = [];
|
|
8081
8112
|
const selectedIndex = localValues.findIndex(
|
|
@@ -8163,7 +8194,7 @@ var SmartMultipleSelect = ({
|
|
|
8163
8194
|
};
|
|
8164
8195
|
|
|
8165
8196
|
// src/components/SquareLabel/SquareLabel.tsx
|
|
8166
|
-
var
|
|
8197
|
+
var import_react37 = require("react");
|
|
8167
8198
|
var import_material67 = require("@mui/material");
|
|
8168
8199
|
var import_colors52 = require("@mui/material/colors");
|
|
8169
8200
|
var import_mui49 = require("tss-react/mui");
|
|
@@ -8184,10 +8215,10 @@ var SquareLabel = ({ color, copy }) => {
|
|
|
8184
8215
|
const { classes } = useStyles44();
|
|
8185
8216
|
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Typography, { className: classes[color], children: copy });
|
|
8186
8217
|
};
|
|
8187
|
-
var SquareLabel_default = (0,
|
|
8218
|
+
var SquareLabel_default = (0, import_react37.memo)(SquareLabel);
|
|
8188
8219
|
|
|
8189
8220
|
// src/components/Switch/Switch.tsx
|
|
8190
|
-
var
|
|
8221
|
+
var import_react38 = require("react");
|
|
8191
8222
|
var import_material68 = require("@mui/material");
|
|
8192
8223
|
var import_mui50 = require("tss-react/mui");
|
|
8193
8224
|
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
@@ -8240,10 +8271,10 @@ var LabelledSwitch = (0, import_mui50.withStyles)(LSwitch, (theme) => ({
|
|
|
8240
8271
|
fontSize: "1rem"
|
|
8241
8272
|
}
|
|
8242
8273
|
}));
|
|
8243
|
-
var Switch_default = (0,
|
|
8274
|
+
var Switch_default = (0, import_react38.memo)(LabelledSwitch);
|
|
8244
8275
|
|
|
8245
8276
|
// src/components/SmartTableHeaderFilterMenu/SmartTableHeaderFilterMenu.tsx
|
|
8246
|
-
var
|
|
8277
|
+
var import_react39 = require("react");
|
|
8247
8278
|
var import_material69 = require("@mui/material");
|
|
8248
8279
|
var import_classnames3 = __toESM(require("classnames"), 1);
|
|
8249
8280
|
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
@@ -8264,11 +8295,11 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8264
8295
|
shouldShowCheckOnFilter,
|
|
8265
8296
|
onApplyFilters
|
|
8266
8297
|
}) => {
|
|
8267
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
8268
|
-
const [filterOptionsData, setFilterOptionsData] = (0,
|
|
8269
|
-
const [selectedFilterOptions, setSelectedFilterOptions] = (0,
|
|
8298
|
+
const [anchorEl, setAnchorEl] = (0, import_react39.useState)(null);
|
|
8299
|
+
const [filterOptionsData, setFilterOptionsData] = (0, import_react39.useState)();
|
|
8300
|
+
const [selectedFilterOptions, setSelectedFilterOptions] = (0, import_react39.useState)(headerFilters[headCell.id] ?? []);
|
|
8270
8301
|
const numFilterOptions = filterOptionsData?.length ?? 0;
|
|
8271
|
-
(0,
|
|
8302
|
+
(0, import_react39.useEffect)(() => {
|
|
8272
8303
|
if (headCell.filterOptions) {
|
|
8273
8304
|
setFilterOptionsData(headCell.filterOptions);
|
|
8274
8305
|
} else if (headCell.filterType === "boolean") {
|
|
@@ -8324,7 +8355,7 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8324
8355
|
onApplyFilters?.(updatedFilters, shouldSave);
|
|
8325
8356
|
setAnchorEl(null);
|
|
8326
8357
|
};
|
|
8327
|
-
(0,
|
|
8358
|
+
(0, import_react39.useEffect)(() => {
|
|
8328
8359
|
setSelectedFilterOptions(headerFilters[headCell.id] ?? []);
|
|
8329
8360
|
}, [headerFilters, headCell.id]);
|
|
8330
8361
|
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_jsx_runtime122.Fragment, { children: [
|
|
@@ -8385,10 +8416,10 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
8385
8416
|
};
|
|
8386
8417
|
|
|
8387
8418
|
// src/components/SmartTableHeader/SmartTableHeader.tsx
|
|
8388
|
-
var
|
|
8419
|
+
var import_react40 = require("react");
|
|
8389
8420
|
var import_material70 = require("@mui/material");
|
|
8390
8421
|
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
8391
|
-
var SmartTableHeader = (0,
|
|
8422
|
+
var SmartTableHeader = (0, import_react40.memo)(
|
|
8392
8423
|
({
|
|
8393
8424
|
order,
|
|
8394
8425
|
orderBy,
|
|
@@ -8505,7 +8536,7 @@ var SmartTableHeader = (0, import_react41.memo)(
|
|
|
8505
8536
|
);
|
|
8506
8537
|
|
|
8507
8538
|
// src/components/Table/Table.tsx
|
|
8508
|
-
var
|
|
8539
|
+
var import_react41 = require("react");
|
|
8509
8540
|
var import_material72 = require("@mui/material");
|
|
8510
8541
|
var import_debounce = __toESM(require_debounce(), 1);
|
|
8511
8542
|
var import_mui51 = require("tss-react/mui");
|
|
@@ -8601,11 +8632,11 @@ var Table = ({
|
|
|
8601
8632
|
serverRendered,
|
|
8602
8633
|
updateSort
|
|
8603
8634
|
}) => {
|
|
8604
|
-
const [order, setOrder] = (0,
|
|
8605
|
-
const [orderBy, setOrderBy] = (0,
|
|
8635
|
+
const [order, setOrder] = (0, import_react41.useState)(appliedFilters?.sortDir || "desc");
|
|
8636
|
+
const [orderBy, setOrderBy] = (0, import_react41.useState)(
|
|
8606
8637
|
appliedFilters?.sortField || "delivery_date"
|
|
8607
8638
|
);
|
|
8608
|
-
const [rowsPerPage, setRowsPerPage] = (0,
|
|
8639
|
+
const [rowsPerPage, setRowsPerPage] = (0, import_react41.useState)(defaultRowsPerPage);
|
|
8609
8640
|
const { classes } = useStyles45();
|
|
8610
8641
|
const rowHeight = 56;
|
|
8611
8642
|
const emptyRows = rowsPerPage - Math.min(rowsPerPage, data.length - page * rowsPerPage);
|
|
@@ -8618,7 +8649,7 @@ var Table = ({
|
|
|
8618
8649
|
updateSort(property, orderDir);
|
|
8619
8650
|
}
|
|
8620
8651
|
};
|
|
8621
|
-
(0,
|
|
8652
|
+
(0, import_react41.useLayoutEffect)(() => {
|
|
8622
8653
|
if (!doNotCalculateRows) {
|
|
8623
8654
|
return;
|
|
8624
8655
|
}
|
|
@@ -8682,7 +8713,7 @@ var Table = ({
|
|
|
8682
8713
|
var Table_default = Table;
|
|
8683
8714
|
|
|
8684
8715
|
// src/components/TableDesktop/TableDesktop.tsx
|
|
8685
|
-
var
|
|
8716
|
+
var import_react42 = require("react");
|
|
8686
8717
|
var import_material77 = require("@mui/material");
|
|
8687
8718
|
|
|
8688
8719
|
// src/components/TableDesktopLoadingState/TableDesktopLoadingState.tsx
|
|
@@ -8984,24 +9015,24 @@ var TableDesktop = ({
|
|
|
8984
9015
|
shouldShowCheckOnFilter,
|
|
8985
9016
|
refetchData
|
|
8986
9017
|
}) => {
|
|
8987
|
-
const tableToolbarMenuButtonRef = (0,
|
|
8988
|
-
const [tableToolbarMenuAnchor, setTableToolbarMenuAnchor] = (0,
|
|
8989
|
-
const [order, setOrder] = (0,
|
|
8990
|
-
const [orderBy, setOrderBy] = (0,
|
|
9018
|
+
const tableToolbarMenuButtonRef = (0, import_react42.useRef)(null);
|
|
9019
|
+
const [tableToolbarMenuAnchor, setTableToolbarMenuAnchor] = (0, import_react42.useState)(null);
|
|
9020
|
+
const [order, setOrder] = (0, import_react42.useState)(appliedFilters?.sortDir || "desc");
|
|
9021
|
+
const [orderBy, setOrderBy] = (0, import_react42.useState)(
|
|
8991
9022
|
appliedFilters?.sortField || "delivery_date"
|
|
8992
9023
|
);
|
|
8993
|
-
const [selectedRows, setSelectedRows] = (0,
|
|
8994
|
-
const [isRowsFromAllPagesSelected, setIsRowsFromAllPagesSelected] = (0,
|
|
8995
|
-
const [isBulkChangesMode, setIsBulkChangesMode] = (0,
|
|
9024
|
+
const [selectedRows, setSelectedRows] = (0, import_react42.useState)(/* @__PURE__ */ new Set());
|
|
9025
|
+
const [isRowsFromAllPagesSelected, setIsRowsFromAllPagesSelected] = (0, import_react42.useState)(false);
|
|
9026
|
+
const [isBulkChangesMode, setIsBulkChangesMode] = (0, import_react42.useState)(false);
|
|
8996
9027
|
const numRows = data.length;
|
|
8997
|
-
const numSelectedRows = (0,
|
|
9028
|
+
const numSelectedRows = (0, import_react42.useMemo)(() => {
|
|
8998
9029
|
const currentPageIds = new Set(
|
|
8999
9030
|
data.map((row) => resolveKeyValue(keyField, row))
|
|
9000
9031
|
);
|
|
9001
9032
|
return [...selectedRows].filter((id) => currentPageIds.has(id)).length;
|
|
9002
9033
|
}, [data, selectedRows, keyField]);
|
|
9003
9034
|
const isEveryRowInPageSelected = numRows > 0 && numSelectedRows === numRows;
|
|
9004
|
-
const visibleHeadCells = (0,
|
|
9035
|
+
const visibleHeadCells = (0, import_react42.useMemo)(
|
|
9005
9036
|
() => headCells.filter((headCell) => headCell?.enabled ?? true),
|
|
9006
9037
|
[headCells]
|
|
9007
9038
|
);
|
|
@@ -9067,7 +9098,7 @@ var TableDesktop = ({
|
|
|
9067
9098
|
refetchData?.();
|
|
9068
9099
|
}
|
|
9069
9100
|
};
|
|
9070
|
-
(0,
|
|
9101
|
+
(0, import_react42.useEffect)(() => {
|
|
9071
9102
|
if (isRowsFromAllPagesSelected) {
|
|
9072
9103
|
selectAllRowsInPage();
|
|
9073
9104
|
}
|
|
@@ -9218,14 +9249,14 @@ var TableDesktop = ({
|
|
|
9218
9249
|
};
|
|
9219
9250
|
|
|
9220
9251
|
// src/components/TableDesktopEditableField/TableDesktopEditableField.tsx
|
|
9221
|
-
var
|
|
9252
|
+
var import_react46 = require("react");
|
|
9222
9253
|
var import_Delete = __toESM(require("@mui/icons-material/Delete"), 1);
|
|
9223
9254
|
var import_material79 = require("@mui/material");
|
|
9224
9255
|
var import_x_date_pickers = require("@mui/x-date-pickers");
|
|
9225
9256
|
var import_moment3 = __toESM(require("moment"), 1);
|
|
9226
9257
|
|
|
9227
9258
|
// src/components/TableDesktopEditableField/TableDesktopSmartMultipleSelect.tsx
|
|
9228
|
-
var
|
|
9259
|
+
var import_react43 = require("react");
|
|
9229
9260
|
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
9230
9261
|
var TableDesktopSmartMultipleSelect = ({
|
|
9231
9262
|
initialValue,
|
|
@@ -9241,7 +9272,7 @@ var TableDesktopSmartMultipleSelect = ({
|
|
|
9241
9272
|
isFetchingFilterOptions,
|
|
9242
9273
|
onUpdateEditableCell
|
|
9243
9274
|
}) => {
|
|
9244
|
-
const defaultValues = (0,
|
|
9275
|
+
const defaultValues = (0, import_react43.useMemo)(() => {
|
|
9245
9276
|
return initialValue?.map((val) => ({
|
|
9246
9277
|
value: val.id,
|
|
9247
9278
|
label: val[fieldName].toString()
|
|
@@ -9278,7 +9309,7 @@ var TableDesktopSmartMultipleSelect = ({
|
|
|
9278
9309
|
};
|
|
9279
9310
|
|
|
9280
9311
|
// src/components/TableDesktopEditableField/TableDesktopSmartSelect.tsx
|
|
9281
|
-
var
|
|
9312
|
+
var import_react44 = require("react");
|
|
9282
9313
|
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
9283
9314
|
var TableDesktopSmartSelect = ({
|
|
9284
9315
|
ref,
|
|
@@ -9296,7 +9327,7 @@ var TableDesktopSmartSelect = ({
|
|
|
9296
9327
|
isFetchingFilterOptions,
|
|
9297
9328
|
onUpdateEditableCell
|
|
9298
9329
|
}) => {
|
|
9299
|
-
const [value, setValue] = (0,
|
|
9330
|
+
const [value, setValue] = (0, import_react44.useState)(
|
|
9300
9331
|
initialValue
|
|
9301
9332
|
);
|
|
9302
9333
|
const valueId = resolveObjectType(value ?? "", "id");
|
|
@@ -9333,7 +9364,7 @@ var TableDesktopSmartSelect = ({
|
|
|
9333
9364
|
};
|
|
9334
9365
|
|
|
9335
9366
|
// src/components/TableDesktopEditableField/TableDesktopTextField.tsx
|
|
9336
|
-
var
|
|
9367
|
+
var import_react45 = require("react");
|
|
9337
9368
|
var import_material78 = require("@mui/material");
|
|
9338
9369
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
9339
9370
|
var TableDesktopTextField = ({
|
|
@@ -9348,13 +9379,13 @@ var TableDesktopTextField = ({
|
|
|
9348
9379
|
validateInput,
|
|
9349
9380
|
onUpdateEditableCell
|
|
9350
9381
|
}) => {
|
|
9351
|
-
const [input, setInput] = (0,
|
|
9352
|
-
const oldValue = (0,
|
|
9353
|
-
const isDirty = (0,
|
|
9382
|
+
const [input, setInput] = (0, import_react45.useState)(initialValue);
|
|
9383
|
+
const oldValue = (0, import_react45.useRef)(initialValue);
|
|
9384
|
+
const isDirty = (0, import_react45.useMemo)(
|
|
9354
9385
|
() => input !== oldValue.current,
|
|
9355
9386
|
[input, oldValue.current]
|
|
9356
9387
|
);
|
|
9357
|
-
const hasValidationError = (0,
|
|
9388
|
+
const hasValidationError = (0, import_react45.useMemo)(
|
|
9358
9389
|
() => isDirty && validateInput && !validateInput(input),
|
|
9359
9390
|
[input, validateInput]
|
|
9360
9391
|
);
|
|
@@ -9426,8 +9457,8 @@ var TableDesktopEditableField = ({
|
|
|
9426
9457
|
allowBlankSelectOption
|
|
9427
9458
|
}
|
|
9428
9459
|
}) => {
|
|
9429
|
-
const [parsedFilterOptions, setParsedFilterOptions] = (0,
|
|
9430
|
-
(0,
|
|
9460
|
+
const [parsedFilterOptions, setParsedFilterOptions] = (0, import_react46.useState)();
|
|
9461
|
+
(0, import_react46.useEffect)(() => {
|
|
9431
9462
|
if (filterOptions && editableCellType === "select" || editableCellType === "multipleSelect") {
|
|
9432
9463
|
const parsedOptions = filterOptions?.map(
|
|
9433
9464
|
(option) => ({
|
|
@@ -9666,7 +9697,7 @@ var TableDesktopFooter = ({
|
|
|
9666
9697
|
};
|
|
9667
9698
|
|
|
9668
9699
|
// src/components/TableDesktopCell/TableDesktopCell.tsx
|
|
9669
|
-
var
|
|
9700
|
+
var import_react47 = require("react");
|
|
9670
9701
|
var import_Check3 = __toESM(require("@mui/icons-material/Check"), 1);
|
|
9671
9702
|
var import_Close = __toESM(require("@mui/icons-material/Close"), 1);
|
|
9672
9703
|
var import_Edit = __toESM(require("@mui/icons-material/Edit"), 1);
|
|
@@ -9696,10 +9727,10 @@ var TableDesktopCell = ({
|
|
|
9696
9727
|
onCellClick,
|
|
9697
9728
|
headCell
|
|
9698
9729
|
}) => {
|
|
9699
|
-
const [isCellHovered, setIsCellHovered] = (0,
|
|
9700
|
-
const [isCellInEditMode, setIsCellInEditMode] = (0,
|
|
9730
|
+
const [isCellHovered, setIsCellHovered] = (0, import_react47.useState)(false);
|
|
9731
|
+
const [isCellInEditMode, setIsCellInEditMode] = (0, import_react47.useState)(false);
|
|
9701
9732
|
const { width, editableCellType } = headCell;
|
|
9702
|
-
(0,
|
|
9733
|
+
(0, import_react47.useEffect)(() => {
|
|
9703
9734
|
const handleKeyDown = (e) => {
|
|
9704
9735
|
if (e.key === "Escape") {
|
|
9705
9736
|
setIsCellInEditMode(false);
|
|
@@ -9767,7 +9798,7 @@ var TableDesktopCell = ({
|
|
|
9767
9798
|
};
|
|
9768
9799
|
|
|
9769
9800
|
// src/components/TableDesktopToolbar/TableDesktopToolbar.tsx
|
|
9770
|
-
var
|
|
9801
|
+
var import_react48 = require("react");
|
|
9771
9802
|
var import_Download = __toESM(require("@mui/icons-material/Download"), 1);
|
|
9772
9803
|
var import_KeyboardArrowLeft2 = __toESM(require("@mui/icons-material/KeyboardArrowLeft"), 1);
|
|
9773
9804
|
var import_KeyboardArrowRight2 = __toESM(require("@mui/icons-material/KeyboardArrowRight"), 1);
|
|
@@ -9795,12 +9826,12 @@ var TableDesktopToolbar = ({
|
|
|
9795
9826
|
renderTableColumnConfigurationMenu,
|
|
9796
9827
|
renderInfoIcons
|
|
9797
9828
|
}) => {
|
|
9798
|
-
const scrollRef = (0,
|
|
9799
|
-
const [bulkChanges, setBulkChanges] = (0,
|
|
9800
|
-
const [isBulkChangesDialogOpen, setIsBulkChangesDialogOpen] = (0,
|
|
9801
|
-
const [isExportCsvDialogOpen, setIsExportCsvDialogOpen] = (0,
|
|
9802
|
-
const [resetCounter, setResetCounter] = (0,
|
|
9803
|
-
const visibleEditableColumns = (0,
|
|
9829
|
+
const scrollRef = (0, import_react48.useRef)(null);
|
|
9830
|
+
const [bulkChanges, setBulkChanges] = (0, import_react48.useState)([]);
|
|
9831
|
+
const [isBulkChangesDialogOpen, setIsBulkChangesDialogOpen] = (0, import_react48.useState)(false);
|
|
9832
|
+
const [isExportCsvDialogOpen, setIsExportCsvDialogOpen] = (0, import_react48.useState)(false);
|
|
9833
|
+
const [resetCounter, setResetCounter] = (0, import_react48.useState)(0);
|
|
9834
|
+
const visibleEditableColumns = (0, import_react48.useMemo)(
|
|
9804
9835
|
() => headCells.filter(
|
|
9805
9836
|
(headCell) => headCell?.enabled && !!headCell?.editableCellType
|
|
9806
9837
|
),
|
|
@@ -10020,7 +10051,7 @@ var TableDesktopToolbar = ({
|
|
|
10020
10051
|
};
|
|
10021
10052
|
|
|
10022
10053
|
// src/components/TableHeader/TableHeader.tsx
|
|
10023
|
-
var
|
|
10054
|
+
var import_react49 = require("react");
|
|
10024
10055
|
var import_icons_material10 = require("@mui/icons-material");
|
|
10025
10056
|
var import_material83 = require("@mui/material");
|
|
10026
10057
|
var import_mui53 = require("tss-react/mui");
|
|
@@ -10033,9 +10064,9 @@ var useStyles47 = (0, import_mui53.makeStyles)()(() => ({
|
|
|
10033
10064
|
}
|
|
10034
10065
|
}));
|
|
10035
10066
|
var TableHeader = ({ cells, onSort = null }) => {
|
|
10036
|
-
const [sortableCells, setSortableCells] = (0,
|
|
10067
|
+
const [sortableCells, setSortableCells] = (0, import_react49.useState)([]);
|
|
10037
10068
|
const { classes } = useStyles47();
|
|
10038
|
-
(0,
|
|
10069
|
+
(0, import_react49.useEffect)(() => {
|
|
10039
10070
|
setSortableCells(cells);
|
|
10040
10071
|
}, []);
|
|
10041
10072
|
const getNewSortDirection = (direction) => {
|
|
@@ -10080,7 +10111,7 @@ var TableHeader = ({ cells, onSort = null }) => {
|
|
|
10080
10111
|
}
|
|
10081
10112
|
) : cell.label }, cell.label || key)) }) });
|
|
10082
10113
|
};
|
|
10083
|
-
var TableHeader_default = (0,
|
|
10114
|
+
var TableHeader_default = (0, import_react49.memo)(TableHeader);
|
|
10084
10115
|
|
|
10085
10116
|
// src/components/TextDivider/TextDivider.tsx
|
|
10086
10117
|
var import_material84 = require("@mui/material");
|
|
@@ -10257,7 +10288,7 @@ var ThemedDateRangePicker = ({
|
|
|
10257
10288
|
var ThemedDateRangePicker_default = ThemedDateRangePicker;
|
|
10258
10289
|
|
|
10259
10290
|
// src/components/TheToolbar/TheToolbar.tsx
|
|
10260
|
-
var
|
|
10291
|
+
var import_react50 = require("react");
|
|
10261
10292
|
var import_material85 = require("@mui/material");
|
|
10262
10293
|
var import_mui56 = require("tss-react/mui");
|
|
10263
10294
|
var import_jsx_runtime143 = require("react/jsx-runtime");
|
|
@@ -10307,7 +10338,7 @@ var TheToolbar = ({
|
|
|
10307
10338
|
LeftDrawer
|
|
10308
10339
|
] });
|
|
10309
10340
|
};
|
|
10310
|
-
var TheToolbar_default = (0,
|
|
10341
|
+
var TheToolbar_default = (0, import_react50.memo)(TheToolbar);
|
|
10311
10342
|
|
|
10312
10343
|
// src/components/ToastMessage/ToastMessage.tsx
|
|
10313
10344
|
var import_material86 = require("@mui/material");
|
|
@@ -10450,7 +10481,7 @@ var TwoButtonDialog = ({
|
|
|
10450
10481
|
var TwoButtonDialog_default = TwoButtonDialog;
|
|
10451
10482
|
|
|
10452
10483
|
// src/components/UserBust/UserBust.tsx
|
|
10453
|
-
var
|
|
10484
|
+
var import_react51 = require("react");
|
|
10454
10485
|
var import_material88 = require("@mui/material");
|
|
10455
10486
|
var import_jsx_runtime146 = require("react/jsx-runtime");
|
|
10456
10487
|
var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { children: [
|
|
@@ -10467,7 +10498,7 @@ var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0, i
|
|
|
10467
10498
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_material88.Typography, { ...typographyProps.username, children: user.username })
|
|
10468
10499
|
] })
|
|
10469
10500
|
] });
|
|
10470
|
-
var UserBust_default = (0,
|
|
10501
|
+
var UserBust_default = (0, import_react51.memo)(UserBust);
|
|
10471
10502
|
|
|
10472
10503
|
// src/components/icons/IconChart.tsx
|
|
10473
10504
|
var import_jsx_runtime147 = require("react/jsx-runtime");
|