@red-hat-developer-hub/backstage-plugin-global-floating-action-button 1.6.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @red-hat-developer-hub/backstage-plugin-global-floating-action-button
2
2
 
3
+ ## 1.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3c3ac01: Backstage version bump to v1.45.2
8
+
9
+ ### Patch Changes
10
+
11
+ - c6c029b: allow base64 image in floating action button icon
12
+ - 40b80fe: Remove "lifecycle" keywords and "supported-versions" in package.json. Change "lifecycle" to active in catalog.yaml
13
+
3
14
  ## 1.6.1
4
15
 
5
16
  ### Patch Changes
@@ -20,7 +20,7 @@ const FabIcon = ({ icon }) => {
20
20
  const svgDataUri = `data:image/svg+xml;base64,${btoa(strIcon)}`;
21
21
  return /* @__PURE__ */ jsx(MuiIcon, { children: /* @__PURE__ */ jsx("img", { src: svgDataUri, alt: "" }) });
22
22
  }
23
- if (strIcon.startsWith("https://") || strIcon.startsWith("http://") || strIcon.startsWith("/")) {
23
+ if (strIcon.startsWith("https://") || strIcon.startsWith("http://") || strIcon.startsWith("/") || strIcon.startsWith("data:image/")) {
24
24
  return /* @__PURE__ */ jsx(MuiIcon, { baseClassName: "material-icons-outlined", children: /* @__PURE__ */ jsx("img", { src: strIcon, alt: "" }) });
25
25
  }
26
26
  return /* @__PURE__ */ jsx(MuiIcon, { baseClassName: "material-icons-outlined", children: strIcon });
@@ -1 +1 @@
1
- {"version":3,"file":"FabIcon.esm.js","sources":["../../src/components/FabIcon.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 { isValidElement } from 'react';\nimport { useApp } from '@backstage/core-plugin-api';\n\nimport MuiIcon from '@mui/material/Icon';\n\nexport const FabIcon = ({ icon }: { icon: string | ReactElement }) => {\n const app = useApp();\n\n if (!icon) {\n return null;\n }\n\n if (isValidElement(icon)) {\n return icon;\n }\n\n const strIcon = icon as string;\n\n const SystemIcon = app.getSystemIcon(strIcon);\n\n if (SystemIcon) {\n return <SystemIcon />;\n }\n\n if (strIcon.startsWith('<svg')) {\n const svgDataUri = `data:image/svg+xml;base64,${btoa(strIcon)}`;\n return (\n <MuiIcon>\n <img src={svgDataUri} alt=\"\" />\n </MuiIcon>\n );\n }\n\n if (\n strIcon.startsWith('https://') ||\n strIcon.startsWith('http://') ||\n strIcon.startsWith('/')\n ) {\n return (\n <MuiIcon baseClassName=\"material-icons-outlined\">\n <img src={strIcon} alt=\"\" />\n </MuiIcon>\n );\n }\n\n return <MuiIcon baseClassName=\"material-icons-outlined\">{strIcon}</MuiIcon>;\n};\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,OAAU,GAAA,CAAC,EAAE,IAAA,EAA4C,KAAA;AACpE,EAAA,MAAM,MAAM,MAAO,EAAA;AAEnB,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAO,OAAA,IAAA;AAAA;AAGT,EAAI,IAAA,cAAA,CAAe,IAAI,CAAG,EAAA;AACxB,IAAO,OAAA,IAAA;AAAA;AAGT,EAAA,MAAM,OAAU,GAAA,IAAA;AAEhB,EAAM,MAAA,UAAA,GAAa,GAAI,CAAA,aAAA,CAAc,OAAO,CAAA;AAE5C,EAAA,IAAI,UAAY,EAAA;AACd,IAAA,2BAAQ,UAAW,EAAA,EAAA,CAAA;AAAA;AAGrB,EAAI,IAAA,OAAA,CAAQ,UAAW,CAAA,MAAM,CAAG,EAAA;AAC9B,IAAA,MAAM,UAAa,GAAA,CAAA,0BAAA,EAA6B,IAAK,CAAA,OAAO,CAAC,CAAA,CAAA;AAC7D,IACE,uBAAA,GAAA,CAAC,WACC,QAAC,kBAAA,GAAA,CAAA,KAAA,EAAA,EAAI,KAAK,UAAY,EAAA,GAAA,EAAI,IAAG,CAC/B,EAAA,CAAA;AAAA;AAIJ,EACE,IAAA,OAAA,CAAQ,UAAW,CAAA,UAAU,CAC7B,IAAA,OAAA,CAAQ,UAAW,CAAA,SAAS,CAC5B,IAAA,OAAA,CAAQ,UAAW,CAAA,GAAG,CACtB,EAAA;AACA,IACE,uBAAA,GAAA,CAAC,OAAQ,EAAA,EAAA,aAAA,EAAc,yBACrB,EAAA,QAAA,kBAAA,GAAA,CAAC,SAAI,GAAK,EAAA,OAAA,EAAS,GAAI,EAAA,EAAA,EAAG,CAC5B,EAAA,CAAA;AAAA;AAIJ,EAAA,uBAAQ,GAAA,CAAA,OAAA,EAAA,EAAQ,aAAc,EAAA,yBAAA,EAA2B,QAAQ,EAAA,OAAA,EAAA,CAAA;AACnE;;;;"}
1
+ {"version":3,"file":"FabIcon.esm.js","sources":["../../src/components/FabIcon.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 { isValidElement } from 'react';\nimport { useApp } from '@backstage/core-plugin-api';\n\nimport MuiIcon from '@mui/material/Icon';\n\nexport const FabIcon = ({ icon }: { icon: string | ReactElement }) => {\n const app = useApp();\n\n if (!icon) {\n return null;\n }\n\n if (isValidElement(icon)) {\n return icon;\n }\n\n const strIcon = icon as string;\n\n const SystemIcon = app.getSystemIcon(strIcon);\n\n if (SystemIcon) {\n return <SystemIcon />;\n }\n\n if (strIcon.startsWith('<svg')) {\n const svgDataUri = `data:image/svg+xml;base64,${btoa(strIcon)}`;\n return (\n <MuiIcon>\n <img src={svgDataUri} alt=\"\" />\n </MuiIcon>\n );\n }\n\n if (\n strIcon.startsWith('https://') ||\n strIcon.startsWith('http://') ||\n strIcon.startsWith('/') ||\n strIcon.startsWith('data:image/')\n ) {\n return (\n <MuiIcon baseClassName=\"material-icons-outlined\">\n <img src={strIcon} alt=\"\" />\n </MuiIcon>\n );\n }\n\n return <MuiIcon baseClassName=\"material-icons-outlined\">{strIcon}</MuiIcon>;\n};\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,OAAU,GAAA,CAAC,EAAE,IAAA,EAA4C,KAAA;AACpE,EAAA,MAAM,MAAM,MAAO,EAAA;AAEnB,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAO,OAAA,IAAA;AAAA;AAGT,EAAI,IAAA,cAAA,CAAe,IAAI,CAAG,EAAA;AACxB,IAAO,OAAA,IAAA;AAAA;AAGT,EAAA,MAAM,OAAU,GAAA,IAAA;AAEhB,EAAM,MAAA,UAAA,GAAa,GAAI,CAAA,aAAA,CAAc,OAAO,CAAA;AAE5C,EAAA,IAAI,UAAY,EAAA;AACd,IAAA,2BAAQ,UAAW,EAAA,EAAA,CAAA;AAAA;AAGrB,EAAI,IAAA,OAAA,CAAQ,UAAW,CAAA,MAAM,CAAG,EAAA;AAC9B,IAAA,MAAM,UAAa,GAAA,CAAA,0BAAA,EAA6B,IAAK,CAAA,OAAO,CAAC,CAAA,CAAA;AAC7D,IACE,uBAAA,GAAA,CAAC,WACC,QAAC,kBAAA,GAAA,CAAA,KAAA,EAAA,EAAI,KAAK,UAAY,EAAA,GAAA,EAAI,IAAG,CAC/B,EAAA,CAAA;AAAA;AAIJ,EAAA,IACE,OAAQ,CAAA,UAAA,CAAW,UAAU,CAAA,IAC7B,QAAQ,UAAW,CAAA,SAAS,CAC5B,IAAA,OAAA,CAAQ,WAAW,GAAG,CAAA,IACtB,OAAQ,CAAA,UAAA,CAAW,aAAa,CAChC,EAAA;AACA,IACE,uBAAA,GAAA,CAAC,OAAQ,EAAA,EAAA,aAAA,EAAc,yBACrB,EAAA,QAAA,kBAAA,GAAA,CAAC,SAAI,GAAK,EAAA,OAAA,EAAS,GAAI,EAAA,EAAA,EAAG,CAC5B,EAAA,CAAA;AAAA;AAIJ,EAAA,uBAAQ,GAAA,CAAA,OAAA,EAAA,EAAQ,aAAc,EAAA,yBAAA,EAA2B,QAAQ,EAAA,OAAA,EAAA,CAAA;AACnE;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@red-hat-developer-hub/backstage-plugin-global-floating-action-button",
3
- "version": "1.6.1",
3
+ "version": "1.7.0",
4
4
  "main": "dist/index.esm.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -11,7 +11,6 @@
11
11
  },
12
12
  "backstage": {
13
13
  "role": "frontend-plugin",
14
- "supported-versions": "1.32.5",
15
14
  "pluginId": "global-floating-action-button",
16
15
  "pluginPackages": [
17
16
  "@red-hat-developer-hub/backstage-plugin-global-floating-action-button"
@@ -33,8 +32,8 @@
33
32
  "ui-test": "start-server-and-test start localhost:3000 'playwright test'"
34
33
  },
35
34
  "dependencies": {
36
- "@backstage/core-components": "^0.18.2",
37
- "@backstage/core-plugin-api": "^1.11.1",
35
+ "@backstage/core-components": "^0.18.3",
36
+ "@backstage/core-plugin-api": "^1.12.0",
38
37
  "@backstage/theme": "^0.7.0",
39
38
  "@mui/icons-material": "^5.15.17",
40
39
  "@mui/material": "^5.15.17",
@@ -49,8 +48,8 @@
49
48
  "react-router-dom": "^6.0.0"
50
49
  },
51
50
  "devDependencies": {
52
- "@backstage/cli": "^0.34.4",
53
- "@backstage/dev-utils": "^1.1.16",
51
+ "@backstage/cli": "^0.34.5",
52
+ "@backstage/dev-utils": "^1.1.17",
54
53
  "@openshift/dynamic-plugin-sdk": "5.0.1",
55
54
  "@testing-library/jest-dom": "^6.0.0",
56
55
  "@testing-library/react": "^14.0.0",
@@ -67,7 +66,6 @@
67
66
  "directory": "workspaces/global-floating-action-button/plugins/global-floating-action-button"
68
67
  },
69
68
  "keywords": [
70
- "lifecycle:active",
71
69
  "backstage",
72
70
  "plugin"
73
71
  ],