@backstage/plugin-home-react 0.0.0-nightly-20260919022921 → 0.0.0-nightly-20260921023416
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 +5 -5
- package/dist/alpha/blueprints/HomePageLayoutBlueprint.esm.js.map +1 -1
- package/dist/alpha/blueprints/HomePageWidgetBlueprint.esm.js.map +1 -1
- package/dist/alpha/dataRefs.esm.js.map +1 -1
- package/dist/alpha.d.ts +1 -1
- package/dist/alpha.esm.js.map +1 -1
- package/dist/components/ContentModal.esm.js.map +1 -1
- package/dist/components/SettingsModal.esm.js.map +1 -1
- package/dist/extensions.esm.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/translation.esm.js.map +1 -1
- package/dist/types/{extensions.d-DQsoa5fm.d.ts → extensions.d-Xd5iF6ch.d.ts} +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# @backstage/plugin-home-react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20260921023416
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- Updated dependencies
|
|
8
|
-
- @backstage/core-components@0.0.0-nightly-
|
|
9
|
-
- @backstage/core-plugin-api@0.0.0-nightly-
|
|
10
|
-
- @backstage/frontend-plugin-api@0.0.0-nightly-
|
|
11
|
-
- @backstage/core-compat-api@0.0.0-nightly-
|
|
8
|
+
- @backstage/core-components@0.0.0-nightly-20260921023416
|
|
9
|
+
- @backstage/core-plugin-api@0.0.0-nightly-20260921023416
|
|
10
|
+
- @backstage/frontend-plugin-api@0.0.0-nightly-20260921023416
|
|
11
|
+
- @backstage/core-compat-api@0.0.0-nightly-20260921023416
|
|
12
12
|
|
|
13
13
|
## 0.1.42
|
|
14
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomePageLayoutBlueprint.esm.js","sources":["../../../src/alpha/blueprints/HomePageLayoutBlueprint.tsx"],"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 */\n\nimport { JSX } from 'react';\nimport {\n createExtensionBlueprint,\n ExtensionBoundary,\n} from '@backstage/frontend-plugin-api';\nimport {\n homePageLayoutComponentDataRef,\n HomePageLayoutProps,\n} from '../dataRefs';\n\n/**\n * Parameters for creating a home page layout extension.\n *\n * @alpha\n */\nexport interface HomePageLayoutBlueprintParams {\n /**\n * Async loader that returns the layout component.\n * The component receives the collected widgets and renders them.\n */\n loader: () => Promise<(props: HomePageLayoutProps) => JSX.Element>;\n}\n\n/**\n * Blueprint for creating custom home page layouts.\n *\n * A layout receives the list of installed widgets and is responsible for\n * arranging them on the home page. This follows the same pattern as\n * `EntityContentLayoutBlueprint` in the catalog plugin.\n *\n * If no layout extension is installed, the home page uses a built-in default.\n * Users can install their own layout to customize how widgets are arranged.\n *\n * @alpha\n */\nexport const HomePageLayoutBlueprint = createExtensionBlueprint({\n kind: 'home-page-layout',\n attachTo: { id: 'page:home', input: 'layout' },\n output: [homePageLayoutComponentDataRef],\n dataRefs: {\n component: homePageLayoutComponentDataRef,\n },\n *factory({ loader }: HomePageLayoutBlueprintParams, { node }) {\n yield homePageLayoutComponentDataRef(\n ExtensionBoundary.lazyComponent(node, loader),\n );\n },\n});\n"],"names":[],"mappings":";;;AAmDO,MAAM,0BAA0B,wBAAA,CAAyB;AAAA,EAC9D,IAAA,EAAM,kBAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,WAAA,EAAa,OAAO,QAAA,EAAS;AAAA,EAC7C,MAAA,EAAQ,CAAC,8BAA8B,CAAA;AAAA,EACvC,QAAA,EAAU;AAAA,IACR,SAAA,EAAW;AAAA,GACb;AAAA,EACA,CAAC,OAAA,CAAQ,EAAE,QAAO,EAAkC,EAAE,MAAK,EAAG;AAC5D,IAAA,MAAM,8BAAA;AAAA,MACJ,iBAAA,CAAkB,aAAA,CAAc,IAAA,EAAM,MAAM;AAAA,KAC9C;AAAA,EACF;AACF,CAAC
|
|
1
|
+
{"version":3,"file":"HomePageLayoutBlueprint.esm.js","sources":["../../../src/alpha/blueprints/HomePageLayoutBlueprint.tsx"],"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 */\n\nimport { JSX } from 'react';\nimport {\n createExtensionBlueprint,\n ExtensionBoundary,\n} from '@backstage/frontend-plugin-api';\nimport {\n homePageLayoutComponentDataRef,\n HomePageLayoutProps,\n} from '../dataRefs';\n\n/**\n * Parameters for creating a home page layout extension.\n *\n * @alpha\n */\nexport interface HomePageLayoutBlueprintParams {\n /**\n * Async loader that returns the layout component.\n * The component receives the collected widgets and renders them.\n */\n loader: () => Promise<(props: HomePageLayoutProps) => JSX.Element>;\n}\n\n/**\n * Blueprint for creating custom home page layouts.\n *\n * A layout receives the list of installed widgets and is responsible for\n * arranging them on the home page. This follows the same pattern as\n * `EntityContentLayoutBlueprint` in the catalog plugin.\n *\n * If no layout extension is installed, the home page uses a built-in default.\n * Users can install their own layout to customize how widgets are arranged.\n *\n * @alpha\n */\nexport const HomePageLayoutBlueprint = createExtensionBlueprint({\n kind: 'home-page-layout',\n attachTo: { id: 'page:home', input: 'layout' },\n output: [homePageLayoutComponentDataRef],\n dataRefs: {\n component: homePageLayoutComponentDataRef,\n },\n *factory({ loader }: HomePageLayoutBlueprintParams, { node }) {\n yield homePageLayoutComponentDataRef(\n ExtensionBoundary.lazyComponent(node, loader),\n );\n },\n});\n"],"names":[],"mappings":";;;AAmDO,MAAM,0BAA0B,wBAAA,CAAyB;AAAA,EAC9D,IAAA,EAAM,kBAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,WAAA,EAAa,OAAO,QAAA,EAAS;AAAA,EAC7C,MAAA,EAAQ,CAAC,8BAA8B,CAAA;AAAA,EACvC,QAAA,EAAU;AAAA,IACR,SAAA,EAAW;AAAA,GACb;AAAA,EACA,CAAC,OAAA,CAAQ,EAAE,QAAO,EAAkC,EAAE,MAAK,EAAG;AAC5D,IAAA,MAAM,8BAAA;AAAA,MACJ,iBAAA,CAAkB,aAAA,CAAc,IAAA,EAAM,MAAM;AAAA,KAC9C;AAAA,EACF;AACF,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomePageWidgetBlueprint.esm.js","sources":["../../../src/alpha/blueprints/HomePageWidgetBlueprint.tsx"],"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 */\n\nimport { lazy, ReactElement } from 'react';\nimport {\n createExtensionBlueprint,\n ExtensionBoundary,\n} from '@backstage/frontend-plugin-api';\nimport { attachComponentData } from '@backstage/core-plugin-api';\nimport {\n CardExtension,\n CardExtensionProps,\n CardLayout,\n CardSettings,\n ComponentParts,\n} from '../../extensions';\nimport { homePageWidgetDataRef } from '../dataRefs';\n\n/**\n * Parameters for creating a home page widget extension.\n *\n * @alpha\n */\nexport interface HomePageWidgetBlueprintParams {\n /**\n * Optional name for the widget. If not provided, the extension will use only its kind\n * in the extension ID.\n */\n name?: string;\n /**\n * Optional title displayed for the widget, used as the default card heading.\n */\n title?: string;\n /**\n * Optional description shown in the widget catalog when adding new cards.\n */\n description?: string;\n /**\n * Component parts rendered within the card.\n */\n components: () => Promise<ComponentParts>;\n /**\n * Layout hints used by the customizable grid.\n */\n layout?: CardLayout;\n /**\n * Schema used to configure widget settings.\n */\n settings?: CardSettings;\n /**\n * Default props forwarded to the rendered widget component.\n */\n componentProps?: Record<string, unknown>;\n}\n\nconst DEFAULT_WIDGET_ATTACH_POINT = {\n id: 'page:home',\n input: 'widgets',\n} as const;\n\n/**\n * Creates widgets that can be installed into the home page grid.\n *\n * @alpha\n */\nexport const HomePageWidgetBlueprint = createExtensionBlueprint({\n kind: 'home-page-widget',\n attachTo: DEFAULT_WIDGET_ATTACH_POINT,\n dataRefs: {\n widget: homePageWidgetDataRef,\n },\n output: [homePageWidgetDataRef],\n *factory(params: HomePageWidgetBlueprintParams, { node }) {\n const isCustomizable = params.settings?.schema !== undefined;\n const widgetName = params.name ?? node.spec.id;\n const LazyCard = lazy(() =>\n params.components().then(parts => ({\n default: (props: CardExtensionProps<Record<string, unknown>>) => (\n <CardExtension\n {...props}\n {...parts}\n title={props.title || params.title}\n isCustomizable={isCustomizable}\n />\n ),\n })),\n );\n\n const Widget = (\n props: CardExtensionProps<Record<string, unknown>>,\n ): ReactElement => (\n <ExtensionBoundary node={node}>\n <LazyCard {...props} />\n </ExtensionBoundary>\n );\n\n attachComponentData(Widget, 'core.extensionName', widgetName);\n attachComponentData(Widget, 'title', params.title);\n attachComponentData(Widget, 'description', params.description);\n attachComponentData(Widget, 'home.widget.config', {\n layout: params.layout,\n settings: params.settings,\n });\n\n yield homePageWidgetDataRef({\n node,\n component: <Widget {...(params.componentProps ?? {})} />,\n name: widgetName,\n title: params.title,\n description: params.description,\n layout: params.layout,\n settings: params.settings,\n });\n },\n});\n"],"names":[],"mappings":";;;;;;;AAoEA,MAAM,2BAAA,GAA8B;AAAA,EAClC,EAAA,EAAI,WAAA;AAAA,EACJ,KAAA,EAAO;AACT,CAAA;AAOO,MAAM,0BAA0B,wBAAA,CAAyB;AAAA,EAC9D,IAAA,EAAM,kBAAA;AAAA,EACN,QAAA,EAAU,2BAAA;AAAA,EACV,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,MAAA,EAAQ,CAAC,qBAAqB,CAAA;AAAA,EAC9B,CAAC,OAAA,CAAQ,MAAA,EAAuC,EAAE,MAAK,EAAG;AACxD,IAAA,MAAM,cAAA,GAAiB,MAAA,CAAO,QAAA,EAAU,MAAA,KAAW,MAAA;AACnD,IAAA,MAAM,UAAA,GAAa,MAAA,CAAO,IAAA,IAAQ,IAAA,CAAK,IAAA,CAAK,EAAA;AAC5C,IAAA,MAAM,QAAA,GAAW,IAAA;AAAA,MAAK,MACpB,MAAA,CAAO,UAAA,EAAW,CAAE,KAAK,CAAA,KAAA,MAAU;AAAA,QACjC,OAAA,EAAS,CAAC,KAAA,qBACR,GAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACE,GAAG,KAAA;AAAA,YACH,GAAG,KAAA;AAAA,YACJ,KAAA,EAAO,KAAA,CAAM,KAAA,IAAS,MAAA,CAAO,KAAA;AAAA,YAC7B;AAAA;AAAA;AACF,OAEJ,CAAE;AAAA,KACJ;AAEA,IAAA,MAAM,MAAA,GAAS,CACb,KAAA,qBAEA,GAAA,CAAC,iBAAA,EAAA,EAAkB,MACjB,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAU,GAAG,KAAA,EAAO,CAAA,EACvB,CAAA;AAGF,IAAA,mBAAA,CAAoB,MAAA,EAAQ,sBAAsB,UAAU,CAAA;AAC5D,IAAA,mBAAA,CAAoB,MAAA,EAAQ,OAAA,EAAS,MAAA,CAAO,KAAK,CAAA;AACjD,IAAA,mBAAA,CAAoB,MAAA,EAAQ,aAAA,EAAe,MAAA,CAAO,WAAW,CAAA;AAC7D,IAAA,mBAAA,CAAoB,QAAQ,oBAAA,EAAsB;AAAA,MAChD,QAAQ,MAAA,CAAO,MAAA;AAAA,MACf,UAAU,MAAA,CAAO;AAAA,KAClB,CAAA;AAED,IAAA,MAAM,qBAAA,CAAsB;AAAA,MAC1B,IAAA;AAAA,MACA,2BAAW,GAAA,CAAC,MAAA,EAAA,EAAQ,GAAI,MAAA,CAAO,cAAA,IAAkB,EAAC,EAAI,CAAA;AAAA,MACtD,IAAA,EAAM,UAAA;AAAA,MACN,OAAO,MAAA,CAAO,KAAA;AAAA,MACd,aAAa,MAAA,CAAO,WAAA;AAAA,MACpB,QAAQ,MAAA,CAAO,MAAA;AAAA,MACf,UAAU,MAAA,CAAO;AAAA,KAClB,CAAA;AAAA,EACH;AACF,CAAC
|
|
1
|
+
{"version":3,"file":"HomePageWidgetBlueprint.esm.js","sources":["../../../src/alpha/blueprints/HomePageWidgetBlueprint.tsx"],"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 */\n\nimport { lazy, ReactElement } from 'react';\nimport {\n createExtensionBlueprint,\n ExtensionBoundary,\n} from '@backstage/frontend-plugin-api';\nimport { attachComponentData } from '@backstage/core-plugin-api';\nimport {\n CardExtension,\n CardExtensionProps,\n CardLayout,\n CardSettings,\n ComponentParts,\n} from '../../extensions';\nimport { homePageWidgetDataRef } from '../dataRefs';\n\n/**\n * Parameters for creating a home page widget extension.\n *\n * @alpha\n */\nexport interface HomePageWidgetBlueprintParams {\n /**\n * Optional name for the widget. If not provided, the extension will use only its kind\n * in the extension ID.\n */\n name?: string;\n /**\n * Optional title displayed for the widget, used as the default card heading.\n */\n title?: string;\n /**\n * Optional description shown in the widget catalog when adding new cards.\n */\n description?: string;\n /**\n * Component parts rendered within the card.\n */\n components: () => Promise<ComponentParts>;\n /**\n * Layout hints used by the customizable grid.\n */\n layout?: CardLayout;\n /**\n * Schema used to configure widget settings.\n */\n settings?: CardSettings;\n /**\n * Default props forwarded to the rendered widget component.\n */\n componentProps?: Record<string, unknown>;\n}\n\nconst DEFAULT_WIDGET_ATTACH_POINT = {\n id: 'page:home',\n input: 'widgets',\n} as const;\n\n/**\n * Creates widgets that can be installed into the home page grid.\n *\n * @alpha\n */\nexport const HomePageWidgetBlueprint = createExtensionBlueprint({\n kind: 'home-page-widget',\n attachTo: DEFAULT_WIDGET_ATTACH_POINT,\n dataRefs: {\n widget: homePageWidgetDataRef,\n },\n output: [homePageWidgetDataRef],\n *factory(params: HomePageWidgetBlueprintParams, { node }) {\n const isCustomizable = params.settings?.schema !== undefined;\n const widgetName = params.name ?? node.spec.id;\n const LazyCard = lazy(() =>\n params.components().then(parts => ({\n default: (props: CardExtensionProps<Record<string, unknown>>) => (\n <CardExtension\n {...props}\n {...parts}\n title={props.title || params.title}\n isCustomizable={isCustomizable}\n />\n ),\n })),\n );\n\n const Widget = (\n props: CardExtensionProps<Record<string, unknown>>,\n ): ReactElement => (\n <ExtensionBoundary node={node}>\n <LazyCard {...props} />\n </ExtensionBoundary>\n );\n\n attachComponentData(Widget, 'core.extensionName', widgetName);\n attachComponentData(Widget, 'title', params.title);\n attachComponentData(Widget, 'description', params.description);\n attachComponentData(Widget, 'home.widget.config', {\n layout: params.layout,\n settings: params.settings,\n });\n\n yield homePageWidgetDataRef({\n node,\n component: <Widget {...(params.componentProps ?? {})} />,\n name: widgetName,\n title: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AO,KAAK,CAAA;AACjD,IAAA,mBAAA,CAAoB,MAAA,EAAQ,aAAA,EAAe,MAAA,CAAO,WAAW,CAAA;AAC7D,IAAA,mBAAA,CAAoB,QAAQ,oBAAA,EAAsB;AAAA,MAChD,QAAQ,MAAA,CAAO,MAAA;AAAA,MACf,UAAU,MAAA,CAAO;AAAA,KAClB,CAAA;AAED,IAAA,MAAM,qBAAA,CAAsB;AAAA,MAC1B,IAAA;AAAA,MACA,2BAAW,GAAA,CAAC,MAAA,EAAA,EAAQ,GAAI,MAAA,CAAO,cAAA,IAAkB,EAAC,EAAI,CAAA;AAAA,MACtD,IAAA,EAAM,UAAA;AAAA,MACN,OAAO,MAAA,CAAO,KAAA;AAAA,MACd,aAAa,MAAA,CAAO,WAAA;AAAA,MACpB,QAAQ,MAAA,CAAO,MAAA;AAAA,MACf,UAAU,MAAA,CAAO;AAAA,KAClB,CAAA;AAAA,EACH;AACF,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataRefs.esm.js","sources":["../../src/alpha/dataRefs.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 */\n\nimport {\n createExtensionDataRef,\n type AppNode,\n} from '@backstage/frontend-plugin-api';\nimport { JSX, ReactElement } from 'react';\nimport type { CardLayout, CardSettings } from '../extensions';\n\n/**\n * Extension data for homepage widgets, bundling the rendered component\n * with its metadata.\n *\n * @alpha\n */\nexport interface HomePageWidgetData {\n /**\n * The originating app node for this widget.\n */\n node: AppNode;\n /**\n * The rendered widget component (typically a card with header, content, etc.)\n */\n component: ReactElement;\n /**\n * Optional name identifier for the widget\n */\n name?: string;\n /**\n * Optional title displayed in the widget header\n */\n title?: string;\n /**\n * Optional description shown in widget catalogs or configuration UIs\n */\n description?: string;\n /**\n * Optional layout hints for positioning and sizing\n */\n layout?: CardLayout;\n /**\n * Optional settings schema for widget configuration\n */\n settings?: CardSettings;\n}\n\n/**\n * Extension data ref for homepage widgets.\n *\n * This follows the pattern from FormFieldBlueprint, bundling the component\n * and metadata into a single comprehensive data ref rather than outputting\n * them separately.\n *\n * @alpha\n */\nexport const homePageWidgetDataRef =\n createExtensionDataRef<HomePageWidgetData>().with({\n id: 'home.widget.data',\n });\n\n/**\n * Default layout configuration for a widget in the home page grid.\n *\n * @alpha\n */\nexport interface HomePageDefaultConfigItem {\n component: string;\n column: number;\n row: number;\n width: number;\n height: number;\n movable?: boolean;\n deletable?: boolean;\n resizable?: boolean;\n}\n\n/**\n * Props provided to a home page layout component.\n *\n * @alpha\n */\nexport interface HomePageLayoutProps {\n /**\n * The list of widget elements and metadata to render on the home page.\n */\n widgets: Array<HomePageWidgetData>;\n /**\n * Optional default layout configuration for the grid.\n * Defines the initial position and size of widgets before users customize.\n */\n defaultConfig?: Array<HomePageDefaultConfigItem>;\n}\n\n/**\n * Extension data ref for home page layout components.\n *\n * A layout receives the collected widgets and is responsible for arranging\n * them on the home page. This follows the same pattern as\n * EntityContentLayoutBlueprint in the catalog plugin.\n *\n * @alpha\n */\nexport const homePageLayoutComponentDataRef = createExtensionDataRef<\n (props: HomePageLayoutProps) => JSX.Element\n>().with({\n id: 'home.layout.component',\n});\n"],"names":[],"mappings":";;AAqEO,MAAM,qBAAA,GACX,sBAAA,EAA2C,CAAE,IAAA,CAAK;AAAA,EAChD,EAAA,EAAI;AACN,CAAC;AA4CI,MAAM,8BAAA,GAAiC,sBAAA,EAE5C,CAAE,IAAA,CAAK;AAAA,EACP,EAAA,EAAI;AACN,CAAC
|
|
1
|
+
{"version":3,"file":"dataRefs.esm.js","sources":["../../src/alpha/dataRefs.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 */\n\nimport {\n createExtensionDataRef,\n type AppNode,\n} from '@backstage/frontend-plugin-api';\nimport { JSX, ReactElement } from 'react';\nimport type { CardLayout, CardSettings } from '../extensions';\n\n/**\n * Extension data for homepage widgets, bundling the rendered component\n * with its metadata.\n *\n * @alpha\n */\nexport interface HomePageWidgetData {\n /**\n * The originating app node for this widget.\n */\n node: AppNode;\n /**\n * The rendered widget component (typically a card with header, content, etc.)\n */\n component: ReactElement;\n /**\n * Optional name identifier for the widget\n */\n name?: string;\n /**\n * Optional title displayed in the widget header\n */\n title?: string;\n /**\n * Optional description shown in widget catalogs or configuration UIs\n */\n description?: string;\n /**\n * Optional layout hints for positioning and sizing\n */\n layout?: CardLayout;\n /**\n * Optional settings schema for widget configuration\n */\n settings?: CardSettings;\n}\n\n/**\n * Extension data ref for homepage widgets.\n *\n * This follows the pattern from FormFieldBlueprint, bundling the component\n * and metadata into a single comprehensive data ref rather than outputting\n * them separately.\n *\n * @alpha\n */\nexport const homePageWidgetDataRef =\n createExtensionDataRef<HomePageWidgetData>().with({\n id: 'home.widget.data',\n });\n\n/**\n * Default layout configuration for a widget in the home page grid.\n *\n * @alpha\n */\nexport interface HomePageDefaultConfigItem {\n component: string;\n column: number;\n row: number;\n width: number;\n height: number;\n movable?: boolean;\n deletable?: boolean;\n resizable?: boolean;\n}\n\n/**\n * Props provided to a home page layout component.\n *\n * @alpha\n */\nexport interface HomePageLayoutProps {\n /**\n * The list of widget elements and metadata to render on the home page.\n */\n widgets: Array<HomePageWidgetData>;\n /**\n * Optional default layout configuration for the grid.\n * Defines the initial position and size of widgets before users customize.\n */\n defaultConfig?: Array<HomePageDefaultConfigItem>;\n}\n\n/**\n * Extension data ref for home page layout components.\n *\n * A layout receives the collected widgets and is responsible for arranging\n * them on the home page. This follows the same pattern as\n * EntityContentLayoutBlueprint in the catalog plugin.\n *\n * @alpha\n */\nexport const homePageLayoutComponentDataRef = createExtensionDataRef<\n (props: HomePageLayoutProps) => JSX.Element\n>().with({\n id: 'home.layout.component',\n});\n"],"names":[],"mappings":";;AAqEO,MAAM,qBAAA,GACX,sBAAA,EAA2C,CAAE,IAAA,CAAK;AAAA,EAChD,EAAA,EAAI;AACN,CAAC;AA4CI,MAAM,8BAAA,GAAiC,sBAAA,EAE5C,CAAE,IAAA,CAAK;AAAA,EACP,EAAA,EAAI;AACN,CAAC;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
2
2
|
import { AppNode } from '@backstage/frontend-plugin-api';
|
|
3
3
|
import { ReactElement, JSX } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { C as CardLayout, a as CardSettings, b as ComponentParts } from './types/extensions.d-Xd5iF6ch.js';
|
|
5
5
|
import '@backstage/core-plugin-api';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
7
|
import '@rjsf/utils';
|
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 */\n\n/**\n * React components and utilities for the home plugin's new frontend system.\n *\n * @remarks\n * This package provides React components, blueprints, and utilities for building\n * customizable home pages with the new Backstage frontend system.\n *\n * @packageDocumentation\n */\nimport { homeReactTranslationRef as _homeReactTranslationRef } from './translation';\n\n/**\n * @alpha\n * @deprecated Import from `@backstage/plugin-home-react` instead.\n */\nexport const homeReactTranslationRef = _homeReactTranslationRef;\nexport {\n HomePageWidgetBlueprint,\n type HomePageWidgetBlueprintParams,\n} from './alpha/blueprints/HomePageWidgetBlueprint';\nexport {\n HomePageLayoutBlueprint,\n type HomePageLayoutBlueprintParams,\n} from './alpha/blueprints/HomePageLayoutBlueprint';\nexport {\n homePageWidgetDataRef,\n type HomePageWidgetData,\n homePageLayoutComponentDataRef,\n type HomePageLayoutProps,\n type HomePageDefaultConfigItem,\n} from './alpha/dataRefs';\nexport type { ComponentParts, CardLayout, CardSettings } from './extensions';\n"],"names":["_homeReactTranslationRef"],"mappings":";;;;;AA+BO,MAAM,uBAAA,GAA0BA
|
|
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 */\n\n/**\n * React components and utilities for the home plugin's new frontend system.\n *\n * @remarks\n * This package provides React components, blueprints, and utilities for building\n * customizable home pages with the new Backstage frontend system.\n *\n * @packageDocumentation\n */\nimport { homeReactTranslationRef as _homeReactTranslationRef } from './translation';\n\n/**\n * @alpha\n * @deprecated Import from `@backstage/plugin-home-react` instead.\n */\nexport const homeReactTranslationRef = _homeReactTranslationRef;\nexport {\n HomePageWidgetBlueprint,\n type HomePageWidgetBlueprintParams,\n} from './alpha/blueprints/HomePageWidgetBlueprint';\nexport {\n HomePageLayoutBlueprint,\n type HomePageLayoutBlueprintParams,\n} from './alpha/blueprints/HomePageLayoutBlueprint';\nexport {\n homePageWidgetDataRef,\n type HomePageWidgetData,\n homePageLayoutComponentDataRef,\n type HomePageLayoutProps,\n type HomePageDefaultConfigItem,\n} from './alpha/dataRefs';\nexport type { ComponentParts, CardLayout, CardSettings } from './extensions';\n"],"names":["_homeReactTranslationRef"],"mappings":";;;;;AA+BO,MAAM,uBAAA,GAA0BA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentModal.esm.js","sources":["../../src/components/ContentModal.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 { JSX, useState } from 'react';\nimport { Link } from '@backstage/core-components';\nimport Modal from '@material-ui/core/Modal';\nimport Box from '@material-ui/core/Box';\nimport { makeStyles, Theme } from '@material-ui/core/styles';\n\n/** @public */\nexport type PluginHomeContentModalClassKey = 'contentModal' | 'linkText';\n\nexport const useStyles = makeStyles(\n (theme: Theme) => ({\n contentModal: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n width: '80%',\n height: 'auto',\n },\n linkText: {\n marginBottom: theme.spacing(1.5),\n },\n }),\n { name: 'PluginHomeContentModal' },\n);\n\n/**\n * Props customizing the <ContentModal/> component.\n *\n * @public\n */\nexport type ContentModalProps = {\n modalContent: JSX.Element;\n linkContent: string | JSX.Element;\n};\n\n/**\n * A component to expand given content into a full screen modal.\n *\n * @public\n */\nexport const ContentModal = (props: ContentModalProps) => {\n const { modalContent, linkContent } = props;\n const styles = useStyles();\n const [open, setOpen] = useState(false);\n\n return (\n <div className={styles.linkText} data-testid=\"content-modal-container\">\n <Link\n to=\"#\"\n component=\"button\"\n variant=\"h6\"\n underline=\"none\"\n onClick={() => setOpen(true)}\n >\n {linkContent}\n </Link>\n <Modal\n open={open}\n onClose={() => setOpen(false)}\n aria-labelledby=\"content-modal\"\n data-testid=\"content-modal\"\n >\n <Box className={styles.contentModal} data-testid=\"content-modal-open\">\n {modalContent}\n </Box>\n </Modal>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAyBO,MAAM,SAAA,GAAY,UAAA;AAAA,EACvB,CAAC,KAAA,MAAkB;AAAA,IACjB,YAAA,EAAc;AAAA,MACZ,QAAA,EAAU,UAAA;AAAA,MACV,GAAA,EAAK,KAAA;AAAA,MACL,IAAA,EAAM,KAAA;AAAA,MACN,SAAA,EAAW,uBAAA;AAAA,MACX,KAAA,EAAO,KAAA;AAAA,MACP,MAAA,EAAQ;AAAA,KACV;AAAA,IACA,QAAA,EAAU;AAAA,MACR,YAAA,EAAc,KAAA,CAAM,OAAA,CAAQ,GAAG;AAAA;AACjC,GACF,CAAA;AAAA,EACA,EAAE,MAAM,wBAAA;AACV;AAiBO,MAAM,YAAA,GAAe,CAAC,KAAA,KAA6B;AACxD,EAAA,MAAM,EAAE,YAAA,EAAc,WAAA,EAAY,GAAI,KAAA;AACtC,EAAA,MAAM,SAAS,SAAA,EAAU;AACzB,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,KAAK,CAAA;AAEtC,EAAA,4BACG,KAAA,EAAA,EAAI,SAAA,EAAW,MAAA,CAAO,QAAA,EAAU,eAAY,yBAAA,EAC3C,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,EAAA,EAAG,GAAA;AAAA,QACH,SAAA,EAAU,QAAA;AAAA,QACV,OAAA,EAAQ,IAAA;AAAA,QACR,SAAA,EAAU,MAAA;AAAA,QACV,OAAA,EAAS,MAAM,OAAA,CAAQ,IAAI,CAAA;AAAA,QAE1B,QAAA,EAAA;AAAA;AAAA,KACH;AAAA,oBACA,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,IAAA;AAAA,QACA,OAAA,EAAS,MAAM,OAAA,CAAQ,KAAK,CAAA;AAAA,QAC5B,iBAAA,EAAgB,eAAA;AAAA,QAChB,aAAA,EAAY,eAAA;AAAA,QAEZ,8BAAC,GAAA,EAAA,EAAI,SAAA,EAAW,OAAO,YAAA,EAAc,aAAA,EAAY,sBAC9C,QAAA,EAAA,YAAA,EACH;AAAA;AAAA;AACF,GAAA,EACF,CAAA;AAEJ
|
|
1
|
+
{"version":3,"file":"ContentModal.esm.js","sources":["../../src/components/ContentModal.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 { JSX, useState } from 'react';\nimport { Link } from '@backstage/core-components';\nimport Modal from '@material-ui/core/Modal';\nimport Box from '@material-ui/core/Box';\nimport { makeStyles, Theme } from '@material-ui/core/styles';\n\n/** @public */\nexport type PluginHomeContentModalClassKey = 'contentModal' | 'linkText';\n\nexport const useStyles = makeStyles(\n (theme: Theme) => ({\n contentModal: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n width: '80%',\n height: 'auto',\n },\n linkText: {\n marginBottom: theme.spacing(1.5),\n },\n }),\n { name: 'PluginHomeContentModal' },\n);\n\n/**\n * Props customizing the <ContentModal/> component.\n *\n * @public\n */\nexport type ContentModalProps = {\n modalContent: JSX.Element;\n linkContent: string | JSX.Element;\n};\n\n/**\n * A component to expand given content into a full screen modal.\n *\n * @public\n */\nexport const ContentModal = (props: ContentModalProps) => {\n const { modalContent, linkContent } = props;\n const styles = useStyles();\n const [open, setOpen] = useState(false);\n\n return (\n <div className={styles.linkText} data-testid=\"content-modal-container\">\n <Link\n to=\"#\"\n component=\"button\"\n variant=\"h6\"\n underline=\"none\"\n onClick={() => setOpen(true)}\n >\n {linkContent}\n </Link>\n <Modal\n open={open}\n onClose={() => setOpen(false)}\n aria-labelledby=\"content-modal\"\n data-testid=\"content-modal\"\n >\n <Box className={styles.contentModal} data-testid=\"content-modal-open\">\n {modalContent}\n </Box>\n </Modal>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAyBO,MAAM,SAAA,GAAY,UAAA;AAAA,EACvB,CAAC,KAAA,MAAkB;AAAA,IACjB,YAAA,EAAc;AAAA,MACZ,QAAA,EAAU,UAAA;AAAA,MACV,GAAA,EAAK,KAAA;AAAA,MACL,IAAA,EAAM,KAAA;AAAA,MACN,SAAA,EAAW,uBAAA;AAAA,MACX,KAAA,EAAO,KAAA;AAAA,MACP,MAAA,EAAQ;AAAA,KACV;AAAA,IACA,QAAA,EAAU;AAAA,MACR,YAAA,EAAc,KAAA,CAAM,OAAA,CAAQ,GAAG;AAAA;AACjC,GACF,CAAA;AAAA,EACA,EAAE,MAAM,wBAAA;AACV;AAiBO,MAAM,YAAA,GAAe,CAAC,KAAA,KAA6B;AACxD,EAAA,MAAM,EAAE,YAAA,EAAc,WAAA,EAAY,GAAI,KAAA;AACtC,EAAA,MAAM,SAAS,SAAA,EAAU;AACzB,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,KAAK,CAAA;AAEtC,EAAA,4BACG,KAAA,EAAA,EAAI,SAAA,EAAW,MAAA,CAAO,QAAA,EAAU,eAAY,yBAAA,EAC3C,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,EAAA,EAAG,GAAA;AAAA,QACH,SAAA,EAAU,QAAA;AAAA,QACV,OAAA,EAAQ,IAAA;AAAA,QACR,SAAA,EAAU,MAAA;AAAA,QACV,OAAA,EAAS,MAAM,OAAA,CAAQ,IAAI,CAAA;AAAA,QAE1B,QAAA,EAAA;AAAA;AAAA,KACH;AAAA,oBACA,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,IAAA;AAAA,QACA,OAAA,EAAS,MAAM,OAAA,CAAQ,KAAK,CAAA;AAAA,QAC5B,iBAAA,EAAgB,eAAA;AAAA,QAChB,aAAA,EAAY,eAAA;AAAA,QAEZ,8BAAC,GAAA,EAAA,EAAI,SAAA,EAAW,OAAO,YAAA,EAAc,aAAA,EAAY,sBAC9C,QAAA,EAAA,YAAA,EACH;AAAA;AAAA;AACF,GAAA,EACF,CAAA;AAEJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsModal.esm.js","sources":["../../src/components/SettingsModal.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 { useTranslationRef } from '@backstage/frontend-plugin-api';\nimport Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport { homeReactTranslationRef } from '../translation';\n\n/** @public */\nexport const SettingsModal = (props: {\n open: boolean;\n close: Function;\n componentName?: string;\n children: JSX.Element;\n}) => {\n const { open, close, componentName, children } = props;\n const { t } = useTranslationRef(homeReactTranslationRef);\n return (\n <Dialog open={open} onClose={() => close()}>\n <DialogTitle>\n {componentName\n ? `${t('settingsModal.title')} - ${componentName}`\n : t('settingsModal.title')}\n </DialogTitle>\n <DialogContent>{children}</DialogContent>\n <DialogActions>\n <Button onClick={() => close()} color=\"primary\" variant=\"contained\">\n {t('settingsModal.closeButtonTitle')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAyBO,MAAM,aAAA,GAAgB,CAAC,KAAA,KAKxB;AACJ,EAAA,MAAM,EAAE,IAAA,EAAM,KAAA,EAAO,aAAA,EAAe,UAAS,GAAI,KAAA;AACjD,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,uBAAuB,CAAA;AACvD,EAAA,4BACG,MAAA,EAAA,EAAO,IAAA,EAAY,OAAA,EAAS,MAAM,OAAM,EACvC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,WAAA,EAAA,EACE,QAAA,EAAA,aAAA,GACG,CAAA,EAAG,CAAA,CAAE,qBAAqB,CAAC,CAAA,GAAA,EAAM,aAAa,CAAA,CAAA,GAC9C,CAAA,CAAE,qBAAqB,CAAA,EAC7B,CAAA;AAAA,oBACA,GAAA,CAAC,iBAAe,QAAA,EAAS,CAAA;AAAA,oBACzB,GAAA,CAAC,aAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,SAAS,MAAM,KAAA,EAAM,EAAG,KAAA,EAAM,WAAU,OAAA,EAAQ,WAAA,EACrD,QAAA,EAAA,CAAA,CAAE,gCAAgC,GACrC,CAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ
|
|
1
|
+
{"version":3,"file":"SettingsModal.esm.js","sources":["../../src/components/SettingsModal.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 { useTranslationRef } from '@backstage/frontend-plugin-api';\nimport Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport { homeReactTranslationRef } from '../translation';\n\n/** @public */\nexport const SettingsModal = (props: {\n open: boolean;\n close: Function;\n componentName?: string;\n children: JSX.Element;\n}) => {\n const { open, close, componentName, children } = props;\n const { t } = useTranslationRef(homeReactTranslationRef);\n return (\n <Dialog open={open} onClose={() => close()}>\n <DialogTitle>\n {componentName\n ? `${t('settingsModal.title')} - ${componentName}`\n : t('settingsModal.title')}\n </DialogTitle>\n <DialogContent>{children}</DialogContent>\n <DialogActions>\n <Button onClick={() => close()} color=\"primary\" variant=\"contained\">\n {t('settingsModal.closeButtonTitle')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAyBO,MAAM,aAAA,GAAgB,CAAC,KAAA,KAKxB;AACJ,EAAA,MAAM,EAAE,IAAA,EAAM,KAAA,EAAO,aAAA,EAAe,UAAS,GAAI,KAAA;AACjD,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,uBAAuB,CAAA;AACvD,EAAA,4BACG,MAAA,EAAA,EAAO,IAAA,EAAY,OAAA,EAAS,MAAM,OAAM,EACvC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,WAAA,EAAA,EACE,QAAA,EAAA,aAAA,GACG,CAAA,EAAG,CAAA,CAAE,qBAAqB,CAAC,CAAA,GAAA,EAAM,aAAa,CAAA,CAAA,GAC9C,CAAA,CAAE,qBAAqB,CAAA,EAC7B,CAAA;AAAA,oBACA,GAAA,CAAC,iBAAe,QAAA,EAAS,CAAA;AAAA,oBACzB,GAAA,CAAC,aAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,SAAS,MAAM,KAAA,EAAM,EAAG,KAAA,EAAM,WAAU,OAAA,EAAQ,WAAA,EACrD,QAAA,EAAA,CAAA,CAAE,gCAAgC,GACrC,CAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.esm.js","sources":["../src/extensions.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 { useState, Suspense } from 'react';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport IconButton from '@material-ui/core/IconButton';\nimport SettingsIcon from '@material-ui/icons/Settings';\nimport { InfoCard } from '@backstage/core-components';\nimport { SettingsModal } from './components';\nimport { createReactExtension, useApp } from '@backstage/core-plugin-api';\nimport { RJSFSchema, UiSchema } from '@rjsf/utils';\nimport { useTranslationRef } from '@backstage/frontend-plugin-api';\nimport { homeReactTranslationRef } from './translation';\n\n/**\n * @public\n */\nexport type ComponentRenderer = {\n Renderer?: (props: RendererProps) => JSX.Element;\n};\n\n/**\n * @public\n */\nexport type ComponentParts = {\n Content: (props?: any) => JSX.Element;\n Actions?: () => JSX.Element;\n Settings?: () => JSX.Element;\n ContextProvider?: (props: any) => JSX.Element;\n};\n\n/**\n * @public\n */\nexport type RendererProps = { title?: string } & ComponentParts;\n\n/**\n * @public\n */\nexport type CardExtensionProps<T> = ComponentRenderer & {\n title?: string;\n} & T;\n\n/**\n * @public\n */\nexport type CardLayout = {\n width?: { minColumns?: number; maxColumns?: number; defaultColumns?: number };\n height?: { minRows?: number; maxRows?: number; defaultRows?: number };\n};\n\n/**\n * @public\n */\nexport type CardSettings = {\n schema?: RJSFSchema;\n uiSchema?: UiSchema;\n};\n\n/**\n * @public\n */\nexport type CardConfig = {\n layout?: CardLayout;\n settings?: CardSettings;\n};\n\n/**\n * An extension creator to create card based components for the homepage\n *\n * @public\n */\nexport function createCardExtension<T>(options: {\n title?: string;\n components: () => Promise<ComponentParts>;\n name?: string;\n description?: string;\n layout?: CardLayout;\n settings?: CardSettings;\n}) {\n const { title, components, name, description, layout, settings } = options;\n // If widget settings schema is defined, we don't want to show the Settings icon or dialog\n const isCustomizable = settings?.schema !== undefined;\n\n return createReactExtension({\n name,\n data: { title, description, 'home.widget.config': { layout, settings } },\n component: {\n lazy: () =>\n components().then(componentParts => {\n return (props: CardExtensionProps<T>) => {\n return (\n <CardExtension\n {...props}\n {...componentParts}\n title={props.title || title}\n isCustomizable={isCustomizable}\n />\n );\n };\n }),\n },\n });\n}\n\ntype CardExtensionComponentProps<T> = CardExtensionProps<T> &\n ComponentParts & {\n isCustomizable?: boolean;\n overrideTitle?: string;\n };\n\nfunction CardExtensionWithCustomRenderer<T>(\n props: CardExtensionComponentProps<T> & {\n Renderer: NonNullable<ComponentRenderer['Renderer']>;\n },\n) {\n const {\n Renderer,\n Content,\n Settings,\n Actions,\n ContextProvider,\n isCustomizable,\n title,\n ...childProps\n } = props;\n\n return (\n <Suspense fallback={<CircularProgress />}>\n <Renderer\n {...(title && { title })}\n {...{\n Content,\n ...(Actions ? { Actions } : {}),\n ...(Settings && !isCustomizable ? { Settings } : {}),\n ...(ContextProvider ? { ContextProvider } : {}),\n ...childProps,\n }}\n />\n </Suspense>\n );\n}\n\nfunction DefaultCardExtension<T>(props: CardExtensionComponentProps<T>) {\n const {\n Content,\n Settings,\n Actions,\n ContextProvider,\n isCustomizable,\n title,\n ...childProps\n } = props;\n const app = useApp();\n const { Progress } = app.getComponents();\n const [settingsOpen, setSettingsOpen] = useState(false);\n const { t } = useTranslationRef(homeReactTranslationRef);\n\n const cardProps = {\n divider: !!title,\n ...(title && { title }),\n ...(Settings && !isCustomizable\n ? {\n action: (\n <IconButton onClick={() => setSettingsOpen(true)}>\n <SettingsIcon>\n {t('cardExtension.settingsButtonTitle')}\n </SettingsIcon>\n </IconButton>\n ),\n }\n : {}),\n ...(Actions\n ? {\n actions: <Actions />,\n }\n : {}),\n };\n\n const innerContent = (\n <InfoCard {...cardProps}>\n {Settings && !isCustomizable && (\n <SettingsModal\n open={settingsOpen}\n componentName={title}\n close={() => setSettingsOpen(false)}\n >\n <Settings />\n </SettingsModal>\n )}\n <Content {...childProps} />\n </InfoCard>\n );\n\n return (\n <Suspense fallback={<Progress />}>\n {ContextProvider ? (\n <ContextProvider {...childProps}>{innerContent}</ContextProvider>\n ) : (\n innerContent\n )}\n </Suspense>\n );\n}\n\nexport function CardExtension<T>(props: CardExtensionComponentProps<T>) {\n if (props.Renderer) {\n return (\n <CardExtensionWithCustomRenderer {...props} Renderer={props.Renderer} />\n );\n }\n\n return <DefaultCardExtension {...props} />;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAqFO,SAAS,oBAAuB,OAAA,EAOpC;AACD,EAAA,MAAM,EAAE,KAAA,EAAO,UAAA,EAAY,MAAM,WAAA,EAAa,MAAA,EAAQ,UAAS,GAAI,OAAA;AAEnE,EAAA,MAAM,cAAA,GAAiB,UAAU,MAAA,KAAW,MAAA;AAE5C,EAAA,OAAO,oBAAA,CAAqB;AAAA,IAC1B,IAAA;AAAA,IACA,IAAA,EAAM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,uBACE,GAAA,CAAC,QAAA,EAAA,EAAS,QAAA,kBAAU,GAAA,CAAC,QAAA,EAAA,EAAS,CAAA,EAC3B,QAAA,EAAA,eAAA,mBACC,GAAA,CAAC,eAAA,EAAA,EAAiB,GAAG,UAAA,EAAa,QAAA,EAAA,YAAA,EAAa,IAE/C,YAAA,EAEJ,CAAA;AAEJ;AAEO,SAAS,cAAiB,KAAA,EAAuC;AACtE,EAAA,IAAI,MAAM,QAAA,EAAU;AAClB,IAAA,2BACG,+BAAA,EAAA,EAAiC,GAAG,KAAA,EAAO,QAAA,EAAU,MAAM,QAAA,EAAU,CAAA;AAAA,EAE1E;AAEA,EAAA,uBAAO,GAAA,CAAC,oBAAA,EAAA,EAAsB,GAAG,KAAA,EAAO,CAAA;AAC1C
|
|
1
|
+
{"version":3,"file":"extensions.esm.js","sources":["../src/extensions.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 { useState, Suspense } from 'react';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport IconButton from '@material-ui/core/IconButton';\nimport SettingsIcon from '@material-ui/icons/Settings';\nimport { InfoCard } from '@backstage/core-components';\nimport { SettingsModal } from './components';\nimport { createReactExtension, useApp } from '@backstage/core-plugin-api';\nimport { RJSFSchema, UiSchema } from '@rjsf/utils';\nimport { useTranslationRef } from '@backstage/frontend-plugin-api';\nimport { homeReactTranslationRef } from './translation';\n\n/**\n * @public\n */\nexport type ComponentRenderer = {\n Renderer?: (props: RendererProps) => JSX.Element;\n};\n\n/**\n * @public\n */\nexport type ComponentParts = {\n Content: (props?: any) => JSX.Element;\n Actions?: () => JSX.Element;\n Settings?: () => JSX.Element;\n ContextProvider?: (props: any) => JSX.Element;\n};\n\n/**\n * @public\n */\nexport type RendererProps = { title?: string } & ComponentParts;\n\n/**\n * @public\n */\nexport type CardExtensionProps<T> = ComponentRenderer & {\n title?: string;\n} & T;\n\n/**\n * @public\n */\nexport type CardLayout = {\n width?: { minColumns?: number; maxColumns?: number; defaultColumns?: number };\n height?: { minRows?: number; maxRows?: number; defaultRows?: number };\n};\n\n/**\n * @public\n */\nexport type CardSettings = {\n schema?: RJSFSchema;\n uiSchema?: UiSchema;\n};\n\n/**\n * @public\n */\nexport type CardConfig = {\n layout?: CardLayout;\n settings?: CardSettings;\n};\n\n/**\n * An extension creator to create card based components for the homepage\n *\n * @public\n */\nexport function createCardExtension<T>(options: {\n title?: string;\n components: () => Promise<ComponentParts>;\n name?: string;\n description?: string;\n layout?: CardLayout;\n settings?: CardSettings;\n}) {\n const { title, components, name, description, layout, settings } = options;\n // If widget settings schema is defined, we don't want to show the Settings icon or dialog\n const isCustomizable = settings?.schema !== undefined;\n\n return createReactExtension({\n name,\n data: { title, description, 'home.widget.config': { layout, settings } },\n component: {\n lazy: () =>\n components().then(componentParts => {\n return (props: CardExtensionProps<T>) => {\n return (\n <CardExtension\n {...props}\n {...componentParts}\n title={props.title || title}\n isCustomizable={isCustomizable}\n />\n );\n };\n }),\n },\n });\n}\n\ntype CardExtensionComponentProps<T> = CardExtensionProps<T> &\n ComponentParts & {\n isCustomizable?: boolean;\n overrideTitle?: string;\n };\n\nfunction CardExtensionWithCustomRenderer<T>(\n props: CardExtensionComponentProps<T> & {\n Renderer: NonNullable<ComponentRenderer['Renderer']>;\n },\n) {\n const {\n Renderer,\n Content,\n Settings,\n Actions,\n ContextProvider,\n isCustomizable,\n title,\n ...childProps\n } = props;\n\n return (\n <Suspense fallback={<CircularProgress />}>\n <Renderer\n {...(title && { title })}\n {...{\n Content,\n ...(Actions ? { Actions } : {}),\n ...(Settings && !isCustomizable ? { Settings } : {}),\n ...(ContextProvider ? { ContextProvider } : {}),\n ...childProps,\n }}\n />\n </Suspense>\n );\n}\n\nfunction DefaultCardExtension<T>(props: CardExtensionComponentProps<T>) {\n const {\n Content,\n Settings,\n Actions,\n ContextProvider,\n isCustomizable,\n title,\n ...childProps\n } = props;\n const app = useApp();\n const { Progress } = app.getComponents();\n const [settingsOpen, setSettingsOpen] = useState(false);\n const { t } = useTranslationRef(homeReactTranslationRef);\n\n const cardProps = {\n divider: !!title,\n ...(title && { title }),\n ...(Settings && !isCustomizable\n ? {\n action: (\n <IconButton onClick={() => setSettingsOpen(true)}>\n <SettingsIcon>\n {t('cardExtension.settingsButtonTitle')}\n </SettingsIcon>\n </IconButton>\n ),\n }\n : {}),\n ...(Actions\n ? {\n actions: <Actions />,\n }\n : {}),\n };\n\n const innerContent = (\n <InfoCard {...cardProps}>\n {Settings && !isCustomizable && (\n <SettingsModal\n open={settingsOpen}\n componentName={title}\n close={() => setSettingsOpen(false)}\n >\n <Settings />\n </SettingsModal>\n )}\n <Content {...childProps} />\n </InfoCard>\n );\n\n return (\n <Suspense fallback={<Progress />}>\n {ContextProvider ? (\n <ContextProvider {...childProps}>{innerContent}</ContextProvider>\n ) : (\n innerContent\n )}\n </Suspense>\n );\n}\n\nexport function CardExtension<T>(props: CardExtensionComponentProps<T>) {\n if (props.Renderer) {\n return (\n <CardExtensionWithCustomRenderer {...props} Renderer={props.Renderer} />\n );\n }\n\n return <DefaultCardExtension {...props} />;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAqFO,SAAS,oBAAuB,OAAA,EAOpC;AACD,EAAA,MAAM,EAAE,KAAA,EAAO,UAAA,EAAY,MAAM,WAAA,EAAa,MAAA,EAAQ,UAAS,GAAI,OAAA;AAEnE,EAAA,MAAM,cAAA,GAAiB,UAAU,MAAA,KAAW,MAAA;AAE5C,EAAA,OAAO,oBAAA,CAAqB;AAAA,IAC1B,IAAA;AAAA,IACA,IAAA,EAAM,E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BACE,GAAA,CAAC,QAAA,EAAA,EAAS,QAAA,kBAAU,GAAA,CAAC,QAAA,EAAA,EAAS,CAAA,EAC3B,QAAA,EAAA,eAAA,mBACC,GAAA,CAAC,eAAA,EAAA,EAAiB,GAAG,UAAA,EAAa,QAAA,EAAA,YAAA,EAAa,IAE/C,YAAA,EAEJ,CAAA;AAEJ;AAEO,SAAS,cAAiB,KAAA,EAAuC;AACtE,EAAA,IAAI,MAAM,QAAA,EAAU;AAClB,IAAA,2BACG,+BAAA,EAAA,EAAiC,GAAG,KAAA,EAAO,QAAA,EAAU,MAAM,QAAA,EAAU,CAAA;AAAA,EAE1E;AAEA,EAAA,uBAAO,GAAA,CAAC,oBAAA,EAAA,EAAsB,GAAG,KAAA,EAAO,CAAA;AAC1C;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { JSX as JSX$1 } from 'react';
|
|
3
|
-
export {
|
|
3
|
+
export { c as CardConfig, d as CardExtensionProps, C as CardLayout, a as CardSettings, b as ComponentParts, e as ComponentRenderer, R as RendererProps, f as createCardExtension } from './types/extensions.d-Xd5iF6ch.js';
|
|
4
4
|
import { Overrides } from '@material-ui/core/styles/overrides';
|
|
5
5
|
import { StyleRules } from '@material-ui/core/styles/withStyles';
|
|
6
6
|
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.esm.js","sources":["../src/translation.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 { createTranslationRef } from '@backstage/frontend-plugin-api';\n\n/**\n * Translation reference for the home-react plugin.\n * Contains localized text strings for home page components and widgets.\n *\n * @public\n */\nexport const homeReactTranslationRef = createTranslationRef({\n id: 'home-react',\n messages: {\n settingsModal: {\n title: 'Settings',\n closeButtonTitle: 'Close',\n },\n cardExtension: {\n settingsButtonTitle: 'Settings',\n },\n },\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,0BAA0B,oBAAA,CAAqB;AAAA,EAC1D,EAAA,EAAI,YAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,aAAA,EAAe;AAAA,MACb,KAAA,EAAO,UAAA;AAAA,MACP,gBAAA,EAAkB;AAAA,KACpB;AAAA,IACA,aAAA,EAAe;AAAA,MACb,mBAAA,EAAqB;AAAA;AACvB;AAEJ,CAAC
|
|
1
|
+
{"version":3,"file":"translation.esm.js","sources":["../src/translation.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 { createTranslationRef } from '@backstage/frontend-plugin-api';\n\n/**\n * Translation reference for the home-react plugin.\n * Contains localized text strings for home page components and widgets.\n *\n * @public\n */\nexport const homeReactTranslationRef = createTranslationRef({\n id: 'home-react',\n messages: {\n settingsModal: {\n title: 'Settings',\n closeButtonTitle: 'Close',\n },\n cardExtension: {\n settingsButtonTitle: 'Settings',\n },\n },\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,0BAA0B,oBAAA,CAAqB;AAAA,EAC1D,EAAA,EAAI,YAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,aAAA,EAAe;AAAA,MACb,KAAA,EAAO,UAAA;AAAA,MACP,gBAAA,EAAkB;AAAA,KACpB;AAAA,IACA,aAAA,EAAe;AAAA,MACb,mBAAA,EAAqB;AAAA;AACvB;AAEJ,CAAC;;"}
|
|
@@ -73,4 +73,4 @@ declare function createCardExtension<T>(options: {
|
|
|
73
73
|
}): _backstage_core_plugin_api.Extension<(props: CardExtensionProps<T>) => react_jsx_runtime.JSX.Element>;
|
|
74
74
|
|
|
75
75
|
export { createCardExtension as f };
|
|
76
|
-
export type {
|
|
76
|
+
export type { CardLayout as C, RendererProps as R, CardSettings as a, ComponentParts as b, CardConfig as c, CardExtensionProps as d, ComponentRenderer as e };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-home-react",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20260921023416",
|
|
4
4
|
"description": "A Backstage plugin that contains react components helps you build a home page",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library",
|
|
@@ -63,17 +63,17 @@
|
|
|
63
63
|
"test": "backstage-cli package test"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@backstage/core-compat-api": "0.0.0-nightly-
|
|
67
|
-
"@backstage/core-components": "0.0.0-nightly-
|
|
68
|
-
"@backstage/core-plugin-api": "0.0.0-nightly-
|
|
69
|
-
"@backstage/frontend-plugin-api": "0.0.0-nightly-
|
|
66
|
+
"@backstage/core-compat-api": "0.0.0-nightly-20260921023416",
|
|
67
|
+
"@backstage/core-components": "0.0.0-nightly-20260921023416",
|
|
68
|
+
"@backstage/core-plugin-api": "0.0.0-nightly-20260921023416",
|
|
69
|
+
"@backstage/frontend-plugin-api": "0.0.0-nightly-20260921023416",
|
|
70
70
|
"@material-ui/core": "^4.12.2",
|
|
71
71
|
"@material-ui/icons": "^4.9.1",
|
|
72
72
|
"@rjsf/utils": "5.24.13"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@backstage/cli": "0.0.0-nightly-
|
|
76
|
-
"@backstage/test-utils": "0.0.0-nightly-
|
|
75
|
+
"@backstage/cli": "0.0.0-nightly-20260921023416",
|
|
76
|
+
"@backstage/test-utils": "0.0.0-nightly-20260921023416",
|
|
77
77
|
"@testing-library/jest-dom": "^6.0.0",
|
|
78
78
|
"@testing-library/react": "^16.0.0",
|
|
79
79
|
"@types/react": "^18.0.0",
|