@natoora-libs/core 0.0.32 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.cjs +572 -677
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +54 -64
- package/dist/components/index.d.ts +54 -64
- package/dist/components/index.js +480 -584
- package/dist/components/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -39,7 +39,6 @@ __export(components_exports, {
|
|
|
39
39
|
Date: () => Date_default,
|
|
40
40
|
DeleteSubstitutionDialogContent: () => DeleteSubstitutionDialogContent_default,
|
|
41
41
|
DeleteUserDialogContent: () => DeleteUserDialogContent_default,
|
|
42
|
-
DesktopContainer: () => DesktopContainer_default,
|
|
43
42
|
ExtendedButton: () => ExtendedButton_default,
|
|
44
43
|
FilledButton: () => FilledButton_default,
|
|
45
44
|
FilledButtonLg: () => FilledButtonLg_default,
|
|
@@ -400,7 +399,7 @@ var BackHeader_default = BackHeader;
|
|
|
400
399
|
|
|
401
400
|
// src/components/BottomBar/BottomBar.tsx
|
|
402
401
|
var import_material6 = require("@mui/material");
|
|
403
|
-
var
|
|
402
|
+
var import_prop_types2 = require("prop-types");
|
|
404
403
|
var import_mui5 = require("tss-react/mui");
|
|
405
404
|
|
|
406
405
|
// src/components/Buttons/ExtendedButton/ExtendedButton.tsx
|
|
@@ -410,7 +409,6 @@ var import_Apps = __toESM(require("@mui/icons-material/Apps"), 1);
|
|
|
410
409
|
var import_material5 = require("@mui/material");
|
|
411
410
|
var import_Button = __toESM(require("@mui/material/Button"), 1);
|
|
412
411
|
var import_Tooltip = __toESM(require("@mui/material/Tooltip"), 1);
|
|
413
|
-
var import_prop_types2 = require("prop-types");
|
|
414
412
|
var import_mui4 = require("tss-react/mui");
|
|
415
413
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
416
414
|
var useStyles4 = (0, import_mui4.makeStyles)()((theme) => ({
|
|
@@ -474,18 +472,18 @@ var useStyles4 = (0, import_mui4.makeStyles)()((theme) => ({
|
|
|
474
472
|
}
|
|
475
473
|
}));
|
|
476
474
|
var ExtendedButton = ({
|
|
477
|
-
buttonType,
|
|
475
|
+
buttonType = "button",
|
|
478
476
|
className,
|
|
479
|
-
color,
|
|
477
|
+
color = "default",
|
|
480
478
|
copy,
|
|
481
|
-
disabled,
|
|
482
|
-
href,
|
|
483
|
-
onClick,
|
|
484
|
-
subcopy,
|
|
485
|
-
type,
|
|
486
|
-
variant,
|
|
487
|
-
component,
|
|
488
|
-
tooltip
|
|
479
|
+
disabled = false,
|
|
480
|
+
href = "",
|
|
481
|
+
onClick = void 0,
|
|
482
|
+
subcopy = void 0,
|
|
483
|
+
type = void 0,
|
|
484
|
+
variant = "outlined",
|
|
485
|
+
component = "button",
|
|
486
|
+
tooltip = ""
|
|
489
487
|
}) => {
|
|
490
488
|
const { classes, cx } = useStyles4();
|
|
491
489
|
const icons2 = {
|
|
@@ -503,12 +501,13 @@ var ExtendedButton = ({
|
|
|
503
501
|
download: import_icons_material.GetApp,
|
|
504
502
|
publish: import_icons_material.Publish
|
|
505
503
|
};
|
|
506
|
-
const
|
|
504
|
+
const muiColor = color === "noOutline" || color === "default" ? void 0 : color;
|
|
505
|
+
const IconComponent = type ? icons2[type] : null;
|
|
507
506
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Tooltip.default, { title: tooltip, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
508
507
|
import_Button.default,
|
|
509
508
|
{
|
|
510
509
|
className: cx(classes[color], className),
|
|
511
|
-
color:
|
|
510
|
+
color: muiColor,
|
|
512
511
|
component,
|
|
513
512
|
"data-testid": copy ? `extended-button-${copy.toLowerCase()}` : "extended-button",
|
|
514
513
|
disabled,
|
|
@@ -517,7 +516,7 @@ var ExtendedButton = ({
|
|
|
517
516
|
type: buttonType,
|
|
518
517
|
variant,
|
|
519
518
|
children: [
|
|
520
|
-
|
|
519
|
+
IconComponent && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconComponent, { fontSize: "small", className: classes.icon }),
|
|
521
520
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: classes.copy, children: [
|
|
522
521
|
copy,
|
|
523
522
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: subcopy })
|
|
@@ -526,47 +525,6 @@ var ExtendedButton = ({
|
|
|
526
525
|
}
|
|
527
526
|
) }) });
|
|
528
527
|
};
|
|
529
|
-
ExtendedButton.defaultProps = {
|
|
530
|
-
buttonType: "button",
|
|
531
|
-
color: "default",
|
|
532
|
-
disabled: false,
|
|
533
|
-
href: "",
|
|
534
|
-
tooltip: "",
|
|
535
|
-
component: "button",
|
|
536
|
-
type: void 0,
|
|
537
|
-
className: void 0,
|
|
538
|
-
onClick: void 0,
|
|
539
|
-
subcopy: void 0,
|
|
540
|
-
variant: "outlined"
|
|
541
|
-
};
|
|
542
|
-
ExtendedButton.propTypes = {
|
|
543
|
-
buttonType: (0, import_prop_types2.oneOf)(["button", "submit"]),
|
|
544
|
-
className: import_prop_types2.string,
|
|
545
|
-
color: (0, import_prop_types2.oneOf)(["default", "inherit", "primary", "secondary", "noOutline"]),
|
|
546
|
-
copy: import_prop_types2.string.isRequired,
|
|
547
|
-
disabled: import_prop_types2.bool,
|
|
548
|
-
href: import_prop_types2.string,
|
|
549
|
-
onClick: import_prop_types2.func,
|
|
550
|
-
subcopy: import_prop_types2.string,
|
|
551
|
-
tooltip: import_prop_types2.string,
|
|
552
|
-
component: import_prop_types2.string,
|
|
553
|
-
type: (0, import_prop_types2.oneOf)([
|
|
554
|
-
"add",
|
|
555
|
-
"apps",
|
|
556
|
-
"childCare",
|
|
557
|
-
"delete",
|
|
558
|
-
"edit",
|
|
559
|
-
"importExport",
|
|
560
|
-
"notes",
|
|
561
|
-
"print",
|
|
562
|
-
"save",
|
|
563
|
-
"upload",
|
|
564
|
-
"refresh",
|
|
565
|
-
"download",
|
|
566
|
-
"publish"
|
|
567
|
-
]),
|
|
568
|
-
variant: (0, import_prop_types2.oneOf)(["contained", "outlined", "text"])
|
|
569
|
-
};
|
|
570
528
|
var ExtendedButton_default = (0, import_react2.memo)(ExtendedButton);
|
|
571
529
|
|
|
572
530
|
// src/components/BottomBar/BottomBar.tsx
|
|
@@ -620,10 +578,10 @@ BottomBar.defaultProps = {
|
|
|
620
578
|
onRefreshClick: null
|
|
621
579
|
};
|
|
622
580
|
BottomBar.propTypes = {
|
|
623
|
-
className:
|
|
624
|
-
children:
|
|
625
|
-
isLoading:
|
|
626
|
-
onRefreshClick:
|
|
581
|
+
className: import_prop_types2.string,
|
|
582
|
+
children: import_prop_types2.node,
|
|
583
|
+
isLoading: import_prop_types2.bool,
|
|
584
|
+
onRefreshClick: import_prop_types2.func
|
|
627
585
|
};
|
|
628
586
|
var BottomBar_default = BottomBar;
|
|
629
587
|
|
|
@@ -633,7 +591,7 @@ var import_material7 = require("@mui/material");
|
|
|
633
591
|
var import_green = __toESM(require("@mui/material/colors/green"), 1);
|
|
634
592
|
var import_orange = __toESM(require("@mui/material/colors/orange"), 1);
|
|
635
593
|
var import_red = __toESM(require("@mui/material/colors/red"), 1);
|
|
636
|
-
var
|
|
594
|
+
var import_prop_types3 = __toESM(require("prop-types"), 1);
|
|
637
595
|
var import_mui6 = require("tss-react/mui");
|
|
638
596
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
639
597
|
var useStyles6 = (0, import_mui6.makeStyles)()((theme) => ({
|
|
@@ -710,11 +668,11 @@ var BoxButton = (props) => {
|
|
|
710
668
|
);
|
|
711
669
|
};
|
|
712
670
|
BoxButton.propTypes = {
|
|
713
|
-
label:
|
|
714
|
-
onClick:
|
|
715
|
-
main:
|
|
716
|
-
extra:
|
|
717
|
-
borderColor:
|
|
671
|
+
label: import_prop_types3.default.any,
|
|
672
|
+
onClick: import_prop_types3.default.any,
|
|
673
|
+
main: import_prop_types3.default.any,
|
|
674
|
+
extra: import_prop_types3.default.any,
|
|
675
|
+
borderColor: import_prop_types3.default.any
|
|
718
676
|
};
|
|
719
677
|
var BoxButton_default = import_react3.default.memo(BoxButton);
|
|
720
678
|
|
|
@@ -722,7 +680,7 @@ var BoxButton_default = import_react3.default.memo(BoxButton);
|
|
|
722
680
|
var import_react4 = require("react");
|
|
723
681
|
var import_material8 = require("@mui/material");
|
|
724
682
|
var import_Button2 = __toESM(require("@mui/material/Button"), 1);
|
|
725
|
-
var
|
|
683
|
+
var import_prop_types4 = require("prop-types");
|
|
726
684
|
var import_mui7 = require("tss-react/mui");
|
|
727
685
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
728
686
|
var useStyles7 = (0, import_mui7.makeStyles)()((theme) => ({
|
|
@@ -821,9 +779,9 @@ var FilledButton = ({
|
|
|
821
779
|
);
|
|
822
780
|
};
|
|
823
781
|
FilledButton.propTypes = {
|
|
824
|
-
autoFocus:
|
|
825
|
-
className:
|
|
826
|
-
color: (0,
|
|
782
|
+
autoFocus: import_prop_types4.bool,
|
|
783
|
+
className: import_prop_types4.string,
|
|
784
|
+
color: (0, import_prop_types4.oneOf)([
|
|
827
785
|
"default",
|
|
828
786
|
"error",
|
|
829
787
|
"info",
|
|
@@ -833,13 +791,13 @@ FilledButton.propTypes = {
|
|
|
833
791
|
"success",
|
|
834
792
|
"warning"
|
|
835
793
|
]),
|
|
836
|
-
copy:
|
|
837
|
-
isLoading:
|
|
838
|
-
disabled:
|
|
839
|
-
href:
|
|
840
|
-
onClick:
|
|
841
|
-
type: (0,
|
|
842
|
-
variant: (0,
|
|
794
|
+
copy: import_prop_types4.string.isRequired,
|
|
795
|
+
isLoading: import_prop_types4.bool,
|
|
796
|
+
disabled: import_prop_types4.bool,
|
|
797
|
+
href: import_prop_types4.string,
|
|
798
|
+
onClick: import_prop_types4.func,
|
|
799
|
+
type: (0, import_prop_types4.oneOf)(["button", "submit"]),
|
|
800
|
+
variant: (0, import_prop_types4.oneOf)(["contained", "outlined", "text"])
|
|
843
801
|
};
|
|
844
802
|
var FilledButton_default = (0, import_react4.memo)(FilledButton);
|
|
845
803
|
|
|
@@ -847,7 +805,7 @@ var FilledButton_default = (0, import_react4.memo)(FilledButton);
|
|
|
847
805
|
var import_react5 = __toESM(require("react"), 1);
|
|
848
806
|
var import_material9 = require("@mui/material");
|
|
849
807
|
var import_Button3 = __toESM(require("@mui/material/Button"), 1);
|
|
850
|
-
var
|
|
808
|
+
var import_prop_types5 = __toESM(require("prop-types"), 1);
|
|
851
809
|
var import_mui8 = require("tss-react/mui");
|
|
852
810
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
853
811
|
var FilledButtonLg = ({
|
|
@@ -951,17 +909,17 @@ var ActionButtonLg = (0, import_mui8.withStyles)(FilledButtonLg, (theme) => ({
|
|
|
951
909
|
}
|
|
952
910
|
}));
|
|
953
911
|
FilledButtonLg.propTypes = {
|
|
954
|
-
classes:
|
|
955
|
-
disabled:
|
|
956
|
-
variant:
|
|
957
|
-
color:
|
|
958
|
-
copy:
|
|
959
|
-
handleClick:
|
|
960
|
-
loading:
|
|
961
|
-
loadingProps:
|
|
962
|
-
color:
|
|
963
|
-
size:
|
|
964
|
-
style:
|
|
912
|
+
classes: import_prop_types5.default.any,
|
|
913
|
+
disabled: import_prop_types5.default.any,
|
|
914
|
+
variant: import_prop_types5.default.string,
|
|
915
|
+
color: import_prop_types5.default.string,
|
|
916
|
+
copy: import_prop_types5.default.any,
|
|
917
|
+
handleClick: import_prop_types5.default.any,
|
|
918
|
+
loading: import_prop_types5.default.bool,
|
|
919
|
+
loadingProps: import_prop_types5.default.shape({
|
|
920
|
+
color: import_prop_types5.default.oneOf(["primary", "secondary", "inherit"]),
|
|
921
|
+
size: import_prop_types5.default.number,
|
|
922
|
+
style: import_prop_types5.default.string
|
|
965
923
|
})
|
|
966
924
|
};
|
|
967
925
|
var FilledButtonLg_default = import_react5.default.memo(ActionButtonLg);
|
|
@@ -970,7 +928,7 @@ var FilledButtonLg_default = import_react5.default.memo(ActionButtonLg);
|
|
|
970
928
|
var import_react6 = __toESM(require("react"), 1);
|
|
971
929
|
var import_Button4 = __toESM(require("@mui/material/Button"), 1);
|
|
972
930
|
var import_CircularProgress = __toESM(require("@mui/material/CircularProgress"), 1);
|
|
973
|
-
var
|
|
931
|
+
var import_prop_types6 = require("prop-types");
|
|
974
932
|
var import_mui9 = require("tss-react/mui");
|
|
975
933
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
976
934
|
var useStyles8 = (0, import_mui9.makeStyles)()((theme) => ({
|
|
@@ -1090,17 +1048,17 @@ var OutlinedButton = ({
|
|
|
1090
1048
|
);
|
|
1091
1049
|
};
|
|
1092
1050
|
OutlinedButton.propTypes = {
|
|
1093
|
-
className:
|
|
1094
|
-
color:
|
|
1095
|
-
copy: (0,
|
|
1096
|
-
disabled:
|
|
1097
|
-
href:
|
|
1098
|
-
isLoading:
|
|
1099
|
-
onClick:
|
|
1100
|
-
startIcon:
|
|
1101
|
-
style: (0,
|
|
1102
|
-
subcopy:
|
|
1103
|
-
type: (0,
|
|
1051
|
+
className: import_prop_types6.string,
|
|
1052
|
+
color: import_prop_types6.string,
|
|
1053
|
+
copy: (0, import_prop_types6.oneOfType)([import_prop_types6.number, import_prop_types6.string]).isRequired,
|
|
1054
|
+
disabled: import_prop_types6.bool,
|
|
1055
|
+
href: import_prop_types6.string,
|
|
1056
|
+
isLoading: import_prop_types6.bool,
|
|
1057
|
+
onClick: import_prop_types6.func,
|
|
1058
|
+
startIcon: import_prop_types6.node,
|
|
1059
|
+
style: (0, import_prop_types6.shape)({}),
|
|
1060
|
+
subcopy: import_prop_types6.string,
|
|
1061
|
+
type: (0, import_prop_types6.oneOf)(["button", "submit"])
|
|
1104
1062
|
};
|
|
1105
1063
|
var OutlinedButton_default = import_react6.default.memo(OutlinedButton);
|
|
1106
1064
|
|
|
@@ -2789,55 +2747,156 @@ var DeleteUserDialogContent = ({
|
|
|
2789
2747
|
};
|
|
2790
2748
|
var DeleteUserDialogContent_default = import_react53.default.memo(DeleteUserDialogContent);
|
|
2791
2749
|
|
|
2792
|
-
// src/components/
|
|
2793
|
-
var import_material15 = require("@mui/material");
|
|
2794
|
-
var import_mui16 = require("tss-react/mui");
|
|
2795
|
-
|
|
2796
|
-
// src/components/TheToolbar/TheToolbar.tsx
|
|
2797
|
-
var import_react58 = __toESM(require("react"), 1);
|
|
2750
|
+
// src/components/Dialog/TwoButtonDialog.tsx
|
|
2798
2751
|
var import_material14 = require("@mui/material");
|
|
2752
|
+
var import_Fade = __toESM(require("@mui/material/Fade"), 1);
|
|
2799
2753
|
var import_mui15 = require("tss-react/mui");
|
|
2800
2754
|
|
|
2755
|
+
// src/components/Loading/Loading.tsx
|
|
2756
|
+
var import_material13 = require("@mui/material");
|
|
2757
|
+
var import_mui14 = require("tss-react/mui");
|
|
2758
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2759
|
+
var useStyles13 = (0, import_mui14.makeStyles)()(() => ({
|
|
2760
|
+
wrapper: {
|
|
2761
|
+
/**
|
|
2762
|
+
* MUI Dialogs have z-index = 1300
|
|
2763
|
+
*/
|
|
2764
|
+
zIndex: 1301,
|
|
2765
|
+
backgroundColor: isDarkModeEnabled3 ? "rgba(0, 0, 0, 0.5)" : "rgba(255, 255, 255, 0.8)"
|
|
2766
|
+
}
|
|
2767
|
+
}));
|
|
2768
|
+
var Loading = ({ isLoading }) => {
|
|
2769
|
+
const { classes } = useStyles13();
|
|
2770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2771
|
+
import_material13.Backdrop,
|
|
2772
|
+
{
|
|
2773
|
+
"aria-hidden": !isLoading,
|
|
2774
|
+
className: classes.wrapper,
|
|
2775
|
+
open: isLoading,
|
|
2776
|
+
"data-testid": "backdrop-loading",
|
|
2777
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_material13.CircularProgress, { color: "primary" })
|
|
2778
|
+
}
|
|
2779
|
+
);
|
|
2780
|
+
};
|
|
2781
|
+
var Loading_default = Loading;
|
|
2782
|
+
|
|
2783
|
+
// src/components/Dialog/TwoButtonDialog.tsx
|
|
2784
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2785
|
+
var useStyles14 = (0, import_mui15.makeStyles)()((theme) => ({
|
|
2786
|
+
paper: {
|
|
2787
|
+
padding: theme.spacing(2)
|
|
2788
|
+
},
|
|
2789
|
+
mt: {
|
|
2790
|
+
marginTop: theme.spacing(2)
|
|
2791
|
+
},
|
|
2792
|
+
mb: {
|
|
2793
|
+
marginBottom: theme.spacing(2)
|
|
2794
|
+
},
|
|
2795
|
+
buttonContainer: {
|
|
2796
|
+
display: "flex",
|
|
2797
|
+
justifyContent: "center",
|
|
2798
|
+
marginTop: theme.spacing(1)
|
|
2799
|
+
}
|
|
2800
|
+
}));
|
|
2801
|
+
var TwoButtonDialog = ({
|
|
2802
|
+
confirmButton,
|
|
2803
|
+
dialogLoading = false,
|
|
2804
|
+
title,
|
|
2805
|
+
subtitle1,
|
|
2806
|
+
subtitle2,
|
|
2807
|
+
open,
|
|
2808
|
+
setOpen
|
|
2809
|
+
}) => {
|
|
2810
|
+
const { classes } = useStyles14();
|
|
2811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2812
|
+
import_material14.Dialog,
|
|
2813
|
+
{
|
|
2814
|
+
open,
|
|
2815
|
+
disableEnforceFocus: true,
|
|
2816
|
+
maxWidth: "sm",
|
|
2817
|
+
fullWidth: true,
|
|
2818
|
+
closeAfterTransition: true,
|
|
2819
|
+
BackdropComponent: import_material14.Backdrop,
|
|
2820
|
+
BackdropProps: {
|
|
2821
|
+
timeout: 500
|
|
2822
|
+
},
|
|
2823
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_Fade.default, { in: open, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_material14.Paper, { className: classes.paper, children: [
|
|
2824
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_material14.Box, { className: classes.mb, children: [
|
|
2825
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_material14.Typography, { variant: "h5", component: "div", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2826
|
+
import_material14.Box,
|
|
2827
|
+
{
|
|
2828
|
+
sx: {
|
|
2829
|
+
fontWeight: 600
|
|
2830
|
+
},
|
|
2831
|
+
children: title
|
|
2832
|
+
}
|
|
2833
|
+
) }),
|
|
2834
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
2835
|
+
import_material14.Box,
|
|
2836
|
+
{
|
|
2837
|
+
className: classes.mt,
|
|
2838
|
+
sx: {
|
|
2839
|
+
fontWeight: 600
|
|
2840
|
+
},
|
|
2841
|
+
children: [
|
|
2842
|
+
subtitle1 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_material14.Typography, { variant: "subtitle1", children: subtitle1 }),
|
|
2843
|
+
subtitle2 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_material14.Typography, { variant: "subtitle1", children: subtitle2 })
|
|
2844
|
+
]
|
|
2845
|
+
}
|
|
2846
|
+
)
|
|
2847
|
+
] }),
|
|
2848
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_material14.Divider, {}),
|
|
2849
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_material14.Box, { className: classes.buttonContainer, children: [
|
|
2850
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(FilledButton_default, { copy: "CANCEL", onClick: () => setOpen(false) }),
|
|
2851
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2852
|
+
FilledButton_default,
|
|
2853
|
+
{
|
|
2854
|
+
color: "primary",
|
|
2855
|
+
copy: "CONFIRM",
|
|
2856
|
+
onClick: confirmButton
|
|
2857
|
+
}
|
|
2858
|
+
)
|
|
2859
|
+
] }),
|
|
2860
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Loading_default, { isLoading: dialogLoading })
|
|
2861
|
+
] }) })
|
|
2862
|
+
}
|
|
2863
|
+
);
|
|
2864
|
+
};
|
|
2865
|
+
var TwoButtonDialog_default = TwoButtonDialog;
|
|
2866
|
+
|
|
2801
2867
|
// src/components/LeftDrawer/LeftDrawer.tsx
|
|
2802
2868
|
var import_react57 = __toESM(require("react"), 1);
|
|
2803
|
-
var import_react_redux2 = require("react-redux");
|
|
2804
2869
|
var import_icons_material3 = require("@mui/icons-material");
|
|
2805
|
-
var
|
|
2870
|
+
var import_material15 = require("@mui/material");
|
|
2806
2871
|
var import_Icon = __toESM(require("@mui/material/Icon"), 1);
|
|
2807
|
-
var
|
|
2872
|
+
var import_mui16 = require("tss-react/mui");
|
|
2808
2873
|
|
|
2809
2874
|
// src/components/UserBust/UserBust.tsx
|
|
2810
2875
|
var import_react55 = __toESM(require("react"), 1);
|
|
2811
2876
|
var import_Typography = __toESM(require("@mui/material/Typography"), 1);
|
|
2812
|
-
var import_prop_types9 = __toESM(require("prop-types"), 1);
|
|
2813
2877
|
|
|
2814
2878
|
// src/components/UserAvatar/UserAvatar.tsx
|
|
2815
2879
|
var import_react54 = __toESM(require("react"), 1);
|
|
2816
2880
|
var import_Avatar = __toESM(require("@mui/material/Avatar"), 1);
|
|
2817
|
-
var
|
|
2818
|
-
var
|
|
2819
|
-
var UserAvatar = ({ src, width, height }) => /* @__PURE__ */ (0,
|
|
2881
|
+
var import_prop_types7 = __toESM(require("prop-types"), 1);
|
|
2882
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2883
|
+
var UserAvatar = ({ src, width, height }) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_Avatar.default, { alt: "user_avatar", src, style: { width, height } });
|
|
2820
2884
|
UserAvatar.propTypes = {
|
|
2821
|
-
src:
|
|
2822
|
-
width:
|
|
2823
|
-
height:
|
|
2885
|
+
src: import_prop_types7.default.any,
|
|
2886
|
+
width: import_prop_types7.default.any,
|
|
2887
|
+
height: import_prop_types7.default.any
|
|
2824
2888
|
};
|
|
2825
2889
|
var UserAvatar_default = import_react54.default.memo(UserAvatar);
|
|
2826
2890
|
|
|
2827
2891
|
// src/components/UserBust/UserBust.tsx
|
|
2828
|
-
var
|
|
2829
|
-
var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0,
|
|
2830
|
-
/* @__PURE__ */ (0,
|
|
2831
|
-
/* @__PURE__ */ (0,
|
|
2832
|
-
/* @__PURE__ */ (0,
|
|
2833
|
-
/* @__PURE__ */ (0,
|
|
2892
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2893
|
+
var UserBust = ({ user, avatarProps, typographyProps }) => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { children: [
|
|
2894
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(UserAvatar_default, { ...avatarProps, src: user.profile_picture }),
|
|
2895
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { style: { paddingTop: 16 }, children: [
|
|
2896
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_Typography.default, { ...typographyProps.name, children: `${user.first_name} ${user.last_name}` }),
|
|
2897
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_Typography.default, { ...typographyProps.username, children: user.username })
|
|
2834
2898
|
] })
|
|
2835
2899
|
] });
|
|
2836
|
-
UserBust.propTypes = {
|
|
2837
|
-
user: import_prop_types9.default.any,
|
|
2838
|
-
avatarProps: import_prop_types9.default.any,
|
|
2839
|
-
typographyProps: import_prop_types9.default.any
|
|
2840
|
-
};
|
|
2841
2900
|
var UserBust_default = import_react55.default.memo(UserBust);
|
|
2842
2901
|
|
|
2843
2902
|
// src/components/LeftDrawer/helpers/useGetFilteredDrawerAppList.tsx
|
|
@@ -2880,7 +2939,7 @@ var featureName = {
|
|
|
2880
2939
|
var featureName_default = featureName;
|
|
2881
2940
|
|
|
2882
2941
|
// src/components/LeftDrawer/helpers/drawerAppList.js
|
|
2883
|
-
var
|
|
2942
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2884
2943
|
var drawerAppList = [
|
|
2885
2944
|
{
|
|
2886
2945
|
groupName: "Home",
|
|
@@ -2891,7 +2950,7 @@ var drawerAppList = [
|
|
|
2891
2950
|
alwaysDisplay: true,
|
|
2892
2951
|
featureNames: [],
|
|
2893
2952
|
pinned: null,
|
|
2894
|
-
icon: /* @__PURE__ */ (0,
|
|
2953
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconHome, {}),
|
|
2895
2954
|
url: `/#/`
|
|
2896
2955
|
}
|
|
2897
2956
|
]
|
|
@@ -2905,7 +2964,7 @@ var drawerAppList = [
|
|
|
2905
2964
|
alwaysDisplay: false,
|
|
2906
2965
|
featureNames: [featureName_default.NOTIFICATIONS],
|
|
2907
2966
|
pinned: null,
|
|
2908
|
-
icon: /* @__PURE__ */ (0,
|
|
2967
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconNotification, {}),
|
|
2909
2968
|
url: `/#/notifications`
|
|
2910
2969
|
},
|
|
2911
2970
|
{
|
|
@@ -2914,7 +2973,7 @@ var drawerAppList = [
|
|
|
2914
2973
|
alwaysDisplay: false,
|
|
2915
2974
|
featureNames: [featureName_default.PROMO_CODES],
|
|
2916
2975
|
pinned: null,
|
|
2917
|
-
icon: /* @__PURE__ */ (0,
|
|
2976
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconPromoCode, {}),
|
|
2918
2977
|
url: "/react/promo_codes"
|
|
2919
2978
|
},
|
|
2920
2979
|
{
|
|
@@ -2923,7 +2982,7 @@ var drawerAppList = [
|
|
|
2923
2982
|
alwaysDisplay: false,
|
|
2924
2983
|
featureNames: [featureName_default.SEARCH_CATEGORIES],
|
|
2925
2984
|
pinned: null,
|
|
2926
|
-
icon: /* @__PURE__ */ (0,
|
|
2985
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconSearchCategories, {}),
|
|
2927
2986
|
url: "/react/search-categories"
|
|
2928
2987
|
},
|
|
2929
2988
|
{
|
|
@@ -2932,7 +2991,7 @@ var drawerAppList = [
|
|
|
2932
2991
|
alwaysDisplay: false,
|
|
2933
2992
|
featureNames: ["cms"],
|
|
2934
2993
|
pinned: null,
|
|
2935
|
-
icon: /* @__PURE__ */ (0,
|
|
2994
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconContentManagement, {}),
|
|
2936
2995
|
url: "/react/content-management"
|
|
2937
2996
|
}
|
|
2938
2997
|
]
|
|
@@ -2946,7 +3005,7 @@ var drawerAppList = [
|
|
|
2946
3005
|
alwaysDisplay: false,
|
|
2947
3006
|
featureNames: [featureName_default.AIRCALL],
|
|
2948
3007
|
pinned: "recorded_calls",
|
|
2949
|
-
icon: /* @__PURE__ */ (0,
|
|
3008
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconPhone, {}),
|
|
2950
3009
|
url: "/react/air-call"
|
|
2951
3010
|
},
|
|
2952
3011
|
{
|
|
@@ -2955,7 +3014,7 @@ var drawerAppList = [
|
|
|
2955
3014
|
alwaysDisplay: false,
|
|
2956
3015
|
featureNames: [featureName_default.CUSTOMERS],
|
|
2957
3016
|
pinned: "customers",
|
|
2958
|
-
icon: /* @__PURE__ */ (0,
|
|
3017
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconAccount, {}),
|
|
2959
3018
|
url: `/#/customer-list`,
|
|
2960
3019
|
children: [
|
|
2961
3020
|
{
|
|
@@ -2978,7 +3037,7 @@ var drawerAppList = [
|
|
|
2978
3037
|
alwaysDisplay: false,
|
|
2979
3038
|
featureNames: [featureName_default.ORDERS],
|
|
2980
3039
|
pinned: "orders",
|
|
2981
|
-
icon: /* @__PURE__ */ (0,
|
|
3040
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconOrders, {}),
|
|
2982
3041
|
url: `/#/orders`
|
|
2983
3042
|
},
|
|
2984
3043
|
{
|
|
@@ -2987,7 +3046,7 @@ var drawerAppList = [
|
|
|
2987
3046
|
alwaysDisplay: false,
|
|
2988
3047
|
featureNames: [featureName_default.PRICE_LIST],
|
|
2989
3048
|
pinned: "price_list",
|
|
2990
|
-
icon: /* @__PURE__ */ (0,
|
|
3049
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconPriceList, {}),
|
|
2991
3050
|
url: `/#/price-list`
|
|
2992
3051
|
},
|
|
2993
3052
|
{
|
|
@@ -2996,7 +3055,7 @@ var drawerAppList = [
|
|
|
2996
3055
|
alwaysDisplay: false,
|
|
2997
3056
|
featureNames: [featureName_default.SPECIAL_PRICES],
|
|
2998
3057
|
pinned: "special_prices",
|
|
2999
|
-
icon: /* @__PURE__ */ (0,
|
|
3058
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconSpecialPrice, {}),
|
|
3000
3059
|
url: `/#/pricing/special-prices`
|
|
3001
3060
|
}
|
|
3002
3061
|
]
|
|
@@ -3010,7 +3069,7 @@ var drawerAppList = [
|
|
|
3010
3069
|
alwaysDisplay: false,
|
|
3011
3070
|
featureNames: [featureName_default.PURCHASE_ORDERS],
|
|
3012
3071
|
pinned: "purchase_orders",
|
|
3013
|
-
icon: /* @__PURE__ */ (0,
|
|
3072
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconBuying, {}),
|
|
3014
3073
|
url: "/react/purchase-orders"
|
|
3015
3074
|
},
|
|
3016
3075
|
{
|
|
@@ -3019,7 +3078,7 @@ var drawerAppList = [
|
|
|
3019
3078
|
alwaysDisplay: false,
|
|
3020
3079
|
featureNames: [featureName_default.PRODUCTS],
|
|
3021
3080
|
pinned: "products",
|
|
3022
|
-
icon: /* @__PURE__ */ (0,
|
|
3081
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconProducts, {}),
|
|
3023
3082
|
url: `/#/product-base-list`
|
|
3024
3083
|
},
|
|
3025
3084
|
{
|
|
@@ -3028,7 +3087,7 @@ var drawerAppList = [
|
|
|
3028
3087
|
alwaysDisplay: false,
|
|
3029
3088
|
featureNames: [featureName_default.SUPPLIERS],
|
|
3030
3089
|
pinned: "suppliers",
|
|
3031
|
-
icon: /* @__PURE__ */ (0,
|
|
3090
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconSupplier, {}),
|
|
3032
3091
|
url: "/react/suppliers"
|
|
3033
3092
|
},
|
|
3034
3093
|
{
|
|
@@ -3037,7 +3096,7 @@ var drawerAppList = [
|
|
|
3037
3096
|
alwaysDisplay: false,
|
|
3038
3097
|
featureNames: [featureName_default.SUPPLIER_PRICES],
|
|
3039
3098
|
pinned: "supplier_prices",
|
|
3040
|
-
icon: /* @__PURE__ */ (0,
|
|
3099
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconSupplierPrices, {}),
|
|
3041
3100
|
url: `/#/supplier-prices`
|
|
3042
3101
|
},
|
|
3043
3102
|
{
|
|
@@ -3046,7 +3105,7 @@ var drawerAppList = [
|
|
|
3046
3105
|
alwaysDisplay: false,
|
|
3047
3106
|
featureNames: [featureName_default.BULK_UPDATE],
|
|
3048
3107
|
pinned: "bulk-update",
|
|
3049
|
-
icon: /* @__PURE__ */ (0,
|
|
3108
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconImport, {}),
|
|
3050
3109
|
url: "/react/bulk_update"
|
|
3051
3110
|
}
|
|
3052
3111
|
]
|
|
@@ -3060,7 +3119,7 @@ var drawerAppList = [
|
|
|
3060
3119
|
alwaysDisplay: false,
|
|
3061
3120
|
featureNames: [featureName_default.GOODS_IN],
|
|
3062
3121
|
pinned: "goods_in",
|
|
3063
|
-
icon: /* @__PURE__ */ (0,
|
|
3122
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconGoodsin, {}),
|
|
3064
3123
|
url: "/react/goodsin-list"
|
|
3065
3124
|
},
|
|
3066
3125
|
{
|
|
@@ -3069,7 +3128,7 @@ var drawerAppList = [
|
|
|
3069
3128
|
alwaysDisplay: false,
|
|
3070
3129
|
featureNames: [featureName_default.RETURNS],
|
|
3071
3130
|
pinned: "goods_in",
|
|
3072
|
-
icon: /* @__PURE__ */ (0,
|
|
3131
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconGoodsin, {}),
|
|
3073
3132
|
url: "/react/returns"
|
|
3074
3133
|
},
|
|
3075
3134
|
{
|
|
@@ -3078,7 +3137,7 @@ var drawerAppList = [
|
|
|
3078
3137
|
alwaysDisplay: false,
|
|
3079
3138
|
featureNames: [featureName_default.KANBAN],
|
|
3080
3139
|
pinned: "kanbancards",
|
|
3081
|
-
icon: /* @__PURE__ */ (0,
|
|
3140
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconVkc, {}),
|
|
3082
3141
|
url: `/#/kanban`
|
|
3083
3142
|
},
|
|
3084
3143
|
{
|
|
@@ -3090,7 +3149,7 @@ var drawerAppList = [
|
|
|
3090
3149
|
featureName: featureName_default.STOCK_MOVEMENTS
|
|
3091
3150
|
}
|
|
3092
3151
|
],
|
|
3093
|
-
icon: /* @__PURE__ */ (0,
|
|
3152
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconLocation, {}),
|
|
3094
3153
|
name: "Stock and Locations",
|
|
3095
3154
|
pinned: "locations",
|
|
3096
3155
|
routeName: "locations",
|
|
@@ -3104,7 +3163,7 @@ var drawerAppList = [
|
|
|
3104
3163
|
alwaysDisplay: false,
|
|
3105
3164
|
featureNames: [featureName_default.PICKING_STATIONS],
|
|
3106
3165
|
pinned: "picking_stations",
|
|
3107
|
-
icon: /* @__PURE__ */ (0,
|
|
3166
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconScales, {}),
|
|
3108
3167
|
url: `/#/pickingstation`
|
|
3109
3168
|
},
|
|
3110
3169
|
{
|
|
@@ -3113,7 +3172,7 @@ var drawerAppList = [
|
|
|
3113
3172
|
alwaysDisplay: false,
|
|
3114
3173
|
featureNames: [featureName_default.QUALITY_CONTROL],
|
|
3115
3174
|
pinned: "quality_control",
|
|
3116
|
-
icon: /* @__PURE__ */ (0,
|
|
3175
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconQc, {}),
|
|
3117
3176
|
url: `/#/quality-control`
|
|
3118
3177
|
},
|
|
3119
3178
|
{
|
|
@@ -3122,7 +3181,7 @@ var drawerAppList = [
|
|
|
3122
3181
|
alwaysDisplay: false,
|
|
3123
3182
|
featureNames: [featureName_default.RETAIL],
|
|
3124
3183
|
pinned: "retail",
|
|
3125
|
-
icon: /* @__PURE__ */ (0,
|
|
3184
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconRetail, {}),
|
|
3126
3185
|
url: `/retail/product-availability`
|
|
3127
3186
|
},
|
|
3128
3187
|
{
|
|
@@ -3131,7 +3190,7 @@ var drawerAppList = [
|
|
|
3131
3190
|
alwaysDisplay: false,
|
|
3132
3191
|
featureNames: [featureName_default.SERVICE_DELIVERY],
|
|
3133
3192
|
pinned: "runs",
|
|
3134
|
-
icon: /* @__PURE__ */ (0,
|
|
3193
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconRuns, {}),
|
|
3135
3194
|
url: `/#/runs`
|
|
3136
3195
|
},
|
|
3137
3196
|
{
|
|
@@ -3140,7 +3199,7 @@ var drawerAppList = [
|
|
|
3140
3199
|
alwaysDisplay: false,
|
|
3141
3200
|
featureNames: [featureName_default.OPS_METRICS],
|
|
3142
3201
|
pinned: "ops-metrics",
|
|
3143
|
-
icon: /* @__PURE__ */ (0,
|
|
3202
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconOpsMetrics, {}),
|
|
3144
3203
|
url: "/react/ops-metrics"
|
|
3145
3204
|
}
|
|
3146
3205
|
]
|
|
@@ -3154,7 +3213,7 @@ var drawerAppList = [
|
|
|
3154
3213
|
alwaysDisplay: false,
|
|
3155
3214
|
featureNames: [featureName_default.ACCOUNTS],
|
|
3156
3215
|
pinned: "accounts",
|
|
3157
|
-
icon: /* @__PURE__ */ (0,
|
|
3216
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconAccounts, {}),
|
|
3158
3217
|
url: `/#/accounts`
|
|
3159
3218
|
},
|
|
3160
3219
|
{
|
|
@@ -3163,7 +3222,7 @@ var drawerAppList = [
|
|
|
3163
3222
|
alwaysDisplay: false,
|
|
3164
3223
|
featureNames: [featureName_default.REPORTS],
|
|
3165
3224
|
pinned: "reports",
|
|
3166
|
-
icon: /* @__PURE__ */ (0,
|
|
3225
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconReports, {}),
|
|
3167
3226
|
url: `/reports`
|
|
3168
3227
|
}
|
|
3169
3228
|
]
|
|
@@ -3177,7 +3236,7 @@ var drawerAppList = [
|
|
|
3177
3236
|
alwaysDisplay: false,
|
|
3178
3237
|
featureNames: [featureName_default.ADMIN],
|
|
3179
3238
|
pinned: "admin",
|
|
3180
|
-
icon: /* @__PURE__ */ (0,
|
|
3239
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconSetting, {}),
|
|
3181
3240
|
url: `/admin`
|
|
3182
3241
|
},
|
|
3183
3242
|
{
|
|
@@ -3186,7 +3245,7 @@ var drawerAppList = [
|
|
|
3186
3245
|
alwaysDisplay: false,
|
|
3187
3246
|
featureNames: [featureName_default.USER_MANAGEMENT],
|
|
3188
3247
|
pinned: "users",
|
|
3189
|
-
icon: /* @__PURE__ */ (0,
|
|
3248
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconUserManagement, {}),
|
|
3190
3249
|
url: "/react/user-management"
|
|
3191
3250
|
},
|
|
3192
3251
|
{
|
|
@@ -3195,7 +3254,7 @@ var drawerAppList = [
|
|
|
3195
3254
|
alwaysDisplay: true,
|
|
3196
3255
|
featureNames: [],
|
|
3197
3256
|
pinned: null,
|
|
3198
|
-
icon: /* @__PURE__ */ (0,
|
|
3257
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(icons_default.SvgIconLogin, {}),
|
|
3199
3258
|
url: "/react/logout"
|
|
3200
3259
|
}
|
|
3201
3260
|
]
|
|
@@ -3255,8 +3314,8 @@ var useGetFilteredDrawerAppList = () => {
|
|
|
3255
3314
|
var useGetFilteredDrawerAppList_default = useGetFilteredDrawerAppList;
|
|
3256
3315
|
|
|
3257
3316
|
// src/components/LeftDrawer/LeftDrawer.tsx
|
|
3258
|
-
var
|
|
3259
|
-
var
|
|
3317
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3318
|
+
var useStyles15 = (0, import_mui16.makeStyles)()((theme) => ({
|
|
3260
3319
|
subheader: {
|
|
3261
3320
|
textTransform: "uppercase",
|
|
3262
3321
|
fontSize: theme.spacing(1.5)
|
|
@@ -3312,9 +3371,14 @@ var useStyles13 = (0, import_mui14.makeStyles)()((theme) => ({
|
|
|
3312
3371
|
}
|
|
3313
3372
|
}
|
|
3314
3373
|
}));
|
|
3315
|
-
var LeftDrawer = ({
|
|
3374
|
+
var LeftDrawer = ({
|
|
3375
|
+
handleClose,
|
|
3376
|
+
handleOpen,
|
|
3377
|
+
onLogout,
|
|
3378
|
+
open,
|
|
3379
|
+
user
|
|
3380
|
+
}) => {
|
|
3316
3381
|
const [openCollapse, setOpenCollapse] = (0, import_react57.useState)({});
|
|
3317
|
-
const dispatch = (0, import_react_redux2.useDispatch)();
|
|
3318
3382
|
const filteredDrawerAppList = useGetFilteredDrawerAppList_default();
|
|
3319
3383
|
const handleCollapse = (e, routeName) => {
|
|
3320
3384
|
e.stopPropagation();
|
|
@@ -3322,9 +3386,9 @@ var LeftDrawer = ({ handleClose, handleOpen, open }) => {
|
|
|
3322
3386
|
tempOpenCollapse[routeName] = !tempOpenCollapse[routeName];
|
|
3323
3387
|
setOpenCollapse(tempOpenCollapse);
|
|
3324
3388
|
};
|
|
3325
|
-
const { classes } =
|
|
3326
|
-
return /* @__PURE__ */ (0,
|
|
3327
|
-
|
|
3389
|
+
const { classes } = useStyles15();
|
|
3390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
3391
|
+
import_material15.SwipeableDrawer,
|
|
3328
3392
|
{
|
|
3329
3393
|
className: classes.drawer,
|
|
3330
3394
|
id: "primary-menu",
|
|
@@ -3332,19 +3396,19 @@ var LeftDrawer = ({ handleClose, handleOpen, open }) => {
|
|
|
3332
3396
|
onOpen: handleOpen,
|
|
3333
3397
|
open,
|
|
3334
3398
|
children: [
|
|
3335
|
-
/* @__PURE__ */ (0,
|
|
3336
|
-
/* @__PURE__ */ (0,
|
|
3399
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_material15.AppBar, { position: "static", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_material15.Toolbar, { className: classes.topBar, children: [
|
|
3400
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3337
3401
|
UserBust_default,
|
|
3338
3402
|
{
|
|
3339
|
-
user
|
|
3403
|
+
user,
|
|
3340
3404
|
avatarProps: { height: 50, width: 50 },
|
|
3341
3405
|
typographyProps: {
|
|
3342
|
-
name: { variant: "subtitle1" },
|
|
3343
|
-
username: { variant: "caption" }
|
|
3406
|
+
name: { variant: "subtitle1", component: "div" },
|
|
3407
|
+
username: { variant: "caption", component: "div" }
|
|
3344
3408
|
}
|
|
3345
3409
|
}
|
|
3346
3410
|
),
|
|
3347
|
-
/* @__PURE__ */ (0,
|
|
3411
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_material15.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3348
3412
|
RoundButton_default,
|
|
3349
3413
|
{
|
|
3350
3414
|
icon: "edit",
|
|
@@ -3355,22 +3419,23 @@ var LeftDrawer = ({ handleClose, handleOpen, open }) => {
|
|
|
3355
3419
|
}
|
|
3356
3420
|
) })
|
|
3357
3421
|
] }) }),
|
|
3358
|
-
/* @__PURE__ */ (0,
|
|
3359
|
-
/* @__PURE__ */ (0,
|
|
3360
|
-
group.apps.map((app) => /* @__PURE__ */ (0,
|
|
3361
|
-
/* @__PURE__ */ (0,
|
|
3362
|
-
|
|
3422
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_material15.List, { children: filteredDrawerAppList.map((group) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react57.default.Fragment, { children: [
|
|
3423
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_material15.ListSubheader, { disableSticky: true, className: classes.subheader, children: group.groupName }),
|
|
3424
|
+
group.apps.map((app) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react57.default.Fragment, { children: [
|
|
3425
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
3426
|
+
import_material15.ListItem,
|
|
3363
3427
|
{
|
|
3364
3428
|
title: app.url,
|
|
3365
3429
|
onClick: () => {
|
|
3366
3430
|
if (app.routeName === "logout") {
|
|
3431
|
+
return onLogout();
|
|
3367
3432
|
}
|
|
3368
3433
|
return window.location.assign(app.url);
|
|
3369
3434
|
},
|
|
3370
3435
|
children: [
|
|
3371
|
-
/* @__PURE__ */ (0,
|
|
3372
|
-
/* @__PURE__ */ (0,
|
|
3373
|
-
|
|
3436
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_material15.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_Icon.default, { className: classes.iconMenu, children: app.icon }) }),
|
|
3437
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3438
|
+
import_material15.ListItemText,
|
|
3374
3439
|
{
|
|
3375
3440
|
className: classes.appName,
|
|
3376
3441
|
primary: app.name,
|
|
@@ -3379,13 +3444,13 @@ var LeftDrawer = ({ handleClose, handleOpen, open }) => {
|
|
|
3379
3444
|
}
|
|
3380
3445
|
}
|
|
3381
3446
|
),
|
|
3382
|
-
app.children?.length > 0 && (openCollapse[app.routeName] ? /* @__PURE__ */ (0,
|
|
3447
|
+
app.children?.length > 0 && (openCollapse[app.routeName] ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3383
3448
|
import_icons_material3.ExpandLess,
|
|
3384
3449
|
{
|
|
3385
3450
|
"data-testid": "svg-close-collapse",
|
|
3386
3451
|
onClick: (e) => handleCollapse(e, app.routeName)
|
|
3387
3452
|
}
|
|
3388
|
-
) : /* @__PURE__ */ (0,
|
|
3453
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3389
3454
|
import_icons_material3.ExpandMore,
|
|
3390
3455
|
{
|
|
3391
3456
|
"data-testid": "svg-open-collapse",
|
|
@@ -3396,17 +3461,17 @@ var LeftDrawer = ({ handleClose, handleOpen, open }) => {
|
|
|
3396
3461
|
},
|
|
3397
3462
|
app.name
|
|
3398
3463
|
),
|
|
3399
|
-
app.children?.length > 0 && /* @__PURE__ */ (0,
|
|
3400
|
-
|
|
3464
|
+
app.children?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_material15.Collapse, { in: openCollapse[app.routeName], children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_material15.List, { children: app.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
3465
|
+
import_material15.ListItemButton,
|
|
3401
3466
|
{
|
|
3402
3467
|
className: classes.nested,
|
|
3403
3468
|
disabled: child.disabled,
|
|
3404
3469
|
onClick: () => window.location.assign(app.url),
|
|
3405
3470
|
title: app.url,
|
|
3406
3471
|
children: [
|
|
3407
|
-
/* @__PURE__ */ (0,
|
|
3408
|
-
/* @__PURE__ */ (0,
|
|
3409
|
-
|
|
3472
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_material15.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_icons_material3.FiberManualRecord, { style: { height: 12 } }) }),
|
|
3473
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3474
|
+
import_material15.ListItemText,
|
|
3410
3475
|
{
|
|
3411
3476
|
primary: child.name,
|
|
3412
3477
|
slotProps: {
|
|
@@ -3426,254 +3491,15 @@ var LeftDrawer = ({ handleClose, handleOpen, open }) => {
|
|
|
3426
3491
|
};
|
|
3427
3492
|
var LeftDrawer_default = (0, import_react57.memo)(LeftDrawer);
|
|
3428
3493
|
|
|
3429
|
-
// src/components/TheToolbar/TheToolbar.tsx
|
|
3430
|
-
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3431
|
-
var useStyles14 = (0, import_mui15.makeStyles)()((theme) => ({
|
|
3432
|
-
menuButton: {
|
|
3433
|
-
color: theme.palette.primary.contrastText
|
|
3434
|
-
},
|
|
3435
|
-
searchNatoora: {
|
|
3436
|
-
width: "100%"
|
|
3437
|
-
},
|
|
3438
|
-
searchIcon: {
|
|
3439
|
-
opacity: ".5"
|
|
3440
|
-
},
|
|
3441
|
-
inputRoot: {
|
|
3442
|
-
color: "inherit"
|
|
3443
|
-
},
|
|
3444
|
-
inputInput: {
|
|
3445
|
-
transition: theme.transitions.create("width"),
|
|
3446
|
-
width: "100%"
|
|
3447
|
-
},
|
|
3448
|
-
topBar: {
|
|
3449
|
-
display: "flex",
|
|
3450
|
-
gap: theme.spacing(1),
|
|
3451
|
-
backgroundColor: colors.topBar
|
|
3452
|
-
},
|
|
3453
|
-
drawer: {
|
|
3454
|
-
backgroundColor: "black"
|
|
3455
|
-
},
|
|
3456
|
-
drawerItem: {
|
|
3457
|
-
maxWidth: "300px",
|
|
3458
|
-
width: "80vw"
|
|
3459
|
-
},
|
|
3460
|
-
offset: theme.mixins.toolbar
|
|
3461
|
-
}));
|
|
3462
|
-
var TheToolbar = ({ imageLogoDarkSmall, imageLogoLightSmall }) => {
|
|
3463
|
-
const { classes } = useStyles14();
|
|
3464
|
-
const [open, setOpen] = import_react58.default.useState(false);
|
|
3465
|
-
const handleOpen = () => setOpen(true);
|
|
3466
|
-
const handleClose = () => setOpen(false);
|
|
3467
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_material14.Box, { children: [
|
|
3468
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_material14.AppBar, { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_material14.Toolbar, { className: classes.topBar, children: [
|
|
3469
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3470
|
-
RoundButton_default,
|
|
3471
|
-
{
|
|
3472
|
-
className: classes.menuButton,
|
|
3473
|
-
icon: "menu",
|
|
3474
|
-
noStrokes: true,
|
|
3475
|
-
onClick: handleOpen
|
|
3476
|
-
}
|
|
3477
|
-
),
|
|
3478
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3479
|
-
CompanyLogo_default,
|
|
3480
|
-
{
|
|
3481
|
-
size: "small",
|
|
3482
|
-
color: "light",
|
|
3483
|
-
imageLogoDarkSmall,
|
|
3484
|
-
imageLogoLightSmall
|
|
3485
|
-
}
|
|
3486
|
-
)
|
|
3487
|
-
] }) }),
|
|
3488
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_material14.Box, { className: classes.offset }),
|
|
3489
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3490
|
-
LeftDrawer_default,
|
|
3491
|
-
{
|
|
3492
|
-
open,
|
|
3493
|
-
handleOpen,
|
|
3494
|
-
handleClose
|
|
3495
|
-
}
|
|
3496
|
-
)
|
|
3497
|
-
] });
|
|
3498
|
-
};
|
|
3499
|
-
var TheToolbar_default = import_react58.default.memo(TheToolbar);
|
|
3500
|
-
|
|
3501
|
-
// src/components/DesktopContainer/DesktopContainer.tsx
|
|
3502
|
-
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3503
|
-
var useStyles15 = (0, import_mui16.makeStyles)()((theme) => ({
|
|
3504
|
-
root: {
|
|
3505
|
-
display: "flex",
|
|
3506
|
-
flexDirection: "column",
|
|
3507
|
-
minHeight: "100vh",
|
|
3508
|
-
maxWidth: 1420,
|
|
3509
|
-
padding: 0
|
|
3510
|
-
},
|
|
3511
|
-
content: {
|
|
3512
|
-
height: "100%",
|
|
3513
|
-
flexGrow: 1
|
|
3514
|
-
},
|
|
3515
|
-
[theme.breakpoints.up("xl")]: {
|
|
3516
|
-
root: {
|
|
3517
|
-
maxWidth: 1720
|
|
3518
|
-
}
|
|
3519
|
-
}
|
|
3520
|
-
}));
|
|
3521
|
-
var DesktopContainer = ({
|
|
3522
|
-
imageLogoDarkSmall,
|
|
3523
|
-
imageLogoLightSmall,
|
|
3524
|
-
children
|
|
3525
|
-
}) => {
|
|
3526
|
-
const { classes } = useStyles15();
|
|
3527
|
-
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_material15.Container, { className: classes.root, maxWidth: "xl", children: [
|
|
3528
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3529
|
-
TheToolbar_default,
|
|
3530
|
-
{
|
|
3531
|
-
imageLogoDarkSmall,
|
|
3532
|
-
imageLogoLightSmall
|
|
3533
|
-
}
|
|
3534
|
-
),
|
|
3535
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3536
|
-
import_material15.Box,
|
|
3537
|
-
{
|
|
3538
|
-
className: classes.content,
|
|
3539
|
-
id: "mainContainer",
|
|
3540
|
-
sx: {
|
|
3541
|
-
display: "flex",
|
|
3542
|
-
flexDirection: "column"
|
|
3543
|
-
},
|
|
3544
|
-
children
|
|
3545
|
-
}
|
|
3546
|
-
)
|
|
3547
|
-
] });
|
|
3548
|
-
};
|
|
3549
|
-
var DesktopContainer_default = DesktopContainer;
|
|
3550
|
-
|
|
3551
|
-
// src/components/Dialog/TwoButtonDialog.tsx
|
|
3552
|
-
var import_material17 = require("@mui/material");
|
|
3553
|
-
var import_Fade = __toESM(require("@mui/material/Fade"), 1);
|
|
3554
|
-
var import_mui18 = require("tss-react/mui");
|
|
3555
|
-
|
|
3556
|
-
// src/components/Loading/Loading.tsx
|
|
3557
|
-
var import_material16 = require("@mui/material");
|
|
3558
|
-
var import_mui17 = require("tss-react/mui");
|
|
3559
|
-
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3560
|
-
var useStyles16 = (0, import_mui17.makeStyles)()(() => ({
|
|
3561
|
-
wrapper: {
|
|
3562
|
-
/**
|
|
3563
|
-
* MUI Dialogs have z-index = 1300
|
|
3564
|
-
*/
|
|
3565
|
-
zIndex: 1301,
|
|
3566
|
-
backgroundColor: isDarkModeEnabled3 ? "rgba(0, 0, 0, 0.5)" : "rgba(255, 255, 255, 0.8)"
|
|
3567
|
-
}
|
|
3568
|
-
}));
|
|
3569
|
-
var Loading = ({ isLoading }) => {
|
|
3570
|
-
const { classes } = useStyles16();
|
|
3571
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3572
|
-
import_material16.Backdrop,
|
|
3573
|
-
{
|
|
3574
|
-
"aria-hidden": !isLoading,
|
|
3575
|
-
className: classes.wrapper,
|
|
3576
|
-
open: isLoading,
|
|
3577
|
-
"data-testid": "backdrop-loading",
|
|
3578
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_material16.CircularProgress, { color: "primary" })
|
|
3579
|
-
}
|
|
3580
|
-
);
|
|
3581
|
-
};
|
|
3582
|
-
var Loading_default = Loading;
|
|
3583
|
-
|
|
3584
|
-
// src/components/Dialog/TwoButtonDialog.tsx
|
|
3585
|
-
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3586
|
-
var useStyles17 = (0, import_mui18.makeStyles)()((theme) => ({
|
|
3587
|
-
paper: {
|
|
3588
|
-
padding: theme.spacing(2)
|
|
3589
|
-
},
|
|
3590
|
-
mt: {
|
|
3591
|
-
marginTop: theme.spacing(2)
|
|
3592
|
-
},
|
|
3593
|
-
mb: {
|
|
3594
|
-
marginBottom: theme.spacing(2)
|
|
3595
|
-
},
|
|
3596
|
-
buttonContainer: {
|
|
3597
|
-
display: "flex",
|
|
3598
|
-
justifyContent: "center",
|
|
3599
|
-
marginTop: theme.spacing(1)
|
|
3600
|
-
}
|
|
3601
|
-
}));
|
|
3602
|
-
var TwoButtonDialog = ({
|
|
3603
|
-
confirmButton,
|
|
3604
|
-
dialogLoading = false,
|
|
3605
|
-
title,
|
|
3606
|
-
subtitle1,
|
|
3607
|
-
subtitle2,
|
|
3608
|
-
open,
|
|
3609
|
-
setOpen
|
|
3610
|
-
}) => {
|
|
3611
|
-
const { classes } = useStyles17();
|
|
3612
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3613
|
-
import_material17.Dialog,
|
|
3614
|
-
{
|
|
3615
|
-
open,
|
|
3616
|
-
disableEnforceFocus: true,
|
|
3617
|
-
maxWidth: "sm",
|
|
3618
|
-
fullWidth: true,
|
|
3619
|
-
closeAfterTransition: true,
|
|
3620
|
-
BackdropComponent: import_material17.Backdrop,
|
|
3621
|
-
BackdropProps: {
|
|
3622
|
-
timeout: 500
|
|
3623
|
-
},
|
|
3624
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_Fade.default, { in: open, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_material17.Paper, { className: classes.paper, children: [
|
|
3625
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_material17.Box, { className: classes.mb, children: [
|
|
3626
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_material17.Typography, { variant: "h5", component: "div", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3627
|
-
import_material17.Box,
|
|
3628
|
-
{
|
|
3629
|
-
sx: {
|
|
3630
|
-
fontWeight: 600
|
|
3631
|
-
},
|
|
3632
|
-
children: title
|
|
3633
|
-
}
|
|
3634
|
-
) }),
|
|
3635
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
3636
|
-
import_material17.Box,
|
|
3637
|
-
{
|
|
3638
|
-
className: classes.mt,
|
|
3639
|
-
sx: {
|
|
3640
|
-
fontWeight: 600
|
|
3641
|
-
},
|
|
3642
|
-
children: [
|
|
3643
|
-
subtitle1 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_material17.Typography, { variant: "subtitle1", children: subtitle1 }),
|
|
3644
|
-
subtitle2 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_material17.Typography, { variant: "subtitle1", children: subtitle2 })
|
|
3645
|
-
]
|
|
3646
|
-
}
|
|
3647
|
-
)
|
|
3648
|
-
] }),
|
|
3649
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_material17.Divider, {}),
|
|
3650
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_material17.Box, { className: classes.buttonContainer, children: [
|
|
3651
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(FilledButton_default, { copy: "CANCEL", onClick: () => setOpen(false) }),
|
|
3652
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3653
|
-
FilledButton_default,
|
|
3654
|
-
{
|
|
3655
|
-
color: "primary",
|
|
3656
|
-
copy: "CONFIRM",
|
|
3657
|
-
onClick: confirmButton
|
|
3658
|
-
}
|
|
3659
|
-
)
|
|
3660
|
-
] }),
|
|
3661
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Loading_default, { isLoading: dialogLoading })
|
|
3662
|
-
] }) })
|
|
3663
|
-
}
|
|
3664
|
-
);
|
|
3665
|
-
};
|
|
3666
|
-
var TwoButtonDialog_default = TwoButtonDialog;
|
|
3667
|
-
|
|
3668
3494
|
// src/components/Pagination/PaginationForTable.tsx
|
|
3669
3495
|
var import_Pagination = __toESM(require("@mui/material/Pagination"), 1);
|
|
3670
3496
|
var import_Paper = __toESM(require("@mui/material/Paper"), 1);
|
|
3671
3497
|
var import_Typography2 = __toESM(require("@mui/material/Typography"), 1);
|
|
3672
|
-
var
|
|
3673
|
-
var
|
|
3674
|
-
var
|
|
3498
|
+
var import_prop_types8 = require("prop-types");
|
|
3499
|
+
var import_mui17 = require("tss-react/mui");
|
|
3500
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3675
3501
|
var paginationHeight = "56px";
|
|
3676
|
-
var
|
|
3502
|
+
var useStyles16 = (0, import_mui17.makeStyles)()((theme) => ({
|
|
3677
3503
|
root: {
|
|
3678
3504
|
display: "flex",
|
|
3679
3505
|
flexDirection: "row",
|
|
@@ -3709,12 +3535,12 @@ var PaginationForTable = ({
|
|
|
3709
3535
|
style,
|
|
3710
3536
|
updateFilters
|
|
3711
3537
|
}) => {
|
|
3712
|
-
const { classes, cx } =
|
|
3538
|
+
const { classes, cx } = useStyles16();
|
|
3713
3539
|
const handleChange = (event, value) => {
|
|
3714
3540
|
updateFilters({ ...appliedFilters, page: value });
|
|
3715
3541
|
};
|
|
3716
3542
|
const isFixed = position === "fixed";
|
|
3717
|
-
return /* @__PURE__ */ (0,
|
|
3543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_Paper.default, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
3718
3544
|
"div",
|
|
3719
3545
|
{
|
|
3720
3546
|
style,
|
|
@@ -3722,11 +3548,11 @@ var PaginationForTable = ({
|
|
|
3722
3548
|
[classes.fixed]: isFixed
|
|
3723
3549
|
}),
|
|
3724
3550
|
children: [
|
|
3725
|
-
/* @__PURE__ */ (0,
|
|
3551
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_Typography2.default, { variant: "body1", children: [
|
|
3726
3552
|
"Page: ",
|
|
3727
3553
|
page
|
|
3728
3554
|
] }),
|
|
3729
|
-
/* @__PURE__ */ (0,
|
|
3555
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3730
3556
|
import_Pagination.default,
|
|
3731
3557
|
{
|
|
3732
3558
|
count: pagination.num_pages,
|
|
@@ -3742,37 +3568,37 @@ PaginationForTable.defaultProps = {
|
|
|
3742
3568
|
className: ""
|
|
3743
3569
|
};
|
|
3744
3570
|
PaginationForTable.propTypes = {
|
|
3745
|
-
appliedFilters:
|
|
3746
|
-
className:
|
|
3747
|
-
page:
|
|
3748
|
-
pagination:
|
|
3749
|
-
position: (0,
|
|
3750
|
-
style:
|
|
3751
|
-
updateFilters:
|
|
3571
|
+
appliedFilters: import_prop_types8.any,
|
|
3572
|
+
className: import_prop_types8.string,
|
|
3573
|
+
page: import_prop_types8.any,
|
|
3574
|
+
pagination: import_prop_types8.object,
|
|
3575
|
+
position: (0, import_prop_types8.oneOf)(["relative", "fixed"]),
|
|
3576
|
+
style: import_prop_types8.any,
|
|
3577
|
+
updateFilters: import_prop_types8.func.isRequired
|
|
3752
3578
|
};
|
|
3753
3579
|
var PaginationForTable_default = PaginationForTable;
|
|
3754
3580
|
|
|
3755
3581
|
// src/components/ProductImage/ProductImage.tsx
|
|
3756
|
-
var
|
|
3757
|
-
var
|
|
3758
|
-
var
|
|
3759
|
-
var
|
|
3582
|
+
var import_material16 = require("@mui/material");
|
|
3583
|
+
var import_prop_types9 = require("prop-types");
|
|
3584
|
+
var import_mui18 = require("tss-react/mui");
|
|
3585
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3760
3586
|
var PImage = ({
|
|
3761
3587
|
classes,
|
|
3762
3588
|
image,
|
|
3763
3589
|
size = "c_productbust__image_xs",
|
|
3764
3590
|
status
|
|
3765
|
-
}) => /* @__PURE__ */ (0,
|
|
3766
|
-
/* @__PURE__ */ (0,
|
|
3767
|
-
|
|
3591
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: classes.c_productbust__image, children: [
|
|
3592
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3593
|
+
import_material16.CardMedia,
|
|
3768
3594
|
{
|
|
3769
3595
|
className: classes[size],
|
|
3770
3596
|
image: image || "resources/img/peas.jpg"
|
|
3771
3597
|
}
|
|
3772
3598
|
),
|
|
3773
|
-
status && status !== "ACTIVE" && /* @__PURE__ */ (0,
|
|
3599
|
+
status && status !== "ACTIVE" && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: classes.c_productbust__label_status, children: status })
|
|
3774
3600
|
] });
|
|
3775
|
-
var ProductImage = (0,
|
|
3601
|
+
var ProductImage = (0, import_mui18.withStyles)(PImage, (theme) => ({
|
|
3776
3602
|
c_productbust__label_status: {
|
|
3777
3603
|
position: "absolute",
|
|
3778
3604
|
color: "white",
|
|
@@ -3850,25 +3676,25 @@ var ProductImage = (0, import_mui20.withStyles)(PImage, (theme) => ({
|
|
|
3850
3676
|
}
|
|
3851
3677
|
}));
|
|
3852
3678
|
PImage.propTypes = {
|
|
3853
|
-
classes:
|
|
3854
|
-
image:
|
|
3855
|
-
size:
|
|
3856
|
-
status:
|
|
3679
|
+
classes: import_prop_types9.any,
|
|
3680
|
+
image: import_prop_types9.string,
|
|
3681
|
+
size: import_prop_types9.string,
|
|
3682
|
+
status: import_prop_types9.any
|
|
3857
3683
|
};
|
|
3858
3684
|
var ProductImage_default = ProductImage;
|
|
3859
3685
|
|
|
3860
3686
|
// src/components/RenderContentList/RenderContentList.tsx
|
|
3861
|
-
var
|
|
3862
|
-
var
|
|
3863
|
-
var
|
|
3687
|
+
var import_react59 = require("react");
|
|
3688
|
+
var import_material17 = require("@mui/material");
|
|
3689
|
+
var import_mui19 = require("tss-react/mui");
|
|
3864
3690
|
|
|
3865
3691
|
// src/utils/useGetActiveSection.ts
|
|
3866
|
-
var
|
|
3692
|
+
var import_react58 = require("react");
|
|
3867
3693
|
var transformNameToID = (name) => name.replaceAll(" ", "-").toLocaleLowerCase();
|
|
3868
3694
|
|
|
3869
3695
|
// src/components/RenderContentList/RenderContentList.tsx
|
|
3870
|
-
var
|
|
3871
|
-
var
|
|
3696
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3697
|
+
var useStyles17 = (0, import_mui19.makeStyles)()(
|
|
3872
3698
|
(_theme, _params, classes) => ({
|
|
3873
3699
|
root: {
|
|
3874
3700
|
[`&.${classes.selected}`]: {
|
|
@@ -3882,28 +3708,28 @@ var useStyles19 = (0, import_mui21.makeStyles)()(
|
|
|
3882
3708
|
})
|
|
3883
3709
|
);
|
|
3884
3710
|
var RenderContentList = ({ items, activeSection }) => {
|
|
3885
|
-
const { classes } =
|
|
3886
|
-
const [active, setActive] = (0,
|
|
3887
|
-
(0,
|
|
3711
|
+
const { classes } = useStyles17();
|
|
3712
|
+
const [active, setActive] = (0, import_react59.useState)(activeSection);
|
|
3713
|
+
(0, import_react59.useEffect)(() => {
|
|
3888
3714
|
setActive(activeSection);
|
|
3889
3715
|
}, [activeSection]);
|
|
3890
|
-
return /* @__PURE__ */ (0,
|
|
3891
|
-
|
|
3716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3717
|
+
import_material17.List,
|
|
3892
3718
|
{
|
|
3893
3719
|
component: "nav",
|
|
3894
3720
|
"aria-labelledby": "nested-list-subheader",
|
|
3895
|
-
subheader: /* @__PURE__ */ (0,
|
|
3721
|
+
subheader: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_material17.ListSubheader, { component: "div", id: "nested-list-subheader", children: "Contents" }),
|
|
3896
3722
|
children: items.map((item) => {
|
|
3897
3723
|
const id = transformNameToID(item);
|
|
3898
|
-
return /* @__PURE__ */ (0,
|
|
3899
|
-
|
|
3724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3725
|
+
import_material17.ListItemButton,
|
|
3900
3726
|
{
|
|
3901
3727
|
component: "a",
|
|
3902
3728
|
href: `#${id}`,
|
|
3903
3729
|
onClick: () => setActive(item),
|
|
3904
3730
|
selected: active === item,
|
|
3905
3731
|
classes: { root: classes.root },
|
|
3906
|
-
children: /* @__PURE__ */ (0,
|
|
3732
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_material17.ListItemText, { primary: item })
|
|
3907
3733
|
},
|
|
3908
3734
|
id
|
|
3909
3735
|
);
|
|
@@ -3914,11 +3740,11 @@ var RenderContentList = ({ items, activeSection }) => {
|
|
|
3914
3740
|
var RenderContentList_default = RenderContentList;
|
|
3915
3741
|
|
|
3916
3742
|
// src/components/RowProductCard/RowProductCard.tsx
|
|
3917
|
-
var
|
|
3918
|
-
var
|
|
3919
|
-
var
|
|
3920
|
-
var
|
|
3921
|
-
var
|
|
3743
|
+
var import_material18 = require("@mui/material");
|
|
3744
|
+
var import_mui20 = require("tss-react/mui");
|
|
3745
|
+
var import_prop_types10 = require("prop-types");
|
|
3746
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3747
|
+
var useStyles18 = (0, import_mui20.makeStyles)()((theme) => ({
|
|
3922
3748
|
wrapper: {
|
|
3923
3749
|
display: "flex",
|
|
3924
3750
|
gap: theme.spacing(2),
|
|
@@ -3943,15 +3769,15 @@ var useStyles20 = (0, import_mui22.makeStyles)()((theme) => ({
|
|
|
3943
3769
|
}
|
|
3944
3770
|
}));
|
|
3945
3771
|
var RowProductCard = ({ children, columns, location, product, size }) => {
|
|
3946
|
-
const { classes, cx } =
|
|
3772
|
+
const { classes, cx } = useStyles18();
|
|
3947
3773
|
const hasColumns = columns.length >= 1;
|
|
3948
3774
|
const imageSize = {
|
|
3949
3775
|
small: "c_productbust__image_sm",
|
|
3950
3776
|
medium: "c_productbust__image_md",
|
|
3951
3777
|
large: "c_productbust__image_lg"
|
|
3952
3778
|
};
|
|
3953
|
-
return /* @__PURE__ */ (0,
|
|
3954
|
-
/* @__PURE__ */ (0,
|
|
3779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_material18.Paper, { className: classes.wrapper, children: [
|
|
3780
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3955
3781
|
ProductImage_default,
|
|
3956
3782
|
{
|
|
3957
3783
|
image: product.image,
|
|
@@ -3959,15 +3785,15 @@ var RowProductCard = ({ children, columns, location, product, size }) => {
|
|
|
3959
3785
|
size: imageSize[size]
|
|
3960
3786
|
}
|
|
3961
3787
|
),
|
|
3962
|
-
/* @__PURE__ */ (0,
|
|
3788
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
3963
3789
|
"div",
|
|
3964
3790
|
{
|
|
3965
3791
|
className: cx(classes.content, {
|
|
3966
3792
|
[classes.onlyProductName]: !hasColumns && !location
|
|
3967
3793
|
}),
|
|
3968
3794
|
children: [
|
|
3969
|
-
/* @__PURE__ */ (0,
|
|
3970
|
-
|
|
3795
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
3796
|
+
import_material18.Box,
|
|
3971
3797
|
{
|
|
3972
3798
|
className: classes.upperRow,
|
|
3973
3799
|
sx: {
|
|
@@ -3976,26 +3802,26 @@ var RowProductCard = ({ children, columns, location, product, size }) => {
|
|
|
3976
3802
|
alignItems: "center"
|
|
3977
3803
|
},
|
|
3978
3804
|
children: [
|
|
3979
|
-
/* @__PURE__ */ (0,
|
|
3980
|
-
location ? /* @__PURE__ */ (0,
|
|
3981
|
-
/* @__PURE__ */ (0,
|
|
3805
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { children: [
|
|
3806
|
+
location ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_material18.Typography, { className: classes.smallTitle, variant: "caption", children: `Location: ${location}` }) : null,
|
|
3807
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_material18.Typography, { variant: "h6", children: product.name })
|
|
3982
3808
|
] }),
|
|
3983
3809
|
children
|
|
3984
3810
|
]
|
|
3985
3811
|
}
|
|
3986
3812
|
),
|
|
3987
|
-
hasColumns ? /* @__PURE__ */ (0,
|
|
3988
|
-
/* @__PURE__ */ (0,
|
|
3989
|
-
/* @__PURE__ */ (0,
|
|
3990
|
-
|
|
3813
|
+
hasColumns ? /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
|
|
3814
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_material18.Divider, { className: classes.divider }),
|
|
3815
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3816
|
+
import_material18.Box,
|
|
3991
3817
|
{
|
|
3992
3818
|
sx: {
|
|
3993
3819
|
display: "flex",
|
|
3994
3820
|
gap: "24px"
|
|
3995
3821
|
},
|
|
3996
|
-
children: columns.map((column) => /* @__PURE__ */ (0,
|
|
3997
|
-
/* @__PURE__ */ (0,
|
|
3998
|
-
typeof column.value === "string" ? /* @__PURE__ */ (0,
|
|
3822
|
+
children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { children: [
|
|
3823
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_material18.Typography, { className: classes.smallTitle, variant: "caption", children: column.title }),
|
|
3824
|
+
typeof column.value === "string" ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_material18.Typography, { variant: "body1", children: column.value }) : column.value
|
|
3999
3825
|
] }, column.title))
|
|
4000
3826
|
}
|
|
4001
3827
|
)
|
|
@@ -4015,48 +3841,48 @@ RowProductCard.propTypes = {
|
|
|
4015
3841
|
/**
|
|
4016
3842
|
* Possible actions or buttons that the card can have
|
|
4017
3843
|
*/
|
|
4018
|
-
children:
|
|
3844
|
+
children: import_prop_types10.node,
|
|
4019
3845
|
/**
|
|
4020
3846
|
* Details about the product
|
|
4021
3847
|
*/
|
|
4022
|
-
columns: (0,
|
|
4023
|
-
(0,
|
|
4024
|
-
title:
|
|
4025
|
-
value: (0,
|
|
3848
|
+
columns: (0, import_prop_types10.arrayOf)(
|
|
3849
|
+
(0, import_prop_types10.shape)({
|
|
3850
|
+
title: import_prop_types10.string,
|
|
3851
|
+
value: (0, import_prop_types10.oneOfType)([import_prop_types10.string, import_prop_types10.node])
|
|
4026
3852
|
})
|
|
4027
3853
|
),
|
|
4028
3854
|
/**
|
|
4029
3855
|
* Where is the product location
|
|
4030
3856
|
*/
|
|
4031
|
-
location:
|
|
3857
|
+
location: import_prop_types10.string,
|
|
4032
3858
|
/**
|
|
4033
3859
|
* Product information
|
|
4034
3860
|
*/
|
|
4035
|
-
product: (0,
|
|
4036
|
-
image:
|
|
4037
|
-
name:
|
|
4038
|
-
status:
|
|
3861
|
+
product: (0, import_prop_types10.shape)({
|
|
3862
|
+
image: import_prop_types10.string.isRequired,
|
|
3863
|
+
name: import_prop_types10.string.isRequired,
|
|
3864
|
+
status: import_prop_types10.string
|
|
4039
3865
|
}).isRequired,
|
|
4040
|
-
size: (0,
|
|
3866
|
+
size: (0, import_prop_types10.oneOf)(["small", "medium", "large"])
|
|
4041
3867
|
};
|
|
4042
3868
|
var RowProductCard_default = RowProductCard;
|
|
4043
3869
|
|
|
4044
3870
|
// src/components/SearchAndFilterHeader/SearchAndFilterHeaderForTable.tsx
|
|
4045
|
-
var
|
|
3871
|
+
var import_react61 = __toESM(require("react"), 1);
|
|
4046
3872
|
var import_Box = __toESM(require("@mui/material/Box"), 1);
|
|
4047
|
-
var
|
|
4048
|
-
var
|
|
3873
|
+
var import_prop_types12 = __toESM(require("prop-types"), 1);
|
|
3874
|
+
var import_mui22 = require("tss-react/mui");
|
|
4049
3875
|
|
|
4050
3876
|
// src/components/SearchWithFilters/SearchWithFiltersForTable.tsx
|
|
4051
|
-
var
|
|
3877
|
+
var import_react60 = __toESM(require("react"), 1);
|
|
4052
3878
|
var import_ArrowDropDown = __toESM(require("@mui/icons-material/ArrowDropDown"), 1);
|
|
4053
3879
|
var import_ArrowDropUp = __toESM(require("@mui/icons-material/ArrowDropUp"), 1);
|
|
4054
3880
|
var import_Search = __toESM(require("@mui/icons-material/Search"), 1);
|
|
4055
|
-
var
|
|
4056
|
-
var
|
|
4057
|
-
var
|
|
4058
|
-
var
|
|
4059
|
-
var
|
|
3881
|
+
var import_material19 = require("@mui/material");
|
|
3882
|
+
var import_prop_types11 = __toESM(require("prop-types"), 1);
|
|
3883
|
+
var import_mui21 = require("tss-react/mui");
|
|
3884
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3885
|
+
var useStyles19 = (0, import_mui21.makeStyles)()((theme) => ({
|
|
4060
3886
|
c_search: {
|
|
4061
3887
|
height: 46,
|
|
4062
3888
|
padding: "4px",
|
|
@@ -4114,8 +3940,8 @@ var SearchWithFiltersForTable = (props) => {
|
|
|
4114
3940
|
enterPressedInSearch,
|
|
4115
3941
|
searchedValue
|
|
4116
3942
|
} = props;
|
|
4117
|
-
const { classes } =
|
|
4118
|
-
const [searchText, setSearchText] =
|
|
3943
|
+
const { classes } = useStyles19();
|
|
3944
|
+
const [searchText, setSearchText] = import_react60.default.useState("");
|
|
4119
3945
|
const handleTextChange = (e) => {
|
|
4120
3946
|
const { value } = e.target;
|
|
4121
3947
|
setSearchText(value);
|
|
@@ -4130,10 +3956,10 @@ var SearchWithFiltersForTable = (props) => {
|
|
|
4130
3956
|
}
|
|
4131
3957
|
};
|
|
4132
3958
|
const ArrowIcon = isOpen ? import_ArrowDropUp.default : import_ArrowDropDown.default;
|
|
4133
|
-
return /* @__PURE__ */ (0,
|
|
4134
|
-
/* @__PURE__ */ (0,
|
|
4135
|
-
/* @__PURE__ */ (0,
|
|
4136
|
-
|
|
3959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_material19.Paper, { className: classes.c_search, children: [
|
|
3960
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_material19.Box, { className: classes.c_search__icon, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_Search.default, { className: classes.icon, fontSize: "small" }) }),
|
|
3961
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3962
|
+
import_material19.InputBase,
|
|
4137
3963
|
{
|
|
4138
3964
|
className: classes.c_search__input,
|
|
4139
3965
|
placeholder: "Search",
|
|
@@ -4142,22 +3968,22 @@ var SearchWithFiltersForTable = (props) => {
|
|
|
4142
3968
|
onKeyDown: handleKeyPress
|
|
4143
3969
|
}
|
|
4144
3970
|
),
|
|
4145
|
-
showFilterButton && /* @__PURE__ */ (0,
|
|
4146
|
-
/* @__PURE__ */ (0,
|
|
4147
|
-
|
|
3971
|
+
showFilterButton && /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
|
|
3972
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3973
|
+
import_material19.Divider,
|
|
4148
3974
|
{
|
|
4149
3975
|
className: classes.c_search__divider,
|
|
4150
3976
|
orientation: "vertical"
|
|
4151
3977
|
}
|
|
4152
3978
|
),
|
|
4153
|
-
/* @__PURE__ */ (0,
|
|
4154
|
-
|
|
3979
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
3980
|
+
import_material19.Button,
|
|
4155
3981
|
{
|
|
4156
3982
|
className: classes.c_search__bt_filter,
|
|
4157
3983
|
onClick: handleFilterButtonClick,
|
|
4158
3984
|
children: [
|
|
4159
3985
|
"Filters",
|
|
4160
|
-
/* @__PURE__ */ (0,
|
|
3986
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(ArrowIcon, { className: classes.c_search__bt_icon_filter })
|
|
4161
3987
|
]
|
|
4162
3988
|
}
|
|
4163
3989
|
)
|
|
@@ -4165,18 +3991,18 @@ var SearchWithFiltersForTable = (props) => {
|
|
|
4165
3991
|
] });
|
|
4166
3992
|
};
|
|
4167
3993
|
SearchWithFiltersForTable.propTypes = {
|
|
4168
|
-
onFilterButtonClick:
|
|
4169
|
-
isOpen:
|
|
4170
|
-
updateSearch:
|
|
4171
|
-
enterPressedInSearch:
|
|
4172
|
-
showFilterButton:
|
|
4173
|
-
searchedValue:
|
|
3994
|
+
onFilterButtonClick: import_prop_types11.default.func,
|
|
3995
|
+
isOpen: import_prop_types11.default.bool,
|
|
3996
|
+
updateSearch: import_prop_types11.default.func,
|
|
3997
|
+
enterPressedInSearch: import_prop_types11.default.func,
|
|
3998
|
+
showFilterButton: import_prop_types11.default.bool,
|
|
3999
|
+
searchedValue: import_prop_types11.default.string
|
|
4174
4000
|
};
|
|
4175
|
-
var SearchWithFiltersForTable_default =
|
|
4001
|
+
var SearchWithFiltersForTable_default = import_react60.default.memo(SearchWithFiltersForTable);
|
|
4176
4002
|
|
|
4177
4003
|
// src/components/SearchAndFilterHeader/SearchAndFilterHeaderForTable.tsx
|
|
4178
|
-
var
|
|
4179
|
-
var
|
|
4004
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
4005
|
+
var useStyles20 = (0, import_mui22.makeStyles)()((theme) => ({
|
|
4180
4006
|
container: {
|
|
4181
4007
|
display: "flex",
|
|
4182
4008
|
alignItems: "center",
|
|
@@ -4206,11 +4032,11 @@ var SearchAndFilterHeaderForTable = (props) => {
|
|
|
4206
4032
|
button,
|
|
4207
4033
|
searchedValue
|
|
4208
4034
|
} = props;
|
|
4209
|
-
const { classes } =
|
|
4210
|
-
return /* @__PURE__ */ (0,
|
|
4211
|
-
/* @__PURE__ */ (0,
|
|
4212
|
-
/* @__PURE__ */ (0,
|
|
4213
|
-
/* @__PURE__ */ (0,
|
|
4035
|
+
const { classes } = useStyles20();
|
|
4036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_Box.default, { className: classes.container, children: [
|
|
4037
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_Box.default, { className: classes.leftSection, children: [
|
|
4038
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(AppLabel_default, { appName }),
|
|
4039
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
4214
4040
|
SearchWithFiltersForTable_default,
|
|
4215
4041
|
{
|
|
4216
4042
|
onFilterButtonClick,
|
|
@@ -4221,41 +4047,41 @@ var SearchAndFilterHeaderForTable = (props) => {
|
|
|
4221
4047
|
searchedValue
|
|
4222
4048
|
}
|
|
4223
4049
|
),
|
|
4224
|
-
copy && /* @__PURE__ */ (0,
|
|
4050
|
+
copy && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
4225
4051
|
import_Box.default,
|
|
4226
4052
|
{
|
|
4227
4053
|
sx: {
|
|
4228
4054
|
margin: 0.5
|
|
4229
4055
|
},
|
|
4230
|
-
children: /* @__PURE__ */ (0,
|
|
4056
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(OutlinedButton_default, { copy })
|
|
4231
4057
|
}
|
|
4232
4058
|
)
|
|
4233
4059
|
] }),
|
|
4234
|
-
/* @__PURE__ */ (0,
|
|
4060
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_Box.default, { children: button })
|
|
4235
4061
|
] });
|
|
4236
4062
|
};
|
|
4237
4063
|
SearchAndFilterHeaderForTable.propTypes = {
|
|
4238
|
-
appName:
|
|
4239
|
-
button:
|
|
4240
|
-
copy:
|
|
4241
|
-
enterPressedInSearch:
|
|
4242
|
-
isOpen:
|
|
4243
|
-
onFilterButtonClick:
|
|
4244
|
-
searchedValue:
|
|
4245
|
-
showFilterButton:
|
|
4246
|
-
updateSearch:
|
|
4064
|
+
appName: import_prop_types12.default.string,
|
|
4065
|
+
button: import_prop_types12.default.node,
|
|
4066
|
+
copy: import_prop_types12.default.string,
|
|
4067
|
+
enterPressedInSearch: import_prop_types12.default.func,
|
|
4068
|
+
isOpen: import_prop_types12.default.bool,
|
|
4069
|
+
onFilterButtonClick: import_prop_types12.default.func,
|
|
4070
|
+
searchedValue: import_prop_types12.default.string,
|
|
4071
|
+
showFilterButton: import_prop_types12.default.bool,
|
|
4072
|
+
updateSearch: import_prop_types12.default.func
|
|
4247
4073
|
};
|
|
4248
|
-
var SearchAndFilterHeaderForTable_default =
|
|
4074
|
+
var SearchAndFilterHeaderForTable_default = import_react61.default.memo(SearchAndFilterHeaderForTable);
|
|
4249
4075
|
|
|
4250
4076
|
// src/components/SearchWithFilters/SearchWithFilters.tsx
|
|
4251
|
-
var
|
|
4077
|
+
var import_react62 = __toESM(require("react"), 1);
|
|
4252
4078
|
var import_ArrowDropDown2 = __toESM(require("@mui/icons-material/ArrowDropDown"), 1);
|
|
4253
4079
|
var import_ArrowDropUp2 = __toESM(require("@mui/icons-material/ArrowDropUp"), 1);
|
|
4254
4080
|
var import_Search2 = __toESM(require("@mui/icons-material/Search"), 1);
|
|
4255
|
-
var
|
|
4256
|
-
var
|
|
4257
|
-
var
|
|
4258
|
-
var
|
|
4081
|
+
var import_material20 = require("@mui/material");
|
|
4082
|
+
var import_mui23 = require("tss-react/mui");
|
|
4083
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
4084
|
+
var useStyles21 = (0, import_mui23.makeStyles)()((theme) => ({
|
|
4259
4085
|
searchContainer: {
|
|
4260
4086
|
height: 46,
|
|
4261
4087
|
padding: "4px",
|
|
@@ -4299,8 +4125,8 @@ var SearchWithFilters = ({
|
|
|
4299
4125
|
},
|
|
4300
4126
|
disabled = false
|
|
4301
4127
|
}) => {
|
|
4302
|
-
const [searchText, setSearchText] = (0,
|
|
4303
|
-
const { classes } =
|
|
4128
|
+
const [searchText, setSearchText] = (0, import_react62.useState)(searchValue);
|
|
4129
|
+
const { classes } = useStyles21();
|
|
4304
4130
|
const handleTextChange = (e) => {
|
|
4305
4131
|
const { value } = e.target;
|
|
4306
4132
|
setSearchText(value);
|
|
@@ -4311,13 +4137,13 @@ var SearchWithFilters = ({
|
|
|
4311
4137
|
enterPressedInSearch?.();
|
|
4312
4138
|
}
|
|
4313
4139
|
};
|
|
4314
|
-
(0,
|
|
4140
|
+
(0, import_react62.useEffect)(() => {
|
|
4315
4141
|
setSearchText(searchValue);
|
|
4316
4142
|
}, [searchValue]);
|
|
4317
|
-
return /* @__PURE__ */ (0,
|
|
4318
|
-
/* @__PURE__ */ (0,
|
|
4319
|
-
/* @__PURE__ */ (0,
|
|
4320
|
-
|
|
4143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_material20.Paper, { className: classes.searchContainer, children: [
|
|
4144
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_Search2.default, { className: classes.icon, fontSize: "small" }),
|
|
4145
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4146
|
+
import_material20.InputBase,
|
|
4321
4147
|
{
|
|
4322
4148
|
className: classes.input,
|
|
4323
4149
|
placeholder: "Search",
|
|
@@ -4328,29 +4154,29 @@ var SearchWithFilters = ({
|
|
|
4328
4154
|
inputProps: { "aria-label": "search" }
|
|
4329
4155
|
}
|
|
4330
4156
|
),
|
|
4331
|
-
/* @__PURE__ */ (0,
|
|
4332
|
-
/* @__PURE__ */ (0,
|
|
4333
|
-
|
|
4157
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_material20.Divider, { className: classes.divider, orientation: "vertical" }),
|
|
4158
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
4159
|
+
import_material20.Button,
|
|
4334
4160
|
{
|
|
4335
4161
|
className: classes.filterButton,
|
|
4336
4162
|
onClick: filterClick,
|
|
4337
4163
|
disabled,
|
|
4338
4164
|
children: [
|
|
4339
4165
|
"Filters",
|
|
4340
|
-
showFilters ? /* @__PURE__ */ (0,
|
|
4166
|
+
showFilters ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_ArrowDropUp2.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_ArrowDropDown2.default, {})
|
|
4341
4167
|
]
|
|
4342
4168
|
}
|
|
4343
4169
|
)
|
|
4344
4170
|
] });
|
|
4345
4171
|
};
|
|
4346
|
-
var SearchWithFilters_default =
|
|
4172
|
+
var SearchWithFilters_default = import_react62.default.memo(SearchWithFilters);
|
|
4347
4173
|
|
|
4348
4174
|
// src/components/SectionName/SectionName.tsx
|
|
4349
4175
|
var import_Info = __toESM(require("@mui/icons-material/Info"), 1);
|
|
4350
|
-
var
|
|
4351
|
-
var
|
|
4352
|
-
var
|
|
4353
|
-
var
|
|
4176
|
+
var import_material21 = require("@mui/material");
|
|
4177
|
+
var import_mui24 = require("tss-react/mui");
|
|
4178
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4179
|
+
var useStyles22 = (0, import_mui24.makeStyles)()(() => ({
|
|
4354
4180
|
container: {
|
|
4355
4181
|
display: "flex",
|
|
4356
4182
|
alignItems: "flex-end",
|
|
@@ -4384,11 +4210,11 @@ var SectionName = ({
|
|
|
4384
4210
|
buttonText,
|
|
4385
4211
|
buttonDisabled
|
|
4386
4212
|
}) => {
|
|
4387
|
-
const { classes } =
|
|
4388
|
-
return /* @__PURE__ */ (0,
|
|
4389
|
-
/* @__PURE__ */ (0,
|
|
4390
|
-
/* @__PURE__ */ (0,
|
|
4391
|
-
|
|
4213
|
+
const { classes } = useStyles22();
|
|
4214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_material21.Box, { className: classes.container, children: [
|
|
4215
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_material21.Box, { className: classes.titleContainer, children: [
|
|
4216
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4217
|
+
import_material21.Typography,
|
|
4392
4218
|
{
|
|
4393
4219
|
variant: "h5",
|
|
4394
4220
|
component: "a",
|
|
@@ -4397,7 +4223,7 @@ var SectionName = ({
|
|
|
4397
4223
|
children: name
|
|
4398
4224
|
}
|
|
4399
4225
|
),
|
|
4400
|
-
tooltipDescription ? /* @__PURE__ */ (0,
|
|
4226
|
+
tooltipDescription ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_material21.Tooltip, { title: tooltipDescription, placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4401
4227
|
import_Info.default,
|
|
4402
4228
|
{
|
|
4403
4229
|
fontSize: "small",
|
|
@@ -4406,7 +4232,7 @@ var SectionName = ({
|
|
|
4406
4232
|
}
|
|
4407
4233
|
) }) : null
|
|
4408
4234
|
] }),
|
|
4409
|
-
buttonText ? /* @__PURE__ */ (0,
|
|
4235
|
+
buttonText ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4410
4236
|
ExtendedButton_default,
|
|
4411
4237
|
{
|
|
4412
4238
|
type: "add",
|
|
@@ -4424,14 +4250,14 @@ var SectionName = ({
|
|
|
4424
4250
|
var SectionName_default = SectionName;
|
|
4425
4251
|
|
|
4426
4252
|
// src/components/Shift/Shift.tsx
|
|
4427
|
-
var
|
|
4428
|
-
var
|
|
4429
|
-
var
|
|
4253
|
+
var import_material22 = require("@mui/material");
|
|
4254
|
+
var import_prop_types13 = require("prop-types");
|
|
4255
|
+
var import_mui25 = require("tss-react/mui");
|
|
4430
4256
|
|
|
4431
4257
|
// src/resources/icons/DayIcon.js
|
|
4432
|
-
var
|
|
4433
|
-
var
|
|
4434
|
-
var DayIcon = (props) => /* @__PURE__ */ (0,
|
|
4258
|
+
var import_react63 = __toESM(require("react"), 1);
|
|
4259
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4260
|
+
var DayIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4435
4261
|
"svg",
|
|
4436
4262
|
{
|
|
4437
4263
|
fill: "none",
|
|
@@ -4440,7 +4266,7 @@ var DayIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
|
4440
4266
|
width: 22,
|
|
4441
4267
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4442
4268
|
...props,
|
|
4443
|
-
children: /* @__PURE__ */ (0,
|
|
4269
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4444
4270
|
"path",
|
|
4445
4271
|
{
|
|
4446
4272
|
d: "M2.55 18.09L3.96 19.5L5.76 17.71L4.34 16.29M11 5C7.69 5 5 7.69 5 11C5 14.31 7.69 17 11 17C14.31 17 17 14.31 17 11C17 7.68 14.31 5 11 5ZM19 12H22V10H19M16.24 17.71L18.04 19.5L19.45 18.09L17.66 16.29M19.45 4L18.04 2.6L16.24 4.39L17.66 5.81M12 0H10V3H12M5.76 4.39L3.96 2.6L2.55 4L4.34 5.81L5.76 4.39ZM0 12H3V10H0M12 19H10V22H12",
|
|
@@ -4452,9 +4278,9 @@ var DayIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
|
4452
4278
|
var DayIcon_default = DayIcon;
|
|
4453
4279
|
|
|
4454
4280
|
// src/resources/icons/NightIcon.js
|
|
4455
|
-
var
|
|
4456
|
-
var
|
|
4457
|
-
var NightIcon = (props) => /* @__PURE__ */ (0,
|
|
4281
|
+
var import_react64 = __toESM(require("react"), 1);
|
|
4282
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4283
|
+
var NightIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4458
4284
|
"svg",
|
|
4459
4285
|
{
|
|
4460
4286
|
fill: "none",
|
|
@@ -4463,7 +4289,7 @@ var NightIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
|
4463
4289
|
width: "14",
|
|
4464
4290
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4465
4291
|
...props,
|
|
4466
|
-
children: /* @__PURE__ */ (0,
|
|
4292
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4467
4293
|
"path",
|
|
4468
4294
|
{
|
|
4469
4295
|
d: "M0.92627 9.99963C0.926174 11.5698 1.29582 13.1179 2.00528 14.5186C2.71474 15.9194 3.74407 17.1334 5.00994 18.0623C6.27582 18.9913 7.74265 19.6091 9.29169 19.8657C10.8407 20.1224 12.4284 20.0107 13.9263 19.5396C11.8959 18.9016 10.122 17.6323 8.86268 15.9165C7.60338 14.2008 6.92434 12.1279 6.92434 9.99963C6.92434 7.87132 7.60338 5.79851 8.86268 4.08274C10.122 2.36696 11.8959 1.09772 13.9263 0.459633C12.4284 -0.0114145 10.8407 -0.123133 9.29169 0.133521C7.74265 0.390176 6.27582 1.00799 5.00994 1.93695C3.74407 2.8659 2.71474 4.07989 2.00528 5.48063C1.29582 6.88136 0.926174 8.42948 0.92627 9.99963Z",
|
|
@@ -4475,12 +4301,12 @@ var NightIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
|
4475
4301
|
var NightIcon_default = NightIcon;
|
|
4476
4302
|
|
|
4477
4303
|
// src/components/Shift/Shift.tsx
|
|
4478
|
-
var
|
|
4304
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4479
4305
|
var ShiftEnum = {
|
|
4480
4306
|
DAY: "Day",
|
|
4481
4307
|
NIGHT: "Night"
|
|
4482
4308
|
};
|
|
4483
|
-
var
|
|
4309
|
+
var useStyles23 = (0, import_mui25.makeStyles)()(() => ({
|
|
4484
4310
|
shiftName: {
|
|
4485
4311
|
textTransform: "uppercase",
|
|
4486
4312
|
fontWeight: 600
|
|
@@ -4488,12 +4314,12 @@ var useStyles25 = (0, import_mui27.makeStyles)()(() => ({
|
|
|
4488
4314
|
}));
|
|
4489
4315
|
var Shift = ({ shift }) => {
|
|
4490
4316
|
const shiftIcon = {
|
|
4491
|
-
[ShiftEnum.DAY]: /* @__PURE__ */ (0,
|
|
4492
|
-
[ShiftEnum.NIGHT]: /* @__PURE__ */ (0,
|
|
4317
|
+
[ShiftEnum.DAY]: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DayIcon_default, { "data-testid": "shift-day" }),
|
|
4318
|
+
[ShiftEnum.NIGHT]: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(NightIcon_default, { "data-testid": "shift-night" })
|
|
4493
4319
|
};
|
|
4494
|
-
const { classes } =
|
|
4495
|
-
return /* @__PURE__ */ (0,
|
|
4496
|
-
|
|
4320
|
+
const { classes } = useStyles23();
|
|
4321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
4322
|
+
import_material22.Box,
|
|
4497
4323
|
{
|
|
4498
4324
|
sx: {
|
|
4499
4325
|
display: "flex",
|
|
@@ -4502,30 +4328,30 @@ var Shift = ({ shift }) => {
|
|
|
4502
4328
|
},
|
|
4503
4329
|
children: [
|
|
4504
4330
|
shiftIcon[shift],
|
|
4505
|
-
/* @__PURE__ */ (0,
|
|
4506
|
-
/* @__PURE__ */ (0,
|
|
4331
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_material22.Typography, { children: [
|
|
4332
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: classes.shiftName, children: [
|
|
4507
4333
|
shift,
|
|
4508
4334
|
" "
|
|
4509
4335
|
] }),
|
|
4510
|
-
/* @__PURE__ */ (0,
|
|
4336
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: "Shift" })
|
|
4511
4337
|
] })
|
|
4512
4338
|
]
|
|
4513
4339
|
}
|
|
4514
4340
|
);
|
|
4515
4341
|
};
|
|
4516
4342
|
Shift.propTypes = {
|
|
4517
|
-
shift: (0,
|
|
4343
|
+
shift: (0, import_prop_types13.oneOf)(Object.values(ShiftEnum))
|
|
4518
4344
|
};
|
|
4519
4345
|
var Shift_default = Shift;
|
|
4520
4346
|
|
|
4521
4347
|
// src/components/surfaces/FixedFooter/index.js
|
|
4522
|
-
var
|
|
4523
|
-
var
|
|
4524
|
-
var
|
|
4525
|
-
var
|
|
4526
|
-
var
|
|
4348
|
+
var import_react65 = __toESM(require("react"), 1);
|
|
4349
|
+
var import_material23 = require("@mui/material");
|
|
4350
|
+
var import_prop_types14 = __toESM(require("prop-types"), 1);
|
|
4351
|
+
var import_mui26 = require("tss-react/mui");
|
|
4352
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
4527
4353
|
var footerHeight = "64px";
|
|
4528
|
-
var
|
|
4354
|
+
var useStyles24 = (0, import_mui26.makeStyles)()((theme) => ({
|
|
4529
4355
|
root: {
|
|
4530
4356
|
position: "fixed",
|
|
4531
4357
|
bottom: 0,
|
|
@@ -4543,11 +4369,11 @@ var useStyles26 = (0, import_mui28.makeStyles)()((theme) => ({
|
|
|
4543
4369
|
}
|
|
4544
4370
|
}));
|
|
4545
4371
|
var FixedFooter = ({ justifyContent, children }) => {
|
|
4546
|
-
const { classes } =
|
|
4547
|
-
return /* @__PURE__ */ (0,
|
|
4548
|
-
/* @__PURE__ */ (0,
|
|
4549
|
-
/* @__PURE__ */ (0,
|
|
4550
|
-
|
|
4372
|
+
const { classes } = useStyles24();
|
|
4373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_material23.Box, { children: [
|
|
4374
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_material23.Box, { className: classes.fixedOffset }),
|
|
4375
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4376
|
+
import_material23.Box,
|
|
4551
4377
|
{
|
|
4552
4378
|
className: classes.root,
|
|
4553
4379
|
sx: {
|
|
@@ -4559,21 +4385,21 @@ var FixedFooter = ({ justifyContent, children }) => {
|
|
|
4559
4385
|
] });
|
|
4560
4386
|
};
|
|
4561
4387
|
FixedFooter.propTypes = {
|
|
4562
|
-
children:
|
|
4563
|
-
justifyContent:
|
|
4388
|
+
children: import_prop_types14.default.node.isRequired,
|
|
4389
|
+
justifyContent: import_prop_types14.default.string
|
|
4564
4390
|
};
|
|
4565
|
-
var FixedFooter_default =
|
|
4391
|
+
var FixedFooter_default = import_react65.default.memo(FixedFooter);
|
|
4566
4392
|
|
|
4567
4393
|
// src/components/Table/SmartTableHeader.js
|
|
4568
|
-
var
|
|
4394
|
+
var import_react66 = __toESM(require("react"), 1);
|
|
4569
4395
|
var import_TableCell = __toESM(require("@mui/material/TableCell"), 1);
|
|
4570
4396
|
var import_TableHead = __toESM(require("@mui/material/TableHead"), 1);
|
|
4571
4397
|
var import_TableRow = __toESM(require("@mui/material/TableRow"), 1);
|
|
4572
4398
|
var import_TableSortLabel = __toESM(require("@mui/material/TableSortLabel"), 1);
|
|
4573
|
-
var
|
|
4574
|
-
var
|
|
4575
|
-
var
|
|
4576
|
-
var
|
|
4399
|
+
var import_prop_types15 = __toESM(require("prop-types"), 1);
|
|
4400
|
+
var import_mui27 = require("tss-react/mui");
|
|
4401
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
4402
|
+
var useStyles25 = (0, import_mui27.makeStyles)()(() => ({
|
|
4577
4403
|
root: {
|
|
4578
4404
|
backgroundColor: colors.background,
|
|
4579
4405
|
"& .MuiTableSortLabel-root": {
|
|
@@ -4601,18 +4427,18 @@ var useStyles27 = (0, import_mui29.makeStyles)()(() => ({
|
|
|
4601
4427
|
}
|
|
4602
4428
|
}));
|
|
4603
4429
|
var SmartTableHeader = (props) => {
|
|
4604
|
-
const { classes } =
|
|
4430
|
+
const { classes } = useStyles25();
|
|
4605
4431
|
const { order, orderBy, onRequestSort } = props;
|
|
4606
4432
|
const createSortHandler = (property) => (event) => {
|
|
4607
4433
|
onRequestSort(event, property);
|
|
4608
4434
|
};
|
|
4609
|
-
return /* @__PURE__ */ (0,
|
|
4435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_TableHead.default, { className: classes.root, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_TableRow.default, { children: props.headCells.map((headCell) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4610
4436
|
import_TableCell.default,
|
|
4611
4437
|
{
|
|
4612
4438
|
className: classes.containerTh,
|
|
4613
4439
|
align: "left",
|
|
4614
4440
|
sortDirection: orderBy === headCell.id ? order : false,
|
|
4615
|
-
children: /* @__PURE__ */ (0,
|
|
4441
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
4616
4442
|
import_TableSortLabel.default,
|
|
4617
4443
|
{
|
|
4618
4444
|
active: orderBy === headCell.id,
|
|
@@ -4620,7 +4446,7 @@ var SmartTableHeader = (props) => {
|
|
|
4620
4446
|
onClick: createSortHandler(headCell.id),
|
|
4621
4447
|
children: [
|
|
4622
4448
|
headCell.label,
|
|
4623
|
-
orderBy === headCell.id ? /* @__PURE__ */ (0,
|
|
4449
|
+
orderBy === headCell.id ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: classes.visuallyHidden, children: order === "desc" ? "sorted descending" : "sorted ascending" }) : null
|
|
4624
4450
|
]
|
|
4625
4451
|
}
|
|
4626
4452
|
)
|
|
@@ -4629,23 +4455,23 @@ var SmartTableHeader = (props) => {
|
|
|
4629
4455
|
)) }) });
|
|
4630
4456
|
};
|
|
4631
4457
|
SmartTableHeader.propTypes = {
|
|
4632
|
-
order:
|
|
4633
|
-
orderBy:
|
|
4634
|
-
onRequestSort:
|
|
4635
|
-
headCells:
|
|
4458
|
+
order: import_prop_types15.default.string,
|
|
4459
|
+
orderBy: import_prop_types15.default.string,
|
|
4460
|
+
onRequestSort: import_prop_types15.default.func,
|
|
4461
|
+
headCells: import_prop_types15.default.any
|
|
4636
4462
|
};
|
|
4637
|
-
var SmartTableHeader_default =
|
|
4463
|
+
var SmartTableHeader_default = import_react66.default.memo(SmartTableHeader);
|
|
4638
4464
|
|
|
4639
4465
|
// src/components/Table/TableDesktop.tsx
|
|
4640
|
-
var
|
|
4641
|
-
var
|
|
4642
|
-
var
|
|
4466
|
+
var import_react67 = require("react");
|
|
4467
|
+
var import_material25 = require("@mui/material");
|
|
4468
|
+
var import_mui29 = require("tss-react/mui");
|
|
4643
4469
|
|
|
4644
4470
|
// src/components/Table/TableEmptyResult.tsx
|
|
4645
|
-
var
|
|
4646
|
-
var
|
|
4647
|
-
var
|
|
4648
|
-
var
|
|
4471
|
+
var import_material24 = require("@mui/material");
|
|
4472
|
+
var import_mui28 = require("tss-react/mui");
|
|
4473
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
4474
|
+
var useStyles26 = (0, import_mui28.makeStyles)()(() => ({
|
|
4649
4475
|
tableCellIcon: { padding: 24, height: "calc(100vh - 320px)" },
|
|
4650
4476
|
tableCellDefault: { padding: 24 }
|
|
4651
4477
|
}));
|
|
@@ -4654,12 +4480,12 @@ var TableEmptyResult = ({
|
|
|
4654
4480
|
handleClickOnClearFiltersButton = () => {
|
|
4655
4481
|
}
|
|
4656
4482
|
}) => {
|
|
4657
|
-
const { classes } =
|
|
4658
|
-
return showClearFilterButton ? /* @__PURE__ */ (0,
|
|
4659
|
-
/* @__PURE__ */ (0,
|
|
4660
|
-
/* @__PURE__ */ (0,
|
|
4661
|
-
/* @__PURE__ */ (0,
|
|
4662
|
-
/* @__PURE__ */ (0,
|
|
4483
|
+
const { classes } = useStyles26();
|
|
4484
|
+
return showClearFilterButton ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_material24.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_material24.TableCell, { className: classes.tableCellIcon, colSpan: 8, align: "center", children: [
|
|
4485
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(EmptyGlassIcon_default, {}),
|
|
4486
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_material24.Typography, { variant: "h6", children: "No results found." }),
|
|
4487
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_material24.Typography, { variant: "subtitle1", children: "Search without applied filters?" }),
|
|
4488
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
4663
4489
|
FilledButton_default,
|
|
4664
4490
|
{
|
|
4665
4491
|
copy: "Search",
|
|
@@ -4668,8 +4494,8 @@ var TableEmptyResult = ({
|
|
|
4668
4494
|
onClick: handleClickOnClearFiltersButton
|
|
4669
4495
|
}
|
|
4670
4496
|
)
|
|
4671
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
4672
|
-
|
|
4497
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_material24.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
4498
|
+
import_material24.TableCell,
|
|
4673
4499
|
{
|
|
4674
4500
|
className: classes.tableCellDefault,
|
|
4675
4501
|
colSpan: 8,
|
|
@@ -4681,8 +4507,8 @@ var TableEmptyResult = ({
|
|
|
4681
4507
|
var TableEmptyResult_default = TableEmptyResult;
|
|
4682
4508
|
|
|
4683
4509
|
// src/components/Table/TableDesktop.tsx
|
|
4684
|
-
var
|
|
4685
|
-
var
|
|
4510
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
4511
|
+
var useStyles27 = (0, import_mui29.makeStyles)()(() => ({
|
|
4686
4512
|
root: {
|
|
4687
4513
|
justifyContent: "space-between",
|
|
4688
4514
|
display: "flex",
|
|
@@ -4727,14 +4553,14 @@ var TableDesktop = ({
|
|
|
4727
4553
|
deleteItem,
|
|
4728
4554
|
keyField
|
|
4729
4555
|
}) => {
|
|
4730
|
-
const [order, setOrder] = (0,
|
|
4556
|
+
const [order, setOrder] = (0, import_react67.useState)(
|
|
4731
4557
|
appliedFilters?.sortDir || "desc"
|
|
4732
4558
|
);
|
|
4733
|
-
const [orderBy, setOrderBy] = (0,
|
|
4559
|
+
const [orderBy, setOrderBy] = (0, import_react67.useState)(
|
|
4734
4560
|
appliedFilters?.sortField || "delivery_date"
|
|
4735
4561
|
);
|
|
4736
|
-
const [page] = (0,
|
|
4737
|
-
const { classes } =
|
|
4562
|
+
const [page] = (0, import_react67.useState)(0);
|
|
4563
|
+
const { classes } = useStyles27();
|
|
4738
4564
|
const rowHeight = 56;
|
|
4739
4565
|
const handleRequestSort = (event, property) => {
|
|
4740
4566
|
const isAsc = orderBy === property && order === "asc";
|
|
@@ -4744,8 +4570,8 @@ var TableDesktop = ({
|
|
|
4744
4570
|
updateSort(property, orderDir);
|
|
4745
4571
|
};
|
|
4746
4572
|
const emptyRows = rowsPerPage - data.length;
|
|
4747
|
-
return /* @__PURE__ */ (0,
|
|
4748
|
-
|
|
4573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: classes.root, style: { height }, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_material25.Paper, { className: classes.paper, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { children: [...Array(Math.floor(rowsPerPage))].map(() => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4574
|
+
import_material25.Skeleton,
|
|
4749
4575
|
{
|
|
4750
4576
|
animation: "pulse",
|
|
4751
4577
|
style: { margin: "8px", opacity: 0.4 },
|
|
@@ -4753,15 +4579,15 @@ var TableDesktop = ({
|
|
|
4753
4579
|
height: rowHeight
|
|
4754
4580
|
},
|
|
4755
4581
|
Math.random()
|
|
4756
|
-
)) }) : /* @__PURE__ */ (0,
|
|
4757
|
-
/* @__PURE__ */ (0,
|
|
4758
|
-
|
|
4582
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
|
|
4583
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_material25.TableContainer, { className: classes.container, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
4584
|
+
import_material25.Table,
|
|
4759
4585
|
{
|
|
4760
4586
|
"aria-labelledby": "tableTitle",
|
|
4761
4587
|
"aria-label": "sticky table",
|
|
4762
4588
|
stickyHeader: true,
|
|
4763
4589
|
children: [
|
|
4764
|
-
/* @__PURE__ */ (0,
|
|
4590
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4765
4591
|
SmartTableHeader_default,
|
|
4766
4592
|
{
|
|
4767
4593
|
headCells,
|
|
@@ -4770,15 +4596,15 @@ var TableDesktop = ({
|
|
|
4770
4596
|
onRequestSort: handleRequestSort
|
|
4771
4597
|
}
|
|
4772
4598
|
),
|
|
4773
|
-
/* @__PURE__ */ (0,
|
|
4774
|
-
stableSort(data, getSorting(order, orderBy)).slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((item, index) => /* @__PURE__ */ (0,
|
|
4599
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_material25.TableBody, { children: [
|
|
4600
|
+
stableSort(data, getSorting(order, orderBy)).slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4775
4601
|
RenderItem,
|
|
4776
4602
|
{
|
|
4777
4603
|
...{ ...item, index, deleteItem }
|
|
4778
4604
|
},
|
|
4779
4605
|
item[keyField]
|
|
4780
4606
|
)),
|
|
4781
|
-
rowsPerPage === emptyRows && /* @__PURE__ */ (0,
|
|
4607
|
+
rowsPerPage === emptyRows && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4782
4608
|
TableEmptyResult_default,
|
|
4783
4609
|
{
|
|
4784
4610
|
showClearFilterButton,
|
|
@@ -4795,13 +4621,13 @@ var TableDesktop = ({
|
|
|
4795
4621
|
var TableDesktop_default = TableDesktop;
|
|
4796
4622
|
|
|
4797
4623
|
// src/components/TableHeader/TableHeader.tsx
|
|
4798
|
-
var
|
|
4624
|
+
var import_react68 = require("react");
|
|
4799
4625
|
var import_ImportExport = __toESM(require("@mui/icons-material/ImportExport"), 1);
|
|
4800
|
-
var
|
|
4801
|
-
var
|
|
4802
|
-
var
|
|
4803
|
-
var
|
|
4804
|
-
var
|
|
4626
|
+
var import_material26 = require("@mui/material");
|
|
4627
|
+
var import_prop_types16 = require("prop-types");
|
|
4628
|
+
var import_mui30 = require("tss-react/mui");
|
|
4629
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
4630
|
+
var useStyles28 = (0, import_mui30.makeStyles)()(() => ({
|
|
4805
4631
|
sortLabel: {
|
|
4806
4632
|
"& .MuiTableSortLabel-icon": {
|
|
4807
4633
|
opacity: 1
|
|
@@ -4809,9 +4635,9 @@ var useStyles30 = (0, import_mui32.makeStyles)()(() => ({
|
|
|
4809
4635
|
}
|
|
4810
4636
|
}));
|
|
4811
4637
|
var TableHeader = ({ cells, onSort }) => {
|
|
4812
|
-
const [sortableCells, setSortableCells] = (0,
|
|
4813
|
-
const { classes } =
|
|
4814
|
-
(0,
|
|
4638
|
+
const [sortableCells, setSortableCells] = (0, import_react68.useState)([]);
|
|
4639
|
+
const { classes } = useStyles28();
|
|
4640
|
+
(0, import_react68.useEffect)(() => {
|
|
4815
4641
|
setSortableCells(cells);
|
|
4816
4642
|
}, []);
|
|
4817
4643
|
const getNewSortDirection = (direction) => {
|
|
@@ -4845,8 +4671,8 @@ var TableHeader = ({ cells, onSort }) => {
|
|
|
4845
4671
|
});
|
|
4846
4672
|
setSortableCells(sortedCells);
|
|
4847
4673
|
};
|
|
4848
|
-
return /* @__PURE__ */ (0,
|
|
4849
|
-
|
|
4674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_material26.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_material26.TableRow, { children: sortableCells.map((cell, key) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_material26.TableCell, { children: cell.isSortable ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
4675
|
+
import_material26.TableSortLabel,
|
|
4850
4676
|
{
|
|
4851
4677
|
className: classes.sortLabel,
|
|
4852
4678
|
direction: cell?.direction || "asc",
|
|
@@ -4860,17 +4686,87 @@ TableHeader.defaultProps = {
|
|
|
4860
4686
|
onSort: null
|
|
4861
4687
|
};
|
|
4862
4688
|
TableHeader.propTypes = {
|
|
4863
|
-
cells: (0,
|
|
4864
|
-
(0,
|
|
4865
|
-
direction: (0,
|
|
4866
|
-
isSortable:
|
|
4867
|
-
label:
|
|
4868
|
-
name:
|
|
4689
|
+
cells: (0, import_prop_types16.arrayOf)(
|
|
4690
|
+
(0, import_prop_types16.shape)({
|
|
4691
|
+
direction: (0, import_prop_types16.oneOf)(["asc", "desc", ""]),
|
|
4692
|
+
isSortable: import_prop_types16.bool,
|
|
4693
|
+
label: import_prop_types16.string,
|
|
4694
|
+
name: import_prop_types16.string
|
|
4869
4695
|
})
|
|
4870
4696
|
).isRequired,
|
|
4871
|
-
onSort:
|
|
4697
|
+
onSort: import_prop_types16.func
|
|
4698
|
+
};
|
|
4699
|
+
var TableHeader_default = (0, import_react68.memo)(TableHeader);
|
|
4700
|
+
|
|
4701
|
+
// src/components/TheToolbar/TheToolbar.tsx
|
|
4702
|
+
var import_react69 = __toESM(require("react"), 1);
|
|
4703
|
+
var import_material27 = require("@mui/material");
|
|
4704
|
+
var import_mui31 = require("tss-react/mui");
|
|
4705
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
4706
|
+
var useStyles29 = (0, import_mui31.makeStyles)()((theme) => ({
|
|
4707
|
+
menuButton: {
|
|
4708
|
+
color: theme.palette.primary.contrastText
|
|
4709
|
+
},
|
|
4710
|
+
searchNatoora: {
|
|
4711
|
+
width: "100%"
|
|
4712
|
+
},
|
|
4713
|
+
searchIcon: {
|
|
4714
|
+
opacity: ".5"
|
|
4715
|
+
},
|
|
4716
|
+
inputRoot: {
|
|
4717
|
+
color: "inherit"
|
|
4718
|
+
},
|
|
4719
|
+
inputInput: {
|
|
4720
|
+
transition: theme.transitions.create("width"),
|
|
4721
|
+
width: "100%"
|
|
4722
|
+
},
|
|
4723
|
+
topBar: {
|
|
4724
|
+
display: "flex",
|
|
4725
|
+
gap: theme.spacing(1),
|
|
4726
|
+
backgroundColor: colors.topBar
|
|
4727
|
+
},
|
|
4728
|
+
drawer: {
|
|
4729
|
+
backgroundColor: "black"
|
|
4730
|
+
},
|
|
4731
|
+
drawerItem: {
|
|
4732
|
+
maxWidth: "300px",
|
|
4733
|
+
width: "80vw"
|
|
4734
|
+
},
|
|
4735
|
+
offset: theme.mixins.toolbar
|
|
4736
|
+
}));
|
|
4737
|
+
var TheToolbar = ({
|
|
4738
|
+
imageLogoDarkSmall,
|
|
4739
|
+
imageLogoLightSmall,
|
|
4740
|
+
handleOpen,
|
|
4741
|
+
LeftDrawer: LeftDrawer2
|
|
4742
|
+
}) => {
|
|
4743
|
+
const { classes } = useStyles29();
|
|
4744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_material27.Box, { children: [
|
|
4745
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_material27.AppBar, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_material27.Toolbar, { className: classes.topBar, children: [
|
|
4746
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
4747
|
+
RoundButton_default,
|
|
4748
|
+
{
|
|
4749
|
+
className: classes.menuButton,
|
|
4750
|
+
icon: "menu",
|
|
4751
|
+
noStrokes: true,
|
|
4752
|
+
onClick: handleOpen
|
|
4753
|
+
}
|
|
4754
|
+
),
|
|
4755
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
4756
|
+
CompanyLogo_default,
|
|
4757
|
+
{
|
|
4758
|
+
size: "small",
|
|
4759
|
+
color: "light",
|
|
4760
|
+
imageLogoDarkSmall,
|
|
4761
|
+
imageLogoLightSmall
|
|
4762
|
+
}
|
|
4763
|
+
)
|
|
4764
|
+
] }) }),
|
|
4765
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_material27.Box, { className: classes.offset }),
|
|
4766
|
+
LeftDrawer2
|
|
4767
|
+
] });
|
|
4872
4768
|
};
|
|
4873
|
-
var
|
|
4769
|
+
var TheToolbar_default = import_react69.default.memo(TheToolbar);
|
|
4874
4770
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4875
4771
|
0 && (module.exports = {
|
|
4876
4772
|
AlertDialog,
|
|
@@ -4883,7 +4779,6 @@ var TableHeader_default = (0, import_react69.memo)(TableHeader);
|
|
|
4883
4779
|
Date,
|
|
4884
4780
|
DeleteSubstitutionDialogContent,
|
|
4885
4781
|
DeleteUserDialogContent,
|
|
4886
|
-
DesktopContainer,
|
|
4887
4782
|
ExtendedButton,
|
|
4888
4783
|
FilledButton,
|
|
4889
4784
|
FilledButtonLg,
|