@backstage/plugin-home 0.6.3-next.1 → 0.7.0-next.2

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,26 @@
1
1
  # @backstage/plugin-home
2
2
 
3
+ ## 0.7.0-next.2
4
+
5
+ ### Minor Changes
6
+
7
+ - 8807d2a: Resolved styling inconsistencies and title visibility issues in Top Visited and Recently Visited cards
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @backstage/core-components@0.14.1-next.2
13
+ - @backstage/plugin-catalog-react@1.11.0-next.2
14
+ - @backstage/catalog-client@1.6.1-next.1
15
+ - @backstage/frontend-plugin-api@0.6.1-next.2
16
+ - @backstage/plugin-home-react@0.1.9-next.2
17
+ - @backstage/core-compat-api@0.2.1-next.2
18
+ - @backstage/catalog-model@1.4.5-next.0
19
+ - @backstage/config@1.2.0-next.1
20
+ - @backstage/core-app-api@1.12.1-next.1
21
+ - @backstage/core-plugin-api@1.9.1-next.1
22
+ - @backstage/theme@0.5.2-next.0
23
+
3
24
  ## 0.6.3-next.1
4
25
 
5
26
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-home",
3
- "version": "0.6.3-next.1",
3
+ "version": "0.7.0-next.2",
4
4
  "main": "../dist/alpha.esm.js",
5
5
  "module": "../dist/alpha.esm.js",
6
6
  "types": "../dist/alpha.d.ts"
@@ -128,14 +128,14 @@ function createFilterByQueryParamFromConfig(configs) {
128
128
  }
129
129
  }
130
130
 
131
- const useStyles$4 = makeStyles((_theme) => ({
131
+ const useStyles$3 = makeStyles((_theme) => ({
132
132
  name: {
133
133
  marginLeft: "0.8rem",
134
134
  marginRight: "0.8rem"
135
135
  }
136
136
  }));
137
137
  const ItemName = ({ visit }) => {
138
- const classes = useStyles$4();
138
+ const classes = useStyles$3();
139
139
  return /* @__PURE__ */ React.createElement(
140
140
  Typography,
141
141
  {
@@ -168,7 +168,7 @@ const ItemDetail = ({
168
168
  type
169
169
  }) => type === "time-ago" ? /* @__PURE__ */ React.createElement(ItemDetailTimeAgo, { visit }) : /* @__PURE__ */ React.createElement(ItemDetailHits, { visit });
170
170
 
171
- const useStyles$3 = makeStyles((theme) => ({
171
+ const useStyles$2 = makeStyles((theme) => ({
172
172
  chip: {
173
173
  color: theme.palette.common.white,
174
174
  fontWeight: "bold",
@@ -210,7 +210,7 @@ const getChipColor = (entity) => {
210
210
  };
211
211
  const ItemCategory = ({ visit }) => {
212
212
  var _a;
213
- const classes = useStyles$3();
213
+ const classes = useStyles$2();
214
214
  const entity = maybeEntity(visit);
215
215
  return /* @__PURE__ */ React.createElement(
216
216
  Chip,
@@ -223,7 +223,7 @@ const ItemCategory = ({ visit }) => {
223
223
  );
224
224
  };
225
225
 
226
- const useStyles$2 = makeStyles((_theme) => ({
226
+ const useStyles$1 = makeStyles((_theme) => ({
227
227
  avatar: {
228
228
  minWidth: 0
229
229
  }
@@ -232,7 +232,7 @@ const VisitListItem = ({
232
232
  visit,
233
233
  detailType
234
234
  }) => {
235
- const classes = useStyles$2();
235
+ const classes = useStyles$1();
236
236
  return /* @__PURE__ */ React.createElement(ListItem, { disableGutters: true }, /* @__PURE__ */ React.createElement(ListItemAvatar, { className: classes.avatar }, /* @__PURE__ */ React.createElement(ItemCategory, { visit })), /* @__PURE__ */ React.createElement(
237
237
  ListItemText,
238
238
  {
@@ -247,13 +247,13 @@ const VisitListEmpty = () => /* @__PURE__ */ React.createElement(React.Fragment,
247
247
 
248
248
  const VisitListFew = () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Typography, { variant: "body2", color: "textSecondary" }, "The more pages you visit, the more pages will appear here."));
249
249
 
250
- const useStyles$1 = makeStyles((_theme) => ({
250
+ const useStyles = makeStyles((_theme) => ({
251
251
  skeleton: {
252
252
  borderRadius: 30
253
253
  }
254
254
  }));
255
255
  const VisitListItemSkeleton = () => {
256
- const classes = useStyles$1();
256
+ const classes = useStyles();
257
257
  return /* @__PURE__ */ React.createElement(ListItem, { disableGutters: true }, /* @__PURE__ */ React.createElement(ListItemAvatar, null, /* @__PURE__ */ React.createElement(
258
258
  Skeleton,
259
259
  {
@@ -276,21 +276,15 @@ const VisitListSkeleton = ({
276
276
  collapsed
277
277
  }) => /* @__PURE__ */ React.createElement(React.Fragment, null, Array(numVisitsOpen).fill(null).map((_e, index) => /* @__PURE__ */ React.createElement(VisitListItemSkeleton, { key: index })), numVisitsTotal > numVisitsOpen && /* @__PURE__ */ React.createElement(Collapse, { in: !collapsed }, Array(numVisitsTotal - numVisitsOpen).fill(null).map((_e, index) => /* @__PURE__ */ React.createElement(VisitListItemSkeleton, { key: index }))));
278
278
 
279
- const useStyles = makeStyles((_theme) => ({
280
- title: {
281
- marginBottom: "2rem"
282
- }
283
- }));
284
279
  const VisitList = ({
285
- title,
286
280
  detailType,
287
281
  visits = [],
288
282
  numVisitsOpen = 3,
289
283
  numVisitsTotal = 8,
290
284
  collapsed = true,
291
- loading = false
285
+ loading = false,
286
+ title = ""
292
287
  }) => {
293
- const classes = useStyles();
294
288
  let listBody = /* @__PURE__ */ React.createElement(React.Fragment, null);
295
289
  if (loading) {
296
290
  listBody = /* @__PURE__ */ React.createElement(
@@ -315,7 +309,7 @@ const VisitList = ({
315
309
  }
316
310
  ))));
317
311
  }
318
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Typography, { variant: "h5", className: classes.title }, title), /* @__PURE__ */ React.createElement(List, { dense: true, disablePadding: true }, listBody));
312
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, title && /* @__PURE__ */ React.createElement("h5", null, title), /* @__PURE__ */ React.createElement(List, { dense: true, disablePadding: true }, listBody));
319
313
  };
320
314
 
321
315
  const VisitedByType = () => {
@@ -324,7 +318,6 @@ const VisitedByType = () => {
324
318
  VisitList,
325
319
  {
326
320
  visits,
327
- title: kind === "top" ? "Top Visited" : "Recently Visited",
328
321
  detailType: kind === "top" ? "hits" : "time-ago",
329
322
  collapsed,
330
323
  numVisitsOpen,
@@ -392,4 +385,4 @@ const Content = ({
392
385
  };
393
386
 
394
387
  export { Actions as A, Content as C, ContextProvider as a };
395
- //# sourceMappingURL=Content-cd749ae7.esm.js.map
388
+ //# sourceMappingURL=Content-5578e5a3.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content-5578e5a3.esm.js","sources":["../../src/homePageComponents/VisitedByType/Context.tsx","../../src/homePageComponents/VisitedByType/Actions.tsx","../../src/api/config.ts","../../src/components/VisitList/ItemName.tsx","../../src/components/VisitList/ItemDetail.tsx","../../src/components/VisitList/ItemCategory.tsx","../../src/components/VisitList/VisitListItem.tsx","../../src/components/VisitList/VisitListEmpty.tsx","../../src/components/VisitList/VisitListFew.tsx","../../src/components/VisitList/VisitListSkeleton.tsx","../../src/components/VisitList/VisitList.tsx","../../src/homePageComponents/VisitedByType/VisitedByType.tsx","../../src/homePageComponents/VisitedByType/Content.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Dispatch, SetStateAction, createContext, useMemo } from 'react';\nimport { Visit } from '../../api/VisitsApi';\nimport { VisitedByTypeKind } from './Content';\n\nexport type ContextValueOnly = {\n collapsed: boolean;\n numVisitsOpen: number;\n numVisitsTotal: number;\n visits: Array<Visit>;\n loading: boolean;\n kind: VisitedByTypeKind;\n};\n\nexport type ContextValue = ContextValueOnly & {\n setCollapsed: Dispatch<SetStateAction<boolean>>;\n setNumVisitsOpen: Dispatch<SetStateAction<number>>;\n setNumVisitsTotal: Dispatch<SetStateAction<number>>;\n setVisits: Dispatch<SetStateAction<Array<Visit>>>;\n setLoading: Dispatch<SetStateAction<boolean>>;\n setKind: Dispatch<SetStateAction<VisitedByTypeKind>>;\n setContext: Dispatch<SetStateAction<ContextValueOnly>>;\n};\n\nconst defaultContextValueOnly: ContextValueOnly = {\n collapsed: true,\n numVisitsOpen: 3,\n numVisitsTotal: 8,\n visits: [],\n loading: true,\n kind: 'recent',\n};\n\nexport const defaultContextValue: ContextValue = {\n ...defaultContextValueOnly,\n setCollapsed: () => {},\n setNumVisitsOpen: () => {},\n setNumVisitsTotal: () => {},\n setVisits: () => {},\n setLoading: () => {},\n setKind: () => {},\n setContext: () => {},\n};\n\nexport const Context = createContext<ContextValue>(defaultContextValue);\n\nconst getFilteredSet =\n <T,>(\n setContext: Dispatch<SetStateAction<ContextValueOnly>>,\n contextKey: keyof ContextValueOnly,\n ) =>\n (e: SetStateAction<T>) =>\n setContext(state => ({\n ...state,\n [contextKey]:\n typeof e === 'function' ? (e as Function)(state[contextKey]) : e,\n }));\n\nexport const ContextProvider = ({ children }: { children: JSX.Element }) => {\n const [context, setContext] = React.useState<ContextValueOnly>(\n defaultContextValueOnly,\n );\n const {\n setCollapsed,\n setNumVisitsOpen,\n setNumVisitsTotal,\n setVisits,\n setLoading,\n setKind,\n } = useMemo(\n () => ({\n setCollapsed: getFilteredSet(setContext, 'collapsed'),\n setNumVisitsOpen: getFilteredSet(setContext, 'numVisitsOpen'),\n setNumVisitsTotal: getFilteredSet(setContext, 'numVisitsTotal'),\n setVisits: getFilteredSet(setContext, 'visits'),\n setLoading: getFilteredSet(setContext, 'loading'),\n setKind: getFilteredSet(setContext, 'kind'),\n }),\n [setContext],\n );\n\n const value: ContextValue = {\n ...context,\n setContext,\n setCollapsed,\n setNumVisitsOpen,\n setNumVisitsTotal,\n setVisits,\n setLoading,\n setKind,\n };\n\n return <Context.Provider value={value}>{children}</Context.Provider>;\n};\n\nexport const useContext = () => {\n const value = React.useContext(Context);\n\n if (value === undefined)\n throw new Error(\n 'VisitedByType useContext found undefined ContextValue, <ContextProvider/> could be missing',\n );\n\n return value;\n};\n\nexport default Context;\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useCallback } from 'react';\nimport { Button } from '@material-ui/core';\nimport { useContext } from './Context';\n\nexport const Actions = () => {\n const { collapsed, setCollapsed, visits, numVisitsOpen, loading } =\n useContext();\n const onClick = useCallback(\n () => setCollapsed(prevCollapsed => !prevCollapsed),\n [setCollapsed],\n );\n const label = collapsed ? 'View More' : 'View Less';\n\n if (!loading && visits.length <= numVisitsOpen) return <></>;\n\n return (\n <Button variant=\"text\" onClick={onClick}>\n {label}\n </Button>\n );\n};\n","/*\n * Copyright 2023 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 Visit,\n VisitsApiQueryParams,\n Operators,\n isOperator,\n} from './VisitsApi';\nimport { Config } from '@backstage/config';\n\n/**\n * Reads a single FilterBy config.\n *\n * @param config - The single config object\n *\n * @public\n */\n\nexport function readFilterConfig(config: Config):\n | {\n field: keyof Visit;\n operator: Operators;\n value: string | number;\n }\n | undefined {\n try {\n const field = config.getString('field') as keyof Visit;\n const operator = config.getString('operator');\n const value = getValue(config);\n if (isOperator(operator) && value !== undefined) {\n return { field, operator, value };\n }\n return undefined;\n } catch (error) {\n // invalid filter config - ignore filter\n return undefined;\n }\n}\n\nfunction getValue(config: Config) {\n let value = undefined;\n try {\n value = config.getString('value');\n } catch (error) {\n try {\n value = config.getNumber('value');\n } catch {\n // value is not string or number - ignore filter\n }\n }\n return value;\n}\n\n/**\n * Reads a set of filter by configs.\n *\n * @param configs - All of the config objects\n *\n * @public\n */\nexport function createFilterByQueryParamFromConfig(\n configs: Config[],\n): VisitsApiQueryParams['filterBy'] | undefined {\n try {\n return configs\n .map(readFilterConfig)\n .filter(Boolean) as VisitsApiQueryParams['filterBy'];\n } catch {\n return undefined;\n }\n}\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Typography, makeStyles } from '@material-ui/core';\nimport { Visit } from '../../api/VisitsApi';\nimport { Link } from '@backstage/core-components';\n\nconst useStyles = makeStyles(_theme => ({\n name: {\n marginLeft: '0.8rem',\n marginRight: '0.8rem',\n },\n}));\nexport const ItemName = ({ visit }: { visit: Visit }) => {\n const classes = useStyles();\n\n return (\n <Typography\n component={Link}\n to={visit.pathname}\n noWrap\n className={classes.name}\n >\n {visit.name}\n </Typography>\n );\n};\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Typography } from '@material-ui/core';\nimport { Visit } from '../../api/VisitsApi';\nimport { DateTime } from 'luxon';\n\nconst ItemDetailHits = ({ visit }: { visit: Visit }) => (\n <Typography component=\"span\" variant=\"caption\" color=\"textSecondary\">\n {visit.hits} time{visit.hits > 1 ? 's' : ''}\n </Typography>\n);\n\nconst ItemDetailTimeAgo = ({ visit }: { visit: Visit }) => {\n const visitDate = DateTime.fromMillis(visit.timestamp);\n\n return (\n <Typography\n component=\"time\"\n variant=\"caption\"\n color=\"textSecondary\"\n dateTime={visitDate.toISO() ?? undefined}\n >\n {visitDate >= DateTime.now().startOf('day')\n ? visitDate.toFormat('HH:mm')\n : visitDate.toRelative()}\n </Typography>\n );\n};\n\nexport type ItemDetailType = 'time-ago' | 'hits';\n\nexport const ItemDetail = ({\n visit,\n type,\n}: {\n visit: Visit;\n type: ItemDetailType;\n}) =>\n type === 'time-ago' ? (\n <ItemDetailTimeAgo visit={visit} />\n ) : (\n <ItemDetailHits visit={visit} />\n );\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Chip, makeStyles } from '@material-ui/core';\nimport { colorVariants } from '@backstage/theme';\nimport { Visit } from '../../api/VisitsApi';\nimport { CompoundEntityRef, parseEntityRef } from '@backstage/catalog-model';\n\nconst useStyles = makeStyles(theme => ({\n chip: {\n color: theme.palette.common.white,\n fontWeight: 'bold',\n margin: 0,\n },\n}));\nconst maybeEntity = (visit: Visit): CompoundEntityRef | undefined => {\n try {\n return parseEntityRef(visit?.entityRef ?? '');\n } catch (e) {\n return undefined;\n }\n};\nconst getColorByIndex = (index: number) => {\n const variants = Object.keys(colorVariants);\n const variantIndex = index % variants.length;\n return colorVariants[variants[variantIndex]][0];\n};\nconst getChipColor = (entity: CompoundEntityRef | undefined): string => {\n const defaultColor = getColorByIndex(0);\n if (!entity) return defaultColor;\n\n // IDEA: Use or replicate useAllKinds hook thus supporting all software catalog\n // registered kinds. See:\n // plugins/catalog-react/src/components/EntityKindPicker/kindFilterUtils.ts\n // Provide extension point to register your own color code.\n const entityKinds = [\n 'component',\n 'template',\n 'api',\n 'group',\n 'user',\n 'resource',\n 'system',\n 'domain',\n 'location',\n ];\n const foundIndex = entityKinds.indexOf(\n entity.kind.toLocaleLowerCase('en-US'),\n );\n return foundIndex === -1 ? defaultColor : getColorByIndex(foundIndex + 1);\n};\n\nexport const ItemCategory = ({ visit }: { visit: Visit }) => {\n const classes = useStyles();\n const entity = maybeEntity(visit);\n\n return (\n <Chip\n size=\"small\"\n className={classes.chip}\n label={(entity?.kind ?? 'Other').toLocaleLowerCase('en-US')}\n style={{ background: getChipColor(entity) }}\n />\n );\n};\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport {\n ListItem,\n ListItemAvatar,\n ListItemText,\n makeStyles,\n} from '@material-ui/core';\nimport { Visit } from '../../api/VisitsApi';\nimport { ItemName } from './ItemName';\nimport { ItemDetail, ItemDetailType } from './ItemDetail';\nimport { ItemCategory } from './ItemCategory';\n\nconst useStyles = makeStyles(_theme => ({\n avatar: {\n minWidth: 0,\n },\n}));\nexport const VisitListItem = ({\n visit,\n detailType,\n}: {\n visit: Visit;\n detailType: ItemDetailType;\n}) => {\n const classes = useStyles();\n\n return (\n <ListItem disableGutters>\n <ListItemAvatar className={classes.avatar}>\n <ItemCategory visit={visit} />\n </ListItemAvatar>\n <ListItemText\n primary={<ItemName visit={visit} />}\n secondary={<ItemDetail visit={visit} type={detailType} />}\n disableTypography\n />\n </ListItem>\n );\n};\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Typography } from '@material-ui/core';\n\nexport const VisitListEmpty = () => (\n <>\n <Typography variant=\"body2\" color=\"textSecondary\">\n There are no visits to show yet.\n </Typography>\n <Typography variant=\"body2\" color=\"textSecondary\">\n Once you start using Backstage, your visits will appear here as a quick\n link to carry on where you left off.\n </Typography>\n </>\n);\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Typography } from '@material-ui/core';\n\nexport const VisitListFew = () => (\n <>\n <Typography variant=\"body2\" color=\"textSecondary\">\n The more pages you visit, the more pages will appear here.\n </Typography>\n </>\n);\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport {\n Collapse,\n ListItem,\n ListItemAvatar,\n ListItemText,\n makeStyles,\n} from '@material-ui/core';\nimport { Skeleton } from '@material-ui/lab';\n\nconst useStyles = makeStyles(_theme => ({\n skeleton: {\n borderRadius: 30,\n },\n}));\n\nconst VisitListItemSkeleton = () => {\n const classes = useStyles();\n\n return (\n <ListItem disableGutters>\n <ListItemAvatar>\n <Skeleton\n className={classes.skeleton}\n variant=\"rect\"\n width={50}\n height={24}\n />\n </ListItemAvatar>\n <ListItemText\n primary={<Skeleton variant=\"text\" width=\"100%\" height={28} />}\n disableTypography\n />\n </ListItem>\n );\n};\n\nexport const VisitListSkeleton = ({\n numVisitsOpen,\n numVisitsTotal,\n collapsed,\n}: {\n numVisitsOpen: number;\n numVisitsTotal: number;\n collapsed: boolean;\n}) => (\n <>\n {Array(numVisitsOpen)\n .fill(null)\n .map((_e, index) => (\n <VisitListItemSkeleton key={index} />\n ))}\n {numVisitsTotal > numVisitsOpen && (\n <Collapse in={!collapsed}>\n {Array(numVisitsTotal - numVisitsOpen)\n .fill(null)\n .map((_e, index) => (\n <VisitListItemSkeleton key={index} />\n ))}\n </Collapse>\n )}\n </>\n);\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Collapse, List } from '@material-ui/core';\nimport { Visit } from '../../api/VisitsApi';\nimport { VisitListItem } from './VisitListItem';\nimport { ItemDetailType } from './ItemDetail';\nimport { VisitListEmpty } from './VisitListEmpty';\nimport { VisitListFew } from './VisitListFew';\nimport { VisitListSkeleton } from './VisitListSkeleton';\n\nexport const VisitList = ({\n detailType,\n visits = [],\n numVisitsOpen = 3,\n numVisitsTotal = 8,\n collapsed = true,\n loading = false,\n title = '',\n}: {\n detailType: ItemDetailType;\n visits?: Visit[];\n numVisitsOpen?: number;\n numVisitsTotal?: number;\n collapsed?: boolean;\n loading?: boolean;\n title?: string;\n}) => {\n let listBody: React.ReactElement = <></>;\n if (loading) {\n listBody = (\n <VisitListSkeleton\n numVisitsOpen={numVisitsOpen}\n numVisitsTotal={numVisitsTotal}\n collapsed={collapsed}\n />\n );\n } else if (visits.length === 0) {\n listBody = <VisitListEmpty />;\n } else if (visits.length < numVisitsOpen) {\n listBody = (\n <>\n {visits.map((visit, index) => (\n <VisitListItem visit={visit} key={index} detailType={detailType} />\n ))}\n <VisitListFew />\n </>\n );\n } else {\n listBody = (\n <>\n {visits.slice(0, numVisitsOpen).map((visit, index) => (\n <VisitListItem visit={visit} key={index} detailType={detailType} />\n ))}\n {visits.length > numVisitsOpen && (\n <Collapse in={!collapsed}>\n {visits.slice(numVisitsOpen, numVisitsTotal).map((visit, index) => (\n <VisitListItem\n visit={visit}\n key={index}\n detailType={detailType}\n />\n ))}\n </Collapse>\n )}\n </>\n );\n }\n\n return (\n <>\n {title && <h5>{title}</h5>}\n <List dense disablePadding>\n {listBody}\n </List>\n </>\n );\n};\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { VisitList } from '../../components/VisitList';\nimport { useContext } from './Context';\n\nexport const VisitedByType = () => {\n const { collapsed, numVisitsOpen, numVisitsTotal, visits, loading, kind } =\n useContext();\n\n return (\n <VisitList\n visits={visits}\n detailType={kind === 'top' ? 'hits' : 'time-ago'}\n collapsed={collapsed}\n numVisitsOpen={numVisitsOpen}\n numVisitsTotal={numVisitsTotal}\n loading={loading}\n />\n );\n};\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useEffect } from 'react';\nimport { createFilterByQueryParamFromConfig } from '../../api/config';\nimport { VisitedByType } from './VisitedByType';\nimport { Visit, visitsApiRef } from '../../api';\nimport { ContextValueOnly, useContext } from './Context';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/lib/useAsync';\n\n/** @public */\nexport type VisitedByTypeKind = 'recent' | 'top';\n\n/** @public */\nexport type VisitedByTypeProps = {\n visits?: Array<Visit>;\n numVisitsOpen?: number;\n numVisitsTotal?: number;\n loading?: boolean;\n kind: VisitedByTypeKind;\n};\n\n/**\n * Display recently visited pages for the homepage\n * @public\n */\nexport const Content = ({\n visits,\n numVisitsOpen,\n numVisitsTotal,\n loading,\n kind,\n}: VisitedByTypeProps) => {\n const { setContext, setVisits, setLoading } = useContext();\n // Allows behavior override from properties\n useEffect(() => {\n const context: Partial<ContextValueOnly> = {};\n context.kind = kind;\n if (visits) {\n context.visits = visits;\n context.loading = false;\n } else if (loading) {\n context.loading = loading;\n }\n if (numVisitsOpen) context.numVisitsOpen = numVisitsOpen;\n if (numVisitsTotal) context.numVisitsTotal = numVisitsTotal;\n setContext(state => ({ ...state, ...context }));\n }, [setContext, kind, visits, loading, numVisitsOpen, numVisitsTotal]);\n\n const config = useApi(configApiRef);\n // Fetches data from visitsApi in case visits and loading are not provided\n const visitsApi = useApi(visitsApiRef);\n const { loading: reqLoading } = useAsync(async () => {\n if (!visits && !loading && kind === 'recent') {\n const filterBy = createFilterByQueryParamFromConfig(\n config.getOptionalConfigArray('home.recentVisits.filterBy') ?? [],\n );\n return await visitsApi\n .list({\n limit: numVisitsTotal ?? 8,\n orderBy: [{ field: 'timestamp', direction: 'desc' }],\n ...(filterBy && { filterBy }),\n })\n .then(setVisits);\n }\n if (!visits && !loading && kind === 'top') {\n const filterBy = createFilterByQueryParamFromConfig(\n config.getOptionalConfigArray('home.topVisits.filterBy') ?? [],\n );\n return await visitsApi\n .list({\n limit: numVisitsTotal ?? 8,\n orderBy: [{ field: 'hits', direction: 'desc' }],\n ...(filterBy && { filterBy }),\n })\n .then(setVisits);\n }\n return undefined;\n }, [visitsApi, visits, loading, setVisits]);\n useEffect(() => {\n if (!loading) {\n setLoading(reqLoading);\n }\n }, [loading, setLoading, reqLoading]);\n\n return <VisitedByType />;\n};\n"],"names":["useStyles"],"mappings":";;;;;;;;;;;;AAuCA,MAAM,uBAA4C,GAAA;AAAA,EAChD,SAAW,EAAA,IAAA;AAAA,EACX,aAAe,EAAA,CAAA;AAAA,EACf,cAAgB,EAAA,CAAA;AAAA,EAChB,QAAQ,EAAC;AAAA,EACT,OAAS,EAAA,IAAA;AAAA,EACT,IAAM,EAAA,QAAA;AACR,CAAA,CAAA;AAEO,MAAM,mBAAoC,GAAA;AAAA,EAC/C,GAAG,uBAAA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GAAA,CAAA;AAAA,QACzB,SAAS,CAAC,EAAE,OAAO,WAAa,EAAA,SAAA,EAAW,QAAQ,CAAA;AAAA,QACnD,GAAI,QAAY,IAAA,EAAE,QAAS,EAAA;AAAA,OAC5B,CACA,CAAA,IAAA,CAAK,SAAS,CAAA,CAAA;AAAA,KACnB;AACA,IAAA,IAAI,CAAC,MAAA,IAAU,CAAC,OAAA,IAAW,SAAS,KAAO,EAAA;AACzC,MAAA,MAAM,QAAW,GAAA,kCAAA;AAAA,QAAA,CACf,EAAO,GAAA,MAAA,CAAA,sBAAA,CAAuB,yBAAyB,CAAA,KAAvD,YAA4D,EAAC;AAAA,OAC/D,CAAA;AACA,MAAO,OAAA,MAAM,UACV,IAAK,CAAA;AAAA,QACJ,OAAO,cAAkB,IAAA,IAAA,GAAA,cAAA,GAAA,CAAA;AAAA,QACzB,SAAS,CAAC,EAAE,OAAO,MAAQ,EAAA,SAAA,EAAW,QAAQ,CAAA;AAAA,QAC9C,GAAI,QAAY,IAAA,EAAE,QAAS,EAAA;AAAA,OAC5B,CACA,CAAA,IAAA,CAAK,SAAS,CAAA,CAAA;AAAA,KACnB;AACA,IAAO,OAAA,KAAA,CAAA,CAAA;AAAA,KACN,CAAC,SAAA,EAAW,MAAQ,EAAA,OAAA,EAAS,SAAS,CAAC,CAAA,CAAA;AAC1C,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,CAAC,OAAS,EAAA;AACZ,MAAA,UAAA,CAAW,UAAU,CAAA,CAAA;AAAA,KACvB;AAAA,GACC,EAAA,CAAC,OAAS,EAAA,UAAA,EAAY,UAAU,CAAC,CAAA,CAAA;AAEpC,EAAA,2CAAQ,aAAc,EAAA,IAAA,CAAA,CAAA;AACxB;;;;"}
@@ -1,5 +1,5 @@
1
- import { C as Content } from './Content-cd749ae7.esm.js';
2
- export { A as Actions, a as ContextProvider } from './Content-cd749ae7.esm.js';
1
+ import { C as Content } from './Content-5578e5a3.esm.js';
2
+ export { A as Actions, a as ContextProvider } from './Content-5578e5a3.esm.js';
3
3
  import React from 'react';
4
4
  import '@material-ui/core';
5
5
  import './VisitListener-7a513ef0.esm.js';
@@ -37,4 +37,4 @@ import 'react-use/lib/useAsync';
37
37
  const RecentlyVisitedContent = (props) => /* @__PURE__ */ React.createElement(Content, { ...props, kind: "recent" });
38
38
 
39
39
  export { RecentlyVisitedContent as Content };
40
- //# sourceMappingURL=RecentlyVisited-c0ca7307.esm.js.map
40
+ //# sourceMappingURL=RecentlyVisited-04568b67.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RecentlyVisited-c0ca7307.esm.js","sources":["../../src/homePageComponents/VisitedByType/RecentlyVisited.tsx"],"sourcesContent":["/*\n * Copyright 2023 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\nexport { Actions } from './Actions';\nexport { ContextProvider } from './Context';\nexport type { VisitedByTypeProps, VisitedByTypeKind } from './Content';\nimport React from 'react';\nimport { Content, VisitedByTypeProps } from './Content';\n\nconst RecentlyVisitedContent = (props: Partial<VisitedByTypeProps>) => (\n <Content {...props} kind=\"recent\" />\n);\n\nexport { RecentlyVisitedContent as Content };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBM,MAAA,sBAAA,GAAyB,CAAC,KAC9B,qBAAA,KAAA,CAAA,aAAA,CAAC,WAAS,GAAG,KAAA,EAAO,MAAK,QAAS,EAAA;;;;"}
1
+ {"version":3,"file":"RecentlyVisited-04568b67.esm.js","sources":["../../src/homePageComponents/VisitedByType/RecentlyVisited.tsx"],"sourcesContent":["/*\n * Copyright 2023 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\nexport { Actions } from './Actions';\nexport { ContextProvider } from './Context';\nexport type { VisitedByTypeProps, VisitedByTypeKind } from './Content';\nimport React from 'react';\nimport { Content, VisitedByTypeProps } from './Content';\n\nconst RecentlyVisitedContent = (props: Partial<VisitedByTypeProps>) => (\n <Content {...props} kind=\"recent\" />\n);\n\nexport { RecentlyVisitedContent as Content };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBM,MAAA,sBAAA,GAAyB,CAAC,KAC9B,qBAAA,KAAA,CAAA,aAAA,CAAC,WAAS,GAAG,KAAA,EAAO,MAAK,QAAS,EAAA;;;;"}
@@ -1,5 +1,5 @@
1
- import { C as Content } from './Content-cd749ae7.esm.js';
2
- export { A as Actions, a as ContextProvider } from './Content-cd749ae7.esm.js';
1
+ import { C as Content } from './Content-5578e5a3.esm.js';
2
+ export { A as Actions, a as ContextProvider } from './Content-5578e5a3.esm.js';
3
3
  import React from 'react';
4
4
  import '@material-ui/core';
5
5
  import './VisitListener-7a513ef0.esm.js';
@@ -37,4 +37,4 @@ import 'react-use/lib/useAsync';
37
37
  const TopVisitedContent = (props) => /* @__PURE__ */ React.createElement(Content, { ...props, kind: "top" });
38
38
 
39
39
  export { TopVisitedContent as Content };
40
- //# sourceMappingURL=TopVisited-d22fb15d.esm.js.map
40
+ //# sourceMappingURL=TopVisited-1659adf6.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopVisited-d22fb15d.esm.js","sources":["../../src/homePageComponents/VisitedByType/TopVisited.tsx"],"sourcesContent":["/*\n * Copyright 2023 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\nexport { Actions } from './Actions';\nexport { ContextProvider } from './Context';\nexport type { VisitedByTypeProps, VisitedByTypeKind } from './Content';\nimport React from 'react';\nimport { Content, VisitedByTypeProps } from './Content';\n\nconst TopVisitedContent = (props: Partial<VisitedByTypeProps>) => (\n <Content {...props} kind=\"top\" />\n);\n\nexport { TopVisitedContent as Content };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBM,MAAA,iBAAA,GAAoB,CAAC,KACzB,qBAAA,KAAA,CAAA,aAAA,CAAC,WAAS,GAAG,KAAA,EAAO,MAAK,KAAM,EAAA;;;;"}
1
+ {"version":3,"file":"TopVisited-1659adf6.esm.js","sources":["../../src/homePageComponents/VisitedByType/TopVisited.tsx"],"sourcesContent":["/*\n * Copyright 2023 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\nexport { Actions } from './Actions';\nexport { ContextProvider } from './Context';\nexport type { VisitedByTypeProps, VisitedByTypeKind } from './Content';\nimport React from 'react';\nimport { Content, VisitedByTypeProps } from './Content';\n\nconst TopVisitedContent = (props: Partial<VisitedByTypeProps>) => (\n <Content {...props} kind=\"top\" />\n);\n\nexport { TopVisitedContent as Content };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBM,MAAA,iBAAA,GAAoB,CAAC,KACzB,qBAAA,KAAA,CAAA,aAAA,CAAC,WAAS,GAAG,KAAA,EAAO,MAAK,KAAM,EAAA;;;;"}
package/dist/index.esm.js CHANGED
@@ -276,13 +276,15 @@ const HeaderWorldClock = homePlugin.provide(
276
276
  const HomePageTopVisited = homePlugin.provide(
277
277
  createCardExtension$1({
278
278
  name: "HomePageTopVisited",
279
- components: () => import('./esm/TopVisited-d22fb15d.esm.js')
279
+ title: "Top Visited",
280
+ components: () => import('./esm/TopVisited-1659adf6.esm.js')
280
281
  })
281
282
  );
282
283
  const HomePageRecentlyVisited = homePlugin.provide(
283
284
  createCardExtension$1({
284
285
  name: "HomePageRecentlyVisited",
285
- components: () => import('./esm/RecentlyVisited-c0ca7307.esm.js')
286
+ title: "Recently Visited",
287
+ components: () => import('./esm/RecentlyVisited-04568b67.esm.js')
286
288
  })
287
289
  );
288
290
  const FeaturedDocsCard = homePlugin.provide(
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/routes.ts","../src/api/VisitsStorageApi.ts","../src/api/VisitsWebStorageApi.ts","../src/plugin.ts","../src/assets/TemplateBackstageLogo.tsx","../src/assets/TemplateBackstageLogoIcon.tsx","../src/deprecated.ts"],"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 */\nimport { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'home',\n});\n","/*\n * Copyright 2023 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 { IdentityApi, StorageApi } from '@backstage/core-plugin-api';\nimport {\n Visit,\n VisitsApi,\n VisitsApiQueryParams,\n VisitsApiSaveParams,\n} from './VisitsApi';\n\n/** @public */\nexport type VisitsStorageApiOptions = {\n limit?: number;\n storageApi: StorageApi;\n identityApi: IdentityApi;\n};\n\ntype ArrayElement<A> = A extends readonly (infer T)[] ? T : never;\n\n/**\n * @public\n * This is an implementation of VisitsApi that relies on a StorageApi.\n * Beware that filtering and ordering are done in memory therefore it is\n * prudent to keep limit to a reasonable size.\n */\nexport class VisitsStorageApi implements VisitsApi {\n private readonly limit: number;\n private readonly storageApi: StorageApi;\n private readonly storageKeyPrefix = '@backstage/plugin-home:visits';\n private readonly identityApi: IdentityApi;\n\n static create(options: VisitsStorageApiOptions) {\n return new VisitsStorageApi(options);\n }\n\n private constructor(options: VisitsStorageApiOptions) {\n this.limit = Math.abs(options.limit ?? 100);\n this.storageApi = options.storageApi;\n this.identityApi = options.identityApi;\n }\n\n /**\n * Returns a list of visits through the visitsApi\n */\n async list(queryParams?: VisitsApiQueryParams): Promise<Visit[]> {\n let visits = [...(await this.retrieveAll())];\n\n // reversing order to guarantee orderBy priority\n (queryParams?.orderBy ?? []).reverse().forEach(order => {\n if (order.direction === 'asc') {\n visits.sort((a, b) => this.compare(order, a, b));\n } else {\n visits.sort((a, b) => this.compare(order, b, a));\n }\n });\n\n // reversing order to guarantee filterBy priority\n (queryParams?.filterBy ?? []).reverse().forEach(filter => {\n visits = visits.filter(visit => {\n const field = visit[filter.field] as number | string;\n if (filter.operator === '>') return field > filter.value;\n if (filter.operator === '>=') return field >= filter.value;\n if (filter.operator === '<') return field < filter.value;\n if (filter.operator === '<=') return field <= filter.value;\n if (filter.operator === '==') return field === filter.value;\n if (filter.operator === '!=') return field !== filter.value;\n if (filter.operator === 'contains')\n return `${field}`.includes(`${filter.value}`);\n return false;\n });\n });\n\n return visits;\n }\n\n /**\n * Saves a visit through the visitsApi\n */\n async save(saveParams: VisitsApiSaveParams): Promise<Visit> {\n const visits: Visit[] = [...(await this.retrieveAll())];\n\n const visit: Visit = {\n ...saveParams.visit,\n id: window.crypto.randomUUID(),\n hits: 1,\n timestamp: Date.now(),\n };\n\n // Updates entry if pathname is already registered\n const visitIndex = visits.findIndex(e => e.pathname === visit.pathname);\n if (visitIndex >= 0) {\n visit.id = visits[visitIndex].id;\n visit.hits = visits[visitIndex].hits + 1;\n visits[visitIndex] = visit;\n } else {\n visits.push(visit);\n }\n\n // Sort by time, most recent first\n visits.sort((a, b) => b.timestamp - a.timestamp);\n // Keep the most recent items up to limit\n await this.persistAll(visits.splice(0, this.limit));\n return visit;\n }\n\n private async persistAll(visits: Array<Visit>) {\n const storageKey = await this.getStorageKey();\n return this.storageApi.set<Array<Visit>>(storageKey, visits);\n }\n\n private async retrieveAll(): Promise<Array<Visit>> {\n const storageKey = await this.getStorageKey();\n // Handles for case when snapshot is and is not referenced per storaged type used\n const snapshot = this.storageApi.snapshot<Array<Visit>>(storageKey);\n if (snapshot?.presence !== 'unknown') {\n return snapshot?.value ?? [];\n }\n\n return new Promise((resolve, reject) => {\n const subscription = this.storageApi\n .observe$<Visit[]>(storageKey)\n .subscribe({\n next: next => {\n const visits = next.value ?? [];\n subscription.unsubscribe();\n resolve(visits);\n },\n error: err => {\n subscription.unsubscribe();\n reject(err);\n },\n });\n });\n }\n\n private async getStorageKey(): Promise<string> {\n const { userEntityRef } = await this.identityApi.getBackstageIdentity();\n const storageKey = `${this.storageKeyPrefix}:${userEntityRef}`;\n return storageKey;\n }\n\n // This assumes Visit fields are either numbers or strings\n private compare(\n order: ArrayElement<VisitsApiQueryParams['orderBy']>,\n a: Visit,\n b: Visit,\n ): number {\n const isNumber = typeof a[order.field] === 'number';\n return isNumber\n ? (a[order.field] as number) - (b[order.field] as number)\n : `${a[order.field]}`.localeCompare(`${b[order.field]}`);\n }\n}\n","/*\n * Copyright 2023 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 { ErrorApi, IdentityApi } from '@backstage/core-plugin-api';\nimport { VisitsStorageApi } from './VisitsStorageApi';\nimport { WebStorage } from '@backstage/core-app-api';\n\n/** @public */\nexport type VisitsWebStorageApiOptions = {\n limit?: number;\n identityApi: IdentityApi;\n errorApi: ErrorApi;\n};\n\n/**\n * @public\n * This is a reference implementation of VisitsApi using WebStorage.\n */\nexport class VisitsWebStorageApi {\n static create(options: VisitsWebStorageApiOptions) {\n return VisitsStorageApi.create({\n limit: options.limit,\n identityApi: options.identityApi,\n storageApi: WebStorage.create({ errorApi: options.errorApi }),\n });\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 */\n\nimport {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n identityApiRef,\n storageApiRef,\n} from '@backstage/core-plugin-api';\nimport { createCardExtension } from '@backstage/plugin-home-react';\nimport {\n ToolkitContentProps,\n VisitedByTypeProps,\n FeaturedDocsCardProps,\n} from './homePageComponents';\nimport { rootRouteRef } from './routes';\nimport { VisitsStorageApi, visitsApiRef } from './api';\nimport { StarredEntitiesProps } from './homePageComponents/StarredEntities/Content';\n\n/** @public */\nexport const homePlugin = createPlugin({\n id: 'home',\n apis: [\n createApiFactory({\n api: visitsApiRef,\n deps: {\n storageApi: storageApiRef,\n identityApi: identityApiRef,\n },\n factory: ({ storageApi, identityApi }) =>\n VisitsStorageApi.create({ storageApi, identityApi }),\n }),\n ],\n routes: {\n root: rootRouteRef,\n },\n});\n\n/** @public */\nexport const HomepageCompositionRoot = homePlugin.provide(\n createRoutableExtension({\n name: 'HomepageCompositionRoot',\n component: () =>\n import('./components').then(m => m.HomepageCompositionRoot),\n mountPoint: rootRouteRef,\n }),\n);\n\n/** @public */\nexport const ComponentAccordion = homePlugin.provide(\n createComponentExtension({\n name: 'ComponentAccordion',\n component: {\n lazy: () =>\n import('./componentRenderers').then(m => m.ComponentAccordion),\n },\n }),\n);\n\n/** @public */\nexport const ComponentTabs = homePlugin.provide(\n createComponentExtension({\n name: 'ComponentTabs',\n component: {\n lazy: () => import('./componentRenderers').then(m => m.ComponentTabs),\n },\n }),\n);\n\n/** @public */\nexport const ComponentTab = homePlugin.provide(\n createComponentExtension({\n name: 'ComponentTab',\n component: {\n lazy: () => import('./componentRenderers').then(m => m.ComponentTab),\n },\n }),\n);\n\n/**\n * A component to display a playful greeting for the user.\n *\n * @public\n */\nexport const WelcomeTitle = homePlugin.provide(\n createComponentExtension({\n name: 'WelcomeTitle',\n component: {\n lazy: () =>\n import('./homePageComponents/WelcomeTitle').then(m => m.WelcomeTitle),\n },\n }),\n);\n\n/**\n * A component to display a company logo for the user.\n *\n * @public\n */\nexport const HomePageCompanyLogo = homePlugin.provide(\n createComponentExtension({\n name: 'CompanyLogo',\n component: {\n lazy: () =>\n import('./homePageComponents/CompanyLogo').then(m => m.CompanyLogo),\n },\n }),\n);\n\n/** @public */\nexport const HomePageRandomJoke = homePlugin.provide(\n createCardExtension<{ defaultCategory?: 'any' | 'programming' }>({\n name: 'HomePageRandomJoke',\n title: 'Random Joke',\n components: () => import('./homePageComponents/RandomJoke'),\n description: 'Shows a random joke about optional category',\n layout: {\n height: { minRows: 4 },\n width: { minColumns: 3 },\n },\n settings: {\n schema: {\n title: 'Random Joke settings',\n type: 'object',\n properties: {\n defaultCategory: {\n title: 'Category',\n type: 'string',\n enum: ['any', 'programming', 'dad'],\n default: 'any',\n },\n },\n },\n },\n }),\n);\n\n/**\n * A component to display a list of tools for the user.\n *\n * @public\n */\nexport const HomePageToolkit = homePlugin.provide(\n createCardExtension<ToolkitContentProps>({\n name: 'HomePageToolkit',\n title: 'Toolkit',\n components: () => import('./homePageComponents/Toolkit'),\n }),\n);\n\n/**\n * A component to display a list of starred entities for the user.\n *\n * @public\n */\nexport const HomePageStarredEntities = homePlugin.provide(\n createCardExtension<Partial<StarredEntitiesProps>>({\n name: 'HomePageStarredEntities',\n title: 'Your Starred Entities',\n components: () => import('./homePageComponents/StarredEntities'),\n }),\n);\n\n/**\n * A component to display a configurable list of clocks for various time zones.\n *\n * @public\n */\nexport const HeaderWorldClock = homePlugin.provide(\n createComponentExtension({\n name: 'HeaderWorldClock',\n component: {\n lazy: () =>\n import('./homePageComponents/HeaderWorldClock').then(\n m => m.HeaderWorldClock,\n ),\n },\n }),\n);\n\n/**\n * Display top visited pages for the homepage\n * @public\n */\nexport const HomePageTopVisited = homePlugin.provide(\n createCardExtension<Partial<VisitedByTypeProps>>({\n name: 'HomePageTopVisited',\n components: () => import('./homePageComponents/VisitedByType/TopVisited'),\n }),\n);\n\n/**\n * Display recently visited pages for the homepage\n * @public\n */\nexport const HomePageRecentlyVisited = homePlugin.provide(\n createCardExtension<Partial<VisitedByTypeProps>>({\n name: 'HomePageRecentlyVisited',\n components: () =>\n import('./homePageComponents/VisitedByType/RecentlyVisited'),\n }),\n);\n\n/**\n * A component to display specific Featured Docs.\n *\n * @public\n */\nexport const FeaturedDocsCard = homePlugin.provide(\n createCardExtension<FeaturedDocsCardProps>({\n name: 'FeaturedDocsCard',\n title: 'Featured Docs',\n components: () => import('./homePageComponents/FeaturedDocsCard'),\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 React from 'react';\n\n/** @public */\nexport const TemplateBackstageLogo = (props: {\n classes: {\n svg: string;\n path: string;\n };\n}) => {\n return (\n <svg\n className={props.classes.svg}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 2079.95 456.05\"\n >\n <path\n className={props.classes.path}\n d=\"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z\"\n />\n </svg>\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 React from 'react';\nimport { makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles({\n svg: {\n width: 'auto',\n height: 28,\n },\n path: {\n fill: '#7df3e1',\n },\n});\n\n/** @public */\nexport const TemplateBackstageLogoIcon = () => {\n const classes = useStyles();\n\n return (\n <svg\n className={classes.svg}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 337.46 428.5\"\n >\n <path\n className={classes.path}\n d=\"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z\"\n />\n </svg>\n );\n};\n","/*\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 {\n createCardExtension as homeReactCreateCardExtension,\n CardConfig as homeReactCardConfig,\n CardExtensionProps as homeReactCardExtensionProps,\n CardLayout as homeReactCardLayout,\n CardSettings as homeReactCardSettings,\n ComponentParts as homeReactComponentParts,\n ComponentRenderer as homeReactComponentRenderer,\n RendererProps as homeReactRendererProps,\n SettingsModal as homeReactSettingsModal,\n} from '@backstage/plugin-home-react';\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport const createCardExtension = homeReactCreateCardExtension;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport type CardExtensionProps<T> = homeReactCardExtensionProps<T>;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport type CardLayout = homeReactCardLayout;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport type CardSettings = homeReactCardSettings;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport type CardConfig = homeReactCardConfig;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport type ComponentParts = homeReactComponentParts;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport type ComponentRenderer = homeReactComponentRenderer;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport type RendererProps = homeReactRendererProps;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport const SettingsModal = homeReactSettingsModal;\n"],"names":["_a","createCardExtension","homeReactCreateCardExtension","homeReactSettingsModal"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA,MAAA;AACN,CAAC,CAAA;;;;;;;;ACmBM,MAAM,gBAAsC,CAAA;AAAA,EAUzC,YAAY,OAAkC,EAAA;AATtD,IAAiB,aAAA,CAAA,IAAA,EAAA,OAAA,CAAA,CAAA;AACjB,IAAiB,aAAA,CAAA,IAAA,EAAA,YAAA,CAAA,CAAA;AACjB,IAAA,aAAA,CAAA,IAAA,EAAiB,kBAAmB,EAAA,+BAAA,CAAA,CAAA;AACpC,IAAiB,aAAA,CAAA,IAAA,EAAA,aAAA,CAAA,CAAA;AA1CnB,IAAA,IAAA,EAAA,CAAA;AAiDI,IAAA,IAAA,CAAK,QAAQ,IAAK,CAAA,GAAA,CAAA,CAAI,EAAQ,GAAA,OAAA,CAAA,KAAA,KAAR,YAAiB,GAAG,CAAA,CAAA;AAC1C,IAAA,IAAA,CAAK,aAAa,OAAQ,CAAA,UAAA,CAAA;AAC1B,IAAA,IAAA,CAAK,cAAc,OAAQ,CAAA,WAAA,CAAA;AAAA,GAC7B;AAAA,EARA,OAAO,OAAO,OAAkC,EAAA;AAC9C,IAAO,OAAA,IAAI,iBAAiB,OAAO,CAAA,CAAA;AAAA,GACrC;AAAA;AAAA;AAAA;AAAA,EAWA,MAAM,KAAK,WAAsD,EAAA;AAzDnE,IAAA,IAA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AAA,MACN,OAAQ,EAAA,kBAAA;AAAA,KAAA;AAAA,oBAER,KAAA,CAAA,aAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,WAAW,OAAQ,CAAA,IAAA;AAAA,QACnB,CAAE,EAAA,8uFAAA;AAAA,OAAA;AAAA,KACJ;AAAA,GACF,CAAA;AAEJ;;ACbO,MAAM,mBAAsB,GAAAC,sBAAA;AAgD5B,MAAM,aAAgB,GAAAC;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/routes.ts","../src/api/VisitsStorageApi.ts","../src/api/VisitsWebStorageApi.ts","../src/plugin.ts","../src/assets/TemplateBackstageLogo.tsx","../src/assets/TemplateBackstageLogoIcon.tsx","../src/deprecated.ts"],"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 */\nimport { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'home',\n});\n","/*\n * Copyright 2023 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 { IdentityApi, StorageApi } from '@backstage/core-plugin-api';\nimport {\n Visit,\n VisitsApi,\n VisitsApiQueryParams,\n VisitsApiSaveParams,\n} from './VisitsApi';\n\n/** @public */\nexport type VisitsStorageApiOptions = {\n limit?: number;\n storageApi: StorageApi;\n identityApi: IdentityApi;\n};\n\ntype ArrayElement<A> = A extends readonly (infer T)[] ? T : never;\n\n/**\n * @public\n * This is an implementation of VisitsApi that relies on a StorageApi.\n * Beware that filtering and ordering are done in memory therefore it is\n * prudent to keep limit to a reasonable size.\n */\nexport class VisitsStorageApi implements VisitsApi {\n private readonly limit: number;\n private readonly storageApi: StorageApi;\n private readonly storageKeyPrefix = '@backstage/plugin-home:visits';\n private readonly identityApi: IdentityApi;\n\n static create(options: VisitsStorageApiOptions) {\n return new VisitsStorageApi(options);\n }\n\n private constructor(options: VisitsStorageApiOptions) {\n this.limit = Math.abs(options.limit ?? 100);\n this.storageApi = options.storageApi;\n this.identityApi = options.identityApi;\n }\n\n /**\n * Returns a list of visits through the visitsApi\n */\n async list(queryParams?: VisitsApiQueryParams): Promise<Visit[]> {\n let visits = [...(await this.retrieveAll())];\n\n // reversing order to guarantee orderBy priority\n (queryParams?.orderBy ?? []).reverse().forEach(order => {\n if (order.direction === 'asc') {\n visits.sort((a, b) => this.compare(order, a, b));\n } else {\n visits.sort((a, b) => this.compare(order, b, a));\n }\n });\n\n // reversing order to guarantee filterBy priority\n (queryParams?.filterBy ?? []).reverse().forEach(filter => {\n visits = visits.filter(visit => {\n const field = visit[filter.field] as number | string;\n if (filter.operator === '>') return field > filter.value;\n if (filter.operator === '>=') return field >= filter.value;\n if (filter.operator === '<') return field < filter.value;\n if (filter.operator === '<=') return field <= filter.value;\n if (filter.operator === '==') return field === filter.value;\n if (filter.operator === '!=') return field !== filter.value;\n if (filter.operator === 'contains')\n return `${field}`.includes(`${filter.value}`);\n return false;\n });\n });\n\n return visits;\n }\n\n /**\n * Saves a visit through the visitsApi\n */\n async save(saveParams: VisitsApiSaveParams): Promise<Visit> {\n const visits: Visit[] = [...(await this.retrieveAll())];\n\n const visit: Visit = {\n ...saveParams.visit,\n id: window.crypto.randomUUID(),\n hits: 1,\n timestamp: Date.now(),\n };\n\n // Updates entry if pathname is already registered\n const visitIndex = visits.findIndex(e => e.pathname === visit.pathname);\n if (visitIndex >= 0) {\n visit.id = visits[visitIndex].id;\n visit.hits = visits[visitIndex].hits + 1;\n visits[visitIndex] = visit;\n } else {\n visits.push(visit);\n }\n\n // Sort by time, most recent first\n visits.sort((a, b) => b.timestamp - a.timestamp);\n // Keep the most recent items up to limit\n await this.persistAll(visits.splice(0, this.limit));\n return visit;\n }\n\n private async persistAll(visits: Array<Visit>) {\n const storageKey = await this.getStorageKey();\n return this.storageApi.set<Array<Visit>>(storageKey, visits);\n }\n\n private async retrieveAll(): Promise<Array<Visit>> {\n const storageKey = await this.getStorageKey();\n // Handles for case when snapshot is and is not referenced per storaged type used\n const snapshot = this.storageApi.snapshot<Array<Visit>>(storageKey);\n if (snapshot?.presence !== 'unknown') {\n return snapshot?.value ?? [];\n }\n\n return new Promise((resolve, reject) => {\n const subscription = this.storageApi\n .observe$<Visit[]>(storageKey)\n .subscribe({\n next: next => {\n const visits = next.value ?? [];\n subscription.unsubscribe();\n resolve(visits);\n },\n error: err => {\n subscription.unsubscribe();\n reject(err);\n },\n });\n });\n }\n\n private async getStorageKey(): Promise<string> {\n const { userEntityRef } = await this.identityApi.getBackstageIdentity();\n const storageKey = `${this.storageKeyPrefix}:${userEntityRef}`;\n return storageKey;\n }\n\n // This assumes Visit fields are either numbers or strings\n private compare(\n order: ArrayElement<VisitsApiQueryParams['orderBy']>,\n a: Visit,\n b: Visit,\n ): number {\n const isNumber = typeof a[order.field] === 'number';\n return isNumber\n ? (a[order.field] as number) - (b[order.field] as number)\n : `${a[order.field]}`.localeCompare(`${b[order.field]}`);\n }\n}\n","/*\n * Copyright 2023 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 { ErrorApi, IdentityApi } from '@backstage/core-plugin-api';\nimport { VisitsStorageApi } from './VisitsStorageApi';\nimport { WebStorage } from '@backstage/core-app-api';\n\n/** @public */\nexport type VisitsWebStorageApiOptions = {\n limit?: number;\n identityApi: IdentityApi;\n errorApi: ErrorApi;\n};\n\n/**\n * @public\n * This is a reference implementation of VisitsApi using WebStorage.\n */\nexport class VisitsWebStorageApi {\n static create(options: VisitsWebStorageApiOptions) {\n return VisitsStorageApi.create({\n limit: options.limit,\n identityApi: options.identityApi,\n storageApi: WebStorage.create({ errorApi: options.errorApi }),\n });\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 */\n\nimport {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n identityApiRef,\n storageApiRef,\n} from '@backstage/core-plugin-api';\nimport { createCardExtension } from '@backstage/plugin-home-react';\nimport {\n ToolkitContentProps,\n VisitedByTypeProps,\n FeaturedDocsCardProps,\n} from './homePageComponents';\nimport { rootRouteRef } from './routes';\nimport { VisitsStorageApi, visitsApiRef } from './api';\nimport { StarredEntitiesProps } from './homePageComponents/StarredEntities/Content';\n\n/** @public */\nexport const homePlugin = createPlugin({\n id: 'home',\n apis: [\n createApiFactory({\n api: visitsApiRef,\n deps: {\n storageApi: storageApiRef,\n identityApi: identityApiRef,\n },\n factory: ({ storageApi, identityApi }) =>\n VisitsStorageApi.create({ storageApi, identityApi }),\n }),\n ],\n routes: {\n root: rootRouteRef,\n },\n});\n\n/** @public */\nexport const HomepageCompositionRoot = homePlugin.provide(\n createRoutableExtension({\n name: 'HomepageCompositionRoot',\n component: () =>\n import('./components').then(m => m.HomepageCompositionRoot),\n mountPoint: rootRouteRef,\n }),\n);\n\n/** @public */\nexport const ComponentAccordion = homePlugin.provide(\n createComponentExtension({\n name: 'ComponentAccordion',\n component: {\n lazy: () =>\n import('./componentRenderers').then(m => m.ComponentAccordion),\n },\n }),\n);\n\n/** @public */\nexport const ComponentTabs = homePlugin.provide(\n createComponentExtension({\n name: 'ComponentTabs',\n component: {\n lazy: () => import('./componentRenderers').then(m => m.ComponentTabs),\n },\n }),\n);\n\n/** @public */\nexport const ComponentTab = homePlugin.provide(\n createComponentExtension({\n name: 'ComponentTab',\n component: {\n lazy: () => import('./componentRenderers').then(m => m.ComponentTab),\n },\n }),\n);\n\n/**\n * A component to display a playful greeting for the user.\n *\n * @public\n */\nexport const WelcomeTitle = homePlugin.provide(\n createComponentExtension({\n name: 'WelcomeTitle',\n component: {\n lazy: () =>\n import('./homePageComponents/WelcomeTitle').then(m => m.WelcomeTitle),\n },\n }),\n);\n\n/**\n * A component to display a company logo for the user.\n *\n * @public\n */\nexport const HomePageCompanyLogo = homePlugin.provide(\n createComponentExtension({\n name: 'CompanyLogo',\n component: {\n lazy: () =>\n import('./homePageComponents/CompanyLogo').then(m => m.CompanyLogo),\n },\n }),\n);\n\n/** @public */\nexport const HomePageRandomJoke = homePlugin.provide(\n createCardExtension<{ defaultCategory?: 'any' | 'programming' }>({\n name: 'HomePageRandomJoke',\n title: 'Random Joke',\n components: () => import('./homePageComponents/RandomJoke'),\n description: 'Shows a random joke about optional category',\n layout: {\n height: { minRows: 4 },\n width: { minColumns: 3 },\n },\n settings: {\n schema: {\n title: 'Random Joke settings',\n type: 'object',\n properties: {\n defaultCategory: {\n title: 'Category',\n type: 'string',\n enum: ['any', 'programming', 'dad'],\n default: 'any',\n },\n },\n },\n },\n }),\n);\n\n/**\n * A component to display a list of tools for the user.\n *\n * @public\n */\nexport const HomePageToolkit = homePlugin.provide(\n createCardExtension<ToolkitContentProps>({\n name: 'HomePageToolkit',\n title: 'Toolkit',\n components: () => import('./homePageComponents/Toolkit'),\n }),\n);\n\n/**\n * A component to display a list of starred entities for the user.\n *\n * @public\n */\nexport const HomePageStarredEntities = homePlugin.provide(\n createCardExtension<Partial<StarredEntitiesProps>>({\n name: 'HomePageStarredEntities',\n title: 'Your Starred Entities',\n components: () => import('./homePageComponents/StarredEntities'),\n }),\n);\n\n/**\n * A component to display a configurable list of clocks for various time zones.\n *\n * @public\n */\nexport const HeaderWorldClock = homePlugin.provide(\n createComponentExtension({\n name: 'HeaderWorldClock',\n component: {\n lazy: () =>\n import('./homePageComponents/HeaderWorldClock').then(\n m => m.HeaderWorldClock,\n ),\n },\n }),\n);\n\n/**\n * Display top visited pages for the homepage\n * @public\n */\nexport const HomePageTopVisited = homePlugin.provide(\n createCardExtension<Partial<VisitedByTypeProps>>({\n name: 'HomePageTopVisited',\n title: 'Top Visited',\n components: () => import('./homePageComponents/VisitedByType/TopVisited'),\n }),\n);\n\n/**\n * Display recently visited pages for the homepage\n * @public\n */\nexport const HomePageRecentlyVisited = homePlugin.provide(\n createCardExtension<Partial<VisitedByTypeProps>>({\n name: 'HomePageRecentlyVisited',\n title: 'Recently Visited',\n components: () =>\n import('./homePageComponents/VisitedByType/RecentlyVisited'),\n }),\n);\n\n/**\n * A component to display specific Featured Docs.\n *\n * @public\n */\nexport const FeaturedDocsCard = homePlugin.provide(\n createCardExtension<FeaturedDocsCardProps>({\n name: 'FeaturedDocsCard',\n title: 'Featured Docs',\n components: () => import('./homePageComponents/FeaturedDocsCard'),\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 React from 'react';\n\n/** @public */\nexport const TemplateBackstageLogo = (props: {\n classes: {\n svg: string;\n path: string;\n };\n}) => {\n return (\n <svg\n className={props.classes.svg}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 2079.95 456.05\"\n >\n <path\n className={props.classes.path}\n d=\"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z\"\n />\n </svg>\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 React from 'react';\nimport { makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles({\n svg: {\n width: 'auto',\n height: 28,\n },\n path: {\n fill: '#7df3e1',\n },\n});\n\n/** @public */\nexport const TemplateBackstageLogoIcon = () => {\n const classes = useStyles();\n\n return (\n <svg\n className={classes.svg}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 337.46 428.5\"\n >\n <path\n className={classes.path}\n d=\"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z\"\n />\n </svg>\n );\n};\n","/*\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 {\n createCardExtension as homeReactCreateCardExtension,\n CardConfig as homeReactCardConfig,\n CardExtensionProps as homeReactCardExtensionProps,\n CardLayout as homeReactCardLayout,\n CardSettings as homeReactCardSettings,\n ComponentParts as homeReactComponentParts,\n ComponentRenderer as homeReactComponentRenderer,\n RendererProps as homeReactRendererProps,\n SettingsModal as homeReactSettingsModal,\n} from '@backstage/plugin-home-react';\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport const createCardExtension = homeReactCreateCardExtension;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport type CardExtensionProps<T> = homeReactCardExtensionProps<T>;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport type CardLayout = homeReactCardLayout;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport type CardSettings = homeReactCardSettings;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport type CardConfig = homeReactCardConfig;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport type ComponentParts = homeReactComponentParts;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport type ComponentRenderer = homeReactComponentRenderer;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport type RendererProps = homeReactRendererProps;\n\n/**\n * @public\n * @deprecated Import from `@backstage/plugin-home-react` instead\n */\nexport const SettingsModal = homeReactSettingsModal;\n"],"names":["_a","createCardExtension","homeReactCreateCardExtension","homeReactSettingsModal"],"mappings":";;;;;;;;;;;;;;;;;;;;;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6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-home",
3
- "version": "0.6.3-next.1",
3
+ "version": "0.7.0-next.2",
4
4
  "description": "A Backstage plugin that helps you build a home page",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin"
@@ -50,16 +50,16 @@
50
50
  "test": "backstage-cli package test"
51
51
  },
52
52
  "dependencies": {
53
- "@backstage/catalog-client": "^1.6.1-next.0",
53
+ "@backstage/catalog-client": "^1.6.1-next.1",
54
54
  "@backstage/catalog-model": "^1.4.5-next.0",
55
55
  "@backstage/config": "^1.2.0-next.1",
56
56
  "@backstage/core-app-api": "^1.12.1-next.1",
57
- "@backstage/core-compat-api": "^0.2.1-next.1",
58
- "@backstage/core-components": "^0.14.1-next.1",
57
+ "@backstage/core-compat-api": "^0.2.1-next.2",
58
+ "@backstage/core-components": "^0.14.1-next.2",
59
59
  "@backstage/core-plugin-api": "^1.9.1-next.1",
60
- "@backstage/frontend-plugin-api": "^0.6.1-next.1",
61
- "@backstage/plugin-catalog-react": "^1.10.1-next.1",
62
- "@backstage/plugin-home-react": "^0.1.9-next.1",
60
+ "@backstage/frontend-plugin-api": "^0.6.1-next.2",
61
+ "@backstage/plugin-catalog-react": "^1.11.0-next.2",
62
+ "@backstage/plugin-home-react": "^0.1.9-next.2",
63
63
  "@backstage/theme": "^0.5.2-next.0",
64
64
  "@material-ui/core": "^4.12.2",
65
65
  "@material-ui/icons": "^4.9.1",
@@ -77,8 +77,8 @@
77
77
  "zod": "^3.22.4"
78
78
  },
79
79
  "devDependencies": {
80
- "@backstage/cli": "^0.25.3-next.1",
81
- "@backstage/dev-utils": "^1.0.28-next.1",
80
+ "@backstage/cli": "^0.25.3-next.2",
81
+ "@backstage/dev-utils": "^1.0.28-next.2",
82
82
  "@backstage/test-utils": "^1.5.1-next.1",
83
83
  "@testing-library/dom": "^9.0.0",
84
84
  "@testing-library/jest-dom": "^6.0.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"Content-cd749ae7.esm.js","sources":["../../src/homePageComponents/VisitedByType/Context.tsx","../../src/homePageComponents/VisitedByType/Actions.tsx","../../src/api/config.ts","../../src/components/VisitList/ItemName.tsx","../../src/components/VisitList/ItemDetail.tsx","../../src/components/VisitList/ItemCategory.tsx","../../src/components/VisitList/VisitListItem.tsx","../../src/components/VisitList/VisitListEmpty.tsx","../../src/components/VisitList/VisitListFew.tsx","../../src/components/VisitList/VisitListSkeleton.tsx","../../src/components/VisitList/VisitList.tsx","../../src/homePageComponents/VisitedByType/VisitedByType.tsx","../../src/homePageComponents/VisitedByType/Content.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { Dispatch, SetStateAction, createContext, useMemo } from 'react';\nimport { Visit } from '../../api/VisitsApi';\nimport { VisitedByTypeKind } from './Content';\n\nexport type ContextValueOnly = {\n collapsed: boolean;\n numVisitsOpen: number;\n numVisitsTotal: number;\n visits: Array<Visit>;\n loading: boolean;\n kind: VisitedByTypeKind;\n};\n\nexport type ContextValue = ContextValueOnly & {\n setCollapsed: Dispatch<SetStateAction<boolean>>;\n setNumVisitsOpen: Dispatch<SetStateAction<number>>;\n setNumVisitsTotal: Dispatch<SetStateAction<number>>;\n setVisits: Dispatch<SetStateAction<Array<Visit>>>;\n setLoading: Dispatch<SetStateAction<boolean>>;\n setKind: Dispatch<SetStateAction<VisitedByTypeKind>>;\n setContext: Dispatch<SetStateAction<ContextValueOnly>>;\n};\n\nconst defaultContextValueOnly: ContextValueOnly = {\n collapsed: true,\n numVisitsOpen: 3,\n numVisitsTotal: 8,\n visits: [],\n loading: true,\n kind: 'recent',\n};\n\nexport const defaultContextValue: ContextValue = {\n ...defaultContextValueOnly,\n setCollapsed: () => {},\n setNumVisitsOpen: () => {},\n setNumVisitsTotal: () => {},\n setVisits: () => {},\n setLoading: () => {},\n setKind: () => {},\n setContext: () => {},\n};\n\nexport const Context = createContext<ContextValue>(defaultContextValue);\n\nconst getFilteredSet =\n <T,>(\n setContext: Dispatch<SetStateAction<ContextValueOnly>>,\n contextKey: keyof ContextValueOnly,\n ) =>\n (e: SetStateAction<T>) =>\n setContext(state => ({\n ...state,\n [contextKey]:\n typeof e === 'function' ? (e as Function)(state[contextKey]) : e,\n }));\n\nexport const ContextProvider = ({ children }: { children: JSX.Element }) => {\n const [context, setContext] = React.useState<ContextValueOnly>(\n defaultContextValueOnly,\n );\n const {\n setCollapsed,\n setNumVisitsOpen,\n setNumVisitsTotal,\n setVisits,\n setLoading,\n setKind,\n } = useMemo(\n () => ({\n setCollapsed: getFilteredSet(setContext, 'collapsed'),\n setNumVisitsOpen: getFilteredSet(setContext, 'numVisitsOpen'),\n setNumVisitsTotal: getFilteredSet(setContext, 'numVisitsTotal'),\n setVisits: getFilteredSet(setContext, 'visits'),\n setLoading: getFilteredSet(setContext, 'loading'),\n setKind: getFilteredSet(setContext, 'kind'),\n }),\n [setContext],\n );\n\n const value: ContextValue = {\n ...context,\n setContext,\n setCollapsed,\n setNumVisitsOpen,\n setNumVisitsTotal,\n setVisits,\n setLoading,\n setKind,\n };\n\n return <Context.Provider value={value}>{children}</Context.Provider>;\n};\n\nexport const useContext = () => {\n const value = React.useContext(Context);\n\n if (value === undefined)\n throw new Error(\n 'VisitedByType useContext found undefined ContextValue, <ContextProvider/> could be missing',\n );\n\n return value;\n};\n\nexport default Context;\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useCallback } from 'react';\nimport { Button } from '@material-ui/core';\nimport { useContext } from './Context';\n\nexport const Actions = () => {\n const { collapsed, setCollapsed, visits, numVisitsOpen, loading } =\n useContext();\n const onClick = useCallback(\n () => setCollapsed(prevCollapsed => !prevCollapsed),\n [setCollapsed],\n );\n const label = collapsed ? 'View More' : 'View Less';\n\n if (!loading && visits.length <= numVisitsOpen) return <></>;\n\n return (\n <Button variant=\"text\" onClick={onClick}>\n {label}\n </Button>\n );\n};\n","/*\n * Copyright 2023 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 Visit,\n VisitsApiQueryParams,\n Operators,\n isOperator,\n} from './VisitsApi';\nimport { Config } from '@backstage/config';\n\n/**\n * Reads a single FilterBy config.\n *\n * @param config - The single config object\n *\n * @public\n */\n\nexport function readFilterConfig(config: Config):\n | {\n field: keyof Visit;\n operator: Operators;\n value: string | number;\n }\n | undefined {\n try {\n const field = config.getString('field') as keyof Visit;\n const operator = config.getString('operator');\n const value = getValue(config);\n if (isOperator(operator) && value !== undefined) {\n return { field, operator, value };\n }\n return undefined;\n } catch (error) {\n // invalid filter config - ignore filter\n return undefined;\n }\n}\n\nfunction getValue(config: Config) {\n let value = undefined;\n try {\n value = config.getString('value');\n } catch (error) {\n try {\n value = config.getNumber('value');\n } catch {\n // value is not string or number - ignore filter\n }\n }\n return value;\n}\n\n/**\n * Reads a set of filter by configs.\n *\n * @param configs - All of the config objects\n *\n * @public\n */\nexport function createFilterByQueryParamFromConfig(\n configs: Config[],\n): VisitsApiQueryParams['filterBy'] | undefined {\n try {\n return configs\n .map(readFilterConfig)\n .filter(Boolean) as VisitsApiQueryParams['filterBy'];\n } catch {\n return undefined;\n }\n}\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Typography, makeStyles } from '@material-ui/core';\nimport { Visit } from '../../api/VisitsApi';\nimport { Link } from '@backstage/core-components';\n\nconst useStyles = makeStyles(_theme => ({\n name: {\n marginLeft: '0.8rem',\n marginRight: '0.8rem',\n },\n}));\nexport const ItemName = ({ visit }: { visit: Visit }) => {\n const classes = useStyles();\n\n return (\n <Typography\n component={Link}\n to={visit.pathname}\n noWrap\n className={classes.name}\n >\n {visit.name}\n </Typography>\n );\n};\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Typography } from '@material-ui/core';\nimport { Visit } from '../../api/VisitsApi';\nimport { DateTime } from 'luxon';\n\nconst ItemDetailHits = ({ visit }: { visit: Visit }) => (\n <Typography component=\"span\" variant=\"caption\" color=\"textSecondary\">\n {visit.hits} time{visit.hits > 1 ? 's' : ''}\n </Typography>\n);\n\nconst ItemDetailTimeAgo = ({ visit }: { visit: Visit }) => {\n const visitDate = DateTime.fromMillis(visit.timestamp);\n\n return (\n <Typography\n component=\"time\"\n variant=\"caption\"\n color=\"textSecondary\"\n dateTime={visitDate.toISO() ?? undefined}\n >\n {visitDate >= DateTime.now().startOf('day')\n ? visitDate.toFormat('HH:mm')\n : visitDate.toRelative()}\n </Typography>\n );\n};\n\nexport type ItemDetailType = 'time-ago' | 'hits';\n\nexport const ItemDetail = ({\n visit,\n type,\n}: {\n visit: Visit;\n type: ItemDetailType;\n}) =>\n type === 'time-ago' ? (\n <ItemDetailTimeAgo visit={visit} />\n ) : (\n <ItemDetailHits visit={visit} />\n );\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Chip, makeStyles } from '@material-ui/core';\nimport { colorVariants } from '@backstage/theme';\nimport { Visit } from '../../api/VisitsApi';\nimport { CompoundEntityRef, parseEntityRef } from '@backstage/catalog-model';\n\nconst useStyles = makeStyles(theme => ({\n chip: {\n color: theme.palette.common.white,\n fontWeight: 'bold',\n margin: 0,\n },\n}));\nconst maybeEntity = (visit: Visit): CompoundEntityRef | undefined => {\n try {\n return parseEntityRef(visit?.entityRef ?? '');\n } catch (e) {\n return undefined;\n }\n};\nconst getColorByIndex = (index: number) => {\n const variants = Object.keys(colorVariants);\n const variantIndex = index % variants.length;\n return colorVariants[variants[variantIndex]][0];\n};\nconst getChipColor = (entity: CompoundEntityRef | undefined): string => {\n const defaultColor = getColorByIndex(0);\n if (!entity) return defaultColor;\n\n // IDEA: Use or replicate useAllKinds hook thus supporting all software catalog\n // registered kinds. See:\n // plugins/catalog-react/src/components/EntityKindPicker/kindFilterUtils.ts\n // Provide extension point to register your own color code.\n const entityKinds = [\n 'component',\n 'template',\n 'api',\n 'group',\n 'user',\n 'resource',\n 'system',\n 'domain',\n 'location',\n ];\n const foundIndex = entityKinds.indexOf(\n entity.kind.toLocaleLowerCase('en-US'),\n );\n return foundIndex === -1 ? defaultColor : getColorByIndex(foundIndex + 1);\n};\n\nexport const ItemCategory = ({ visit }: { visit: Visit }) => {\n const classes = useStyles();\n const entity = maybeEntity(visit);\n\n return (\n <Chip\n size=\"small\"\n className={classes.chip}\n label={(entity?.kind ?? 'Other').toLocaleLowerCase('en-US')}\n style={{ background: getChipColor(entity) }}\n />\n );\n};\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport {\n ListItem,\n ListItemAvatar,\n ListItemText,\n makeStyles,\n} from '@material-ui/core';\nimport { Visit } from '../../api/VisitsApi';\nimport { ItemName } from './ItemName';\nimport { ItemDetail, ItemDetailType } from './ItemDetail';\nimport { ItemCategory } from './ItemCategory';\n\nconst useStyles = makeStyles(_theme => ({\n avatar: {\n minWidth: 0,\n },\n}));\nexport const VisitListItem = ({\n visit,\n detailType,\n}: {\n visit: Visit;\n detailType: ItemDetailType;\n}) => {\n const classes = useStyles();\n\n return (\n <ListItem disableGutters>\n <ListItemAvatar className={classes.avatar}>\n <ItemCategory visit={visit} />\n </ListItemAvatar>\n <ListItemText\n primary={<ItemName visit={visit} />}\n secondary={<ItemDetail visit={visit} type={detailType} />}\n disableTypography\n />\n </ListItem>\n );\n};\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Typography } from '@material-ui/core';\n\nexport const VisitListEmpty = () => (\n <>\n <Typography variant=\"body2\" color=\"textSecondary\">\n There are no visits to show yet.\n </Typography>\n <Typography variant=\"body2\" color=\"textSecondary\">\n Once you start using Backstage, your visits will appear here as a quick\n link to carry on where you left off.\n </Typography>\n </>\n);\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Typography } from '@material-ui/core';\n\nexport const VisitListFew = () => (\n <>\n <Typography variant=\"body2\" color=\"textSecondary\">\n The more pages you visit, the more pages will appear here.\n </Typography>\n </>\n);\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport {\n Collapse,\n ListItem,\n ListItemAvatar,\n ListItemText,\n makeStyles,\n} from '@material-ui/core';\nimport { Skeleton } from '@material-ui/lab';\n\nconst useStyles = makeStyles(_theme => ({\n skeleton: {\n borderRadius: 30,\n },\n}));\n\nconst VisitListItemSkeleton = () => {\n const classes = useStyles();\n\n return (\n <ListItem disableGutters>\n <ListItemAvatar>\n <Skeleton\n className={classes.skeleton}\n variant=\"rect\"\n width={50}\n height={24}\n />\n </ListItemAvatar>\n <ListItemText\n primary={<Skeleton variant=\"text\" width=\"100%\" height={28} />}\n disableTypography\n />\n </ListItem>\n );\n};\n\nexport const VisitListSkeleton = ({\n numVisitsOpen,\n numVisitsTotal,\n collapsed,\n}: {\n numVisitsOpen: number;\n numVisitsTotal: number;\n collapsed: boolean;\n}) => (\n <>\n {Array(numVisitsOpen)\n .fill(null)\n .map((_e, index) => (\n <VisitListItemSkeleton key={index} />\n ))}\n {numVisitsTotal > numVisitsOpen && (\n <Collapse in={!collapsed}>\n {Array(numVisitsTotal - numVisitsOpen)\n .fill(null)\n .map((_e, index) => (\n <VisitListItemSkeleton key={index} />\n ))}\n </Collapse>\n )}\n </>\n);\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Collapse, List, Typography, makeStyles } from '@material-ui/core';\nimport { Visit } from '../../api/VisitsApi';\nimport { VisitListItem } from './VisitListItem';\nimport { ItemDetailType } from './ItemDetail';\nimport { VisitListEmpty } from './VisitListEmpty';\nimport { VisitListFew } from './VisitListFew';\nimport { VisitListSkeleton } from './VisitListSkeleton';\n\nconst useStyles = makeStyles(_theme => ({\n title: {\n marginBottom: '2rem',\n },\n}));\n\nexport const VisitList = ({\n title,\n detailType,\n visits = [],\n numVisitsOpen = 3,\n numVisitsTotal = 8,\n collapsed = true,\n loading = false,\n}: {\n title: string;\n detailType: ItemDetailType;\n visits?: Visit[];\n numVisitsOpen?: number;\n numVisitsTotal?: number;\n collapsed?: boolean;\n loading?: boolean;\n}) => {\n const classes = useStyles();\n\n let listBody: React.ReactElement = <></>;\n if (loading) {\n listBody = (\n <VisitListSkeleton\n numVisitsOpen={numVisitsOpen}\n numVisitsTotal={numVisitsTotal}\n collapsed={collapsed}\n />\n );\n } else if (visits.length === 0) {\n listBody = <VisitListEmpty />;\n } else if (visits.length < numVisitsOpen) {\n listBody = (\n <>\n {visits.map((visit, index) => (\n <VisitListItem visit={visit} key={index} detailType={detailType} />\n ))}\n <VisitListFew />\n </>\n );\n } else {\n listBody = (\n <>\n {visits.slice(0, numVisitsOpen).map((visit, index) => (\n <VisitListItem visit={visit} key={index} detailType={detailType} />\n ))}\n {visits.length > numVisitsOpen && (\n <Collapse in={!collapsed}>\n {visits.slice(numVisitsOpen, numVisitsTotal).map((visit, index) => (\n <VisitListItem\n visit={visit}\n key={index}\n detailType={detailType}\n />\n ))}\n </Collapse>\n )}\n </>\n );\n }\n\n return (\n <>\n <Typography variant=\"h5\" className={classes.title}>\n {title}\n </Typography>\n <List dense disablePadding>\n {listBody}\n </List>\n </>\n );\n};\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { VisitList } from '../../components/VisitList';\nimport { useContext } from './Context';\n\nexport const VisitedByType = () => {\n const { collapsed, numVisitsOpen, numVisitsTotal, visits, loading, kind } =\n useContext();\n\n return (\n <VisitList\n visits={visits}\n title={kind === 'top' ? 'Top Visited' : 'Recently Visited'}\n detailType={kind === 'top' ? 'hits' : 'time-ago'}\n collapsed={collapsed}\n numVisitsOpen={numVisitsOpen}\n numVisitsTotal={numVisitsTotal}\n loading={loading}\n />\n );\n};\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useEffect } from 'react';\nimport { createFilterByQueryParamFromConfig } from '../../api/config';\nimport { VisitedByType } from './VisitedByType';\nimport { Visit, visitsApiRef } from '../../api';\nimport { ContextValueOnly, useContext } from './Context';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/lib/useAsync';\n\n/** @public */\nexport type VisitedByTypeKind = 'recent' | 'top';\n\n/** @public */\nexport type VisitedByTypeProps = {\n visits?: Array<Visit>;\n numVisitsOpen?: number;\n numVisitsTotal?: number;\n loading?: boolean;\n kind: VisitedByTypeKind;\n};\n\n/**\n * Display recently visited pages for the homepage\n * @public\n */\nexport const Content = ({\n visits,\n numVisitsOpen,\n numVisitsTotal,\n loading,\n kind,\n}: VisitedByTypeProps) => {\n const { setContext, setVisits, setLoading } = useContext();\n // Allows behavior override from properties\n useEffect(() => {\n const context: Partial<ContextValueOnly> = {};\n context.kind = kind;\n if (visits) {\n context.visits = visits;\n context.loading = false;\n } else if (loading) {\n context.loading = loading;\n }\n if (numVisitsOpen) context.numVisitsOpen = numVisitsOpen;\n if (numVisitsTotal) context.numVisitsTotal = numVisitsTotal;\n setContext(state => ({ ...state, ...context }));\n }, [setContext, kind, visits, loading, numVisitsOpen, numVisitsTotal]);\n\n const config = useApi(configApiRef);\n // Fetches data from visitsApi in case visits and loading are not provided\n const visitsApi = useApi(visitsApiRef);\n const { loading: reqLoading } = useAsync(async () => {\n if (!visits && !loading && kind === 'recent') {\n const filterBy = createFilterByQueryParamFromConfig(\n config.getOptionalConfigArray('home.recentVisits.filterBy') ?? [],\n );\n return await visitsApi\n .list({\n limit: numVisitsTotal ?? 8,\n orderBy: [{ field: 'timestamp', direction: 'desc' }],\n ...(filterBy && { filterBy }),\n })\n .then(setVisits);\n }\n if (!visits && !loading && kind === 'top') {\n const filterBy = createFilterByQueryParamFromConfig(\n config.getOptionalConfigArray('home.topVisits.filterBy') ?? [],\n );\n return await visitsApi\n .list({\n limit: numVisitsTotal ?? 8,\n orderBy: [{ field: 'hits', direction: 'desc' }],\n ...(filterBy && { filterBy }),\n })\n .then(setVisits);\n }\n return undefined;\n }, [visitsApi, visits, loading, setVisits]);\n useEffect(() => {\n if (!loading) {\n setLoading(reqLoading);\n }\n }, [loading, setLoading, reqLoading]);\n\n return <VisitedByType />;\n};\n"],"names":["useStyles"],"mappings":";;;;;;;;;;;;AAuCA,MAAM,uBAA4C,GAAA;AAAA,EAChD,SAAW,EAAA,IAAA;AAAA,EACX,aAAe,EAAA,CAAA;AAAA,EACf,cAAgB,EAAA,CAAA;AAAA,EAChB,QAAQ,EAAC;AAAA,EACT,OAAS,EAAA,IAAA;AAAA,EACT,IAAM,EAAA,QAAA;AACR,CAAA,CAAA;AAEO,MAAM,mBAAoC,GAAA;AAAA,EAC/C,GAAG,uBAAA;AAAA,EACH,cAAc,MAAM;AAAA,GAAC;AAAA,EACrB,kBAAkB,MAAM;AAAA,GAAC;AAAA,EACzB,mBAAmB,MAAM;AAAA,GAAC;AAAA,EAC1B,WAAW,MAAM;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