@natoora-libs/core 0.1.13-dev-doug-3 → 0.1.13-dev-doug-4
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.
|
@@ -6910,7 +6910,7 @@ var SmartTableHeader = ({
|
|
|
6910
6910
|
flexDirection: "row",
|
|
6911
6911
|
gap: headCell.disableSort ? 1 : 0,
|
|
6912
6912
|
children: [
|
|
6913
|
-
headCell.disableSort ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_material58.Typography, { variant: "subtitle2", mt: 0.25, fontWeight: 600, children: headCell.label }) : /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
6913
|
+
headCell.disableSort ? headCell.RenderHeader ?? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_material58.Tooltip, { title: headCell.labelTooltip ?? "", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_material58.Typography, { variant: "subtitle2", mt: 0.25, fontWeight: 600, children: headCell.label }) }) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_material58.Tooltip, { title: headCell.labelTooltip ?? "", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
6914
6914
|
import_material58.TableSortLabel,
|
|
6915
6915
|
{
|
|
6916
6916
|
"data-testid": "table-sort-label",
|
|
@@ -6922,7 +6922,7 @@ var SmartTableHeader = ({
|
|
|
6922
6922
|
orderBy === headCell.id ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: classes.visuallyHidden, children: order === "desc" ? "sorted descending" : "sorted ascending" }) : null
|
|
6923
6923
|
]
|
|
6924
6924
|
}
|
|
6925
|
-
),
|
|
6925
|
+
) }),
|
|
6926
6926
|
headCell.refetchFilterOptions ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
6927
6927
|
SmartTableHeaderFilterMenu_default,
|
|
6928
6928
|
{
|
|
@@ -6943,39 +6943,10 @@ var SmartTableHeader = ({
|
|
|
6943
6943
|
};
|
|
6944
6944
|
var SmartTableHeader_default = (0, import_react32.memo)(SmartTableHeader);
|
|
6945
6945
|
|
|
6946
|
-
// src/components/TableDesktopNoColumnsMessage/TableDesktopNoColumnsMessage.tsx
|
|
6947
|
-
var import_TableBody = __toESM(require("@mui/material/TableBody"), 1);
|
|
6948
|
-
var import_TableCell = __toESM(require("@mui/material/TableCell"), 1);
|
|
6949
|
-
var import_TableRow = __toESM(require("@mui/material/TableRow"), 1);
|
|
6950
|
-
var import_Typography = __toESM(require("@mui/material/Typography"), 1);
|
|
6951
|
-
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
6952
|
-
var TableDesktopNoColumnsMessage = () => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_TableBody.default, { children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_TableRow.default, { children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
6953
|
-
import_TableCell.default,
|
|
6954
|
-
{
|
|
6955
|
-
sx: {
|
|
6956
|
-
py: 8,
|
|
6957
|
-
gap: 2,
|
|
6958
|
-
borderBottom: "none",
|
|
6959
|
-
display: "flex",
|
|
6960
|
-
flexDirection: "column",
|
|
6961
|
-
justifyContent: "center",
|
|
6962
|
-
alignItems: "center"
|
|
6963
|
-
},
|
|
6964
|
-
children: [
|
|
6965
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_Typography.default, { variant: "subtitle2", fontSize: 16, children: "Customise your view" }),
|
|
6966
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_Typography.default, { variant: "subtitle1", align: "center", color: "textSecondary", children: [
|
|
6967
|
-
"Use the column selector on the right to choose which fields",
|
|
6968
|
-
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("br", {}),
|
|
6969
|
-
"you want to display in the table"
|
|
6970
|
-
] })
|
|
6971
|
-
]
|
|
6972
|
-
}
|
|
6973
|
-
) }) });
|
|
6974
|
-
|
|
6975
6946
|
// src/components/TableEmptyResult/TableEmptyResult.tsx
|
|
6976
6947
|
var import_material59 = require("@mui/material");
|
|
6977
6948
|
var import_mui53 = require("tss-react/mui");
|
|
6978
|
-
var
|
|
6949
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
6979
6950
|
var useStyles47 = (0, import_mui53.makeStyles)()(() => ({
|
|
6980
6951
|
tableCellIcon: { padding: 24, height: "calc(100vh - 320px)" },
|
|
6981
6952
|
tableCellDefault: { padding: 24 }
|
|
@@ -6987,17 +6958,17 @@ var TableEmptyResult = ({
|
|
|
6987
6958
|
}
|
|
6988
6959
|
}) => {
|
|
6989
6960
|
const { classes } = useStyles47();
|
|
6990
|
-
return showClearFilterButton ? /* @__PURE__ */ (0,
|
|
6961
|
+
return showClearFilterButton ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material59.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
6991
6962
|
import_material59.TableCell,
|
|
6992
6963
|
{
|
|
6993
6964
|
className: classes.tableCellIcon,
|
|
6994
6965
|
colSpan,
|
|
6995
6966
|
align: "center",
|
|
6996
6967
|
children: [
|
|
6997
|
-
/* @__PURE__ */ (0,
|
|
6998
|
-
/* @__PURE__ */ (0,
|
|
6999
|
-
/* @__PURE__ */ (0,
|
|
7000
|
-
/* @__PURE__ */ (0,
|
|
6968
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(EmptyGlassIcon_default, {}),
|
|
6969
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material59.Typography, { variant: "h6", children: "No results found." }),
|
|
6970
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material59.Typography, { variant: "subtitle1", children: "Search without applied filters?" }),
|
|
6971
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7001
6972
|
FilledButton_default,
|
|
7002
6973
|
{
|
|
7003
6974
|
copy: "Search",
|
|
@@ -7008,7 +6979,7 @@ var TableEmptyResult = ({
|
|
|
7008
6979
|
)
|
|
7009
6980
|
]
|
|
7010
6981
|
}
|
|
7011
|
-
) }) : /* @__PURE__ */ (0,
|
|
6982
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_material59.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
7012
6983
|
import_material59.TableCell,
|
|
7013
6984
|
{
|
|
7014
6985
|
className: classes.tableCellDefault,
|
|
@@ -7021,7 +6992,7 @@ var TableEmptyResult = ({
|
|
|
7021
6992
|
var TableEmptyResult_default = TableEmptyResult;
|
|
7022
6993
|
|
|
7023
6994
|
// src/components/TableDesktop/TableDesktop.tsx
|
|
7024
|
-
var
|
|
6995
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
7025
6996
|
var ROW_HEIGHT = 56;
|
|
7026
6997
|
var useStyles48 = (0, import_mui54.makeStyles)()((theme) => ({
|
|
7027
6998
|
root: {
|
|
@@ -7160,7 +7131,7 @@ var TableDesktop = ({
|
|
|
7160
7131
|
);
|
|
7161
7132
|
const renderTableRows = (0, import_react33.useMemo)(() => {
|
|
7162
7133
|
if (isLoading) {
|
|
7163
|
-
return [...Array(Math.min(numRows, rowsPerPage))].map((_, rowIndex) => /* @__PURE__ */ (0,
|
|
7134
|
+
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)(
|
|
7164
7135
|
import_material60.Skeleton,
|
|
7165
7136
|
{
|
|
7166
7137
|
animation: "pulse",
|
|
@@ -7174,7 +7145,7 @@ var TableDesktop = ({
|
|
|
7174
7145
|
const sortedData = disableInternalSort ? data : stableSort(data, getComparator(order, orderBy));
|
|
7175
7146
|
return sortedData.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((row, index) => {
|
|
7176
7147
|
const isItemSelected = selected.has(row[keyField]);
|
|
7177
|
-
return /* @__PURE__ */ (0,
|
|
7148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
7178
7149
|
RenderItem,
|
|
7179
7150
|
{
|
|
7180
7151
|
...{
|
|
@@ -7214,16 +7185,16 @@ var TableDesktop = ({
|
|
|
7214
7185
|
setSelected(/* @__PURE__ */ new Set());
|
|
7215
7186
|
}
|
|
7216
7187
|
}, [enableCheckboxSelection]);
|
|
7217
|
-
return /* @__PURE__ */ (0,
|
|
7218
|
-
/* @__PURE__ */ (0,
|
|
7188
|
+
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: [
|
|
7189
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material60.TableContainer, { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
7219
7190
|
import_material60.Table,
|
|
7220
7191
|
{
|
|
7221
7192
|
stickyHeader: true,
|
|
7222
7193
|
"aria-labelledby": "tableTitle",
|
|
7223
7194
|
"aria-label": "sticky table",
|
|
7224
7195
|
style: { tableLayout },
|
|
7225
|
-
children:
|
|
7226
|
-
/* @__PURE__ */ (0,
|
|
7196
|
+
children: [
|
|
7197
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
7227
7198
|
SmartTableHeader_default,
|
|
7228
7199
|
{
|
|
7229
7200
|
headCells: visibleHeadCells,
|
|
@@ -7239,7 +7210,7 @@ var TableDesktop = ({
|
|
|
7239
7210
|
shouldShowCheckOnFilter
|
|
7240
7211
|
}
|
|
7241
7212
|
),
|
|
7242
|
-
/* @__PURE__ */ (0,
|
|
7213
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material60.TableBody, { children: rowsPerPage !== emptyRows ? renderTableRows : /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
7243
7214
|
TableEmptyResult_default,
|
|
7244
7215
|
{
|
|
7245
7216
|
colSpan: enableCheckboxSelection ? visibleHeadCells.length + 1 : visibleHeadCells.length,
|
|
@@ -7247,7 +7218,7 @@ var TableDesktop = ({
|
|
|
7247
7218
|
handleClickOnClearFiltersButton
|
|
7248
7219
|
}
|
|
7249
7220
|
) })
|
|
7250
|
-
]
|
|
7221
|
+
]
|
|
7251
7222
|
}
|
|
7252
7223
|
) }),
|
|
7253
7224
|
children
|
|
@@ -7256,7 +7227,7 @@ var TableDesktop = ({
|
|
|
7256
7227
|
var TableDesktop_default = TableDesktop;
|
|
7257
7228
|
|
|
7258
7229
|
// src/components/SmartTableHeaderFilterMenu/SmartTableHeaderFilterMenu.tsx
|
|
7259
|
-
var
|
|
7230
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
7260
7231
|
var useStyles49 = (0, import_mui55.makeStyles)()((theme) => ({
|
|
7261
7232
|
filterMenu: {
|
|
7262
7233
|
display: "flex",
|
|
@@ -7368,18 +7339,18 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
7368
7339
|
const isOptionChecked = (0, import_react34.useMemo)(() => (resolvedOption) => !!selectedFilters?.some(
|
|
7369
7340
|
(value) => resolveOptionType(value, headCell.fieldName ?? "") === resolvedOption
|
|
7370
7341
|
), [selectedFilters]);
|
|
7371
|
-
const loadingSkeletons = /* @__PURE__ */ (0,
|
|
7372
|
-
/* @__PURE__ */ (0,
|
|
7373
|
-
/* @__PURE__ */ (0,
|
|
7374
|
-
/* @__PURE__ */ (0,
|
|
7375
|
-
/* @__PURE__ */ (0,
|
|
7376
|
-
/* @__PURE__ */ (0,
|
|
7377
|
-
/* @__PURE__ */ (0,
|
|
7378
|
-
/* @__PURE__ */ (0,
|
|
7379
|
-
/* @__PURE__ */ (0,
|
|
7342
|
+
const loadingSkeletons = /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_material61.Box, { "data-testid": "loading-skeletons", width: 272, children: [
|
|
7343
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material61.Skeleton, { variant: "rounded", className: classes.skeleton }),
|
|
7344
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material61.Divider, {}),
|
|
7345
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material61.Skeleton, { variant: "rounded", className: classes.skeleton }),
|
|
7346
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material61.Skeleton, { variant: "rounded", className: classes.skeleton }),
|
|
7347
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material61.Skeleton, { variant: "rounded", className: classes.skeleton }),
|
|
7348
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material61.Skeleton, { variant: "rounded", className: classes.skeleton }),
|
|
7349
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material61.Divider, {}),
|
|
7350
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material61.Skeleton, { variant: "rounded", className: classes.skeleton })
|
|
7380
7351
|
] });
|
|
7381
|
-
return /* @__PURE__ */ (0,
|
|
7382
|
-
/* @__PURE__ */ (0,
|
|
7352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_jsx_runtime112.Fragment, { children: [
|
|
7353
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
7383
7354
|
ActiveFiltersIconButton_default,
|
|
7384
7355
|
{
|
|
7385
7356
|
numActiveFilters,
|
|
@@ -7389,7 +7360,7 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
7389
7360
|
})
|
|
7390
7361
|
}
|
|
7391
7362
|
),
|
|
7392
|
-
/* @__PURE__ */ (0,
|
|
7363
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
7393
7364
|
import_material61.Menu,
|
|
7394
7365
|
{
|
|
7395
7366
|
open: !!anchorEl,
|
|
@@ -7398,12 +7369,12 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
7398
7369
|
"data-testid": "filter-menu",
|
|
7399
7370
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
7400
7371
|
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
7401
|
-
children: headCell.isFetchingFilterOptions ? loadingSkeletons : /* @__PURE__ */ (0,
|
|
7402
|
-
/* @__PURE__ */ (0,
|
|
7372
|
+
children: headCell.isFetchingFilterOptions ? loadingSkeletons : /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_material61.Box, { className: classes.filterMenu, children: [
|
|
7373
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material61.Box, { px: 3, mb: 0.5, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
7403
7374
|
import_material61.FormControlLabel,
|
|
7404
7375
|
{
|
|
7405
7376
|
label: "Select All",
|
|
7406
|
-
control: /* @__PURE__ */ (0,
|
|
7377
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
7407
7378
|
import_material61.Checkbox,
|
|
7408
7379
|
{
|
|
7409
7380
|
disableRipple: true,
|
|
@@ -7420,20 +7391,20 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
7420
7391
|
)
|
|
7421
7392
|
}
|
|
7422
7393
|
) }),
|
|
7423
|
-
/* @__PURE__ */ (0,
|
|
7424
|
-
/* @__PURE__ */ (0,
|
|
7394
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material61.Divider, { sx: { mb: 0.5 } }),
|
|
7395
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material61.Box, { className: classes.filterOptions, children: filterOptionsData?.map(
|
|
7425
7396
|
(option) => {
|
|
7426
7397
|
const resolvedOption = resolveOptionType(option, headCell.fieldName ?? "");
|
|
7427
|
-
return /* @__PURE__ */ (0,
|
|
7398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
7428
7399
|
import_material61.Box,
|
|
7429
7400
|
{
|
|
7430
7401
|
className: classes.filter,
|
|
7431
7402
|
children: [
|
|
7432
|
-
/* @__PURE__ */ (0,
|
|
7403
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
7433
7404
|
import_material61.FormControlLabel,
|
|
7434
7405
|
{
|
|
7435
7406
|
label: resolvedOption,
|
|
7436
|
-
control: /* @__PURE__ */ (0,
|
|
7407
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
7437
7408
|
import_material61.Checkbox,
|
|
7438
7409
|
{
|
|
7439
7410
|
disableRipple: true,
|
|
@@ -7444,16 +7415,16 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
7444
7415
|
},
|
|
7445
7416
|
resolvedOption
|
|
7446
7417
|
),
|
|
7447
|
-
shouldShowCheckOnFilter?.(headCell.id, option) ? /* @__PURE__ */ (0,
|
|
7418
|
+
shouldShowCheckOnFilter?.(headCell.id, option) ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material61.Tooltip, { title: "This filter is saved as default", children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_Check.default, { fontSize: "small", color: "action" }) }) : null
|
|
7448
7419
|
]
|
|
7449
7420
|
},
|
|
7450
7421
|
resolvedOption
|
|
7451
7422
|
);
|
|
7452
7423
|
}
|
|
7453
7424
|
) }),
|
|
7454
|
-
/* @__PURE__ */ (0,
|
|
7455
|
-
/* @__PURE__ */ (0,
|
|
7456
|
-
/* @__PURE__ */ (0,
|
|
7425
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_material61.Divider, { sx: { mb: 0.5 } }),
|
|
7426
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_material61.Box, { className: classes.applyFilterButtonsContainer, children: [
|
|
7427
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
7457
7428
|
ExtendedButton_default,
|
|
7458
7429
|
{
|
|
7459
7430
|
copy: "Save as Default",
|
|
@@ -7464,7 +7435,7 @@ var SmartTableHeaderFilterMenu = ({
|
|
|
7464
7435
|
onClick: () => handleApplyFilters(true)
|
|
7465
7436
|
}
|
|
7466
7437
|
),
|
|
7467
|
-
/* @__PURE__ */ (0,
|
|
7438
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
7468
7439
|
ExtendedButton_default,
|
|
7469
7440
|
{
|
|
7470
7441
|
copy: "Apply",
|
|
@@ -7490,11 +7461,11 @@ var import_uuid = require("uuid");
|
|
|
7490
7461
|
|
|
7491
7462
|
// src/components/TableLoading/TableLoading.tsx
|
|
7492
7463
|
var import_material62 = require("@mui/material");
|
|
7493
|
-
var
|
|
7464
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
7494
7465
|
var TableLoading = ({
|
|
7495
7466
|
rowsPerPage,
|
|
7496
7467
|
rowHeight
|
|
7497
|
-
}) => /* @__PURE__ */ (0,
|
|
7468
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_material62.Box, { children: Array.from({ length: rowsPerPage ?? 0 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
7498
7469
|
import_material62.Skeleton,
|
|
7499
7470
|
{
|
|
7500
7471
|
animation: "pulse",
|
|
@@ -7543,7 +7514,7 @@ function calculateRowsPerPage(rowHeight) {
|
|
|
7543
7514
|
}
|
|
7544
7515
|
|
|
7545
7516
|
// src/components/Table/Table.tsx
|
|
7546
|
-
var
|
|
7517
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
7547
7518
|
var useStyles50 = (0, import_mui56.makeStyles)()(() => ({
|
|
7548
7519
|
root: {
|
|
7549
7520
|
height: "calc(100vh - 262px)",
|
|
@@ -7621,24 +7592,24 @@ var Table2 = ({
|
|
|
7621
7592
|
);
|
|
7622
7593
|
const rowsComponents = rows.map((row) => {
|
|
7623
7594
|
if (RenderItem) {
|
|
7624
|
-
return /* @__PURE__ */ (0,
|
|
7595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(RenderItem, { ...row }, row.id);
|
|
7625
7596
|
}
|
|
7626
|
-
return /* @__PURE__ */ (0,
|
|
7597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material63.TableRow, { hover: true, onClick: () => onRowClick?.(row), children: headCells?.map((column) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material63.TableCell, { children: row[column.id] }, column.id)) }, row.id);
|
|
7627
7598
|
});
|
|
7628
7599
|
if (emptyRows > 0 && rowsPerPage > emptyRows) {
|
|
7629
7600
|
rowsComponents.push(
|
|
7630
|
-
/* @__PURE__ */ (0,
|
|
7601
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material63.TableRow, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material63.TableCell, { colSpan: 8 }) }, (0, import_uuid.v4)())
|
|
7631
7602
|
);
|
|
7632
7603
|
}
|
|
7633
7604
|
return rowsComponents;
|
|
7634
7605
|
};
|
|
7635
|
-
return /* @__PURE__ */ (0,
|
|
7636
|
-
/* @__PURE__ */ (0,
|
|
7606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material63.Paper, { className: classes.root, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material63.Box, { className: classes.paper, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(TableLoading_default, { rowHeight, rowsPerPage }) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material63.TableContainer, { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_material63.Table, { size: "medium", stickyHeader: true, children: [
|
|
7607
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material63.TableHead, { className: classes.header, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material63.TableRow, { children: headCells?.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
7637
7608
|
import_material63.TableCell,
|
|
7638
7609
|
{
|
|
7639
7610
|
align: "left",
|
|
7640
7611
|
sortDirection: orderBy === headCell.id ? order : void 0,
|
|
7641
|
-
children: /* @__PURE__ */ (0,
|
|
7612
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
7642
7613
|
import_material63.TableSortLabel,
|
|
7643
7614
|
{
|
|
7644
7615
|
active: orderBy === headCell.id,
|
|
@@ -7650,9 +7621,9 @@ var Table2 = ({
|
|
|
7650
7621
|
},
|
|
7651
7622
|
headCell.id
|
|
7652
7623
|
)) }) }),
|
|
7653
|
-
/* @__PURE__ */ (0,
|
|
7624
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_material63.TableBody, { children: [
|
|
7654
7625
|
getTableRows(),
|
|
7655
|
-
rowsPerPage === emptyRows && /* @__PURE__ */ (0,
|
|
7626
|
+
rowsPerPage === emptyRows && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material63.TableRow, { style: { height: rowHeight * emptyRows }, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material63.TableCell, { colSpan: 8, align: "center", children: "Nothing to display" }) })
|
|
7656
7627
|
] })
|
|
7657
7628
|
] }) }) }) });
|
|
7658
7629
|
};
|
|
@@ -7661,7 +7632,7 @@ var Table_default = Table2;
|
|
|
7661
7632
|
// src/components/TableDesktopFooter/TableDesktopFooter.tsx
|
|
7662
7633
|
var import_Refresh = __toESM(require("@mui/icons-material/Refresh"), 1);
|
|
7663
7634
|
var import_material64 = require("@mui/material");
|
|
7664
|
-
var
|
|
7635
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
7665
7636
|
var TableDesktopFooter = ({
|
|
7666
7637
|
numPages,
|
|
7667
7638
|
page,
|
|
@@ -7672,7 +7643,7 @@ var TableDesktopFooter = ({
|
|
|
7672
7643
|
refetch,
|
|
7673
7644
|
isFetching
|
|
7674
7645
|
}) => {
|
|
7675
|
-
return /* @__PURE__ */ (0,
|
|
7646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
7676
7647
|
import_material64.Box,
|
|
7677
7648
|
{
|
|
7678
7649
|
py: 1,
|
|
@@ -7683,7 +7654,7 @@ var TableDesktopFooter = ({
|
|
|
7683
7654
|
borderTop: `1px solid ${colors.neutral300}`,
|
|
7684
7655
|
bgcolor: (theme) => theme.palette.background.default,
|
|
7685
7656
|
children: [
|
|
7686
|
-
/* @__PURE__ */ (0,
|
|
7657
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
7687
7658
|
import_material64.Button,
|
|
7688
7659
|
{
|
|
7689
7660
|
disableRipple: true,
|
|
@@ -7698,7 +7669,7 @@ var TableDesktopFooter = ({
|
|
|
7698
7669
|
borderColor: colors.neutral600
|
|
7699
7670
|
},
|
|
7700
7671
|
children: [
|
|
7701
|
-
/* @__PURE__ */ (0,
|
|
7672
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
7702
7673
|
import_Refresh.default,
|
|
7703
7674
|
{
|
|
7704
7675
|
fontSize: "small",
|
|
@@ -7709,21 +7680,21 @@ var TableDesktopFooter = ({
|
|
|
7709
7680
|
]
|
|
7710
7681
|
}
|
|
7711
7682
|
),
|
|
7712
|
-
/* @__PURE__ */ (0,
|
|
7713
|
-
/* @__PURE__ */ (0,
|
|
7714
|
-
/* @__PURE__ */ (0,
|
|
7715
|
-
/* @__PURE__ */ (0,
|
|
7683
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(import_material64.Box, { display: "flex", children: [
|
|
7684
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(import_material64.Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
|
|
7685
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material64.Typography, { children: "Rows per page:" }),
|
|
7686
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
7716
7687
|
import_material64.Select,
|
|
7717
7688
|
{
|
|
7718
7689
|
value: pageSize,
|
|
7719
7690
|
onChange: handlePageSizeChange,
|
|
7720
7691
|
size: "small",
|
|
7721
7692
|
variant: "standard",
|
|
7722
|
-
children: pageSizeOptions.map((size) => /* @__PURE__ */ (0,
|
|
7693
|
+
children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_material64.MenuItem, { value: size, children: size }, size))
|
|
7723
7694
|
}
|
|
7724
7695
|
)
|
|
7725
7696
|
] }),
|
|
7726
|
-
/* @__PURE__ */ (0,
|
|
7697
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
7727
7698
|
import_material64.Pagination,
|
|
7728
7699
|
{
|
|
7729
7700
|
color: "standard",
|
|
@@ -7740,11 +7711,14 @@ var TableDesktopFooter = ({
|
|
|
7740
7711
|
|
|
7741
7712
|
// src/components/TableDesktopRowCell/TableDesktopRowCell.tsx
|
|
7742
7713
|
var import_react38 = require("react");
|
|
7743
|
-
var
|
|
7714
|
+
var import_Check2 = __toESM(require("@mui/icons-material/Check"), 1);
|
|
7715
|
+
var import_Close = __toESM(require("@mui/icons-material/Close"), 1);
|
|
7716
|
+
var import_Edit = __toESM(require("@mui/icons-material/Edit"), 1);
|
|
7717
|
+
var import_material66 = require("@mui/material");
|
|
7744
7718
|
|
|
7745
7719
|
// src/components/TableDesktopRowCell/TableDesktopSmartSelect.tsx
|
|
7746
7720
|
var import_react36 = require("react");
|
|
7747
|
-
var
|
|
7721
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
7748
7722
|
var resolveValue = (value) => {
|
|
7749
7723
|
if (typeof value === "string") {
|
|
7750
7724
|
return value;
|
|
@@ -7776,7 +7750,7 @@ var TableDesktopSmartSelect = (0, import_react36.memo)(({
|
|
|
7776
7750
|
setOptions(parsedOptions);
|
|
7777
7751
|
}
|
|
7778
7752
|
}, [filterOptions]);
|
|
7779
|
-
return /* @__PURE__ */ (0,
|
|
7753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
7780
7754
|
SmartSelect_default,
|
|
7781
7755
|
{
|
|
7782
7756
|
ref,
|
|
@@ -7798,13 +7772,10 @@ var TableDesktopSmartSelect = (0, import_react36.memo)(({
|
|
|
7798
7772
|
);
|
|
7799
7773
|
});
|
|
7800
7774
|
|
|
7801
|
-
// src/components/TableDesktopRowCell/TableDesktopRowCell.tsx
|
|
7802
|
-
var import_Check2 = __toESM(require("@mui/icons-material/Check"), 1);
|
|
7803
|
-
|
|
7804
7775
|
// src/components/TableDesktopRowCell/TableDesktopTextField.tsx
|
|
7805
|
-
var import_TextField = __toESM(require("@mui/material/TextField"), 1);
|
|
7806
7776
|
var import_react37 = require("react");
|
|
7807
|
-
var
|
|
7777
|
+
var import_material65 = require("@mui/material");
|
|
7778
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
7808
7779
|
var TableDesktopTextField = ({
|
|
7809
7780
|
rowId,
|
|
7810
7781
|
editInitialValue,
|
|
@@ -7813,34 +7784,54 @@ var TableDesktopTextField = ({
|
|
|
7813
7784
|
validateInput,
|
|
7814
7785
|
onUpdateEditableCell
|
|
7815
7786
|
}) => {
|
|
7816
|
-
const [
|
|
7817
|
-
const
|
|
7818
|
-
|
|
7819
|
-
|
|
7787
|
+
const [input, setInput] = (0, import_react37.useState)(editInitialValue);
|
|
7788
|
+
const hasValidationError = (0, import_react37.useMemo)(() => !validateInput?.(input), [input, validateInput]);
|
|
7789
|
+
const commitValue = (value) => {
|
|
7790
|
+
if (hasValidationError) {
|
|
7791
|
+
return;
|
|
7792
|
+
}
|
|
7793
|
+
onUpdateEditableCell?.(rowId, value);
|
|
7794
|
+
};
|
|
7795
|
+
const handleKeyDown = (e) => {
|
|
7796
|
+
if (e.key === "Enter") {
|
|
7797
|
+
e.preventDefault();
|
|
7798
|
+
commitValue(input);
|
|
7799
|
+
}
|
|
7800
|
+
};
|
|
7801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
7802
|
+
import_material65.TextField,
|
|
7820
7803
|
{
|
|
7821
7804
|
fullWidth: true,
|
|
7822
7805
|
variant: "standard",
|
|
7823
|
-
|
|
7806
|
+
value: input,
|
|
7824
7807
|
label: inputLabel,
|
|
7825
|
-
error:
|
|
7808
|
+
error: hasValidationError,
|
|
7826
7809
|
disabled,
|
|
7827
|
-
|
|
7828
|
-
|
|
7810
|
+
onKeyDown: handleKeyDown,
|
|
7811
|
+
onChange: ({ target: { value } }) => {
|
|
7812
|
+
setInput(value);
|
|
7829
7813
|
},
|
|
7830
|
-
onBlur: ({ target: { value
|
|
7831
|
-
|
|
7832
|
-
return;
|
|
7833
|
-
}
|
|
7834
|
-
onUpdateEditableCell?.(rowId, value2);
|
|
7814
|
+
onBlur: ({ target: { value } }) => {
|
|
7815
|
+
commitValue(value);
|
|
7835
7816
|
}
|
|
7836
7817
|
}
|
|
7837
7818
|
);
|
|
7838
7819
|
};
|
|
7839
7820
|
|
|
7840
7821
|
// src/components/TableDesktopRowCell/TableDesktopRowCell.tsx
|
|
7841
|
-
var
|
|
7842
|
-
var
|
|
7843
|
-
|
|
7822
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
7823
|
+
var getReadOnlyBooleanIcon = (value) => {
|
|
7824
|
+
if (value) {
|
|
7825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_Check2.default, { sx: { fontSize: 16 } });
|
|
7826
|
+
}
|
|
7827
|
+
return "-";
|
|
7828
|
+
};
|
|
7829
|
+
var renderReadOnlyValue = (value) => {
|
|
7830
|
+
if (typeof value === "boolean") {
|
|
7831
|
+
return getReadOnlyBooleanIcon(value);
|
|
7832
|
+
}
|
|
7833
|
+
return value;
|
|
7834
|
+
};
|
|
7844
7835
|
var TableDesktopRowCell = ({
|
|
7845
7836
|
inputLabel,
|
|
7846
7837
|
editInitialValue,
|
|
@@ -7881,7 +7872,7 @@ var TableDesktopRowCell = ({
|
|
|
7881
7872
|
};
|
|
7882
7873
|
}, [isEditMode]);
|
|
7883
7874
|
const editableComponents = {
|
|
7884
|
-
"select": /* @__PURE__ */ (0,
|
|
7875
|
+
"select": /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
7885
7876
|
TableDesktopSmartSelect,
|
|
7886
7877
|
{
|
|
7887
7878
|
rowId,
|
|
@@ -7895,8 +7886,8 @@ var TableDesktopRowCell = ({
|
|
|
7895
7886
|
onUpdateEditableCell
|
|
7896
7887
|
}
|
|
7897
7888
|
),
|
|
7898
|
-
"checkbox": /* @__PURE__ */ (0,
|
|
7899
|
-
|
|
7889
|
+
"checkbox": /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
7890
|
+
import_material66.Checkbox,
|
|
7900
7891
|
{
|
|
7901
7892
|
disableRipple: true,
|
|
7902
7893
|
disabled,
|
|
@@ -7906,7 +7897,7 @@ var TableDesktopRowCell = ({
|
|
|
7906
7897
|
}
|
|
7907
7898
|
}
|
|
7908
7899
|
),
|
|
7909
|
-
"text": /* @__PURE__ */ (0,
|
|
7900
|
+
"text": /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
7910
7901
|
TableDesktopTextField,
|
|
7911
7902
|
{
|
|
7912
7903
|
rowId,
|
|
@@ -7917,8 +7908,8 @@ var TableDesktopRowCell = ({
|
|
|
7917
7908
|
onUpdateEditableCell
|
|
7918
7909
|
}
|
|
7919
7910
|
),
|
|
7920
|
-
"numeric": /* @__PURE__ */ (0,
|
|
7921
|
-
|
|
7911
|
+
"numeric": /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
7912
|
+
import_material66.TextField,
|
|
7922
7913
|
{
|
|
7923
7914
|
fullWidth: true,
|
|
7924
7915
|
variant: "standard",
|
|
@@ -7939,18 +7930,12 @@ var TableDesktopRowCell = ({
|
|
|
7939
7930
|
}
|
|
7940
7931
|
)
|
|
7941
7932
|
};
|
|
7942
|
-
const getReadOnlyBooleanIcon = (value) => {
|
|
7943
|
-
if (value) {
|
|
7944
|
-
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_Check2.default, { sx: { fontSize: 16 } });
|
|
7945
|
-
}
|
|
7946
|
-
return "-";
|
|
7947
|
-
};
|
|
7948
7933
|
const handleEditClick = (e) => {
|
|
7949
7934
|
e.stopPropagation();
|
|
7950
7935
|
setIsEditMode((prev) => !prev);
|
|
7951
7936
|
};
|
|
7952
|
-
return /* @__PURE__ */ (0,
|
|
7953
|
-
|
|
7937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material66.Tooltip, { title: isOverflowed ? String(readOnlyValue) : "", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
7938
|
+
import_material66.TableCell,
|
|
7954
7939
|
{
|
|
7955
7940
|
align: "left",
|
|
7956
7941
|
onMouseEnter: () => editableCellType && !disabled && setIsCellHovered(true),
|
|
@@ -7967,8 +7952,8 @@ var TableDesktopRowCell = ({
|
|
|
7967
7952
|
},
|
|
7968
7953
|
background: isEditMode ? colors.lightBlueBackground : (theme) => theme.palette.background.default
|
|
7969
7954
|
},
|
|
7970
|
-
children: /* @__PURE__ */ (0,
|
|
7971
|
-
|
|
7955
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
7956
|
+
import_material66.Box,
|
|
7972
7957
|
{
|
|
7973
7958
|
p: 1,
|
|
7974
7959
|
ref: cellRef,
|
|
@@ -7976,8 +7961,8 @@ var TableDesktopRowCell = ({
|
|
|
7976
7961
|
textOverflow: "ellipsis",
|
|
7977
7962
|
whiteSpace: "nowrap",
|
|
7978
7963
|
children: [
|
|
7979
|
-
isCellHovered ? /* @__PURE__ */ (0,
|
|
7980
|
-
|
|
7964
|
+
isCellHovered ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material66.Tooltip, { title: isEditMode ? "" : "Toggle Edit Mode", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
7965
|
+
import_material66.IconButton,
|
|
7981
7966
|
{
|
|
7982
7967
|
onClick: handleEditClick,
|
|
7983
7968
|
sx: {
|
|
@@ -7991,10 +7976,10 @@ var TableDesktopRowCell = ({
|
|
|
7991
7976
|
backgroundColor: isEditMode ? colors.lightBlueBackground : colors.neutral150
|
|
7992
7977
|
}
|
|
7993
7978
|
},
|
|
7994
|
-
children: isEditMode ? /* @__PURE__ */ (0,
|
|
7979
|
+
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" })
|
|
7995
7980
|
}
|
|
7996
7981
|
) }) : null,
|
|
7997
|
-
isEditMode && editableCellType ? editableComponents[editableCellType] :
|
|
7982
|
+
isEditMode && editableCellType ? editableComponents[editableCellType] : renderReadOnlyValue(readOnlyValue)
|
|
7998
7983
|
]
|
|
7999
7984
|
}
|
|
8000
7985
|
)
|
|
@@ -8005,9 +7990,9 @@ var TableDesktopRowCell = ({
|
|
|
8005
7990
|
// src/components/TableHeader/TableHeader.tsx
|
|
8006
7991
|
var import_react39 = require("react");
|
|
8007
7992
|
var import_icons_material12 = require("@mui/icons-material");
|
|
8008
|
-
var
|
|
7993
|
+
var import_material67 = require("@mui/material");
|
|
8009
7994
|
var import_mui57 = require("tss-react/mui");
|
|
8010
|
-
var
|
|
7995
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
8011
7996
|
var useStyles51 = (0, import_mui57.makeStyles)()(() => ({
|
|
8012
7997
|
sortLabel: {
|
|
8013
7998
|
"& .MuiTableSortLabel-icon": {
|
|
@@ -8052,8 +8037,8 @@ var TableHeader = ({ cells, onSort = null }) => {
|
|
|
8052
8037
|
});
|
|
8053
8038
|
setSortableCells(sortedCells);
|
|
8054
8039
|
};
|
|
8055
|
-
return /* @__PURE__ */ (0,
|
|
8056
|
-
|
|
8040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material67.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material67.TableRow, { children: sortableCells.map((cell, key) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_material67.TableCell, { children: cell.isSortable ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
8041
|
+
import_material67.TableSortLabel,
|
|
8057
8042
|
{
|
|
8058
8043
|
className: classes.sortLabel,
|
|
8059
8044
|
direction: cell?.direction || "asc",
|
|
@@ -8066,9 +8051,9 @@ var TableHeader = ({ cells, onSort = null }) => {
|
|
|
8066
8051
|
var TableHeader_default = (0, import_react39.memo)(TableHeader);
|
|
8067
8052
|
|
|
8068
8053
|
// src/components/TextDivider/TextDivider.tsx
|
|
8069
|
-
var
|
|
8054
|
+
var import_material68 = require("@mui/material");
|
|
8070
8055
|
var import_mui58 = require("tss-react/mui");
|
|
8071
|
-
var
|
|
8056
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
8072
8057
|
var useStyles52 = (0, import_mui58.makeStyles)()(() => ({
|
|
8073
8058
|
icon: {
|
|
8074
8059
|
fontSize: 20
|
|
@@ -8105,19 +8090,19 @@ var TextDivider = ({
|
|
|
8105
8090
|
}) => {
|
|
8106
8091
|
const { classes } = useStyles52();
|
|
8107
8092
|
const iconColor = color ?? colors.neutral900;
|
|
8108
|
-
return /* @__PURE__ */ (0,
|
|
8109
|
-
|
|
8093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
8094
|
+
import_material68.Box,
|
|
8110
8095
|
{
|
|
8111
8096
|
display: "flex",
|
|
8112
8097
|
alignItems: "center",
|
|
8113
8098
|
justifyContent: "space-between",
|
|
8114
8099
|
className: classes.container,
|
|
8115
8100
|
children: [
|
|
8116
|
-
/* @__PURE__ */ (0,
|
|
8117
|
-
/* @__PURE__ */ (0,
|
|
8118
|
-
Icon2 && iconPosition === "left" && /* @__PURE__ */ (0,
|
|
8119
|
-
/* @__PURE__ */ (0,
|
|
8120
|
-
|
|
8101
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material68.Divider, { className: classes.leftDivider }),
|
|
8102
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material68.Button, { onClick, disabled: !onClick, className: classes.button, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_material68.Box, { className: classes.center, children: [
|
|
8103
|
+
Icon2 && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Icon2, { className: classes.icon, style: { color: iconColor } }),
|
|
8104
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
8105
|
+
import_material68.Typography,
|
|
8121
8106
|
{
|
|
8122
8107
|
color: "textSecondary",
|
|
8123
8108
|
className: classes.title,
|
|
@@ -8125,9 +8110,9 @@ var TextDivider = ({
|
|
|
8125
8110
|
children: title
|
|
8126
8111
|
}
|
|
8127
8112
|
),
|
|
8128
|
-
Icon2 && iconPosition === "right" && /* @__PURE__ */ (0,
|
|
8113
|
+
Icon2 && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Icon2, { className: classes.icon, style: { color: iconColor } })
|
|
8129
8114
|
] }) }),
|
|
8130
|
-
/* @__PURE__ */ (0,
|
|
8115
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_material68.Divider, { className: classes.rightDivider })
|
|
8131
8116
|
]
|
|
8132
8117
|
}
|
|
8133
8118
|
);
|
|
@@ -8139,7 +8124,7 @@ var import_react_dates = require("react-dates");
|
|
|
8139
8124
|
var import_mui59 = require("tss-react/mui");
|
|
8140
8125
|
var import_initialize = require("react-dates/initialize");
|
|
8141
8126
|
var import_datepicker = require("react-dates/lib/css/_datepicker.css");
|
|
8142
|
-
var
|
|
8127
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
8143
8128
|
var useStyles53 = (0, import_mui59.makeStyles)()((theme) => ({
|
|
8144
8129
|
wrapper: {
|
|
8145
8130
|
"& .DateRangePicker": {
|
|
@@ -8235,15 +8220,15 @@ var ThemedDateRangePicker = ({
|
|
|
8235
8220
|
...props
|
|
8236
8221
|
}) => {
|
|
8237
8222
|
const { classes, cx } = useStyles53();
|
|
8238
|
-
return /* @__PURE__ */ (0,
|
|
8223
|
+
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 }) });
|
|
8239
8224
|
};
|
|
8240
8225
|
var ThemedDateRangePicker_default = ThemedDateRangePicker;
|
|
8241
8226
|
|
|
8242
8227
|
// src/components/TheToolbar/TheToolbar.tsx
|
|
8243
8228
|
var import_react40 = require("react");
|
|
8244
|
-
var
|
|
8229
|
+
var import_material69 = require("@mui/material");
|
|
8245
8230
|
var import_mui60 = require("tss-react/mui");
|
|
8246
|
-
var
|
|
8231
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
8247
8232
|
var useStyles54 = (0, import_mui60.makeStyles)()((theme) => ({
|
|
8248
8233
|
menuButton: {
|
|
8249
8234
|
color: theme.palette.primary.contrastText
|
|
@@ -8263,9 +8248,9 @@ var TheToolbar = ({
|
|
|
8263
8248
|
rightSection
|
|
8264
8249
|
}) => {
|
|
8265
8250
|
const { classes } = useStyles54();
|
|
8266
|
-
return /* @__PURE__ */ (0,
|
|
8267
|
-
/* @__PURE__ */ (0,
|
|
8268
|
-
/* @__PURE__ */ (0,
|
|
8251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_material69.Box, { children: [
|
|
8252
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.AppBar, { children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_material69.Toolbar, { className: classes.topBar, children: [
|
|
8253
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
8269
8254
|
RoundButton_default,
|
|
8270
8255
|
{
|
|
8271
8256
|
className: classes.menuButton,
|
|
@@ -8274,7 +8259,7 @@ var TheToolbar = ({
|
|
|
8274
8259
|
onClick: handleOpen
|
|
8275
8260
|
}
|
|
8276
8261
|
),
|
|
8277
|
-
/* @__PURE__ */ (0,
|
|
8262
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
8278
8263
|
CompanyLogo_default,
|
|
8279
8264
|
{
|
|
8280
8265
|
size: "small",
|
|
@@ -8283,8 +8268,8 @@ var TheToolbar = ({
|
|
|
8283
8268
|
imageLogoLightSmall
|
|
8284
8269
|
}
|
|
8285
8270
|
),
|
|
8286
|
-
/* @__PURE__ */ (0,
|
|
8287
|
-
/* @__PURE__ */ (0,
|
|
8271
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.Box, { ml: 2, children: leftSection }),
|
|
8272
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material69.Box, { ml: "auto", children: rightSection })
|
|
8288
8273
|
] }) }),
|
|
8289
8274
|
LeftDrawer
|
|
8290
8275
|
] });
|
|
@@ -8292,22 +8277,22 @@ var TheToolbar = ({
|
|
|
8292
8277
|
var TheToolbar_default = (0, import_react40.memo)(TheToolbar);
|
|
8293
8278
|
|
|
8294
8279
|
// src/components/ToastMessage/ToastMessage.tsx
|
|
8295
|
-
var
|
|
8296
|
-
var
|
|
8280
|
+
var import_material70 = require("@mui/material");
|
|
8281
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
8297
8282
|
var ToastMessage = ({
|
|
8298
8283
|
toastType,
|
|
8299
8284
|
toastMessage,
|
|
8300
8285
|
open,
|
|
8301
8286
|
onClose
|
|
8302
|
-
}) => /* @__PURE__ */ (0,
|
|
8303
|
-
|
|
8287
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
8288
|
+
import_material70.Snackbar,
|
|
8304
8289
|
{
|
|
8305
8290
|
open,
|
|
8306
8291
|
autoHideDuration: 1500,
|
|
8307
8292
|
onClose,
|
|
8308
8293
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
8309
|
-
children: /* @__PURE__ */ (0,
|
|
8310
|
-
|
|
8294
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
8295
|
+
import_material70.Alert,
|
|
8311
8296
|
{
|
|
8312
8297
|
elevation: 6,
|
|
8313
8298
|
variant: "filled",
|
|
@@ -8333,9 +8318,9 @@ var ToastMessage = ({
|
|
|
8333
8318
|
var ToastMessage_default = ToastMessage;
|
|
8334
8319
|
|
|
8335
8320
|
// src/components/TwoButtonDialog/TwoButtonDialog.tsx
|
|
8336
|
-
var
|
|
8321
|
+
var import_material71 = require("@mui/material");
|
|
8337
8322
|
var import_mui61 = require("tss-react/mui");
|
|
8338
|
-
var
|
|
8323
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
8339
8324
|
var useStyles55 = (0, import_mui61.makeStyles)()((theme) => ({
|
|
8340
8325
|
paper: {
|
|
8341
8326
|
padding: theme.spacing(2)
|
|
@@ -8365,20 +8350,20 @@ var TwoButtonDialog = ({
|
|
|
8365
8350
|
cancelButton
|
|
8366
8351
|
}) => {
|
|
8367
8352
|
const { classes } = useStyles55();
|
|
8368
|
-
return /* @__PURE__ */ (0,
|
|
8369
|
-
|
|
8353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
8354
|
+
import_material71.Dialog,
|
|
8370
8355
|
{
|
|
8371
8356
|
open,
|
|
8372
8357
|
disableEnforceFocus: true,
|
|
8373
8358
|
maxWidth: "sm",
|
|
8374
8359
|
fullWidth: true,
|
|
8375
8360
|
closeAfterTransition: true,
|
|
8376
|
-
BackdropComponent:
|
|
8361
|
+
BackdropComponent: import_material71.Backdrop,
|
|
8377
8362
|
BackdropProps: { timeout: 500 },
|
|
8378
|
-
children: /* @__PURE__ */ (0,
|
|
8379
|
-
/* @__PURE__ */ (0,
|
|
8380
|
-
/* @__PURE__ */ (0,
|
|
8381
|
-
|
|
8363
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material71.Fade, { in: open, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_material71.Paper, { className: classes.paper, children: [
|
|
8364
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_material71.Box, { className: classes.mb, children: [
|
|
8365
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material71.Typography, { variant: "h5", component: "div", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
8366
|
+
import_material71.Box,
|
|
8382
8367
|
{
|
|
8383
8368
|
sx: {
|
|
8384
8369
|
fontWeight: 600
|
|
@@ -8386,23 +8371,23 @@ var TwoButtonDialog = ({
|
|
|
8386
8371
|
children: title
|
|
8387
8372
|
}
|
|
8388
8373
|
) }),
|
|
8389
|
-
/* @__PURE__ */ (0,
|
|
8390
|
-
|
|
8374
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
8375
|
+
import_material71.Box,
|
|
8391
8376
|
{
|
|
8392
8377
|
className: classes.mt,
|
|
8393
8378
|
sx: {
|
|
8394
8379
|
fontWeight: 600
|
|
8395
8380
|
},
|
|
8396
8381
|
children: [
|
|
8397
|
-
subtitle1 && /* @__PURE__ */ (0,
|
|
8398
|
-
subtitle2 && /* @__PURE__ */ (0,
|
|
8382
|
+
subtitle1 && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material71.Typography, { variant: "subtitle1", children: subtitle1 }),
|
|
8383
|
+
subtitle2 && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material71.Typography, { variant: "subtitle1", children: subtitle2 })
|
|
8399
8384
|
]
|
|
8400
8385
|
}
|
|
8401
8386
|
)
|
|
8402
8387
|
] }),
|
|
8403
|
-
/* @__PURE__ */ (0,
|
|
8404
|
-
/* @__PURE__ */ (0,
|
|
8405
|
-
/* @__PURE__ */ (0,
|
|
8388
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material71.Divider, {}),
|
|
8389
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_material71.Box, { className: classes.buttonContainer, children: [
|
|
8390
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
8406
8391
|
FilledButton_default,
|
|
8407
8392
|
{
|
|
8408
8393
|
copy: cancelLabel,
|
|
@@ -8415,7 +8400,7 @@ var TwoButtonDialog = ({
|
|
|
8415
8400
|
}
|
|
8416
8401
|
}
|
|
8417
8402
|
),
|
|
8418
|
-
/* @__PURE__ */ (0,
|
|
8403
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
8419
8404
|
FilledButton_default,
|
|
8420
8405
|
{
|
|
8421
8406
|
color: "primary",
|
|
@@ -8424,7 +8409,7 @@ var TwoButtonDialog = ({
|
|
|
8424
8409
|
}
|
|
8425
8410
|
)
|
|
8426
8411
|
] }),
|
|
8427
|
-
/* @__PURE__ */ (0,
|
|
8412
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Loading_default, { isLoading: dialogLoading })
|
|
8428
8413
|
] }) })
|
|
8429
8414
|
}
|
|
8430
8415
|
);
|
|
@@ -8433,29 +8418,29 @@ var TwoButtonDialog_default = TwoButtonDialog;
|
|
|
8433
8418
|
|
|
8434
8419
|
// src/components/UserBust/UserBust.tsx
|
|
8435
8420
|
var import_react41 = require("react");
|
|
8436
|
-
var
|
|
8437
|
-
var
|
|
8438
|
-
var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0,
|
|
8439
|
-
/* @__PURE__ */ (0,
|
|
8440
|
-
|
|
8421
|
+
var import_material72 = require("@mui/material");
|
|
8422
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
8423
|
+
var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { children: [
|
|
8424
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
8425
|
+
import_material72.Avatar,
|
|
8441
8426
|
{
|
|
8442
8427
|
src: user.profile_picture,
|
|
8443
8428
|
alt: "user_avatar",
|
|
8444
8429
|
style: { width: avatarProps.width, height: avatarProps.height }
|
|
8445
8430
|
}
|
|
8446
8431
|
),
|
|
8447
|
-
/* @__PURE__ */ (0,
|
|
8448
|
-
/* @__PURE__ */ (0,
|
|
8449
|
-
/* @__PURE__ */ (0,
|
|
8432
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { style: { paddingTop: 16 }, children: [
|
|
8433
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material72.Typography, { ...typographyProps.name, children: `${user.first_name} ${user.last_name}` }),
|
|
8434
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material72.Typography, { ...typographyProps.username, children: user.username })
|
|
8450
8435
|
] })
|
|
8451
8436
|
] });
|
|
8452
8437
|
var UserBust_default = (0, import_react41.memo)(UserBust);
|
|
8453
8438
|
|
|
8454
8439
|
// src/components/icons/IconChart.tsx
|
|
8455
|
-
var
|
|
8440
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
8456
8441
|
var SvgIconChart = (props) => {
|
|
8457
8442
|
const { fill } = props;
|
|
8458
|
-
return /* @__PURE__ */ (0,
|
|
8443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
8459
8444
|
"svg",
|
|
8460
8445
|
{
|
|
8461
8446
|
width: "20",
|
|
@@ -8464,7 +8449,7 @@ var SvgIconChart = (props) => {
|
|
|
8464
8449
|
fill: "none",
|
|
8465
8450
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8466
8451
|
...props,
|
|
8467
|
-
children: /* @__PURE__ */ (0,
|
|
8452
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
8468
8453
|
"path",
|
|
8469
8454
|
{
|
|
8470
8455
|
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",
|