@backstage/plugin-techdocs 0.0.0-nightly-20220316022902 → 0.0.0-nightly-20220324023116

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,6 +1,32 @@
1
1
  # @backstage/plugin-techdocs
2
2
 
3
- ## 0.0.0-nightly-20220316022902
3
+ ## 0.0.0-nightly-20220324023116
4
+
5
+ ### Patch Changes
6
+
7
+ - fe53fe97d7: Fix permalink scrolling for anchors where the id starts with a number.
8
+ - Updated dependencies
9
+ - @backstage/plugin-catalog-react@0.0.0-nightly-20220324023116
10
+ - @backstage/catalog-model@0.0.0-nightly-20220324023116
11
+ - @backstage/plugin-search@0.0.0-nightly-20220324023116
12
+ - @backstage/integration@0.0.0-nightly-20220324023116
13
+ - @backstage/core-components@0.0.0-nightly-20220324023116
14
+ - @backstage/integration-react@0.0.0-nightly-20220324023116
15
+
16
+ ## 1.0.1-next.0
17
+
18
+ ### Patch Changes
19
+
20
+ - fe53fe97d7: Fix permalink scrolling for anchors where the id starts with a number.
21
+ - Updated dependencies
22
+ - @backstage/catalog-model@1.0.1-next.0
23
+ - @backstage/plugin-search@0.7.5-next.0
24
+ - @backstage/integration@1.0.1-next.0
25
+ - @backstage/plugin-catalog-react@1.0.1-next.0
26
+ - @backstage/core-components@0.9.3-next.0
27
+ - @backstage/integration-react@1.0.1-next.0
28
+
29
+ ## 1.0.0
4
30
 
5
31
  ### Major Changes
6
32
 
@@ -20,19 +46,19 @@
20
46
  ### Patch Changes
21
47
 
22
48
  - a422d7ce5e: chore(deps): bump `@testing-library/react` from 11.2.6 to 12.1.3
49
+ - c689d7a94c: Switched to using `CatalogFilterLayout` from `@backstage/plugin-catalog-react`.
23
50
  - f24ef7864e: Minor typo fixes
24
51
  - 06af9e8d17: Long sidebars will no longer overflow the footer and will properly show a scrollbar when needed.
25
52
  - Updated dependencies
26
- - @backstage/core-components@0.0.0-nightly-20220316022902
27
- - @backstage/core-plugin-api@0.0.0-nightly-20220316022902
28
- - @backstage/integration-react@0.0.0-nightly-20220316022902
29
- - @backstage/plugin-catalog-react@0.0.0-nightly-20220316022902
30
- - @backstage/plugin-catalog@0.0.0-nightly-20220316022902
31
- - @backstage/plugin-search@0.0.0-nightly-20220316022902
32
- - @backstage/catalog-model@0.0.0-nightly-20220316022902
33
- - @backstage/integration@0.0.0-nightly-20220316022902
34
- - @backstage/config@0.0.0-nightly-20220316022902
35
- - @backstage/errors@0.0.0-nightly-20220316022902
53
+ - @backstage/core-components@0.9.2
54
+ - @backstage/core-plugin-api@1.0.0
55
+ - @backstage/integration-react@1.0.0
56
+ - @backstage/plugin-catalog-react@1.0.0
57
+ - @backstage/plugin-search@0.7.4
58
+ - @backstage/catalog-model@1.0.0
59
+ - @backstage/integration@1.0.0
60
+ - @backstage/config@1.0.0
61
+ - @backstage/errors@1.0.0
36
62
 
37
63
  ## 0.15.1
38
64
 
@@ -32,7 +32,6 @@ import '@material-ui/icons/Share';
32
32
  import '@material-ui/styles';
33
33
  import '@material-ui/icons/Star';
34
34
  import '@material-ui/icons/StarBorder';
35
- import '@backstage/plugin-catalog';
36
35
 
37
36
  const panels = {
38
37
  DocsTable,
@@ -129,4 +128,4 @@ const TechDocsCustomHome = (props) => {
129
128
  };
130
129
 
131
130
  export { TechDocsCustomHome };
132
- //# sourceMappingURL=TechDocsCustomHome-9a692794.esm.js.map
131
+ //# sourceMappingURL=TechDocsCustomHome-ef44d6a8.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TechDocsCustomHome-9a692794.esm.js","sources":["../../src/home/components/TechDocsCustomHome.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 React, { useState } from 'react';\nimport useAsync from 'react-use/lib/useAsync';\nimport { makeStyles } from '@material-ui/core';\nimport { CSSProperties } from '@material-ui/styles';\nimport {\n CATALOG_FILTER_EXISTS,\n catalogApiRef,\n CatalogApi,\n useEntityOwnership,\n} from '@backstage/plugin-catalog-react';\nimport { Entity } from '@backstage/catalog-model';\nimport { DocsTable } from './Tables';\nimport { DocsCardGrid } from './Grids';\nimport { TechDocsPageWrapper } from './TechDocsPageWrapper';\n\nimport {\n CodeSnippet,\n Content,\n HeaderTabs,\n Progress,\n WarningPanel,\n SupportButton,\n ContentHeader,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nconst panels = {\n DocsTable: DocsTable,\n DocsCardGrid: DocsCardGrid,\n};\n\n/**\n * Available panel types\n *\n * @public\n */\nexport type PanelType = 'DocsCardGrid' | 'DocsTable';\n\n/**\n * Type representing a TechDocsCustomHome panel.\n *\n * @public\n */\nexport interface PanelConfig {\n title: string;\n description: string;\n panelType: PanelType;\n panelCSS?: CSSProperties;\n filterPredicate: ((entity: Entity) => boolean) | string;\n}\n\n/**\n * Type representing a TechDocsCustomHome tab.\n *\n * @public\n */\nexport interface TabConfig {\n label: string;\n panels: PanelConfig[];\n}\n\n/**\n * Type representing a list of TechDocsCustomHome tabs.\n *\n * @public\n */\nexport type TabsConfig = TabConfig[];\n\nconst CustomPanel = ({\n config,\n entities,\n index,\n}: {\n config: PanelConfig;\n entities: Entity[];\n index: number;\n}) => {\n const useStyles = makeStyles({\n panelContainer: {\n marginBottom: '2rem',\n ...(config.panelCSS ? config.panelCSS : {}),\n },\n });\n const classes = useStyles();\n const { loading: loadingOwnership, isOwnedEntity } = useEntityOwnership();\n\n const Panel = panels[config.panelType];\n\n const shownEntities = entities.filter(entity => {\n if (config.filterPredicate === 'ownedByUser') {\n if (loadingOwnership) {\n return false;\n }\n return isOwnedEntity(entity);\n }\n\n return (\n typeof config.filterPredicate === 'function' &&\n config.filterPredicate(entity)\n );\n });\n\n return (\n <>\n <ContentHeader title={config.title} description={config.description}>\n {index === 0 ? (\n <SupportButton>\n Discover documentation in your ecosystem.\n </SupportButton>\n ) : null}\n </ContentHeader>\n <div className={classes.panelContainer}>\n <Panel data-testid=\"techdocs-custom-panel\" entities={shownEntities} />\n </div>\n </>\n );\n};\n\n/**\n * Props for {@link TechDocsCustomHome}\n *\n * @public\n */\nexport type TechDocsCustomHomeProps = {\n tabsConfig: TabsConfig;\n};\n\nexport const TechDocsCustomHome = (props: TechDocsCustomHomeProps) => {\n const { tabsConfig } = props;\n const [selectedTab, setSelectedTab] = useState<number>(0);\n const catalogApi: CatalogApi = useApi(catalogApiRef);\n\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: {\n 'metadata.annotations.backstage.io/techdocs-ref': CATALOG_FILTER_EXISTS,\n },\n fields: [\n 'apiVersion',\n 'kind',\n 'metadata',\n 'relations',\n 'spec.owner',\n 'spec.type',\n ],\n });\n return response.items.filter((entity: Entity) => {\n return !!entity.metadata.annotations?.['backstage.io/techdocs-ref'];\n });\n });\n\n const currentTabConfig = tabsConfig[selectedTab];\n\n if (loading) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <Progress />\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n if (error) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <WarningPanel\n severity=\"error\"\n title=\"Could not load available documentation.\"\n >\n <CodeSnippet language=\"text\" text={error.toString()} />\n </WarningPanel>\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n return (\n <TechDocsPageWrapper>\n <HeaderTabs\n selectedIndex={selectedTab}\n onChange={index => setSelectedTab(index)}\n tabs={tabsConfig.map(({ label }, index) => ({\n id: index.toString(),\n label,\n }))}\n />\n <Content data-testid=\"techdocs-content\">\n {currentTabConfig.panels.map((config, index) => (\n <CustomPanel\n key={index}\n config={config}\n entities={!!entities ? entities : []}\n index={index}\n />\n ))}\n </Content>\n </TechDocsPageWrapper>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,MAAM,MAAS,GAAA;AAAA,EACb,SAAA;AAAA,EACA,YAAA;AAAA,CAAA,CAAA;AAwCF,MAAM,cAAc,CAAC;AAAA,EACnB,MAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,CAKI,KAAA;AACJ,EAAA,MAAM,YAAY,UAAW,CAAA;AAAA,IAC3B,cAAgB,EAAA;AAAA,MACd,YAAc,EAAA,MAAA;AAAA,MACV,GAAA,MAAA,CAAO,QAAW,GAAA,MAAA,CAAO,QAAW,GAAA,EAAA;AAAA,KAAA;AAAA,GAAA,CAAA,CAAA;AAG5C,EAAA,MAAM,OAAU,GAAA,SAAA,EAAA,CAAA;AAChB,EAAM,MAAA,EAAE,OAAS,EAAA,gBAAA,EAAkB,aAAkB,EAAA,GAAA,kBAAA,EAAA,CAAA;AAErD,EAAM,MAAA,KAAA,GAAQ,OAAO,MAAO,CAAA,SAAA,CAAA,CAAA;AAE5B,EAAM,MAAA,aAAA,GAAgB,QAAS,CAAA,MAAA,CAAO,CAAU,MAAA,KAAA;AAC9C,IAAI,IAAA,MAAA,CAAO,oBAAoB,aAAe,EAAA;AAC5C,MAAA,IAAI,gBAAkB,EAAA;AACpB,QAAO,OAAA,KAAA,CAAA;AAAA,OAAA;AAET,MAAA,OAAO,aAAc,CAAA,MAAA,CAAA,CAAA;AAAA,KAAA;AAGvB,IAAA,OACE,OAAO,MAAA,CAAO,eAAoB,KAAA,UAAA,IAClC,OAAO,eAAgB,CAAA,MAAA,CAAA,CAAA;AAAA,GAAA,CAAA,CAAA;AAI3B,EACE,uBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,sCACG,aAAD,EAAA;AAAA,IAAe,OAAO,MAAO,CAAA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AAAA,IAClC,KAAA;AAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA;;;;"}
1
+ {"version":3,"file":"TechDocsCustomHome-ef44d6a8.esm.js","sources":["../../src/home/components/TechDocsCustomHome.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 React, { useState } from 'react';\nimport useAsync from 'react-use/lib/useAsync';\nimport { makeStyles } from '@material-ui/core';\nimport { CSSProperties } from '@material-ui/styles';\nimport {\n CATALOG_FILTER_EXISTS,\n catalogApiRef,\n CatalogApi,\n useEntityOwnership,\n} from '@backstage/plugin-catalog-react';\nimport { Entity } from '@backstage/catalog-model';\nimport { DocsTable } from './Tables';\nimport { DocsCardGrid } from './Grids';\nimport { TechDocsPageWrapper } from './TechDocsPageWrapper';\n\nimport {\n CodeSnippet,\n Content,\n HeaderTabs,\n Progress,\n WarningPanel,\n SupportButton,\n ContentHeader,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nconst panels = {\n DocsTable: DocsTable,\n DocsCardGrid: DocsCardGrid,\n};\n\n/**\n * Available panel types\n *\n * @public\n */\nexport type PanelType = 'DocsCardGrid' | 'DocsTable';\n\n/**\n * Type representing a TechDocsCustomHome panel.\n *\n * @public\n */\nexport interface PanelConfig {\n title: string;\n description: string;\n panelType: PanelType;\n panelCSS?: CSSProperties;\n filterPredicate: ((entity: Entity) => boolean) | string;\n}\n\n/**\n * Type representing a TechDocsCustomHome tab.\n *\n * @public\n */\nexport interface TabConfig {\n label: string;\n panels: PanelConfig[];\n}\n\n/**\n * Type representing a list of TechDocsCustomHome tabs.\n *\n * @public\n */\nexport type TabsConfig = TabConfig[];\n\nconst CustomPanel = ({\n config,\n entities,\n index,\n}: {\n config: PanelConfig;\n entities: Entity[];\n index: number;\n}) => {\n const useStyles = makeStyles({\n panelContainer: {\n marginBottom: '2rem',\n ...(config.panelCSS ? config.panelCSS : {}),\n },\n });\n const classes = useStyles();\n const { loading: loadingOwnership, isOwnedEntity } = useEntityOwnership();\n\n const Panel = panels[config.panelType];\n\n const shownEntities = entities.filter(entity => {\n if (config.filterPredicate === 'ownedByUser') {\n if (loadingOwnership) {\n return false;\n }\n return isOwnedEntity(entity);\n }\n\n return (\n typeof config.filterPredicate === 'function' &&\n config.filterPredicate(entity)\n );\n });\n\n return (\n <>\n <ContentHeader title={config.title} description={config.description}>\n {index === 0 ? (\n <SupportButton>\n Discover documentation in your ecosystem.\n </SupportButton>\n ) : null}\n </ContentHeader>\n <div className={classes.panelContainer}>\n <Panel data-testid=\"techdocs-custom-panel\" entities={shownEntities} />\n </div>\n </>\n );\n};\n\n/**\n * Props for {@link TechDocsCustomHome}\n *\n * @public\n */\nexport type TechDocsCustomHomeProps = {\n tabsConfig: TabsConfig;\n};\n\nexport const TechDocsCustomHome = (props: TechDocsCustomHomeProps) => {\n const { tabsConfig } = props;\n const [selectedTab, setSelectedTab] = useState<number>(0);\n const catalogApi: CatalogApi = useApi(catalogApiRef);\n\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: {\n 'metadata.annotations.backstage.io/techdocs-ref': CATALOG_FILTER_EXISTS,\n },\n fields: [\n 'apiVersion',\n 'kind',\n 'metadata',\n 'relations',\n 'spec.owner',\n 'spec.type',\n ],\n });\n return response.items.filter((entity: Entity) => {\n return !!entity.metadata.annotations?.['backstage.io/techdocs-ref'];\n });\n });\n\n const currentTabConfig = tabsConfig[selectedTab];\n\n if (loading) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <Progress />\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n if (error) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <WarningPanel\n severity=\"error\"\n title=\"Could not load available documentation.\"\n >\n <CodeSnippet language=\"text\" text={error.toString()} />\n </WarningPanel>\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n return (\n <TechDocsPageWrapper>\n <HeaderTabs\n selectedIndex={selectedTab}\n onChange={index => setSelectedTab(index)}\n tabs={tabsConfig.map(({ label }, index) => ({\n id: index.toString(),\n label,\n }))}\n />\n <Content data-testid=\"techdocs-content\">\n {currentTabConfig.panels.map((config, index) => (\n <CustomPanel\n key={index}\n config={config}\n entities={!!entities ? entities : []}\n index={index}\n />\n ))}\n </Content>\n </TechDocsPageWrapper>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,MAAM,MAAS,GAAA;AAAA,EACb,SAAA;AAAA,EACA,YAAA;AACF,CAAA,CAAA;AAuCA,MAAM,cAAc,CAAC;AAAA,EACnB,MAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,CAKI,KAAA;AACJ,EAAA,MAAM,YAAY,UAAW,CAAA;AAAA,IAC3B,cAAgB,EAAA;AAAA,MACd,YAAc,EAAA,MAAA;AAAA,MAAA,GACV,MAAO,CAAA,QAAA,GAAW,MAAO,CAAA,QAAA,GAAW,EAAC;AAAA,KAC3C;AAAA,GACD,CAAA,CAAA;AACD,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAC1B,EAAA,MAAM,EAAE,OAAA,EAAS,gBAAkB,EAAA,aAAA,EAAA,GAAkB,kBAAmB,EAAA,CAAA;AAExE,EAAM,MAAA,KAAA,GAAQ,OAAO,MAAO,CAAA,SAAA,CAAA,CAAA;AAE5B,EAAM,MAAA,aAAA,GAAgB,QAAS,CAAA,MAAA,CAAO,CAAU,MAAA,KAAA;AAC9C,IAAI,IAAA,MAAA,CAAO,oBAAoB,aAAe,EAAA;AAC5C,MAAA,IAA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S,KAAA,KAAA,cAAA,CAAe,KAAK,CAAA;AAAA,IACvC,MAAM,UAAW,CAAA,GAAA,CAAI,CAAC,EAAE,SAAS,KAAW,MAAA;AAAA,MAC1C,EAAA,EAAI,MAAM,QAAS,EAAA;AAAA,MACnB,KAAA;AAAA,KACA,CAAA,CAAA;AAAA,GACJ,mBACC,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA;AAAA,IAAQ,aAAY,EAAA,kBAAA;AAAA,GAAA,EAClB,iBAAiB,MAAO,CAAA,GAAA,CAAI,CAAC,MAAA,EAAQ,0BACnC,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA;AAAA,IACC,GAAK,EAAA,KAAA;AAAA,IACL,MAAA;AAAA,IACA,QAAU,EAAA,CAAC,CAAC,QAAA,GAAW,WAAW,EAAC;AAAA,IACnC,KAAA;AAAA,GACF,CACD,CACH,CACF,CAAA,CAAA;AAEJ;;;;"}
package/dist/index.esm.js CHANGED
@@ -24,14 +24,13 @@ import useAsync from 'react-use/lib/useAsync';
24
24
  import useAsyncRetry from 'react-use/lib/useAsyncRetry';
25
25
  import CodeIcon from '@material-ui/icons/Code';
26
26
  import { RELATION_OWNED_BY } from '@backstage/catalog-model';
27
- import { getEntityRelations, EntityRefLink, EntityRefLinks, useEntityList, humanizeEntityRef, useStarredEntities, CATALOG_FILTER_EXISTS, EntityListProvider, UserListPicker, EntityOwnerPicker, EntityTagPicker, useEntity } from '@backstage/plugin-catalog-react';
27
+ import { getEntityRelations, EntityRefLink, EntityRefLinks, useEntityList, humanizeEntityRef, useStarredEntities, CATALOG_FILTER_EXISTS, EntityListProvider, CatalogFilterLayout, UserListPicker, EntityOwnerPicker, EntityTagPicker, useEntity } from '@backstage/plugin-catalog-react';
28
28
  import useCopyToClipboard from 'react-use/lib/useCopyToClipboard';
29
29
  import { capitalize } from 'lodash';
30
30
  import ShareIcon from '@material-ui/icons/Share';
31
31
  import { withStyles as withStyles$1 } from '@material-ui/styles';
32
32
  import Star from '@material-ui/icons/Star';
33
33
  import StarBorder from '@material-ui/icons/StarBorder';
34
- import { FilteredEntityLayout, FilterContainer, EntityListContainer } from '@backstage/plugin-catalog';
35
34
 
36
35
  const techdocsStorageApiRef = createApiRef({
37
36
  id: "plugin.techdocs.storageservice"
@@ -465,7 +464,7 @@ const scrollIntoAnchor = () => {
465
464
  var _a;
466
465
  if (window.location.hash) {
467
466
  const hash = window.location.hash.slice(1);
468
- (_a = dom == null ? void 0 : dom.querySelector(`#${hash}`)) == null ? void 0 : _a.scrollIntoView();
467
+ (_a = dom == null ? void 0 : dom.querySelector(`[id="${hash}"]`)) == null ? void 0 : _a.scrollIntoView();
469
468
  }
470
469
  }, 200);
471
470
  return dom;
@@ -1938,9 +1937,9 @@ const DefaultTechDocsHome = (props) => {
1938
1937
  const { initialFilter = "all", columns, actions } = props;
1939
1938
  return /* @__PURE__ */ React.createElement(TechDocsPageWrapper, null, /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(ContentHeader, {
1940
1939
  title: ""
1941
- }, /* @__PURE__ */ React.createElement(SupportButton, null, "Discover documentation in your ecosystem.")), /* @__PURE__ */ React.createElement(EntityListProvider, null, /* @__PURE__ */ React.createElement(FilteredEntityLayout, null, /* @__PURE__ */ React.createElement(FilterContainer, null, /* @__PURE__ */ React.createElement(TechDocsPicker, null), /* @__PURE__ */ React.createElement(UserListPicker, {
1940
+ }, /* @__PURE__ */ React.createElement(SupportButton, null, "Discover documentation in your ecosystem.")), /* @__PURE__ */ React.createElement(EntityListProvider, null, /* @__PURE__ */ React.createElement(CatalogFilterLayout, null, /* @__PURE__ */ React.createElement(CatalogFilterLayout.Filters, null, /* @__PURE__ */ React.createElement(TechDocsPicker, null), /* @__PURE__ */ React.createElement(UserListPicker, {
1942
1941
  initialFilter
1943
- }), /* @__PURE__ */ React.createElement(EntityOwnerPicker, null), /* @__PURE__ */ React.createElement(EntityTagPicker, null)), /* @__PURE__ */ React.createElement(EntityListContainer, null, /* @__PURE__ */ React.createElement(EntityListDocsTable, {
1942
+ }), /* @__PURE__ */ React.createElement(EntityOwnerPicker, null), /* @__PURE__ */ React.createElement(EntityTagPicker, null)), /* @__PURE__ */ React.createElement(CatalogFilterLayout.Content, null, /* @__PURE__ */ React.createElement(EntityListDocsTable, {
1944
1943
  actions,
1945
1944
  columns
1946
1945
  }))))));
@@ -1996,7 +1995,7 @@ const EntityTechdocsContent = techdocsPlugin.provide(createRoutableExtension({
1996
1995
  }));
1997
1996
  const TechDocsCustomHome = techdocsPlugin.provide(createRoutableExtension({
1998
1997
  name: "TechDocsCustomHome",
1999
- component: () => import('./esm/TechDocsCustomHome-9a692794.esm.js').then((m) => m.TechDocsCustomHome),
1998
+ component: () => import('./esm/TechDocsCustomHome-ef44d6a8.esm.js').then((m) => m.TechDocsCustomHome),
2000
1999
  mountPoint: rootRouteRef
2001
2000
  }));
2002
2001
  const TechDocsIndexPage$2 = techdocsPlugin.provide(createRoutableExtension({