@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
@@ -21,137 +21,137 @@ import { Typography, Stack } from "@mui/material";
21
21
 
22
22
  // Returned from processExecutions query
23
23
  export interface Item {
24
- id: string;
25
- name: string;
26
- startDate: string;
27
- executionStatus: {
28
- id: string;
29
- };
30
- process: {
31
- id: string;
32
- };
24
+ id: string;
25
+ name: string;
26
+ startDate: string;
27
+ executionStatus: {
28
+ id: string;
29
+ };
30
+ process: {
31
+ id: string;
32
+ };
33
33
  }
34
34
 
35
35
  interface Props {
36
- title: string;
37
- heading: Head[];
38
- data: GetProcessExecutionsQuery;
39
- loading: boolean;
40
- url: string;
41
- handleRefresh?: () => void;
42
- enableBgColor?: boolean;
36
+ title: string;
37
+ heading: Head[];
38
+ data: GetProcessExecutionsQuery;
39
+ loading: boolean;
40
+ url: string;
41
+ handleRefresh?: () => void;
42
+ enableBgColor?: boolean;
43
43
  }
44
44
 
45
45
  // Row height in terms of multiples of theme.spacing(1) (e.g. theme.spacing(7.5 & rows per page))
46
46
  const rowHeight = 7.5;
47
47
 
48
48
  const DashboardList: React.FC<Props> = (props: Props) => {
49
- const t = useTranslations("Integrate.Dashboard");
50
-
51
- const theme = useTheme();
52
- const styles = getStyles(theme);
53
-
54
- const [items, setItems] = useState<Item[]>([]);
55
- const [fetched, setFetched] = useState<boolean>(false); // prevents "empty list" msg from showing for split second
56
-
57
- useEffect(() => {
58
- if (props.data) {
59
- setItems(props.data.processExecutions.nodes as Item[]);
60
- setFetched(true);
61
- }
62
- }, [props.data]);
63
-
64
- return (
65
- <Card sx={styles.card}>
66
- <Box mr={2} ml={2}>
67
- <DashboardListHeader
68
- title={props.title}
69
- url={props.url}
70
- handleRefresh={props.handleRefresh}
71
- />
72
- </Box>
73
-
74
- {props.loading && (
75
- <TableSkeleton
76
- heading={props.heading}
77
- perPage={5}
78
- rowSx={styles.rowSx}
79
- sx={styles.tableContainer}
80
- />
81
- )}
82
-
83
- {!props.loading && props.data && fetched && items.length > 0 ? (
84
- <TableContainer sx={styles.tableContainer}>
85
- <Table>
86
- <TableHeader
87
- heading={props.heading}
88
- orderBy={"startDate"}
89
- order={"desc"}
90
- />
91
- <TableBody>
92
- {items.map((item, index) => (
93
- <DashboardListRow
94
- key={index}
95
- item={item}
96
- heading={props.heading}
97
- enableBgColor={props.enableBgColor}
98
- sx={styles.rowSx}
99
- />
100
- ))}
101
- </TableBody>
102
- </Table>
103
- </TableContainer>
104
- ) : null}
105
-
106
- {!props.loading && !(props.data && fetched && items.length > 0) ? (
107
- <FlexBox
108
- justifyContent="center"
109
- alignItems="center"
110
- sx={{
111
- minHeight: "335px",
112
- marginBottom: theme.spacing(2),
113
- }}
114
- >
115
- <Stack spacing={1} justifyContent="center" alignItems="center">
116
- <Typography variant="h6" color="info">
117
- {t("ListEmpty.title")}
118
- </Typography>
119
- <Typography variant="body1">{t("ListEmpty.body")}</Typography>
120
- </Stack>
121
- </FlexBox>
122
- ) : null}
123
- </Card>
124
- );
49
+ const t = useTranslations("Integrate.Dashboard");
50
+
51
+ const theme = useTheme();
52
+ const styles = getStyles(theme);
53
+
54
+ const [items, setItems] = useState<Item[]>([]);
55
+ const [fetched, setFetched] = useState<boolean>(false); // prevents "empty list" msg from showing for split second
56
+
57
+ useEffect(() => {
58
+ if (props.data?.processExecutions?.nodes) {
59
+ setItems(props.data.processExecutions.nodes as Item[]);
60
+ setFetched(true);
61
+ }
62
+ }, [props.data]);
63
+
64
+ return (
65
+ <Card sx={styles.card}>
66
+ <Box mr={2} ml={2}>
67
+ <DashboardListHeader
68
+ title={props.title}
69
+ url={props.url}
70
+ handleRefresh={props.handleRefresh}
71
+ />
72
+ </Box>
73
+
74
+ {props.loading && (
75
+ <TableSkeleton
76
+ heading={props.heading}
77
+ perPage={5}
78
+ rowSx={styles.rowSx}
79
+ sx={styles.tableContainer}
80
+ />
81
+ )}
82
+
83
+ {!props.loading && props.data && fetched && items.length > 0 ? (
84
+ <TableContainer sx={styles.tableContainer}>
85
+ <Table>
86
+ <TableHeader
87
+ heading={props.heading}
88
+ orderBy={"startDate"}
89
+ order={"desc"}
90
+ />
91
+ <TableBody>
92
+ {items.map((item, index) => (
93
+ <DashboardListRow
94
+ key={index}
95
+ item={item}
96
+ heading={props.heading}
97
+ enableBgColor={props.enableBgColor}
98
+ sx={styles.rowSx}
99
+ />
100
+ ))}
101
+ </TableBody>
102
+ </Table>
103
+ </TableContainer>
104
+ ) : null}
105
+
106
+ {!props.loading && !(props.data && fetched && items.length > 0) ? (
107
+ <FlexBox
108
+ justifyContent="center"
109
+ alignItems="center"
110
+ sx={{
111
+ minHeight: "335px",
112
+ marginBottom: theme.spacing(2),
113
+ }}
114
+ >
115
+ <Stack spacing={1} justifyContent="center" alignItems="center">
116
+ <Typography variant="h6" color="info">
117
+ {t("ListEmpty.title")}
118
+ </Typography>
119
+ <Typography variant="body1">{t("ListEmpty.body")}</Typography>
120
+ </Stack>
121
+ </FlexBox>
122
+ ) : null}
123
+ </Card>
124
+ );
125
125
  };
126
126
 
127
127
  const getStyles = (theme: Theme) => {
128
- return {
129
- card: {
130
- paddingTop: theme.spacing(2),
131
- },
132
- title: {
133
- display: "flex",
134
- alignItems: "center",
135
- height: "100%",
136
- },
137
- typography: {
138
- fontWeight: "medium",
139
- },
140
- button: {
141
- borderWidth: 2,
142
- borderRadius: 1,
143
- marginRight: theme.spacing(1),
144
- },
145
- iconButton: {
146
- borderRadius: 1,
147
- },
148
- tableContainer: {
149
- paddingTop: theme.spacing(2),
150
- },
151
- rowSx: {
152
- height: theme.spacing(rowHeight),
153
- },
154
- };
128
+ return {
129
+ card: {
130
+ paddingTop: theme.spacing(2),
131
+ },
132
+ title: {
133
+ display: "flex",
134
+ alignItems: "center",
135
+ height: "100%",
136
+ },
137
+ typography: {
138
+ fontWeight: "medium",
139
+ },
140
+ button: {
141
+ borderWidth: 2,
142
+ borderRadius: 1,
143
+ marginRight: theme.spacing(1),
144
+ },
145
+ iconButton: {
146
+ borderRadius: 1,
147
+ },
148
+ tableContainer: {
149
+ paddingTop: theme.spacing(2),
150
+ },
151
+ rowSx: {
152
+ height: theme.spacing(rowHeight),
153
+ },
154
+ };
155
155
  };
156
156
 
157
157
  export default DashboardList;
@@ -10,100 +10,104 @@ import { ExpandLess, ExpandMore } from "@mui/icons-material";
10
10
 
11
11
  // STYLED COMPONENTS
12
12
  const StyledTableCell = styled(TableCell)(({ theme }) => ({
13
- fontWeight: 500,
14
- padding: "16px 20px",
15
- color: theme.palette.grey[900],
13
+ fontWeight: 500,
14
+ padding: "16px 20px",
15
+ color: theme.palette.grey[900],
16
16
  }));
17
17
 
18
18
  // ==============================================================
19
19
  export type Head = {
20
- id: string;
21
- label: string;
22
- align: string;
23
- width: string;
24
- sortable?: boolean;
20
+ id: string;
21
+ label: string;
22
+ align: string;
23
+ width?: string;
24
+ sortable?: boolean;
25
25
  };
26
26
  interface Props {
27
- heading: Head[];
28
- orderBy: string;
29
- order: "asc" | "desc";
30
- onRequestSort?: (id: string) => void; // if provided, make list sortable by column
31
- rowSx?: SxProps;
27
+ heading: Head[];
28
+ orderBy: string;
29
+ order: "asc" | "desc";
30
+ onRequestSort?: (id: string) => void; // if provided, make list sortable by column
31
+ rowSx?: SxProps;
32
32
  }
33
33
  // ==============================================================
34
34
 
35
35
  export default function TableHeader({
36
- order,
37
- heading,
38
- orderBy,
39
- onRequestSort,
40
- rowSx,
36
+ order,
37
+ heading,
38
+ orderBy,
39
+ onRequestSort,
40
+ rowSx,
41
41
  }: Props) {
42
- const theme = useTheme();
43
- const styles = getStyles(theme);
42
+ const theme = useTheme();
43
+ const styles = getStyles(theme);
44
44
 
45
- return (
46
- <TableHead sx={{ backgroundColor: "grey.200" }}>
47
- <TableRow sx={rowSx}>
48
- {heading.map((headCell) => (
49
- <StyledTableCell
50
- key={headCell.id}
51
- align={headCell.align as TableCellProps["align"]}
52
- sortDirection={orderBy === headCell.id ? order : false}
53
- width={headCell.width}
54
- >
55
- {onRequestSort && headCell.sortable ? (
56
- <TableSortLabel
57
- active={orderBy === headCell.id}
58
- onClick={() => onRequestSort(headCell.id)}
59
- direction={orderBy === headCell.id ? order : "asc"}
60
- sx={styles.sortLabel}
61
- IconComponent={() =>
62
- order === "desc" && orderBy === headCell.id ? (
63
- <ExpandMore
64
- sx={{
65
- ...styles.sortIcon,
66
- visibility:
67
- orderBy === headCell.id ? "visible" : "hidden",
68
- }}
69
- />
70
- ) : (
71
- <ExpandLess
72
- sx={{
73
- ...styles.sortIcon,
74
- visibility:
75
- orderBy === headCell.id ? "visible" : "hidden",
76
- }}
77
- />
78
- )
79
- }
80
- >
81
- {headCell.label}
82
- </TableSortLabel>
83
- ) : (
84
- headCell.label
85
- )}
86
- </StyledTableCell>
87
- ))}
88
- </TableRow>
89
- </TableHead>
90
- );
45
+ return (
46
+ <TableHead sx={{ backgroundColor: "grey.200" }}>
47
+ <TableRow sx={rowSx}>
48
+ {heading.map((headCell) => (
49
+ <StyledTableCell
50
+ key={headCell.id}
51
+ align={headCell.align as TableCellProps["align"]}
52
+ sortDirection={orderBy === headCell.id ? order : false}
53
+ width={headCell.width}
54
+ sx={styles.cell}
55
+ >
56
+ {onRequestSort && headCell.sortable ? (
57
+ <TableSortLabel
58
+ active={orderBy === headCell.id}
59
+ onClick={() => onRequestSort(headCell.id)}
60
+ direction={orderBy === headCell.id ? order : "asc"}
61
+ sx={styles.sortLabel}
62
+ IconComponent={() =>
63
+ order === "desc" && orderBy === headCell.id ? (
64
+ <ExpandMore
65
+ sx={{
66
+ ...styles.sortIcon,
67
+ visibility:
68
+ orderBy === headCell.id ? "visible" : "hidden",
69
+ }}
70
+ />
71
+ ) : (
72
+ <ExpandLess
73
+ sx={{
74
+ ...styles.sortIcon,
75
+ visibility:
76
+ orderBy === headCell.id ? "visible" : "hidden",
77
+ }}
78
+ />
79
+ )
80
+ }
81
+ >
82
+ {headCell.label}
83
+ </TableSortLabel>
84
+ ) : (
85
+ headCell.label
86
+ )}
87
+ </StyledTableCell>
88
+ ))}
89
+ </TableRow>
90
+ </TableHead>
91
+ );
91
92
  }
92
93
 
93
94
  const getStyles = (theme: Theme) => {
94
- return {
95
- sortLabel: {
96
- "&:hover": {
97
- color: "info.main",
98
- "& .MuiSvgIcon-root": {
99
- color: "info.main",
100
- visibility: "visible",
101
- },
102
- },
103
- },
104
- sortIcon: {
105
- marginLeft: theme.spacing(1),
106
- color: "grey.800",
107
- },
108
- };
95
+ return {
96
+ sortLabel: {
97
+ "&:hover": {
98
+ color: "info.main",
99
+ "& .MuiSvgIcon-root": {
100
+ color: "info.main",
101
+ visibility: "visible",
102
+ },
103
+ },
104
+ },
105
+ sortIcon: {
106
+ marginLeft: theme.spacing(1),
107
+ color: "grey.800",
108
+ },
109
+ cell: {
110
+ borderWidth: theme.spacing(0),
111
+ },
112
+ };
109
113
  };
@@ -3,34 +3,34 @@ import styled from "@mui/material/styles/styled";
3
3
 
4
4
  // STYLED COMPONENT
5
5
  const StyledPagination = styled(Pagination)(({ theme }) => ({
6
- "& .MuiPaginationItem-root": {
7
- fontSize: 14,
8
- fontWeight: 500,
9
- color: theme.palette.grey[900],
10
- border: `1px solid transparent`,
11
- },
12
- "& .MuiPaginationItem-page:hover": {
13
- borderRadius: 20,
14
- backgroundColor: "transparent",
15
- color: theme.palette.info.main,
16
- border: `1px solid ${theme.palette.info.main}`,
17
- },
18
- "& .MuiPaginationItem-page.Mui-selected": {
19
- borderRadius: 20,
20
- backgroundColor: "transparent",
21
- color: theme.palette.info.main,
22
- border: `1px solid ${theme.palette.info.main}`,
23
- ":hover": { backgroundColor: "transparent" },
24
- },
25
- "& .MuiPaginationItem-previousNext": {
26
- margin: 10,
27
- borderRadius: 20,
28
- color: theme.palette.info.main,
29
- border: `1px solid ${theme.palette.info.main}`,
30
- "&:hover": { backgroundColor: "transparent" },
31
- },
6
+ "& .MuiPaginationItem-root": {
7
+ fontSize: 14,
8
+ fontWeight: 500,
9
+ color: theme.palette.grey[900],
10
+ border: `1px solid transparent`,
11
+ },
12
+ "& .MuiPaginationItem-page:hover": {
13
+ borderRadius: 20,
14
+ backgroundColor: "transparent",
15
+ color: theme.palette.info.main,
16
+ border: `1px solid ${theme.palette.info.main}`,
17
+ },
18
+ "& .MuiPaginationItem-page.Mui-selected": {
19
+ borderRadius: 20,
20
+ backgroundColor: "transparent",
21
+ color: theme.palette.info.main,
22
+ border: `1px solid ${theme.palette.info.main}`,
23
+ ":hover": { backgroundColor: "transparent" },
24
+ },
25
+ "& .MuiPaginationItem-previousNext": {
26
+ margin: 10,
27
+ borderRadius: 20,
28
+ color: theme.palette.info.main,
29
+ border: `1px solid ${theme.palette.info.main}`,
30
+ "&:hover": { backgroundColor: "transparent" },
31
+ },
32
32
  }));
33
33
 
34
34
  export default function TablePagination(props: PaginationProps) {
35
- return <StyledPagination {...props} />;
35
+ return <StyledPagination {...props} />;
36
36
  }
@@ -2,26 +2,26 @@ import styled from "@mui/material/styles/styled";
2
2
  import { TableRow, TableCell, IconButton } from "@mui/material";
3
3
 
4
4
  const StyledTableCell = styled(TableCell)(({ theme }) => ({
5
- fontSize: 14,
6
- paddingTop: 10,
7
- fontWeight: 500,
8
- paddingBottom: 10,
9
- color: theme.palette.grey[900],
10
- borderBottom: `1px solid ${theme.palette.grey[300]}`,
5
+ fontSize: 14,
6
+ paddingTop: 10,
7
+ fontWeight: 500,
8
+ paddingBottom: 10,
9
+ color: theme.palette.grey[900],
10
+ borderBottom: `1px solid ${theme.palette.grey[300]}`,
11
11
  }));
12
12
 
13
13
  const StyledTableRow = styled(TableRow)({
14
- ":last-child .MuiTableCell-root": { border: 0 },
15
- "&.Mui-selected": {
16
- backgroundColor: "transparent",
17
- ":hover": { backgroundColor: "transparent" },
18
- },
14
+ ":last-child .MuiTableCell-root": { border: 0 },
15
+ "&.Mui-selected": {
16
+ backgroundColor: "transparent",
17
+ ":hover": { backgroundColor: "transparent" },
18
+ },
19
19
  });
20
20
 
21
21
  const StyledIconButton = styled(IconButton)(({ theme }) => ({
22
- color: theme.palette.grey[600],
23
- "& .MuiSvgIcon-root": { fontSize: 19 },
24
- ":hover": { color: theme.palette.info.main },
22
+ color: theme.palette.grey[600],
23
+ "& .MuiSvgIcon-root": { fontSize: 19 },
24
+ ":hover": { color: theme.palette.info.main },
25
25
  }));
26
26
 
27
27
  export { StyledTableCell, StyledTableRow, StyledIconButton };
@@ -5,41 +5,41 @@ import TableHeader, { Head } from "./table-header";
5
5
  import { StyledTableRow, StyledTableCell } from "./table-row";
6
6
 
7
7
  interface Props {
8
- heading: Head[];
9
- perPage: number;
10
- sx?: SxProps;
11
- rowSx?: SxProps;
8
+ heading: Head[];
9
+ perPage: number;
10
+ sx?: SxProps;
11
+ rowSx?: SxProps;
12
12
  }
13
13
 
14
14
  export default function TableSkeleton(props: Props) {
15
- const rangeArray: number[] = Array.from(
16
- { length: props.perPage },
17
- (_, i) => i,
18
- );
19
- return (
20
- <TableContainer sx={props.sx}>
21
- <Table>
22
- <TableHeader
23
- heading={props.heading}
24
- order="asc"
25
- orderBy=""
26
- onRequestSort={() => {
27
- // do nothing
28
- }}
29
- rowSx={props.rowSx}
30
- />
31
- <TableBody>
32
- {rangeArray.map((i: number) => (
33
- <StyledTableRow key={i} sx={props.rowSx}>
34
- {props.heading.map((heading: Head) => (
35
- <StyledTableCell key={`${i}_${heading.id}`}>
36
- <Skeleton />
37
- </StyledTableCell>
38
- ))}
39
- </StyledTableRow>
40
- ))}
41
- </TableBody>
42
- </Table>
43
- </TableContainer>
44
- );
15
+ const rangeArray: number[] = Array.from(
16
+ { length: props.perPage },
17
+ (_, i) => i,
18
+ );
19
+ return (
20
+ <TableContainer sx={props.sx}>
21
+ <Table>
22
+ <TableHeader
23
+ heading={props.heading}
24
+ order="asc"
25
+ orderBy=""
26
+ onRequestSort={() => {
27
+ // do nothing
28
+ }}
29
+ rowSx={props.rowSx}
30
+ />
31
+ <TableBody>
32
+ {rangeArray.map((i: number) => (
33
+ <StyledTableRow key={i} sx={props.rowSx}>
34
+ {props.heading.map((heading: Head) => (
35
+ <StyledTableCell key={`${i}_${heading.id}`}>
36
+ <Skeleton />
37
+ </StyledTableCell>
38
+ ))}
39
+ </StyledTableRow>
40
+ ))}
41
+ </TableBody>
42
+ </Table>
43
+ </TableContainer>
44
+ );
45
45
  }