@backstage-community/plugin-explore 0.11.0 → 0.13.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.
- package/CHANGELOG.md +27 -0
- package/dist/alpha.d.ts +57 -4
- package/dist/alpha.esm.js +43 -3
- package/dist/alpha.esm.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/package.json +18 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @backstage-community/plugin-explore
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0264565: Backstage version bump to v1.43.2
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [0264565]
|
|
12
|
+
- @backstage-community/plugin-explore-common@0.8.0
|
|
13
|
+
- @backstage-community/plugin-explore-react@0.8.0
|
|
14
|
+
|
|
15
|
+
## 0.12.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- deb9523: Backstage version bump to v1.42.3
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 13c0def: Migrate the explore api, index page, and nav item to the new frontend system.
|
|
24
|
+
- 02546ad: Internall update to use the yarn plugin for version management
|
|
25
|
+
- Updated dependencies [02546ad]
|
|
26
|
+
- Updated dependencies [deb9523]
|
|
27
|
+
- @backstage-community/plugin-explore-common@0.7.0
|
|
28
|
+
- @backstage-community/plugin-explore-react@0.7.0
|
|
29
|
+
|
|
3
30
|
## 0.11.0
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
1
4
|
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
2
5
|
import * as _backstage_plugin_search_react_alpha from '@backstage/plugin-search-react/alpha';
|
|
3
6
|
|
|
@@ -11,7 +14,7 @@ declare const exploreSearchResultListItem: _backstage_frontend_plugin_api.Extens
|
|
|
11
14
|
configInput: {
|
|
12
15
|
noTrack?: boolean | undefined;
|
|
13
16
|
};
|
|
14
|
-
output: _backstage_frontend_plugin_api.
|
|
17
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<{
|
|
15
18
|
predicate?: _backstage_plugin_search_react_alpha.SearchResultItemExtensionPredicate | undefined;
|
|
16
19
|
component: _backstage_plugin_search_react_alpha.SearchResultItemExtensionComponent;
|
|
17
20
|
}, "search.search-result-list-item.item", {}>;
|
|
@@ -19,8 +22,58 @@ declare const exploreSearchResultListItem: _backstage_frontend_plugin_api.Extens
|
|
|
19
22
|
params: _backstage_plugin_search_react_alpha.SearchResultListItemBlueprintParams;
|
|
20
23
|
}>;
|
|
21
24
|
/** @alpha */
|
|
22
|
-
declare const _default: _backstage_frontend_plugin_api.
|
|
23
|
-
|
|
25
|
+
declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{
|
|
26
|
+
explore: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
27
|
+
}, {}, {
|
|
28
|
+
"api:explore": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
29
|
+
kind: "api";
|
|
30
|
+
name: undefined;
|
|
31
|
+
config: {};
|
|
32
|
+
configInput: {};
|
|
33
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_core_plugin_api.AnyApiFactory, "core.api.factory", {}>;
|
|
34
|
+
inputs: {};
|
|
35
|
+
params: <TApi, TImpl extends TApi, TDeps extends {
|
|
36
|
+
[x: string]: unknown;
|
|
37
|
+
}>(params: _backstage_core_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_core_plugin_api.AnyApiFactory>;
|
|
38
|
+
}>;
|
|
39
|
+
"nav-item:explore": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
40
|
+
kind: "nav-item";
|
|
41
|
+
name: undefined;
|
|
42
|
+
config: {};
|
|
43
|
+
configInput: {};
|
|
44
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<{
|
|
45
|
+
title: string;
|
|
46
|
+
icon: _backstage_core_plugin_api.IconComponent;
|
|
47
|
+
routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
48
|
+
}, "core.nav-item.target", {}>;
|
|
49
|
+
inputs: {};
|
|
50
|
+
params: {
|
|
51
|
+
title: string;
|
|
52
|
+
icon: _backstage_core_plugin_api.IconComponent;
|
|
53
|
+
routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
54
|
+
};
|
|
55
|
+
}>;
|
|
56
|
+
"page:explore": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
57
|
+
kind: "page";
|
|
58
|
+
name: undefined;
|
|
59
|
+
config: {
|
|
60
|
+
path: string | undefined;
|
|
61
|
+
};
|
|
62
|
+
configInput: {
|
|
63
|
+
path?: string | undefined;
|
|
64
|
+
};
|
|
65
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<React.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
|
|
66
|
+
optional: true;
|
|
67
|
+
}>;
|
|
68
|
+
inputs: {};
|
|
69
|
+
params: {
|
|
70
|
+
defaultPath?: [Error: "Use the 'path' param instead"] | undefined;
|
|
71
|
+
path: string;
|
|
72
|
+
loader: () => Promise<JSX.Element>;
|
|
73
|
+
routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
|
|
74
|
+
};
|
|
75
|
+
}>;
|
|
76
|
+
"search-result-list-item:explore": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
24
77
|
kind: "search-result-list-item";
|
|
25
78
|
name: undefined;
|
|
26
79
|
config: {
|
|
@@ -29,7 +82,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
29
82
|
configInput: {
|
|
30
83
|
noTrack?: boolean | undefined;
|
|
31
84
|
};
|
|
32
|
-
output: _backstage_frontend_plugin_api.
|
|
85
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<{
|
|
33
86
|
predicate?: _backstage_plugin_search_react_alpha.SearchResultItemExtensionPredicate | undefined;
|
|
34
87
|
component: _backstage_plugin_search_react_alpha.SearchResultItemExtensionComponent;
|
|
35
88
|
}, "search.search-result-list-item.item", {}>;
|
package/dist/alpha.esm.js
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import LayersIcon from '@material-ui/icons/Layers';
|
|
3
|
+
import { convertLegacyRouteRef, compatWrapper, convertLegacyRouteRefs } from '@backstage/core-compat-api';
|
|
4
|
+
import { ApiBlueprint, discoveryApiRef, fetchApiRef, PageBlueprint, NavItemBlueprint, createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
|
2
5
|
import { SearchResultListItemBlueprint } from '@backstage/plugin-search-react/alpha';
|
|
6
|
+
import { ExploreClient } from './api/ExploreClient.esm.js';
|
|
7
|
+
import { exploreApiRef } from './api/ExploreApi.esm.js';
|
|
8
|
+
import { exploreRouteRef } from './routes.esm.js';
|
|
3
9
|
|
|
10
|
+
const exploreApi = ApiBlueprint.make({
|
|
11
|
+
params: (defineParams) => defineParams({
|
|
12
|
+
api: exploreApiRef,
|
|
13
|
+
deps: {
|
|
14
|
+
discoveryApi: discoveryApiRef,
|
|
15
|
+
fetchApi: fetchApiRef
|
|
16
|
+
},
|
|
17
|
+
factory: ({ discoveryApi, fetchApi }) => new ExploreClient({ discoveryApi, fetchApi })
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
const explorePage = PageBlueprint.make({
|
|
21
|
+
params: {
|
|
22
|
+
path: "/explore",
|
|
23
|
+
routeRef: convertLegacyRouteRef(exploreRouteRef),
|
|
24
|
+
loader: async () => import('./components/ExplorePage/index.esm.js').then(
|
|
25
|
+
(m) => compatWrapper(/* @__PURE__ */ jsx(m.ExplorePage, {}))
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const exploreNavItem = NavItemBlueprint.make({
|
|
30
|
+
params: {
|
|
31
|
+
icon: LayersIcon,
|
|
32
|
+
routeRef: convertLegacyRouteRef(exploreRouteRef),
|
|
33
|
+
title: "Explore"
|
|
34
|
+
}
|
|
35
|
+
});
|
|
4
36
|
const exploreSearchResultListItem = SearchResultListItemBlueprint.make({
|
|
5
37
|
params: {
|
|
6
38
|
predicate: (result) => result.type === "tools",
|
|
@@ -10,8 +42,16 @@ const exploreSearchResultListItem = SearchResultListItemBlueprint.make({
|
|
|
10
42
|
}
|
|
11
43
|
});
|
|
12
44
|
var alpha = createFrontendPlugin({
|
|
13
|
-
|
|
14
|
-
extensions: [
|
|
45
|
+
pluginId: "explore",
|
|
46
|
+
extensions: [
|
|
47
|
+
exploreApi,
|
|
48
|
+
explorePage,
|
|
49
|
+
exploreNavItem,
|
|
50
|
+
exploreSearchResultListItem
|
|
51
|
+
],
|
|
52
|
+
routes: convertLegacyRouteRefs({
|
|
53
|
+
explore: exploreRouteRef
|
|
54
|
+
})
|
|
15
55
|
});
|
|
16
56
|
|
|
17
57
|
export { alpha as default, exploreSearchResultListItem };
|
package/dist/alpha.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 */\n\nimport { createFrontendPlugin
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 */\n\nimport LayersIcon from '@material-ui/icons/Layers';\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n convertLegacyRouteRefs,\n} from '@backstage/core-compat-api';\nimport {\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n ApiBlueprint,\n PageBlueprint,\n NavItemBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport { SearchResultListItemBlueprint } from '@backstage/plugin-search-react/alpha';\nimport { exploreApiRef, ExploreClient } from './api';\nimport { exploreRouteRef } from './routes';\n\n/** @alpha */\nconst exploreApi = ApiBlueprint.make({\n params: defineParams =>\n defineParams({\n api: exploreApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new ExploreClient({ discoveryApi, fetchApi }),\n }),\n});\n\n/** @alpha */\nconst explorePage = PageBlueprint.make({\n params: {\n path: '/explore',\n routeRef: convertLegacyRouteRef(exploreRouteRef),\n loader: async () =>\n import('./components/ExplorePage').then(m =>\n compatWrapper(<m.ExplorePage />),\n ),\n },\n});\n\n/** @alpha */\nconst exploreNavItem = NavItemBlueprint.make({\n params: {\n icon: LayersIcon,\n routeRef: convertLegacyRouteRef(exploreRouteRef),\n title: 'Explore',\n },\n});\n\n/** @alpha */\nexport const exploreSearchResultListItem = SearchResultListItemBlueprint.make({\n params: {\n predicate: result => result.type === 'tools',\n component: () =>\n import('./components/ToolSearchResultListItem').then(\n m => m.ToolSearchResultListItem,\n ),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'explore',\n extensions: [\n exploreApi,\n explorePage,\n exploreNavItem,\n exploreSearchResultListItem,\n ],\n routes: convertLegacyRouteRefs({\n explore: exploreRouteRef,\n }),\n});\n"],"names":[],"mappings":";;;;;;;;;AAmCA,MAAM,UAAA,GAAa,aAAa,IAAK,CAAA;AAAA,EACnC,MAAA,EAAQ,kBACN,YAAa,CAAA;AAAA,IACX,GAAK,EAAA,aAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,YAAc,EAAA,eAAA;AAAA,MACd,QAAU,EAAA;AAAA,KACZ;AAAA,IACA,OAAA,EAAS,CAAC,EAAE,YAAc,EAAA,QAAA,EACxB,KAAA,IAAI,aAAc,CAAA,EAAE,YAAc,EAAA,QAAA,EAAU;AAAA,GAC/C;AACL,CAAC,CAAA;AAGD,MAAM,WAAA,GAAc,cAAc,IAAK,CAAA;AAAA,EACrC,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,UAAA;AAAA,IACN,QAAA,EAAU,sBAAsB,eAAe,CAAA;AAAA,IAC/C,MAAQ,EAAA,YACN,OAAO,uCAA0B,CAAE,CAAA,IAAA;AAAA,MAAK,OACtC,aAAc,iBAAA,GAAA,CAAC,CAAE,CAAA,WAAA,EAAF,EAAc,CAAE;AAAA;AACjC;AAEN,CAAC,CAAA;AAGD,MAAM,cAAA,GAAiB,iBAAiB,IAAK,CAAA;AAAA,EAC3C,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,UAAA;AAAA,IACN,QAAA,EAAU,sBAAsB,eAAe,CAAA;AAAA,IAC/C,KAAO,EAAA;AAAA;AAEX,CAAC,CAAA;AAGY,MAAA,2BAAA,GAA8B,8BAA8B,IAAK,CAAA;AAAA,EAC5E,MAAQ,EAAA;AAAA,IACN,SAAA,EAAW,CAAU,MAAA,KAAA,MAAA,CAAO,IAAS,KAAA,OAAA;AAAA,IACrC,SAAW,EAAA,MACT,OAAO,oDAAuC,CAAE,CAAA,IAAA;AAAA,MAC9C,OAAK,CAAE,CAAA;AAAA;AACT;AAEN,CAAC;AAGD,YAAe,oBAAqB,CAAA;AAAA,EAClC,QAAU,EAAA,SAAA;AAAA,EACV,UAAY,EAAA;AAAA,IACV,UAAA;AAAA,IACA,WAAA;AAAA,IACA,cAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,QAAQ,sBAAuB,CAAA;AAAA,IAC7B,OAAS,EAAA;AAAA,GACV;AACH,CAAC,CAAA;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { GetExploreToolsRequest, GetExploreToolsResponse } from '@backstage-comm
|
|
|
5
5
|
import { ExploreToolsConfig } from '@backstage-community/plugin-explore-react';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
import { TabProps } from '@material-ui/core/Tab';
|
|
8
|
-
import
|
|
8
|
+
import React__default, { ReactNode } from 'react';
|
|
9
9
|
import { DomainEntity } from '@backstage/catalog-model';
|
|
10
10
|
import * as _backstage_core_components from '@backstage/core-components';
|
|
11
11
|
import { SearchResultListItemExtensionProps } from '@backstage/plugin-search-react';
|
|
@@ -63,15 +63,15 @@ type SubRoute = {
|
|
|
63
63
|
path: string;
|
|
64
64
|
title: string;
|
|
65
65
|
children: JSX.Element;
|
|
66
|
-
tabProps?: TabProps<
|
|
67
|
-
component?:
|
|
66
|
+
tabProps?: TabProps<React__default.ElementType, {
|
|
67
|
+
component?: React__default.ElementType;
|
|
68
68
|
}>;
|
|
69
69
|
};
|
|
70
70
|
/** @public */
|
|
71
71
|
type ExploreLayoutProps = {
|
|
72
72
|
title?: string;
|
|
73
73
|
subtitle?: string;
|
|
74
|
-
children?:
|
|
74
|
+
children?: React__default.ReactNode;
|
|
75
75
|
};
|
|
76
76
|
/**
|
|
77
77
|
* Explore is a compound component, which allows you to define a custom layout
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-explore",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "A Backstage plugin for building an exploration page of your software ecosystem",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -65,21 +65,22 @@
|
|
|
65
65
|
"lint": "backstage-cli package lint",
|
|
66
66
|
"prepack": "backstage-cli package prepack",
|
|
67
67
|
"postpack": "backstage-cli package postpack",
|
|
68
|
-
"start": "backstage-cli package start",
|
|
68
|
+
"start": "backstage-cli package start --config ./dev/app-config.yaml",
|
|
69
69
|
"test": "backstage-cli package test"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@backstage-community/plugin-explore-common": "^0.
|
|
73
|
-
"@backstage-community/plugin-explore-react": "^0.
|
|
74
|
-
"@backstage/catalog-client": "^1.
|
|
72
|
+
"@backstage-community/plugin-explore-common": "^0.8.0",
|
|
73
|
+
"@backstage-community/plugin-explore-react": "^0.8.0",
|
|
74
|
+
"@backstage/catalog-client": "^1.12.0",
|
|
75
75
|
"@backstage/catalog-model": "^1.7.5",
|
|
76
|
-
"@backstage/core-
|
|
77
|
-
"@backstage/core-
|
|
76
|
+
"@backstage/core-compat-api": "^0.5.2",
|
|
77
|
+
"@backstage/core-components": "^0.18.1",
|
|
78
|
+
"@backstage/core-plugin-api": "^1.11.0",
|
|
78
79
|
"@backstage/errors": "^1.2.7",
|
|
79
|
-
"@backstage/frontend-plugin-api": "^0.
|
|
80
|
-
"@backstage/plugin-catalog-react": "^1.
|
|
80
|
+
"@backstage/frontend-plugin-api": "^0.12.0",
|
|
81
|
+
"@backstage/plugin-catalog-react": "^1.21.1",
|
|
81
82
|
"@backstage/plugin-search-common": "^1.2.19",
|
|
82
|
-
"@backstage/plugin-search-react": "^1.9.
|
|
83
|
+
"@backstage/plugin-search-react": "^1.9.4",
|
|
83
84
|
"@material-ui/core": "^4.12.2",
|
|
84
85
|
"@material-ui/icons": "^4.9.1",
|
|
85
86
|
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
@@ -88,11 +89,12 @@
|
|
|
88
89
|
"react-use": "^17.2.4"
|
|
89
90
|
},
|
|
90
91
|
"devDependencies": {
|
|
91
|
-
"@backstage/cli": "^0.
|
|
92
|
-
"@backstage/core-app-api": "^1.
|
|
93
|
-
"@backstage/dev-utils": "^1.1.
|
|
94
|
-
"@backstage/
|
|
95
|
-
"@backstage/
|
|
92
|
+
"@backstage/cli": "^0.34.3",
|
|
93
|
+
"@backstage/core-app-api": "^1.19.0",
|
|
94
|
+
"@backstage/dev-utils": "^1.1.14",
|
|
95
|
+
"@backstage/frontend-defaults": "^0.3.1",
|
|
96
|
+
"@backstage/plugin-catalog": "^1.31.3",
|
|
97
|
+
"@backstage/test-utils": "^1.7.11",
|
|
96
98
|
"@testing-library/dom": "^10.0.0",
|
|
97
99
|
"@testing-library/jest-dom": "^6.0.0",
|
|
98
100
|
"@testing-library/react": "^15.0.0",
|
|
@@ -106,6 +108,7 @@
|
|
|
106
108
|
"peerDependencies": {
|
|
107
109
|
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
108
110
|
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
111
|
+
"react-router": "*",
|
|
109
112
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
110
113
|
},
|
|
111
114
|
"module": "./dist/index.esm.js"
|