@backstage-community/plugin-tech-insights-react 1.1.1 → 1.2.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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # @backstage-community/plugin-tech-insights-react
2
2
 
3
+ ## 1.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [ba5bf7b]
8
+ - @backstage-community/plugin-tech-insights-common@0.7.1
9
+
10
+ ## 1.2.0
11
+
12
+ ### Minor Changes
13
+
14
+ - a01ae4e: Backstage version bump to v1.39.0
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [d6411fe]
19
+ - Updated dependencies [a01ae4e]
20
+ - @backstage-community/plugin-tech-insights-common@0.7.0
21
+
3
22
  ## 1.1.1
4
23
 
5
24
  ### Patch Changes
@@ -1,9 +1,9 @@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import CheckCircleOutline from '@material-ui/icons/CheckCircleOutline';
3
3
  import ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';
4
4
 
5
5
  const BooleanCheck = (props) => {
6
- return !!props.checkResult.result ? /* @__PURE__ */ React.createElement(CheckCircleOutline, { color: "primary" }) : /* @__PURE__ */ React.createElement(ErrorOutlineIcon, { color: "error" });
6
+ return !!props.checkResult.result ? /* @__PURE__ */ jsx(CheckCircleOutline, { color: "primary" }) : /* @__PURE__ */ jsx(ErrorOutlineIcon, { color: "error" });
7
7
  };
8
8
  const isBooleanCheckFailed = (checkResult) => !checkResult.result;
9
9
 
@@ -1 +1 @@
1
- {"version":3,"file":"BooleanCheck.esm.js","sources":["../../../src/components/BooleanCheck/BooleanCheck.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 React from 'react';\nimport CheckCircleOutline from '@material-ui/icons/CheckCircleOutline';\nimport ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';\nimport { CheckResult } from '@backstage-community/plugin-tech-insights-common';\n\n/**\n * A component that renders a boolean check result as either a success or failure icon.\n *\n * @public\n */\nexport const BooleanCheck = (props: { checkResult: CheckResult }) => {\n return !!props.checkResult.result ? (\n <CheckCircleOutline color=\"primary\" />\n ) : (\n <ErrorOutlineIcon color=\"error\" />\n );\n};\n\n/**\n * Helper function to determine if a boolean check result represents a failure.\n *\n * @returns true if the check result represents a failure (result is false), false otherwise\n *\n * @public\n */\nexport const isBooleanCheckFailed = (checkResult: CheckResult) =>\n !checkResult.result;\n"],"names":[],"mappings":";;;;AAyBa,MAAA,YAAA,GAAe,CAAC,KAAwC,KAAA;AACnE,EAAA,OAAO,CAAC,CAAC,KAAM,CAAA,WAAA,CAAY,MACzB,mBAAA,KAAA,CAAA,aAAA,CAAC,kBAAmB,EAAA,EAAA,KAAA,EAAM,SAAU,EAAA,CAAA,mBAEnC,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA,EAAiB,OAAM,OAAQ,EAAA,CAAA;AAEpC;AASO,MAAM,oBAAuB,GAAA,CAAC,WACnC,KAAA,CAAC,WAAY,CAAA;;;;"}
1
+ {"version":3,"file":"BooleanCheck.esm.js","sources":["../../../src/components/BooleanCheck/BooleanCheck.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 CheckCircleOutline from '@material-ui/icons/CheckCircleOutline';\nimport ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';\nimport { CheckResult } from '@backstage-community/plugin-tech-insights-common';\n\n/**\n * A component that renders a boolean check result as either a success or failure icon.\n *\n * @public\n */\nexport const BooleanCheck = (props: { checkResult: CheckResult }) => {\n return !!props.checkResult.result ? (\n <CheckCircleOutline color=\"primary\" />\n ) : (\n <ErrorOutlineIcon color=\"error\" />\n );\n};\n\n/**\n * Helper function to determine if a boolean check result represents a failure.\n *\n * @returns true if the check result represents a failure (result is false), false otherwise\n *\n * @public\n */\nexport const isBooleanCheckFailed = (checkResult: CheckResult) =>\n !checkResult.result;\n"],"names":[],"mappings":";;;;AAwBa,MAAA,YAAA,GAAe,CAAC,KAAwC,KAAA;AACnE,EAAA,OAAO,CAAC,CAAC,KAAM,CAAA,WAAA,CAAY,MACzB,mBAAA,GAAA,CAAC,kBAAmB,EAAA,EAAA,KAAA,EAAM,SAAU,EAAA,CAAA,mBAEnC,GAAA,CAAA,gBAAA,EAAA,EAAiB,OAAM,OAAQ,EAAA,CAAA;AAEpC;AASO,MAAM,oBAAuB,GAAA,CAAC,WACnC,KAAA,CAAC,WAAY,CAAA;;;;"}
@@ -1,9 +1,9 @@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { BooleanCheck, isBooleanCheckFailed } from './BooleanCheck/BooleanCheck.esm.js';
3
3
 
4
4
  const jsonRulesEngineCheckResultRenderer = {
5
5
  type: "json-rules-engine",
6
- component: (checkResult) => /* @__PURE__ */ React.createElement(BooleanCheck, { checkResult }),
6
+ component: (checkResult) => /* @__PURE__ */ jsx(BooleanCheck, { checkResult }),
7
7
  isFailed: isBooleanCheckFailed
8
8
  };
9
9
 
@@ -1 +1 @@
1
- {"version":3,"file":"CheckResultRenderer.esm.js","sources":["../../src/components/CheckResultRenderer.tsx"],"sourcesContent":["/*\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 */\n\nimport React from 'react';\nimport { CheckResult } from '@backstage-community/plugin-tech-insights-common';\nimport { BooleanCheck, isBooleanCheckFailed } from './BooleanCheck';\n\n/**\n * Defines a react component that is responsible for rendering a result of a given type.\n *\n * @public\n */\nexport type CheckResultRenderer = {\n type: string;\n component: (check: CheckResult) => React.ReactElement;\n description?: (check: CheckResult) => string | React.ReactElement;\n isFailed?: (check: CheckResult) => boolean;\n};\n\n/**\n * Default renderer for json-rules-engine check results.\n *\n * @public\n */\nexport const jsonRulesEngineCheckResultRenderer: CheckResultRenderer = {\n type: 'json-rules-engine',\n component: (checkResult: CheckResult) => (\n <BooleanCheck checkResult={checkResult} />\n ),\n isFailed: isBooleanCheckFailed,\n};\n"],"names":[],"mappings":";;;AAqCO,MAAM,kCAA0D,GAAA;AAAA,EACrE,IAAM,EAAA,mBAAA;AAAA,EACN,SAAW,EAAA,CAAC,WACV,qBAAA,KAAA,CAAA,aAAA,CAAC,gBAAa,WAA0B,EAAA,CAAA;AAAA,EAE1C,QAAU,EAAA;AACZ;;;;"}
1
+ {"version":3,"file":"CheckResultRenderer.esm.js","sources":["../../src/components/CheckResultRenderer.tsx"],"sourcesContent":["/*\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 */\n\nimport type { ReactElement } from 'react';\nimport { CheckResult } from '@backstage-community/plugin-tech-insights-common';\nimport { BooleanCheck, isBooleanCheckFailed } from './BooleanCheck';\n\n/**\n * Defines a react component that is responsible for rendering a result of a given type.\n *\n * @public\n */\nexport type CheckResultRenderer = {\n type: string;\n component: (check: CheckResult) => ReactElement;\n description?: (check: CheckResult) => string | ReactElement;\n isFailed?: (check: CheckResult) => boolean;\n};\n\n/**\n * Default renderer for json-rules-engine check results.\n *\n * @public\n */\nexport const jsonRulesEngineCheckResultRenderer: CheckResultRenderer = {\n type: 'json-rules-engine',\n component: (checkResult: CheckResult) => (\n <BooleanCheck checkResult={checkResult} />\n ),\n isFailed: isBooleanCheckFailed,\n};\n"],"names":[],"mappings":";;;AAqCO,MAAM,kCAA0D,GAAA;AAAA,EACrE,IAAM,EAAA,mBAAA;AAAA,EACN,SAAW,EAAA,CAAC,WACV,qBAAA,GAAA,CAAC,gBAAa,WAA0B,EAAA,CAAA;AAAA,EAE1C,QAAU,EAAA;AACZ;;;;"}
@@ -1,4 +1,5 @@
1
- import React, { useState } from 'react';
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { useState } from 'react';
2
3
  import { useApi } from '@backstage/core-plugin-api';
3
4
  import IconButton from '@material-ui/core/IconButton';
4
5
  import Alert from '@material-ui/lab/Alert';
@@ -15,7 +16,7 @@ const ResultCheckIcon = (props) => {
15
16
  disableLinksMenu,
16
17
  component,
17
18
  componentProps,
18
- missingRendererComponent = /* @__PURE__ */ React.createElement(Alert, { severity: "error" }, "Unknown type.")
19
+ missingRendererComponent = /* @__PURE__ */ jsx(Alert, { severity: "error", children: "Unknown type." })
19
20
  } = props;
20
21
  const api = useApi(techInsightsApiRef);
21
22
  const checkResultRenderer = props.checkResultRenderer ?? api.getCheckResultRenderers([result.check.type])[0];
@@ -28,17 +29,20 @@ const ResultCheckIcon = (props) => {
28
29
  if (!menu) {
29
30
  if (component) {
30
31
  const Component = component;
31
- return /* @__PURE__ */ React.createElement(Component, { ...componentProps }, inner);
32
+ return /* @__PURE__ */ jsx(Component, { ...componentProps, children: inner });
32
33
  }
33
34
  return inner;
34
35
  }
35
36
  if (component) {
36
37
  const Component = component;
37
- return /* @__PURE__ */ React.createElement(Component, { ...componentProps, onClick }, /* @__PURE__ */ React.createElement(IconButton, { edge: "end", "aria-label": "icon" }, inner));
38
+ return /* @__PURE__ */ jsx(Component, { ...componentProps, onClick, children: /* @__PURE__ */ jsx(IconButton, { edge: "end", "aria-label": "icon", children: inner }) });
38
39
  }
39
- return /* @__PURE__ */ React.createElement(IconButton, { edge: "end", "aria-label": "icon", onClick }, inner);
40
+ return /* @__PURE__ */ jsx(IconButton, { edge: "end", "aria-label": "icon", onClick, children: inner });
40
41
  };
41
- return /* @__PURE__ */ React.createElement(React.Fragment, null, !disableLinksMenu && /* @__PURE__ */ React.createElement(ResultLinksMenu, { result, entity, setMenu }), wrapActions(iconComponent ?? missingRendererComponent));
42
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
43
+ !disableLinksMenu && /* @__PURE__ */ jsx(ResultLinksMenu, { result, entity, setMenu }),
44
+ wrapActions(iconComponent ?? missingRendererComponent)
45
+ ] });
42
46
  };
43
47
 
44
48
  export { ResultCheckIcon };
@@ -1 +1 @@
1
- {"version":3,"file":"ResultCheckIcon.esm.js","sources":["../../../src/components/ResultCheckIcon/ResultCheckIcon.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 React, {\n ElementType,\n MouseEventHandler,\n PropsWithChildren,\n ReactNode,\n useState,\n} from 'react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { CheckResult } from '@backstage-community/plugin-tech-insights-common';\nimport { Entity } from '@backstage/catalog-model';\nimport IconButton from '@material-ui/core/IconButton';\nimport Alert from '@material-ui/lab/Alert';\nimport { techInsightsApiRef } from '../../api';\nimport { ResultLinksMenu, ResultLinksMenuInfo } from '../ResultLinksMenu';\nimport { CheckResultRenderer } from '../CheckResultRenderer';\n\n/** @public */\nexport type ResultCheckIconBaseComponentProps = PropsWithChildren<{\n onClick?: MouseEventHandler;\n}>;\n\n/**\n * ResultCheckIcon props\n *\n * The only necessary prop is {@link ResultCheckIconProps.result}, but if\n * {@link ResultCheckIconProps.entity} is provided, the popup menu with links\n * will also include links specifically for this entity.\n *\n * @public\n */\nexport interface ResultCheckIconProps<\n P extends ResultCheckIconBaseComponentProps,\n> {\n /**\n * The CheckResult object to create an icon for\n */\n result: CheckResult;\n /**\n * The entity for which this check result is created. This is optional, but if\n * provided, entity-specific links will be added to the popup menu, if any.\n */\n entity?: Entity;\n /**\n * This can optionally be provided, with a small performance improvement, if\n * it is already cashed upstream.\n */\n checkResultRenderer?: CheckResultRenderer;\n /**\n * Will disable the popup menu\n */\n disableLinksMenu?: boolean;\n /**\n * The icon is rendered with an `IconButton` which handles the onClick.\n * To wrap this in another component, handling the onClick, pass a component,\n * such as `ListItemSecondaryAction` which handles the `onClick` to open the\n * popup menu.\n *\n * The {@link ResultCheckIconProps.componentProps} prop can be specified to\n * add props to the wrapping component.\n */\n component?: ElementType<P>;\n /**\n * Props to provide to the wrapping component\n * {@link ResultCheckIconProps.component}.\n */\n componentProps?: Omit<P, 'onClick' | 'children'>;\n /**\n * Override the component used to display instead of a result icon, when no\n * renderer was found for this check type.\n */\n missingRendererComponent?: ReactNode;\n}\n\n/**\n * A component that renders an icon representing a check result, optionally with a popup menu\n * containing links related to the check.\n *\n * @public\n */\nexport const ResultCheckIcon = <P extends ResultCheckIconBaseComponentProps>(\n props: ResultCheckIconProps<P>,\n) => {\n const {\n result,\n entity,\n disableLinksMenu,\n component,\n componentProps,\n missingRendererComponent = <Alert severity=\"error\">Unknown type.</Alert>,\n } = props;\n\n const api = useApi(techInsightsApiRef);\n\n const checkResultRenderer =\n props.checkResultRenderer ??\n api.getCheckResultRenderers([result.check.type])[0];\n\n const [menu, setMenu] = useState<ResultLinksMenuInfo | undefined>();\n\n const iconComponent = checkResultRenderer?.component(result);\n\n const onClick: MouseEventHandler = event => {\n menu?.open(event.currentTarget);\n };\n\n const wrapActions = (inner: React.ReactElement): ReactNode => {\n if (!menu) {\n if (component) {\n const Component =\n component as ElementType<ResultCheckIconBaseComponentProps>;\n return <Component {...componentProps}>{inner}</Component>;\n }\n return inner;\n }\n\n if (component) {\n const Component =\n component as ElementType<ResultCheckIconBaseComponentProps>;\n return (\n <Component {...componentProps} onClick={onClick}>\n <IconButton edge=\"end\" aria-label=\"icon\">\n {inner}\n </IconButton>\n </Component>\n );\n }\n return (\n <IconButton edge=\"end\" aria-label=\"icon\" onClick={onClick}>\n {inner}\n </IconButton>\n );\n };\n\n return (\n <>\n {!disableLinksMenu && (\n <ResultLinksMenu result={result} entity={entity} setMenu={setMenu} />\n )}\n {wrapActions(iconComponent ?? missingRendererComponent)}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AA8Fa,MAAA,eAAA,GAAkB,CAC7B,KACG,KAAA;AACH,EAAM,MAAA;AAAA,IACJ,MAAA;AAAA,IACA,MAAA;AAAA,IACA,gBAAA;AAAA,IACA,SAAA;AAAA,IACA,cAAA;AAAA,IACA,wBAA2B,mBAAA,KAAA,CAAA,aAAA,CAAC,KAAM,EAAA,EAAA,QAAA,EAAS,WAAQ,eAAa;AAAA,GAC9D,GAAA,KAAA;AAEJ,EAAM,MAAA,GAAA,GAAM,OAAO,kBAAkB,CAAA;AAErC,EAAM,MAAA,mBAAA,GACJ,KAAM,CA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WAAA,CAAY,aAAiB,IAAA,wBAAwB,CACxD,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"ResultCheckIcon.esm.js","sources":["../../../src/components/ResultCheckIcon/ResultCheckIcon.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 type { ReactElement } from 'react';\n\nimport {\n ElementType,\n MouseEventHandler,\n PropsWithChildren,\n ReactNode,\n useState,\n} from 'react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { CheckResult } from '@backstage-community/plugin-tech-insights-common';\nimport { Entity } from '@backstage/catalog-model';\nimport IconButton from '@material-ui/core/IconButton';\nimport Alert from '@material-ui/lab/Alert';\nimport { techInsightsApiRef } from '../../api';\nimport { ResultLinksMenu, ResultLinksMenuInfo } from '../ResultLinksMenu';\nimport { CheckResultRenderer } from '../CheckResultRenderer';\n\n/** @public */\nexport type ResultCheckIconBaseComponentProps = PropsWithChildren<{\n onClick?: MouseEventHandler;\n}>;\n\n/**\n * ResultCheckIcon props\n *\n * The only necessary prop is {@link ResultCheckIconProps.result}, but if\n * {@link ResultCheckIconProps.entity} is provided, the popup menu with links\n * will also include links specifically for this entity.\n *\n * @public\n */\nexport interface ResultCheckIconProps<\n P extends ResultCheckIconBaseComponentProps,\n> {\n /**\n * The CheckResult object to create an icon for\n */\n result: CheckResult;\n /**\n * The entity for which this check result is created. This is optional, but if\n * provided, entity-specific links will be added to the popup menu, if any.\n */\n entity?: Entity;\n /**\n * This can optionally be provided, with a small performance improvement, if\n * it is already cashed upstream.\n */\n checkResultRenderer?: CheckResultRenderer;\n /**\n * Will disable the popup menu\n */\n disableLinksMenu?: boolean;\n /**\n * The icon is rendered with an `IconButton` which handles the onClick.\n * To wrap this in another component, handling the onClick, pass a component,\n * such as `ListItemSecondaryAction` which handles the `onClick` to open the\n * popup menu.\n *\n * The {@link ResultCheckIconProps.componentProps} prop can be specified to\n * add props to the wrapping component.\n */\n component?: ElementType<P>;\n /**\n * Props to provide to the wrapping component\n * {@link ResultCheckIconProps.component}.\n */\n componentProps?: Omit<P, 'onClick' | 'children'>;\n /**\n * Override the component used to display instead of a result icon, when no\n * renderer was found for this check type.\n */\n missingRendererComponent?: ReactNode;\n}\n\n/**\n * A component that renders an icon representing a check result, optionally with a popup menu\n * containing links related to the check.\n *\n * @public\n */\nexport const ResultCheckIcon = <P extends ResultCheckIconBaseComponentProps>(\n props: ResultCheckIconProps<P>,\n) => {\n const {\n result,\n entity,\n disableLinksMenu,\n component,\n componentProps,\n missingRendererComponent = <Alert severity=\"error\">Unknown type.</Alert>,\n } = props;\n\n const api = useApi(techInsightsApiRef);\n\n const checkResultRenderer =\n props.checkResultRenderer ??\n api.getCheckResultRenderers([result.check.type])[0];\n\n const [menu, setMenu] = useState<ResultLinksMenuInfo | undefined>();\n\n const iconComponent = checkResultRenderer?.component(result);\n\n const onClick: MouseEventHandler = event => {\n menu?.open(event.currentTarget);\n };\n\n const wrapActions = (inner: ReactElement): ReactNode => {\n if (!menu) {\n if (component) {\n const Component =\n component as ElementType<ResultCheckIconBaseComponentProps>;\n return <Component {...componentProps}>{inner}</Component>;\n }\n return inner;\n }\n\n if (component) {\n const Component =\n component as ElementType<ResultCheckIconBaseComponentProps>;\n return (\n <Component {...componentProps} onClick={onClick}>\n <IconButton edge=\"end\" aria-label=\"icon\">\n {inner}\n </IconButton>\n </Component>\n );\n }\n return (\n <IconButton edge=\"end\" aria-label=\"icon\" onClick={onClick}>\n {inner}\n </IconButton>\n );\n };\n\n return (\n <>\n {!disableLinksMenu && (\n <ResultLinksMenu result={result} entity={entity} setMenu={setMen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AA,QAAA,kBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,IAAA,EAAK,KAAM,EAAA,YAAA,EAAW,MAC/B,EAAA,QAAA,EAAA,KAAA,EACH,CACF,EAAA,CAAA;AAAA;AAGJ,IAAA,2BACG,UAAW,EAAA,EAAA,IAAA,EAAK,OAAM,YAAW,EAAA,MAAA,EAAO,SACtC,QACH,EAAA,KAAA,EAAA,CAAA;AAAA,GAEJ;AAEA,EAAA,uBAEK,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,IAAA,CAAC,gBACA,oBAAA,GAAA,CAAC,eAAgB,EAAA,EAAA,MAAA,EAAgB,QAAgB,OAAkB,EAAA,CAAA;AAAA,IAEpE,WAAA,CAAY,iBAAiB,wBAAwB;AAAA,GACxD,EAAA,CAAA;AAEJ;;;;"}
@@ -1,4 +1,5 @@
1
- import React, { useMemo, useEffect, useCallback } from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useMemo, useState, useEffect, useCallback } from 'react';
2
3
  import { useApi } from '@backstage/core-plugin-api';
3
4
  import Menu from '@material-ui/core/Menu';
4
5
  import MenuItem from '@material-ui/core/MenuItem';
@@ -18,9 +19,7 @@ const ResultLinksMenu = (props) => {
18
19
  [api, result, entity]
19
20
  );
20
21
  const menuId = `menu-${result.check.id}-${entity ? stringifyEntityRef(entity) : "unknown"}`;
21
- const [anchorEl, setAnchorEl] = React.useState(
22
- void 0
23
- );
22
+ const [anchorEl, setAnchorEl] = useState(void 0);
24
23
  useEffect(() => {
25
24
  if (links.length === 0) {
26
25
  setMenu(void 0);
@@ -38,27 +37,27 @@ const ResultLinksMenu = (props) => {
38
37
  if (links.length === 0) {
39
38
  return null;
40
39
  }
41
- return /* @__PURE__ */ React.createElement(
40
+ return /* @__PURE__ */ jsx(
42
41
  Menu,
43
42
  {
44
43
  id: menuId,
45
44
  anchorEl: anchorEl ?? null,
46
45
  keepMounted: true,
47
46
  open: Boolean(anchorEl),
48
- onClose: handleClose
49
- },
50
- links.map((link, i) => /* @__PURE__ */ React.createElement(
51
- MenuItem,
52
- {
53
- key: `${i}-${link.url}`,
54
- button: true,
55
- component: "a",
56
- href: link.url,
57
- target: link.url.startsWith("/") ? void 0 : "_blank",
58
- onClick: handleClose
59
- },
60
- link.title
61
- ))
47
+ onClose: handleClose,
48
+ children: links.map((link, i) => /* @__PURE__ */ jsx(
49
+ MenuItem,
50
+ {
51
+ button: true,
52
+ component: "a",
53
+ href: link.url,
54
+ target: link.url.startsWith("/") ? void 0 : "_blank",
55
+ onClick: handleClose,
56
+ children: link.title
57
+ },
58
+ `${i}-${link.url}`
59
+ ))
60
+ }
62
61
  );
63
62
  };
64
63
 
@@ -1 +1 @@
1
- {"version":3,"file":"ResultLinksMenu.esm.js","sources":["../../../src/components/ResultLinksMenu/ResultLinksMenu.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 React, {\n PropsWithChildren,\n useCallback,\n useEffect,\n useMemo,\n} from 'react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport { techInsightsApiRef } from '../../api';\nimport { CheckResult } from '@backstage-community/plugin-tech-insights-common';\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\n\n/**\n * ResultLinksMenu setMenu receiver.\n *\n * This object contains an {@link ResultLinksMenuInfo.open | open} function,\n * which can be used to open the popup menu. It closes automatically on\n * click-away.\n *\n * @public\n */\nexport type ResultLinksMenuInfo = {\n /**\n * Call this function to open the popup menu. The element argument should be\n * an element which is used as an anchor for the menu - where to display it.\n */\n open: (element: Element) => void;\n};\n\n/**\n * A component that renders a popup menu with links related to a check result.\n *\n * @public\n */\nexport const ResultLinksMenu = (\n props: PropsWithChildren<{\n result: CheckResult;\n entity?: Entity;\n setMenu(opener: ResultLinksMenuInfo | undefined): void;\n }>,\n) => {\n const { result, entity, setMenu } = props;\n const api = useApi(techInsightsApiRef);\n\n const links = useMemo(\n () =>\n entity\n ? api.getLinksForEntity(result, entity, {\n includeStaticLinks: true,\n })\n : result.check.links ?? [],\n [api, result, entity],\n );\n\n const menuId = `menu-${result.check.id}-${\n entity ? stringifyEntityRef(entity) : 'unknown'\n }`;\n\n const [anchorEl, setAnchorEl] = React.useState<Element | undefined>(\n undefined,\n );\n\n useEffect(() => {\n if (links.length === 0) {\n setMenu(undefined);\n return;\n }\n setMenu({\n open: (elem: Element) => {\n setAnchorEl(elem);\n },\n });\n }, [setMenu, links]);\n\n const handleClose = useCallback(() => {\n setAnchorEl(undefined);\n }, [setAnchorEl]);\n\n if (links.length === 0) {\n return null;\n }\n\n return (\n <Menu\n id={menuId}\n anchorEl={anchorEl ?? null}\n keepMounted\n open={Boolean(anchorEl)}\n onClose={handleClose}\n >\n {links.map((link, i) => (\n <MenuItem\n key={`${i}-${link.url}`}\n button\n component=\"a\"\n href={link.url}\n target={link.url.startsWith('/') ? undefined : '_blank'}\n onClick={handleClose}\n >\n {link.title}\n </MenuItem>\n ))}\n </Menu>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAmDa,MAAA,eAAA,GAAkB,CAC7B,KAKG,KAAA;AACH,EAAA,MAAM,EAAE,MAAA,EAAQ,MAAQ,EAAA,OAAA,EAAY,GAAA,KAAA;AACpC,EAAM,MAAA,GAAA,GAAM,OAAO,kBAAkB,CAAA;AAErC,EAAA,MAAM,KAAQ,GAAA,OAAA;AAAA,IACZ,MACE,MAAA,GACI,GAAI,CAAA,iBAAA,CAAkB,QAAQ,MAAQ,EAAA;AAAA,MACpC,kBA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AAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,GAAK,EAAA,CAAA,EAAG,CAAC,CAAA,CAAA,EAAI,KAAK,GAAG,CAAA,CAAA;AAAA,QACrB,MAAM,EAAA,IAAA;AAAA,QACN,SAAU,EAAA,GAAA;AAAA,QACV,MAAM,IAAK,CAAA,GAAA;AAAA,QACX,QAAQ,IAAK,CAAA,GAAA,CAAI,UAAW,CAAA,GAAG,IAAI,KAAY,CAAA,GAAA,QAAA;AAAA,QAC/C,OAAS,EAAA;AAAA,OAAA;AAAA,MAER,IAAK,CAAA;AAAA,KAET;AAAA,GACH;AAEJ;;;;"}
1
+ {"version":3,"file":"ResultLinksMenu.esm.js","sources":["../../../src/components/ResultLinksMenu/ResultLinksMenu.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 useState,\n PropsWithChildren,\n useCallback,\n useEffect,\n useMemo,\n} from 'react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport { techInsightsApiRef } from '../../api';\nimport { CheckResult } from '@backstage-community/plugin-tech-insights-common';\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\n\n/**\n * ResultLinksMenu setMenu receiver.\n *\n * This object contains an {@link ResultLinksMenuInfo.open | open} function,\n * which can be used to open the popup menu. It closes automatically on\n * click-away.\n *\n * @public\n */\nexport type ResultLinksMenuInfo = {\n /**\n * Call this function to open the popup menu. The element argument should be\n * an element which is used as an anchor for the menu - where to display it.\n */\n open: (element: Element) => void;\n};\n\n/**\n * A component that renders a popup menu with links related to a check result.\n *\n * @public\n */\nexport const ResultLinksMenu = (\n props: PropsWithChildren<{\n result: CheckResult;\n entity?: Entity;\n setMenu(opener: ResultLinksMenuInfo | undefined): void;\n }>,\n) => {\n const { result, entity, setMenu } = props;\n const api = useApi(techInsightsApiRef);\n\n const links = useMemo(\n () =>\n entity\n ? api.getLinksForEntity(result, entity, {\n includeStaticLinks: true,\n })\n : result.check.links ?? [],\n [api, result, entity],\n );\n\n const menuId = `menu-${result.check.id}-${\n entity ? stringifyEntityRef(entity) : 'unknown'\n }`;\n\n const [anchorEl, setAnchorEl] = useState<Element | undefined>(undefined);\n\n useEffect(() => {\n if (links.length === 0) {\n setMenu(undefined);\n return;\n }\n setMenu({\n open: (elem: Element) => {\n setAnchorEl(elem);\n },\n });\n }, [setMenu, links]);\n\n const handleClose = useCallback(() => {\n setAnchorEl(undefined);\n }, [setAnchorEl]);\n\n if (links.length === 0) {\n return null;\n }\n\n return (\n <Menu\n id={menuId}\n anchorEl={anchorEl ?? null}\n keepMounted\n open={Boolean(anchorEl)}\n onClose={handleClose}\n >\n {links.map((link, i) => (\n <MenuItem\n key={`${i}-${link.url}`}\n button\n component=\"a\"\n href={link.url}\n target={link.url.startsWith('/') ? undefined : '_blank'}\n onClick={handleClose}\n >\n {link.title}\n </MenuItem>\n ))}\n </Menu>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAoDa,MAAA,eAAA,GAAkB,CAC7B,KAKG,KAAA;AACH,EAAA,MAAM,EAAE,MAAA,EAAQ,MAAQ,EAAA,OAAA,EAAY,GAAA,KAAA;AACpC,EAAM,MAAA,GAAA,GAAM,OAAO,kBAAkB,CAAA;AAErC,EAAA,MAAM,KAAQ,GAAA,OAAA;AAAA,IACZ,MACE,MAAA,GACI,GAAI,CAAA,iBAAA,CAAkB,QAAQ,MAAQ,EAAA;AAAA,MACpC,kBAAoB,EAAA;AAAA,KACrB,CAAA,GACD,MAAO,CAAA,KAAA,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AA,UACV,MAAM,IAAK,CAAA,GAAA;AAAA,UACX,QAAQ,IAAK,CAAA,GAAA,CAAI,UAAW,CAAA,GAAG,IAAI,KAAY,CAAA,GAAA,QAAA;AAAA,UAC/C,OAAS,EAAA,WAAA;AAAA,UAER,QAAK,EAAA,IAAA,CAAA;AAAA,SAAA;AAAA,QAPD,CAAG,EAAA,CAAC,CAAI,CAAA,EAAA,IAAA,CAAK,GAAG,CAAA;AAAA,OASxB;AAAA;AAAA,GACH;AAEJ;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
2
2
  import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api';
3
3
  import { CheckResult, Check, BulkCheckResponse, InsightFacts, FactSchema, CheckLink } from '@backstage-community/plugin-tech-insights-common';
4
- import React, { PropsWithChildren, MouseEventHandler, ElementType, ReactNode } from 'react';
4
+ import { ReactElement, PropsWithChildren, MouseEventHandler, ElementType, ReactNode } from 'react';
5
5
  import { CompoundEntityRef, Entity } from '@backstage/catalog-model';
6
6
  import { TechInsightsClient as TechInsightsClient$1 } from '@backstage-community/plugin-tech-insights-common/client';
7
+ import * as react_jsx_runtime from 'react/jsx-runtime';
7
8
 
8
9
  /**
9
10
  * Defines a react component that is responsible for rendering a result of a given type.
@@ -12,8 +13,8 @@ import { TechInsightsClient as TechInsightsClient$1 } from '@backstage-community
12
13
  */
13
14
  type CheckResultRenderer = {
14
15
  type: string;
15
- component: (check: CheckResult) => React.ReactElement;
16
- description?: (check: CheckResult) => string | React.ReactElement;
16
+ component: (check: CheckResult) => ReactElement;
17
+ description?: (check: CheckResult) => string | ReactElement;
17
18
  isFailed?: (check: CheckResult) => boolean;
18
19
  };
19
20
  /**
@@ -101,7 +102,7 @@ declare class TechInsightsClient extends TechInsightsClient$1 implements TechIns
101
102
  */
102
103
  declare const BooleanCheck: (props: {
103
104
  checkResult: CheckResult;
104
- }) => React.JSX.Element;
105
+ }) => react_jsx_runtime.JSX.Element;
105
106
  /**
106
107
  * Helper function to determine if a boolean check result represents a failure.
107
108
  *
@@ -170,7 +171,7 @@ interface ResultCheckIconProps<P extends ResultCheckIconBaseComponentProps> {
170
171
  *
171
172
  * @public
172
173
  */
173
- declare const ResultCheckIcon: <P extends ResultCheckIconBaseComponentProps>(props: ResultCheckIconProps<P>) => React.JSX.Element;
174
+ declare const ResultCheckIcon: <P extends ResultCheckIconBaseComponentProps>(props: ResultCheckIconProps<P>) => react_jsx_runtime.JSX.Element;
174
175
 
175
176
  /**
176
177
  * ResultLinksMenu setMenu receiver.
@@ -193,10 +194,10 @@ type ResultLinksMenuInfo = {
193
194
  *
194
195
  * @public
195
196
  */
196
- declare const ResultLinksMenu: (props: React.PropsWithChildren<{
197
+ declare const ResultLinksMenu: (props: PropsWithChildren<{
197
198
  result: CheckResult;
198
199
  entity?: Entity | undefined;
199
200
  setMenu(opener: ResultLinksMenuInfo | undefined): void;
200
- }>) => React.JSX.Element | null;
201
+ }>) => react_jsx_runtime.JSX.Element | null;
201
202
 
202
203
  export { BooleanCheck, type CheckResultRenderer, ResultCheckIcon, type ResultCheckIconBaseComponentProps, type ResultCheckIconProps, ResultLinksMenu, type ResultLinksMenuInfo, type TechInsightsApi, TechInsightsClient, isBooleanCheckFailed, jsonRulesEngineCheckResultRenderer, techInsightsApiRef };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-tech-insights-react",
3
3
  "description": "Web library for the tech-insights plugin",
4
- "version": "1.1.1",
4
+ "version": "1.2.1",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -39,9 +39,9 @@
39
39
  "postpack": "backstage-cli package postpack"
40
40
  },
41
41
  "dependencies": {
42
- "@backstage-community/plugin-tech-insights-common": "^0.6.0",
43
- "@backstage/catalog-model": "^1.7.3",
44
- "@backstage/core-plugin-api": "^1.10.3",
42
+ "@backstage-community/plugin-tech-insights-common": "^0.7.1",
43
+ "@backstage/catalog-model": "^1.7.4",
44
+ "@backstage/core-plugin-api": "^1.10.7",
45
45
  "@backstage/types": "^1.2.1",
46
46
  "@material-ui/core": "^4.9.13",
47
47
  "@material-ui/icons": "^4.9.1",
@@ -51,8 +51,8 @@
51
51
  "react": "^16.13.1 || ^17.0.0 || ^18.0.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@backstage/cli": "^0.29.6",
55
- "@backstage/test-utils": "^1.7.4",
54
+ "@backstage/cli": "^0.32.1",
55
+ "@backstage/test-utils": "^1.7.8",
56
56
  "@testing-library/jest-dom": "^6.0.0",
57
57
  "@testing-library/react": "^14.0.0",
58
58
  "react": "^16.13.1 || ^17.0.0 || ^18.0.0"
@@ -62,8 +62,8 @@
62
62
  ],
63
63
  "typesVersions": {
64
64
  "*": {
65
- "index": [
66
- "dist/index.d.ts"
65
+ "package.json": [
66
+ "package.json"
67
67
  ]
68
68
  }
69
69
  },