techsbcn-storybook 2.0.7 → 2.2.0
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/fields/ButtonComponent/ButtonComponent.d.ts +2 -0
- package/dist/components/modals/Drawers/DetailPanelComponent.d.ts +15 -0
- package/dist/components/navigation/AppBreadcrumbs/AppBreadcrumbs.d.ts +7 -0
- package/dist/components/notifications/SnackbarComponent.d.ts +12 -0
- package/dist/helpers/ErrorsHelper.d.ts +4 -0
- package/dist/helpers/NotificationHelper.d.ts +10 -0
- package/dist/helpers/index.d.ts +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +333 -175
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +309 -158
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/navigation/Breadcrumb.d.ts +8 -0
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Box, Collapse, Grid, Container, IconButton, Menu, MenuItem, Divider, LinearProgress, CircularProgress, TextField, Paper, Checkbox, TableContainer, Table, TableHead, TableRow, TableCell, TableSortLabel, TableBody, TablePagination, Pagination, PaginationItem, Avatar, Drawer, AppBar, Toolbar, Button, Skeleton, FormLabel, FormHelperText, Stack, Dialog, DialogTitle, DialogContent, DialogActions, Tab,
|
|
1
|
+
import React8, { useMemo, useState, useEffect, useRef } from 'react';
|
|
2
|
+
import { Box, Collapse, Grid, Container, IconButton, Menu, MenuItem, Divider, LinearProgress, CircularProgress, TextField, Paper, Checkbox, TableContainer, Table, TableHead, TableRow, TableCell, TableSortLabel, TableBody, TablePagination, Pagination, PaginationItem, Avatar, Breadcrumbs, Typography, Link, Drawer, AppBar, Toolbar, Button, Skeleton, FormLabel, FormHelperText, Stack, Dialog, DialogTitle, DialogContent, DialogActions, Tab, Snackbar, Alert } from '@mui/material';
|
|
3
3
|
import { ExpandMore, ChevronRight, MoreVert, Tune, Visibility, VisibilityOff, Close } from '@mui/icons-material';
|
|
4
4
|
import { debounce } from 'lodash';
|
|
5
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
6
|
+
import { SnackbarProvider, enqueueSnackbar, closeSnackbar } from 'notistack';
|
|
5
7
|
import dayjs from 'dayjs';
|
|
6
8
|
import localizedFormat from 'dayjs/plugin/localizedFormat';
|
|
7
9
|
import timezone from 'dayjs/plugin/timezone';
|
|
8
10
|
import utc from 'dayjs/plugin/utc';
|
|
9
|
-
import { useLocation, matchPath, NavLink } from 'react-router';
|
|
11
|
+
import { useLocation, matchPath, NavLink, useMatches, Link as Link$1 } from 'react-router';
|
|
10
12
|
import MenuIcon from '@mui/icons-material/Menu';
|
|
11
13
|
import Select from 'react-select';
|
|
12
14
|
import { useTheme } from '@mui/material/styles';
|
|
@@ -31,13 +33,13 @@ document.head.appendChild(document.createElement("style")).appendChild(document.
|
|
|
31
33
|
|
|
32
34
|
// src/components/wrappers/PublicFormWrapper/PublicFormWrapper.tsx
|
|
33
35
|
var PublicFormWrapper = (props) => {
|
|
34
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ React8.createElement(
|
|
35
37
|
Box,
|
|
36
38
|
{
|
|
37
39
|
className: `public-form-wrapper ${props.className ? props.className : ""}`,
|
|
38
40
|
sx: { height: "100%", display: "flex", justifyContent: "center", alignItems: "center" }
|
|
39
41
|
},
|
|
40
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ React8.createElement(Container, { maxWidth: "xs" }, /* @__PURE__ */ React8.createElement(Box, { className: "wrapper-box", sx: { p: 1 } }, props.children))
|
|
41
43
|
);
|
|
42
44
|
};
|
|
43
45
|
|
|
@@ -93,10 +95,10 @@ document.head.appendChild(document.createElement("style")).appendChild(document.
|
|
|
93
95
|
|
|
94
96
|
// src/components/tables/SearchComponent/SearchComponent.tsx
|
|
95
97
|
var ActionsList = (actions) => {
|
|
96
|
-
return /* @__PURE__ */
|
|
98
|
+
return /* @__PURE__ */ React8.createElement(Box, { sx: { ml: "auto", justifyContent: "start", display: "flex", alignItems: "center", flexDirection: "row" } }, actions && actions.map((action, i) => /* @__PURE__ */ React8.createElement(Box, { sx: { ml: 2, color: "primary.main" }, key: i, className: "btn-action main-color" }, action.action)));
|
|
97
99
|
};
|
|
98
100
|
var DoubleFilter = (filters) => {
|
|
99
|
-
return /* @__PURE__ */
|
|
101
|
+
return /* @__PURE__ */ React8.createElement(Grid, { container: true, spacing: 1, sx: { alignItems: "center" } }, filters.label && /* @__PURE__ */ React8.createElement(Grid, { size: { xs: 12, md: 3 } }, /* @__PURE__ */ React8.createElement(Box, null, filters.label)), /* @__PURE__ */ React8.createElement(Grid, { size: { xs: 12, md: filters.label ? 9 : 12 } }, /* @__PURE__ */ React8.createElement(Grid, { container: true, spacing: 1 }, /* @__PURE__ */ React8.createElement(Grid, { size: 6 }, filters.firstFilter), /* @__PURE__ */ React8.createElement(Grid, { size: 6 }, filters.secondFilter))));
|
|
100
102
|
};
|
|
101
103
|
var SearchComponent = (props) => {
|
|
102
104
|
const [isOpen, setIsOpen] = useState(!props.searchBar && !!props.filters || props.fixedOpen);
|
|
@@ -109,7 +111,7 @@ var SearchComponent = (props) => {
|
|
|
109
111
|
setAnchorEl(null);
|
|
110
112
|
};
|
|
111
113
|
const randId = Math.random().toString(36).substring(7);
|
|
112
|
-
return /* @__PURE__ */
|
|
114
|
+
return /* @__PURE__ */ React8.createElement(Box, { className: `search-component ${props.className}` }, /* @__PURE__ */ React8.createElement(Box, { sx: { mb: props.divider ? 2 : 0, px: 2 } }, /* @__PURE__ */ React8.createElement(Grid, { container: true, sx: { alignItems: "center" } }, /* @__PURE__ */ React8.createElement(
|
|
113
115
|
Grid,
|
|
114
116
|
{
|
|
115
117
|
size: {
|
|
@@ -117,7 +119,7 @@ var SearchComponent = (props) => {
|
|
|
117
119
|
md: props.actions && props.searchBar ? 4 : props.searchBar ? 7 : props.actions ? 6 : 12
|
|
118
120
|
}
|
|
119
121
|
},
|
|
120
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ React8.createElement(
|
|
121
123
|
Box,
|
|
122
124
|
{
|
|
123
125
|
sx: {
|
|
@@ -128,7 +130,7 @@ var SearchComponent = (props) => {
|
|
|
128
130
|
},
|
|
129
131
|
props.title
|
|
130
132
|
)
|
|
131
|
-
), props.actions && /* @__PURE__ */
|
|
133
|
+
), props.actions && /* @__PURE__ */ React8.createElement(Grid, { size: { xs: props.title ? 4 : 12 }, sx: { display: { xs: "block", md: "none" } } }, /* @__PURE__ */ React8.createElement(Box, { sx: { display: { xs: "none", md: "flex" } } }, ActionsList(props.actions)), /* @__PURE__ */ React8.createElement(Box, { sx: { display: { xs: "flex", md: "none" } } }, props.actions.length > 1 ? /* @__PURE__ */ React8.createElement(Box, { sx: { ml: "auto" } }, /* @__PURE__ */ React8.createElement(
|
|
132
134
|
IconButton,
|
|
133
135
|
{
|
|
134
136
|
"aria-label": "more",
|
|
@@ -138,8 +140,8 @@ var SearchComponent = (props) => {
|
|
|
138
140
|
"aria-haspopup": "true",
|
|
139
141
|
onClick: handleClick
|
|
140
142
|
},
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
), /* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ React8.createElement(MoreVert, null)
|
|
144
|
+
), /* @__PURE__ */ React8.createElement(
|
|
143
145
|
Menu,
|
|
144
146
|
{
|
|
145
147
|
id: `long-button-${randId}`,
|
|
@@ -153,8 +155,8 @@ var SearchComponent = (props) => {
|
|
|
153
155
|
onClose: handleClose,
|
|
154
156
|
className: "search-menu-actions"
|
|
155
157
|
},
|
|
156
|
-
props.actions.map((action, i) => /* @__PURE__ */
|
|
157
|
-
)) : /* @__PURE__ */
|
|
158
|
+
props.actions.map((action, i) => /* @__PURE__ */ React8.createElement(MenuItem, { key: i, className: "wrapper-actions" }, /* @__PURE__ */ React8.createElement(Box, { className: "btn-action main-color", sx: { color: "primary.main" } }, action.action)))
|
|
159
|
+
)) : /* @__PURE__ */ React8.createElement(Box, { sx: { ml: "auto" }, className: `wrapper-actions ${props.title ? "min-action-width" : ""}` }, ActionsList(props.actions)))), (props.searchBar || props.filters || props.actions) && /* @__PURE__ */ React8.createElement(Grid, { size: { xs: 12, md: props.actions && props.searchBar ? 8 : props.actions ? 6 : 5 } }, /* @__PURE__ */ React8.createElement(Box, { sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React8.createElement(
|
|
158
160
|
Box,
|
|
159
161
|
{
|
|
160
162
|
sx: {
|
|
@@ -165,16 +167,16 @@ var SearchComponent = (props) => {
|
|
|
165
167
|
}
|
|
166
168
|
},
|
|
167
169
|
props.searchBar,
|
|
168
|
-
!!props.fixedOpen || props.filters && props.searchBar && /* @__PURE__ */
|
|
170
|
+
!!props.fixedOpen || props.filters && props.searchBar && /* @__PURE__ */ React8.createElement(
|
|
169
171
|
Box,
|
|
170
172
|
{
|
|
171
173
|
onClick: () => setIsOpen(!isOpen),
|
|
172
174
|
className: "tune-btn main-background-color",
|
|
173
175
|
sx: { bgcolor: "primary.main", color: "primary.contrastText" }
|
|
174
176
|
},
|
|
175
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ React8.createElement(Tune, null)
|
|
176
178
|
)
|
|
177
|
-
), props.actions && /* @__PURE__ */
|
|
179
|
+
), props.actions && /* @__PURE__ */ React8.createElement(Box, { sx: { display: { xs: "none", md: "block" } }, className: "wrapper-actions" }, ActionsList(props.actions)))))), props.divider && /* @__PURE__ */ React8.createElement(Divider, null), /* @__PURE__ */ React8.createElement(Collapse, { in: isOpen }, /* @__PURE__ */ React8.createElement(Box, { className: "filters", sx: { px: 2, mt: 2, mb: props.divider ? 0 : 1 } }, /* @__PURE__ */ React8.createElement(Grid, { container: true, spacing: 3, sx: { justifyContent: "end" } }, props.filters && props.filters.length > 0 && props.filters.map((filter, i) => /* @__PURE__ */ React8.createElement(Grid, { key: i, size: { xs: 12, sm: props.filtersSize ?? 6, xl: props.filtersSize ?? 4 } }, filter.doubleFilter ? DoubleFilter(filter.doubleFilter) : filter.singleFilter))))));
|
|
178
180
|
};
|
|
179
181
|
|
|
180
182
|
// src/components/wrappers/LinearProgressComponent/LinearProgressComponent.scss
|
|
@@ -200,7 +202,7 @@ document.head.appendChild(document.createElement("style")).appendChild(document.
|
|
|
200
202
|
|
|
201
203
|
// src/components/wrappers/LinearProgressComponent/LinearProgressComponent.tsx
|
|
202
204
|
var LinearProgressComponent = () => {
|
|
203
|
-
return /* @__PURE__ */
|
|
205
|
+
return /* @__PURE__ */ React8.createElement(Box, { className: "linear-progress-component" }, /* @__PURE__ */ React8.createElement(Box, { className: "linear-progress-main-color main-background-color", sx: { bgcolor: "primary.main" } }), /* @__PURE__ */ React8.createElement(
|
|
204
206
|
LinearProgress,
|
|
205
207
|
{
|
|
206
208
|
classes: { bar: "main-background-color" },
|
|
@@ -244,14 +246,14 @@ document.head.appendChild(document.createElement("style")).appendChild(document.
|
|
|
244
246
|
// src/components/wrappers/MainWrapperComponent/MainWrapperComponent.tsx
|
|
245
247
|
var MainWrapperComponent = ({ enableTrimBar = false, ...rest }) => {
|
|
246
248
|
const props = { enableTrimBar, ...rest };
|
|
247
|
-
return /* @__PURE__ */
|
|
249
|
+
return /* @__PURE__ */ React8.createElement(Box, { className: "main-wrapper-component", sx: { height: props.height ?? "100%" } }, /* @__PURE__ */ React8.createElement(Box, { sx: { height: "4px" } }, props.loadingProgressBar && /* @__PURE__ */ React8.createElement(LinearProgressComponent, null)), /* @__PURE__ */ React8.createElement(Box, { sx: { py: 2 } }, props.loading ? /* @__PURE__ */ React8.createElement(Box, { sx: { display: "flex", justifyContent: "center", px: 2 } }, /* @__PURE__ */ React8.createElement(CircularProgress, { className: "circular-progress-main-color", color: "primary" })) : /* @__PURE__ */ React8.createElement(React8.Fragment, null, props.headerProps && /* @__PURE__ */ React8.createElement(Box, { sx: { mb: props.divider ? 1.5 : 0 } }, /* @__PURE__ */ React8.createElement(SearchComponent, { ...props.headerProps, enableAfter: props.headerProps.enableAfter ?? true })), props.divider && /* @__PURE__ */ React8.createElement(Divider, null), props.children && !props.loadingChildren ? /* @__PURE__ */ React8.createElement(Box, { sx: { pt: props.headerProps ? 2 : 0, px: 2 } }, /* @__PURE__ */ React8.createElement(
|
|
248
250
|
Box,
|
|
249
251
|
{
|
|
250
252
|
className: `${props.enableTrimBar ? "main-background-color-after" : ""}`,
|
|
251
253
|
sx: props.enableTrimBar ? { "&::after": { bgcolor: "primary.main" } } : void 0
|
|
252
254
|
},
|
|
253
255
|
props.children
|
|
254
|
-
)) : props.loadingChildren ? /* @__PURE__ */
|
|
256
|
+
)) : props.loadingChildren ? /* @__PURE__ */ React8.createElement(Box, { sx: { display: "flex", justifyContent: "center", pt: props.headerProps ? 2 : 0, px: 2 } }, /* @__PURE__ */ React8.createElement(CircularProgress, { className: "circular-progress-main-color", color: "primary" })) : /* @__PURE__ */ React8.createElement(React8.Fragment, null))));
|
|
255
257
|
};
|
|
256
258
|
|
|
257
259
|
// src/components/tables/TableComponent/TableComponent.scss
|
|
@@ -506,8 +508,8 @@ var TextFieldComponent = ({
|
|
|
506
508
|
onMouseLeave,
|
|
507
509
|
...rest
|
|
508
510
|
}) => {
|
|
509
|
-
const [hover, setHover] =
|
|
510
|
-
return /* @__PURE__ */
|
|
511
|
+
const [hover, setHover] = React8.useState(false);
|
|
512
|
+
return /* @__PURE__ */ React8.createElement(Box, { className: "text-field-component", sx: { width: "100%" } }, /* @__PURE__ */ React8.createElement(
|
|
511
513
|
TextField,
|
|
512
514
|
{
|
|
513
515
|
...rest,
|
|
@@ -686,6 +688,29 @@ var useIsMounted = () => {
|
|
|
686
688
|
}, []);
|
|
687
689
|
return isMounted;
|
|
688
690
|
};
|
|
691
|
+
var NotificationContainer = (props) => /* @__PURE__ */ React8.createElement(
|
|
692
|
+
SnackbarProvider,
|
|
693
|
+
{
|
|
694
|
+
maxSnack: 5,
|
|
695
|
+
autoHideDuration: 5e3,
|
|
696
|
+
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
697
|
+
preventDuplicate: true,
|
|
698
|
+
...props
|
|
699
|
+
}
|
|
700
|
+
);
|
|
701
|
+
var addNotification = ({
|
|
702
|
+
message,
|
|
703
|
+
type = "default",
|
|
704
|
+
id,
|
|
705
|
+
duration = type === "error" ? null : 5e3
|
|
706
|
+
}) => enqueueSnackbar(message, {
|
|
707
|
+
variant: type,
|
|
708
|
+
key: id,
|
|
709
|
+
autoHideDuration: duration,
|
|
710
|
+
persist: duration === null,
|
|
711
|
+
action: duration === null ? (key) => /* @__PURE__ */ React8.createElement(IconButton, { size: "small", color: "inherit", "aria-label": "close", onClick: () => closeSnackbar(key) }, /* @__PURE__ */ React8.createElement(CloseIcon, { fontSize: "small" })) : void 0
|
|
712
|
+
});
|
|
713
|
+
var removeNotification = (id) => closeSnackbar(id);
|
|
689
714
|
|
|
690
715
|
// src/components/tables/ImageTableComponent/ImageTableComponent.tsx
|
|
691
716
|
var ImageTableComponent = (props) => {
|
|
@@ -704,7 +729,7 @@ var ImageTableComponent = (props) => {
|
|
|
704
729
|
}).catch(() => setLoading(false));
|
|
705
730
|
}
|
|
706
731
|
}, [props, prevGuidState, isMounted]);
|
|
707
|
-
return /* @__PURE__ */
|
|
732
|
+
return /* @__PURE__ */ React8.createElement(Box, { className: "images-table-component" }, loading ? /* @__PURE__ */ React8.createElement(Box, { sx: { textAlign: "center" } }, /* @__PURE__ */ React8.createElement(CircularProgress, { className: "main-color", color: "primary" })) : /* @__PURE__ */ React8.createElement(Avatar, { alt: "-", src: image, className: "img-table", variant: "square" }));
|
|
708
733
|
};
|
|
709
734
|
var ImageTableComponent_default = ImageTableComponent;
|
|
710
735
|
var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
@@ -790,9 +815,9 @@ var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
|
790
815
|
return `${column.priceFormat?.currencyStart ?? ""}${Number(value).toFixed(2).replace(".", ",").toLocaleString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1.")} ${!column.priceFormat?.currencyStart ? column.priceFormat?.currencyEnd ?? props.values.SYMBOL_EURO : ""}`;
|
|
791
816
|
if (column.isImage && value) {
|
|
792
817
|
if (column.isImage.isUrl) {
|
|
793
|
-
return /* @__PURE__ */
|
|
818
|
+
return /* @__PURE__ */ React8.createElement(Avatar, { alt: "-", src: value, className: "img-table", variant: "square" });
|
|
794
819
|
} else if (column.isImage.isGuid) {
|
|
795
|
-
return /* @__PURE__ */
|
|
820
|
+
return /* @__PURE__ */ React8.createElement(
|
|
796
821
|
ImageTableComponent_default,
|
|
797
822
|
{
|
|
798
823
|
guid: value,
|
|
@@ -818,7 +843,7 @@ var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
|
818
843
|
if (typeof value === "boolean") {
|
|
819
844
|
return String(value);
|
|
820
845
|
}
|
|
821
|
-
return /* @__PURE__ */
|
|
846
|
+
return /* @__PURE__ */ React8.createElement(Typography, { component: "span", sx: { whiteSpace: "break-spaces" } }, value);
|
|
822
847
|
};
|
|
823
848
|
const ObjectbyString = (o, s) => {
|
|
824
849
|
s = s.replace(/\[(\w+)\]/g, ".$1");
|
|
@@ -855,7 +880,7 @@ var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
|
855
880
|
rowEdit[fieldName] = e.target.value;
|
|
856
881
|
setUpdate();
|
|
857
882
|
};
|
|
858
|
-
return /* @__PURE__ */
|
|
883
|
+
return /* @__PURE__ */ React8.createElement(
|
|
859
884
|
TextFieldComponent,
|
|
860
885
|
{
|
|
861
886
|
...editableCell.isTextField.textFieldProps,
|
|
@@ -868,20 +893,20 @@ var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
|
868
893
|
return value;
|
|
869
894
|
}
|
|
870
895
|
};
|
|
871
|
-
return /* @__PURE__ */
|
|
896
|
+
return /* @__PURE__ */ React8.createElement(Box, { className: "table-component" }, /* @__PURE__ */ React8.createElement(Paper, { className: "paper-container" }, /* @__PURE__ */ React8.createElement(Box, { sx: { p: 1, display: "flex" } }, props.isCheckTable && /* @__PURE__ */ React8.createElement(Box, { sx: { display: { xs: "block", md: "none" } }, className: "checkbox-cell" }, /* @__PURE__ */ React8.createElement(
|
|
872
897
|
Checkbox,
|
|
873
898
|
{
|
|
874
899
|
indeterminate: props.rows && JSON.parse(JSON.stringify(props.isCheckTable?.rowsChecked)).length > 0 && JSON.parse(JSON.stringify(props.isCheckTable?.rowsChecked)).length < props.rows.length,
|
|
875
900
|
checked: props.rows && props.rows.length > 0 && JSON.parse(JSON.stringify(props.isCheckTable?.rowsChecked)).length === props.rows.length,
|
|
876
901
|
onChange: handleSelectAllClick
|
|
877
902
|
}
|
|
878
|
-
)), props.showTotalCount && /* @__PURE__ */
|
|
903
|
+
)), props.showTotalCount && /* @__PURE__ */ React8.createElement(Box, { sx: { ml: "auto", mr: 1, alignSelf: "center" } }, props.totalCount, " ", props.values.RESULTS)), /* @__PURE__ */ React8.createElement(
|
|
879
904
|
TableContainer,
|
|
880
905
|
{
|
|
881
906
|
className: `table-container ${props.isBordered ? "table-bordered" : "table-simple"} ${props.withScroll ? "with-scroll" : ""}`
|
|
882
907
|
},
|
|
883
|
-
/* @__PURE__ */
|
|
884
|
-
return /* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ React8.createElement(Table, { stickyHeader: true, "aria-label": "sticky table", className: props.loading ? "loading" : "" }, /* @__PURE__ */ React8.createElement(TableHead, { sx: { display: { xs: "none", md: "table-header-group" } } }, /* @__PURE__ */ React8.createElement(TableRow, null, props.columns.map((column, columnIndex) => {
|
|
909
|
+
return /* @__PURE__ */ React8.createElement(
|
|
885
910
|
TableCell,
|
|
886
911
|
{
|
|
887
912
|
className: "table-column",
|
|
@@ -889,7 +914,7 @@ var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
|
889
914
|
align: column.align ? column.align : "center",
|
|
890
915
|
style: { width: column.width, minWidth: column.minWidth, maxWidth: column.maxWidth }
|
|
891
916
|
},
|
|
892
|
-
(column.orderBy || column.id) && column.id !== "actions" && !column.isCheck && !column.isActiveFunction && !column.noSort ? /* @__PURE__ */
|
|
917
|
+
(column.orderBy || column.id) && column.id !== "actions" && !column.isCheck && !column.isActiveFunction && !column.noSort ? /* @__PURE__ */ React8.createElement(
|
|
893
918
|
TableSortLabel,
|
|
894
919
|
{
|
|
895
920
|
className: "table-header-cell",
|
|
@@ -899,16 +924,16 @@ var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
|
899
924
|
hideSortIcon: true
|
|
900
925
|
},
|
|
901
926
|
column.label
|
|
902
|
-
) : column.isCheck ? /* @__PURE__ */
|
|
927
|
+
) : column.isCheck ? /* @__PURE__ */ React8.createElement(Box, { className: "checkbox-cell" }, /* @__PURE__ */ React8.createElement(
|
|
903
928
|
Checkbox,
|
|
904
929
|
{
|
|
905
930
|
indeterminate: props.rows && JSON.parse(JSON.stringify(props.isCheckTable?.rowsChecked)).length > 0 && JSON.parse(JSON.stringify(props.isCheckTable?.rowsChecked)).length < props.rows.length,
|
|
906
931
|
checked: props.rows && props.rows.length > 0 && JSON.parse(JSON.stringify(props.isCheckTable?.rowsChecked)).length === props.rows.length,
|
|
907
932
|
onChange: handleSelectAllClick
|
|
908
933
|
}
|
|
909
|
-
)) : /* @__PURE__ */
|
|
934
|
+
)) : /* @__PURE__ */ React8.createElement(Box, { className: "table-header-cell" }, column.label)
|
|
910
935
|
);
|
|
911
|
-
}))), /* @__PURE__ */
|
|
936
|
+
}))), /* @__PURE__ */ React8.createElement(TableBody, null, props.loading && /* @__PURE__ */ React8.createElement(TableRow, { className: "table-rows" }, /* @__PURE__ */ React8.createElement(
|
|
912
937
|
TableCell,
|
|
913
938
|
{
|
|
914
939
|
colSpan: props.columns.length,
|
|
@@ -918,11 +943,11 @@ var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
|
918
943
|
height: props.rows.length > 0 ? "auto" : "80px"
|
|
919
944
|
}
|
|
920
945
|
},
|
|
921
|
-
/* @__PURE__ */
|
|
946
|
+
/* @__PURE__ */ React8.createElement(CircularProgress, { className: "circular-progress-main-color", color: "primary" })
|
|
922
947
|
)), props.rows && props.rows.length > 0 ? props.rows.map((row, index) => {
|
|
923
948
|
const rowColor = props.rowsColorColumn && ObjectbyString(row, props.rowsColorColumn.columnName) === props.rowsColorColumn.columnValue ? `row-color-${props.rowsColorColumn.columnValue}` : props.isStriped && props.rows.length > 1 && index % 2 == 0 ? "main-background-color table-striped" : "";
|
|
924
949
|
const isRowSelected = props.isCheckTable?.rowsChecked && isSelected(row.id);
|
|
925
|
-
return /* @__PURE__ */
|
|
950
|
+
return /* @__PURE__ */ React8.createElement(
|
|
926
951
|
TableRow,
|
|
927
952
|
{
|
|
928
953
|
className: `table-rows ${rowColor} ${props.onClickRow || props.onClickRowData ? "row-click" : ""}`,
|
|
@@ -936,7 +961,7 @@ var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
|
936
961
|
props.columns.map((column, columnIndex) => {
|
|
937
962
|
const value = column.rowViewFormat ? checkFormat(row, column.rowViewFormat) : ObjectbyString(row, column.id ?? "");
|
|
938
963
|
const isItemSelected = column.isCheck && isSelected(row.id);
|
|
939
|
-
return /* @__PURE__ */
|
|
964
|
+
return /* @__PURE__ */ React8.createElement(
|
|
940
965
|
TableCell,
|
|
941
966
|
{
|
|
942
967
|
className: `table-cell ${column.cellClassName ? column.cellClassName(row) : ""}`,
|
|
@@ -949,8 +974,8 @@ var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
|
949
974
|
},
|
|
950
975
|
onClick: () => !column.action && !column.isCheck && !column.isActiveFunction ? handleRowClick(row) : ""
|
|
951
976
|
},
|
|
952
|
-
column.label !== "-" && /* @__PURE__ */
|
|
953
|
-
column.rowViewFormat ? /* @__PURE__ */
|
|
977
|
+
column.label !== "-" && /* @__PURE__ */ React8.createElement(Box, { sx: { display: { xs: "inline-block", md: "none" } }, className: "label-cell" }, column.label),
|
|
978
|
+
column.rowViewFormat ? /* @__PURE__ */ React8.createElement(Box, { className: "format-value" }, value) : column.action && Object.keys(row).length > 0 ? /* @__PURE__ */ React8.createElement(Box, null, /* @__PURE__ */ React8.createElement(Box, { sx: { display: "flex" }, className: "actions" }, column.action && column.action.map((action, i) => /* @__PURE__ */ React8.createElement(Box, { key: i }, action.onClick && /* @__PURE__ */ React8.createElement(
|
|
954
979
|
Box,
|
|
955
980
|
{
|
|
956
981
|
className: "btn-action main-color-hover",
|
|
@@ -960,7 +985,7 @@ var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
|
960
985
|
onClick: () => action.onClick && action.onClick(row)
|
|
961
986
|
},
|
|
962
987
|
action.children
|
|
963
|
-
), action.onClickId && /* @__PURE__ */
|
|
988
|
+
), action.onClickId && /* @__PURE__ */ React8.createElement(
|
|
964
989
|
Box,
|
|
965
990
|
{
|
|
966
991
|
className: "btn-action main-color-hover",
|
|
@@ -970,7 +995,7 @@ var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
|
970
995
|
onClick: () => action.onClickId && action.onClickId(row.id)
|
|
971
996
|
},
|
|
972
997
|
action.children
|
|
973
|
-
), !action.onClick && !action.onClickId && /* @__PURE__ */
|
|
998
|
+
), !action.onClick && !action.onClickId && /* @__PURE__ */ React8.createElement(Box, { className: "btn-action" }, action.children))))) : column.isActiveFunction && Object.keys(row).length > 0 ? /* @__PURE__ */ React8.createElement(
|
|
974
999
|
Box,
|
|
975
1000
|
{
|
|
976
1001
|
className: "btn-action main-color-hover",
|
|
@@ -980,31 +1005,31 @@ var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
|
980
1005
|
onClick: () => column.isActiveFunction && column.isActiveFunction.onClickId(row.id)
|
|
981
1006
|
},
|
|
982
1007
|
value ? column.isActiveFunction.activeIcon : column.isActiveFunction.disabledIcon
|
|
983
|
-
) : column.isCheck && Object.keys(row).length > 0 ? /* @__PURE__ */
|
|
1008
|
+
) : column.isCheck && Object.keys(row).length > 0 ? /* @__PURE__ */ React8.createElement(Box, { className: "checkbox-cell" }, /* @__PURE__ */ React8.createElement(
|
|
984
1009
|
Checkbox,
|
|
985
1010
|
{
|
|
986
1011
|
checked: isItemSelected,
|
|
987
1012
|
slotProps: { input: { "aria-labelledby": row.id } },
|
|
988
1013
|
onChange: (event) => onCheckAction(event, row.id)
|
|
989
1014
|
}
|
|
990
|
-
)) : column.isEditableTableCell && Object.keys(row).length > 0 ? EditableTableCell(row, value, column.id, column.isEditableTableCell) : column.enumColumn && Object.keys(row).length > 0 ? /* @__PURE__ */
|
|
1015
|
+
)) : column.isEditableTableCell && Object.keys(row).length > 0 ? EditableTableCell(row, value, column.id, column.isEditableTableCell) : column.enumColumn && Object.keys(row).length > 0 ? /* @__PURE__ */ React8.createElement(
|
|
991
1016
|
Box,
|
|
992
1017
|
{
|
|
993
1018
|
className: `${column.enumColumn.hasColor ? `${column.enumColumn.enumSuffix ? `${value.toLowerCase()}-${column.enumColumn.enumSuffix.toLowerCase()}` : value.toString().toLowerCase()}-type-color` : ""} format-value`
|
|
994
1019
|
},
|
|
995
1020
|
formatValue(value, column)
|
|
996
|
-
) : column.isBoolean && Object.keys(row).length > 0 ? /* @__PURE__ */
|
|
1021
|
+
) : column.isBoolean && Object.keys(row).length > 0 ? /* @__PURE__ */ React8.createElement(
|
|
997
1022
|
Box,
|
|
998
1023
|
{
|
|
999
1024
|
className: `${column.isBoolean.hasColor ? `${column.isBoolean.enumSuffix ? `${value.toString().toLowerCase()}-${column.isBoolean.enumSuffix.toLowerCase()}` : value.toString().toLowerCase()}-boolean-color` : ""} format-value`
|
|
1000
1025
|
},
|
|
1001
1026
|
formatValue(value, column)
|
|
1002
|
-
) : /* @__PURE__ */
|
|
1027
|
+
) : /* @__PURE__ */ React8.createElement(Box, { className: `${column.isImage ? "" : "format-value"}` }, formatValue(value, column))
|
|
1003
1028
|
);
|
|
1004
1029
|
})
|
|
1005
1030
|
);
|
|
1006
|
-
}) : !props.loading ? /* @__PURE__ */
|
|
1007
|
-
), props.baseFilters && props.baseFilters.page && props.baseFilters.limit && /* @__PURE__ */
|
|
1031
|
+
}) : !props.loading ? /* @__PURE__ */ React8.createElement(TableRow, null, /* @__PURE__ */ React8.createElement(TableCell, { colSpan: props.columns.length }, /* @__PURE__ */ React8.createElement(Box, null, props.values.NO_RESULTS_FOUND))) : /* @__PURE__ */ React8.createElement(TableRow, null)))
|
|
1032
|
+
), props.baseFilters && props.baseFilters.page && props.baseFilters.limit && /* @__PURE__ */ React8.createElement(
|
|
1008
1033
|
TablePagination,
|
|
1009
1034
|
{
|
|
1010
1035
|
rowsPerPageOptions: [5, 10, 25, 100, 150],
|
|
@@ -1020,7 +1045,7 @@ var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
|
1020
1045
|
component: "div",
|
|
1021
1046
|
className: `table-pagination ${props.isBordered ? "table-bordered" : "table-simple"}`,
|
|
1022
1047
|
ActionsComponent: (_actions) => {
|
|
1023
|
-
return /* @__PURE__ */
|
|
1048
|
+
return /* @__PURE__ */ React8.createElement(Box, { sx: { flexShrink: 0 }, className: "pagination" }, Math.ceil(_actions.count / _actions.rowsPerPage) > 1 && /* @__PURE__ */ React8.createElement(
|
|
1024
1049
|
Pagination,
|
|
1025
1050
|
{
|
|
1026
1051
|
count: Math.ceil(_actions.count / _actions.rowsPerPage),
|
|
@@ -1032,7 +1057,7 @@ var TableComponent = ({ showTotalCount = true, ...rest }) => {
|
|
|
1032
1057
|
hidePrevButton: true,
|
|
1033
1058
|
showFirstButton: true,
|
|
1034
1059
|
showLastButton: true,
|
|
1035
|
-
renderItem: (item) => /* @__PURE__ */
|
|
1060
|
+
renderItem: (item) => /* @__PURE__ */ React8.createElement(
|
|
1036
1061
|
PaginationItem,
|
|
1037
1062
|
{
|
|
1038
1063
|
classes: { selected: "main-background-color" },
|
|
@@ -1283,9 +1308,9 @@ var SimpleTableComponent = (props) => {
|
|
|
1283
1308
|
return `${column.priceFormat?.currencyStart ?? ""}${Number(value).toFixed(2).replace(".", ",").toLocaleString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1.")} ${!column.priceFormat?.currencyStart ? column.priceFormat?.currencyEnd ?? props.values.SYMBOL_EURO : ""}`;
|
|
1284
1309
|
if (column.isImage && value) {
|
|
1285
1310
|
if (column.isImage.isUrl) {
|
|
1286
|
-
return /* @__PURE__ */
|
|
1311
|
+
return /* @__PURE__ */ React8.createElement(Avatar, { alt: "-", src: value, className: "img-table", variant: "square" });
|
|
1287
1312
|
} else if (column.isImage.isGuid) {
|
|
1288
|
-
return /* @__PURE__ */
|
|
1313
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1289
1314
|
ImageTableComponent_default,
|
|
1290
1315
|
{
|
|
1291
1316
|
guid: value,
|
|
@@ -1311,7 +1336,7 @@ var SimpleTableComponent = (props) => {
|
|
|
1311
1336
|
if (typeof value === "boolean") {
|
|
1312
1337
|
return String(value);
|
|
1313
1338
|
}
|
|
1314
|
-
return /* @__PURE__ */
|
|
1339
|
+
return /* @__PURE__ */ React8.createElement(Typography, { component: "span", sx: { whiteSpace: "break-spaces" } }, value);
|
|
1315
1340
|
};
|
|
1316
1341
|
const ObjectbyString = (o, s) => {
|
|
1317
1342
|
s = s.replace(/\[(\w+)\]/g, ".$1");
|
|
@@ -1349,7 +1374,7 @@ var SimpleTableComponent = (props) => {
|
|
|
1349
1374
|
rowEdit[fieldName] = e.target.value;
|
|
1350
1375
|
setUpdate();
|
|
1351
1376
|
};
|
|
1352
|
-
return /* @__PURE__ */
|
|
1377
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1353
1378
|
TextFieldComponent,
|
|
1354
1379
|
{
|
|
1355
1380
|
...editableCell.isTextField.textFieldProps,
|
|
@@ -1362,29 +1387,29 @@ var SimpleTableComponent = (props) => {
|
|
|
1362
1387
|
return value;
|
|
1363
1388
|
}
|
|
1364
1389
|
};
|
|
1365
|
-
return /* @__PURE__ */
|
|
1390
|
+
return /* @__PURE__ */ React8.createElement(Box, { className: "table-simple-component" }, /* @__PURE__ */ React8.createElement(Paper, { className: "paper-container" }, props.isCheckTable && !props.isCheckTable.noCheckAllItems && /* @__PURE__ */ React8.createElement(Box, { sx: { display: { xs: "block", md: "none" } }, className: "checkbox-cell" }, /* @__PURE__ */ React8.createElement(
|
|
1366
1391
|
Checkbox,
|
|
1367
1392
|
{
|
|
1368
1393
|
indeterminate: props.rows && JSON.parse(JSON.stringify(props.isCheckTable?.rowsChecked)).length > 0 && JSON.parse(JSON.stringify(props.isCheckTable?.rowsChecked)).length < props.rows.length,
|
|
1369
1394
|
checked: props.rows && props.rows.length > 0 && JSON.parse(JSON.stringify(props.isCheckTable?.rowsChecked)).length === props.rows.length,
|
|
1370
1395
|
onChange: handleSelectAllClick
|
|
1371
1396
|
}
|
|
1372
|
-
)), /* @__PURE__ */
|
|
1397
|
+
)), /* @__PURE__ */ React8.createElement(
|
|
1373
1398
|
TableContainer,
|
|
1374
1399
|
{
|
|
1375
1400
|
className: `table-container ${props.isBordered ? "table-bordered" : "table-simple"}
|
|
1376
1401
|
${props.withScroll ? "with-scroll" : ""}`
|
|
1377
1402
|
},
|
|
1378
|
-
/* @__PURE__ */
|
|
1403
|
+
/* @__PURE__ */ React8.createElement(
|
|
1379
1404
|
Table,
|
|
1380
1405
|
{
|
|
1381
1406
|
stickyHeader: true,
|
|
1382
1407
|
"aria-label": "sticky table",
|
|
1383
1408
|
className: props.loading ? "loading" : props.className ? props.className : ""
|
|
1384
1409
|
},
|
|
1385
|
-
/* @__PURE__ */
|
|
1410
|
+
/* @__PURE__ */ React8.createElement(TableHead, { sx: { display: { xs: "none", md: "table-header-group" } } }, /* @__PURE__ */ React8.createElement(TableRow, null, props.columns.map((column, columnIndex) => {
|
|
1386
1411
|
if (column.id) {
|
|
1387
|
-
return /* @__PURE__ */
|
|
1412
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1388
1413
|
TableCell,
|
|
1389
1414
|
{
|
|
1390
1415
|
className: "table-column",
|
|
@@ -1392,18 +1417,18 @@ var SimpleTableComponent = (props) => {
|
|
|
1392
1417
|
align: column.align ? column.align : "center",
|
|
1393
1418
|
style: { width: column.width, minWidth: column.minWidth, maxWidth: column.maxWidth }
|
|
1394
1419
|
},
|
|
1395
|
-
column.isCheck && !props.isCheckTable?.noCheckAllItems ? /* @__PURE__ */
|
|
1420
|
+
column.isCheck && !props.isCheckTable?.noCheckAllItems ? /* @__PURE__ */ React8.createElement(Box, { className: "checkbox-cell" }, /* @__PURE__ */ React8.createElement(
|
|
1396
1421
|
Checkbox,
|
|
1397
1422
|
{
|
|
1398
1423
|
indeterminate: props.rows && JSON.parse(JSON.stringify(props.isCheckTable?.rowsChecked)).length > 0 && JSON.parse(JSON.stringify(props.isCheckTable?.rowsChecked)).length < props.rows.length,
|
|
1399
1424
|
checked: props.rows && props.rows.length > 0 && JSON.parse(JSON.stringify(props.isCheckTable?.rowsChecked)).length === props.rows.length,
|
|
1400
1425
|
onChange: handleSelectAllClick
|
|
1401
1426
|
}
|
|
1402
|
-
)) : /* @__PURE__ */
|
|
1427
|
+
)) : /* @__PURE__ */ React8.createElement(Box, { className: "table-header-cell" }, column.label)
|
|
1403
1428
|
);
|
|
1404
1429
|
} else return null;
|
|
1405
1430
|
}))),
|
|
1406
|
-
/* @__PURE__ */
|
|
1431
|
+
/* @__PURE__ */ React8.createElement(TableBody, null, props.loading && /* @__PURE__ */ React8.createElement(TableRow, { className: "table-rows" }, /* @__PURE__ */ React8.createElement(
|
|
1407
1432
|
TableCell,
|
|
1408
1433
|
{
|
|
1409
1434
|
colSpan: props.columns.length,
|
|
@@ -1413,11 +1438,11 @@ var SimpleTableComponent = (props) => {
|
|
|
1413
1438
|
height: props.rows.length > 0 ? "auto" : "80px"
|
|
1414
1439
|
}
|
|
1415
1440
|
},
|
|
1416
|
-
/* @__PURE__ */
|
|
1441
|
+
/* @__PURE__ */ React8.createElement(CircularProgress, { className: "circular-progress-main-color", color: "primary" })
|
|
1417
1442
|
)), props.rows && props.rows.length > 0 ? props.rows.map((row, index) => {
|
|
1418
1443
|
const rowColor = props.rowsColorColumn && ObjectbyString(row, props.rowsColorColumn.columnName) === props.rowsColorColumn.columnValue ? `row-color-${props.rowsColorColumn.columnValue}` : props.isStriped && props.rows.length > 1 && index % 2 == 0 ? "main-background-color table-striped" : "";
|
|
1419
1444
|
const isRowSelected = props.isCheckTable?.rowsChecked && isSelected(row.id);
|
|
1420
|
-
return /* @__PURE__ */
|
|
1445
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1421
1446
|
TableRow,
|
|
1422
1447
|
{
|
|
1423
1448
|
className: `table-rows ${rowColor} ${props.onClickRow || props.onClickRowData ? "row-click" : ""}`,
|
|
@@ -1431,7 +1456,7 @@ var SimpleTableComponent = (props) => {
|
|
|
1431
1456
|
props.columns.map((column, columnIndex) => {
|
|
1432
1457
|
const value = column.rowViewFormat ? checkFormat(row, column.rowViewFormat) : ObjectbyString(row, column.id ?? "");
|
|
1433
1458
|
const isItemSelected = column.isCheck && isSelected(row.id);
|
|
1434
|
-
return /* @__PURE__ */
|
|
1459
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1435
1460
|
TableCell,
|
|
1436
1461
|
{
|
|
1437
1462
|
className: `table-cell ${column.cellClassName ? column.cellClassName(row) : ""}`,
|
|
@@ -1444,8 +1469,8 @@ var SimpleTableComponent = (props) => {
|
|
|
1444
1469
|
},
|
|
1445
1470
|
onClick: () => !column.action && !column.isCheck && !column.isActiveFunction ? handleRowClick(row) : ""
|
|
1446
1471
|
},
|
|
1447
|
-
column.label !== "-" && /* @__PURE__ */
|
|
1448
|
-
column.action && Object.keys(row).length > 0 ? /* @__PURE__ */
|
|
1472
|
+
column.label !== "-" && /* @__PURE__ */ React8.createElement(Box, { sx: { display: { xs: "inline-block", md: "none" } }, className: "label-cell" }, column.label),
|
|
1473
|
+
column.action && Object.keys(row).length > 0 ? /* @__PURE__ */ React8.createElement(Box, null, /* @__PURE__ */ React8.createElement(Box, { sx: { display: "flex" }, className: "actions" }, column.rowViewFormat ? /* @__PURE__ */ React8.createElement(Box, { className: "format-value" }, value) : column.action && column.action.map((action, i) => /* @__PURE__ */ React8.createElement(Box, { key: i }, action.onClick && /* @__PURE__ */ React8.createElement(
|
|
1449
1474
|
Box,
|
|
1450
1475
|
{
|
|
1451
1476
|
className: "btn-action main-color-hover",
|
|
@@ -1455,7 +1480,7 @@ var SimpleTableComponent = (props) => {
|
|
|
1455
1480
|
onClick: () => action.onClick && action.onClick(row)
|
|
1456
1481
|
},
|
|
1457
1482
|
action.children
|
|
1458
|
-
), action.onClickId && /* @__PURE__ */
|
|
1483
|
+
), action.onClickId && /* @__PURE__ */ React8.createElement(
|
|
1459
1484
|
Box,
|
|
1460
1485
|
{
|
|
1461
1486
|
className: "btn-action main-color-hover",
|
|
@@ -1465,7 +1490,7 @@ var SimpleTableComponent = (props) => {
|
|
|
1465
1490
|
onClick: () => action.onClickId && action.onClickId(row.id)
|
|
1466
1491
|
},
|
|
1467
1492
|
action.children
|
|
1468
|
-
), !action.onClick && !action.onClickId && /* @__PURE__ */
|
|
1493
|
+
), !action.onClick && !action.onClickId && /* @__PURE__ */ React8.createElement(Box, { className: "btn-action" }, action.children))))) : column.isActiveFunction && Object.keys(row).length > 0 ? /* @__PURE__ */ React8.createElement(
|
|
1469
1494
|
Box,
|
|
1470
1495
|
{
|
|
1471
1496
|
className: "btn-action main-color-hover",
|
|
@@ -1475,30 +1500,30 @@ var SimpleTableComponent = (props) => {
|
|
|
1475
1500
|
onClick: () => column.isActiveFunction && column.isActiveFunction.onClickId(row.id)
|
|
1476
1501
|
},
|
|
1477
1502
|
value ? column.isActiveFunction.activeIcon : column.isActiveFunction.disabledIcon
|
|
1478
|
-
) : column.isCheck && Object.keys(row).length > 0 ? /* @__PURE__ */
|
|
1503
|
+
) : column.isCheck && Object.keys(row).length > 0 ? /* @__PURE__ */ React8.createElement(Box, { className: "checkbox-cell" }, /* @__PURE__ */ React8.createElement(
|
|
1479
1504
|
Checkbox,
|
|
1480
1505
|
{
|
|
1481
1506
|
checked: isItemSelected,
|
|
1482
1507
|
slotProps: { input: { "aria-labelledby": row.id } },
|
|
1483
1508
|
onChange: (event) => props.isCheckTable?.onCheckedAction ? onCheckAction(event, row.id) : onCheckSingleAction(event, row.id)
|
|
1484
1509
|
}
|
|
1485
|
-
)) : column.isEditableTableCell && Object.keys(row).length > 0 ? EditableTableCell(row, value, column.id, column.isEditableTableCell) : column.enumColumn && Object.keys(row).length > 0 ? /* @__PURE__ */
|
|
1510
|
+
)) : column.isEditableTableCell && Object.keys(row).length > 0 ? EditableTableCell(row, value, column.id, column.isEditableTableCell) : column.enumColumn && Object.keys(row).length > 0 ? /* @__PURE__ */ React8.createElement(
|
|
1486
1511
|
Box,
|
|
1487
1512
|
{
|
|
1488
1513
|
className: `${column.enumColumn.hasColor ? `${column.enumColumn.enumSuffix ? `${value.toLowerCase()}-${column.enumColumn.enumSuffix.toLowerCase()}` : value.toString().toLowerCase()}-type-color` : ""} format-value`
|
|
1489
1514
|
},
|
|
1490
1515
|
formatValue(value, column)
|
|
1491
|
-
) : column.isBoolean && Object.keys(row).length > 0 ? /* @__PURE__ */
|
|
1516
|
+
) : column.isBoolean && Object.keys(row).length > 0 ? /* @__PURE__ */ React8.createElement(
|
|
1492
1517
|
Box,
|
|
1493
1518
|
{
|
|
1494
1519
|
className: `${column.isBoolean.hasColor ? `${column.isBoolean.enumSuffix ? `${value.toString().toLowerCase()}-${column.isBoolean.enumSuffix.toLowerCase()}` : value.toString().toLowerCase()}-boolean-color` : ""} format-value`
|
|
1495
1520
|
},
|
|
1496
1521
|
formatValue(value, column)
|
|
1497
|
-
) : /* @__PURE__ */
|
|
1522
|
+
) : /* @__PURE__ */ React8.createElement(Box, { className: `${column.isImage ? "" : "format-value"}` }, formatValue(value, column))
|
|
1498
1523
|
);
|
|
1499
1524
|
})
|
|
1500
1525
|
);
|
|
1501
|
-
}) : !props.loading ? /* @__PURE__ */
|
|
1526
|
+
}) : !props.loading ? /* @__PURE__ */ React8.createElement(TableRow, null, /* @__PURE__ */ React8.createElement(TableCell, { colSpan: props.columns.length }, /* @__PURE__ */ React8.createElement(Box, null, props.values.NO_RESULTS_FOUND))) : /* @__PURE__ */ React8.createElement(TableRow, null))
|
|
1502
1527
|
)
|
|
1503
1528
|
)));
|
|
1504
1529
|
};
|
|
@@ -1518,7 +1543,7 @@ document.head.appendChild(document.createElement("style")).appendChild(document.
|
|
|
1518
1543
|
|
|
1519
1544
|
// src/components/layouts/MainLayoutSimple/MainLayoutSimple.tsx
|
|
1520
1545
|
var MainLayoutSimple = (props) => {
|
|
1521
|
-
return /* @__PURE__ */
|
|
1546
|
+
return /* @__PURE__ */ React8.createElement(Box, { sx: { display: "flex", flexDirection: "row" }, className: "main-layout-simple" }, props.lateralComponent && props.lateralComponent, /* @__PURE__ */ React8.createElement(Box, { className: "main-wrapper", sx: { bgcolor: "background.default" } }, props.headerComponent && props.headerComponent, /* @__PURE__ */ React8.createElement(Box, { className: `${props.lateralComponent ? "split-container" : ""}` }, /* @__PURE__ */ React8.createElement(Container, { maxWidth: false }, props.mainComponent))));
|
|
1522
1547
|
};
|
|
1523
1548
|
|
|
1524
1549
|
// src/components/layouts/SplitLayout/SplitLayout.scss
|
|
@@ -1547,7 +1572,7 @@ var SplitLayout = ({
|
|
|
1547
1572
|
children
|
|
1548
1573
|
}) => {
|
|
1549
1574
|
const heroImageUrl = imgUrl?.trim();
|
|
1550
|
-
return /* @__PURE__ */
|
|
1575
|
+
return /* @__PURE__ */ React8.createElement(Grid, { container: true, className: "split-layout", sx: { minHeight: "100vh" } }, heroImageUrl && /* @__PURE__ */ React8.createElement(
|
|
1551
1576
|
Grid,
|
|
1552
1577
|
{
|
|
1553
1578
|
component: "section",
|
|
@@ -1555,8 +1580,8 @@ var SplitLayout = ({
|
|
|
1555
1580
|
sx: { display: { xs: "none", md: "block" }, position: "relative", overflow: "hidden" },
|
|
1556
1581
|
"aria-hidden": "true"
|
|
1557
1582
|
},
|
|
1558
|
-
/* @__PURE__ */
|
|
1559
|
-
), /* @__PURE__ */
|
|
1583
|
+
/* @__PURE__ */ React8.createElement("img", { src: heroImageUrl, alt: "split-layout-image", className: "split-layout__media-image" })
|
|
1584
|
+
), /* @__PURE__ */ React8.createElement(
|
|
1560
1585
|
Grid,
|
|
1561
1586
|
{
|
|
1562
1587
|
component: "section",
|
|
@@ -1570,16 +1595,16 @@ var SplitLayout = ({
|
|
|
1570
1595
|
p: { xs: 2, sm: 2.5, md: 4 }
|
|
1571
1596
|
}
|
|
1572
1597
|
},
|
|
1573
|
-
/* @__PURE__ */
|
|
1598
|
+
/* @__PURE__ */ React8.createElement(Container, { className: "split-layout__content-wrap" }, children)
|
|
1574
1599
|
));
|
|
1575
1600
|
};
|
|
1576
1601
|
var NavIcon = (props) => {
|
|
1577
1602
|
if (props.iconClassName) {
|
|
1578
|
-
return /* @__PURE__ */
|
|
1603
|
+
return /* @__PURE__ */ React8.createElement(Box, { className: "pcoded-micon" }, /* @__PURE__ */ React8.createElement("i", { className: props.iconClassName }));
|
|
1579
1604
|
} else if (props.iconComponent) {
|
|
1580
|
-
return /* @__PURE__ */
|
|
1605
|
+
return /* @__PURE__ */ React8.createElement(Box, { className: "pcoded-micon" }, props.iconComponent);
|
|
1581
1606
|
}
|
|
1582
|
-
return /* @__PURE__ */
|
|
1607
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null);
|
|
1583
1608
|
};
|
|
1584
1609
|
|
|
1585
1610
|
// src/components/navigation/VerticalNav/VerticalNavItem.tsx
|
|
@@ -1593,7 +1618,7 @@ var VerticalNavItem = (props) => {
|
|
|
1593
1618
|
return null;
|
|
1594
1619
|
}
|
|
1595
1620
|
const isActive = !!matchPath({ path: `${props.item.route}/*` || "" }, pathname);
|
|
1596
|
-
return /* @__PURE__ */
|
|
1621
|
+
return /* @__PURE__ */ React8.createElement(NavLink, { to: props.item.route || "", className: `nav-link-item ${isActive ? "active" : ""}`, onClick: props.onHide }, /* @__PURE__ */ React8.createElement(
|
|
1597
1622
|
Box,
|
|
1598
1623
|
{
|
|
1599
1624
|
sx: (theme) => ({
|
|
@@ -1611,11 +1636,11 @@ var VerticalNavItem = (props) => {
|
|
|
1611
1636
|
}),
|
|
1612
1637
|
className: `nav-item ${isActive ? "main-background-color" : ""}`
|
|
1613
1638
|
},
|
|
1614
|
-
/* @__PURE__ */
|
|
1615
|
-
/* @__PURE__ */
|
|
1639
|
+
/* @__PURE__ */ React8.createElement(NavIcon, { iconClassName: props.item.iconClassName, iconComponent: props.item.iconComponent }),
|
|
1640
|
+
/* @__PURE__ */ React8.createElement(Box, { className: `nav-item-text` }, props.item.title)
|
|
1616
1641
|
));
|
|
1617
1642
|
};
|
|
1618
|
-
var VerticalNavItem_default =
|
|
1643
|
+
var VerticalNavItem_default = React8.memo(VerticalNavItem);
|
|
1619
1644
|
var needsToBeOpened = (pathname, item) => {
|
|
1620
1645
|
if (pathname) {
|
|
1621
1646
|
return isUrlInChildren(item, pathname);
|
|
@@ -1656,19 +1681,19 @@ var VerticalNavItemCollapse = (props) => {
|
|
|
1656
1681
|
if (!hasPermission) {
|
|
1657
1682
|
return null;
|
|
1658
1683
|
}
|
|
1659
|
-
return /* @__PURE__ */
|
|
1684
|
+
return /* @__PURE__ */ React8.createElement(Box, { className: "nav-item-collapse" }, /* @__PURE__ */ React8.createElement(
|
|
1660
1685
|
Box,
|
|
1661
1686
|
{
|
|
1662
1687
|
sx: { p: 2, display: "flex", alignContent: "flex-end", alignItems: "center" },
|
|
1663
1688
|
className: `nav-item ${open ? "open" : ""} ${needsToBeOpened(pathname, props.item) ? "active" : ""}`,
|
|
1664
1689
|
onClick: handleClick
|
|
1665
1690
|
},
|
|
1666
|
-
/* @__PURE__ */
|
|
1667
|
-
/* @__PURE__ */
|
|
1668
|
-
/* @__PURE__ */
|
|
1669
|
-
), props.item.children && Array.isArray(props.item.children) && /* @__PURE__ */
|
|
1691
|
+
/* @__PURE__ */ React8.createElement(NavIcon, { iconClassName: props.item.iconClassName, iconComponent: props.item.iconComponent }),
|
|
1692
|
+
/* @__PURE__ */ React8.createElement(Box, { className: `nav-item-text` }, props.item.title),
|
|
1693
|
+
/* @__PURE__ */ React8.createElement(Box, { sx: { ml: "auto", display: "flex" } }, open ? /* @__PURE__ */ React8.createElement(ExpandMore, null) : /* @__PURE__ */ React8.createElement(ChevronRight, null))
|
|
1694
|
+
), props.item.children && Array.isArray(props.item.children) && /* @__PURE__ */ React8.createElement(Collapse, { in: open, className: "collapse-children" }, /* @__PURE__ */ React8.createElement(Box, null, /* @__PURE__ */ React8.createElement(Grid, { container: true }, props.item.children.map((item) => /* @__PURE__ */ React8.createElement(Grid, { key: item.id, size: 12 }, item.type === 1 /* Collapse */ && /* @__PURE__ */ React8.createElement(VerticalNavItemCollapse, { item, userPermisions: props.userPermisions, onHide: props.onHide }), item.type === 0 /* Item */ && /* @__PURE__ */ React8.createElement(VerticalNavItem_default, { item, userPermisions: props.userPermisions, onHide: props.onHide })))))));
|
|
1670
1695
|
};
|
|
1671
|
-
var VerticalNavItemCollapse_default =
|
|
1696
|
+
var VerticalNavItemCollapse_default = React8.memo(VerticalNavItemCollapse);
|
|
1672
1697
|
|
|
1673
1698
|
// src/components/navigation/VerticalNav/VerticalNav.scss
|
|
1674
1699
|
var css9 = `.vertical-navigation {
|
|
@@ -1730,7 +1755,7 @@ var NavigationType = /* @__PURE__ */ ((NavigationType2) => {
|
|
|
1730
1755
|
return NavigationType2;
|
|
1731
1756
|
})(NavigationType || {});
|
|
1732
1757
|
var VerticalNav = (props) => {
|
|
1733
|
-
return /* @__PURE__ */
|
|
1758
|
+
return /* @__PURE__ */ React8.createElement(Grid, { container: true, className: "vertical-navigation" }, props.items.map((item) => /* @__PURE__ */ React8.createElement(Grid, { key: item.id, size: { xs: 12, md: 12 }, className: "grid-item-navigation" }, item.type === 1 /* Collapse */ && /* @__PURE__ */ React8.createElement(VerticalNavItemCollapse_default, { item, userPermisions: props.userPermisions, onHide: props.onHide }), item.type === 0 /* Item */ && /* @__PURE__ */ React8.createElement(VerticalNavItem_default, { item, userPermisions: props.userPermisions, onHide: props.onHide }))));
|
|
1734
1759
|
};
|
|
1735
1760
|
|
|
1736
1761
|
// src/components/navigation/components/UserInfo.scss
|
|
@@ -1742,21 +1767,37 @@ document.head.appendChild(document.createElement("style")).appendChild(document.
|
|
|
1742
1767
|
|
|
1743
1768
|
// src/components/navigation/components/UserInfo.tsx
|
|
1744
1769
|
var UserInfo = (props) => {
|
|
1745
|
-
const [anchorEl, setAnchorEl] =
|
|
1770
|
+
const [anchorEl, setAnchorEl] = React8.useState(null);
|
|
1746
1771
|
const handleClick = (event) => {
|
|
1747
1772
|
setAnchorEl(event.currentTarget);
|
|
1748
1773
|
};
|
|
1749
1774
|
const handleClose = () => {
|
|
1750
1775
|
setAnchorEl(null);
|
|
1751
1776
|
};
|
|
1752
|
-
return /* @__PURE__ */
|
|
1777
|
+
return /* @__PURE__ */ React8.createElement(Box, { className: "user-info" }, /* @__PURE__ */ React8.createElement(Box, { sx: { display: "flex", alignItems: "center" } }, props.photoURL && props.photoURL !== void 0 ? /* @__PURE__ */ React8.createElement(Avatar, { className: "avatar-user", src: props.photoURL }) : /* @__PURE__ */ React8.createElement(
|
|
1753
1778
|
Avatar,
|
|
1754
1779
|
{
|
|
1755
1780
|
className: "avatar-user main-background-color",
|
|
1756
1781
|
sx: { bgcolor: "primary.main", color: "primary.contrastText" }
|
|
1757
1782
|
},
|
|
1758
1783
|
props.displayName.charAt(0).toUpperCase()
|
|
1759
|
-
), /* @__PURE__ */
|
|
1784
|
+
), /* @__PURE__ */ React8.createElement(Box, { sx: { ml: 1, width: "100%", display: "flex", alignItems: "center", alignContent: "flex-end" } }, /* @__PURE__ */ React8.createElement(Box, { className: "user-name" }, props.displayName), props.menuActions && props.menuActions.length > 0 && /* @__PURE__ */ React8.createElement(Box, { sx: { ml: "auto", display: "flex" }, className: "cursor-pointer" }, /* @__PURE__ */ React8.createElement(ExpandMore, { onClick: handleClick }), /* @__PURE__ */ React8.createElement(Menu, { anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose }, props.menuActions.map((item, i) => /* @__PURE__ */ React8.createElement(MenuItem, { key: i, onClick: item.action }, item.title)))))));
|
|
1785
|
+
};
|
|
1786
|
+
var AppBreadcrumbs = (props) => {
|
|
1787
|
+
const matches = useMatches();
|
|
1788
|
+
const crumbs = matches.flatMap((match) => {
|
|
1789
|
+
const breadcrumb = match.handle?.breadcrumb;
|
|
1790
|
+
if (!breadcrumb) return [];
|
|
1791
|
+
const result = typeof breadcrumb === "function" ? breadcrumb(match) : breadcrumb;
|
|
1792
|
+
return Array.isArray(result) ? result : [result];
|
|
1793
|
+
});
|
|
1794
|
+
if (!crumbs.length) {
|
|
1795
|
+
return null;
|
|
1796
|
+
}
|
|
1797
|
+
return /* @__PURE__ */ React8.createElement(Breadcrumbs, { "aria-label": "breadcrumb", separator: props.separator, maxItems: props.maxItems }, crumbs.map((crumb, index) => {
|
|
1798
|
+
const isLast = index === crumbs.length - 1;
|
|
1799
|
+
return isLast || !crumb.to ? /* @__PURE__ */ React8.createElement(Typography, { key: index, variant: "body2", sx: { color: isLast ? "text.primary" : "text.secondary" } }, crumb.label) : /* @__PURE__ */ React8.createElement(Link, { key: index, component: Link$1, to: crumb.to, underline: "hover", variant: "body2", color: "inherit" }, crumb.label);
|
|
1800
|
+
}));
|
|
1760
1801
|
};
|
|
1761
1802
|
|
|
1762
1803
|
// src/components/layouts/Standard/AppSidebar/AppSidebar.scss
|
|
@@ -1772,7 +1813,7 @@ document.head.appendChild(document.createElement("style")).appendChild(document.
|
|
|
1772
1813
|
|
|
1773
1814
|
// src/components/layouts/Standard/AppSidebar/AppSidebar.tsx
|
|
1774
1815
|
var AppSidebar = (props) => {
|
|
1775
|
-
return /* @__PURE__ */
|
|
1816
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
|
|
1776
1817
|
Drawer,
|
|
1777
1818
|
{
|
|
1778
1819
|
anchor: "left",
|
|
@@ -1781,8 +1822,8 @@ var AppSidebar = (props) => {
|
|
|
1781
1822
|
onClose: props.onHide,
|
|
1782
1823
|
sx: { display: { xs: "block", lg: "none" } }
|
|
1783
1824
|
},
|
|
1784
|
-
/* @__PURE__ */
|
|
1785
|
-
), /* @__PURE__ */
|
|
1825
|
+
/* @__PURE__ */ React8.createElement(Box, { sx: { height: "100%" }, className: "app-sidebar" }, /* @__PURE__ */ React8.createElement(Box, { sx: { display: "flex", flexDirection: "column", height: "100vh" } }, props.headerComponents && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Box, { sx: { p: "12px", flexShrink: 0 } }, props.headerComponents), /* @__PURE__ */ React8.createElement(Divider, null)), /* @__PURE__ */ React8.createElement(Box, { sx: { overflow: "auto" } }, props.children), props.footerComponents && /* @__PURE__ */ React8.createElement(Box, { sx: { mt: "auto", flexShrink: 0 } }, props.footerComponents)))
|
|
1826
|
+
), /* @__PURE__ */ React8.createElement(Box, { sx: { display: { xs: "none", lg: "block" } } }, /* @__PURE__ */ React8.createElement(Box, { sx: { height: "100%" }, className: "app-sidebar" }, /* @__PURE__ */ React8.createElement(Box, { sx: { position: "sticky", top: "0" } }, /* @__PURE__ */ React8.createElement(Box, { sx: { display: "flex", flexDirection: "column", height: "100vh" } }, props.headerComponents && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Box, { sx: { p: "12px", flexShrink: 0 } }, props.headerComponents), /* @__PURE__ */ React8.createElement(Divider, null)), /* @__PURE__ */ React8.createElement(Box, { sx: { overflow: "auto" } }, props.children), props.footerComponents && /* @__PURE__ */ React8.createElement(Box, { sx: { mt: "auto", flexShrink: 0 } }, props.footerComponents))))));
|
|
1786
1827
|
};
|
|
1787
1828
|
|
|
1788
1829
|
// src/components/layouts/DrawerLayout/DrawerSidebar/DrawerSidebar.scss
|
|
@@ -1798,7 +1839,7 @@ document.head.appendChild(document.createElement("style")).appendChild(document.
|
|
|
1798
1839
|
|
|
1799
1840
|
// src/components/layouts/DrawerLayout/DrawerSidebar/DrawerSidebar.tsx
|
|
1800
1841
|
var DrawerSidebar = (props) => {
|
|
1801
|
-
return /* @__PURE__ */
|
|
1842
|
+
return /* @__PURE__ */ React8.createElement(Drawer, { anchor: "left", className: "drawer-nav", open: props.open, onClose: props.onHide }, /* @__PURE__ */ React8.createElement(Box, { sx: { height: "100%" }, className: "drawer-sidebar" }, /* @__PURE__ */ React8.createElement(Box, { sx: { display: "flex", flexDirection: "column", height: "100vh" } }, props.headerComponents && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Box, { sx: { p: "12px", flexShrink: 0 } }, props.headerComponents), /* @__PURE__ */ React8.createElement(Divider, null)), /* @__PURE__ */ React8.createElement(Box, { sx: { overflow: "auto" } }, props.children), props.footerComponents && /* @__PURE__ */ React8.createElement(Box, { sx: { mt: "auto", flexShrink: 0 } }, props.footerComponents))));
|
|
1802
1843
|
};
|
|
1803
1844
|
|
|
1804
1845
|
// src/components/layouts/Standard/AppHeader/AppHeader.scss
|
|
@@ -1819,7 +1860,7 @@ document.head.appendChild(document.createElement("style")).appendChild(document.
|
|
|
1819
1860
|
|
|
1820
1861
|
// src/components/layouts/Standard/AppHeader/AppHeader.tsx
|
|
1821
1862
|
var AppHeader = (props) => {
|
|
1822
|
-
return /* @__PURE__ */
|
|
1863
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1823
1864
|
AppBar,
|
|
1824
1865
|
{
|
|
1825
1866
|
position: "sticky",
|
|
@@ -1828,7 +1869,7 @@ var AppHeader = (props) => {
|
|
|
1828
1869
|
},
|
|
1829
1870
|
className: `app-bar main-background-body ${props.className ?? ""}`
|
|
1830
1871
|
},
|
|
1831
|
-
/* @__PURE__ */
|
|
1872
|
+
/* @__PURE__ */ React8.createElement(Toolbar, { className: "app-toolbar" }, props.handleDrawerOpen && /* @__PURE__ */ React8.createElement(
|
|
1832
1873
|
IconButton,
|
|
1833
1874
|
{
|
|
1834
1875
|
sx: { display: { xs: `inline-flex`, lg: props.drawerVisible ? `inline-flex` : `none` } },
|
|
@@ -1837,7 +1878,7 @@ var AppHeader = (props) => {
|
|
|
1837
1878
|
"aria-label": "open drawer",
|
|
1838
1879
|
onClick: props.handleDrawerOpen
|
|
1839
1880
|
},
|
|
1840
|
-
/* @__PURE__ */
|
|
1881
|
+
/* @__PURE__ */ React8.createElement(MenuIcon, null)
|
|
1841
1882
|
), props.children)
|
|
1842
1883
|
);
|
|
1843
1884
|
};
|
|
@@ -1868,7 +1909,7 @@ document.head.appendChild(document.createElement("style")).appendChild(document.
|
|
|
1868
1909
|
// src/components/fields/ButtonComponent/ButtonComponent.tsx
|
|
1869
1910
|
var ButtonComponent = ({ component = "button", ...rest }) => {
|
|
1870
1911
|
const props = { component, ...rest };
|
|
1871
|
-
return /* @__PURE__ */
|
|
1912
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1872
1913
|
Button,
|
|
1873
1914
|
{
|
|
1874
1915
|
type: props.type && props.type,
|
|
@@ -1894,7 +1935,7 @@ var ButtonComponent = ({ component = "button", ...rest }) => {
|
|
|
1894
1935
|
disabled: props.loading || props.disabled,
|
|
1895
1936
|
component: props.component
|
|
1896
1937
|
},
|
|
1897
|
-
props.loading ? /* @__PURE__ */
|
|
1938
|
+
props.loading ? /* @__PURE__ */ React8.createElement(
|
|
1898
1939
|
CircularProgress,
|
|
1899
1940
|
{
|
|
1900
1941
|
className: `${props.reverseColors ? "circular-progress-main-color" : ""}`,
|
|
@@ -1978,7 +2019,7 @@ var TextSimpleComponent = ({
|
|
|
1978
2019
|
}) => {
|
|
1979
2020
|
const props = { noBorders, isFormLabel, ...rest };
|
|
1980
2021
|
function SkeletonCompleteDefault(skeleton) {
|
|
1981
|
-
return skeleton.mineSkeleton ?? /* @__PURE__ */
|
|
2022
|
+
return skeleton.mineSkeleton ?? /* @__PURE__ */ React8.createElement(
|
|
1982
2023
|
Skeleton,
|
|
1983
2024
|
{
|
|
1984
2025
|
width: props.fullWidth ? "auto" : "200px",
|
|
@@ -1988,7 +2029,7 @@ var TextSimpleComponent = ({
|
|
|
1988
2029
|
}
|
|
1989
2030
|
);
|
|
1990
2031
|
}
|
|
1991
|
-
return /* @__PURE__ */
|
|
2032
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1992
2033
|
Box,
|
|
1993
2034
|
{
|
|
1994
2035
|
className: "text-simple-component",
|
|
@@ -1998,8 +2039,8 @@ var TextSimpleComponent = ({
|
|
|
1998
2039
|
},
|
|
1999
2040
|
...props.componentBoxProps
|
|
2000
2041
|
},
|
|
2001
|
-
props.skeletonLabel ? /* @__PURE__ */
|
|
2002
|
-
/* @__PURE__ */
|
|
2042
|
+
props.skeletonLabel ? /* @__PURE__ */ React8.createElement(Skeleton, { width: "10%", animation: "wave" }) : props.label ? props.isFormLabel ? /* @__PURE__ */ React8.createElement(FormLabel, { className: `${props.classNameLabel ?? ""}` }, props.label) : /* @__PURE__ */ React8.createElement(Box, { className: `${props.classNameLabel ?? ""}`, ...props.labelBoxProps }, props.label) : /* @__PURE__ */ React8.createElement(React8.Fragment, null),
|
|
2043
|
+
/* @__PURE__ */ React8.createElement(
|
|
2003
2044
|
Box,
|
|
2004
2045
|
{
|
|
2005
2046
|
sx: {
|
|
@@ -2013,15 +2054,15 @@ var TextSimpleComponent = ({
|
|
|
2013
2054
|
${props.noBorders || props.skeletonValue && props.skeletonValue.useSkeleton ? "no-border" : ""} ${props.error ? "has-error-border" : ""} ${props.startIcon ? "icon-padding" : props.endIcon ? "end-icon-padding" : ""}`,
|
|
2014
2055
|
...props.valueBoxProps
|
|
2015
2056
|
},
|
|
2016
|
-
props.skeletonValue && props.skeletonValue.useSkeleton ? /* @__PURE__ */
|
|
2057
|
+
props.skeletonValue && props.skeletonValue.useSkeleton ? /* @__PURE__ */ React8.createElement(SkeletonCompleteDefault, { ...props.skeletonValue }) : /* @__PURE__ */ React8.createElement(React8.Fragment, null, props.startIcon && /* @__PURE__ */ React8.createElement(Box, { sx: { mr: 1, display: "flex" } }, props.startIcon), props.isLoading ? /* @__PURE__ */ React8.createElement(CircularProgress, { className: "circular-progress-main-color", size: 20, color: "primary" }) : /* @__PURE__ */ React8.createElement(Box, { sx: { width: props.fullWidth ? "100%" : "auto" } }, props.value), props.endIcon && /* @__PURE__ */ React8.createElement(Box, { sx: { ml: props.fullWidth ? "auto" : "1", display: "flex" } }, props.endIcon))
|
|
2017
2058
|
),
|
|
2018
|
-
props.helperText && /* @__PURE__ */
|
|
2059
|
+
props.helperText && /* @__PURE__ */ React8.createElement(
|
|
2019
2060
|
Box,
|
|
2020
2061
|
{
|
|
2021
2062
|
className: `helper-text ${props.error ? "has-error" : ""} ${props.noBorders || props.skeletonValue && props.skeletonValue.useSkeleton ? "no-border" : ""}`,
|
|
2022
2063
|
...props.helperBoxProps
|
|
2023
2064
|
},
|
|
2024
|
-
props.skeletonValue && props.skeletonValue.useSkeleton ? /* @__PURE__ */
|
|
2065
|
+
props.skeletonValue && props.skeletonValue.useSkeleton ? /* @__PURE__ */ React8.createElement(Skeleton, { width: "15%", animation: "wave" }) : props.helperText
|
|
2025
2066
|
)
|
|
2026
2067
|
);
|
|
2027
2068
|
};
|
|
@@ -2130,7 +2171,7 @@ var SelectField = ({
|
|
|
2130
2171
|
const getOptions = () => {
|
|
2131
2172
|
return props.addExtraOption ? [props.addExtraOption, ...props.options] : props.options;
|
|
2132
2173
|
};
|
|
2133
|
-
return /* @__PURE__ */
|
|
2174
|
+
return /* @__PURE__ */ React8.createElement(
|
|
2134
2175
|
Box,
|
|
2135
2176
|
{
|
|
2136
2177
|
className: "select-field",
|
|
@@ -2139,8 +2180,8 @@ var SelectField = ({
|
|
|
2139
2180
|
flexDirection: "column"
|
|
2140
2181
|
}
|
|
2141
2182
|
},
|
|
2142
|
-
props.label && /* @__PURE__ */
|
|
2143
|
-
/* @__PURE__ */
|
|
2183
|
+
props.label && /* @__PURE__ */ React8.createElement(FormLabel, { className: `${props.invalid ? "Mui-error" : ""}` }, props.label),
|
|
2184
|
+
/* @__PURE__ */ React8.createElement(
|
|
2144
2185
|
Select,
|
|
2145
2186
|
{
|
|
2146
2187
|
defaultValue: props.defaultOptions,
|
|
@@ -2172,7 +2213,7 @@ var SelectField = ({
|
|
|
2172
2213
|
styles: buildReactSelectStyles(theme)
|
|
2173
2214
|
}
|
|
2174
2215
|
),
|
|
2175
|
-
props.helperText && /* @__PURE__ */
|
|
2216
|
+
props.helperText && /* @__PURE__ */ React8.createElement(FormHelperText, { error: props.invalid, className: `helper-text ${props.invalid ? "has-error Mui-error" : ""}` }, props.helperText)
|
|
2176
2217
|
);
|
|
2177
2218
|
};
|
|
2178
2219
|
var SelectAsyncField = ({
|
|
@@ -2214,7 +2255,7 @@ var SelectAsyncField = ({
|
|
|
2214
2255
|
}
|
|
2215
2256
|
};
|
|
2216
2257
|
};
|
|
2217
|
-
return /* @__PURE__ */
|
|
2258
|
+
return /* @__PURE__ */ React8.createElement(
|
|
2218
2259
|
Box,
|
|
2219
2260
|
{
|
|
2220
2261
|
className: "select-field",
|
|
@@ -2223,8 +2264,8 @@ var SelectAsyncField = ({
|
|
|
2223
2264
|
flexDirection: "column"
|
|
2224
2265
|
}
|
|
2225
2266
|
},
|
|
2226
|
-
props.label && /* @__PURE__ */
|
|
2227
|
-
/* @__PURE__ */
|
|
2267
|
+
props.label && /* @__PURE__ */ React8.createElement(FormLabel, { className: `${props.invalid ? "Mui-error" : ""}` }, props.label),
|
|
2268
|
+
/* @__PURE__ */ React8.createElement(
|
|
2228
2269
|
AsyncPaginate,
|
|
2229
2270
|
{
|
|
2230
2271
|
defaultValue: props.defaultOptions,
|
|
@@ -2258,7 +2299,7 @@ var SelectAsyncField = ({
|
|
|
2258
2299
|
styles: buildReactSelectStyles(theme)
|
|
2259
2300
|
}
|
|
2260
2301
|
),
|
|
2261
|
-
props.helperText && /* @__PURE__ */
|
|
2302
|
+
props.helperText && /* @__PURE__ */ React8.createElement(FormHelperText, { error: props.invalid, className: `helper-text ${props.invalid ? "has-error Mui-error" : ""}` }, props.helperText)
|
|
2262
2303
|
);
|
|
2263
2304
|
};
|
|
2264
2305
|
var LoginForm = (props) => {
|
|
@@ -2279,12 +2320,12 @@ var LoginForm = (props) => {
|
|
|
2279
2320
|
} = useForm({
|
|
2280
2321
|
resolver: yupResolver(LoginSchema)
|
|
2281
2322
|
});
|
|
2282
|
-
return /* @__PURE__ */
|
|
2323
|
+
return /* @__PURE__ */ React8.createElement(Box, { sx: { m: 2 } }, props.topComponent && /* @__PURE__ */ React8.createElement(Box, { sx: { m: 2 } }, props.topComponent), /* @__PURE__ */ React8.createElement(Box, { sx: { my: 2 } }, /* @__PURE__ */ React8.createElement(Stack, { direction: "column", spacing: 1 }, /* @__PURE__ */ React8.createElement(Box, null, /* @__PURE__ */ React8.createElement(
|
|
2283
2324
|
Controller,
|
|
2284
2325
|
{
|
|
2285
2326
|
control,
|
|
2286
2327
|
name: "login",
|
|
2287
|
-
render: ({ field: { onChange, name, ref: ref2 } }) => /* @__PURE__ */
|
|
2328
|
+
render: ({ field: { onChange, name, ref: ref2 } }) => /* @__PURE__ */ React8.createElement(
|
|
2288
2329
|
TextFieldComponent,
|
|
2289
2330
|
{
|
|
2290
2331
|
label: props.valuesText.labelLogin,
|
|
@@ -2308,12 +2349,12 @@ var LoginForm = (props) => {
|
|
|
2308
2349
|
}
|
|
2309
2350
|
)
|
|
2310
2351
|
}
|
|
2311
|
-
)), /* @__PURE__ */
|
|
2352
|
+
)), /* @__PURE__ */ React8.createElement(Box, null, /* @__PURE__ */ React8.createElement(
|
|
2312
2353
|
Controller,
|
|
2313
2354
|
{
|
|
2314
2355
|
control,
|
|
2315
2356
|
name: "password",
|
|
2316
|
-
render: ({ field: { onChange, name, ref: ref2 } }) => /* @__PURE__ */
|
|
2357
|
+
render: ({ field: { onChange, name, ref: ref2 } }) => /* @__PURE__ */ React8.createElement(
|
|
2317
2358
|
TextFieldComponent,
|
|
2318
2359
|
{
|
|
2319
2360
|
label: props.valuesText.labelPassword,
|
|
@@ -2334,11 +2375,11 @@ var LoginForm = (props) => {
|
|
|
2334
2375
|
}
|
|
2335
2376
|
}
|
|
2336
2377
|
},
|
|
2337
|
-
endIcon: /* @__PURE__ */
|
|
2378
|
+
endIcon: /* @__PURE__ */ React8.createElement(IconButton, { "aria-label": "toggle password visibility", onClick: handleClickShowPassword, size: "small" }, showPassword ? /* @__PURE__ */ React8.createElement(Visibility, null) : /* @__PURE__ */ React8.createElement(VisibilityOff, null))
|
|
2338
2379
|
}
|
|
2339
2380
|
)
|
|
2340
2381
|
}
|
|
2341
|
-
)))), /* @__PURE__ */
|
|
2382
|
+
)))), /* @__PURE__ */ React8.createElement(Box, { sx: { mb: 4 } }, /* @__PURE__ */ React8.createElement(
|
|
2342
2383
|
ButtonComponent,
|
|
2343
2384
|
{
|
|
2344
2385
|
label: props.valuesText.buttonText,
|
|
@@ -2346,7 +2387,7 @@ var LoginForm = (props) => {
|
|
|
2346
2387
|
className: "btn-login",
|
|
2347
2388
|
onClick: handleSubmit(props.onClick)
|
|
2348
2389
|
}
|
|
2349
|
-
)), props.bottomComponent && /* @__PURE__ */
|
|
2390
|
+
)), props.bottomComponent && /* @__PURE__ */ React8.createElement(Box, null, props.bottomComponent));
|
|
2350
2391
|
};
|
|
2351
2392
|
var ChangePasswordForm = (props) => {
|
|
2352
2393
|
const validationSchema = yup2.object().shape({
|
|
@@ -2372,12 +2413,12 @@ var ChangePasswordForm = (props) => {
|
|
|
2372
2413
|
const handleMouseDownPassword = (event) => {
|
|
2373
2414
|
event.preventDefault();
|
|
2374
2415
|
};
|
|
2375
|
-
return /* @__PURE__ */
|
|
2416
|
+
return /* @__PURE__ */ React8.createElement(Box, { sx: { m: 2 } }, props.topComponent && /* @__PURE__ */ React8.createElement(Box, { sx: { m: 2 } }, props.topComponent), /* @__PURE__ */ React8.createElement(Box, { sx: { my: 2 } }, /* @__PURE__ */ React8.createElement(Stack, { direction: "column", spacing: 1 }, /* @__PURE__ */ React8.createElement(Box, null, /* @__PURE__ */ React8.createElement(
|
|
2376
2417
|
Controller,
|
|
2377
2418
|
{
|
|
2378
2419
|
control,
|
|
2379
2420
|
name: "password",
|
|
2380
|
-
render: ({ field: { onChange, name, ref: ref2 } }) => /* @__PURE__ */
|
|
2421
|
+
render: ({ field: { onChange, name, ref: ref2 } }) => /* @__PURE__ */ React8.createElement(
|
|
2381
2422
|
TextFieldComponent,
|
|
2382
2423
|
{
|
|
2383
2424
|
label: props.valuesText.labelPassword,
|
|
@@ -2398,7 +2439,7 @@ var ChangePasswordForm = (props) => {
|
|
|
2398
2439
|
}
|
|
2399
2440
|
}
|
|
2400
2441
|
},
|
|
2401
|
-
endIcon: /* @__PURE__ */
|
|
2442
|
+
endIcon: /* @__PURE__ */ React8.createElement(
|
|
2402
2443
|
IconButton,
|
|
2403
2444
|
{
|
|
2404
2445
|
"aria-label": "toggle password visibility",
|
|
@@ -2406,17 +2447,17 @@ var ChangePasswordForm = (props) => {
|
|
|
2406
2447
|
onMouseDown: handleMouseDownPassword,
|
|
2407
2448
|
size: "small"
|
|
2408
2449
|
},
|
|
2409
|
-
showPassword ? /* @__PURE__ */
|
|
2450
|
+
showPassword ? /* @__PURE__ */ React8.createElement(Visibility, null) : /* @__PURE__ */ React8.createElement(VisibilityOff, null)
|
|
2410
2451
|
)
|
|
2411
2452
|
}
|
|
2412
2453
|
)
|
|
2413
2454
|
}
|
|
2414
|
-
)), /* @__PURE__ */
|
|
2455
|
+
)), /* @__PURE__ */ React8.createElement(Box, null, /* @__PURE__ */ React8.createElement(
|
|
2415
2456
|
Controller,
|
|
2416
2457
|
{
|
|
2417
2458
|
control,
|
|
2418
2459
|
name: "passwordConfirmation",
|
|
2419
|
-
render: ({ field: { onChange, name, ref: ref2 } }) => /* @__PURE__ */
|
|
2460
|
+
render: ({ field: { onChange, name, ref: ref2 } }) => /* @__PURE__ */ React8.createElement(
|
|
2420
2461
|
TextFieldComponent,
|
|
2421
2462
|
{
|
|
2422
2463
|
label: props.valuesText.labelSamePassword,
|
|
@@ -2437,7 +2478,7 @@ var ChangePasswordForm = (props) => {
|
|
|
2437
2478
|
}
|
|
2438
2479
|
}
|
|
2439
2480
|
},
|
|
2440
|
-
endIcon: /* @__PURE__ */
|
|
2481
|
+
endIcon: /* @__PURE__ */ React8.createElement(
|
|
2441
2482
|
IconButton,
|
|
2442
2483
|
{
|
|
2443
2484
|
"aria-label": "toggle password visibility",
|
|
@@ -2445,12 +2486,12 @@ var ChangePasswordForm = (props) => {
|
|
|
2445
2486
|
onMouseDown: handleMouseDownPassword,
|
|
2446
2487
|
size: "small"
|
|
2447
2488
|
},
|
|
2448
|
-
showPassword ? /* @__PURE__ */
|
|
2489
|
+
showPassword ? /* @__PURE__ */ React8.createElement(Visibility, null) : /* @__PURE__ */ React8.createElement(VisibilityOff, null)
|
|
2449
2490
|
)
|
|
2450
2491
|
}
|
|
2451
2492
|
)
|
|
2452
2493
|
}
|
|
2453
|
-
)))), /* @__PURE__ */
|
|
2494
|
+
)))), /* @__PURE__ */ React8.createElement(Box, { sx: { mb: 4 } }, /* @__PURE__ */ React8.createElement(
|
|
2454
2495
|
ButtonComponent,
|
|
2455
2496
|
{
|
|
2456
2497
|
label: props.valuesText.buttonText,
|
|
@@ -2458,7 +2499,7 @@ var ChangePasswordForm = (props) => {
|
|
|
2458
2499
|
onClick: handleSubmit(props.onClick),
|
|
2459
2500
|
loading: props.loading
|
|
2460
2501
|
}
|
|
2461
|
-
)), props.bottomComponent && /* @__PURE__ */
|
|
2502
|
+
)), props.bottomComponent && /* @__PURE__ */ React8.createElement(Box, null, props.bottomComponent));
|
|
2462
2503
|
};
|
|
2463
2504
|
var ResetPasswordForm = (props) => {
|
|
2464
2505
|
const ResetSchema = yup2.object().shape({
|
|
@@ -2473,12 +2514,12 @@ var ResetPasswordForm = (props) => {
|
|
|
2473
2514
|
} = useForm({
|
|
2474
2515
|
resolver: yupResolver(ResetSchema)
|
|
2475
2516
|
});
|
|
2476
|
-
return /* @__PURE__ */
|
|
2517
|
+
return /* @__PURE__ */ React8.createElement(Box, { sx: { m: 2 } }, props.topComponent && /* @__PURE__ */ React8.createElement(Box, { sx: { m: 2 } }, props.topComponent), /* @__PURE__ */ React8.createElement(Box, { sx: { my: 2 } }, /* @__PURE__ */ React8.createElement(
|
|
2477
2518
|
Controller,
|
|
2478
2519
|
{
|
|
2479
2520
|
control,
|
|
2480
2521
|
name: "email",
|
|
2481
|
-
render: ({ field: { onChange, name, ref: ref2 } }) => /* @__PURE__ */
|
|
2522
|
+
render: ({ field: { onChange, name, ref: ref2 } }) => /* @__PURE__ */ React8.createElement(
|
|
2482
2523
|
TextFieldComponent,
|
|
2483
2524
|
{
|
|
2484
2525
|
label: props.valuesText.label,
|
|
@@ -2502,7 +2543,7 @@ var ResetPasswordForm = (props) => {
|
|
|
2502
2543
|
}
|
|
2503
2544
|
)
|
|
2504
2545
|
}
|
|
2505
|
-
)), /* @__PURE__ */
|
|
2546
|
+
)), /* @__PURE__ */ React8.createElement(Box, { sx: { mb: 4 } }, /* @__PURE__ */ React8.createElement(
|
|
2506
2547
|
ButtonComponent,
|
|
2507
2548
|
{
|
|
2508
2549
|
label: props.valuesText.buttonText,
|
|
@@ -2510,7 +2551,7 @@ var ResetPasswordForm = (props) => {
|
|
|
2510
2551
|
onClick: handleSubmit(props.onClick),
|
|
2511
2552
|
loading: props.loading
|
|
2512
2553
|
}
|
|
2513
|
-
)), props.bottomComponent && /* @__PURE__ */
|
|
2554
|
+
)), props.bottomComponent && /* @__PURE__ */ React8.createElement(Box, null, props.bottomComponent));
|
|
2514
2555
|
};
|
|
2515
2556
|
var ModalComponent = ({
|
|
2516
2557
|
modalSize = "sm",
|
|
@@ -2522,7 +2563,7 @@ var ModalComponent = ({
|
|
|
2522
2563
|
...rest
|
|
2523
2564
|
}) => {
|
|
2524
2565
|
const props = { modalSize, fullWidth, loading, dividers, crossAvailable, buttonActionsAlign, ...rest };
|
|
2525
|
-
return /* @__PURE__ */
|
|
2566
|
+
return /* @__PURE__ */ React8.createElement(
|
|
2526
2567
|
Dialog,
|
|
2527
2568
|
{
|
|
2528
2569
|
open: props.setShow,
|
|
@@ -2537,17 +2578,17 @@ var ModalComponent = ({
|
|
|
2537
2578
|
scroll: "body",
|
|
2538
2579
|
slotProps: { paper: { sx: { overflowY: "unset" } } }
|
|
2539
2580
|
},
|
|
2540
|
-
/* @__PURE__ */
|
|
2581
|
+
/* @__PURE__ */ React8.createElement(DialogTitle, { id: "modal-title" }, /* @__PURE__ */ React8.createElement(Box, { sx: { display: "flex", alignItems: "center" } }, props.title, props.onHide && props.crossAvailable && /* @__PURE__ */ React8.createElement(
|
|
2541
2582
|
Box,
|
|
2542
2583
|
{
|
|
2543
2584
|
sx: {
|
|
2544
2585
|
margin: "-1rem -1rem -1rem auto"
|
|
2545
2586
|
}
|
|
2546
2587
|
},
|
|
2547
|
-
/* @__PURE__ */
|
|
2588
|
+
/* @__PURE__ */ React8.createElement(IconButton, { "aria-label": "close", onClick: props.onHide }, /* @__PURE__ */ React8.createElement(Close, null))
|
|
2548
2589
|
))),
|
|
2549
|
-
props.children && /* @__PURE__ */
|
|
2550
|
-
/* @__PURE__ */
|
|
2590
|
+
props.children && /* @__PURE__ */ React8.createElement(DialogContent, { sx: { overflowY: "unset" }, id: "modal-description", dividers: props.dividers }, props.children),
|
|
2591
|
+
/* @__PURE__ */ React8.createElement(DialogActions, { sx: { justifyContent: props.buttonActionsAlign } }, props.cancelButton && /* @__PURE__ */ React8.createElement(
|
|
2551
2592
|
ButtonComponent,
|
|
2552
2593
|
{
|
|
2553
2594
|
disabled: props.loading,
|
|
@@ -2555,7 +2596,7 @@ var ModalComponent = ({
|
|
|
2555
2596
|
onClick: props.cancelButton.onClick ? props.cancelButton.onClick : props.onHide,
|
|
2556
2597
|
...props.cancelButton
|
|
2557
2598
|
}
|
|
2558
|
-
), props.submitButton && /* @__PURE__ */
|
|
2599
|
+
), props.submitButton && /* @__PURE__ */ React8.createElement(
|
|
2559
2600
|
ButtonComponent,
|
|
2560
2601
|
{
|
|
2561
2602
|
className: `btn-modal-submit main-background-color ${props.submitButton.className ? props.submitButton.className : ""}`,
|
|
@@ -2565,12 +2606,104 @@ var ModalComponent = ({
|
|
|
2565
2606
|
))
|
|
2566
2607
|
);
|
|
2567
2608
|
};
|
|
2609
|
+
|
|
2610
|
+
// src/components/modals/Drawers/DetailPanelComponent.scss
|
|
2611
|
+
var css17 = `.detail-panel .MuiDrawer-paper {
|
|
2612
|
+
display: flex;
|
|
2613
|
+
flex-direction: column;
|
|
2614
|
+
}
|
|
2615
|
+
.detail-panel__header {
|
|
2616
|
+
display: flex;
|
|
2617
|
+
align-items: center;
|
|
2618
|
+
justify-content: space-between;
|
|
2619
|
+
}
|
|
2620
|
+
.detail-panel__content {
|
|
2621
|
+
flex: 1;
|
|
2622
|
+
overflow-y: auto;
|
|
2623
|
+
}
|
|
2624
|
+
.detail-panel__actions {
|
|
2625
|
+
display: flex;
|
|
2626
|
+
}
|
|
2627
|
+
.detail-panel ::-webkit-scrollbar {
|
|
2628
|
+
display: block;
|
|
2629
|
+
width: 8px;
|
|
2630
|
+
}
|
|
2631
|
+
.detail-panel ::-webkit-scrollbar-thumb {
|
|
2632
|
+
border-radius: 4px;
|
|
2633
|
+
}
|
|
2634
|
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkRldGFpbFBhbmVsQ29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0U7RUFDRTtFQUNBOztBQUdGO0VBQ0U7RUFDQTtFQUNBOztBQUdGO0VBQ0U7RUFDQTs7QUFHRjtFQUNFOztBQUdGO0VBQ0U7RUFDQTs7QUFHRjtFQUNFIiwic291cmNlc0NvbnRlbnQiOlsiLmRldGFpbC1wYW5lbCB7XHJcbiAgLk11aURyYXdlci1wYXBlciB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcclxuICB9XHJcblxyXG4gICZfX2hlYWRlciB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcclxuICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjtcclxuICB9XHJcblxyXG4gICZfX2NvbnRlbnQge1xyXG4gICAgZmxleDogMTtcclxuICAgIG92ZXJmbG93LXk6IGF1dG87XHJcbiAgfVxyXG5cclxuICAmX19hY3Rpb25zIHtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgfVxyXG5cclxuICA6Oi13ZWJraXQtc2Nyb2xsYmFyIHtcclxuICAgIGRpc3BsYXk6IGJsb2NrO1xyXG4gICAgd2lkdGg6IDhweDtcclxuICB9XHJcblxyXG4gIDo6LXdlYmtpdC1zY3JvbGxiYXItdGh1bWIge1xyXG4gICAgYm9yZGVyLXJhZGl1czogNHB4O1xyXG4gIH1cclxufVxyXG4iXX0= */`;
|
|
2635
|
+
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css17));
|
|
2636
|
+
var DetailPanelComponent = ({
|
|
2637
|
+
open,
|
|
2638
|
+
onClose,
|
|
2639
|
+
title,
|
|
2640
|
+
anchor = "left",
|
|
2641
|
+
actions,
|
|
2642
|
+
children,
|
|
2643
|
+
doublePanel = false,
|
|
2644
|
+
disableBackdropClose = false
|
|
2645
|
+
}) => {
|
|
2646
|
+
return /* @__PURE__ */ React8.createElement(
|
|
2647
|
+
Drawer,
|
|
2648
|
+
{
|
|
2649
|
+
anchor,
|
|
2650
|
+
open,
|
|
2651
|
+
onClose: (_event, reason) => {
|
|
2652
|
+
if (disableBackdropClose && reason === "backdropClick") return;
|
|
2653
|
+
onClose();
|
|
2654
|
+
},
|
|
2655
|
+
className: "detail-panel",
|
|
2656
|
+
slotProps: {
|
|
2657
|
+
paper: {
|
|
2658
|
+
sx: {
|
|
2659
|
+
width: { xs: "100%", sm: "75%" },
|
|
2660
|
+
"& ::-webkit-scrollbar-thumb": { backgroundColor: "primary.main" }
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2663
|
+
}
|
|
2664
|
+
},
|
|
2665
|
+
/* @__PURE__ */ React8.createElement(Box, { className: "detail-panel__header", sx: { px: { xs: 2, md: 3 }, py: 1.5 } }, /* @__PURE__ */ React8.createElement(Typography, { variant: "h6", component: "h2", noWrap: true }, title), /* @__PURE__ */ React8.createElement(IconButton, { "aria-label": "close", onClick: onClose }, /* @__PURE__ */ React8.createElement(Close, null))),
|
|
2666
|
+
/* @__PURE__ */ React8.createElement(Divider, null),
|
|
2667
|
+
/* @__PURE__ */ React8.createElement(
|
|
2668
|
+
Grid,
|
|
2669
|
+
{
|
|
2670
|
+
className: "detail-panel__content",
|
|
2671
|
+
sx: doublePanel ? {
|
|
2672
|
+
display: "grid",
|
|
2673
|
+
gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" },
|
|
2674
|
+
gridTemplateRows: { sm: "minmax(0, 1fr)" },
|
|
2675
|
+
overflowY: { sm: "hidden" },
|
|
2676
|
+
"& > *": { p: { xs: 2, md: 3 }, overflowY: { sm: "auto" } },
|
|
2677
|
+
"& > :first-child": {
|
|
2678
|
+
borderStyle: "solid",
|
|
2679
|
+
borderColor: "divider",
|
|
2680
|
+
borderWidth: { xs: "0 0 1px 0", md: "0 1px 0 0" }
|
|
2681
|
+
}
|
|
2682
|
+
} : { p: { xs: 2, md: 3 } }
|
|
2683
|
+
},
|
|
2684
|
+
children
|
|
2685
|
+
),
|
|
2686
|
+
actions && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Divider, null), /* @__PURE__ */ React8.createElement(
|
|
2687
|
+
Box,
|
|
2688
|
+
{
|
|
2689
|
+
className: "detail-panel__actions",
|
|
2690
|
+
sx: {
|
|
2691
|
+
px: { xs: 2, md: 3 },
|
|
2692
|
+
py: 1.5,
|
|
2693
|
+
gap: 1,
|
|
2694
|
+
justifyContent: anchor === "right" ? "flex-start" : "flex-end"
|
|
2695
|
+
}
|
|
2696
|
+
},
|
|
2697
|
+
actions
|
|
2698
|
+
))
|
|
2699
|
+
);
|
|
2700
|
+
};
|
|
2568
2701
|
var TabsComponent = (props) => {
|
|
2569
|
-
const [value, setValue] =
|
|
2702
|
+
const [value, setValue] = React8.useState(props.tabActive.toString());
|
|
2570
2703
|
const handleChange = (_event, newValue) => {
|
|
2571
2704
|
setValue(newValue);
|
|
2572
2705
|
};
|
|
2573
|
-
return /* @__PURE__ */
|
|
2706
|
+
return /* @__PURE__ */ React8.createElement(MainWrapperComponent, null, /* @__PURE__ */ React8.createElement(Box, { className: "tabs-component" }, /* @__PURE__ */ React8.createElement(TabContext, { value }, /* @__PURE__ */ React8.createElement(TabList, { onChange: handleChange }, props.tabs.sort((a, b) => a.value - b.value).map((tabLabel) => /* @__PURE__ */ React8.createElement(
|
|
2574
2707
|
Tab,
|
|
2575
2708
|
{
|
|
2576
2709
|
classes: { selected: "main-background-color" },
|
|
@@ -2579,7 +2712,7 @@ var TabsComponent = (props) => {
|
|
|
2579
2712
|
label: tabLabel.label,
|
|
2580
2713
|
value: tabLabel.value.toString()
|
|
2581
2714
|
}
|
|
2582
|
-
))), props.tabsComponent.sort((a, b) => a.value - b.value).map((tabComponent) => /* @__PURE__ */
|
|
2715
|
+
))), props.tabsComponent.sort((a, b) => a.value - b.value).map((tabComponent) => /* @__PURE__ */ React8.createElement(TabPanel, { key: tabComponent.value, value: tabComponent.value.toString() }, tabComponent.component)))));
|
|
2583
2716
|
};
|
|
2584
2717
|
var toDayjs = (v, format) => {
|
|
2585
2718
|
if (v == null || v === "") return null;
|
|
@@ -2599,8 +2732,8 @@ var DatePickerComponent = ({
|
|
|
2599
2732
|
format,
|
|
2600
2733
|
...rest
|
|
2601
2734
|
}) => {
|
|
2602
|
-
const [value, setValue] =
|
|
2603
|
-
const [hover, setHover] =
|
|
2735
|
+
const [value, setValue] = React8.useState(toDayjs(valueProp, format));
|
|
2736
|
+
const [hover, setHover] = React8.useState(false);
|
|
2604
2737
|
useEffect(() => {
|
|
2605
2738
|
setValue(toDayjs(valueProp, format));
|
|
2606
2739
|
}, [valueProp, format]);
|
|
@@ -2616,7 +2749,7 @@ var DatePickerComponent = ({
|
|
|
2616
2749
|
onMouseLeave,
|
|
2617
2750
|
...textFieldRest
|
|
2618
2751
|
} = textField ?? {};
|
|
2619
|
-
return /* @__PURE__ */
|
|
2752
|
+
return /* @__PURE__ */ React8.createElement(Box, { className: "data-picker-component", sx: { width: "100%" } }, /* @__PURE__ */ React8.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs }, /* @__PURE__ */ React8.createElement(
|
|
2620
2753
|
DatePicker,
|
|
2621
2754
|
{
|
|
2622
2755
|
...rest,
|
|
@@ -2681,7 +2814,7 @@ var DatePickerComponent = ({
|
|
|
2681
2814
|
};
|
|
2682
2815
|
|
|
2683
2816
|
// src/components/wrappers/CardComponent/CardComponent.scss
|
|
2684
|
-
var
|
|
2817
|
+
var css18 = `.card-component {
|
|
2685
2818
|
box-shadow: 0 1px 20px 0 rgba(69, 90, 100, 0.08);
|
|
2686
2819
|
}
|
|
2687
2820
|
.card-component.gradiant-green {
|
|
@@ -2703,13 +2836,13 @@ var css17 = `.card-component {
|
|
|
2703
2836
|
color: white;
|
|
2704
2837
|
}
|
|
2705
2838
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNhcmRDb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJOztBQUdBO0VBQ0k7RUFDQTs7QUFFSjtFQUNJO0VBQ0E7O0FBRUo7RUFDSTtFQUNBOztBQUVKO0VBQ0k7O0FBRUo7RUFDSSIsInNvdXJjZXNDb250ZW50IjpbIi5jYXJkLWNvbXBvbmVudHtcclxuICAgIGJveC1zaGFkb3c6IDAgMXB4IDIwcHggMCByZ2IoNjkgOTAgMTAwIC8gOCUpO1xyXG4gICAgLy9iYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTtcclxuXHJcbiAgICAmLmdyYWRpYW50LWdyZWVue1xyXG4gICAgICAgIGJhY2tncm91bmQ6IGxpbmVhci1ncmFkaWVudCgtMTM1ZGVnLCAjMWRlOWI2LCAjMWRjNGU5KTtcclxuICAgICAgICBjb2xvcjogd2hpdGU7XHJcbiAgICB9XHJcbiAgICAmLmdyYWRpYW50LXZpb2xldHtcclxuICAgICAgICBiYWNrZ3JvdW5kOiBsaW5lYXItZ3JhZGllbnQoLTEzNWRlZywjODk5ZmQ0LCNhMzg5ZDQpO1xyXG4gICAgICAgIGNvbG9yOiB3aGl0ZTtcclxuICAgIH1cclxuICAgICYuZ3JleXtcclxuICAgICAgICBiYWNrZ3JvdW5kOiAjQTlBOUE5O1xyXG4gICAgICAgIGNvbG9yOiB3aGl0ZTtcclxuICAgIH1cclxuICAgICYubWFpbi1iYWNrZ3JvdW5kLWNvbG9ye1xyXG4gICAgICAgIGNvbG9yOiB3aGl0ZTtcclxuICAgIH1cclxuICAgIC5NdWlDaXJjdWxhclByb2dyZXNzLXJvb3R7XHJcbiAgICAgICAgY29sb3I6d2hpdGU7XHJcbiAgICB9XHJcbn0iXX0= */`;
|
|
2706
|
-
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(
|
|
2839
|
+
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css18));
|
|
2707
2840
|
|
|
2708
2841
|
// src/components/wrappers/CardComponent/CardComponent.tsx
|
|
2709
2842
|
var CardComponent = ({ backgroundType = "white", ...rest }) => {
|
|
2710
2843
|
const props = { backgroundType, ...rest };
|
|
2711
2844
|
const isPrimary = props.backgroundType === "primary";
|
|
2712
|
-
return /* @__PURE__ */
|
|
2845
|
+
return /* @__PURE__ */ React8.createElement(
|
|
2713
2846
|
Box,
|
|
2714
2847
|
{
|
|
2715
2848
|
className: `card-component ${props.onClick ? "cursor-pointer" : ""} ${isPrimary ? "" : props.backgroundType}
|
|
@@ -2720,7 +2853,7 @@ var CardComponent = ({ backgroundType = "white", ...rest }) => {
|
|
|
2720
2853
|
},
|
|
2721
2854
|
onClick: props.onClick
|
|
2722
2855
|
},
|
|
2723
|
-
/* @__PURE__ */
|
|
2856
|
+
/* @__PURE__ */ React8.createElement(Box, { sx: { p: 3.125, py: 3.75, height: "100%" } }, props.loading ? /* @__PURE__ */ React8.createElement(Box, { sx: { display: "flex", justifyContent: "center", alignItems: "center", height: "100%" } }, /* @__PURE__ */ React8.createElement(
|
|
2724
2857
|
CircularProgress,
|
|
2725
2858
|
{
|
|
2726
2859
|
className: `${props.backgroundType === "white" ? "circular-progress-main-color" : ""}`,
|
|
@@ -2729,6 +2862,24 @@ var CardComponent = ({ backgroundType = "white", ...rest }) => {
|
|
|
2729
2862
|
)) : props.children && props.children)
|
|
2730
2863
|
);
|
|
2731
2864
|
};
|
|
2865
|
+
var SnackbarComponent = ({
|
|
2866
|
+
open,
|
|
2867
|
+
message,
|
|
2868
|
+
onClose,
|
|
2869
|
+
severity = "info",
|
|
2870
|
+
autoHideDuration = 5e3,
|
|
2871
|
+
anchorOrigin = { vertical: "bottom", horizontal: "right" },
|
|
2872
|
+
action
|
|
2873
|
+
}) => /* @__PURE__ */ React8.createElement(
|
|
2874
|
+
Snackbar,
|
|
2875
|
+
{
|
|
2876
|
+
open,
|
|
2877
|
+
autoHideDuration,
|
|
2878
|
+
anchorOrigin,
|
|
2879
|
+
onClose: (_, reason) => reason !== "clickaway" && onClose()
|
|
2880
|
+
},
|
|
2881
|
+
/* @__PURE__ */ React8.createElement(Alert, { severity, variant: "filled", onClose, action, sx: { width: "100%" } }, message)
|
|
2882
|
+
);
|
|
2732
2883
|
|
|
2733
2884
|
// src/interfaces/search/SearchFilters.tsx
|
|
2734
2885
|
var SearchBaseDefaults = {
|
|
@@ -2739,6 +2890,6 @@ var SearchBaseDefaults = {
|
|
|
2739
2890
|
orderAsc: true
|
|
2740
2891
|
};
|
|
2741
2892
|
|
|
2742
|
-
export { AppHeader, AppSidebar, ButtonComponent, CardComponent, ChangePasswordForm, DatePickerComponent, DrawerSidebar, GroupBy, LinearProgressComponent, LoginForm, MainLayoutSimple, MainWrapperComponent, ModalComponent, NavigationType, PublicFormWrapper, ResetPasswordForm, SearchBaseDefaults, SearchComponent, SelectAsyncField, SelectField, SimpleTableComponent, SplitLayout, TableComponent, TabsComponent, TextFieldComponent, TextSimpleComponent, UserInfo, VerticalNav, checkPermission, clearSession, downloadFileBlob, getImageByBase64, getImageByBlob, getJwtToken, getSession, redirectDownload, saveSession, toBase64, useIsMounted, usePrevious };
|
|
2893
|
+
export { AppBreadcrumbs, AppHeader, AppSidebar, ButtonComponent, CardComponent, ChangePasswordForm, DatePickerComponent, DetailPanelComponent, DrawerSidebar, GroupBy, LinearProgressComponent, LoginForm, MainLayoutSimple, MainWrapperComponent, ModalComponent, NavigationType, NotificationContainer, PublicFormWrapper, ResetPasswordForm, SearchBaseDefaults, SearchComponent, SelectAsyncField, SelectField, SimpleTableComponent, SnackbarComponent, SplitLayout, TableComponent, TabsComponent, TextFieldComponent, TextSimpleComponent, UserInfo, VerticalNav, addNotification, checkPermission, clearSession, downloadFileBlob, getImageByBase64, getImageByBlob, getJwtToken, getSession, redirectDownload, removeNotification, saveSession, toBase64, useIsMounted, usePrevious };
|
|
2743
2894
|
//# sourceMappingURL=index.mjs.map
|
|
2744
2895
|
//# sourceMappingURL=index.mjs.map
|