@backstage/dev-utils 1.0.9-next.0 → 1.0.9-next.1

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,21 @@
1
1
  # @backstage/dev-utils
2
2
 
3
+ ## 1.0.9-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`.
8
+ - Updated dependencies
9
+ - @backstage/core-app-api@1.2.1-next.1
10
+ - @backstage/core-components@0.12.1-next.1
11
+ - @backstage/test-utils@1.2.3-next.1
12
+ - @backstage/core-plugin-api@1.1.1-next.1
13
+ - @backstage/plugin-catalog-react@1.2.2-next.1
14
+ - @backstage/app-defaults@1.0.9-next.1
15
+ - @backstage/integration-react@1.1.7-next.1
16
+ - @backstage/catalog-model@1.1.4-next.1
17
+ - @backstage/theme@0.2.16
18
+
3
19
  ## 1.0.9-next.0
4
20
 
5
21
  ### Patch Changes
package/dist/index.esm.js CHANGED
@@ -27,20 +27,12 @@ const useStyles = makeStyles((theme) => ({
27
27
  const EntityGridItem = (props) => {
28
28
  const { entity, classes, ...rest } = props;
29
29
  const itemClasses = useStyles({ entity });
30
- return /* @__PURE__ */ React.createElement(EntityProvider, {
31
- entity
32
- }, /* @__PURE__ */ React.createElement(Grid, {
33
- classes: { root: itemClasses.root, ...classes },
34
- ...rest,
35
- item: true
36
- }));
30
+ return /* @__PURE__ */ React.createElement(EntityProvider, { entity }, /* @__PURE__ */ React.createElement(Grid, { classes: { root: itemClasses.root, ...classes }, ...rest, item: true }));
37
31
  };
38
32
 
39
33
  const ThemeIcon = ({ active, icon }) => icon ? cloneElement(icon, {
40
34
  color: active ? "primary" : void 0
41
- }) : /* @__PURE__ */ React.createElement(AutoIcon, {
42
- color: active ? "primary" : void 0
43
- });
35
+ }) : /* @__PURE__ */ React.createElement(AutoIcon, { color: active ? "primary" : void 0 });
44
36
  const SidebarThemeSwitcher = () => {
45
37
  const appThemeApi = useApi(appThemeApiRef);
46
38
  const themeId = useObservable(
@@ -66,56 +58,62 @@ const SidebarThemeSwitcher = () => {
66
58
  setAnchorEl(void 0);
67
59
  };
68
60
  const ActiveIcon = useCallback(
69
- () => /* @__PURE__ */ React.createElement(ThemeIcon, {
70
- icon: activeTheme == null ? void 0 : activeTheme.icon
71
- }),
61
+ () => /* @__PURE__ */ React.createElement(ThemeIcon, { icon: activeTheme == null ? void 0 : activeTheme.icon }),
72
62
  [activeTheme]
73
63
  );
74
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SidebarItem, {
75
- icon: ActiveIcon,
76
- text: "Switch Theme",
77
- id: "theme-button",
78
- "aria-haspopup": "listbox",
79
- "aria-controls": "theme-menu",
80
- "aria-label": "switch theme",
81
- "aria-expanded": open ? "true" : void 0,
82
- onClick: handleOpen
83
- }), /* @__PURE__ */ React.createElement(Menu, {
84
- id: "theme-menu",
85
- anchorEl,
86
- open,
87
- onClose: handleClose,
88
- MenuListProps: {
89
- "aria-labelledby": "theme-button",
90
- role: "listbox"
64
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
65
+ SidebarItem,
66
+ {
67
+ icon: ActiveIcon,
68
+ text: "Switch Theme",
69
+ id: "theme-button",
70
+ "aria-haspopup": "listbox",
71
+ "aria-controls": "theme-menu",
72
+ "aria-label": "switch theme",
73
+ "aria-expanded": open ? "true" : void 0,
74
+ onClick: handleOpen
91
75
  }
92
- }, /* @__PURE__ */ React.createElement(MenuItem, {
93
- disabled: true
94
- }, "Choose a theme"), /* @__PURE__ */ React.createElement(MenuItem, {
95
- selected: themeId === void 0,
96
- onClick: () => handleSelectTheme(void 0)
97
- }, /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement(ThemeIcon, {
98
- icon: void 0,
99
- active: themeId === void 0
100
- })), /* @__PURE__ */ React.createElement(ListItemText, null, "Auto")), themeIds.map((theme) => {
101
- const active = theme.id === themeId;
102
- return /* @__PURE__ */ React.createElement(MenuItem, {
103
- key: theme.id,
104
- selected: active,
105
- "aria-selected": active,
106
- onClick: () => handleSelectTheme(theme.id)
107
- }, /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement(ThemeIcon, {
108
- icon: theme.icon,
109
- active
110
- })), /* @__PURE__ */ React.createElement(ListItemText, null, theme.title));
111
- })));
76
+ ), /* @__PURE__ */ React.createElement(
77
+ Menu,
78
+ {
79
+ id: "theme-menu",
80
+ anchorEl,
81
+ open,
82
+ onClose: handleClose,
83
+ MenuListProps: {
84
+ "aria-labelledby": "theme-button",
85
+ role: "listbox"
86
+ }
87
+ },
88
+ /* @__PURE__ */ React.createElement(MenuItem, { disabled: true }, "Choose a theme"),
89
+ /* @__PURE__ */ React.createElement(
90
+ MenuItem,
91
+ {
92
+ selected: themeId === void 0,
93
+ onClick: () => handleSelectTheme(void 0)
94
+ },
95
+ /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement(ThemeIcon, { icon: void 0, active: themeId === void 0 })),
96
+ /* @__PURE__ */ React.createElement(ListItemText, null, "Auto")
97
+ ),
98
+ themeIds.map((theme) => {
99
+ const active = theme.id === themeId;
100
+ return /* @__PURE__ */ React.createElement(
101
+ MenuItem,
102
+ {
103
+ key: theme.id,
104
+ selected: active,
105
+ "aria-selected": active,
106
+ onClick: () => handleSelectTheme(theme.id)
107
+ },
108
+ /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement(ThemeIcon, { icon: theme.icon, active })),
109
+ /* @__PURE__ */ React.createElement(ListItemText, null, theme.title)
110
+ );
111
+ })
112
+ ));
112
113
  };
113
114
 
114
115
  function isReactRouterBeta() {
115
- const [obj] = createRoutesFromChildren(/* @__PURE__ */ React.createElement(Route, {
116
- index: true,
117
- element: /* @__PURE__ */ React.createElement("div", null)
118
- }));
116
+ const [obj] = createRoutesFromChildren(/* @__PURE__ */ React.createElement(Route, { index: true, element: /* @__PURE__ */ React.createElement("div", null) }));
119
117
  return !obj.index;
120
118
  }
121
119
  const MaybeGatheringRoute = ({ element }) => element;
@@ -150,21 +148,27 @@ class DevAppBuilder {
150
148
  }
151
149
  if (opts.title) {
152
150
  this.sidebarItems.push(
153
- /* @__PURE__ */ React.createElement(SidebarItem, {
154
- key: path,
155
- to: path,
156
- text: opts.title,
157
- icon: (_b = opts.icon) != null ? _b : BookmarkIcon
158
- })
151
+ /* @__PURE__ */ React.createElement(
152
+ SidebarItem,
153
+ {
154
+ key: path,
155
+ to: path,
156
+ text: opts.title,
157
+ icon: (_b = opts.icon) != null ? _b : BookmarkIcon
158
+ }
159
+ )
159
160
  );
160
161
  }
161
162
  this.routes.push(
162
- /* @__PURE__ */ React.createElement(MaybeGatheringRoute, {
163
- key: path,
164
- path,
165
- element: opts.element,
166
- children: opts.children
167
- })
163
+ /* @__PURE__ */ React.createElement(
164
+ MaybeGatheringRoute,
165
+ {
166
+ key: path,
167
+ path,
168
+ element: opts.element,
169
+ children: opts.children
170
+ }
171
+ )
168
172
  );
169
173
  return this;
170
174
  }
@@ -174,9 +178,7 @@ class DevAppBuilder {
174
178
  }
175
179
  build() {
176
180
  const dummyRouteRef = createRouteRef({ id: "dummy" });
177
- const DummyPage = () => /* @__PURE__ */ React.createElement(Box, {
178
- p: 3
179
- }, "Page belonging to another plugin.");
181
+ const DummyPage = () => /* @__PURE__ */ React.createElement(Box, { p: 3 }, "Page belonging to another plugin.");
180
182
  attachComponentData(DummyPage, "core.mountPoint", dummyRouteRef);
181
183
  const apis = [...this.apis];
182
184
  if (!apis.some((api) => api.api.id === scmIntegrationsApiRef.id)) {
@@ -206,10 +208,7 @@ class DevAppBuilder {
206
208
  const AppProvider = app.getProvider();
207
209
  const AppRouter = app.getRouter();
208
210
  const DevApp = () => {
209
- return /* @__PURE__ */ React.createElement(AppProvider, null, /* @__PURE__ */ React.createElement(AlertDisplay, null), /* @__PURE__ */ React.createElement(OAuthRequestDialog, null), this.rootChildren, /* @__PURE__ */ React.createElement(AppRouter, null, /* @__PURE__ */ React.createElement(SidebarPage, null, /* @__PURE__ */ React.createElement(Sidebar, null, /* @__PURE__ */ React.createElement(SidebarSpacer, null), this.sidebarItems, /* @__PURE__ */ React.createElement(SidebarSpace, null), /* @__PURE__ */ React.createElement(SidebarDivider, null), /* @__PURE__ */ React.createElement(SidebarThemeSwitcher, null)), /* @__PURE__ */ React.createElement(FlatRoutes, null, this.routes, /* @__PURE__ */ React.createElement(Route, {
210
- path: "/_external_route",
211
- element: /* @__PURE__ */ React.createElement(DummyPage, null)
212
- })))));
211
+ return /* @__PURE__ */ React.createElement(AppProvider, null, /* @__PURE__ */ React.createElement(AlertDisplay, null), /* @__PURE__ */ React.createElement(OAuthRequestDialog, null), this.rootChildren, /* @__PURE__ */ React.createElement(AppRouter, null, /* @__PURE__ */ React.createElement(SidebarPage, null, /* @__PURE__ */ React.createElement(Sidebar, null, /* @__PURE__ */ React.createElement(SidebarSpacer, null), this.sidebarItems, /* @__PURE__ */ React.createElement(SidebarSpace, null), /* @__PURE__ */ React.createElement(SidebarDivider, null), /* @__PURE__ */ React.createElement(SidebarThemeSwitcher, null)), /* @__PURE__ */ React.createElement(FlatRoutes, null, this.routes, /* @__PURE__ */ React.createElement(Route, { path: "/_external_route", element: /* @__PURE__ */ React.createElement(DummyPage, null) })))));
213
212
  };
214
213
  return DevApp;
215
214
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/components/EntityGridItem/EntityGridItem.tsx","../src/devApp/SidebarThemeSwitcher.tsx","../src/devApp/render.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 { Entity } from '@backstage/catalog-model';\nimport { EntityProvider } from '@backstage/plugin-catalog-react';\nimport { BackstageTheme } from '@backstage/theme';\nimport { Grid, GridProps, makeStyles } from '@material-ui/core';\nimport React from 'react';\n\nconst useStyles = makeStyles<BackstageTheme, { entity: Entity }>(theme => ({\n root: ({ entity }) => ({\n position: 'relative',\n\n '&::before': {\n content: `\"${entity.metadata.name}\"`,\n top: -theme.typography.fontSize + 4,\n display: 'block',\n position: 'absolute',\n color: theme.palette.textSubtle,\n },\n }),\n}));\n\n/** @public */\nexport const EntityGridItem = (\n props: Omit<GridProps, 'item' | 'container'> & { entity: Entity },\n): JSX.Element => {\n const { entity, classes, ...rest } = props;\n const itemClasses = useStyles({ entity });\n\n return (\n <EntityProvider entity={entity}>\n <Grid classes={{ root: itemClasses.root, ...classes }} {...rest} item />\n </EntityProvider>\n );\n};\n","/*\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 */\nimport { SidebarItem } from '@backstage/core-components';\nimport { appThemeApiRef, useApi } from '@backstage/core-plugin-api';\nimport { ListItemIcon, ListItemText, Menu, MenuItem } from '@material-ui/core';\nimport AutoIcon from '@material-ui/icons/BrightnessAuto';\nimport React, { cloneElement, useCallback, useState } from 'react';\nimport useObservable from 'react-use/lib/useObservable';\n\ntype ThemeIconProps = {\n active?: boolean;\n icon: JSX.Element | undefined;\n};\n\nconst ThemeIcon = ({ active, icon }: ThemeIconProps) =>\n icon ? (\n cloneElement(icon, {\n color: active ? 'primary' : undefined,\n })\n ) : (\n <AutoIcon color={active ? 'primary' : undefined} />\n );\n\nexport const SidebarThemeSwitcher = () => {\n const appThemeApi = useApi(appThemeApiRef);\n const themeId = useObservable(\n appThemeApi.activeThemeId$(),\n appThemeApi.getActiveThemeId(),\n );\n const themeIds = appThemeApi.getInstalledThemes();\n const activeTheme = themeIds.find(t => t.id === themeId);\n\n const [anchorEl, setAnchorEl] = useState<Element | undefined>();\n const open = Boolean(anchorEl);\n\n const handleOpen = (event: React.MouseEvent) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleSelectTheme = (newThemeId: string | undefined) => {\n if (themeIds.some(t => t.id === newThemeId)) {\n appThemeApi.setActiveThemeId(newThemeId);\n } else {\n appThemeApi.setActiveThemeId(undefined);\n }\n\n setAnchorEl(undefined);\n };\n\n const handleClose = () => {\n setAnchorEl(undefined);\n };\n\n const ActiveIcon = useCallback(\n () => <ThemeIcon icon={activeTheme?.icon} />,\n [activeTheme],\n );\n\n return (\n <>\n <SidebarItem\n icon={ActiveIcon}\n text=\"Switch Theme\"\n id=\"theme-button\"\n aria-haspopup=\"listbox\"\n aria-controls=\"theme-menu\"\n aria-label=\"switch theme\"\n aria-expanded={open ? 'true' : undefined}\n onClick={handleOpen}\n />\n\n <Menu\n id=\"theme-menu\"\n anchorEl={anchorEl}\n open={open}\n onClose={handleClose}\n MenuListProps={{\n 'aria-labelledby': 'theme-button',\n role: 'listbox',\n }}\n >\n <MenuItem disabled>Choose a theme</MenuItem>\n <MenuItem\n selected={themeId === undefined}\n onClick={() => handleSelectTheme(undefined)}\n >\n <ListItemIcon>\n <ThemeIcon icon={undefined} active={themeId === undefined} />\n </ListItemIcon>\n <ListItemText>Auto</ListItemText>\n </MenuItem>\n\n {themeIds.map(theme => {\n const active = theme.id === themeId;\n return (\n <MenuItem\n key={theme.id}\n selected={active}\n aria-selected={active}\n onClick={() => handleSelectTheme(theme.id)}\n >\n <ListItemIcon>\n <ThemeIcon icon={theme.icon} active={active} />\n </ListItemIcon>\n <ListItemText>{theme.title}</ListItemText>\n </MenuItem>\n );\n })}\n </Menu>\n </>\n );\n};\n","/*\n * Copyright 2020 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 { createApp } from '@backstage/app-defaults';\nimport { FlatRoutes } from '@backstage/core-app-api';\nimport {\n AlertDisplay,\n OAuthRequestDialog,\n Sidebar,\n SidebarDivider,\n SidebarItem,\n SidebarPage,\n SidebarSpace,\n SidebarSpacer,\n} from '@backstage/core-components';\nimport {\n AnyApiFactory,\n ApiFactory,\n AppTheme,\n attachComponentData,\n BackstagePlugin,\n configApiRef,\n createApiFactory,\n createRouteRef,\n IconComponent,\n RouteRef,\n} from '@backstage/core-plugin-api';\nimport {\n ScmIntegrationsApi,\n scmIntegrationsApiRef,\n} from '@backstage/integration-react';\nimport { Box } from '@material-ui/core';\nimport BookmarkIcon from '@material-ui/icons/Bookmark';\nimport React, { ComponentType, ReactNode } from 'react';\nimport ReactDOM from 'react-dom';\nimport { createRoutesFromChildren, Route } from 'react-router';\nimport { SidebarThemeSwitcher } from './SidebarThemeSwitcher';\n\nexport function isReactRouterBeta(): boolean {\n const [obj] = createRoutesFromChildren(<Route index element={<div />} />);\n return !obj.index;\n}\n\nconst MaybeGatheringRoute: (props: {\n path: string;\n element: JSX.Element;\n children?: ReactNode;\n}) => JSX.Element = ({ element }) => element;\n\nif (isReactRouterBeta()) {\n attachComponentData(MaybeGatheringRoute, 'core.gatherMountPoints', true);\n}\n\n/** @public */\nexport type DevAppPageOptions = {\n path?: string;\n element: JSX.Element;\n children?: JSX.Element;\n title?: string;\n icon?: IconComponent;\n};\n\n/**\n * DevApp builder that is similar to the App builder API, but creates an App\n * with the purpose of developing one or more plugins inside it.\n *\n * @public\n */\nexport class DevAppBuilder {\n private readonly plugins = new Array<BackstagePlugin>();\n private readonly apis = new Array<AnyApiFactory>();\n private readonly rootChildren = new Array<ReactNode>();\n private readonly routes = new Array<JSX.Element>();\n private readonly sidebarItems = new Array<JSX.Element>();\n\n private defaultPage?: string;\n private themes?: Array<AppTheme>;\n\n /**\n * Register one or more plugins to render in the dev app\n */\n registerPlugin(...plugins: BackstagePlugin[]): DevAppBuilder {\n this.plugins.push(...plugins);\n return this;\n }\n\n /**\n * Register an API factory to add to the app\n */\n registerApi<\n Api,\n Impl extends Api,\n Deps extends { [name in string]: unknown },\n >(factory: ApiFactory<Api, Impl, Deps>): DevAppBuilder {\n this.apis.push(factory);\n return this;\n }\n\n /**\n * Adds a React node to place just inside the App Provider.\n *\n * Useful for adding more global components like the AlertDisplay.\n */\n addRootChild(node: ReactNode): DevAppBuilder {\n this.rootChildren.push(node);\n return this;\n }\n\n /**\n * Adds a page component along with accompanying sidebar item.\n *\n * If no path is provided one will be generated.\n * If no title is provided, no sidebar item will be created.\n */\n addPage(opts: DevAppPageOptions): DevAppBuilder {\n const path = opts.path ?? `/page-${this.routes.length + 1}`;\n\n if (!this.defaultPage || path === '/') {\n this.defaultPage = path;\n }\n\n if (opts.title) {\n this.sidebarItems.push(\n <SidebarItem\n key={path}\n to={path}\n text={opts.title}\n icon={opts.icon ?? BookmarkIcon}\n />,\n );\n }\n this.routes.push(\n <MaybeGatheringRoute\n key={path}\n path={path}\n element={opts.element}\n children={opts.children}\n />,\n );\n return this;\n }\n\n /**\n * Adds an array of themes to override the default theme.\n */\n addThemes(themes: AppTheme[]) {\n this.themes = themes;\n return this;\n }\n\n /**\n * Build a DevApp component using the resources registered so far\n */\n build(): ComponentType<{}> {\n const dummyRouteRef = createRouteRef({ id: 'dummy' });\n const DummyPage = () => <Box p={3}>Page belonging to another plugin.</Box>;\n attachComponentData(DummyPage, 'core.mountPoint', dummyRouteRef);\n\n const apis = [...this.apis];\n if (!apis.some(api => api.api.id === scmIntegrationsApiRef.id)) {\n apis.push(\n createApiFactory({\n api: scmIntegrationsApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) => ScmIntegrationsApi.fromConfig(configApi),\n }),\n );\n }\n\n const app = createApp({\n apis,\n plugins: this.plugins,\n themes: this.themes,\n bindRoutes: ({ bind }) => {\n for (const plugin of this.plugins ?? []) {\n const targets: Record<string, RouteRef<any>> = {};\n for (const routeKey of Object.keys(plugin.externalRoutes)) {\n targets[routeKey] = dummyRouteRef;\n }\n bind(plugin.externalRoutes, targets);\n }\n },\n });\n\n const AppProvider = app.getProvider();\n const AppRouter = app.getRouter();\n\n const DevApp = () => {\n return (\n <AppProvider>\n <AlertDisplay />\n <OAuthRequestDialog />\n {this.rootChildren}\n <AppRouter>\n <SidebarPage>\n <Sidebar>\n <SidebarSpacer />\n {this.sidebarItems}\n <SidebarSpace />\n <SidebarDivider />\n <SidebarThemeSwitcher />\n </Sidebar>\n <FlatRoutes>\n {this.routes}\n <Route path=\"/_external_route\" element={<DummyPage />} />\n </FlatRoutes>\n </SidebarPage>\n </AppRouter>\n </AppProvider>\n );\n };\n\n return DevApp;\n }\n\n /**\n * Build and render directory to #root element, with react hot loading.\n */\n render(): void {\n const DevApp = this.build();\n\n if (\n window.location.pathname === '/' &&\n this.defaultPage &&\n this.defaultPage !== '/'\n ) {\n window.location.pathname = this.defaultPage;\n }\n\n ReactDOM.render(<DevApp />, document.getElementById('root'));\n }\n}\n\n// TODO(rugvip): Figure out patterns for how to allow in-house apps to build upon\n// this to provide their own plugin dev wrappers.\n\n/**\n * Creates a dev app for rendering one or more plugins and exposing the touch points of the plugin.\n *\n * @public\n */\nexport function createDevApp() {\n return new DevAppBuilder();\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAsBA,MAAM,SAAA,GAAY,WAA+C,CAAU,KAAA,MAAA;AAAA,EACzE,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AAA,KAAA,CAAA,aAAA,CAAC,UACE,EAAA,IAAA,EAAA,IAAA,CAAK,wBACL,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,QAAM,IAAK,EAAA,kBAAA;AAAA,QAAmB,OAAA,sCAAU,SAAU,EAAA,IAAA,CAAA;AAAA,OAAI,CACzD,CACF,CACF,CACF,CAAA,CAAA;AAAA,KAEJ,CAAA;AAEA,IAAO,OAAA,MAAA,CAAA;AAAA,GACT;AAAA,EAKA,MAAe,GAAA;AACb,IAAM,MAAA,MAAA,GAAS,KAAK,KAAM,EAAA,CAAA;AAE1B,IACE,IAAA,MAAA,CAAO,SAAS,QAAa,KAAA,GAAA,IAC7B,KAAK,WACL,IAAA,IAAA,CAAK,gBAAgB,GACrB,EAAA;AACA,MAAO,MAAA,CAAA,QAAA,CAAS,WAAW,IAAK,CAAA,WAAA,CAAA;AAAA,KAClC;AAEA,IAAA,QAAA,CAAS,uBAAQ,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,IAAO,GAAI,QAAS,CAAA,cAAA,CAAe,MAAM,CAAC,CAAA,CAAA;AAAA,GAC7D;AACF,CAAA;AAUO,SAAS,YAAe,GAAA;AAC7B,EAAA,OAAO,IAAI,aAAc,EAAA,CAAA;AAC3B;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/components/EntityGridItem/EntityGridItem.tsx","../src/devApp/SidebarThemeSwitcher.tsx","../src/devApp/render.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 { Entity } from '@backstage/catalog-model';\nimport { EntityProvider } from '@backstage/plugin-catalog-react';\nimport { BackstageTheme } from '@backstage/theme';\nimport { Grid, GridProps, makeStyles } from '@material-ui/core';\nimport React from 'react';\n\nconst useStyles = makeStyles<BackstageTheme, { entity: Entity }>(theme => ({\n root: ({ entity }) => ({\n position: 'relative',\n\n '&::before': {\n content: `\"${entity.metadata.name}\"`,\n top: -theme.typography.fontSize + 4,\n display: 'block',\n position: 'absolute',\n color: theme.palette.textSubtle,\n },\n }),\n}));\n\n/** @public */\nexport const EntityGridItem = (\n props: Omit<GridProps, 'item' | 'container'> & { entity: Entity },\n): JSX.Element => {\n const { entity, classes, ...rest } = props;\n const itemClasses = useStyles({ entity });\n\n return (\n <EntityProvider entity={entity}>\n <Grid classes={{ root: itemClasses.root, ...classes }} {...rest} item />\n </EntityProvider>\n );\n};\n","/*\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 */\nimport { SidebarItem } from '@backstage/core-components';\nimport { appThemeApiRef, useApi } from '@backstage/core-plugin-api';\nimport { ListItemIcon, ListItemText, Menu, MenuItem } from '@material-ui/core';\nimport AutoIcon from '@material-ui/icons/BrightnessAuto';\nimport React, { cloneElement, useCallback, useState } from 'react';\nimport useObservable from 'react-use/lib/useObservable';\n\ntype ThemeIconProps = {\n active?: boolean;\n icon: JSX.Element | undefined;\n};\n\nconst ThemeIcon = ({ active, icon }: ThemeIconProps) =>\n icon ? (\n cloneElement(icon, {\n color: active ? 'primary' : undefined,\n })\n ) : (\n <AutoIcon color={active ? 'primary' : undefined} />\n );\n\nexport const SidebarThemeSwitcher = () => {\n const appThemeApi = useApi(appThemeApiRef);\n const themeId = useObservable(\n appThemeApi.activeThemeId$(),\n appThemeApi.getActiveThemeId(),\n );\n const themeIds = appThemeApi.getInstalledThemes();\n const activeTheme = themeIds.find(t => t.id === themeId);\n\n const [anchorEl, setAnchorEl] = useState<Element | undefined>();\n const open = Boolean(anchorEl);\n\n const handleOpen = (event: React.MouseEvent) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleSelectTheme = (newThemeId: string | undefined) => {\n if (themeIds.some(t => t.id === newThemeId)) {\n appThemeApi.setActiveThemeId(newThemeId);\n } else {\n appThemeApi.setActiveThemeId(undefined);\n }\n\n setAnchorEl(undefined);\n };\n\n const handleClose = () => {\n setAnchorEl(undefined);\n };\n\n const ActiveIcon = useCallback(\n () => <ThemeIcon icon={activeTheme?.icon} />,\n [activeTheme],\n );\n\n return (\n <>\n <SidebarItem\n icon={ActiveIcon}\n text=\"Switch Theme\"\n id=\"theme-button\"\n aria-haspopup=\"listbox\"\n aria-controls=\"theme-menu\"\n aria-label=\"switch theme\"\n aria-expanded={open ? 'true' : undefined}\n onClick={handleOpen}\n />\n\n <Menu\n id=\"theme-menu\"\n anchorEl={anchorEl}\n open={open}\n onClose={handleClose}\n MenuListProps={{\n 'aria-labelledby': 'theme-button',\n role: 'listbox',\n }}\n >\n <MenuItem disabled>Choose a theme</MenuItem>\n <MenuItem\n selected={themeId === undefined}\n onClick={() => handleSelectTheme(undefined)}\n >\n <ListItemIcon>\n <ThemeIcon icon={undefined} active={themeId === undefined} />\n </ListItemIcon>\n <ListItemText>Auto</ListItemText>\n </MenuItem>\n\n {themeIds.map(theme => {\n const active = theme.id === themeId;\n return (\n <MenuItem\n key={theme.id}\n selected={active}\n aria-selected={active}\n onClick={() => handleSelectTheme(theme.id)}\n >\n <ListItemIcon>\n <ThemeIcon icon={theme.icon} active={active} />\n </ListItemIcon>\n <ListItemText>{theme.title}</ListItemText>\n </MenuItem>\n );\n })}\n </Menu>\n </>\n );\n};\n","/*\n * Copyright 2020 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 { createApp } from '@backstage/app-defaults';\nimport { FlatRoutes } from '@backstage/core-app-api';\nimport {\n AlertDisplay,\n OAuthRequestDialog,\n Sidebar,\n SidebarDivider,\n SidebarItem,\n SidebarPage,\n SidebarSpace,\n SidebarSpacer,\n} from '@backstage/core-components';\nimport {\n AnyApiFactory,\n ApiFactory,\n AppTheme,\n attachComponentData,\n BackstagePlugin,\n configApiRef,\n createApiFactory,\n createRouteRef,\n IconComponent,\n RouteRef,\n} from '@backstage/core-plugin-api';\nimport {\n ScmIntegrationsApi,\n scmIntegrationsApiRef,\n} from '@backstage/integration-react';\nimport { Box } from '@material-ui/core';\nimport BookmarkIcon from '@material-ui/icons/Bookmark';\nimport React, { ComponentType, ReactNode } from 'react';\nimport ReactDOM from 'react-dom';\nimport { createRoutesFromChildren, Route } from 'react-router';\nimport { SidebarThemeSwitcher } from './SidebarThemeSwitcher';\n\nexport function isReactRouterBeta(): boolean {\n const [obj] = createRoutesFromChildren(<Route index element={<div />} />);\n return !obj.index;\n}\n\nconst MaybeGatheringRoute: (props: {\n path: string;\n element: JSX.Element;\n children?: ReactNode;\n}) => JSX.Element = ({ element }) => element;\n\nif (isReactRouterBeta()) {\n attachComponentData(MaybeGatheringRoute, 'core.gatherMountPoints', true);\n}\n\n/** @public */\nexport type DevAppPageOptions = {\n path?: string;\n element: JSX.Element;\n children?: JSX.Element;\n title?: string;\n icon?: IconComponent;\n};\n\n/**\n * DevApp builder that is similar to the App builder API, but creates an App\n * with the purpose of developing one or more plugins inside it.\n *\n * @public\n */\nexport class DevAppBuilder {\n private readonly plugins = new Array<BackstagePlugin>();\n private readonly apis = new Array<AnyApiFactory>();\n private readonly rootChildren = new Array<ReactNode>();\n private readonly routes = new Array<JSX.Element>();\n private readonly sidebarItems = new Array<JSX.Element>();\n\n private defaultPage?: string;\n private themes?: Array<AppTheme>;\n\n /**\n * Register one or more plugins to render in the dev app\n */\n registerPlugin(...plugins: BackstagePlugin[]): DevAppBuilder {\n this.plugins.push(...plugins);\n return this;\n }\n\n /**\n * Register an API factory to add to the app\n */\n registerApi<\n Api,\n Impl extends Api,\n Deps extends { [name in string]: unknown },\n >(factory: ApiFactory<Api, Impl, Deps>): DevAppBuilder {\n this.apis.push(factory);\n return this;\n }\n\n /**\n * Adds a React node to place just inside the App Provider.\n *\n * Useful for adding more global components like the AlertDisplay.\n */\n addRootChild(node: ReactNode): DevAppBuilder {\n this.rootChildren.push(node);\n return this;\n }\n\n /**\n * Adds a page component along with accompanying sidebar item.\n *\n * If no path is provided one will be generated.\n * If no title is provided, no sidebar item will be created.\n */\n addPage(opts: DevAppPageOptions): DevAppBuilder {\n const path = opts.path ?? `/page-${this.routes.length + 1}`;\n\n if (!this.defaultPage || path === '/') {\n this.defaultPage = path;\n }\n\n if (opts.title) {\n this.sidebarItems.push(\n <SidebarItem\n key={path}\n to={path}\n text={opts.title}\n icon={opts.icon ?? BookmarkIcon}\n />,\n );\n }\n this.routes.push(\n <MaybeGatheringRoute\n key={path}\n path={path}\n element={opts.element}\n children={opts.children}\n />,\n );\n return this;\n }\n\n /**\n * Adds an array of themes to override the default theme.\n */\n addThemes(themes: AppTheme[]) {\n this.themes = themes;\n return this;\n }\n\n /**\n * Build a DevApp component using the resources registered so far\n */\n build(): ComponentType<{}> {\n const dummyRouteRef = createRouteRef({ id: 'dummy' });\n const DummyPage = () => <Box p={3}>Page belonging to another plugin.</Box>;\n attachComponentData(DummyPage, 'core.mountPoint', dummyRouteRef);\n\n const apis = [...this.apis];\n if (!apis.some(api => api.api.id === scmIntegrationsApiRef.id)) {\n apis.push(\n createApiFactory({\n api: scmIntegrationsApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) => ScmIntegrationsApi.fromConfig(configApi),\n }),\n );\n }\n\n const app = createApp({\n apis,\n plugins: this.plugins,\n themes: this.themes,\n bindRoutes: ({ bind }) => {\n for (const plugin of this.plugins ?? []) {\n const targets: Record<string, RouteRef<any>> = {};\n for (const routeKey of Object.keys(plugin.externalRoutes)) {\n targets[routeKey] = dummyRouteRef;\n }\n bind(plugin.externalRoutes, targets);\n }\n },\n });\n\n const AppProvider = app.getProvider();\n const AppRouter = app.getRouter();\n\n const DevApp = () => {\n return (\n <AppProvider>\n <AlertDisplay />\n <OAuthRequestDialog />\n {this.rootChildren}\n <AppRouter>\n <SidebarPage>\n <Sidebar>\n <SidebarSpacer />\n {this.sidebarItems}\n <SidebarSpace />\n <SidebarDivider />\n <SidebarThemeSwitcher />\n </Sidebar>\n <FlatRoutes>\n {this.routes}\n <Route path=\"/_external_route\" element={<DummyPage />} />\n </FlatRoutes>\n </SidebarPage>\n </AppRouter>\n </AppProvider>\n );\n };\n\n return DevApp;\n }\n\n /**\n * Build and render directory to #root element, with react hot loading.\n */\n render(): void {\n const DevApp = this.build();\n\n if (\n window.location.pathname === '/' &&\n this.defaultPage &&\n this.defaultPage !== '/'\n ) {\n window.location.pathname = this.defaultPage;\n }\n\n ReactDOM.render(<DevApp />, document.getElementById('root'));\n }\n}\n\n// TODO(rugvip): Figure out patterns for how to allow in-house apps to build upon\n// this to provide their own plugin dev wrappers.\n\n/**\n * Creates a dev app for rendering one or more plugins and exposing the touch points of the plugin.\n *\n * @public\n */\nexport function createDevApp() {\n return new DevAppBuilder();\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAsBA,MAAM,SAAA,GAAY,WAA+C,CAAU,KAAA,MAAA;AAAA,EACzE,IAAM,EAAA,CAAC,EAAE,MAAA,EAAc,MAAA;AAAA,IACrB,QAAU,EAAA,UAAA;AAAA,IAEV,WAAa,EAAA;AAAA,MACX,OA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AA,CACzD,CACF,CACF,CACF,CAAA,CAAA;AAAA,KAEJ,CAAA;AAEA,IAAO,OAAA,MAAA,CAAA;AAAA,GACT;AAAA,EAKA,MAAe,GAAA;AACb,IAAM,MAAA,MAAA,GAAS,KAAK,KAAM,EAAA,CAAA;AAE1B,IACE,IAAA,MAAA,CAAO,SAAS,QAAa,KAAA,GAAA,IAC7B,KAAK,WACL,IAAA,IAAA,CAAK,gBAAgB,GACrB,EAAA;AACA,MAAO,MAAA,CAAA,QAAA,CAAS,WAAW,IAAK,CAAA,WAAA,CAAA;AAAA,KAClC;AAEA,IAAA,QAAA,CAAS,uBAAQ,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,IAAO,GAAI,QAAS,CAAA,cAAA,CAAe,MAAM,CAAC,CAAA,CAAA;AAAA,GAC7D;AACF,CAAA;AAUO,SAAS,YAAe,GAAA;AAC7B,EAAA,OAAO,IAAI,aAAc,EAAA,CAAA;AAC3B;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/dev-utils",
3
3
  "description": "Utilities for developing Backstage plugins.",
4
- "version": "1.0.9-next.0",
4
+ "version": "1.0.9-next.1",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "main": "dist/index.esm.js",
@@ -32,14 +32,14 @@
32
32
  "start": "backstage-cli package start"
33
33
  },
34
34
  "dependencies": {
35
- "@backstage/app-defaults": "^1.0.9-next.0",
36
- "@backstage/catalog-model": "^1.1.4-next.0",
37
- "@backstage/core-app-api": "^1.2.1-next.0",
38
- "@backstage/core-components": "^0.12.1-next.0",
39
- "@backstage/core-plugin-api": "^1.1.1-next.0",
40
- "@backstage/integration-react": "^1.1.7-next.0",
41
- "@backstage/plugin-catalog-react": "^1.2.2-next.0",
42
- "@backstage/test-utils": "^1.2.3-next.0",
35
+ "@backstage/app-defaults": "^1.0.9-next.1",
36
+ "@backstage/catalog-model": "^1.1.4-next.1",
37
+ "@backstage/core-app-api": "^1.2.1-next.1",
38
+ "@backstage/core-components": "^0.12.1-next.1",
39
+ "@backstage/core-plugin-api": "^1.1.1-next.1",
40
+ "@backstage/integration-react": "^1.1.7-next.1",
41
+ "@backstage/plugin-catalog-react": "^1.2.2-next.1",
42
+ "@backstage/test-utils": "^1.2.3-next.1",
43
43
  "@backstage/theme": "^0.2.16",
44
44
  "@material-ui/core": "^4.12.2",
45
45
  "@material-ui/icons": "^4.9.1",
@@ -47,7 +47,7 @@
47
47
  "@testing-library/react": "^12.1.3",
48
48
  "@testing-library/user-event": "^14.0.0",
49
49
  "react-use": "^17.2.4",
50
- "zen-observable": "^0.9.0"
50
+ "zen-observable": "^0.10.0"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@types/react": "^16.13.1 || ^17.0.0",
@@ -57,7 +57,7 @@
57
57
  "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
58
58
  },
59
59
  "devDependencies": {
60
- "@backstage/cli": "^0.21.2-next.0",
60
+ "@backstage/cli": "^0.21.2-next.1",
61
61
  "@types/node": "^16.0.0"
62
62
  },
63
63
  "files": [