@backstage/plugin-scaffolder 1.12.0 → 1.13.0-next.1
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/CHANGELOG.md +67 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.d.ts +12 -59
- package/dist/alpha.esm.js +27 -33
- package/dist/alpha.esm.js.map +1 -1
- package/dist/esm/{alpha/ListTasksPage-2e8f4176.esm.js → ListTasksPage-ca799894.esm.js} +3 -2
- package/dist/esm/ListTasksPage-ca799894.esm.js.map +1 -0
- package/dist/esm/{index/Router-6fd61bff.esm.js → Router-1b71c4f0.esm.js} +39 -28
- package/dist/esm/Router-1b71c4f0.esm.js.map +1 -0
- package/dist/esm/TaskPage-589238dc.esm.js +1684 -0
- package/dist/esm/TaskPage-589238dc.esm.js.map +1 -0
- package/dist/esm/TemplateEditorIntro-644bad26.esm.js +1128 -0
- package/dist/esm/TemplateEditorIntro-644bad26.esm.js.map +1 -0
- package/dist/esm/TemplateFormPreviewer-32c3dcf3.esm.js +630 -0
- package/dist/esm/TemplateFormPreviewer-32c3dcf3.esm.js.map +1 -0
- package/dist/esm/TemplateTypePicker-4f07b216.esm.js +58 -0
- package/dist/esm/TemplateTypePicker-4f07b216.esm.js.map +1 -0
- package/dist/esm/{alpha/index-2131f4a0.esm.js → index-bce9c23d.esm.js} +95 -156
- package/dist/esm/index-bce9c23d.esm.js.map +1 -0
- package/dist/index.d.ts +28 -167
- package/dist/index.esm.js +27 -65
- package/dist/index.esm.js.map +1 -1
- package/dist/types/plugin.d-bc532f9e.d.ts +232 -0
- package/package.json +24 -22
- package/dist/esm/alpha/ListTasksPage-2e8f4176.esm.js.map +0 -1
- package/dist/esm/alpha/Router-2826a2b8.esm.js +0 -1566
- package/dist/esm/alpha/Router-2826a2b8.esm.js.map +0 -1
- package/dist/esm/alpha/alpha-714dad1b.esm.js +0 -3422
- package/dist/esm/alpha/alpha-714dad1b.esm.js.map +0 -1
- package/dist/esm/alpha/index-2131f4a0.esm.js.map +0 -1
- package/dist/esm/index/ListTasksPage-fa403ee3.esm.js +0 -192
- package/dist/esm/index/ListTasksPage-fa403ee3.esm.js.map +0 -1
- package/dist/esm/index/Router-6fd61bff.esm.js.map +0 -1
- package/dist/esm/index/index-0b6cdf44.esm.js +0 -3475
- package/dist/esm/index/index-0b6cdf44.esm.js.map +0 -1
- package/dist/esm/index/index-f404fb0b.esm.js +0 -449
- package/dist/esm/index/index-f404fb0b.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder
|
|
2
2
|
|
|
3
|
+
## 1.13.0-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1e4f5e91b8e: Bump `zod` and `zod-to-json-schema` dependencies.
|
|
8
|
+
- e0c6e8b9c3c: Update peer dependencies
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @backstage/core-components@0.12.6-next.1
|
|
11
|
+
- @backstage/plugin-scaffolder-common@1.2.7-next.1
|
|
12
|
+
- @backstage/plugin-scaffolder-react@1.3.0-next.1
|
|
13
|
+
- @backstage/integration-react@1.1.12-next.1
|
|
14
|
+
- @backstage/core-plugin-api@1.5.1-next.0
|
|
15
|
+
- @backstage/plugin-permission-react@0.4.12-next.0
|
|
16
|
+
- @backstage/plugin-catalog-react@1.4.1-next.1
|
|
17
|
+
- @backstage/integration@1.4.4-next.0
|
|
18
|
+
- @backstage/theme@0.2.19-next.0
|
|
19
|
+
- @backstage/catalog-client@1.4.0
|
|
20
|
+
- @backstage/catalog-model@1.2.1
|
|
21
|
+
- @backstage/config@1.0.7
|
|
22
|
+
- @backstage/errors@1.1.5
|
|
23
|
+
- @backstage/types@1.0.2
|
|
24
|
+
- @backstage/plugin-catalog-common@1.0.13-next.0
|
|
25
|
+
|
|
26
|
+
## 1.13.0-next.0
|
|
27
|
+
|
|
28
|
+
### Minor Changes
|
|
29
|
+
|
|
30
|
+
- cdab34fd9a2: scaffolder/next: removing the `routeRefs` and exporting the originals on `scaffolderPlugin.routes.x` instead
|
|
31
|
+
- e5ad1bd61ec: Allow `TemplateListPage` and `TemplateWizardPage` to be passed in as props
|
|
32
|
+
- 92cf86a4b5d: Added a `templateFilter` prop to the `<Router/>` component to allow for filtering of templates through a function.
|
|
33
|
+
- 259d3407b9b: Move `CategoryPicker` from `scaffolder` into `scaffolder-react`
|
|
34
|
+
Move `ContextMenu` into `scaffolder-react` and rename it to `ScaffolderPageContextMenu`
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- e27ddc36dad: Added a possibility to cancel the running task (executing of a scaffolder template)
|
|
39
|
+
- 57c1b4752fa: Allow use of `{ exists: true }` value inside filters to filter entities that has that key.
|
|
40
|
+
|
|
41
|
+
this example will filter all entities that has the annotation `someAnnotation` set to any value.
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
ui:options:
|
|
45
|
+
catalogFilter:
|
|
46
|
+
kind: Group
|
|
47
|
+
metadata.annotations.someAnnotation: { exists: true }
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- 7a6b16cc506: `scaffolder/next`: Bump `@rjsf/*` deps to 5.3.1
|
|
51
|
+
- f84fc7fd040: Updated dependency `@rjsf/validator-ajv8` to `5.3.0`.
|
|
52
|
+
- 8e00acb28db: Small tweaks to remove warnings in the console during development (mainly focusing on techdocs)
|
|
53
|
+
- Updated dependencies
|
|
54
|
+
- @backstage/plugin-scaffolder-react@1.3.0-next.0
|
|
55
|
+
- @backstage/plugin-scaffolder-common@1.2.7-next.0
|
|
56
|
+
- @backstage/core-components@0.12.6-next.0
|
|
57
|
+
- @backstage/plugin-catalog-react@1.4.1-next.0
|
|
58
|
+
- @backstage/integration-react@1.1.12-next.0
|
|
59
|
+
- @backstage/core-plugin-api@1.5.0
|
|
60
|
+
- @backstage/config@1.0.7
|
|
61
|
+
- @backstage/integration@1.4.3
|
|
62
|
+
- @backstage/plugin-permission-react@0.4.11
|
|
63
|
+
- @backstage/catalog-client@1.4.0
|
|
64
|
+
- @backstage/catalog-model@1.2.1
|
|
65
|
+
- @backstage/errors@1.1.5
|
|
66
|
+
- @backstage/theme@0.2.18
|
|
67
|
+
- @backstage/types@1.0.2
|
|
68
|
+
- @backstage/plugin-catalog-common@1.0.12
|
|
69
|
+
|
|
3
70
|
## 1.12.0
|
|
4
71
|
|
|
5
72
|
### Minor Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha.d.ts
CHANGED
|
@@ -1,47 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @alpha
|
|
13
|
-
*/
|
|
14
|
-
declare type TemplateGroupFilter = {
|
|
15
|
-
title?: React__default.ReactNode;
|
|
16
|
-
filter: (entity: Entity) => boolean;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* The Props for the Scaffolder Router
|
|
21
|
-
*
|
|
22
|
-
* @alpha
|
|
23
|
-
*/
|
|
24
|
-
declare type NextRouterProps = {
|
|
25
|
-
components?: {
|
|
26
|
-
TemplateCardComponent?: React__default.ComponentType<{
|
|
27
|
-
template: TemplateEntityV1beta3;
|
|
28
|
-
}>;
|
|
29
|
-
TaskPageComponent?: React__default.ComponentType<{}>;
|
|
30
|
-
TemplateOutputsComponent?: React__default.ComponentType<{
|
|
31
|
-
output?: ScaffolderTaskOutput;
|
|
32
|
-
}>;
|
|
33
|
-
};
|
|
34
|
-
groups?: TemplateGroupFilter[];
|
|
35
|
-
FormProps?: FormProps$1;
|
|
36
|
-
contextMenu?: {
|
|
37
|
-
/** Whether to show a link to the template editor */
|
|
38
|
-
editor?: boolean;
|
|
39
|
-
/** Whether to show a link to the actions documentation */
|
|
40
|
-
actions?: boolean;
|
|
41
|
-
/** Whether to show a link to the tasks page */
|
|
42
|
-
tasks?: boolean;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
1
|
+
export { f as NextRouterProps, N as NextScaffolderPage, T as TemplateListPageProps, g as TemplateWizardPageProps } from './types/plugin.d-bc532f9e.js';
|
|
2
|
+
import { FormProps as FormProps$1 } from '@rjsf/core-v5';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '@backstage/plugin-scaffolder-common';
|
|
5
|
+
import '@backstage/plugin-scaffolder-react/alpha';
|
|
6
|
+
import '@backstage/plugin-scaffolder-react';
|
|
7
|
+
import '@backstage/catalog-model';
|
|
8
|
+
import '@rjsf/utils';
|
|
9
|
+
import '@backstage/types';
|
|
10
|
+
import '@backstage/core-plugin-api';
|
|
45
11
|
|
|
46
12
|
/**
|
|
47
13
|
* These types will be replaced eventually by the one in the scaffolder-react plugin.
|
|
@@ -55,19 +21,6 @@ declare type NextRouterProps = {
|
|
|
55
21
|
* @alpha
|
|
56
22
|
* @deprecated use the import from {@link @backstage/plugin-scaffolder-react/alpha#FormProps} instead
|
|
57
23
|
*/
|
|
58
|
-
declare type FormProps = Pick<FormProps$
|
|
59
|
-
|
|
60
|
-
/** @alpha */
|
|
61
|
-
declare const nextRouteRef: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
62
|
-
/** @alpha */
|
|
63
|
-
declare const nextSelectedTemplateRouteRef: _backstage_core_plugin_api.SubRouteRef<_backstage_core_plugin_api.PathParams<"/templates/:namespace/:templateName">>;
|
|
64
|
-
/** @alpha */
|
|
65
|
-
declare const nextScaffolderTaskRouteRef: _backstage_core_plugin_api.SubRouteRef<_backstage_core_plugin_api.PathParams<"/tasks/:taskId">>;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* @alpha
|
|
69
|
-
* The Router and main entrypoint to the Alpha Scaffolder plugin.
|
|
70
|
-
*/
|
|
71
|
-
declare const NextScaffolderPage: (props: React.PropsWithChildren<NextRouterProps>) => JSX.Element;
|
|
24
|
+
declare type FormProps = Pick<FormProps$1, 'transformErrors' | 'noHtml5Validate'>;
|
|
72
25
|
|
|
73
|
-
export { FormProps
|
|
26
|
+
export { FormProps };
|
package/dist/alpha.esm.js
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { N as NextScaffolderPage } from './esm/TaskPage-589238dc.esm.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-router-dom';
|
|
4
|
+
import '@backstage/core-plugin-api';
|
|
4
5
|
import '@backstage/core-components';
|
|
5
6
|
import '@backstage/plugin-catalog-react';
|
|
6
|
-
import '
|
|
7
|
-
import '@material-ui/core';
|
|
8
|
-
import '@material-ui/icons/CheckBox';
|
|
9
|
-
import '@material-ui/icons/CheckBoxOutlineBlank';
|
|
10
|
-
import '@material-ui/icons/ExpandMore';
|
|
11
|
-
import '@material-ui/lab';
|
|
12
|
-
import '@backstage/core-plugin-api';
|
|
7
|
+
import '@backstage/plugin-scaffolder-react/alpha';
|
|
13
8
|
import '@material-ui/core/Button';
|
|
14
9
|
import '@material-ui/core/IconButton';
|
|
15
10
|
import '@material-ui/core/useMediaQuery';
|
|
@@ -17,17 +12,21 @@ import '@material-ui/icons/AddCircleOutline';
|
|
|
17
12
|
import '@backstage/plugin-catalog-common/alpha';
|
|
18
13
|
import '@backstage/plugin-permission-react';
|
|
19
14
|
import '@backstage/catalog-model';
|
|
20
|
-
import '@backstage/plugin-scaffolder-react/alpha';
|
|
21
15
|
import '@backstage/plugin-scaffolder-react';
|
|
16
|
+
import '@backstage/catalog-client';
|
|
17
|
+
import '@material-ui/core';
|
|
22
18
|
import '@material-ui/core/FormControl';
|
|
23
19
|
import '@material-ui/lab/Autocomplete';
|
|
24
20
|
import 'react-use/lib/useAsync';
|
|
25
21
|
import 'react-use/lib/useEffectOnce';
|
|
22
|
+
import '@material-ui/lab';
|
|
26
23
|
import '@backstage/integration-react';
|
|
27
24
|
import '@material-ui/core/FormHelperText';
|
|
28
25
|
import '@material-ui/core/Input';
|
|
29
26
|
import '@material-ui/core/InputLabel';
|
|
30
27
|
import 'react-use/lib/useDebounce';
|
|
28
|
+
import './esm/TemplateFormPreviewer-32c3dcf3.esm.js';
|
|
29
|
+
import './esm/TemplateEditorIntro-644bad26.esm.js';
|
|
31
30
|
import 'luxon';
|
|
32
31
|
import 'humanize-duration';
|
|
33
32
|
import '@material-ui/core/Typography';
|
|
@@ -36,28 +35,30 @@ import 'qs';
|
|
|
36
35
|
import 'zen-observable';
|
|
37
36
|
import 'zod';
|
|
38
37
|
import 'zod-to-json-schema';
|
|
39
|
-
import '@material-ui/core/
|
|
40
|
-
import '@material-ui/core/
|
|
41
|
-
import '@material-ui/core/
|
|
42
|
-
import '@material-ui/core/
|
|
43
|
-
import '@material-ui/core/Popover';
|
|
38
|
+
import '@material-ui/core/Grid';
|
|
39
|
+
import '@material-ui/core/Step';
|
|
40
|
+
import '@material-ui/core/StepLabel';
|
|
41
|
+
import '@material-ui/core/Stepper';
|
|
44
42
|
import '@material-ui/core/styles';
|
|
45
|
-
import '@material-ui/icons/
|
|
46
|
-
import '@material-ui/icons/
|
|
47
|
-
import '@material-ui/icons/
|
|
48
|
-
import '
|
|
43
|
+
import '@material-ui/icons/Cancel';
|
|
44
|
+
import '@material-ui/icons/Check';
|
|
45
|
+
import '@material-ui/icons/FiberManualRecord';
|
|
46
|
+
import 'classnames';
|
|
47
|
+
import 'react-use/lib/useInterval';
|
|
48
|
+
import '@material-ui/icons/Language';
|
|
49
|
+
import '@react-hookz/web';
|
|
49
50
|
import '@material-ui/icons/Repeat';
|
|
50
51
|
import '@material-ui/icons/Toc';
|
|
51
|
-
import '
|
|
52
|
-
import '@material-ui/icons/Settings';
|
|
53
|
-
import '@material-ui/icons/FontDownload';
|
|
52
|
+
import '@material-ui/icons/MoreVert';
|
|
54
53
|
import '@codemirror/language';
|
|
55
54
|
import '@codemirror/legacy-modes/mode/yaml';
|
|
56
55
|
import '@material-ui/icons/Close';
|
|
57
56
|
import '@uiw/react-codemirror';
|
|
58
57
|
import 'yaml';
|
|
59
|
-
import '@react-hookz/web';
|
|
60
58
|
import '@rjsf/validator-ajv8';
|
|
59
|
+
import '@material-ui/icons/ExpandMore';
|
|
60
|
+
import '@material-ui/icons/Settings';
|
|
61
|
+
import '@material-ui/icons/FontDownload';
|
|
61
62
|
import '@material-ui/core/Accordion';
|
|
62
63
|
import '@material-ui/core/AccordionDetails';
|
|
63
64
|
import '@material-ui/core/AccordionSummary';
|
|
@@ -65,25 +66,18 @@ import '@material-ui/core/Divider';
|
|
|
65
66
|
import '@material-ui/icons/ExpandLess';
|
|
66
67
|
import '@material-ui/core/List';
|
|
67
68
|
import '@material-ui/core/ListItem';
|
|
69
|
+
import '@material-ui/core/ListItemIcon';
|
|
68
70
|
import '@material-ui/core/ListItemSecondaryAction';
|
|
69
|
-
import '@material-ui/
|
|
70
|
-
import '@material-ui/icons/Check';
|
|
71
|
+
import '@material-ui/core/ListItemText';
|
|
71
72
|
import '@material-ui/icons/Delete';
|
|
72
73
|
import '@material-ui/core/Box';
|
|
73
74
|
import '@material-ui/core/Tab';
|
|
74
75
|
import '@material-ui/core/Tabs';
|
|
75
|
-
import '@material-ui/
|
|
76
|
-
import '@material-ui/
|
|
77
|
-
import '@material-ui/core/StepLabel';
|
|
78
|
-
import '@material-ui/core/Stepper';
|
|
79
|
-
import '@material-ui/icons/FiberManualRecord';
|
|
80
|
-
import 'react-use/lib/useInterval';
|
|
81
|
-
import '@material-ui/icons/Language';
|
|
76
|
+
import '@material-ui/icons/Refresh';
|
|
77
|
+
import '@material-ui/icons/Save';
|
|
82
78
|
import '@material-ui/lab/TreeView';
|
|
83
79
|
import '@material-ui/icons/ChevronRight';
|
|
84
80
|
import '@material-ui/lab/TreeItem';
|
|
85
|
-
import '@material-ui/icons/Refresh';
|
|
86
|
-
import '@material-ui/icons/Save';
|
|
87
81
|
import '@codemirror/view';
|
|
88
82
|
import '@material-ui/core/Card';
|
|
89
83
|
import '@material-ui/core/CardActionArea';
|
package/dist/alpha.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { x as EntityPicker, y as EntityPickerSchema, z as EntityNamePicker, A as entityNamePickerValidation, B as EntityNamePickerSchema, C as EntityTagsPicker, D as EntityTagsPickerSchema, F as RepoUrlPicker, h as repoPickerValidation, G as RepoUrlPickerSchema, H as OwnerPicker, I as OwnerPickerSchema, J as OwnedEntityPicker, K as OwnedEntityPickerSchema, r as rootRouteRef } from './TaskPage-589238dc.esm.js';
|
|
2
2
|
import { StatusError, StatusOK, StatusPending, Page, Header, Lifecycle, Content, Progress, ErrorPanel, EmptyState, Table, Link } from '@backstage/core-components';
|
|
3
3
|
import { useApi, useRouteRef } from '@backstage/core-plugin-api';
|
|
4
4
|
import { catalogApiRef, EntityRefLink, CatalogFilterLayout } from '@backstage/plugin-catalog-react';
|
|
5
5
|
import useAsync from 'react-use/lib/useAsync';
|
|
6
6
|
import React, { useState } from 'react';
|
|
7
7
|
import { scaffolderApiRef } from '@backstage/plugin-scaffolder-react';
|
|
8
|
+
import { O as OwnerListPicker } from './TemplateEditorIntro-644bad26.esm.js';
|
|
8
9
|
import { DateTime, Interval } from 'luxon';
|
|
9
10
|
import humanizeDuration from 'humanize-duration';
|
|
10
11
|
import Typography from '@material-ui/core/Typography';
|
|
@@ -189,4 +190,4 @@ const ListTasksPage = (props) => {
|
|
|
189
190
|
};
|
|
190
191
|
|
|
191
192
|
export { DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS as D, ListTasksPage as L };
|
|
192
|
-
//# sourceMappingURL=ListTasksPage-
|
|
193
|
+
//# sourceMappingURL=ListTasksPage-ca799894.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListTasksPage-ca799894.esm.js","sources":["../../src/extensions/default.ts","../../src/components/ListTasksPage/columns/CreatedAtColumn.tsx","../../src/components/ListTasksPage/columns/OwnerEntityColumn.tsx","../../src/components/ListTasksPage/columns/TaskStatusColumn.tsx","../../src/components/ListTasksPage/columns/TemplateTitleColumn.tsx","../../src/components/ListTasksPage/ListTasksPage.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n EntityPicker,\n EntityPickerSchema,\n} from '../components/fields/EntityPicker/EntityPicker';\nimport {\n EntityNamePicker,\n EntityNamePickerSchema,\n} from '../components/fields/EntityNamePicker/EntityNamePicker';\nimport { entityNamePickerValidation } from '../components/fields/EntityNamePicker/validation';\nimport {\n EntityTagsPicker,\n EntityTagsPickerSchema,\n} from '../components/fields/EntityTagsPicker/EntityTagsPicker';\nimport {\n OwnerPicker,\n OwnerPickerSchema,\n} from '../components/fields/OwnerPicker/OwnerPicker';\nimport {\n RepoUrlPicker,\n RepoUrlPickerSchema,\n} from '../components/fields/RepoUrlPicker/RepoUrlPicker';\nimport { repoPickerValidation } from '../components/fields/RepoUrlPicker/validation';\nimport {\n OwnedEntityPicker,\n OwnedEntityPickerSchema,\n} from '../components/fields/OwnedEntityPicker/OwnedEntityPicker';\n\nexport const DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS = [\n {\n component: EntityPicker,\n name: 'EntityPicker',\n schema: EntityPickerSchema,\n },\n {\n component: EntityNamePicker,\n name: 'EntityNamePicker',\n validation: entityNamePickerValidation,\n schema: EntityNamePickerSchema,\n },\n {\n component: EntityTagsPicker,\n name: 'EntityTagsPicker',\n schema: EntityTagsPickerSchema,\n },\n {\n component: RepoUrlPicker,\n name: 'RepoUrlPicker',\n validation: repoPickerValidation,\n schema: RepoUrlPickerSchema,\n },\n {\n component: OwnerPicker,\n name: 'OwnerPicker',\n schema: OwnerPickerSchema,\n },\n {\n component: OwnedEntityPicker,\n name: 'OwnedEntityPicker',\n schema: OwnedEntityPickerSchema,\n },\n];\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DateTime, Interval } from 'luxon';\nimport humanizeDuration from 'humanize-duration';\nimport React from 'react';\nimport Typography from '@material-ui/core/Typography';\n\nexport const CreatedAtColumn = ({ createdAt }: { createdAt: string }) => {\n const createdAtTime = DateTime.fromISO(createdAt);\n const formatted = Interval.fromDateTimes(createdAtTime, DateTime.local())\n .toDuration()\n .valueOf();\n\n return (\n <Typography paragraph>\n {humanizeDuration(formatted, { round: true })} ago\n </Typography>\n );\n};\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useApi } from '@backstage/core-plugin-api';\nimport React from 'react';\n\nimport useAsync from 'react-use/lib/useAsync';\n\nimport { catalogApiRef, EntityRefLink } from '@backstage/plugin-catalog-react';\nimport { parseEntityRef, UserEntity } from '@backstage/catalog-model';\nimport Typography from '@material-ui/core/Typography';\n\nexport const OwnerEntityColumn = ({ entityRef }: { entityRef?: string }) => {\n const catalogApi = useApi(catalogApiRef);\n\n const { value, loading, error } = useAsync(\n () => catalogApi.getEntityByRef(entityRef || ''),\n [catalogApi, entityRef],\n );\n\n if (!entityRef) {\n return <Typography paragraph>Unknown</Typography>;\n }\n\n if (loading || error) {\n return null;\n }\n\n return (\n <EntityRefLink\n entityRef={parseEntityRef(entityRef)}\n title={\n (value as UserEntity)?.spec?.profile?.displayName ??\n value?.metadata.name\n }\n />\n );\n};\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n StatusError,\n StatusOK,\n StatusPending,\n} from '@backstage/core-components';\nimport React from 'react';\n\nexport const TaskStatusColumn = ({ status }: { status: string }) => {\n switch (status) {\n case 'processing':\n return <StatusPending>{status}</StatusPending>;\n case 'completed':\n return <StatusOK>{status}</StatusOK>;\n case 'error':\n default:\n return <StatusError>{status}</StatusError>;\n }\n};\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useApi } from '@backstage/core-plugin-api';\nimport React from 'react';\nimport { scaffolderApiRef } from '@backstage/plugin-scaffolder-react';\nimport useAsync from 'react-use/lib/useAsync';\nimport { parseEntityRef } from '@backstage/catalog-model';\nimport { EntityRefLink } from '@backstage/plugin-catalog-react';\n\nexport const TemplateTitleColumn = ({ entityRef }: { entityRef?: string }) => {\n const scaffolder = useApi(scaffolderApiRef);\n const { value, loading, error } = useAsync(\n () => scaffolder.getTemplateParameterSchema(entityRef || ''),\n [scaffolder, entityRef],\n );\n\n if (loading || error || !entityRef) {\n return null;\n }\n\n return (\n <EntityRefLink entityRef={parseEntityRef(entityRef)} title={value?.title} />\n );\n};\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n Content,\n EmptyState,\n ErrorPanel,\n Header,\n Lifecycle,\n Link,\n Page,\n Progress,\n Table,\n} from '@backstage/core-components';\nimport { useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport { CatalogFilterLayout } from '@backstage/plugin-catalog-react';\nimport useAsync from 'react-use/lib/useAsync';\nimport React, { useState } from 'react';\nimport {\n ScaffolderTask,\n scaffolderApiRef,\n} from '@backstage/plugin-scaffolder-react';\nimport { OwnerListPicker } from './OwnerListPicker';\nimport {\n CreatedAtColumn,\n OwnerEntityColumn,\n TaskStatusColumn,\n TemplateTitleColumn,\n} from './columns';\nimport { rootRouteRef } from '../../routes';\n\nexport interface MyTaskPageProps {\n initiallySelectedFilter?: 'owned' | 'all';\n}\n\nconst ListTaskPageContent = (props: MyTaskPageProps) => {\n const { initiallySelectedFilter = 'owned' } = props;\n\n const scaffolderApi = useApi(scaffolderApiRef);\n const rootLink = useRouteRef(rootRouteRef);\n\n const [ownerFilter, setOwnerFilter] = useState(initiallySelectedFilter);\n const { value, loading, error } = useAsync(() => {\n if (scaffolderApi.listTasks) {\n return scaffolderApi.listTasks?.({ filterByOwnership: ownerFilter });\n }\n\n // eslint-disable-next-line no-console\n console.warn(\n 'listTasks is not implemented in the scaffolderApi, please make sure to implement this method.',\n );\n\n return Promise.resolve({ tasks: [] });\n }, [scaffolderApi, ownerFilter]);\n\n if (loading) {\n return <Progress />;\n }\n\n if (error) {\n return (\n <>\n <ErrorPanel error={error} />\n <EmptyState\n missing=\"info\"\n title=\"No information to display\"\n description=\"There is no Tasks or there was an issue communicating with backend.\"\n />\n </>\n );\n }\n\n return (\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <OwnerListPicker\n filter={ownerFilter}\n onSelectOwner={id => setOwnerFilter(id)}\n />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n <Table<ScaffolderTask>\n data={value?.tasks ?? []}\n title=\"Tasks\"\n columns={[\n {\n title: 'Task ID',\n field: 'id',\n render: row => (\n <Link to={`${rootLink()}/tasks/${row.id}`}>{row.id}</Link>\n ),\n },\n {\n title: 'Template',\n render: row => (\n <TemplateTitleColumn\n entityRef={row.spec.templateInfo?.entityRef}\n />\n ),\n },\n {\n title: 'Created',\n field: 'createdAt',\n render: row => <CreatedAtColumn createdAt={row.createdAt} />,\n },\n {\n title: 'Owner',\n field: 'createdBy',\n render: row => (\n <OwnerEntityColumn entityRef={row.spec?.user?.ref} />\n ),\n },\n {\n title: 'Status',\n field: 'status',\n render: row => <TaskStatusColumn status={row.status} />,\n },\n ]}\n />\n </CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n );\n};\n\nexport const ListTasksPage = (props: MyTaskPageProps) => {\n return (\n <Page themeId=\"home\">\n <Header\n pageTitleOverride=\"Templates Tasks\"\n title={\n <>\n List template tasks <Lifecycle shorthand alpha />\n </>\n }\n subtitle=\"All tasks that have been started\"\n />\n <Content>\n <ListTaskPageContent {...props} />\n </Content>\n </Page>\n );\n};\n"],"names":["_a"],"mappings":";;;;;;;;;;;;;AA0CO,MAAM,mCAAsC,GAAA;AAAA,EACjD;AAAA,IACE,SAAW,EAAA,YAAA;AAAA,IACX,IAAM,EAAA,cAAA;AAAA,IACN,MAAQ,EAAA,kBAAA;AAAA,GACV;AAAA,EACA;AAAA,IACE,SAAW,EAAA,gBAAA;AAAA,IACX,IAAM,EAAA,kBAAA;AAAA,IACN,UAAY,EAAA,0BAAA;AAAA,IACZ,MAAQ,EAAA,sBAAA;AAAA,GACV;AAAA,EACA;AAAA,IACE,SAAW,EAAA,gBAAA;AAAA,IACX,IAAM,EAAA,kBAAA;AAAA,IACN,MAAQ,EAAA,sBAAA;AAAA,GACV;AAAA,EACA;AAAA,IACE,SAAW,EAAA,aAAA;AAAA,IACX,IAAM,EAAA,eAAA;AAAA,IACN,UAAY,EAAA,oBAAA;AAAA,IACZ,MAAQ,EAAA,mBAAA;AAAA,GACV;AAAA,EACA;AAAA,IACE,SAAW,EAAA,WAAA;AAAA,IACX,IAAM,EAAA,aAAA;AAAA,IACN,MAAQ,EAAA,iBAAA;AAAA,GACV;AAAA,EACA;AAAA,IACE,SAAW,EAAA,iBAAA;AAAA,IACX,IAAM,EAAA,mBAAA;AAAA,IACN,MAAQ,EAAA,uBAAA;AAAA,GACV;AACF;;ACvDO,MAAM,eAAkB,GAAA,CAAC,EAAE,SAAA,EAAuC,KAAA;AACvE,EAAM,MAAA,aAAA,GAAgB,QAAS,CAAA,OAAA,CAAQ,SAAS,CAAA,CAAA;AAChD,EAAM,MAAA,SAAA,GAAY,QAAS,CAAA,aAAA,CAAc,aAAe,EAAA,QAAA,CAAS,OAAO,CAAA,CACrE,UAAW,EAA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;;;"}
|
|
@@ -4,11 +4,13 @@ import { ItemCardHeader, MarkdownContent, LinkButton, Link, ContentHeader, Progr
|
|
|
4
4
|
import { useApp, useRouteRef, useApi, useRouteRefParams, useAnalytics, errorApiRef, featureFlagsApiRef, useApiHolder, AnalyticsContext, alertApiRef } from '@backstage/core-plugin-api';
|
|
5
5
|
import { getEntityRelations, getEntitySourceLocation, FavoriteEntity, EntityRefLinks, useEntityList, EntityListProvider, CatalogFilterLayout, EntitySearchBar, EntityKindPicker, UserListPicker, EntityTagPicker, catalogApiRef, humanizeEntityRef } from '@backstage/plugin-catalog-react';
|
|
6
6
|
import { RELATION_OWNED_BY, parseEntityRef, stringifyEntityRef, DEFAULT_NAMESPACE } from '@backstage/catalog-model';
|
|
7
|
+
import { isTemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
|
7
8
|
import { makeStyles, useTheme, Card, CardMedia, CardContent, Box, Typography, Chip, CardActions, Tooltip, IconButton, Paper, Button, Stepper, Step, StepLabel, StepContent, LinearProgress, FormControl, InputLabel, Select, MenuItem as MenuItem$1, CardHeader } from '@material-ui/core';
|
|
8
9
|
import { scmIntegrationsApiRef, ScmIntegrationIcon } from '@backstage/integration-react';
|
|
9
10
|
import LanguageIcon from '@material-ui/icons/Language';
|
|
10
11
|
import WarningIcon from '@material-ui/icons/Warning';
|
|
11
|
-
import {
|
|
12
|
+
import { k as selectedTemplateRouteRef, v as viewTechDocRouteRef, o as editRouteRef, p as actionsRouteRef, q as scaffolderListTaskRouteRef, t as registerComponentRouteRef, u as scaffolderTaskRouteRef, r as rootRouteRef, w as legacySelectedTemplateRouteRef, T as TaskPage } from './TaskPage-589238dc.esm.js';
|
|
13
|
+
import { T as TemplateTypePicker } from './TemplateTypePicker-4f07b216.esm.js';
|
|
12
14
|
import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';
|
|
13
15
|
import { usePermission } from '@backstage/plugin-permission-react';
|
|
14
16
|
import IconButton$1 from '@material-ui/core/IconButton';
|
|
@@ -29,15 +31,17 @@ import { withTheme } from '@rjsf/core';
|
|
|
29
31
|
import { Theme } from '@rjsf/material-ui';
|
|
30
32
|
import cloneDeep from 'lodash/cloneDeep';
|
|
31
33
|
import { extractSchemaFromStep } from '@backstage/plugin-scaffolder-react/alpha';
|
|
34
|
+
import { u as useDryRun, a as useDirectoryEditor, D as DirectoryEditorProvider, b as DryRunProvider, T as TemplateEditorBrowser, c as TemplateEditorTextArea, d as DryRunResults, e as TemplateEditorIntro, W as WebFileSystemAccess, A as ActionsPage } from './TemplateEditorIntro-644bad26.esm.js';
|
|
32
35
|
import { StreamLanguage } from '@codemirror/language';
|
|
33
36
|
import { yaml as yaml$1 } from '@codemirror/legacy-modes/mode/yaml';
|
|
34
37
|
import CloseIcon from '@material-ui/icons/Close';
|
|
35
38
|
import CodeMirror from '@uiw/react-codemirror';
|
|
36
39
|
import yaml from 'yaml';
|
|
37
40
|
import useDebounce from 'react-use/lib/useDebounce';
|
|
38
|
-
import { D as DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS, L as ListTasksPage } from './ListTasksPage-
|
|
41
|
+
import { D as DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS, L as ListTasksPage } from './ListTasksPage-ca799894.esm.js';
|
|
39
42
|
import '@backstage/errors';
|
|
40
43
|
import 'zen-observable';
|
|
44
|
+
import '@backstage/catalog-client';
|
|
41
45
|
import '@material-ui/core/FormControl';
|
|
42
46
|
import '@material-ui/lab/Autocomplete';
|
|
43
47
|
import 'zod';
|
|
@@ -47,54 +51,48 @@ import '@material-ui/core/Input';
|
|
|
47
51
|
import '@material-ui/core/InputLabel';
|
|
48
52
|
import 'react-use/lib/useEffectOnce';
|
|
49
53
|
import '@material-ui/lab';
|
|
54
|
+
import '@material-ui/core/Grid';
|
|
55
|
+
import '@material-ui/core/Step';
|
|
56
|
+
import '@material-ui/core/StepLabel';
|
|
57
|
+
import '@material-ui/core/Stepper';
|
|
58
|
+
import '@material-ui/core/Typography';
|
|
59
|
+
import '@material-ui/icons/Cancel';
|
|
60
|
+
import '@material-ui/icons/Check';
|
|
61
|
+
import '@material-ui/icons/FiberManualRecord';
|
|
62
|
+
import 'classnames';
|
|
63
|
+
import 'luxon';
|
|
64
|
+
import 'react-use/lib/useInterval';
|
|
50
65
|
import 'lodash/capitalize';
|
|
51
66
|
import '@material-ui/icons/CheckBox';
|
|
52
67
|
import '@material-ui/icons/CheckBoxOutlineBlank';
|
|
53
68
|
import '@material-ui/icons/ExpandMore';
|
|
54
|
-
import '@material-ui/core/Button';
|
|
55
|
-
import '@material-ui/core/useMediaQuery';
|
|
56
|
-
import '@material-ui/icons/AddCircleOutline';
|
|
57
|
-
import '@material-ui/icons/Repeat';
|
|
58
|
-
import '@material-ui/icons/Toc';
|
|
59
|
-
import 'classnames';
|
|
60
69
|
import '@material-ui/icons/Settings';
|
|
61
70
|
import '@material-ui/icons/FontDownload';
|
|
62
|
-
import 'luxon';
|
|
63
|
-
import 'humanize-duration';
|
|
64
|
-
import '@material-ui/core/Typography';
|
|
65
|
-
import '@react-hookz/web';
|
|
66
|
-
import '@rjsf/validator-ajv8';
|
|
67
71
|
import '@material-ui/core/Accordion';
|
|
68
72
|
import '@material-ui/core/AccordionDetails';
|
|
69
73
|
import '@material-ui/core/AccordionSummary';
|
|
70
74
|
import '@material-ui/core/Divider';
|
|
71
75
|
import '@material-ui/icons/ExpandLess';
|
|
76
|
+
import '@react-hookz/web';
|
|
72
77
|
import '@material-ui/core/List';
|
|
73
78
|
import '@material-ui/core/ListItem';
|
|
74
79
|
import '@material-ui/core/ListItemSecondaryAction';
|
|
75
|
-
import '@material-ui/icons/Cancel';
|
|
76
|
-
import '@material-ui/icons/Check';
|
|
77
80
|
import '@material-ui/icons/Delete';
|
|
78
81
|
import '@material-ui/core/Box';
|
|
79
82
|
import '@material-ui/core/Tab';
|
|
80
83
|
import '@material-ui/core/Tabs';
|
|
81
|
-
import '@material-ui/
|
|
82
|
-
import '@material-ui/
|
|
83
|
-
import '@material-ui/core/StepLabel';
|
|
84
|
-
import '@material-ui/core/Stepper';
|
|
85
|
-
import '@material-ui/icons/FiberManualRecord';
|
|
86
|
-
import 'react-use/lib/useInterval';
|
|
84
|
+
import '@material-ui/icons/Refresh';
|
|
85
|
+
import '@material-ui/icons/Save';
|
|
87
86
|
import '@material-ui/lab/TreeView';
|
|
88
87
|
import '@material-ui/icons/ChevronRight';
|
|
89
88
|
import '@material-ui/lab/TreeItem';
|
|
90
|
-
import '@material-ui/icons/Refresh';
|
|
91
|
-
import '@material-ui/icons/Save';
|
|
92
89
|
import '@codemirror/view';
|
|
93
90
|
import '@material-ui/core/Card';
|
|
94
91
|
import '@material-ui/core/CardActionArea';
|
|
95
92
|
import '@material-ui/core/CardContent';
|
|
96
93
|
import '@material-ui/core/Tooltip';
|
|
97
94
|
import '@material-ui/icons/InfoOutlined';
|
|
95
|
+
import 'humanize-duration';
|
|
98
96
|
|
|
99
97
|
const useStyles$5 = makeStyles((theme) => ({
|
|
100
98
|
cardHeader: {
|
|
@@ -275,11 +273,13 @@ const TemplateCard = ({ template, deprecated }) => {
|
|
|
275
273
|
|
|
276
274
|
const TemplateList = ({
|
|
277
275
|
TemplateCardComponent,
|
|
278
|
-
group
|
|
276
|
+
group,
|
|
277
|
+
templateFilter
|
|
279
278
|
}) => {
|
|
280
279
|
const { loading, error, entities } = useEntityList();
|
|
281
280
|
const Card = TemplateCardComponent || TemplateCard;
|
|
282
|
-
const
|
|
281
|
+
const templateEntities = entities.filter(isTemplateEntityV1beta3);
|
|
282
|
+
const maybeFilteredEntities = (group ? templateEntities.filter(group.filter) : templateEntities).filter((e) => templateFilter ? !templateFilter(e) : true);
|
|
283
283
|
const titleComponent = (() => {
|
|
284
284
|
if (group && group.title) {
|
|
285
285
|
if (typeof group.title === "string") {
|
|
@@ -354,6 +354,7 @@ function ScaffolderPageContextMenu(props) {
|
|
|
354
354
|
const ScaffolderPageContents = ({
|
|
355
355
|
TemplateCardComponent,
|
|
356
356
|
groups,
|
|
357
|
+
templateFilter,
|
|
357
358
|
contextMenu,
|
|
358
359
|
headerOptions
|
|
359
360
|
}) => {
|
|
@@ -394,13 +395,15 @@ const ScaffolderPageContents = ({
|
|
|
394
395
|
{
|
|
395
396
|
key: index,
|
|
396
397
|
TemplateCardComponent,
|
|
397
|
-
group
|
|
398
|
+
group,
|
|
399
|
+
templateFilter
|
|
398
400
|
}
|
|
399
401
|
)), /* @__PURE__ */ React.createElement(
|
|
400
402
|
TemplateList,
|
|
401
403
|
{
|
|
402
404
|
key: "other",
|
|
403
405
|
TemplateCardComponent,
|
|
406
|
+
templateFilter,
|
|
404
407
|
group: otherTemplatesGroup
|
|
405
408
|
}
|
|
406
409
|
)))));
|
|
@@ -408,6 +411,7 @@ const ScaffolderPageContents = ({
|
|
|
408
411
|
const ScaffolderPage = ({
|
|
409
412
|
TemplateCardComponent,
|
|
410
413
|
groups,
|
|
414
|
+
templateFilter,
|
|
411
415
|
contextMenu,
|
|
412
416
|
headerOptions
|
|
413
417
|
}) => /* @__PURE__ */ React.createElement(EntityListProvider, null, /* @__PURE__ */ React.createElement(
|
|
@@ -415,6 +419,7 @@ const ScaffolderPage = ({
|
|
|
415
419
|
{
|
|
416
420
|
TemplateCardComponent,
|
|
417
421
|
groups,
|
|
422
|
+
templateFilter,
|
|
418
423
|
contextMenu,
|
|
419
424
|
headerOptions
|
|
420
425
|
}
|
|
@@ -1433,7 +1438,12 @@ function TemplateEditorPage(props) {
|
|
|
1433
1438
|
}
|
|
1434
1439
|
|
|
1435
1440
|
const Router = (props) => {
|
|
1436
|
-
const {
|
|
1441
|
+
const {
|
|
1442
|
+
groups,
|
|
1443
|
+
templateFilter,
|
|
1444
|
+
components = {},
|
|
1445
|
+
defaultPreviewTemplate
|
|
1446
|
+
} = props;
|
|
1437
1447
|
const { ReviewStepComponent, TemplateCardComponent, TaskPageComponent } = components;
|
|
1438
1448
|
const outlet = useOutlet();
|
|
1439
1449
|
const TaskPageElement = TaskPageComponent != null ? TaskPageComponent : TaskPage;
|
|
@@ -1469,6 +1479,7 @@ const Router = (props) => {
|
|
|
1469
1479
|
ScaffolderPage,
|
|
1470
1480
|
{
|
|
1471
1481
|
groups,
|
|
1482
|
+
templateFilter,
|
|
1472
1483
|
TemplateCardComponent,
|
|
1473
1484
|
contextMenu: props.contextMenu,
|
|
1474
1485
|
headerOptions: props.headerOptions
|
|
@@ -1518,4 +1529,4 @@ const Router = (props) => {
|
|
|
1518
1529
|
};
|
|
1519
1530
|
|
|
1520
1531
|
export { Router };
|
|
1521
|
-
//# sourceMappingURL=Router-
|
|
1532
|
+
//# sourceMappingURL=Router-1b71c4f0.esm.js.map
|