@backstage/plugin-catalog-import 0.12.12 → 0.12.13-next.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 (40) hide show
  1. package/CHANGELOG.md +45 -4
  2. package/dist/alpha.d.ts +10 -3
  3. package/dist/alpha.esm.js +3 -2
  4. package/dist/alpha.esm.js.map +1 -1
  5. package/dist/components/Buttons/index.esm.js +19 -15
  6. package/dist/components/Buttons/index.esm.js.map +1 -1
  7. package/dist/components/DefaultImportPage/DefaultImportPage.esm.js +14 -4
  8. package/dist/components/DefaultImportPage/DefaultImportPage.esm.js.map +1 -1
  9. package/dist/components/EntityListComponent/EntityListComponent.esm.js +52 -43
  10. package/dist/components/EntityListComponent/EntityListComponent.esm.js.map +1 -1
  11. package/dist/components/ImportInfoCard/ImportInfoCard.esm.js +51 -10
  12. package/dist/components/ImportInfoCard/ImportInfoCard.esm.js.map +1 -1
  13. package/dist/components/ImportPage/ImportPage.esm.js +2 -2
  14. package/dist/components/ImportPage/ImportPage.esm.js.map +1 -1
  15. package/dist/components/ImportStepper/ImportStepper.esm.js +36 -30
  16. package/dist/components/ImportStepper/ImportStepper.esm.js.map +1 -1
  17. package/dist/components/ImportStepper/defaults.esm.js +118 -102
  18. package/dist/components/ImportStepper/defaults.esm.js.map +1 -1
  19. package/dist/components/StepFinishImportLocation/StepFinishImportLocation.esm.js +46 -25
  20. package/dist/components/StepFinishImportLocation/StepFinishImportLocation.esm.js.map +1 -1
  21. package/dist/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.esm.js +37 -31
  22. package/dist/components/StepInitAnalyzeUrl/StepInitAnalyzeUrl.esm.js.map +1 -1
  23. package/dist/components/StepPrepareCreatePullRequest/AutocompleteTextField.esm.js +9 -5
  24. package/dist/components/StepPrepareCreatePullRequest/AutocompleteTextField.esm.js.map +1 -1
  25. package/dist/components/StepPrepareCreatePullRequest/PreparePullRequestForm.esm.js +2 -2
  26. package/dist/components/StepPrepareCreatePullRequest/PreparePullRequestForm.esm.js.map +1 -1
  27. package/dist/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.esm.js +16 -13
  28. package/dist/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.esm.js.map +1 -1
  29. package/dist/components/StepPrepareCreatePullRequest/PreviewPullRequestComponent.esm.js +5 -2
  30. package/dist/components/StepPrepareCreatePullRequest/PreviewPullRequestComponent.esm.js.map +1 -1
  31. package/dist/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.esm.js +76 -54
  32. package/dist/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.esm.js.map +1 -1
  33. package/dist/components/StepPrepareSelectLocations/StepPrepareSelectLocations.esm.js +49 -32
  34. package/dist/components/StepPrepareSelectLocations/StepPrepareSelectLocations.esm.js.map +1 -1
  35. package/dist/components/StepReviewLocation/StepReviewLocation.esm.js +45 -24
  36. package/dist/components/StepReviewLocation/StepReviewLocation.esm.js.map +1 -1
  37. package/dist/index.d.ts +21 -21
  38. package/dist/translation.esm.js +14 -0
  39. package/dist/translation.esm.js.map +1 -0
  40. package/package.json +21 -21
package/CHANGELOG.md CHANGED
@@ -1,15 +1,57 @@
1
1
  # @backstage/plugin-catalog-import
2
2
 
3
- ## 0.12.12
3
+ ## 0.12.13-next.2
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - e50a4f7: Expose the `UnpackNestedValue` type as it's been removed from `react-hook-form`
7
+ - a47fd39: Removes instances of default React imports, a necessary update for the upcoming React 19 migration.
8
+
9
+ <https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html>
10
+
8
11
  - Updated dependencies
12
+ - @backstage/frontend-plugin-api@0.10.1-next.1
13
+ - @backstage/integration-react@1.2.6-next.1
14
+ - @backstage/core-compat-api@0.4.1-next.2
15
+ - @backstage/core-components@0.17.1-next.1
16
+ - @backstage/core-plugin-api@1.10.6-next.0
17
+ - @backstage/plugin-catalog-react@1.17.0-next.2
18
+ - @backstage/catalog-client@1.9.1
19
+ - @backstage/catalog-model@1.7.3
20
+ - @backstage/config@1.3.2
21
+ - @backstage/errors@1.2.7
22
+ - @backstage/integration@1.16.3-next.0
23
+ - @backstage/plugin-catalog-common@1.1.3
24
+
25
+ ## 0.12.12-next.1
26
+
27
+ ### Patch Changes
28
+
29
+ - 5b9514f: Expose the `UnpackNestedValue` type as it's been removed from `react-hook-form`
30
+ - f1d9a64: adding translation for `Register an existing component` text
31
+ - Updated dependencies
32
+ - @backstage/core-components@0.17.1-next.0
33
+ - @backstage/integration-react@1.2.6-next.0
34
+ - @backstage/integration@1.16.3-next.0
35
+ - @backstage/frontend-plugin-api@0.10.1-next.0
36
+ - @backstage/plugin-catalog-react@1.16.1-next.1
37
+ - @backstage/core-compat-api@0.4.1-next.1
38
+ - @backstage/catalog-client@1.9.1
39
+ - @backstage/catalog-model@1.7.3
40
+ - @backstage/config@1.3.2
41
+ - @backstage/core-plugin-api@1.10.5
42
+ - @backstage/errors@1.2.7
43
+ - @backstage/plugin-catalog-common@1.1.3
44
+
45
+ ## 0.12.12-next.0
46
+
47
+ ### Patch Changes
48
+
49
+ - Updated dependencies
50
+ - @backstage/plugin-catalog-react@1.16.1-next.0
51
+ - @backstage/core-compat-api@0.4.1-next.0
9
52
  - @backstage/catalog-client@1.9.1
10
53
  - @backstage/catalog-model@1.7.3
11
54
  - @backstage/config@1.3.2
12
- - @backstage/core-compat-api@0.4.0
13
55
  - @backstage/core-components@0.17.0
14
56
  - @backstage/core-plugin-api@1.10.5
15
57
  - @backstage/errors@1.2.7
@@ -17,7 +59,6 @@
17
59
  - @backstage/integration@1.16.2
18
60
  - @backstage/integration-react@1.2.5
19
61
  - @backstage/plugin-catalog-common@1.1.3
20
- - @backstage/plugin-catalog-react@1.16.0
21
62
 
22
63
  ## 0.12.11
23
64
 
package/dist/alpha.d.ts CHANGED
@@ -1,6 +1,13 @@
1
+ import * as react from 'react';
1
2
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
2
3
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
3
- import React__default from 'react';
4
+ import * as _backstage_core_plugin_api_alpha from '@backstage/core-plugin-api/alpha';
5
+
6
+ /** @alpha */
7
+ declare const catalogImportTranslationRef: _backstage_core_plugin_api_alpha.TranslationRef<"catalog-import", {
8
+ readonly pageTitle: "Register an existing component";
9
+ readonly "importInfoCard.title": "Register an existing component";
10
+ }>;
4
11
 
5
12
  /** @alpha */
6
13
  declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{
@@ -26,7 +33,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{
26
33
  configInput: {
27
34
  path?: string | undefined;
28
35
  };
29
- output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<React__default.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
36
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
30
37
  optional: true;
31
38
  }>;
32
39
  inputs: {};
@@ -38,4 +45,4 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{
38
45
  }>;
39
46
  }>;
40
47
 
41
- export { _default as default };
48
+ export { catalogImportTranslationRef, _default as default };
package/dist/alpha.esm.js CHANGED
@@ -1,19 +1,20 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { createApiFactory, discoveryApiRef, fetchApiRef, configApiRef } from '@backstage/core-plugin-api';
2
3
  import { convertLegacyRouteRef, compatWrapper } from '@backstage/core-compat-api';
3
4
  import { PageBlueprint, ApiBlueprint, createFrontendPlugin } from '@backstage/frontend-plugin-api';
4
5
  import { scmAuthApiRef, scmIntegrationsApiRef } from '@backstage/integration-react';
5
- import React from 'react';
6
6
  import { catalogImportApiRef } from './api/CatalogImportApi.esm.js';
7
7
  import { CatalogImportClient } from './api/CatalogImportClient.esm.js';
8
8
  import { rootRouteRef } from './plugin.esm.js';
9
9
  import { catalogApiRef } from '@backstage/plugin-catalog-react';
10
+ export { catalogImportTranslationRef } from './translation.esm.js';
10
11
 
11
12
  const catalogImportPage = PageBlueprint.make({
12
13
  params: {
13
14
  defaultPath: "/catalog-import",
14
15
  routeRef: convertLegacyRouteRef(rootRouteRef),
15
16
  loader: () => import('./components/ImportPage/index.esm.js').then(
16
- (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.ImportPage, null))
17
+ (m) => compatWrapper(/* @__PURE__ */ jsx(m.ImportPage, {}))
17
18
  )
18
19
  }
19
20
  });
@@ -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 {\n configApiRef,\n createApiFactory,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport {\n createFrontendPlugin,\n PageBlueprint,\n ApiBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport {\n scmAuthApiRef,\n scmIntegrationsApiRef,\n} from '@backstage/integration-react';\nimport React from 'react';\nimport { CatalogImportClient, catalogImportApiRef } from './api';\nimport { rootRouteRef } from './plugin';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\n\n// TODO: It's currently possible to override the import page with a custom one. We need to decide\n// whether this type of override is typically done with an input or by overriding the entire extension.\nconst catalogImportPage = PageBlueprint.make({\n params: {\n defaultPath: '/catalog-import',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n loader: () =>\n import('./components/ImportPage').then(m =>\n compatWrapper(<m.ImportPage />),\n ),\n },\n});\n\nconst catalogImportApi = ApiBlueprint.make({\n params: {\n factory: createApiFactory({\n api: catalogImportApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n scmAuthApi: scmAuthApiRef,\n fetchApi: fetchApiRef,\n scmIntegrationsApi: scmIntegrationsApiRef,\n catalogApi: catalogApiRef,\n configApi: configApiRef,\n },\n factory: ({\n discoveryApi,\n scmAuthApi,\n fetchApi,\n scmIntegrationsApi,\n catalogApi,\n configApi,\n }) =>\n new CatalogImportClient({\n discoveryApi,\n scmAuthApi,\n scmIntegrationsApi,\n fetchApi,\n catalogApi,\n configApi,\n }),\n }),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n id: 'catalog-import',\n extensions: [catalogImportApi, catalogImportPage],\n routes: {\n importPage: convertLegacyRouteRef(rootRouteRef),\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AA0CA,MAAM,iBAAA,GAAoB,cAAc,IAAK,CAAA;AAAA,EAC3C,MAAQ,EAAA;AAAA,IACN,WAAa,EAAA,iBAAA;AAAA,IACb,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,IAC5C,MAAQ,EAAA,MACN,OAAO,sCAAyB,CAAE,CAAA,IAAA;AAAA,MAAK,OACrC,aAAc,iBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,UAAA,EAAF,IAAa,CAAE;AAAA;AAChC;AAEN,CAAC,CAAA;AAED,MAAM,gBAAA,GAAmB,aAAa,IAAK,CAAA;AAAA,EACzC,MAAQ,EAAA;AAAA,IACN,SAAS,gBAAiB,CAAA;AAAA,MACxB,GAAK,EAAA,mBAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,YAAc,EAAA,eAAA;AAAA,QACd,UAAY,EAAA,aAAA;AAAA,QACZ,QAAU,EAAA,WAAA;AAAA,QACV,kBAAoB,EAAA,qBAAA;AAAA,QACpB,UAAY,EAAA,aAAA;AAAA,QACZ,SAAW,EAAA;AAAA,OACb;AAAA,MACA,SAAS,CAAC;AAAA,QACR,YAAA;AAAA,QACA,UAAA;AAAA,QACA,QAAA;AAAA,QACA,kBAAA;AAAA,QACA,UAAA;AAAA,QACA;AAAA,OACF,KACE,IAAI,mBAAoB,CAAA;AAAA,QACtB,YAAA;AAAA,QACA,UAAA;AAAA,QACA,kBAAA;AAAA,QACA,QAAA;AAAA,QACA,UAAA;AAAA,QACA;AAAA,OACD;AAAA,KACJ;AAAA;AAEL,CAAC,CAAA;AAGD,YAAe,oBAAqB,CAAA;AAAA,EAClC,EAAI,EAAA,gBAAA;AAAA,EACJ,UAAA,EAAY,CAAC,gBAAA,EAAkB,iBAAiB,CAAA;AAAA,EAChD,MAAQ,EAAA;AAAA,IACN,UAAA,EAAY,sBAAsB,YAAY;AAAA;AAElD,CAAC,CAAA;;;;"}
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 {\n configApiRef,\n createApiFactory,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport {\n createFrontendPlugin,\n PageBlueprint,\n ApiBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport {\n scmAuthApiRef,\n scmIntegrationsApiRef,\n} from '@backstage/integration-react';\nimport { CatalogImportClient, catalogImportApiRef } from './api';\nimport { rootRouteRef } from './plugin';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\n\nexport * from './translation';\n\n// TODO: It's currently possible to override the import page with a custom one. We need to decide\n// whether this type of override is typically done with an input or by overriding the entire extension.\nconst catalogImportPage = PageBlueprint.make({\n params: {\n defaultPath: '/catalog-import',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n loader: () =>\n import('./components/ImportPage').then(m =>\n compatWrapper(<m.ImportPage />),\n ),\n },\n});\n\nconst catalogImportApi = ApiBlueprint.make({\n params: {\n factory: createApiFactory({\n api: catalogImportApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n scmAuthApi: scmAuthApiRef,\n fetchApi: fetchApiRef,\n scmIntegrationsApi: scmIntegrationsApiRef,\n catalogApi: catalogApiRef,\n configApi: configApiRef,\n },\n factory: ({\n discoveryApi,\n scmAuthApi,\n fetchApi,\n scmIntegrationsApi,\n catalogApi,\n configApi,\n }) =>\n new CatalogImportClient({\n discoveryApi,\n scmAuthApi,\n scmIntegrationsApi,\n fetchApi,\n catalogApi,\n configApi,\n }),\n }),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n id: 'catalog-import',\n extensions: [catalogImportApi, catalogImportPage],\n routes: {\n importPage: convertLegacyRouteRef(rootRouteRef),\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;AA2CA,MAAM,iBAAA,GAAoB,cAAc,IAAK,CAAA;AAAA,EAC3C,MAAQ,EAAA;AAAA,IACN,WAAa,EAAA,iBAAA;AAAA,IACb,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,IAC5C,MAAQ,EAAA,MACN,OAAO,sCAAyB,CAAE,CAAA,IAAA;AAAA,MAAK,OACrC,aAAc,iBAAA,GAAA,CAAC,CAAE,CAAA,UAAA,EAAF,EAAa,CAAE;AAAA;AAChC;AAEN,CAAC,CAAA;AAED,MAAM,gBAAA,GAAmB,aAAa,IAAK,CAAA;AAAA,EACzC,MAAQ,EAAA;AAAA,IACN,SAAS,gBAAiB,CAAA;AAAA,MACxB,GAAK,EAAA,mBAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,YAAc,EAAA,eAAA;AAAA,QACd,UAAY,EAAA,aAAA;AAAA,QACZ,QAAU,EAAA,WAAA;AAAA,QACV,kBAAoB,EAAA,qBAAA;AAAA,QACpB,UAAY,EAAA,aAAA;AAAA,QACZ,SAAW,EAAA;AAAA,OACb;AAAA,MACA,SAAS,CAAC;AAAA,QACR,YAAA;AAAA,QACA,UAAA;AAAA,QACA,QAAA;AAAA,QACA,kBAAA;AAAA,QACA,UAAA;AAAA,QACA;AAAA,OACF,KACE,IAAI,mBAAoB,CAAA;AAAA,QACtB,YAAA;AAAA,QACA,UAAA;AAAA,QACA,kBAAA;AAAA,QACA,QAAA;AAAA,QACA,UAAA;AAAA,QACA;AAAA,OACD;AAAA,KACJ;AAAA;AAEL,CAAC,CAAA;AAGD,YAAe,oBAAqB,CAAA;AAAA,EAClC,EAAI,EAAA,gBAAA;AAAA,EACJ,UAAA,EAAY,CAAC,gBAAA,EAAkB,iBAAiB,CAAA;AAAA,EAChD,MAAQ,EAAA;AAAA,IACN,UAAA,EAAY,sBAAsB,YAAY;AAAA;AAElD,CAAC,CAAA;;;;"}
@@ -1,8 +1,8 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import { LinkButton } from '@backstage/core-components';
2
3
  import Button from '@material-ui/core/Button';
3
4
  import CircularProgress from '@material-ui/core/CircularProgress';
4
5
  import { makeStyles } from '@material-ui/core/styles';
5
- import React from 'react';
6
6
 
7
7
  const useStyles = makeStyles((theme) => ({
8
8
  wrapper: {
@@ -25,31 +25,35 @@ const useStyles = makeStyles((theme) => ({
25
25
  const NextButton = (props) => {
26
26
  const { loading, ...buttonProps } = props;
27
27
  const classes = useStyles();
28
- return /* @__PURE__ */ React.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React.createElement(
29
- Button,
30
- {
31
- color: "primary",
32
- variant: "contained",
33
- ...buttonProps,
34
- disabled: props.disabled || props.loading
35
- }
36
- ), props.loading && /* @__PURE__ */ React.createElement(CircularProgress, { size: "1.5rem", className: classes.buttonProgress }), props.loading);
28
+ return /* @__PURE__ */ jsxs("div", { className: classes.wrapper, children: [
29
+ /* @__PURE__ */ jsx(
30
+ Button,
31
+ {
32
+ color: "primary",
33
+ variant: "contained",
34
+ ...buttonProps,
35
+ disabled: props.disabled || props.loading
36
+ }
37
+ ),
38
+ props.loading && /* @__PURE__ */ jsx(CircularProgress, { size: "1.5rem", className: classes.buttonProgress }),
39
+ props.loading
40
+ ] });
37
41
  };
38
42
  const BackButton = (props) => {
39
43
  const classes = useStyles();
40
- return /* @__PURE__ */ React.createElement(Button, { variant: "outlined", className: classes.button, ...props }, props.children || "Back");
44
+ return /* @__PURE__ */ jsx(Button, { variant: "outlined", className: classes.button, ...props, children: props.children || "Back" });
41
45
  };
42
46
  const ViewComponentButton = (props) => {
43
47
  const classes = useStyles();
44
- return /* @__PURE__ */ React.createElement(
48
+ return /* @__PURE__ */ jsx(
45
49
  LinkButton,
46
50
  {
47
51
  color: "primary",
48
52
  variant: "contained",
49
53
  className: classes.button,
50
- ...props
51
- },
52
- props.children
54
+ ...props,
55
+ children: props.children
56
+ }
53
57
  );
54
58
  };
55
59
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../src/components/Buttons/index.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 */\n\nimport { LinkButton } from '@backstage/core-components';\nimport Button from '@material-ui/core/Button';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport { makeStyles } from '@material-ui/core/styles';\nimport React, { ComponentProps } from 'react';\n\nconst useStyles = makeStyles(theme => ({\n wrapper: {\n marginTop: theme.spacing(1),\n marginRight: theme.spacing(1),\n position: 'relative',\n },\n buttonProgress: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n marginTop: -12,\n marginLeft: -12,\n },\n button: {\n marginTop: theme.spacing(1),\n marginRight: theme.spacing(1),\n },\n}));\n\nexport const NextButton = (\n props: ComponentProps<typeof Button> & { loading?: boolean },\n) => {\n const { loading, ...buttonProps } = props;\n const classes = useStyles();\n\n return (\n <div className={classes.wrapper}>\n <Button\n color=\"primary\"\n variant=\"contained\"\n {...buttonProps}\n disabled={props.disabled || props.loading}\n />\n {props.loading && (\n <CircularProgress size=\"1.5rem\" className={classes.buttonProgress} />\n )}\n {props.loading}\n </div>\n );\n};\n\nexport const BackButton = (props: ComponentProps<typeof Button>) => {\n const classes = useStyles();\n\n return (\n <Button variant=\"outlined\" className={classes.button} {...props}>\n {props.children || 'Back'}\n </Button>\n );\n};\n\nexport const ViewComponentButton = (\n props: ComponentProps<typeof LinkButton>,\n) => {\n const classes = useStyles();\n\n return (\n <LinkButton\n color=\"primary\"\n variant=\"contained\"\n className={classes.button}\n {...props}\n >\n {props.children}\n </LinkButton>\n );\n};\n"],"names":[],"mappings":";;;;;;AAsBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,OAAS,EAAA;AAAA,IACP,SAAA,EAAW,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IAC1B,WAAA,EAAa,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IAC5B,QAAU,EAAA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ACvD,KAAM,CAAA,QAAA,IAAY,MACrB,CAAA;AAEJ;AAEa,MAAA,mBAAA,GAAsB,CACjC,KACG,KAAA;AACH,EAAA,MAAM,UAAU,SAAU,EAAA;AAE1B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,SAAA;AAAA,MACN,OAAQ,EAAA,WAAA;AAAA,MACR,WAAW,OAAQ,CAAA,MAAA;AAAA,MAClB,GAAG;AAAA,KAAA;AAAA,IAEH,KAAM,CAAA;AAAA,GACT;AAEJ;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../src/components/Buttons/index.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 */\n\nimport { LinkButton } from '@backstage/core-components';\nimport Button from '@material-ui/core/Button';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { ComponentProps } from 'react';\n\nconst useStyles = makeStyles(theme => ({\n wrapper: {\n marginTop: theme.spacing(1),\n marginRight: theme.spacing(1),\n position: 'relative',\n },\n buttonProgress: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n marginTop: -12,\n marginLeft: -12,\n },\n button: {\n marginTop: theme.spacing(1),\n marginRight: theme.spacing(1),\n },\n}));\n\nexport const NextButton = (\n props: ComponentProps<typeof Button> & { loading?: boolean },\n) => {\n const { loading, ...buttonProps } = props;\n const classes = useStyles();\n\n return (\n <div className={classes.wrapper}>\n <Button\n color=\"primary\"\n variant=\"contained\"\n {...buttonProps}\n disabled={props.disabled || props.loading}\n />\n {props.loading && (\n <CircularProgress size=\"1.5rem\" className={classes.buttonProgress} />\n )}\n {props.loading}\n </div>\n );\n};\n\nexport const BackButton = (props: ComponentProps<typeof Button>) => {\n const classes = useStyles();\n\n return (\n <Button variant=\"outlined\" className={classes.button} {...props}>\n {props.children || 'Back'}\n </Button>\n );\n};\n\nexport const ViewComponentButton = (\n props: ComponentProps<typeof LinkButton>,\n) => {\n const classes = useStyles();\n\n return (\n <LinkButton\n color=\"primary\"\n variant=\"contained\"\n className={classes.button}\n {...props}\n >\n {props.children}\n </LinkButton>\n );\n};\n"],"names":[],"mappings":";;;;;;AAsBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,OAAS,EAAA;AAAA,IACP,SAAA,EAAW,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IAC1B,WAAA,EAAa,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IAC5B,QAAU,EAAA;AAAA,GACZ;AAAA,EACA,cAAgB,EAAA;AAAA,IACd,QAAU,EAAA,UAAA;AAAA,IACV,GAAK,EAAA,KAAA;AAAA,IACL,IAAM,EAAA,KAAA;AAAA,IACN,SAAW,EAAA,CAAA,EAAA;AAAA,IACX,UAAY,EAAA,CAAA;AAAA,GACd;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,SAAA,EAAW,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IAC1B,WAAA,EAAa,KAAM,CAAA,OAAA,CAAQ,CAAC;AAAA;AAEhC,CAAE,CAAA,CAAA;AAEW,MAAA,UAAA,GAAa,CACxB,KACG,KAAA;AACH,EAAA,MAAM,EAAE,OAAA,EAAS,GAAG,WAAA,EAAgB,GAAA,KAAA;AACpC,EAAA,MAAM,UAAU,SAAU,EAAA;AAE1B,EAAA,uBACG,IAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,OACtB,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,KAAM,EAAA,SAAA;AAAA,QACN,OAAQ,EAAA,WAAA;AAAA,QACP,GAAG,WAAA;AAAA,QACJ,QAAA,EAAU,KAAM,CAAA,QAAA,IAAY,KAAM,CAAA;AAAA;AAAA,KACpC;AAAA,IACC,KAAA,CAAM,2BACJ,GAAA,CAAA,gBAAA,EAAA,EAAiB,MAAK,QAAS,EAAA,SAAA,EAAW,QAAQ,cAAgB,EAAA,CAAA;AAAA,IAEpE,KAAM,CAAA;AAAA,GACT,EAAA,CAAA;AAEJ;AAEa,MAAA,UAAA,GAAa,CAAC,KAAyC,KAAA;AAClE,EAAA,MAAM,UAAU,SAAU,EAAA;AAE1B,EACE,uBAAA,GAAA,CAAC,MAAO,EAAA,EAAA,OAAA,EAAQ,UAAW,EAAA,SAAA,EAAW,OAAQ,CAAA,MAAA,EAAS,GAAG,KAAA,EACvD,QAAM,EAAA,KAAA,CAAA,QAAA,IAAY,MACrB,EAAA,CAAA;AAEJ;AAEa,MAAA,mBAAA,GAAsB,CACjC,KACG,KAAA;AACH,EAAA,MAAM,UAAU,SAAU,EAAA;AAE1B,EACE,uBAAA,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,SAAA;AAAA,MACN,OAAQ,EAAA,WAAA;AAAA,MACR,WAAW,OAAQ,CAAA,MAAA;AAAA,MAClB,GAAG,KAAA;AAAA,MAEH,QAAM,EAAA,KAAA,CAAA;AAAA;AAAA,GACT;AAEJ;;;;"}
@@ -1,9 +1,9 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import { Page, Header, Content, ContentHeader, SupportButton } from '@backstage/core-components';
2
3
  import { useApi, configApiRef } from '@backstage/core-plugin-api';
3
4
  import Grid from '@material-ui/core/Grid';
4
5
  import useMediaQuery from '@material-ui/core/useMediaQuery';
5
6
  import { useTheme } from '@material-ui/core/styles';
6
- import React from 'react';
7
7
  import { ImportInfoCard } from '../ImportInfoCard/ImportInfoCard.esm.js';
8
8
  import { ImportStepper } from '../ImportStepper/ImportStepper.esm.js';
9
9
  import '@material-ui/core/Box';
@@ -19,6 +19,7 @@ import '../EntityListComponent/EntityListComponent.esm.js';
19
19
  import 'lodash/partition';
20
20
  import '@backstage/catalog-model';
21
21
  import '@backstage/plugin-catalog-react';
22
+ import 'react';
22
23
  import 'react-hook-form';
23
24
  import '../../api/CatalogImportApi.esm.js';
24
25
  import 'yaml';
@@ -36,18 +37,27 @@ import '@material-ui/core/ListItem';
36
37
  import '@material-ui/core/ListItemIcon';
37
38
  import '@material-ui/core/ListItemText';
38
39
  import '@backstage/errors';
40
+ import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
41
+ import { catalogImportTranslationRef } from '../../translation.esm.js';
39
42
 
40
43
  const DefaultImportPage = () => {
44
+ const { t } = useTranslationRef(catalogImportTranslationRef);
41
45
  const theme = useTheme();
42
46
  const configApi = useApi(configApiRef);
43
47
  const isMobile = useMediaQuery(theme.breakpoints.down("sm"));
44
48
  const appTitle = configApi.getOptionalString("app.title") || "Backstage";
45
49
  const supportTitle = `Start tracking your component in ${appTitle} by adding it to the software catalog.`;
46
50
  const contentItems = [
47
- /* @__PURE__ */ React.createElement(Grid, { key: 0, item: true, xs: 12, md: 4, lg: 6, xl: 8 }, /* @__PURE__ */ React.createElement(ImportInfoCard, null)),
48
- /* @__PURE__ */ React.createElement(Grid, { key: 1, item: true, xs: 12, md: 8, lg: 6, xl: 4 }, /* @__PURE__ */ React.createElement(ImportStepper, null))
51
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, md: 4, lg: 6, xl: 8, children: /* @__PURE__ */ jsx(ImportInfoCard, {}) }, 0),
52
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, md: 8, lg: 6, xl: 4, children: /* @__PURE__ */ jsx(ImportStepper, {}) }, 1)
49
53
  ];
50
- return /* @__PURE__ */ React.createElement(Page, { themeId: "home" }, /* @__PURE__ */ React.createElement(Header, { title: "Register an existing component" }), /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(ContentHeader, { title: `Start tracking your component in ${appTitle}` }, /* @__PURE__ */ React.createElement(SupportButton, null, supportTitle)), /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 2 }, isMobile ? contentItems : contentItems.reverse())));
54
+ return /* @__PURE__ */ jsxs(Page, { themeId: "home", children: [
55
+ /* @__PURE__ */ jsx(Header, { title: t("pageTitle") }),
56
+ /* @__PURE__ */ jsxs(Content, { children: [
57
+ /* @__PURE__ */ jsx(ContentHeader, { title: `Start tracking your component in ${appTitle}`, children: /* @__PURE__ */ jsx(SupportButton, { children: supportTitle }) }),
58
+ /* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, children: isMobile ? contentItems : contentItems.reverse() })
59
+ ] })
60
+ ] });
51
61
  };
52
62
 
53
63
  export { DefaultImportPage };
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultImportPage.esm.js","sources":["../../../src/components/DefaultImportPage/DefaultImportPage.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 */\n\nimport {\n Content,\n ContentHeader,\n Header,\n Page,\n SupportButton,\n} from '@backstage/core-components';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\nimport Grid from '@material-ui/core/Grid';\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\nimport { useTheme } from '@material-ui/core/styles';\nimport React from 'react';\nimport { ImportInfoCard } from '../ImportInfoCard';\nimport { ImportStepper } from '../ImportStepper';\n\n/**\n * The default catalog import page.\n *\n * @public\n */\nexport const DefaultImportPage = () => {\n const theme = useTheme();\n const configApi = useApi(configApiRef);\n const isMobile = useMediaQuery(theme.breakpoints.down('sm'));\n const appTitle = configApi.getOptionalString('app.title') || 'Backstage';\n\n const supportTitle = `Start tracking your component in ${appTitle} by adding it to the software catalog.`;\n\n const contentItems = [\n <Grid key={0} item xs={12} md={4} lg={6} xl={8}>\n <ImportInfoCard />\n </Grid>,\n\n <Grid key={1} item xs={12} md={8} lg={6} xl={4}>\n <ImportStepper />\n </Grid>,\n ];\n\n return (\n <Page themeId=\"home\">\n <Header title=\"Register an existing component\" />\n <Content>\n <ContentHeader title={`Start tracking your component in ${appTitle}`}>\n <SupportButton>{supportTitle}</SupportButton>\n </ContentHeader>\n\n <Grid container spacing={2}>\n {isMobile ? contentItems : contentItems.reverse()}\n </Grid>\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCO,MAAM,oBAAoB,MAAM;AACrC,EAAA,MAAM,QAAQ,QAAS,EAAA;AACvB,EAAM,MAAA,SAAA,GAAY,OAAO,YAAY,CAAA;AACrC,EAAA,MAAM,WAAW,aAAc,CAAA,KAAA,CAAM,WAAY,CAAA,IAAA,CAAK,IAAI,CAAC,CAAA;AAC3D,EAAA,MAAM,QAAW,GAAA,SAAA,CAAU,iBAAkB,CAAA,WAAW,CAAK,IAAA,WAAA;AAE7D,EAAM,MAAA,YAAA,GAAe,oCAAoC,QAAQ,CAAA,sCAAA,CAAA;AAEjE,EAAA,MAAM,YAAe,GAAA;AAAA,wCAClB,IAAK,EAAA,EAAA,GAAA,EAAK,CAAG,EAAA,IAAA,EAAI,MAAC,EAAI,EAAA,EAAA,EAAI,EAAI,EAAA,CAAA,EAAG,IAAI,CAAG,EAAA,EAAA,EAAI,CAC3C,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,oBAAe,CAClB,CAAA;AAAA,wCAEC,IAAK,EAAA,EAAA,GAAA,EAAK,CAAG,EAAA,IAAA,EAAI,MAAC,EAAI,EAAA,EAAA,EAAI,EAAI,EAAA,CAAA,EAAG,IAAI,CAAG,EAAA,EAAA,EAAI,CAC3C,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,mBAAc,CACjB;AAAA,GACF;AAEA,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,OAAQ,EAAA,MAAA,EAAA,sCACX,MAAO,EAAA,EAAA,KAAA,EAAM,gCAAiC,EAAA,CAAA,sCAC9C,OACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,aAAc,EAAA,EAAA,KAAA,EAAO,oCAAoC,QAAQ,CAAA,CAAA,EAAA,kBAC/D,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAA,EAAe,YAAa,CAC/B,CAEA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,SAAS,EAAA,IAAA,EAAC,OAAS,EAAA,CAAA,EAAA,EACtB,WAAW,YAAe,GAAA,YAAA,CAAa,OAAQ,EAClD,CACF,CACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"DefaultImportPage.esm.js","sources":["../../../src/components/DefaultImportPage/DefaultImportPage.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 */\n\nimport {\n Content,\n ContentHeader,\n Header,\n Page,\n SupportButton,\n} from '@backstage/core-components';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\nimport Grid from '@material-ui/core/Grid';\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\nimport { useTheme } from '@material-ui/core/styles';\nimport { ImportInfoCard } from '../ImportInfoCard';\nimport { ImportStepper } from '../ImportStepper';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { catalogImportTranslationRef } from '../../translation';\n\n/**\n * The default catalog import page.\n *\n * @public\n */\nexport const DefaultImportPage = () => {\n const { t } = useTranslationRef(catalogImportTranslationRef);\n const theme = useTheme();\n const configApi = useApi(configApiRef);\n const isMobile = useMediaQuery(theme.breakpoints.down('sm'));\n const appTitle = configApi.getOptionalString('app.title') || 'Backstage';\n\n const supportTitle = `Start tracking your component in ${appTitle} by adding it to the software catalog.`;\n\n const contentItems = [\n <Grid key={0} item xs={12} md={4} lg={6} xl={8}>\n <ImportInfoCard />\n </Grid>,\n\n <Grid key={1} item xs={12} md={8} lg={6} xl={4}>\n <ImportStepper />\n </Grid>,\n ];\n\n return (\n <Page themeId=\"home\">\n <Header title={t('pageTitle')} />\n <Content>\n <ContentHeader title={`Start tracking your component in ${appTitle}`}>\n <SupportButton>{supportTitle}</SupportButton>\n </ContentHeader>\n\n <Grid container spacing={2}>\n {isMobile ? contentItems : contentItems.reverse()}\n </Grid>\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,MAAM,oBAAoB,MAAM;AACrC,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,2BAA2B,CAAA;AAC3D,EAAA,MAAM,QAAQ,QAAS,EAAA;AACvB,EAAM,MAAA,SAAA,GAAY,OAAO,YAAY,CAAA;AACrC,EAAA,MAAM,WAAW,aAAc,CAAA,KAAA,CAAM,WAAY,CAAA,IAAA,CAAK,IAAI,CAAC,CAAA;AAC3D,EAAA,MAAM,QAAW,GAAA,SAAA,CAAU,iBAAkB,CAAA,WAAW,CAAK,IAAA,WAAA;AAE7D,EAAM,MAAA,YAAA,GAAe,oCAAoC,QAAQ,CAAA,sCAAA,CAAA;AAEjE,EAAA,MAAM,YAAe,GAAA;AAAA,oBAClB,GAAA,CAAA,IAAA,EAAA,EAAa,IAAI,EAAA,IAAA,EAAC,IAAI,EAAI,EAAA,EAAA,EAAI,CAAG,EAAA,EAAA,EAAI,GAAG,EAAI,EAAA,CAAA,EAC3C,QAAC,kBAAA,GAAA,CAAA,cAAA,EAAA,EAAe,KADP,CAEX,CAAA;AAAA,oBAEC,GAAA,CAAA,IAAA,EAAA,EAAa,IAAI,EAAA,IAAA,EAAC,IAAI,EAAI,EAAA,EAAA,EAAI,CAAG,EAAA,EAAA,EAAI,GAAG,EAAI,EAAA,CAAA,EAC3C,QAAC,kBAAA,GAAA,CAAA,aAAA,EAAA,EAAc,KADN,CAEX;AAAA,GACF;AAEA,EACE,uBAAA,IAAA,CAAC,IAAK,EAAA,EAAA,OAAA,EAAQ,MACZ,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAO,EAAA,EAAA,KAAA,EAAO,CAAE,CAAA,WAAW,CAAG,EAAA,CAAA;AAAA,yBAC9B,OACC,EAAA,EAAA,QAAA,EAAA;AAAA,sBAAC,GAAA,CAAA,aAAA,EAAA,EAAc,OAAO,CAAoC,iCAAA,EAAA,QAAQ,IAChE,QAAC,kBAAA,GAAA,CAAA,aAAA,EAAA,EAAe,wBAAa,CAC/B,EAAA,CAAA;AAAA,sBAEA,GAAA,CAAC,IAAK,EAAA,EAAA,SAAA,EAAS,IAAC,EAAA,OAAA,EAAS,GACtB,QAAW,EAAA,QAAA,GAAA,YAAA,GAAe,YAAa,CAAA,OAAA,EAC1C,EAAA;AAAA,KACF,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -1,3 +1,4 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import { stringifyEntityRef } from '@backstage/catalog-model';
2
3
  import { useApi } from '@backstage/core-plugin-api';
3
4
  import { entityPresentationApiRef, EntityRefLink, EntityDisplayName } from '@backstage/plugin-catalog-react';
@@ -11,7 +12,7 @@ import ListItemText from '@material-ui/core/ListItemText';
11
12
  import { makeStyles } from '@material-ui/core/styles';
12
13
  import ExpandLessIcon from '@material-ui/icons/ExpandLess';
13
14
  import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
14
- import React, { useState } from 'react';
15
+ import { useState, Fragment } from 'react';
15
16
 
16
17
  const useStyles = makeStyles((theme) => ({
17
18
  nested: {
@@ -42,50 +43,58 @@ const EntityListComponent = (props) => {
42
43
  )
43
44
  );
44
45
  }
45
- return /* @__PURE__ */ React.createElement(List, null, firstListItem, locations.map((r) => /* @__PURE__ */ React.createElement(React.Fragment, { key: r.target }, /* @__PURE__ */ React.createElement(
46
- ListItem,
47
- {
48
- dense: true,
49
- button: Boolean(onItemClick),
50
- onClick: () => onItemClick?.(r.target)
51
- },
52
- /* @__PURE__ */ React.createElement(ListItemIcon, null, locationListItemIcon(r.target)),
53
- /* @__PURE__ */ React.createElement(
54
- ListItemText,
55
- {
56
- primary: r.target,
57
- secondary: `Entities: ${r.entities.length}`
58
- }
59
- ),
60
- collapsed && /* @__PURE__ */ React.createElement(ListItemSecondaryAction, null, /* @__PURE__ */ React.createElement(IconButton, { edge: "end", onClick: () => handleClick(r.target) }, expandedUrls.includes(r.target) ? /* @__PURE__ */ React.createElement(ExpandLessIcon, null) : /* @__PURE__ */ React.createElement(ExpandMoreIcon, null)))
61
- ), /* @__PURE__ */ React.createElement(
62
- Collapse,
63
- {
64
- in: !collapsed || expandedUrls.includes(r.target),
65
- timeout: "auto",
66
- unmountOnExit: true
67
- },
68
- /* @__PURE__ */ React.createElement(List, { component: "div", disablePadding: true, dense: true }, sortEntities(r.entities).map((entity) => {
69
- return /* @__PURE__ */ React.createElement(
46
+ return /* @__PURE__ */ jsxs(List, { children: [
47
+ firstListItem,
48
+ locations.map((r) => /* @__PURE__ */ jsxs(Fragment, { children: [
49
+ /* @__PURE__ */ jsxs(
70
50
  ListItem,
71
51
  {
72
- key: stringifyEntityRef(entity),
73
- className: classes.nested,
74
- ...withLinks ? {
75
- component: EntityRefLink,
76
- entityRef: entity,
77
- button: withLinks
78
- } : {}
79
- },
80
- /* @__PURE__ */ React.createElement(
81
- ListItemText,
82
- {
83
- primary: /* @__PURE__ */ React.createElement(EntityDisplayName, { entityRef: entity })
84
- }
85
- )
86
- );
87
- }))
88
- ))));
52
+ dense: true,
53
+ button: Boolean(onItemClick),
54
+ onClick: () => onItemClick?.(r.target),
55
+ children: [
56
+ /* @__PURE__ */ jsx(ListItemIcon, { children: locationListItemIcon(r.target) }),
57
+ /* @__PURE__ */ jsx(
58
+ ListItemText,
59
+ {
60
+ primary: r.target,
61
+ secondary: `Entities: ${r.entities.length}`
62
+ }
63
+ ),
64
+ collapsed && /* @__PURE__ */ jsx(ListItemSecondaryAction, { children: /* @__PURE__ */ jsx(IconButton, { edge: "end", onClick: () => handleClick(r.target), children: expandedUrls.includes(r.target) ? /* @__PURE__ */ jsx(ExpandLessIcon, {}) : /* @__PURE__ */ jsx(ExpandMoreIcon, {}) }) })
65
+ ]
66
+ }
67
+ ),
68
+ /* @__PURE__ */ jsx(
69
+ Collapse,
70
+ {
71
+ in: !collapsed || expandedUrls.includes(r.target),
72
+ timeout: "auto",
73
+ unmountOnExit: true,
74
+ children: /* @__PURE__ */ jsx(List, { component: "div", disablePadding: true, dense: true, children: sortEntities(r.entities).map((entity) => {
75
+ return /* @__PURE__ */ jsx(
76
+ ListItem,
77
+ {
78
+ className: classes.nested,
79
+ ...withLinks ? {
80
+ component: EntityRefLink,
81
+ entityRef: entity,
82
+ button: withLinks
83
+ } : {},
84
+ children: /* @__PURE__ */ jsx(
85
+ ListItemText,
86
+ {
87
+ primary: /* @__PURE__ */ jsx(EntityDisplayName, { entityRef: entity })
88
+ }
89
+ )
90
+ },
91
+ stringifyEntityRef(entity)
92
+ );
93
+ }) })
94
+ }
95
+ )
96
+ ] }, r.target))
97
+ ] });
89
98
  };
90
99
 
91
100
  export { EntityListComponent };
@@ -1 +1 @@
1
- {"version":3,"file":"EntityListComponent.esm.js","sources":["../../../src/components/EntityListComponent/EntityListComponent.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 */\n\nimport {\n Entity,\n CompoundEntityRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { useApi } from '@backstage/core-plugin-api';\nimport {\n EntityDisplayName,\n EntityRefLink,\n entityPresentationApiRef,\n} from '@backstage/plugin-catalog-react';\nimport Collapse from '@material-ui/core/Collapse';\nimport IconButton from '@material-ui/core/IconButton';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { makeStyles } from '@material-ui/core/styles';\nimport ExpandLessIcon from '@material-ui/icons/ExpandLess';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport React, { useState } from 'react';\n\nconst useStyles = makeStyles(theme => ({\n nested: {\n paddingLeft: theme.spacing(4),\n },\n}));\n\n/**\n * Props for {@link EntityListComponent}.\n *\n * @public\n */\nexport interface EntityListComponentProps {\n locations: Array<{\n target: string;\n entities: (Entity | CompoundEntityRef)[];\n }>;\n locationListItemIcon: (target: string) => React.ReactElement;\n collapsed?: boolean;\n firstListItem?: React.ReactElement;\n onItemClick?: (target: string) => void;\n withLinks?: boolean;\n}\n\n/**\n * Shows a result list of entities.\n *\n * @public\n */\nexport const EntityListComponent = (props: EntityListComponentProps) => {\n const {\n locations,\n collapsed = false,\n locationListItemIcon,\n onItemClick,\n firstListItem,\n withLinks = false,\n } = props;\n\n const classes = useStyles();\n const entityPresentationApi = useApi(entityPresentationApiRef);\n const [expandedUrls, setExpandedUrls] = useState<string[]>([]);\n\n const handleClick = (url: string) => {\n setExpandedUrls(urls =>\n urls.includes(url) ? urls.filter(u => u !== url) : urls.concat(url),\n );\n };\n\n function sortEntities(entities: Array<CompoundEntityRef | Entity>) {\n return entities.sort((a, b) =>\n entityPresentationApi\n .forEntity(stringifyEntityRef(a))\n .snapshot.entityRef.localeCompare(\n entityPresentationApi.forEntity(stringifyEntityRef(b)).snapshot\n .entityRef,\n ),\n );\n }\n\n return (\n <List>\n {firstListItem}\n {locations.map(r => (\n <React.Fragment key={r.target}>\n <ListItem\n dense\n button={Boolean(onItemClick) as any}\n onClick={() => onItemClick?.(r.target)}\n >\n <ListItemIcon>{locationListItemIcon(r.target)}</ListItemIcon>\n\n <ListItemText\n primary={r.target}\n secondary={`Entities: ${r.entities.length}`}\n />\n\n {collapsed && (\n <ListItemSecondaryAction>\n <IconButton edge=\"end\" onClick={() => handleClick(r.target)}>\n {expandedUrls.includes(r.target) ? (\n <ExpandLessIcon />\n ) : (\n <ExpandMoreIcon />\n )}\n </IconButton>\n </ListItemSecondaryAction>\n )}\n </ListItem>\n\n <Collapse\n in={!collapsed || expandedUrls.includes(r.target)}\n timeout=\"auto\"\n unmountOnExit\n >\n <List component=\"div\" disablePadding dense>\n {sortEntities(r.entities).map(entity => {\n return (\n <ListItem\n key={stringifyEntityRef(entity)}\n className={classes.nested}\n {...(withLinks\n ? {\n component: EntityRefLink,\n entityRef: entity,\n button: withLinks as any,\n }\n : {})}\n >\n <ListItemText\n primary={<EntityDisplayName entityRef={entity} />}\n />\n </ListItem>\n );\n })}\n </List>\n </Collapse>\n </React.Fragment>\n ))}\n </List>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAuCA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,MAAQ,EAAA;AAAA,IACN,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,IAAI,CAAU,MAAA,KAAA;AACtC,MACE,uBAAA,KAAA,CAAA,aAAA;AAAA,QAAC,QAAA;AAAA,QAAA;AAAA,UACC,GAAA,EAAK,mBAAmB,MAAM,CAAA;AAAA,UAC9B,WAAW,OAAQ,CAAA,MAAA;AAAA,UAClB,GAAI,SACD,GAAA;AAAA,YACE,SAAW,EAAA,aAAA;AAAA,YACX,SAAW,EAAA,MAAA;AAAA,YACX,MAAQ,EAAA;AAAA,cAEV;AAAC,SAAA;AAAA,wBAEL,KAAA,CAAA,aAAA;AAAA,UAAC,YAAA;AAAA,UAAA;AAAA,YACC,OAAS,kBAAA,KAAA,CAAA,aAAA,CAAC,iBAAkB,EAAA,EAAA,SAAA,EAAW,MAAQ,EAAA;AAAA;AAAA;AACjD,OACF;AAAA,KAEH,CACH;AAAA,GAEJ,CACD,CACH,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityListComponent.esm.js","sources":["../../../src/components/EntityListComponent/EntityListComponent.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 */\n\nimport {\n Entity,\n CompoundEntityRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { useApi } from '@backstage/core-plugin-api';\nimport {\n EntityDisplayName,\n EntityRefLink,\n entityPresentationApiRef,\n} from '@backstage/plugin-catalog-react';\nimport Collapse from '@material-ui/core/Collapse';\nimport IconButton from '@material-ui/core/IconButton';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { makeStyles } from '@material-ui/core/styles';\nimport ExpandLessIcon from '@material-ui/icons/ExpandLess';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport { ReactElement, Fragment, useState } from 'react';\n\nconst useStyles = makeStyles(theme => ({\n nested: {\n paddingLeft: theme.spacing(4),\n },\n}));\n\n/**\n * Props for {@link EntityListComponent}.\n *\n * @public\n */\nexport interface EntityListComponentProps {\n locations: Array<{\n target: string;\n entities: (Entity | CompoundEntityRef)[];\n }>;\n locationListItemIcon: (target: string) => ReactElement;\n collapsed?: boolean;\n firstListItem?: ReactElement;\n onItemClick?: (target: string) => void;\n withLinks?: boolean;\n}\n\n/**\n * Shows a result list of entities.\n *\n * @public\n */\nexport const EntityListComponent = (props: EntityListComponentProps) => {\n const {\n locations,\n collapsed = false,\n locationListItemIcon,\n onItemClick,\n firstListItem,\n withLinks = false,\n } = props;\n\n const classes = useStyles();\n const entityPresentationApi = useApi(entityPresentationApiRef);\n const [expandedUrls, setExpandedUrls] = useState<string[]>([]);\n\n const handleClick = (url: string) => {\n setExpandedUrls(urls =>\n urls.includes(url) ? urls.filter(u => u !== url) : urls.concat(url),\n );\n };\n\n function sortEntities(entities: Array<CompoundEntityRef | Entity>) {\n return entities.sort((a, b) =>\n entityPresentationApi\n .forEntity(stringifyEntityRef(a))\n .snapshot.entityRef.localeCompare(\n entityPresentationApi.forEntity(stringifyEntityRef(b)).snapshot\n .entityRef,\n ),\n );\n }\n\n return (\n <List>\n {firstListItem}\n {locations.map(r => (\n <Fragment key={r.target}>\n <ListItem\n dense\n button={Boolean(onItemClick) as any}\n onClick={() => onItemClick?.(r.target)}\n >\n <ListItemIcon>{locationListItemIcon(r.target)}</ListItemIcon>\n\n <ListItemText\n primary={r.target}\n secondary={`Entities: ${r.entities.length}`}\n />\n\n {collapsed && (\n <ListItemSecondaryAction>\n <IconButton edge=\"end\" onClick={() => handleClick(r.target)}>\n {expandedUrls.includes(r.target) ? (\n <ExpandLessIcon />\n ) : (\n <ExpandMoreIcon />\n )}\n </IconButton>\n </ListItemSecondaryAction>\n )}\n </ListItem>\n\n <Collapse\n in={!collapsed || expandedUrls.includes(r.target)}\n timeout=\"auto\"\n unmountOnExit\n >\n <List component=\"div\" disablePadding dense>\n {sortEntities(r.entities).map(entity => {\n return (\n <ListItem\n key={stringifyEntityRef(entity)}\n className={classes.nested}\n {...(withLinks\n ? {\n component: EntityRefLink,\n entityRef: entity,\n button: withLinks as any,\n }\n : {})}\n >\n <ListItemText\n primary={<EntityDisplayName entityRef={entity} />}\n />\n </ListItem>\n );\n })}\n </List>\n </Collapse>\n </Fragment>\n ))}\n </List>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAuCA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,MAAQ,EAAA;AAAA,IACN,WAAA,EAAa,KAAM,CAAA,OAAA,CAAQ,CAAC;AAAA;AAEhC,CAAE,CAAA,CAAA;AAwBW,MAAA,mBAAA,GAAsB,CAAC,KAAoC,KAAA;AACtE,EAAM,MAAA;AAAA,IACJ,SAAA;AAAA,IACA,SAAY,GAAA,KAAA;AAAA,IACZ,oBAAA;AAAA,IACA,WAAA;AAAA,IACA,aAAA;AAAA,IACA,SAAY,GAAA;AAAA,GACV,GAAA,KAAA;AAEJ,EAAA,MAAM,UAAU,SAAU,EAAA;AAC1B,EAAM,MAAA,qBAAA,GAAwB,OAAO,wBAAwB,CAAA;AAC7D,EAAA,MAAM,CAAC,YAAc,EAAA,eAAe,CAAI,GAAA,QAAA,CAAmB,EAAE,CAAA;AAE7D,EAAM,MAAA,WAAA,GAAc,CAAC,GAAgB,KAAA;AACnC,IAAA,eAAA;AAAA,MAAgB,CACd,IAAA,KAAA,IAAA,CAAK,QAAS,CAAA,GAAG,CAAI,GAAA,IAAA,CAAK,MAAO,CAAA,CAAA,CAAA,KAAK,CAAM,KAAA,G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S,CAAE,CAAA,MAAM,CAC7B,mBAAA,GAAA,CAAC,kBAAe,CAEhB,mBAAA,GAAA,CAAC,cAAe,EAAA,EAAA,CAAA,EAEpB,CACF,EAAA;AAAA;AAAA;AAAA,OAEJ;AAAA,sBAEA,GAAA;AAAA,QAAC,QAAA;AAAA,QAAA;AAAA,UACC,IAAI,CAAC,SAAA,IAAa,YAAa,CAAA,QAAA,CAAS,EAAE,MAAM,CAAA;AAAA,UAChD,OAAQ,EAAA,MAAA;AAAA,UACR,aAAa,EAAA,IAAA;AAAA,UAEb,QAAC,kBAAA,GAAA,CAAA,IAAA,EAAA,EAAK,SAAU,EAAA,KAAA,EAAM,cAAc,EAAA,IAAA,EAAC,KAAK,EAAA,IAAA,EACvC,QAAa,EAAA,YAAA,CAAA,CAAA,CAAE,QAAQ,CAAA,CAAE,IAAI,CAAU,MAAA,KAAA;AACtC,YACE,uBAAA,GAAA;AAAA,cAAC,QAAA;AAAA,cAAA;AAAA,gBAEC,WAAW,OAAQ,CAAA,MAAA;AAAA,gBAClB,GAAI,SACD,GAAA;AAAA,kBACE,SAAW,EAAA,aAAA;AAAA,kBACX,SAAW,EAAA,MAAA;AAAA,kBACX,MAAQ,EAAA;AAAA,oBAEV,EAAC;AAAA,gBAEL,QAAA,kBAAA,GAAA;AAAA,kBAAC,YAAA;AAAA,kBAAA;AAAA,oBACC,OAAS,kBAAA,GAAA,CAAC,iBAAkB,EAAA,EAAA,SAAA,EAAW,MAAQ,EAAA;AAAA;AAAA;AACjD,eAAA;AAAA,cAZK,mBAAmB,MAAM;AAAA,aAahC;AAAA,WAEH,CACH,EAAA;AAAA;AAAA;AACF,KApDa,EAAA,EAAA,CAAA,CAAE,MAqDjB,CACD;AAAA,GACH,EAAA,CAAA;AAEJ;;;;"}
@@ -1,40 +1,81 @@
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
1
2
  import { InfoCard } from '@backstage/core-components';
2
3
  import { useApi, configApiRef } from '@backstage/core-plugin-api';
3
4
  import Chip from '@material-ui/core/Chip';
4
5
  import Typography from '@material-ui/core/Typography';
5
- import React from 'react';
6
6
  import { catalogImportApiRef } from '../../api/CatalogImportApi.esm.js';
7
7
  import 'yaml';
8
8
  import 'git-url-parse';
9
9
  import '@octokit/rest';
10
10
  import 'js-base64';
11
11
  import { useCatalogFilename } from '../../hooks/useCatalogFilename.esm.js';
12
+ import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
13
+ import { catalogImportTranslationRef } from '../../translation.esm.js';
12
14
 
13
15
  const ImportInfoCard = (props) => {
14
16
  const {
15
17
  exampleLocationUrl = "https://github.com/backstage/backstage/blob/master/catalog-info.yaml",
16
18
  exampleRepositoryUrl = "https://github.com/backstage/backstage"
17
19
  } = props;
20
+ const { t } = useTranslationRef(catalogImportTranslationRef);
18
21
  const configApi = useApi(configApiRef);
19
22
  const appTitle = configApi.getOptionalString("app.title") || "Backstage";
20
23
  const catalogImportApi = useApi(catalogImportApiRef);
21
24
  const hasGithubIntegration = configApi.has("integrations.github");
22
25
  const catalogFilename = useCatalogFilename();
23
- return /* @__PURE__ */ React.createElement(
26
+ return /* @__PURE__ */ jsxs(
24
27
  InfoCard,
25
28
  {
26
- title: "Register an existing component",
29
+ title: t("importInfoCard.title"),
27
30
  titleTypographyProps: { component: "h3" },
28
31
  deepLink: {
29
32
  title: "Learn more about the Software Catalog",
30
33
  link: "https://backstage.io/docs/features/software-catalog/"
31
- }
32
- },
33
- /* @__PURE__ */ React.createElement(Typography, { variant: "body2", paragraph: true }, "Enter the URL to your source code repository to add it to ", appTitle, "."),
34
- /* @__PURE__ */ React.createElement(Typography, { component: "h4", variant: "h6" }, "Link to an existing entity file"),
35
- /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2", color: "textSecondary", paragraph: true }, "Example: ", /* @__PURE__ */ React.createElement("code", null, exampleLocationUrl)),
36
- /* @__PURE__ */ React.createElement(Typography, { variant: "body2", paragraph: true }, "The wizard analyzes the file, previews the entities, and adds them to the ", appTitle, " catalog."),
37
- hasGithubIntegration && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Typography, { component: "h4", variant: "h6" }, "Link to a repository", " ", /* @__PURE__ */ React.createElement(Chip, { label: "GitHub only", variant: "outlined", size: "small" })), /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2", color: "textSecondary", paragraph: true }, "Example: ", /* @__PURE__ */ React.createElement("code", null, exampleRepositoryUrl)), /* @__PURE__ */ React.createElement(Typography, { variant: "body2", paragraph: true }, "The wizard discovers all ", /* @__PURE__ */ React.createElement("code", null, catalogFilename), " files in the repository, previews the entities, and adds them to the ", appTitle, " ", "catalog."), catalogImportApi.preparePullRequest && /* @__PURE__ */ React.createElement(Typography, { variant: "body2", paragraph: true }, "If no entities are found, the wizard will prepare a Pull Request that adds an example ", /* @__PURE__ */ React.createElement("code", null, catalogFilename), " and prepares the ", appTitle, " catalog to load all entities as soon as the Pull Request is merged."))
34
+ },
35
+ children: [
36
+ /* @__PURE__ */ jsxs(Typography, { variant: "body2", paragraph: true, children: [
37
+ "Enter the URL to your source code repository to add it to ",
38
+ appTitle,
39
+ "."
40
+ ] }),
41
+ /* @__PURE__ */ jsx(Typography, { component: "h4", variant: "h6", children: "Link to an existing entity file" }),
42
+ /* @__PURE__ */ jsxs(Typography, { variant: "subtitle2", color: "textSecondary", paragraph: true, children: [
43
+ "Example: ",
44
+ /* @__PURE__ */ jsx("code", { children: exampleLocationUrl })
45
+ ] }),
46
+ /* @__PURE__ */ jsxs(Typography, { variant: "body2", paragraph: true, children: [
47
+ "The wizard analyzes the file, previews the entities, and adds them to the ",
48
+ appTitle,
49
+ " catalog."
50
+ ] }),
51
+ hasGithubIntegration && /* @__PURE__ */ jsxs(Fragment, { children: [
52
+ /* @__PURE__ */ jsxs(Typography, { component: "h4", variant: "h6", children: [
53
+ "Link to a repository",
54
+ " ",
55
+ /* @__PURE__ */ jsx(Chip, { label: "GitHub only", variant: "outlined", size: "small" })
56
+ ] }),
57
+ /* @__PURE__ */ jsxs(Typography, { variant: "subtitle2", color: "textSecondary", paragraph: true, children: [
58
+ "Example: ",
59
+ /* @__PURE__ */ jsx("code", { children: exampleRepositoryUrl })
60
+ ] }),
61
+ /* @__PURE__ */ jsxs(Typography, { variant: "body2", paragraph: true, children: [
62
+ "The wizard discovers all ",
63
+ /* @__PURE__ */ jsx("code", { children: catalogFilename }),
64
+ " files in the repository, previews the entities, and adds them to the ",
65
+ appTitle,
66
+ " ",
67
+ "catalog."
68
+ ] }),
69
+ catalogImportApi.preparePullRequest && /* @__PURE__ */ jsxs(Typography, { variant: "body2", paragraph: true, children: [
70
+ "If no entities are found, the wizard will prepare a Pull Request that adds an example ",
71
+ /* @__PURE__ */ jsx("code", { children: catalogFilename }),
72
+ " and prepares the ",
73
+ appTitle,
74
+ " catalog to load all entities as soon as the Pull Request is merged."
75
+ ] })
76
+ ] })
77
+ ]
78
+ }
38
79
  );
39
80
  };
40
81
 
@@ -1 +1 @@
1
- {"version":3,"file":"ImportInfoCard.esm.js","sources":["../../../src/components/ImportInfoCard/ImportInfoCard.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 */\n\nimport { InfoCard } from '@backstage/core-components';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\nimport Chip from '@material-ui/core/Chip';\nimport Typography from '@material-ui/core/Typography';\nimport React from 'react';\nimport { catalogImportApiRef } from '../../api';\nimport { useCatalogFilename } from '../../hooks';\n\n/**\n * Props for {@link ImportInfoCard}.\n *\n * @public\n */\nexport interface ImportInfoCardProps {\n exampleLocationUrl?: string;\n exampleRepositoryUrl?: string;\n}\n\n/**\n * Shows information about the import process.\n *\n * @public\n */\nexport const ImportInfoCard = (props: ImportInfoCardProps) => {\n const {\n exampleLocationUrl = 'https://github.com/backstage/backstage/blob/master/catalog-info.yaml',\n exampleRepositoryUrl = 'https://github.com/backstage/backstage',\n } = props;\n\n const configApi = useApi(configApiRef);\n const appTitle = configApi.getOptionalString('app.title') || 'Backstage';\n const catalogImportApi = useApi(catalogImportApiRef);\n\n const hasGithubIntegration = configApi.has('integrations.github');\n\n const catalogFilename = useCatalogFilename();\n\n return (\n <InfoCard\n title=\"Register an existing component\"\n titleTypographyProps={{ component: 'h3' }}\n deepLink={{\n title: 'Learn more about the Software Catalog',\n link: 'https://backstage.io/docs/features/software-catalog/',\n }}\n >\n <Typography variant=\"body2\" paragraph>\n Enter the URL to your source code repository to add it to {appTitle}.\n </Typography>\n <Typography component=\"h4\" variant=\"h6\">\n Link to an existing entity file\n </Typography>\n <Typography variant=\"subtitle2\" color=\"textSecondary\" paragraph>\n Example: <code>{exampleLocationUrl}</code>\n </Typography>\n <Typography variant=\"body2\" paragraph>\n The wizard analyzes the file, previews the entities, and adds them to\n the {appTitle} catalog.\n </Typography>\n {hasGithubIntegration && (\n <>\n <Typography component=\"h4\" variant=\"h6\">\n Link to a repository{' '}\n <Chip label=\"GitHub only\" variant=\"outlined\" size=\"small\" />\n </Typography>\n <Typography variant=\"subtitle2\" color=\"textSecondary\" paragraph>\n Example: <code>{exampleRepositoryUrl}</code>\n </Typography>\n <Typography variant=\"body2\" paragraph>\n The wizard discovers all <code>{catalogFilename}</code> files in the\n repository, previews the entities, and adds them to the {appTitle}{' '}\n catalog.\n </Typography>\n {catalogImportApi.preparePullRequest && (\n <Typography variant=\"body2\" paragraph>\n If no entities are found, the wizard will prepare a Pull Request\n that adds an example <code>{catalogFilename}</code> and prepares\n the {appTitle} catalog to load all entities as soon as the Pull\n Request is merged.\n </Typography>\n )}\n </>\n )}\n </InfoCard>\n );\n};\n"],"names":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EAAA,4EAAA,EAE/B,UAAS,WAChB,CAAA;AAAA,IACC,oBACC,oBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,kBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,SAAU,EAAA,IAAA,EAAK,OAAQ,EAAA,IAAA,EAAA,EAAK,sBACjB,EAAA,GAAA,kBACpB,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,OAAM,aAAc,EAAA,OAAA,EAAQ,UAAW,EAAA,IAAA,EAAK,OAAQ,EAAA,CAC5D,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAW,OAAQ,EAAA,WAAA,EAAY,KAAM,EAAA,eAAA,EAAgB,SAAS,EAAA,IAAA,EAAA,EAAC,WACrD,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAM,oBAAqB,CACvC,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,OAAQ,EAAA,SAAA,EAAS,IAAC,EAAA,EAAA,2BAAA,kBACV,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,IAAA,EAAM,eAAgB,CAAA,EAAO,wEACE,EAAA,QAAA,EAAU,KAAI,UAEzE,CAAA,EACC,gBAAiB,CAAA,kBAAA,oBACf,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,OAAA,EAAQ,WAAS,IAAC,EAAA,EAAA,wFAAA,kBAEd,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,IAAA,EAAM,eAAgB,CAAA,EAAO,oBAC9C,EAAA,QAAA,EAAS,sEAEhB,CAEJ;AAAA,GAEJ;AAEJ;;;;"}
1
+ {"version":3,"file":"ImportInfoCard.esm.js","sources":["../../../src/components/ImportInfoCard/ImportInfoCard.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 */\n\nimport { InfoCard } from '@backstage/core-components';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\nimport Chip from '@material-ui/core/Chip';\nimport Typography from '@material-ui/core/Typography';\nimport { catalogImportApiRef } from '../../api';\nimport { useCatalogFilename } from '../../hooks';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { catalogImportTranslationRef } from '../../translation';\n\n/**\n * Props for {@link ImportInfoCard}.\n *\n * @public\n */\nexport interface ImportInfoCardProps {\n exampleLocationUrl?: string;\n exampleRepositoryUrl?: string;\n}\n\n/**\n * Shows information about the import process.\n *\n * @public\n */\nexport const ImportInfoCard = (props: ImportInfoCardProps) => {\n const {\n exampleLocationUrl = 'https://github.com/backstage/backstage/blob/master/catalog-info.yaml',\n exampleRepositoryUrl = 'https://github.com/backstage/backstage',\n } = props;\n\n const { t } = useTranslationRef(catalogImportTranslationRef);\n const configApi = useApi(configApiRef);\n const appTitle = configApi.getOptionalString('app.title') || 'Backstage';\n const catalogImportApi = useApi(catalogImportApiRef);\n\n const hasGithubIntegration = configApi.has('integrations.github');\n\n const catalogFilename = useCatalogFilename();\n\n return (\n <InfoCard\n title={t('importInfoCard.title')}\n titleTypographyProps={{ component: 'h3' }}\n deepLink={{\n title: 'Learn more about the Software Catalog',\n link: 'https://backstage.io/docs/features/software-catalog/',\n }}\n >\n <Typography variant=\"body2\" paragraph>\n Enter the URL to your source code repository to add it to {appTitle}.\n </Typography>\n <Typography component=\"h4\" variant=\"h6\">\n Link to an existing entity file\n </Typography>\n <Typography variant=\"subtitle2\" color=\"textSecondary\" paragraph>\n Example: <code>{exampleLocationUrl}</code>\n </Typography>\n <Typography variant=\"body2\" paragraph>\n The wizard analyzes the file, previews the entities, and adds them to\n the {appTitle} catalog.\n </Typography>\n {hasGithubIntegration && (\n <>\n <Typography component=\"h4\" variant=\"h6\">\n Link to a repository{' '}\n <Chip label=\"GitHub only\" variant=\"outlined\" size=\"small\" />\n </Typography>\n <Typography variant=\"subtitle2\" color=\"textSecondary\" paragraph>\n Example: <code>{exampleRepositoryUrl}</code>\n </Typography>\n <Typography variant=\"body2\" paragraph>\n The wizard discovers all <code>{catalogFilename}</code> files in the\n repository, previews the entities, and adds them to the {appTitle}{' '}\n catalog.\n </Typography>\n {catalogImportApi.preparePullRequest && (\n <Typography variant=\"body2\" paragraph>\n If no entities are found, the wizard will prepare a Pull Request\n that adds an example <code>{catalogFilename}</code> and prepares\n the {appTitle} catalog to load all entities as soon as the Pull\n Request is merged.\n </Typography>\n )}\n </>\n )}\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAwCa,MAAA,cAAA,GAAiB,CAAC,KAA+B,KAAA;AAC5D,EAAM,MAAA;AAAA,IACJ,kBAAqB,GAAA,sEAAA;AAAA,IACrB,oBAAuB,GAAA;AAAA,GACrB,GAAA,KAAA;AAEJ,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,2BAA2B,CAAA;AAC3D,EAAM,MAAA,SAAA,GAAY,OAAO,YAAY,CAAA;AACrC,EAAA,MAAM,QAAW,GAAA,SAAA,CAAU,iBAAkB,CAAA,WAAW,CAAK,IAAA,WAAA;AAC7D,EAAM,MAAA,gBAAA,GAAmB,OAAO,mBAAmB,CAAA;AAEnD,EAAM,MAAA,oBAAA,GAAuB,SAAU,CAAA,GAAA,CAAI,qBAAqB,CAAA;AAEhE,EAAA,MAAM,kBAAkB,kBAAmB,EAAA;AAE3C,EACE,uBAAA,IAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,EAAE,sBAAsB,CAAA;AAAA,MAC/B,oBAAA,EAAsB,EAAE,SAAA,EAA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AAAA,4BACrD,GAAA,CAAC,UAAM,QAAqB,EAAA,oBAAA,EAAA;AAAA,WACvC,EAAA,CAAA;AAAA,0BACC,IAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,OAAA,EAAQ,WAAS,IAAC,EAAA,QAAA,EAAA;AAAA,YAAA,2BAAA;AAAA,4BACX,GAAA,CAAC,UAAM,QAAgB,EAAA,eAAA,EAAA,CAAA;AAAA,YAAO,wEAAA;AAAA,YACE,QAAA;AAAA,YAAU,GAAA;AAAA,YAAI;AAAA,WAEzE,EAAA,CAAA;AAAA,UACC,iBAAiB,kBAChB,oBAAA,IAAA,CAAC,cAAW,OAAQ,EAAA,OAAA,EAAQ,WAAS,IAAC,EAAA,QAAA,EAAA;AAAA,YAAA,wFAAA;AAAA,4BAEf,GAAA,CAAC,UAAM,QAAgB,EAAA,eAAA,EAAA,CAAA;AAAA,YAAO,oBAAA;AAAA,YAC9C,QAAA;AAAA,YAAS;AAAA,WAEhB,EAAA;AAAA,SAEJ,EAAA;AAAA;AAAA;AAAA,GAEJ;AAEJ;;;;"}
@@ -1,10 +1,10 @@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { useOutlet } from 'react-router-dom';
3
3
  import { DefaultImportPage } from '../DefaultImportPage/DefaultImportPage.esm.js';
4
4
 
5
5
  const ImportPage = () => {
6
6
  const outlet = useOutlet();
7
- return outlet || /* @__PURE__ */ React.createElement(DefaultImportPage, null);
7
+ return outlet || /* @__PURE__ */ jsx(DefaultImportPage, {});
8
8
  };
9
9
 
10
10
  export { ImportPage };