@natoora-libs/core 0.1.9-dev-doug-5 → 0.1.9-dev-doug-7
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/components/index.cjs +169 -145
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +8 -17
- package/dist/components/index.d.ts +8 -17
- package/dist/components/index.js +180 -154
- package/dist/components/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -384,7 +384,6 @@ __export(components_exports, {
|
|
|
384
384
|
Table: () => Table_default,
|
|
385
385
|
TableDesktop: () => TableDesktop_default,
|
|
386
386
|
TableDesktopFooter: () => TableDesktopFooter,
|
|
387
|
-
TableDesktopRowActions: () => TableDesktopRowActions,
|
|
388
387
|
TableDesktopRowCell: () => TableDesktopRowCell,
|
|
389
388
|
TableDesktopSmartSelect: () => TableDesktopSmartSelect,
|
|
390
389
|
TableEmptyResult: () => TableEmptyResult_default,
|
|
@@ -7061,6 +7060,7 @@ var TableEmptyResult_default = TableEmptyResult;
|
|
|
7061
7060
|
|
|
7062
7061
|
// src/components/TableDesktop/TableDesktop.tsx
|
|
7063
7062
|
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
7063
|
+
var ROW_HEIGHT = 56;
|
|
7064
7064
|
var useStyles48 = (0, import_mui54.makeStyles)()((theme) => ({
|
|
7065
7065
|
root: {
|
|
7066
7066
|
justifyContent: "space-between",
|
|
@@ -7135,7 +7135,6 @@ var TableDesktop = ({
|
|
|
7135
7135
|
isLoading,
|
|
7136
7136
|
rowsPerPage = 50,
|
|
7137
7137
|
enableCheckboxSelection = false,
|
|
7138
|
-
enableRowActions = false,
|
|
7139
7138
|
disableInternalSort = false,
|
|
7140
7139
|
updateSort,
|
|
7141
7140
|
showClearFilterButton,
|
|
@@ -7146,14 +7145,14 @@ var TableDesktop = ({
|
|
|
7146
7145
|
onApplyFilters,
|
|
7147
7146
|
shouldShowCheckOnFilter
|
|
7148
7147
|
}) => {
|
|
7148
|
+
const { classes } = useStyles48();
|
|
7149
7149
|
const [order, setOrder] = (0, import_react33.useState)(appliedFilters?.sortDir || "desc");
|
|
7150
7150
|
const [orderBy, setOrderBy] = (0, import_react33.useState)(
|
|
7151
7151
|
appliedFilters?.sortField || "delivery_date"
|
|
7152
7152
|
);
|
|
7153
7153
|
const [selected, setSelected] = (0, import_react33.useState)(/* @__PURE__ */ new Set());
|
|
7154
7154
|
const [page] = (0, import_react33.useState)(0);
|
|
7155
|
-
const
|
|
7156
|
-
const rowHeight = 56;
|
|
7155
|
+
const numRows = data.length;
|
|
7157
7156
|
const emptyRows = (0, import_react33.useMemo)(
|
|
7158
7157
|
() => rowsPerPage - data.length,
|
|
7159
7158
|
[rowsPerPage, data]
|
|
@@ -7198,6 +7197,18 @@ var TableDesktop = ({
|
|
|
7198
7197
|
[]
|
|
7199
7198
|
);
|
|
7200
7199
|
const renderTableRows = (0, import_react33.useMemo)(() => {
|
|
7200
|
+
if (isLoading) {
|
|
7201
|
+
return [...Array(Math.min(numRows, rowsPerPage))].map((_, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material60.TableRow, { children: [...Array(visibleHeadCells.length)].map((_2, cellIndex) => /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material60.TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
7202
|
+
import_material60.Skeleton,
|
|
7203
|
+
{
|
|
7204
|
+
animation: "pulse",
|
|
7205
|
+
variant: "rounded",
|
|
7206
|
+
height: ROW_HEIGHT - 33,
|
|
7207
|
+
sx: { bgcolor: colors.neutral100 },
|
|
7208
|
+
"data-testid": "loading-skeleton"
|
|
7209
|
+
}
|
|
7210
|
+
) }, cellIndex)) }, rowIndex));
|
|
7211
|
+
}
|
|
7201
7212
|
const sortedData = disableInternalSort ? data : stableSort(data, getComparator(order, orderBy));
|
|
7202
7213
|
return sortedData.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((row, index) => {
|
|
7203
7214
|
const isItemSelected = selected.has(row[keyField]);
|
|
@@ -7210,8 +7221,8 @@ var TableDesktop = ({
|
|
|
7210
7221
|
deleteItem,
|
|
7211
7222
|
isItemSelected,
|
|
7212
7223
|
enableCheckboxSelection,
|
|
7213
|
-
|
|
7214
|
-
|
|
7224
|
+
rowHeight: ROW_HEIGHT,
|
|
7225
|
+
rowId: row[keyField],
|
|
7215
7226
|
handleRowCheckboxChange,
|
|
7216
7227
|
visibleHeadCells
|
|
7217
7228
|
}
|
|
@@ -7226,8 +7237,9 @@ var TableDesktop = ({
|
|
|
7226
7237
|
page,
|
|
7227
7238
|
rowsPerPage,
|
|
7228
7239
|
selected,
|
|
7240
|
+
isLoading,
|
|
7241
|
+
numRows,
|
|
7229
7242
|
enableCheckboxSelection,
|
|
7230
|
-
enableRowActions,
|
|
7231
7243
|
disableInternalSort,
|
|
7232
7244
|
deleteItem,
|
|
7233
7245
|
keyField,
|
|
@@ -7241,17 +7253,7 @@ var TableDesktop = ({
|
|
|
7241
7253
|
}
|
|
7242
7254
|
}, [enableCheckboxSelection]);
|
|
7243
7255
|
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: classes.root, style: { height }, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_material60.Paper, { className: classes.paper, children: [
|
|
7244
|
-
|
|
7245
|
-
import_material60.Skeleton,
|
|
7246
|
-
{
|
|
7247
|
-
animation: "pulse",
|
|
7248
|
-
variant: "rounded",
|
|
7249
|
-
sx: { margin: 1 },
|
|
7250
|
-
height: rowHeight,
|
|
7251
|
-
"data-testid": "loading-skeleton"
|
|
7252
|
-
},
|
|
7253
|
-
index
|
|
7254
|
-
)) }) : /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material60.TableContainer, { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
7256
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material60.TableContainer, { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
7255
7257
|
import_material60.Table,
|
|
7256
7258
|
{
|
|
7257
7259
|
stickyHeader: true,
|
|
@@ -7266,7 +7268,7 @@ var TableDesktop = ({
|
|
|
7266
7268
|
order,
|
|
7267
7269
|
orderBy,
|
|
7268
7270
|
numSelected: selected.size,
|
|
7269
|
-
numRows
|
|
7271
|
+
numRows,
|
|
7270
7272
|
enableCheckboxSelection,
|
|
7271
7273
|
headerFilters: headerFilters ?? {},
|
|
7272
7274
|
onRequestSort: handleRequestSort,
|
|
@@ -7754,7 +7756,6 @@ var TableDesktopFooter = ({
|
|
|
7754
7756
|
value: pageSize,
|
|
7755
7757
|
onChange: handlePageSizeChange,
|
|
7756
7758
|
size: "small",
|
|
7757
|
-
"data-testid": "page-size-options-select",
|
|
7758
7759
|
variant: "standard",
|
|
7759
7760
|
children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material64.MenuItem, { value: size, children: size }, size))
|
|
7760
7761
|
}
|
|
@@ -7775,50 +7776,13 @@ var TableDesktopFooter = ({
|
|
|
7775
7776
|
);
|
|
7776
7777
|
};
|
|
7777
7778
|
|
|
7778
|
-
// src/components/TableDesktopRowActions/TableDesktopRowActions.tsx
|
|
7779
|
-
var import_material65 = require("@mui/material");
|
|
7780
|
-
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
7781
|
-
var TableDesktopRowActions = ({
|
|
7782
|
-
isRowHovered,
|
|
7783
|
-
children,
|
|
7784
|
-
sx,
|
|
7785
|
-
zIndex = 1,
|
|
7786
|
-
backgroundColor
|
|
7787
|
-
}) => {
|
|
7788
|
-
return isRowHovered ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
7789
|
-
import_material65.TableCell,
|
|
7790
|
-
{
|
|
7791
|
-
padding: "none",
|
|
7792
|
-
sx: {
|
|
7793
|
-
top: 0,
|
|
7794
|
-
right: 0,
|
|
7795
|
-
zIndex,
|
|
7796
|
-
position: "sticky",
|
|
7797
|
-
display: "flex",
|
|
7798
|
-
justifyContent: "flex-end",
|
|
7799
|
-
alignItems: "center"
|
|
7800
|
-
},
|
|
7801
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
7802
|
-
import_material65.Box,
|
|
7803
|
-
{
|
|
7804
|
-
sx,
|
|
7805
|
-
display: "flex",
|
|
7806
|
-
flexDirection: "row",
|
|
7807
|
-
bgcolor: backgroundColor ?? colors.neutral100,
|
|
7808
|
-
children
|
|
7809
|
-
}
|
|
7810
|
-
)
|
|
7811
|
-
}
|
|
7812
|
-
) : null;
|
|
7813
|
-
};
|
|
7814
|
-
|
|
7815
7779
|
// src/components/TableDesktopRowCell/TableDesktopRowCell.tsx
|
|
7816
7780
|
var import_react38 = require("react");
|
|
7817
|
-
var
|
|
7781
|
+
var import_material65 = require("@mui/material");
|
|
7818
7782
|
|
|
7819
7783
|
// src/components/TableDesktopRowCell/TableDesktopSmartSelect.tsx
|
|
7820
7784
|
var import_react36 = require("react");
|
|
7821
|
-
var
|
|
7785
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
7822
7786
|
var resolveValue = (value) => {
|
|
7823
7787
|
if (typeof value === "string") {
|
|
7824
7788
|
return value;
|
|
@@ -7831,6 +7795,7 @@ var TableDesktopSmartSelect = (0, import_react36.memo)(({
|
|
|
7831
7795
|
inputLabel,
|
|
7832
7796
|
fieldName,
|
|
7833
7797
|
rowId,
|
|
7798
|
+
disabled,
|
|
7834
7799
|
filterOptions,
|
|
7835
7800
|
refetchFilterOptions,
|
|
7836
7801
|
isFetchingFilterOptions,
|
|
@@ -7849,13 +7814,14 @@ var TableDesktopSmartSelect = (0, import_react36.memo)(({
|
|
|
7849
7814
|
setOptions(parsedOptions);
|
|
7850
7815
|
}
|
|
7851
7816
|
}, [filterOptions]);
|
|
7852
|
-
return /* @__PURE__ */ (0,
|
|
7817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
7853
7818
|
SmartSelect_default,
|
|
7854
7819
|
{
|
|
7855
7820
|
ref,
|
|
7856
7821
|
value: valueId,
|
|
7857
7822
|
inputLabel,
|
|
7858
7823
|
options,
|
|
7824
|
+
disabled,
|
|
7859
7825
|
refetch: refetchFilterOptions,
|
|
7860
7826
|
isFetching: isFetchingFilterOptions,
|
|
7861
7827
|
defaultOption: {
|
|
@@ -7876,17 +7842,18 @@ var import_Check2 = __toESM(require("@mui/icons-material/Check"), 1);
|
|
|
7876
7842
|
// src/components/TableDesktopRowCell/TableDesktopTextField.tsx
|
|
7877
7843
|
var import_TextField = __toESM(require("@mui/material/TextField"), 1);
|
|
7878
7844
|
var import_react37 = require("react");
|
|
7879
|
-
var
|
|
7845
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
7880
7846
|
var TableDesktopTextField = ({
|
|
7881
7847
|
rowId,
|
|
7882
7848
|
editInitialValue,
|
|
7883
7849
|
inputLabel,
|
|
7850
|
+
disabled,
|
|
7884
7851
|
validateInput,
|
|
7885
7852
|
onUpdateEditableCell
|
|
7886
7853
|
}) => {
|
|
7887
7854
|
const [value, setValue] = (0, import_react37.useState)(editInitialValue);
|
|
7888
7855
|
const hasError = (0, import_react37.useMemo)(() => !validateInput?.(value), [value, validateInput]);
|
|
7889
|
-
return /* @__PURE__ */ (0,
|
|
7856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
7890
7857
|
import_TextField.default,
|
|
7891
7858
|
{
|
|
7892
7859
|
fullWidth: true,
|
|
@@ -7894,6 +7861,7 @@ var TableDesktopTextField = ({
|
|
|
7894
7861
|
defaultValue: value,
|
|
7895
7862
|
label: inputLabel,
|
|
7896
7863
|
error: hasError,
|
|
7864
|
+
disabled,
|
|
7897
7865
|
onChange: ({ target: { value: value2 } }) => {
|
|
7898
7866
|
setValue(value2);
|
|
7899
7867
|
},
|
|
@@ -7908,38 +7876,55 @@ var TableDesktopTextField = ({
|
|
|
7908
7876
|
};
|
|
7909
7877
|
|
|
7910
7878
|
// src/components/TableDesktopRowCell/TableDesktopRowCell.tsx
|
|
7911
|
-
var
|
|
7879
|
+
var import_Close = __toESM(require("@mui/icons-material/Close"), 1);
|
|
7880
|
+
var import_Edit = __toESM(require("@mui/icons-material/Edit"), 1);
|
|
7881
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
7912
7882
|
var TableDesktopRowCell = ({
|
|
7913
|
-
ref,
|
|
7914
7883
|
inputLabel,
|
|
7915
7884
|
editInitialValue,
|
|
7916
7885
|
rowId,
|
|
7917
7886
|
fieldName,
|
|
7918
7887
|
width,
|
|
7919
|
-
|
|
7888
|
+
disabled,
|
|
7920
7889
|
readOnlyValue,
|
|
7921
7890
|
editableCellType,
|
|
7922
7891
|
filterOptions,
|
|
7923
7892
|
refetchFilterOptions,
|
|
7924
7893
|
isFetchingFilterOptions,
|
|
7925
7894
|
validateInput,
|
|
7926
|
-
onUpdateEditableCell
|
|
7895
|
+
onUpdateEditableCell,
|
|
7896
|
+
onCellClick
|
|
7927
7897
|
}) => {
|
|
7928
7898
|
const cellRef = (0, import_react38.useRef)(null);
|
|
7929
7899
|
const [isOverflowed, setIsOverflowed] = (0, import_react38.useState)(false);
|
|
7900
|
+
const [isCellHovered, setIsCellHovered] = (0, import_react38.useState)(false);
|
|
7901
|
+
const [isEditMode, setIsEditMode] = (0, import_react38.useState)(false);
|
|
7930
7902
|
(0, import_react38.useEffect)(() => {
|
|
7931
|
-
const
|
|
7932
|
-
if (
|
|
7933
|
-
setIsOverflowed(
|
|
7903
|
+
const ref = cellRef.current;
|
|
7904
|
+
if (ref) {
|
|
7905
|
+
setIsOverflowed(ref.scrollWidth > ref.clientWidth);
|
|
7934
7906
|
}
|
|
7935
7907
|
}, [readOnlyValue, width]);
|
|
7908
|
+
(0, import_react38.useEffect)(() => {
|
|
7909
|
+
const handleKeyDown = (e) => {
|
|
7910
|
+
if (e.key === "Escape") {
|
|
7911
|
+
setIsEditMode(false);
|
|
7912
|
+
}
|
|
7913
|
+
};
|
|
7914
|
+
if (isEditMode) {
|
|
7915
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
7916
|
+
}
|
|
7917
|
+
return () => {
|
|
7918
|
+
window.removeEventListener("keydown", handleKeyDown);
|
|
7919
|
+
};
|
|
7920
|
+
}, [isEditMode]);
|
|
7936
7921
|
const editableComponents = {
|
|
7937
|
-
"select": /* @__PURE__ */ (0,
|
|
7922
|
+
"select": /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
7938
7923
|
TableDesktopSmartSelect,
|
|
7939
7924
|
{
|
|
7940
|
-
ref,
|
|
7941
7925
|
rowId,
|
|
7942
7926
|
fieldName,
|
|
7927
|
+
disabled,
|
|
7943
7928
|
initialValue: editInitialValue,
|
|
7944
7929
|
inputLabel: inputLabel ?? "",
|
|
7945
7930
|
filterOptions,
|
|
@@ -7948,31 +7933,34 @@ var TableDesktopRowCell = ({
|
|
|
7948
7933
|
onUpdateEditableCell
|
|
7949
7934
|
}
|
|
7950
7935
|
),
|
|
7951
|
-
"checkbox": /* @__PURE__ */ (0,
|
|
7952
|
-
|
|
7936
|
+
"checkbox": /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
7937
|
+
import_material65.Checkbox,
|
|
7953
7938
|
{
|
|
7954
7939
|
disableRipple: true,
|
|
7940
|
+
disabled,
|
|
7955
7941
|
defaultChecked: editInitialValue,
|
|
7956
7942
|
onChange: ({ target: { checked } }) => {
|
|
7957
7943
|
onUpdateEditableCell?.(rowId, checked);
|
|
7958
7944
|
}
|
|
7959
7945
|
}
|
|
7960
7946
|
),
|
|
7961
|
-
"text": /* @__PURE__ */ (0,
|
|
7947
|
+
"text": /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
7962
7948
|
TableDesktopTextField,
|
|
7963
7949
|
{
|
|
7964
7950
|
rowId,
|
|
7951
|
+
disabled,
|
|
7965
7952
|
editInitialValue,
|
|
7966
7953
|
inputLabel: inputLabel ?? "",
|
|
7967
7954
|
validateInput,
|
|
7968
7955
|
onUpdateEditableCell
|
|
7969
7956
|
}
|
|
7970
7957
|
),
|
|
7971
|
-
"numeric": /* @__PURE__ */ (0,
|
|
7972
|
-
|
|
7958
|
+
"numeric": /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
7959
|
+
import_material65.TextField,
|
|
7973
7960
|
{
|
|
7974
7961
|
fullWidth: true,
|
|
7975
7962
|
variant: "standard",
|
|
7963
|
+
disabled,
|
|
7976
7964
|
defaultValue: editInitialValue,
|
|
7977
7965
|
label: inputLabel,
|
|
7978
7966
|
onChange: (e) => {
|
|
@@ -7991,22 +7979,59 @@ var TableDesktopRowCell = ({
|
|
|
7991
7979
|
};
|
|
7992
7980
|
const getReadOnlyBooleanIcon = (value) => {
|
|
7993
7981
|
if (value) {
|
|
7994
|
-
return /* @__PURE__ */ (0,
|
|
7982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_Check2.default, { sx: { fontSize: 16 } });
|
|
7995
7983
|
}
|
|
7996
7984
|
return "-";
|
|
7997
7985
|
};
|
|
7998
|
-
|
|
7999
|
-
|
|
7986
|
+
const handleEditClick = (e) => {
|
|
7987
|
+
e.stopPropagation();
|
|
7988
|
+
setIsEditMode((prev) => !prev);
|
|
7989
|
+
};
|
|
7990
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.Tooltip, { title: isOverflowed ? String(readOnlyValue) : "", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
7991
|
+
import_material65.TableCell,
|
|
8000
7992
|
{
|
|
8001
|
-
ref: cellRef,
|
|
8002
7993
|
align: "left",
|
|
7994
|
+
onMouseEnter: () => editableCellType && !disabled && setIsCellHovered(true),
|
|
7995
|
+
onMouseLeave: () => editableCellType && !disabled && setIsCellHovered(false),
|
|
7996
|
+
onClick: (event) => !disabled && onCellClick?.(event, isEditMode),
|
|
8003
7997
|
sx: {
|
|
7998
|
+
padding: 1,
|
|
8004
7999
|
width: width ?? "auto",
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8000
|
+
position: "relative",
|
|
8001
|
+
cursor: disabled ? "default" : "pointer",
|
|
8002
|
+
opacity: disabled ? 0.2 : 1,
|
|
8003
|
+
":hover": editableCellType && {
|
|
8004
|
+
background: isEditMode ? colors.lightBlueBackground : colors.neutral100
|
|
8005
|
+
},
|
|
8006
|
+
background: isEditMode ? colors.lightBlueBackground : (theme) => theme.palette.background.default
|
|
8008
8007
|
},
|
|
8009
|
-
children:
|
|
8008
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
8009
|
+
import_material65.Box,
|
|
8010
|
+
{
|
|
8011
|
+
p: 1,
|
|
8012
|
+
ref: cellRef,
|
|
8013
|
+
overflow: "hidden",
|
|
8014
|
+
textOverflow: "ellipsis",
|
|
8015
|
+
whiteSpace: "nowrap",
|
|
8016
|
+
children: [
|
|
8017
|
+
isCellHovered ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.Tooltip, { title: isEditMode ? "" : "Toggle Edit Mode", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
8018
|
+
import_material65.IconButton,
|
|
8019
|
+
{
|
|
8020
|
+
onClick: handleEditClick,
|
|
8021
|
+
sx: {
|
|
8022
|
+
top: 0,
|
|
8023
|
+
right: 0,
|
|
8024
|
+
zIndex: 1,
|
|
8025
|
+
borderRadius: 0,
|
|
8026
|
+
position: "absolute"
|
|
8027
|
+
},
|
|
8028
|
+
children: isEditMode ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_Close.default, { fontSize: "small", color: "error" }) : /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_Edit.default, { fontSize: "small" })
|
|
8029
|
+
}
|
|
8030
|
+
) }) : null,
|
|
8031
|
+
isEditMode && editableCellType ? editableComponents[editableCellType] : typeof readOnlyValue === "boolean" ? getReadOnlyBooleanIcon(readOnlyValue) : readOnlyValue
|
|
8032
|
+
]
|
|
8033
|
+
}
|
|
8034
|
+
)
|
|
8010
8035
|
}
|
|
8011
8036
|
) });
|
|
8012
8037
|
};
|
|
@@ -8014,9 +8039,9 @@ var TableDesktopRowCell = ({
|
|
|
8014
8039
|
// src/components/TableHeader/TableHeader.tsx
|
|
8015
8040
|
var import_react39 = require("react");
|
|
8016
8041
|
var import_icons_material12 = require("@mui/icons-material");
|
|
8017
|
-
var
|
|
8042
|
+
var import_material66 = require("@mui/material");
|
|
8018
8043
|
var import_mui57 = require("tss-react/mui");
|
|
8019
|
-
var
|
|
8044
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
8020
8045
|
var useStyles51 = (0, import_mui57.makeStyles)()(() => ({
|
|
8021
8046
|
sortLabel: {
|
|
8022
8047
|
"& .MuiTableSortLabel-icon": {
|
|
@@ -8061,8 +8086,8 @@ var TableHeader = ({ cells, onSort = null }) => {
|
|
|
8061
8086
|
});
|
|
8062
8087
|
setSortableCells(sortedCells);
|
|
8063
8088
|
};
|
|
8064
|
-
return /* @__PURE__ */ (0,
|
|
8065
|
-
|
|
8089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.TableRow, { children: sortableCells.map((cell, key) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material66.TableCell, { children: cell.isSortable ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
8090
|
+
import_material66.TableSortLabel,
|
|
8066
8091
|
{
|
|
8067
8092
|
className: classes.sortLabel,
|
|
8068
8093
|
direction: cell?.direction || "asc",
|
|
@@ -8075,9 +8100,9 @@ var TableHeader = ({ cells, onSort = null }) => {
|
|
|
8075
8100
|
var TableHeader_default = (0, import_react39.memo)(TableHeader);
|
|
8076
8101
|
|
|
8077
8102
|
// src/components/TextDivider/TextDivider.tsx
|
|
8078
|
-
var
|
|
8103
|
+
var import_material67 = require("@mui/material");
|
|
8079
8104
|
var import_mui58 = require("tss-react/mui");
|
|
8080
|
-
var
|
|
8105
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
8081
8106
|
var useStyles52 = (0, import_mui58.makeStyles)()(() => ({
|
|
8082
8107
|
icon: {
|
|
8083
8108
|
fontSize: 20
|
|
@@ -8114,19 +8139,19 @@ var TextDivider = ({
|
|
|
8114
8139
|
}) => {
|
|
8115
8140
|
const { classes } = useStyles52();
|
|
8116
8141
|
const iconColor = color ?? colors.neutral900;
|
|
8117
|
-
return /* @__PURE__ */ (0,
|
|
8118
|
-
|
|
8142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
8143
|
+
import_material67.Box,
|
|
8119
8144
|
{
|
|
8120
8145
|
display: "flex",
|
|
8121
8146
|
alignItems: "center",
|
|
8122
8147
|
justifyContent: "space-between",
|
|
8123
8148
|
className: classes.container,
|
|
8124
8149
|
children: [
|
|
8125
|
-
/* @__PURE__ */ (0,
|
|
8126
|
-
/* @__PURE__ */ (0,
|
|
8127
|
-
Icon2 && iconPosition === "left" && /* @__PURE__ */ (0,
|
|
8128
|
-
/* @__PURE__ */ (0,
|
|
8129
|
-
|
|
8150
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Divider, { className: classes.leftDivider }),
|
|
8151
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Button, { onClick, disabled: !onClick, className: classes.button, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_material67.Box, { className: classes.center, children: [
|
|
8152
|
+
Icon2 && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Icon2, { className: classes.icon, style: { color: iconColor } }),
|
|
8153
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
8154
|
+
import_material67.Typography,
|
|
8130
8155
|
{
|
|
8131
8156
|
color: "textSecondary",
|
|
8132
8157
|
className: classes.title,
|
|
@@ -8134,9 +8159,9 @@ var TextDivider = ({
|
|
|
8134
8159
|
children: title
|
|
8135
8160
|
}
|
|
8136
8161
|
),
|
|
8137
|
-
Icon2 && iconPosition === "right" && /* @__PURE__ */ (0,
|
|
8162
|
+
Icon2 && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Icon2, { className: classes.icon, style: { color: iconColor } })
|
|
8138
8163
|
] }) }),
|
|
8139
|
-
/* @__PURE__ */ (0,
|
|
8164
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material67.Divider, { className: classes.rightDivider })
|
|
8140
8165
|
]
|
|
8141
8166
|
}
|
|
8142
8167
|
);
|
|
@@ -8148,7 +8173,7 @@ var import_react_dates = require("react-dates");
|
|
|
8148
8173
|
var import_mui59 = require("tss-react/mui");
|
|
8149
8174
|
var import_initialize = require("react-dates/initialize");
|
|
8150
8175
|
var import_datepicker = require("react-dates/lib/css/_datepicker.css");
|
|
8151
|
-
var
|
|
8176
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
8152
8177
|
var useStyles53 = (0, import_mui59.makeStyles)()((theme) => ({
|
|
8153
8178
|
wrapper: {
|
|
8154
8179
|
"& .DateRangePicker": {
|
|
@@ -8244,15 +8269,15 @@ var ThemedDateRangePicker = ({
|
|
|
8244
8269
|
...props
|
|
8245
8270
|
}) => {
|
|
8246
8271
|
const { classes, cx } = useStyles53();
|
|
8247
|
-
return /* @__PURE__ */ (0,
|
|
8272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: cx(classes.wrapper, className), children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_react_dates.DateRangePicker, { ...props }) });
|
|
8248
8273
|
};
|
|
8249
8274
|
var ThemedDateRangePicker_default = ThemedDateRangePicker;
|
|
8250
8275
|
|
|
8251
8276
|
// src/components/TheToolbar/TheToolbar.tsx
|
|
8252
8277
|
var import_react40 = require("react");
|
|
8253
|
-
var
|
|
8278
|
+
var import_material68 = require("@mui/material");
|
|
8254
8279
|
var import_mui60 = require("tss-react/mui");
|
|
8255
|
-
var
|
|
8280
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
8256
8281
|
var useStyles54 = (0, import_mui60.makeStyles)()((theme) => ({
|
|
8257
8282
|
menuButton: {
|
|
8258
8283
|
color: theme.palette.primary.contrastText
|
|
@@ -8272,9 +8297,9 @@ var TheToolbar = ({
|
|
|
8272
8297
|
rightSection
|
|
8273
8298
|
}) => {
|
|
8274
8299
|
const { classes } = useStyles54();
|
|
8275
|
-
return /* @__PURE__ */ (0,
|
|
8276
|
-
/* @__PURE__ */ (0,
|
|
8277
|
-
/* @__PURE__ */ (0,
|
|
8300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_material68.Box, { children: [
|
|
8301
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material68.AppBar, { children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_material68.Toolbar, { className: classes.topBar, children: [
|
|
8302
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
8278
8303
|
RoundButton_default,
|
|
8279
8304
|
{
|
|
8280
8305
|
className: classes.menuButton,
|
|
@@ -8283,7 +8308,7 @@ var TheToolbar = ({
|
|
|
8283
8308
|
onClick: handleOpen
|
|
8284
8309
|
}
|
|
8285
8310
|
),
|
|
8286
|
-
/* @__PURE__ */ (0,
|
|
8311
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
8287
8312
|
CompanyLogo_default,
|
|
8288
8313
|
{
|
|
8289
8314
|
size: "small",
|
|
@@ -8292,8 +8317,8 @@ var TheToolbar = ({
|
|
|
8292
8317
|
imageLogoLightSmall
|
|
8293
8318
|
}
|
|
8294
8319
|
),
|
|
8295
|
-
/* @__PURE__ */ (0,
|
|
8296
|
-
/* @__PURE__ */ (0,
|
|
8320
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material68.Box, { ml: 2, children: leftSection }),
|
|
8321
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material68.Box, { ml: "auto", children: rightSection })
|
|
8297
8322
|
] }) }),
|
|
8298
8323
|
LeftDrawer
|
|
8299
8324
|
] });
|
|
@@ -8301,22 +8326,22 @@ var TheToolbar = ({
|
|
|
8301
8326
|
var TheToolbar_default = (0, import_react40.memo)(TheToolbar);
|
|
8302
8327
|
|
|
8303
8328
|
// src/components/ToastMessage/ToastMessage.tsx
|
|
8304
|
-
var
|
|
8305
|
-
var
|
|
8329
|
+
var import_material69 = require("@mui/material");
|
|
8330
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
8306
8331
|
var ToastMessage = ({
|
|
8307
8332
|
toastType,
|
|
8308
8333
|
toastMessage,
|
|
8309
8334
|
open,
|
|
8310
8335
|
onClose
|
|
8311
|
-
}) => /* @__PURE__ */ (0,
|
|
8312
|
-
|
|
8336
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
8337
|
+
import_material69.Snackbar,
|
|
8313
8338
|
{
|
|
8314
8339
|
open,
|
|
8315
8340
|
autoHideDuration: 1500,
|
|
8316
8341
|
onClose,
|
|
8317
8342
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
8318
|
-
children: /* @__PURE__ */ (0,
|
|
8319
|
-
|
|
8343
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
8344
|
+
import_material69.Alert,
|
|
8320
8345
|
{
|
|
8321
8346
|
elevation: 6,
|
|
8322
8347
|
variant: "filled",
|
|
@@ -8342,9 +8367,9 @@ var ToastMessage = ({
|
|
|
8342
8367
|
var ToastMessage_default = ToastMessage;
|
|
8343
8368
|
|
|
8344
8369
|
// src/components/TwoButtonDialog/TwoButtonDialog.tsx
|
|
8345
|
-
var
|
|
8370
|
+
var import_material70 = require("@mui/material");
|
|
8346
8371
|
var import_mui61 = require("tss-react/mui");
|
|
8347
|
-
var
|
|
8372
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
8348
8373
|
var useStyles55 = (0, import_mui61.makeStyles)()((theme) => ({
|
|
8349
8374
|
paper: {
|
|
8350
8375
|
padding: theme.spacing(2)
|
|
@@ -8374,20 +8399,20 @@ var TwoButtonDialog = ({
|
|
|
8374
8399
|
cancelButton
|
|
8375
8400
|
}) => {
|
|
8376
8401
|
const { classes } = useStyles55();
|
|
8377
|
-
return /* @__PURE__ */ (0,
|
|
8378
|
-
|
|
8402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
8403
|
+
import_material70.Dialog,
|
|
8379
8404
|
{
|
|
8380
8405
|
open,
|
|
8381
8406
|
disableEnforceFocus: true,
|
|
8382
8407
|
maxWidth: "sm",
|
|
8383
8408
|
fullWidth: true,
|
|
8384
8409
|
closeAfterTransition: true,
|
|
8385
|
-
BackdropComponent:
|
|
8410
|
+
BackdropComponent: import_material70.Backdrop,
|
|
8386
8411
|
BackdropProps: { timeout: 500 },
|
|
8387
|
-
children: /* @__PURE__ */ (0,
|
|
8388
|
-
/* @__PURE__ */ (0,
|
|
8389
|
-
/* @__PURE__ */ (0,
|
|
8390
|
-
|
|
8412
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material70.Fade, { in: open, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_material70.Paper, { className: classes.paper, children: [
|
|
8413
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_material70.Box, { className: classes.mb, children: [
|
|
8414
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material70.Typography, { variant: "h5", component: "div", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
8415
|
+
import_material70.Box,
|
|
8391
8416
|
{
|
|
8392
8417
|
sx: {
|
|
8393
8418
|
fontWeight: 600
|
|
@@ -8395,23 +8420,23 @@ var TwoButtonDialog = ({
|
|
|
8395
8420
|
children: title
|
|
8396
8421
|
}
|
|
8397
8422
|
) }),
|
|
8398
|
-
/* @__PURE__ */ (0,
|
|
8399
|
-
|
|
8423
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
8424
|
+
import_material70.Box,
|
|
8400
8425
|
{
|
|
8401
8426
|
className: classes.mt,
|
|
8402
8427
|
sx: {
|
|
8403
8428
|
fontWeight: 600
|
|
8404
8429
|
},
|
|
8405
8430
|
children: [
|
|
8406
|
-
subtitle1 && /* @__PURE__ */ (0,
|
|
8407
|
-
subtitle2 && /* @__PURE__ */ (0,
|
|
8431
|
+
subtitle1 && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material70.Typography, { variant: "subtitle1", children: subtitle1 }),
|
|
8432
|
+
subtitle2 && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material70.Typography, { variant: "subtitle1", children: subtitle2 })
|
|
8408
8433
|
]
|
|
8409
8434
|
}
|
|
8410
8435
|
)
|
|
8411
8436
|
] }),
|
|
8412
|
-
/* @__PURE__ */ (0,
|
|
8413
|
-
/* @__PURE__ */ (0,
|
|
8414
|
-
/* @__PURE__ */ (0,
|
|
8437
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material70.Divider, {}),
|
|
8438
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_material70.Box, { className: classes.buttonContainer, children: [
|
|
8439
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
8415
8440
|
FilledButton_default,
|
|
8416
8441
|
{
|
|
8417
8442
|
copy: cancelLabel,
|
|
@@ -8424,7 +8449,7 @@ var TwoButtonDialog = ({
|
|
|
8424
8449
|
}
|
|
8425
8450
|
}
|
|
8426
8451
|
),
|
|
8427
|
-
/* @__PURE__ */ (0,
|
|
8452
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
8428
8453
|
FilledButton_default,
|
|
8429
8454
|
{
|
|
8430
8455
|
color: "primary",
|
|
@@ -8433,7 +8458,7 @@ var TwoButtonDialog = ({
|
|
|
8433
8458
|
}
|
|
8434
8459
|
)
|
|
8435
8460
|
] }),
|
|
8436
|
-
/* @__PURE__ */ (0,
|
|
8461
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Loading_default, { isLoading: dialogLoading })
|
|
8437
8462
|
] }) })
|
|
8438
8463
|
}
|
|
8439
8464
|
);
|
|
@@ -8442,29 +8467,29 @@ var TwoButtonDialog_default = TwoButtonDialog;
|
|
|
8442
8467
|
|
|
8443
8468
|
// src/components/UserBust/UserBust.tsx
|
|
8444
8469
|
var import_react41 = require("react");
|
|
8445
|
-
var
|
|
8446
|
-
var
|
|
8447
|
-
var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0,
|
|
8448
|
-
/* @__PURE__ */ (0,
|
|
8449
|
-
|
|
8470
|
+
var import_material71 = require("@mui/material");
|
|
8471
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
8472
|
+
var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { children: [
|
|
8473
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
8474
|
+
import_material71.Avatar,
|
|
8450
8475
|
{
|
|
8451
8476
|
src: user.profile_picture,
|
|
8452
8477
|
alt: "user_avatar",
|
|
8453
8478
|
style: { width: avatarProps.width, height: avatarProps.height }
|
|
8454
8479
|
}
|
|
8455
8480
|
),
|
|
8456
|
-
/* @__PURE__ */ (0,
|
|
8457
|
-
/* @__PURE__ */ (0,
|
|
8458
|
-
/* @__PURE__ */ (0,
|
|
8481
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { style: { paddingTop: 16 }, children: [
|
|
8482
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material71.Typography, { ...typographyProps.name, children: `${user.first_name} ${user.last_name}` }),
|
|
8483
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material71.Typography, { ...typographyProps.username, children: user.username })
|
|
8459
8484
|
] })
|
|
8460
8485
|
] });
|
|
8461
8486
|
var UserBust_default = (0, import_react41.memo)(UserBust);
|
|
8462
8487
|
|
|
8463
8488
|
// src/components/icons/IconChart.tsx
|
|
8464
|
-
var
|
|
8489
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
8465
8490
|
var SvgIconChart = (props) => {
|
|
8466
8491
|
const { fill } = props;
|
|
8467
|
-
return /* @__PURE__ */ (0,
|
|
8492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
8468
8493
|
"svg",
|
|
8469
8494
|
{
|
|
8470
8495
|
width: "20",
|
|
@@ -8473,7 +8498,7 @@ var SvgIconChart = (props) => {
|
|
|
8473
8498
|
fill: "none",
|
|
8474
8499
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8475
8500
|
...props,
|
|
8476
|
-
children: /* @__PURE__ */ (0,
|
|
8501
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
8477
8502
|
"path",
|
|
8478
8503
|
{
|
|
8479
8504
|
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",
|
|
@@ -8553,7 +8578,6 @@ var IconChart_default = SvgIconChart;
|
|
|
8553
8578
|
Table,
|
|
8554
8579
|
TableDesktop,
|
|
8555
8580
|
TableDesktopFooter,
|
|
8556
|
-
TableDesktopRowActions,
|
|
8557
8581
|
TableDesktopRowCell,
|
|
8558
8582
|
TableDesktopSmartSelect,
|
|
8559
8583
|
TableEmptyResult,
|