@red-hat-developer-hub/backstage-plugin-dynamic-home-page 1.9.3 → 1.10.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,17 @@
|
|
|
1
1
|
# @red-hat-developer-hub/backstage-plugin-dynamic-home-page
|
|
2
2
|
|
|
3
|
+
## 1.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2998c31: Backstage version bump to v1.45.3
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- c6c029b: allow base64 image in quick access icons
|
|
12
|
+
- 09c378a: Updated dependency `react-router-dom` to `6.30.2`.
|
|
13
|
+
Updated dependency `@types/react-grid-layout` to `1.3.6`.
|
|
14
|
+
|
|
3
15
|
## 1.9.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -31,7 +31,7 @@ const QuickAccessIcon = ({
|
|
|
31
31
|
const svgDataUri = `data:image/svg+xml;base64,${btoa(strIcon)}`;
|
|
32
32
|
return /* @__PURE__ */ jsx("img", { src: svgDataUri, className: classes.img, alt });
|
|
33
33
|
}
|
|
34
|
-
if (strIcon.startsWith("https://") || strIcon.startsWith("http://") || strIcon.startsWith("/")) {
|
|
34
|
+
if (strIcon.startsWith("https://") || strIcon.startsWith("http://") || strIcon.startsWith("/") || strIcon.startsWith("data:image/")) {
|
|
35
35
|
return /* @__PURE__ */ jsx("img", { src: strIcon, className: classes.img, alt });
|
|
36
36
|
}
|
|
37
37
|
return /* @__PURE__ */ jsx(MuiIcon, { baseClassName: "material-icons-outlined", children: strIcon });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickAccessIcon.esm.js","sources":["../../src/components/QuickAccessIcon.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 */\n\nimport type { ReactElement } from 'react';\nimport { makeStyles } from 'tss-react/mui';\n\nimport { isValidElement } from 'react';\nimport { useApp } from '@backstage/core-plugin-api';\n\nimport MuiIcon from '@mui/material/Icon';\n\nconst useStyles = makeStyles()({\n img: {\n height: '40px',\n width: 'auto',\n },\n});\n\nexport const QuickAccessIcon = ({\n icon,\n alt,\n}: {\n icon: string | ReactElement;\n alt: string;\n}) => {\n const { classes } = useStyles();\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 fontSize=\"large\" />;\n }\n\n if (strIcon.startsWith('<svg')) {\n const svgDataUri = `data:image/svg+xml;base64,${btoa(strIcon)}`;\n return <img src={svgDataUri} className={classes.img} alt={alt} />;\n }\n\n if (\n strIcon.startsWith('https://') ||\n strIcon.startsWith('http://') ||\n strIcon.startsWith('/')\n ) {\n return <img src={strIcon} className={classes.img} alt={alt} />;\n }\n\n return <MuiIcon baseClassName=\"material-icons-outlined\">{strIcon}</MuiIcon>;\n};\n"],"names":[],"mappings":";;;;;;AAwBA,MAAM,SAAA,GAAY,YAAa,CAAA;AAAA,EAC7B,GAAK,EAAA;AAAA,IACH,MAAQ,EAAA,MAAA;AAAA,IACR,KAAO,EAAA;AAAA;AAEX,CAAC,CAAA;AAEM,MAAM,kBAAkB,CAAC;AAAA,EAC9B,IAAA;AAAA,EACA;AACF,CAGM,KAAA;AACJ,EAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,SAAU,EAAA;AAC9B,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,IAAO,uBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,CAAA;AAAA;AAGtC,EAAI,IAAA,OAAA,CAAQ,UAAW,CAAA,MAAM,CAAG,EAAA;AAC9B,IAAA,MAAM,UAAa,GAAA,CAAA,0BAAA,EAA6B,IAAK,CAAA,OAAO,CAAC,CAAA,CAAA;AAC7D,IAAA,2BAAQ,KAAI,EAAA,EAAA,GAAA,EAAK,YAAY,SAAW,EAAA,OAAA,CAAQ,KAAK,GAAU,EAAA,CAAA;AAAA;AAGjE,
|
|
1
|
+
{"version":3,"file":"QuickAccessIcon.esm.js","sources":["../../src/components/QuickAccessIcon.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 */\n\nimport type { ReactElement } from 'react';\nimport { makeStyles } from 'tss-react/mui';\n\nimport { isValidElement } from 'react';\nimport { useApp } from '@backstage/core-plugin-api';\n\nimport MuiIcon from '@mui/material/Icon';\n\nconst useStyles = makeStyles()({\n img: {\n height: '40px',\n width: 'auto',\n },\n});\n\nexport const QuickAccessIcon = ({\n icon,\n alt,\n}: {\n icon: string | ReactElement;\n alt: string;\n}) => {\n const { classes } = useStyles();\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 fontSize=\"large\" />;\n }\n\n if (strIcon.startsWith('<svg')) {\n const svgDataUri = `data:image/svg+xml;base64,${btoa(strIcon)}`;\n return <img src={svgDataUri} className={classes.img} alt={alt} />;\n }\n\n if (\n strIcon.startsWith('https://') ||\n strIcon.startsWith('http://') ||\n strIcon.startsWith('/') ||\n strIcon.startsWith('data:image/')\n ) {\n return <img src={strIcon} className={classes.img} alt={alt} />;\n }\n\n return <MuiIcon baseClassName=\"material-icons-outlined\">{strIcon}</MuiIcon>;\n};\n"],"names":[],"mappings":";;;;;;AAwBA,MAAM,SAAA,GAAY,YAAa,CAAA;AAAA,EAC7B,GAAK,EAAA;AAAA,IACH,MAAQ,EAAA,MAAA;AAAA,IACR,KAAO,EAAA;AAAA;AAEX,CAAC,CAAA;AAEM,MAAM,kBAAkB,CAAC;AAAA,EAC9B,IAAA;AAAA,EACA;AACF,CAGM,KAAA;AACJ,EAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,SAAU,EAAA;AAC9B,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,IAAO,uBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,CAAA;AAAA;AAGtC,EAAI,IAAA,OAAA,CAAQ,UAAW,CAAA,MAAM,CAAG,EAAA;AAC9B,IAAA,MAAM,UAAa,GAAA,CAAA,0BAAA,EAA6B,IAAK,CAAA,OAAO,CAAC,CAAA,CAAA;AAC7D,IAAA,2BAAQ,KAAI,EAAA,EAAA,GAAA,EAAK,YAAY,SAAW,EAAA,OAAA,CAAQ,KAAK,GAAU,EAAA,CAAA;AAAA;AAGjE,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,IAAA,2BAAQ,KAAI,EAAA,EAAA,GAAA,EAAK,SAAS,SAAW,EAAA,OAAA,CAAQ,KAAK,GAAU,EAAA,CAAA;AAAA;AAG9D,EAAA,uBAAQ,GAAA,CAAA,OAAA,EAAA,EAAQ,aAAc,EAAA,yBAAA,EAA2B,QAAQ,EAAA,OAAA,EAAA,CAAA;AACnE;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -248,47 +248,47 @@ declare const TemplateSection: () => react_jsx_runtime.JSX.Element;
|
|
|
248
248
|
* @public
|
|
249
249
|
*/
|
|
250
250
|
declare const homepageTranslationRef: _backstage_core_plugin_api_alpha.TranslationRef<"plugin.homepage", {
|
|
251
|
-
readonly "search.placeholder": string;
|
|
252
251
|
readonly "header.local": string;
|
|
253
252
|
readonly "header.welcome": string;
|
|
254
253
|
readonly "header.welcomePersonalized": string;
|
|
255
|
-
readonly "
|
|
254
|
+
readonly "search.placeholder": string;
|
|
255
|
+
readonly "homePage.empty": string;
|
|
256
|
+
readonly "quickAccess.title": string;
|
|
257
|
+
readonly "quickAccess.error": string;
|
|
258
|
+
readonly "quickAccess.fetchError": string;
|
|
259
|
+
readonly "featuredDocs.learnMore": string;
|
|
256
260
|
readonly "templates.title": string;
|
|
261
|
+
readonly "templates.error": string;
|
|
257
262
|
readonly "templates.empty": string;
|
|
258
|
-
readonly "templates.register": string;
|
|
259
263
|
readonly "templates.fetchError": string;
|
|
260
264
|
readonly "templates.emptyDescription": string;
|
|
265
|
+
readonly "templates.register": string;
|
|
261
266
|
readonly "templates.viewAll": string;
|
|
262
|
-
readonly "entities.error": string;
|
|
263
|
-
readonly "entities.title": string;
|
|
264
|
-
readonly "entities.close": string;
|
|
265
|
-
readonly "entities.description": string;
|
|
266
|
-
readonly "entities.empty": string;
|
|
267
|
-
readonly "entities.register": string;
|
|
268
|
-
readonly "entities.fetchError": string;
|
|
269
|
-
readonly "entities.emptyDescription": string;
|
|
270
|
-
readonly "entities.viewAll": string;
|
|
271
|
-
readonly "homePage.empty": string;
|
|
272
|
-
readonly "quickAccess.error": string;
|
|
273
|
-
readonly "quickAccess.title": string;
|
|
274
|
-
readonly "quickAccess.fetchError": string;
|
|
275
|
-
readonly "featuredDocs.learnMore": string;
|
|
276
|
-
readonly "onboarding.guest": string;
|
|
277
267
|
readonly "onboarding.greeting.goodMorning": string;
|
|
278
268
|
readonly "onboarding.greeting.goodAfternoon": string;
|
|
279
269
|
readonly "onboarding.greeting.goodEvening": string;
|
|
270
|
+
readonly "onboarding.guest": string;
|
|
280
271
|
readonly "onboarding.getStarted.title": string;
|
|
281
|
-
readonly "onboarding.getStarted.ariaLabel": string;
|
|
282
272
|
readonly "onboarding.getStarted.description": string;
|
|
283
273
|
readonly "onboarding.getStarted.buttonText": string;
|
|
274
|
+
readonly "onboarding.getStarted.ariaLabel": string;
|
|
284
275
|
readonly "onboarding.explore.title": string;
|
|
285
|
-
readonly "onboarding.explore.ariaLabel": string;
|
|
286
276
|
readonly "onboarding.explore.description": string;
|
|
287
277
|
readonly "onboarding.explore.buttonText": string;
|
|
278
|
+
readonly "onboarding.explore.ariaLabel": string;
|
|
288
279
|
readonly "onboarding.learn.title": string;
|
|
289
|
-
readonly "onboarding.learn.ariaLabel": string;
|
|
290
280
|
readonly "onboarding.learn.description": string;
|
|
291
281
|
readonly "onboarding.learn.buttonText": string;
|
|
282
|
+
readonly "onboarding.learn.ariaLabel": string;
|
|
283
|
+
readonly "entities.title": string;
|
|
284
|
+
readonly "entities.description": string;
|
|
285
|
+
readonly "entities.error": string;
|
|
286
|
+
readonly "entities.close": string;
|
|
287
|
+
readonly "entities.empty": string;
|
|
288
|
+
readonly "entities.fetchError": string;
|
|
289
|
+
readonly "entities.emptyDescription": string;
|
|
290
|
+
readonly "entities.register": string;
|
|
291
|
+
readonly "entities.viewAll": string;
|
|
292
292
|
}>;
|
|
293
293
|
|
|
294
294
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@red-hat-developer-hub/backstage-plugin-dynamic-home-page",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"main": "dist/index.esm.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
"postpack": "backstage-cli package postpack"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@backstage/catalog-client": "^1.
|
|
36
|
-
"@backstage/catalog-model": "^1.7.
|
|
37
|
-
"@backstage/core-components": "^0.
|
|
38
|
-
"@backstage/core-plugin-api": "^1.
|
|
39
|
-
"@backstage/plugin-catalog-react": "^1.
|
|
40
|
-
"@backstage/plugin-home": "^0.8.
|
|
41
|
-
"@backstage/plugin-home-react": "^0.1.
|
|
42
|
-
"@backstage/plugin-search-react": "^1.
|
|
43
|
-
"@backstage/plugin-user-settings": "^0.8.
|
|
44
|
-
"@backstage/theme": "^0.
|
|
35
|
+
"@backstage/catalog-client": "^1.12.1",
|
|
36
|
+
"@backstage/catalog-model": "^1.7.6",
|
|
37
|
+
"@backstage/core-components": "^0.18.3",
|
|
38
|
+
"@backstage/core-plugin-api": "^1.12.0",
|
|
39
|
+
"@backstage/plugin-catalog-react": "^1.21.3",
|
|
40
|
+
"@backstage/plugin-home": "^0.8.14",
|
|
41
|
+
"@backstage/plugin-home-react": "^0.1.32",
|
|
42
|
+
"@backstage/plugin-search-react": "^1.10.0",
|
|
43
|
+
"@backstage/plugin-user-settings": "^0.8.29",
|
|
44
|
+
"@backstage/theme": "^0.7.0",
|
|
45
45
|
"@mui/icons-material": "5.18.0",
|
|
46
46
|
"@mui/material": "5.18.0",
|
|
47
47
|
"@mui/styles": "5.18.0",
|
|
@@ -52,20 +52,20 @@
|
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"react": "16.13.1 || ^17.0.0 || ^18.2.0",
|
|
55
|
-
"react-router-dom": "6.30.
|
|
55
|
+
"react-router-dom": "6.30.2"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@backstage/cli": "^0.34.
|
|
59
|
-
"@backstage/core-app-api": "^1.
|
|
60
|
-
"@backstage/dev-utils": "^1.1.
|
|
61
|
-
"@backstage/plugin-catalog": "^1.
|
|
62
|
-
"@backstage/test-utils": "^1.7.
|
|
58
|
+
"@backstage/cli": "^0.34.5",
|
|
59
|
+
"@backstage/core-app-api": "^1.19.2",
|
|
60
|
+
"@backstage/dev-utils": "^1.1.17",
|
|
61
|
+
"@backstage/plugin-catalog": "^1.32.0",
|
|
62
|
+
"@backstage/test-utils": "^1.7.13",
|
|
63
63
|
"@openshift/dynamic-plugin-sdk": "5.0.1",
|
|
64
64
|
"@red-hat-developer-hub/backstage-plugin-theme": "^0.10.0",
|
|
65
65
|
"@testing-library/jest-dom": "6.9.1",
|
|
66
66
|
"@testing-library/react": "14.3.1",
|
|
67
67
|
"@testing-library/user-event": "14.6.1",
|
|
68
|
-
"@types/react-grid-layout": "1.3.
|
|
68
|
+
"@types/react-grid-layout": "1.3.6",
|
|
69
69
|
"msw": "1.3.5",
|
|
70
70
|
"react": "^16.13.1 || ^17.0.0 || ^18.0.0"
|
|
71
71
|
},
|