@backstage/plugin-techdocs-react 1.2.15 → 1.2.16-next.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 +13 -0
- package/dist/alpha.esm.js +15 -3
- package/dist/alpha.esm.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @backstage/plugin-techdocs-react
|
|
2
2
|
|
|
3
|
+
## 1.2.16-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0e9f7fe: Fix catalog entity docs page not loading due to multiple addons data attachment in the New Frontend System.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/core-components@0.17.1-next.0
|
|
10
|
+
- @backstage/frontend-plugin-api@0.10.1-next.0
|
|
11
|
+
- @backstage/catalog-model@1.7.3
|
|
12
|
+
- @backstage/config@1.3.2
|
|
13
|
+
- @backstage/core-plugin-api@1.10.5
|
|
14
|
+
- @backstage/version-bridge@1.0.11
|
|
15
|
+
|
|
3
16
|
## 1.2.15
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/alpha.esm.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { getComponentData, attachComponentData } from '@backstage/core-plugin-api';
|
|
2
3
|
import { TECHDOCS_ADDONS_KEY, getDataKeyByName } from './addons.esm.js';
|
|
3
4
|
import { createExtensionDataRef, createExtensionBlueprint } from '@backstage/frontend-plugin-api';
|
|
4
5
|
|
|
@@ -18,8 +19,19 @@ const AddonBlueprint = createExtensionBlueprint({
|
|
|
18
19
|
}
|
|
19
20
|
});
|
|
20
21
|
const attachTechDocsAddonComponentData = (techDocsAddon, data) => {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
const element = React.createElement(techDocsAddon);
|
|
23
|
+
const isDataAttached = getComponentData(
|
|
24
|
+
element,
|
|
25
|
+
TECHDOCS_ADDONS_KEY
|
|
26
|
+
);
|
|
27
|
+
if (!isDataAttached) {
|
|
28
|
+
attachComponentData(techDocsAddon, TECHDOCS_ADDONS_KEY, data);
|
|
29
|
+
}
|
|
30
|
+
const dataKey = getDataKeyByName(data.name);
|
|
31
|
+
const isDataKeyAttached = getComponentData(element, dataKey);
|
|
32
|
+
if (!isDataKeyAttached) {
|
|
33
|
+
attachComponentData(techDocsAddon, dataKey, true);
|
|
34
|
+
}
|
|
23
35
|
};
|
|
24
36
|
|
|
25
37
|
export { AddonBlueprint, attachTechDocsAddonComponentData, techDocsAddonDataRef };
|
package/dist/alpha.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.esm.js","sources":["../src/alpha.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { TechDocsAddonOptions } from './types';\nimport {
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":["../src/alpha.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { TechDocsAddonOptions } from './types';\nimport {\n attachComponentData,\n getComponentData,\n} from '@backstage/core-plugin-api';\nimport { ComponentType } from 'react';\nimport { getDataKeyByName, TECHDOCS_ADDONS_KEY } from './addons';\nimport {\n createExtensionBlueprint,\n createExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\n\n/** @alpha */\nexport type { TechDocsAddonOptions, TechDocsAddonLocations } from './types';\n\n/** @alpha */\nexport const techDocsAddonDataRef =\n createExtensionDataRef<TechDocsAddonOptions>().with({\n id: 'techdocs.addon',\n });\n\n/**\n * Creates an extension to add addons to the TechDocs standalone reader and entity pages.\n * @alpha\n */\nexport const AddonBlueprint = createExtensionBlueprint({\n kind: 'addon',\n attachTo: [\n { id: 'page:techdocs/reader', input: 'addons' },\n { id: 'entity-content:techdocs', input: 'addons' },\n ],\n output: [techDocsAddonDataRef],\n factory: (params: TechDocsAddonOptions) => [techDocsAddonDataRef(params)],\n dataRefs: {\n addon: techDocsAddonDataRef,\n },\n});\n\n/** @alpha */\nexport const attachTechDocsAddonComponentData = <P>(\n techDocsAddon: ComponentType<P>,\n data: TechDocsAddonOptions,\n) => {\n const element = React.createElement(techDocsAddon as ComponentType);\n\n const isDataAttached = getComponentData<TechDocsAddonOptions>(\n element,\n TECHDOCS_ADDONS_KEY,\n );\n if (!isDataAttached) {\n attachComponentData(techDocsAddon, TECHDOCS_ADDONS_KEY, data);\n }\n\n const dataKey = getDataKeyByName(data.name);\n const isDataKeyAttached = getComponentData<boolean>(element, dataKey);\n if (!isDataKeyAttached) {\n attachComponentData(techDocsAddon, dataKey, true);\n }\n};\n"],"names":[],"mappings":";;;;;AAgCa,MAAA,oBAAA,GACX,sBAA6C,EAAA,CAAE,IAAK,CAAA;AAAA,EAClD,EAAI,EAAA;AACN,CAAC;AAMI,MAAM,iBAAiB,wBAAyB,CAAA;AAAA,EACrD,IAAM,EAAA,OAAA;AAAA,EACN,QAAU,EAAA;AAAA,IACR,EAAE,EAAA,EAAI,sBAAwB,EAAA,KAAA,EAAO,QAAS,EAAA;AAAA,IAC9C,EAAE,EAAA,EAAI,yBAA2B,EAAA,KAAA,EAAO,QAAS;AAAA,GACnD;AAAA,EACA,MAAA,EAAQ,CAAC,oBAAoB,CAAA;AAAA,EAC7B,SAAS,CAAC,MAAA,KAAiC,CAAC,oBAAA,CAAqB,MAAM,CAAC,CAAA;AAAA,EACxE,QAAU,EAAA;AAAA,IACR,KAAO,EAAA;AAAA;AAEX,CAAC;AAGY,MAAA,gCAAA,GAAmC,CAC9C,aAAA,EACA,IACG,KAAA;AACH,EAAM,MAAA,OAAA,GAAU,KAAM,CAAA,aAAA,CAAc,aAA8B,CAAA;AAElE,EAAA,MAAM,cAAiB,GAAA,gBAAA;AAAA,IACrB,OAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,IAAI,CAAC,cAAgB,EAAA;AACnB,IAAoB,mBAAA,CAAA,aAAA,EAAe,qBAAqB,IAAI,CAAA;AAAA;AAG9D,EAAM,MAAA,OAAA,GAAU,gBAAiB,CAAA,IAAA,CAAK,IAAI,CAAA;AAC1C,EAAM,MAAA,iBAAA,GAAoB,gBAA0B,CAAA,OAAA,EAAS,OAAO,CAAA;AACpE,EAAA,IAAI,CAAC,iBAAmB,EAAA;AACtB,IAAoB,mBAAA,CAAA,aAAA,EAAe,SAAS,IAAI,CAAA;AAAA;AAEpD;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-techdocs-react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.16-next.0",
|
|
4
4
|
"description": "Shared frontend utilities for TechDocs and Addons",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library",
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"test": "backstage-cli package test"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@backstage/catalog-model": "
|
|
70
|
-
"@backstage/config": "
|
|
71
|
-
"@backstage/core-components": "
|
|
72
|
-
"@backstage/core-plugin-api": "
|
|
73
|
-
"@backstage/frontend-plugin-api": "
|
|
74
|
-
"@backstage/version-bridge": "
|
|
69
|
+
"@backstage/catalog-model": "1.7.3",
|
|
70
|
+
"@backstage/config": "1.3.2",
|
|
71
|
+
"@backstage/core-components": "0.17.1-next.0",
|
|
72
|
+
"@backstage/core-plugin-api": "1.10.5",
|
|
73
|
+
"@backstage/frontend-plugin-api": "0.10.1-next.0",
|
|
74
|
+
"@backstage/version-bridge": "1.0.11",
|
|
75
75
|
"@material-ui/core": "^4.12.2",
|
|
76
76
|
"@material-ui/styles": "^4.11.0",
|
|
77
77
|
"jss": "~10.10.0",
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"react-use": "^17.2.4"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@backstage/cli": "
|
|
84
|
-
"@backstage/test-utils": "
|
|
85
|
-
"@backstage/theme": "
|
|
83
|
+
"@backstage/cli": "0.32.0-next.1",
|
|
84
|
+
"@backstage/test-utils": "1.7.6",
|
|
85
|
+
"@backstage/theme": "0.6.4",
|
|
86
86
|
"@testing-library/jest-dom": "^6.0.0",
|
|
87
87
|
"@testing-library/react": "^16.0.0",
|
|
88
88
|
"@types/react": "^18.0.0",
|