@evenicanpm/admin-integrate 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/documents/ProcessSchedule/fragments.ts +24 -0
  2. package/documents/ProcessSchedule/read.ts +12 -0
  3. package/documents/ProcessScheduleGroup/fragments.ts +29 -0
  4. package/documents/ProcessScheduleGroup/read.ts +12 -0
  5. package/documents/ScheduledProcess/fragments.ts +24 -0
  6. package/documents/ScheduledProcess/list.ts +27 -0
  7. package/package.json +21 -17
  8. package/src/api/dashboard/queries/get-process-executions.query.ts +33 -36
  9. package/src/api/dashboard/queries/get-process-executions.server.ts +4 -4
  10. package/src/api/scheduler/queries/get-process-schedule-group-details.query.ts +45 -0
  11. package/src/api/scheduler/queries/get-process-schedule-group-details.server.ts +14 -0
  12. package/src/api/scheduler/queries/get-process-schedule.query.ts +45 -0
  13. package/src/api/scheduler/queries/get-process-schedule.server.ts +14 -0
  14. package/src/api/scheduler/queries/get-scheduled-processes.query.ts +45 -0
  15. package/src/api/scheduler/queries/get-scheduled-processes.server.ts +11 -0
  16. package/src/api/scheduler/queries/index.ts +3 -0
  17. package/src/components/breadcrumbs/breadcrumbs.tsx +23 -26
  18. package/src/components/breadcrumbs/index.ts +1 -1
  19. package/src/components/breadcrumbs/types.tsx +4 -0
  20. package/src/components/button/outlined-icon-button.tsx +26 -38
  21. package/src/components/core/date-time-popover.tsx +32 -0
  22. package/src/components/core/edited-typography.tsx +20 -0
  23. package/src/components/core/index.ts +3 -0
  24. package/src/components/core/loading.tsx +6 -6
  25. package/src/components/core/title-edit.tsx +122 -0
  26. package/src/components/dashboard-list/dashboard-list-row.tsx +114 -115
  27. package/src/components/dashboard-list/dashboard-list.tsx +119 -119
  28. package/src/components/data-table/table-header.tsx +85 -81
  29. package/src/components/data-table/table-pagination.tsx +27 -27
  30. package/src/components/data-table/table-row.tsx +14 -14
  31. package/src/components/data-table/table-skeleton.tsx +34 -34
  32. package/src/components/execution/execution-filter.ts +22 -22
  33. package/src/components/execution/execution-status-icon.tsx +16 -17
  34. package/src/components/execution/execution-tag.tsx +81 -80
  35. package/src/components/footer/footer.tsx +34 -34
  36. package/src/components/header/dashboard-list-header.tsx +64 -63
  37. package/src/components/header/execution-details-header.tsx +102 -129
  38. package/src/components/header/header.tsx +27 -27
  39. package/src/components/header/index.ts +1 -0
  40. package/src/components/header/integration-details-header.tsx +99 -0
  41. package/src/components/icons/up-down.tsx +15 -15
  42. package/src/components/integration-view/edges/default-edge.tsx +18 -17
  43. package/src/components/integration-view/elk-layout-options.ts +26 -26
  44. package/src/components/integration-view/elk-types.ts +16 -12
  45. package/src/components/integration-view/flow-types.tsx +5 -5
  46. package/src/components/integration-view/integration-view.tsx +132 -130
  47. package/src/components/integration-view/nodes/base-node.tsx +50 -0
  48. package/src/components/integration-view/nodes/connection-node.tsx +8 -8
  49. package/src/components/integration-view/nodes/entry-node.tsx +8 -8
  50. package/src/components/integration-view/nodes/group-node.tsx +47 -6
  51. package/src/components/integration-view/nodes/task-node.tsx +58 -13
  52. package/src/components/integration-view/temp-data/initialElements.tsx +224 -0
  53. package/src/components/integration-view/types.ts +6 -6
  54. package/src/components/layouts/main-layout.tsx +13 -13
  55. package/src/components/layouts/root-container.tsx +25 -25
  56. package/src/components/link-cards/link-card.tsx +23 -23
  57. package/src/components/link-cards/styles.ts +15 -15
  58. package/src/components/list-filter/date-filter.tsx +41 -45
  59. package/src/components/list-filter/date-range-filter.tsx +78 -77
  60. package/src/components/list-filter/list-filter-types.ts +38 -38
  61. package/src/components/list-filter/list-filter.tsx +363 -354
  62. package/src/components/list-filter/multi-select-filter.tsx +94 -95
  63. package/src/components/list-filter/select-filter.tsx +67 -64
  64. package/src/components/scheduler/day-selector.tsx +174 -0
  65. package/src/components/scheduler/day-tag.tsx +73 -0
  66. package/src/components/scheduler/index.ts +4 -0
  67. package/src/components/scheduler/schedule-filter.ts +25 -0
  68. package/src/components/scheduler/schedule-icon.tsx +87 -0
  69. package/src/components/scheduler/scheduler-types.ts +40 -0
  70. package/src/hooks/use-breadcrumbs.ts +31 -31
  71. package/src/hooks/use-recurrence.tsx +13 -0
  72. package/src/hooks/use-timestamp.tsx +21 -21
  73. package/src/pages/dashboard/dashboard-link-cards.tsx +99 -99
  74. package/src/pages/dashboard/dashboard-list-sections.tsx +130 -125
  75. package/src/pages/dashboard/dashboard.tsx +6 -6
  76. package/src/pages/execution-details/execution-details.tsx +23 -29
  77. package/src/pages/executions/executions-list/executions-list-row.tsx +101 -104
  78. package/src/pages/executions/executions-list/executions-list-table.tsx +45 -53
  79. package/src/pages/executions/executions-list/executions-list.tsx +219 -212
  80. package/src/pages/executions/executions.tsx +67 -72
  81. package/src/pages/integrations/integrations.tsx +17 -25
  82. package/src/pages/scheduler/schedule-drawer/edited/edited-types.ts +17 -0
  83. package/src/pages/scheduler/schedule-drawer/edited/index.ts +1 -0
  84. package/src/pages/scheduler/schedule-drawer/index.ts +1 -0
  85. package/src/pages/scheduler/schedule-drawer/schedule-details-integrations.tsx +227 -0
  86. package/src/pages/scheduler/schedule-drawer/schedule-details-main.tsx +292 -0
  87. package/src/pages/scheduler/schedule-drawer/schedule-details-name.tsx +77 -0
  88. package/src/pages/scheduler/schedule-drawer/schedule-details-skeleton.tsx +64 -0
  89. package/src/pages/scheduler/schedule-drawer/schedule-details.tsx +42 -0
  90. package/src/pages/scheduler/schedule-drawer/schedule-drawer-buttons.tsx +72 -0
  91. package/src/pages/scheduler/schedule-drawer/schedule-drawer-group.tsx +103 -0
  92. package/src/pages/scheduler/schedule-drawer/schedule-drawer-legacy.tsx +94 -0
  93. package/src/pages/scheduler/schedule-drawer/schedule-drawer.tsx +101 -0
  94. package/src/pages/scheduler/schedule-drawer/sortable-integration-row.tsx +93 -0
  95. package/src/pages/scheduler/scheduler.tsx +106 -30
  96. package/src/pages/scheduler/schedules-list/index.ts +1 -0
  97. package/src/pages/scheduler/schedules-list/schedules-list-row.tsx +235 -0
  98. package/src/pages/scheduler/schedules-list/schedules-list-table.tsx +74 -0
  99. package/src/pages/scheduler/schedules-list/schedules-list.tsx +280 -0
  100. package/tsconfig.json +29 -26
  101. package/src/components/integration-view/temp-data/initialElements.ts +0 -238
@@ -0,0 +1,74 @@
1
+ import React from "react";
2
+
3
+ // Types
4
+ import { Head } from "@evenicanpm/admin-integrate/components/data-table/table-header";
5
+ import { Item } from "./schedules-list";
6
+
7
+ // API
8
+ import { ScheduledProcessInput } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
9
+
10
+ // MUI
11
+ import { TableContainer, Table, TableBody } from "@mui/material";
12
+ import { SxProps } from "@mui/material";
13
+
14
+ // Custom components
15
+ import { TableHeader } from "@evenicanpm/admin-integrate/components/data-table";
16
+
17
+ // Local components
18
+ import SchedulesListRow from "./schedules-list-row";
19
+
20
+ // Types
21
+ import { DrawerOpen } from "../scheduler";
22
+
23
+ interface Props {
24
+ heading: Head[];
25
+ items: Item[];
26
+ input: ScheduledProcessInput;
27
+ setInput: (newInput: ScheduledProcessInput) => void;
28
+ rowSx?: SxProps;
29
+ setDrawerOpen: React.Dispatch<React.SetStateAction<DrawerOpen | null>>;
30
+ }
31
+
32
+ export default function SchedulesListTable(props: Props) {
33
+ const handleRequestSort = (property: string) => {
34
+ const current = props.input.sort;
35
+ if (property === current) {
36
+ props.setInput({
37
+ ...props.input,
38
+ sortDesc: !props.input.sortDesc,
39
+ });
40
+ } else {
41
+ props.setInput({
42
+ ...props.input,
43
+ sort: property,
44
+ sortDesc: false,
45
+ });
46
+ }
47
+ };
48
+
49
+ return (
50
+ <>
51
+ <TableContainer>
52
+ <Table>
53
+ <TableHeader
54
+ heading={props.heading}
55
+ orderBy={props.input.sort || ""}
56
+ order={props.input.sortDesc ? "desc" : "asc"}
57
+ onRequestSort={handleRequestSort}
58
+ />
59
+ <TableBody>
60
+ {props.items.map((item, index) => (
61
+ <SchedulesListRow
62
+ key={index}
63
+ item={item}
64
+ heading={props.heading}
65
+ sx={props.rowSx}
66
+ setDrawerOpen={props.setDrawerOpen}
67
+ />
68
+ ))}
69
+ </TableBody>
70
+ </Table>
71
+ </TableContainer>
72
+ </>
73
+ );
74
+ }
@@ -0,0 +1,280 @@
1
+ import React, { useState, useEffect } from "react";
2
+ import { useTranslations } from "next-intl";
3
+
4
+ // API
5
+ import {
6
+ ScheduledProcessInput,
7
+ GetScheduledProcessesQuery,
8
+ } from "@evenicanpm/admin-core/api/e4/graphqlRequestSdk";
9
+
10
+ // MUI
11
+ import { Theme, useTheme } from "@mui/material";
12
+ import { Card, Box, Stack, Typography, Grid2 as Grid } from "@mui/material";
13
+
14
+ // Custom components
15
+ import { FlexBox } from "@evenicanpm/admin-core/components/flex-box";
16
+ import {
17
+ TablePagination,
18
+ TableSkeleton,
19
+ } from "@evenicanpm/admin-integrate/components/data-table";
20
+ import { ListFilter } from "@evenicanpm/admin-integrate/components/list-filter";
21
+
22
+ // Local components
23
+ import SchedulesListTable from "./schedules-list-table";
24
+
25
+ // Types
26
+ import { Head } from "@evenicanpm/admin-integrate/components/data-table/table-header";
27
+ import { ListFilterOutput } from "@evenicanpm/admin-integrate/components/list-filter/list-filter-types";
28
+ import {
29
+ SchedulesListFilters,
30
+ schedulesListFilters,
31
+ } from "@evenicanpm/admin-integrate/components/scheduler/schedule-filter";
32
+ import { DrawerOpen } from "../scheduler";
33
+
34
+ export type Item = {
35
+ id: string;
36
+ name: string;
37
+ processScheduleGroup?: {
38
+ id: string;
39
+ };
40
+ startDate: string;
41
+ interval: number;
42
+ intervalUnitId: string;
43
+ isMonday: boolean;
44
+ isTuesday: boolean;
45
+ isWednesday: boolean;
46
+ isThursday: boolean;
47
+ isFriday: boolean;
48
+ isSaturday: boolean;
49
+ isSunday: boolean;
50
+ isDisabled: boolean;
51
+ modified: string;
52
+ scheduledIntegrations: number;
53
+ };
54
+
55
+ // Row height in terms of multiples of theme.spacing(1) (e.g. theme.spacing(7.5 & rows per page))
56
+ const rowHeight = 7.5;
57
+
58
+ interface Props {
59
+ heading: Head[];
60
+ data: GetScheduledProcessesQuery;
61
+ loading: boolean;
62
+ input: ScheduledProcessInput;
63
+ setInput: (newInput: ScheduledProcessInput) => void;
64
+ setDrawerOpen: React.Dispatch<React.SetStateAction<DrawerOpen | null>>;
65
+ }
66
+
67
+ const SchedulesList: React.FC<Props> = (props: Props) => {
68
+ const t = useTranslations("Integrate.Scheduler");
69
+
70
+ const theme = useTheme();
71
+ const styles = getStyles(theme);
72
+
73
+ const [items, setItems] = useState<Item[]>([]);
74
+ const [fetched, setFetched] = useState<boolean>(false); // prevents "empty list" msg from showing for split second
75
+ // in practice skip and top are never undefined. this is to satisfy linting.
76
+ const [page, setPage] = useState(
77
+ (props.input.skip || 0) / (props.input.top || 10) + 1,
78
+ );
79
+ const [perPage, setPerPage] = useState<number>(props.input.top || 10);
80
+
81
+ const handleChangePage = (
82
+ event: React.ChangeEvent<unknown>,
83
+ value: number,
84
+ ) => {
85
+ if (page !== value && event) {
86
+ setPage(value);
87
+ props.setInput({
88
+ ...props.input,
89
+ skip: (props.input.top || 10) * (value - 1),
90
+ });
91
+ setFetched(false);
92
+ }
93
+ };
94
+
95
+ const handleSetFilters = (
96
+ filterUpdate: ListFilterOutput<SchedulesListFilters>,
97
+ ) => {
98
+ const { itemsPerPage, search, filters } = filterUpdate;
99
+ props.setInput({
100
+ ...props.input,
101
+ top: itemsPerPage,
102
+ skip: 0,
103
+ search: search,
104
+ daysOfTheWeek: filters.multiSelectFilter?.map((obj) => obj.id as string),
105
+ });
106
+ setFetched(false);
107
+ setPerPage(itemsPerPage as number);
108
+ setPage(1);
109
+ };
110
+
111
+ const handleClearFilters = () => {
112
+ props.setInput({
113
+ ...props.input,
114
+ skip: 0,
115
+ daysOfTheWeek: null,
116
+ });
117
+ setFetched(false);
118
+ };
119
+
120
+ useEffect(() => {
121
+ if (props.data?.scheduledProcesses?.nodes) {
122
+ setItems(props.data.scheduledProcesses.nodes as Item[]);
123
+ setFetched(true);
124
+ }
125
+ }, [props.data]);
126
+
127
+ return (
128
+ <>
129
+ <Box sx={styles.list}>
130
+ <ListFilter<SchedulesListFilters>
131
+ setFilters={handleSetFilters}
132
+ clearFilters={handleClearFilters}
133
+ filters={schedulesListFilters}
134
+ config={{
135
+ pagination: {
136
+ pageDefault: 10,
137
+ pageOptions: [10, 20, 50],
138
+ },
139
+ }}
140
+ />
141
+ </Box>
142
+
143
+ {props.loading && !props.data && (
144
+ <Card>
145
+ <TableSkeleton
146
+ heading={props.heading}
147
+ perPage={perPage}
148
+ rowSx={styles.rowSx}
149
+ />
150
+ </Card>
151
+ )}
152
+
153
+ {!props.loading &&
154
+ props.data.scheduledProcesses &&
155
+ fetched &&
156
+ items.length > 0 ? (
157
+ <Box
158
+ sx={{
159
+ minHeight:
160
+ props.data.scheduledProcesses.pageInfo?.resultsReturned &&
161
+ props.data.scheduledProcesses.pageInfo.resultsReturned <
162
+ perPage &&
163
+ page === 1
164
+ ? theme.spacing(
165
+ rowHeight *
166
+ (props.data.scheduledProcesses.pageInfo.resultsReturned +
167
+ 1),
168
+ )
169
+ : theme.spacing(rowHeight * (perPage + 1)),
170
+ }}
171
+ >
172
+ <Card>
173
+ <SchedulesListTable
174
+ heading={props.heading}
175
+ items={items}
176
+ input={props.input}
177
+ setInput={props.setInput}
178
+ rowSx={styles.rowSx}
179
+ setDrawerOpen={props.setDrawerOpen}
180
+ />
181
+ </Card>
182
+ </Box>
183
+ ) : null}
184
+
185
+ {!props.loading && fetched && items.length === 0 ? (
186
+ <Card>
187
+ <FlexBox
188
+ justifyContent="center"
189
+ alignItems="center"
190
+ sx={{
191
+ minHeight: "335px",
192
+ marginBottom: theme.spacing(2),
193
+ }}
194
+ >
195
+ <Stack spacing={1} justifyContent="center" alignItems="center">
196
+ <Typography variant="h6" color="info">
197
+ {t("ListEmpty.title")}
198
+ </Typography>
199
+ <Typography variant="body1">{t("ListEmpty.body")}</Typography>
200
+ </Stack>
201
+ </FlexBox>
202
+ </Card>
203
+ ) : null}
204
+
205
+ {!props.loading &&
206
+ props.data?.scheduledProcesses &&
207
+ fetched &&
208
+ items.length > 0 ? (
209
+ <Grid container spacing={1} sx={styles.pagination}>
210
+ <Grid size={{ xs: 10.5 }}>
211
+ <FlexBox
212
+ justifyContent="center"
213
+ alignItems="center"
214
+ sx={styles.paginationBox}
215
+ >
216
+ <TablePagination
217
+ page={page}
218
+ onChange={handleChangePage}
219
+ count={Math.ceil(
220
+ (props.data.scheduledProcesses.recordCount || 10) /
221
+ (props.input.top || 10),
222
+ )}
223
+ />
224
+ </FlexBox>
225
+ </Grid>
226
+ <Grid size={{ xs: 1.5 }}>
227
+ <FlexBox
228
+ justifyContent="flex-end"
229
+ alignItems="center"
230
+ sx={{ height: "100%" }}
231
+ >
232
+ <Typography color="grey">
233
+ {`${
234
+ props.data.scheduledProcesses.pageInfo?.resultsReturned || 0
235
+ } ${t("Pagination.of")} ${
236
+ props.data.scheduledProcesses.recordCount || 0
237
+ } ${t("Pagination.items")}`}
238
+ </Typography>
239
+ </FlexBox>
240
+ </Grid>
241
+ </Grid>
242
+ ) : null}
243
+ </>
244
+ );
245
+ };
246
+
247
+ const getStyles = (theme: Theme) => {
248
+ return {
249
+ title: {
250
+ display: "flex",
251
+ alignItems: "center",
252
+ height: "100%",
253
+ },
254
+ typography: {
255
+ fontWeight: "medium",
256
+ },
257
+ button: {
258
+ borderWidth: 2,
259
+ borderRadius: 1,
260
+ marginRight: theme.spacing(1),
261
+ },
262
+ iconButton: {
263
+ borderRadius: 1,
264
+ },
265
+ pagination: {
266
+ marginTop: theme.spacing(2),
267
+ },
268
+ list: {
269
+ margin: theme.spacing(2, 0),
270
+ },
271
+ paginationBox: {
272
+ paddingLeft: theme.spacing(15),
273
+ },
274
+ rowSx: {
275
+ height: theme.spacing(rowHeight),
276
+ },
277
+ };
278
+ };
279
+
280
+ export default SchedulesList;
package/tsconfig.json CHANGED
@@ -1,28 +1,31 @@
1
1
  {
2
- "compilerOptions": {
3
- "target": "ES6",
4
- "lib": ["ES2022", "DOM", "DOM.Iterable"],
5
- "module": "ESNext",
6
- "sourceMap": true,
7
- "esModuleInterop": true,
8
- "skipLibCheck": true,
9
- "declaration": true,
10
- "moduleResolution": "node",
11
- "resolveJsonModule": true,
12
- "outDir": "./dist",
13
- "jsx": "preserve",
14
- "baseUrl": "./",
15
- "paths": {
16
- "@/lib/*": ["src/lib/*"],
17
- "@/auth/*": ["src/auth/*"],
18
- "@/api/*": ["src/api/*"],
19
- "@/components/*": ["src/components/*"],
20
- "@evenicanpm/admin-core/*": [
21
- "./node_modules/@evenicanpm/admin-core/src/*"
22
- ],
23
- "@evenicanpm/admin-integrate/*": [
24
- "./node_modules/@evenicanpm/admin-integrate/src/*"
25
- ]
26
- }
27
- }
2
+ "compilerOptions": {
3
+ "target": "ES6",
4
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
5
+ "module": "ESNext",
6
+ "sourceMap": true,
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true,
9
+ "declaration": true,
10
+ "moduleResolution": "node",
11
+ "resolveJsonModule": true,
12
+ "outDir": "./dist",
13
+ "jsx": "preserve",
14
+ "baseUrl": "./",
15
+ "typeRoots": ["../../../../admin/node_modules/@types"],
16
+ "paths": {
17
+ "*": ["../../../../admin/node_modules/*"],
18
+ "@/lib/*": ["src/lib/*"],
19
+ "@/auth/*": ["src/auth/*"],
20
+ "@/api/*": ["src/api/*"],
21
+ "@/components/*": ["src/components/*"],
22
+ "@evenicanpm/admin-core/*": [
23
+ "../../../../admin/node_modules/@evenicanpm/admin-core/src/*"
24
+ ],
25
+ "@evenicanpm/admin-integrate/*": [
26
+ "../../../../admin/node_modules/@evenicanpm/admin-integrate/src/*"
27
+ ]
28
+ }
29
+ },
30
+ "include": ["src"]
28
31
  }
@@ -1,238 +0,0 @@
1
- import { ElkExtendedEdge } from "elkjs";
2
- import { ElkExtendedEdgeWithFlow, ElkNodeWithFlow } from "../elk-//types";
3
-
4
- const position = { x: 0, y: 0 };
5
-
6
- export const initialNodes: ElkNodeWithFlow[] = [
7
- {
8
- id: "1",
9
- type: "task-node",
10
- data: { label: "input" },
11
- position,
12
- layoutOptions: {
13
- "org.eclipse.elk.priority": "1",
14
- },
15
- },
16
-
17
- {
18
- id: "2",
19
- data: { label: "node 2" },
20
- position,
21
- //type: "custom-group",
22
- children: [
23
- {
24
- id: "2gs",
25
- data: { label: "Group 1" },
26
- position,
27
- width: 150,
28
- height: 50,
29
- //extent: "parent",
30
- },
31
-
32
- {
33
- id: "2g1",
34
- data: { label: "2g1" },
35
- position,
36
- width: 150,
37
- height: 70,
38
- extent: "parent",
39
- },
40
- {
41
- id: "2g3",
42
- data: { label: "2g3" },
43
- position,
44
- width: 150,
45
- height: 20,
46
- extent: "parent",
47
- },
48
- {
49
- id: "2g4",
50
- data: { label: "2g4" },
51
- position,
52
- width: 150,
53
- height: 60,
54
- extent: "parent",
55
- },
56
- {
57
- id: "2g2",
58
- data: { label: "2g2" },
59
- position,
60
- width: 150,
61
- height: 80,
62
- extent: "parent",
63
- },
64
- ],
65
- layoutOptions: {
66
- "org.eclipse.elk.priority": "2",
67
- },
68
- },
69
-
70
- {
71
- id: "3",
72
- data: { label: "node 2" },
73
- position,
74
- //height: 400,
75
- //width: 400,
76
- //type: "custom-group",
77
- children: [
78
- {
79
- id: "3gs",
80
- data: { label: "Group 1" },
81
- position,
82
- width: 150,
83
- height: 50,
84
- extent: "parent",
85
- },
86
- {
87
- id: "3g1",
88
- data: { label: "2g1" },
89
- position,
90
- width: 150,
91
- height: 50,
92
- extent: "parent",
93
- },
94
- {
95
- id: "3g1-b",
96
- data: { label: "2g1" },
97
- position,
98
- width: 150,
99
- height: 50,
100
- extent: "parent",
101
- },
102
- {
103
- id: "3gconnect",
104
- data: { label: "2g1" },
105
- position,
106
- //type: "connection-node",
107
- width: 1,
108
- height: 1,
109
- extent: "parent",
110
- },
111
- {
112
- id: "3g2",
113
- data: { label: "2g2" },
114
- position,
115
- width: 150,
116
- height: 50,
117
- extent: "parent",
118
- },
119
- {
120
- id: "3g3",
121
- data: { label: "2g3" },
122
- position,
123
- width: 150,
124
- height: 50,
125
- extent: "parent",
126
- },
127
- {
128
- id: "3g4",
129
- data: { label: "2g4" },
130
- position,
131
- width: 150,
132
- height: 50,
133
- extent: "parent",
134
- },
135
- ],
136
- layoutOptions: {
137
- "org.eclipse.elk.priority": "2",
138
- },
139
- },
140
- {
141
- id: "4",
142
- data: { label: "node 2" },
143
- position,
144
- //height: 400,
145
- //width: 400,
146
- //type: "custom-group",
147
- children: [
148
- {
149
- id: "4gs",
150
- data: { label: "Group 1" },
151
- position,
152
- width: 150,
153
- height: 50,
154
- extent: "parent",
155
- },
156
- {
157
- id: "4g1",
158
- data: { label: "2g1" },
159
- position,
160
- width: 150,
161
- height: 50,
162
- extent: "parent",
163
- },
164
- {
165
- id: "4g2",
166
- data: { label: "2g2" },
167
- position,
168
- width: 150,
169
- height: 50,
170
- extent: "parent",
171
- },
172
- {
173
- id: "4g3",
174
- data: { label: "2g3" },
175
- position,
176
- width: 150,
177
- height: 50,
178
- extent: "parent",
179
- },
180
- {
181
- id: "4g4",
182
- data: { label: "2g4" },
183
- position,
184
- width: 150,
185
- height: 50,
186
- extent: "parent",
187
- },
188
- ],
189
- layoutOptions: {
190
- "org.eclipse.elk.priority": "2",
191
- },
192
- },
193
- ];
194
-
195
- export const initialEdges: ElkExtendedEdgeWithFlow[] = [
196
- { id: "e1-2", sources: ["1"], targets: ["2"], type: "default-edge" },
197
- { id: "2gs-2g1", sources: ["2gs"], targets: ["2g1"], type: "default-edge" },
198
- { id: "2gs-2g2", sources: ["2gs"], targets: ["2g2"], type: "default-edge" },
199
- { id: "2gs-2g3", sources: ["2gs"], targets: ["2g3"], type: "default-edge" },
200
- { id: "2g1-2g4", sources: ["2g1"], targets: ["2g4"], type: "default-edge" },
201
- { id: "2g2-2g4", sources: ["2g2"], targets: ["2g4"], type: "default-edge" },
202
- { id: "2g3-2g4", sources: ["2g3"], targets: ["2g4"], type: "default-edge" },
203
- //{ id: "e1-3", sources: ["1"], targets: ["3"], type: "default-edge" },
204
- { id: "3gs-3g1", sources: ["3gs"], targets: ["3g1"], type: "default-edge" },
205
- { id: "3gs-3gb", sources: ["3gs"], targets: ["3g1-b"], type: "default-edge" },
206
- {
207
- id: "3g1-3gconnect",
208
- sources: ["3g1"],
209
- targets: ["3gconnect"],
210
- type: "default-edge",
211
- },
212
- {
213
- id: "3g1-b-3gconnect",
214
- sources: ["3g1-b"],
215
- targets: ["3gconnect"],
216
- type: "default-edge",
217
- },
218
- {
219
- id: "3g1-3g2",
220
- sources: ["3gconnect"],
221
- targets: ["3g2"],
222
- type: "default-edge",
223
- },
224
- {
225
- id: "3g1-3g3",
226
- sources: ["3gconnect"],
227
- targets: ["3g3"],
228
- type: "default-edge",
229
- },
230
- {
231
- id: "3g1-3g4",
232
- sources: ["3gconnect"],
233
- targets: ["3g4"],
234
- type: "default-edge",
235
- },
236
- { id: "e1-3", sources: ["1"], targets: ["3"], type: "default-edge" },
237
- { id: "e1-4", sources: ["1"], targets: ["4"], type: "default-edge" },
238
- ];