@evenicanpm/admin-integrate 1.1.0 → 1.2.2

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.
Files changed (114) hide show
  1. package/documents/Process/fragments.ts +13 -0
  2. package/documents/Process/list.ts +27 -0
  3. package/documents/ProcessSchedule/fragments.ts +24 -0
  4. package/documents/ProcessSchedule/read.ts +12 -0
  5. package/documents/ProcessScheduleGroup/fragments.ts +29 -0
  6. package/documents/ProcessScheduleGroup/read.ts +12 -0
  7. package/documents/ScheduledProcess/fragments.ts +24 -0
  8. package/documents/ScheduledProcess/list.ts +27 -0
  9. package/package.json +21 -17
  10. package/src/api/Integrations/queries/get-process.query.ts +48 -0
  11. package/src/api/Integrations/queries/get-process.server.ts +9 -0
  12. package/src/api/Integrations/queries/index.ts +1 -0
  13. package/src/api/dashboard/queries/get-process-executions.query.ts +33 -36
  14. package/src/api/dashboard/queries/get-process-executions.server.ts +4 -4
  15. package/src/api/scheduler/queries/get-process-schedule-group-details.query.ts +45 -0
  16. package/src/api/scheduler/queries/get-process-schedule-group-details.server.ts +14 -0
  17. package/src/api/scheduler/queries/get-process-schedule.query.ts +45 -0
  18. package/src/api/scheduler/queries/get-process-schedule.server.ts +14 -0
  19. package/src/api/scheduler/queries/get-scheduled-processes.query.ts +45 -0
  20. package/src/api/scheduler/queries/get-scheduled-processes.server.ts +11 -0
  21. package/src/api/scheduler/queries/index.ts +3 -0
  22. package/src/components/breadcrumbs/breadcrumbs.tsx +23 -26
  23. package/src/components/breadcrumbs/index.ts +1 -1
  24. package/src/components/breadcrumbs/types.tsx +4 -0
  25. package/src/components/button/outlined-icon-button.tsx +26 -38
  26. package/src/components/core/date-time-popover.tsx +32 -0
  27. package/src/components/core/edited-typography.tsx +20 -0
  28. package/src/components/core/index.ts +3 -0
  29. package/src/components/core/loading.tsx +6 -6
  30. package/src/components/core/title-edit.tsx +122 -0
  31. package/src/components/dashboard-list/dashboard-list-row.tsx +114 -115
  32. package/src/components/dashboard-list/dashboard-list.tsx +119 -119
  33. package/src/components/data-table/table-header.tsx +85 -81
  34. package/src/components/data-table/table-pagination.tsx +27 -27
  35. package/src/components/data-table/table-row.tsx +14 -14
  36. package/src/components/data-table/table-skeleton.tsx +34 -34
  37. package/src/components/execution/execution-filter.ts +22 -22
  38. package/src/components/execution/execution-status-icon.tsx +16 -17
  39. package/src/components/execution/execution-tag.tsx +81 -80
  40. package/src/components/footer/footer.tsx +34 -34
  41. package/src/components/header/dashboard-list-header.tsx +64 -63
  42. package/src/components/header/execution-details-header.tsx +102 -129
  43. package/src/components/header/header.tsx +27 -27
  44. package/src/components/header/index.ts +1 -0
  45. package/src/components/header/integration-details-header.tsx +99 -0
  46. package/src/components/icons/up-down.tsx +15 -15
  47. package/src/components/integration-list/index.ts +2 -0
  48. package/src/components/integration-list/integration-filter.ts +21 -0
  49. package/src/components/integration-list/integration-status-icon.tsx +33 -0
  50. package/src/components/integration-list/integration-tag.tsx +77 -0
  51. package/src/components/integration-view/edges/default-edge.tsx +18 -17
  52. package/src/components/integration-view/elk-layout-options.ts +26 -26
  53. package/src/components/integration-view/elk-types.ts +16 -12
  54. package/src/components/integration-view/flow-types.tsx +5 -5
  55. package/src/components/integration-view/integration-view.tsx +132 -130
  56. package/src/components/integration-view/nodes/base-node.tsx +50 -0
  57. package/src/components/integration-view/nodes/connection-node.tsx +8 -8
  58. package/src/components/integration-view/nodes/entry-node.tsx +8 -8
  59. package/src/components/integration-view/nodes/group-node.tsx +47 -6
  60. package/src/components/integration-view/nodes/task-node.tsx +58 -13
  61. package/src/components/integration-view/temp-data/initialElements.tsx +224 -0
  62. package/src/components/integration-view/types.ts +6 -6
  63. package/src/components/layouts/main-layout.tsx +13 -13
  64. package/src/components/layouts/root-container.tsx +25 -25
  65. package/src/components/link-cards/link-card.tsx +23 -23
  66. package/src/components/link-cards/styles.ts +15 -15
  67. package/src/components/list-filter/date-filter.tsx +41 -45
  68. package/src/components/list-filter/date-range-filter.tsx +78 -77
  69. package/src/components/list-filter/list-filter-types.ts +38 -38
  70. package/src/components/list-filter/list-filter.tsx +363 -354
  71. package/src/components/list-filter/multi-select-filter.tsx +94 -95
  72. package/src/components/list-filter/select-filter.tsx +67 -64
  73. package/src/components/scheduler/day-selector.tsx +174 -0
  74. package/src/components/scheduler/day-tag.tsx +73 -0
  75. package/src/components/scheduler/index.ts +4 -0
  76. package/src/components/scheduler/schedule-filter.ts +25 -0
  77. package/src/components/scheduler/schedule-icon.tsx +87 -0
  78. package/src/components/scheduler/scheduler-types.ts +40 -0
  79. package/src/hooks/use-breadcrumbs.ts +31 -31
  80. package/src/hooks/use-recurrence.tsx +13 -0
  81. package/src/hooks/use-timestamp.tsx +21 -21
  82. package/src/pages/dashboard/dashboard-link-cards.tsx +99 -99
  83. package/src/pages/dashboard/dashboard-list-sections.tsx +130 -125
  84. package/src/pages/dashboard/dashboard.tsx +6 -6
  85. package/src/pages/execution-details/execution-details.tsx +23 -29
  86. package/src/pages/executions/executions-list/executions-list-row.tsx +101 -104
  87. package/src/pages/executions/executions-list/executions-list-table.tsx +45 -53
  88. package/src/pages/executions/executions-list/executions-list.tsx +219 -212
  89. package/src/pages/executions/executions.tsx +67 -72
  90. package/src/pages/integrations/integration-list/index.ts +1 -0
  91. package/src/pages/integrations/integration-list/integration-list-row.tsx +147 -0
  92. package/src/pages/integrations/integration-list/integration-list-table.tsx +78 -0
  93. package/src/pages/integrations/integration-list/integration-list.tsx +262 -0
  94. package/src/pages/integrations/integrations.tsx +83 -28
  95. package/src/pages/scheduler/schedule-drawer/edited/edited-types.ts +17 -0
  96. package/src/pages/scheduler/schedule-drawer/edited/index.ts +1 -0
  97. package/src/pages/scheduler/schedule-drawer/index.ts +1 -0
  98. package/src/pages/scheduler/schedule-drawer/schedule-details-integrations.tsx +227 -0
  99. package/src/pages/scheduler/schedule-drawer/schedule-details-main.tsx +292 -0
  100. package/src/pages/scheduler/schedule-drawer/schedule-details-name.tsx +77 -0
  101. package/src/pages/scheduler/schedule-drawer/schedule-details-skeleton.tsx +64 -0
  102. package/src/pages/scheduler/schedule-drawer/schedule-details.tsx +42 -0
  103. package/src/pages/scheduler/schedule-drawer/schedule-drawer-buttons.tsx +72 -0
  104. package/src/pages/scheduler/schedule-drawer/schedule-drawer-group.tsx +103 -0
  105. package/src/pages/scheduler/schedule-drawer/schedule-drawer-legacy.tsx +94 -0
  106. package/src/pages/scheduler/schedule-drawer/schedule-drawer.tsx +101 -0
  107. package/src/pages/scheduler/schedule-drawer/sortable-integration-row.tsx +93 -0
  108. package/src/pages/scheduler/scheduler.tsx +106 -30
  109. package/src/pages/scheduler/schedules-list/index.ts +1 -0
  110. package/src/pages/scheduler/schedules-list/schedules-list-row.tsx +235 -0
  111. package/src/pages/scheduler/schedules-list/schedules-list-table.tsx +74 -0
  112. package/src/pages/scheduler/schedules-list/schedules-list.tsx +280 -0
  113. package/tsconfig.json +29 -26
  114. package/src/components/integration-view/temp-data/initialElements.ts +0 -238
@@ -1,30 +1,30 @@
1
1
  import {
2
- DateRangeFilter,
3
- Filters,
4
- MultiSelectFilter,
2
+ DateRangeFilter,
3
+ Filters,
4
+ MultiSelectFilter,
5
5
  } from "@evenicanpm/admin-integrate/components/list-filter/list-filter-types";
6
6
 
7
7
  export interface ExecutionsListFilters extends Filters {
8
- dateRange: DateRangeFilter;
9
- multiSelectFilter: MultiSelectFilter;
8
+ dateRange: DateRangeFilter;
9
+ multiSelectFilter: MultiSelectFilter;
10
10
  }
11
11
 
12
12
  export const executionListFilters: ExecutionsListFilters = {
13
- dateRange: {
14
- type: "dateRange",
15
- label: "Date Range",
16
- value: null,
17
- },
18
- multiSelectFilter: {
19
- type: "multiSelect",
20
- label: "Execution Status",
21
- value: null,
22
- options: [
23
- { id: 300, value: "Executions.inProgress" },
24
- { id: 400, value: "Executions.complete" },
25
- { id: 450, value: "Executions.warning" },
26
- { id: 500, value: "Executions.failed" },
27
- { id: 999, value: "Executions.unavailable" },
28
- ],
29
- },
13
+ dateRange: {
14
+ type: "dateRange",
15
+ label: "Executions.dateRange",
16
+ value: null,
17
+ },
18
+ multiSelectFilter: {
19
+ type: "multiSelect",
20
+ label: "Executions.executionStatus",
21
+ value: null,
22
+ options: [
23
+ { id: 300, value: "Executions.inProgress" },
24
+ { id: 400, value: "Executions.complete" },
25
+ { id: 450, value: "Executions.warning" },
26
+ { id: 500, value: "Executions.failed" },
27
+ { id: 999, value: "Executions.unavailable" },
28
+ ],
29
+ },
30
30
  };
@@ -1,30 +1,29 @@
1
1
  import React from "react";
2
2
 
3
- import { Box, Typography, SxProps } from "@mui/material";
3
+ import { SxProps } from "@mui/material";
4
4
  import {
5
- RemoveRedEye,
6
- Loop,
7
- CheckCircleOutline,
8
- WarningAmber,
9
- ErrorOutline,
10
- Clear,
5
+ Loop,
6
+ CheckCircleOutline,
7
+ WarningAmber,
8
+ ErrorOutline,
9
+ Clear,
11
10
  } from "@mui/icons-material";
12
11
 
13
12
  interface Props {
14
- executionStatusId: string;
15
- sx?: SxProps;
13
+ executionStatusId: string;
14
+ sx?: SxProps;
16
15
  }
17
16
 
18
17
  const ExecutionStatusIcon: React.FC<Props> = (props: Props) => {
19
- const statusIconMap = {
20
- 300: <Loop color="info" />,
21
- 400: <CheckCircleOutline color="success" />,
22
- 450: <WarningAmber color="warning" />,
23
- 500: <ErrorOutline color="error" />,
24
- 999: <Clear sx={{ color: "grey.600" }} />,
25
- };
18
+ const statusIconMap: { [key: string]: any } = {
19
+ "300": <Loop color="info" />,
20
+ "400": <CheckCircleOutline color="success" />,
21
+ "450": <WarningAmber color="warning" />,
22
+ "500": <ErrorOutline color="error" />,
23
+ "999": <Clear sx={{ color: "grey.600" }} />,
24
+ };
26
25
 
27
- return statusIconMap[props.executionStatusId] || statusIconMap[999];
26
+ return statusIconMap[props.executionStatusId] || statusIconMap["999"];
28
27
  };
29
28
 
30
29
  export default ExecutionStatusIcon;
@@ -6,95 +6,96 @@ import { Box, Typography, SxProps } from "@mui/material";
6
6
 
7
7
  // Styled components
8
8
  const StyledTagBox = styled(Box)(({ theme }) => ({
9
- padding: theme.spacing(0, 1.5),
10
- border: "solid 1px",
11
- borderRadius: 4,
12
- alignContent: "center",
13
- maxWidth: "fit-content",
9
+ padding: theme.spacing(0, 1.5),
10
+ border: "solid 1px",
11
+ borderRadius: 4,
12
+ alignContent: "center",
13
+ maxWidth: "fit-content",
14
+ maxHeight: "fit-content",
14
15
  }));
15
- const StyledTag = styled(Typography)(({ theme }) => ({
16
- fontWeight: "bold",
16
+ const StyledTag = styled(Typography)(() => ({
17
+ fontWeight: "bold",
17
18
  }));
18
19
 
19
20
  interface Props {
20
- executionStatusId: string;
21
- sx?: SxProps;
21
+ executionStatusId: string;
22
+ sx?: SxProps;
22
23
  }
23
24
 
24
25
  const ExecutionTag: React.FC<Props> = (props: Props) => {
25
- const t = useTranslations("Integrate");
26
+ const t = useTranslations("Integrate");
26
27
 
27
- const statusTagMap = {
28
- 300: (
29
- <StyledTagBox
30
- sx={{
31
- backgroundColor: "info.100",
32
- borderColor: "info.main",
33
- ...props.sx,
34
- }}
35
- >
36
- <StyledTag color="info" variant="caption">
37
- {t("Executions.inProgress")}
38
- </StyledTag>
39
- </StyledTagBox>
40
- ),
41
- 400: (
42
- <StyledTagBox
43
- sx={{
44
- backgroundColor: "success.100",
45
- borderColor: "success.main",
46
- ...props.sx,
47
- }}
48
- >
49
- <StyledTag color="success" variant="caption">
50
- {t("Executions.complete")}
51
- </StyledTag>
52
- </StyledTagBox>
53
- ),
54
- 450: (
55
- <StyledTagBox
56
- sx={{
57
- backgroundColor: "warning.100",
58
- borderColor: "orange.700",
59
- color: "orange.700",
60
- ...props.sx,
61
- }}
62
- >
63
- <StyledTag color="inherit" variant="caption">
64
- {t("Executions.warning")}
65
- </StyledTag>
66
- </StyledTagBox>
67
- ),
68
- 500: (
69
- <StyledTagBox
70
- sx={{
71
- backgroundColor: "error.100",
72
- borderColor: "error.main",
73
- ...props.sx,
74
- }}
75
- >
76
- <StyledTag color="error" variant="caption">
77
- {t("Executions.failed")}
78
- </StyledTag>
79
- </StyledTagBox>
80
- ),
81
- 999: (
82
- <StyledTagBox
83
- sx={{
84
- backgroundColor: "grey.300",
85
- borderColor: "grey.600",
86
- color: "grey.600",
87
- ...props.sx,
88
- }}
89
- >
90
- <StyledTag color="inherit" variant="caption">
91
- {t("Executions.unavailable")}
92
- </StyledTag>
93
- </StyledTagBox>
94
- ),
95
- };
28
+ const statusTagMap: { [key: string]: any } = {
29
+ 300: (
30
+ <StyledTagBox
31
+ sx={{
32
+ backgroundColor: "info.100",
33
+ borderColor: "info.main",
34
+ ...props.sx,
35
+ }}
36
+ >
37
+ <StyledTag color="info" variant="caption">
38
+ {t("Executions.inProgress")}
39
+ </StyledTag>
40
+ </StyledTagBox>
41
+ ),
42
+ 400: (
43
+ <StyledTagBox
44
+ sx={{
45
+ backgroundColor: "success.100",
46
+ borderColor: "success.main",
47
+ ...props.sx,
48
+ }}
49
+ >
50
+ <StyledTag color="success" variant="caption">
51
+ {t("Executions.complete")}
52
+ </StyledTag>
53
+ </StyledTagBox>
54
+ ),
55
+ 450: (
56
+ <StyledTagBox
57
+ sx={{
58
+ backgroundColor: "warning.100",
59
+ borderColor: "orange.700",
60
+ color: "orange.700",
61
+ ...props.sx,
62
+ }}
63
+ >
64
+ <StyledTag color="inherit" variant="caption">
65
+ {t("Executions.warning")}
66
+ </StyledTag>
67
+ </StyledTagBox>
68
+ ),
69
+ 500: (
70
+ <StyledTagBox
71
+ sx={{
72
+ backgroundColor: "error.100",
73
+ borderColor: "error.main",
74
+ ...props.sx,
75
+ }}
76
+ >
77
+ <StyledTag color="error" variant="caption">
78
+ {t("Executions.failed")}
79
+ </StyledTag>
80
+ </StyledTagBox>
81
+ ),
82
+ 999: (
83
+ <StyledTagBox
84
+ sx={{
85
+ backgroundColor: "grey.300",
86
+ borderColor: "grey.600",
87
+ color: "grey.600",
88
+ ...props.sx,
89
+ }}
90
+ >
91
+ <StyledTag color="inherit" variant="caption">
92
+ {t("Executions.unavailable")}
93
+ </StyledTag>
94
+ </StyledTagBox>
95
+ ),
96
+ };
96
97
 
97
- return statusTagMap[props.executionStatusId] || statusTagMap[999];
98
+ return statusTagMap[props.executionStatusId] || statusTagMap[999];
98
99
  };
99
100
 
100
101
  export default ExecutionTag;
@@ -8,48 +8,48 @@ import { Typography, Box, Grid2 as Grid } from "@mui/material";
8
8
  import { Copyright } from "@mui/icons-material";
9
9
 
10
10
  // Styled components
11
- const Footer = styled("footer")(({ theme }) => ({
12
- flexShrink: 0,
13
- marginTop: "auto",
11
+ const Footer = styled("footer")(() => ({
12
+ flexShrink: 0,
13
+ marginTop: "auto",
14
14
  }));
15
15
 
16
16
  const IntegrateFooter: React.FC = () => {
17
- const t = useTranslations("Integrate.Footer");
17
+ const t = useTranslations("Integrate.Footer");
18
18
 
19
- const theme = useTheme();
20
- const styles = getStyles(theme);
19
+ const theme = useTheme();
20
+ const styles = getStyles(theme);
21
21
 
22
- return (
23
- <Footer>
24
- <Grid container spacing={0.5} sx={styles.container}>
25
- <Grid>
26
- <Box sx={{ ...styles.centered, color: "grey.500" }}>
27
- <Copyright color="inherit" fontSize="small" />
28
- </Box>
29
- </Grid>
30
- <Grid>
31
- <Box sx={styles.centered}>
32
- <Typography variant="caption" color="grey">
33
- {t("copyright")}
34
- </Typography>
35
- </Box>
36
- </Grid>
37
- </Grid>
38
- </Footer>
39
- );
22
+ return (
23
+ <Footer>
24
+ <Grid container spacing={0.5} sx={styles.container}>
25
+ <Grid>
26
+ <Box sx={{ ...styles.centered, color: "grey.500" }}>
27
+ <Copyright color="inherit" fontSize="small" />
28
+ </Box>
29
+ </Grid>
30
+ <Grid>
31
+ <Box sx={styles.centered}>
32
+ <Typography variant="caption" color="grey">
33
+ {t("copyright")}
34
+ </Typography>
35
+ </Box>
36
+ </Grid>
37
+ </Grid>
38
+ </Footer>
39
+ );
40
40
  };
41
41
 
42
42
  const getStyles = (theme: Theme) => {
43
- return {
44
- container: {
45
- justifyContent: "center",
46
- padding: theme.spacing(5, 0, 0),
47
- },
48
- centered: {
49
- display: "grid",
50
- alignItems: "center",
51
- },
52
- };
43
+ return {
44
+ container: {
45
+ justifyContent: "center",
46
+ padding: theme.spacing(5, 0, 0),
47
+ },
48
+ centered: {
49
+ display: "grid",
50
+ alignItems: "center",
51
+ },
52
+ };
53
53
  };
54
54
 
55
55
  export default IntegrateFooter;
@@ -11,78 +11,79 @@ import { Refresh, VisibilityOutlined } from "@mui/icons-material";
11
11
  import { OutlinedIconButton } from "../button";
12
12
 
13
13
  interface Props {
14
- title: string;
15
- url?: string;
16
- handleRefresh?: () => void;
14
+ title: string;
15
+ url?: string;
16
+ handleRefresh?: () => void;
17
17
  }
18
18
 
19
19
  const DashboardListHeader: React.FC<Props> = (props: Props) => {
20
- const t = useTranslations("Integrate.Dashboard");
20
+ const t = useTranslations("Integrate.Dashboard");
21
21
 
22
- const theme = useTheme();
23
- const styles = getStyles(theme);
22
+ const theme = useTheme();
23
+ const styles = getStyles(theme);
24
24
 
25
- const handleViewAll = () => {
26
- //Temporarily commented out until executions detail page is implemented
27
- //redirect(props.url, RedirectType.push);
28
- };
25
+ const handleViewAll = () => {
26
+ if (props.url) {
27
+ redirect(props.url, RedirectType.push);
28
+ }
29
+ };
29
30
 
30
- return (
31
- <Grid container spacing={0}>
32
- <Grid size={8}>
33
- <Box sx={styles.title}>
34
- <Typography variant="h6" sx={styles.typography}>
35
- {props.title}
36
- </Typography>
37
- </Box>
38
- </Grid>
39
- <Grid size={4}>
40
- <Box display="flex" justifyContent="flex-end">
41
- {props.url && (
42
- <Button
43
- sx={styles.button}
44
- variant="outlined"
45
- color="info"
46
- startIcon={<VisibilityOutlined />}
47
- onClick={handleViewAll}
48
- >
49
- {t("ListHeader.viewAll")}
50
- </Button>
51
- )}
52
- {props.handleRefresh && (
53
- <OutlinedIconButton
54
- sx={styles.iconButton}
55
- color="info"
56
- onClick={props.handleRefresh}
57
- >
58
- <Refresh />
59
- </OutlinedIconButton>
60
- )}
61
- </Box>
62
- </Grid>
63
- </Grid>
64
- );
31
+ return (
32
+ <Grid container spacing={0}>
33
+ <Grid size={8}>
34
+ <Box sx={styles.title}>
35
+ <Typography variant="h6" sx={styles.typography}>
36
+ {props.title}
37
+ </Typography>
38
+ </Box>
39
+ </Grid>
40
+ <Grid size={4}>
41
+ <Box display="flex" justifyContent="flex-end">
42
+ {props.url && (
43
+ <Button
44
+ sx={styles.button}
45
+ variant="outlined"
46
+ color="info"
47
+ startIcon={<VisibilityOutlined />}
48
+ onClick={handleViewAll}
49
+ >
50
+ {t("ListHeader.viewAll")}
51
+ </Button>
52
+ )}
53
+ {props.handleRefresh && (
54
+ <OutlinedIconButton
55
+ sx={styles.iconButton}
56
+ color="info"
57
+ onClick={props.handleRefresh}
58
+ >
59
+ <Refresh />
60
+ </OutlinedIconButton>
61
+ )}
62
+ </Box>
63
+ </Grid>
64
+ </Grid>
65
+ );
65
66
  };
66
67
 
67
68
  const getStyles = (theme: Theme) => {
68
- return {
69
- title: {
70
- display: "flex",
71
- alignItems: "center",
72
- height: "100%",
73
- },
74
- typography: {
75
- fontWeight: "medium",
76
- },
77
- button: {
78
- borderWidth: 2,
79
- borderRadius: 1,
80
- marginRight: theme.spacing(1),
81
- },
82
- iconButton: {
83
- borderRadius: 1,
84
- },
85
- };
69
+ return {
70
+ title: {
71
+ display: "flex",
72
+ alignItems: "center",
73
+ height: "100%",
74
+ },
75
+ typography: {
76
+ fontWeight: "medium",
77
+ },
78
+ button: {
79
+ borderWidth: 2,
80
+ borderRadius: 1,
81
+ marginRight: theme.spacing(1),
82
+ },
83
+ iconButton: {
84
+ borderRadius: 1,
85
+ },
86
+ };
86
87
  };
87
88
 
88
89
  export default DashboardListHeader;