@backstage/plugin-home 0.7.0 → 0.7.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/alpha/package.json +1 -1
  3. package/dist/alpha.esm.js +1 -1
  4. package/dist/esm/{Content-f3dcf261.esm.js → Content-Quo42yad.esm.js} +3 -3
  5. package/dist/esm/{Content-f3dcf261.esm.js.map → Content-Quo42yad.esm.js.map} +1 -1
  6. package/dist/esm/{RecentlyVisited-399210d7.esm.js → RecentlyVisited-qOUgoCVu.esm.js} +6 -6
  7. package/dist/esm/{RecentlyVisited-399210d7.esm.js.map → RecentlyVisited-qOUgoCVu.esm.js.map} +1 -1
  8. package/dist/esm/{TopVisited-93920c20.esm.js → TopVisited-B_KhSJit.esm.js} +6 -6
  9. package/dist/esm/{TopVisited-93920c20.esm.js.map → TopVisited-B_KhSJit.esm.js.map} +1 -1
  10. package/dist/esm/{VisitListener-601cb70c.esm.js → VisitListener-dDLtFiIW.esm.js} +2 -2
  11. package/dist/esm/{VisitListener-601cb70c.esm.js.map → VisitListener-dDLtFiIW.esm.js.map} +1 -1
  12. package/dist/esm/{index-3ec8912b.esm.js → index-BMySa_Iw.esm.js} +2 -2
  13. package/dist/esm/{index-3ec8912b.esm.js.map → index-BMySa_Iw.esm.js.map} +1 -1
  14. package/dist/esm/{index-6c4cdf60.esm.js → index-BNfZuEhy.esm.js} +1 -1
  15. package/dist/esm/{index-6c4cdf60.esm.js.map → index-BNfZuEhy.esm.js.map} +1 -1
  16. package/dist/esm/{index-59fc0760.esm.js → index-BvvJGS3L.esm.js} +1 -1
  17. package/dist/esm/{index-59fc0760.esm.js.map → index-BvvJGS3L.esm.js.map} +1 -1
  18. package/dist/esm/{index-5967d606.esm.js → index-Bzg5mDMo.esm.js} +3 -3
  19. package/dist/esm/{index-5967d606.esm.js.map → index-Bzg5mDMo.esm.js.map} +1 -1
  20. package/dist/esm/{index-f4fbaf5f.esm.js → index-CeXFfTX2.esm.js} +1 -1
  21. package/dist/esm/{index-f4fbaf5f.esm.js.map → index-CeXFfTX2.esm.js.map} +1 -1
  22. package/dist/esm/{index-60f5dc58.esm.js → index-D7JTE1IL.esm.js} +2 -2
  23. package/dist/esm/{index-60f5dc58.esm.js.map → index-D7JTE1IL.esm.js.map} +1 -1
  24. package/dist/esm/{index-a6e42355.esm.js → index-Dg9lslkf.esm.js} +1 -1
  25. package/dist/esm/{index-a6e42355.esm.js.map → index-Dg9lslkf.esm.js.map} +1 -1
  26. package/dist/esm/{index-81188117.esm.js → index-FqRX6ImF.esm.js} +1 -1
  27. package/dist/esm/{index-81188117.esm.js.map → index-FqRX6ImF.esm.js.map} +1 -1
  28. package/dist/esm/{index-978cfdc4.esm.js → index-SfHoDIi1.esm.js} +2 -2
  29. package/dist/esm/{index-978cfdc4.esm.js.map → index-SfHoDIi1.esm.js.map} +1 -1
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.esm.js +17 -17
  32. package/package.json +11 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @backstage/plugin-home
2
2
 
3
+ ## 0.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - e8f026a: Use ESM exports of react-use library
8
+ - Updated dependencies
9
+ - @backstage/catalog-client@1.6.3
10
+ - @backstage/core-components@0.14.3
11
+ - @backstage/core-app-api@1.12.3
12
+ - @backstage/plugin-catalog-react@1.11.2
13
+ - @backstage/frontend-plugin-api@0.6.3
14
+ - @backstage/plugin-home-react@0.1.11
15
+ - @backstage/core-compat-api@0.2.3
16
+ - @backstage/core-plugin-api@1.9.1
17
+ - @backstage/catalog-model@1.4.5
18
+ - @backstage/config@1.2.0
19
+ - @backstage/theme@0.5.2
20
+
21
+ ## 0.7.1
22
+
23
+ ### Patch Changes
24
+
25
+ - e8f026a: Use ESM exports of react-use library
26
+ - Updated dependencies
27
+ - @backstage/catalog-client@1.6.2
28
+ - @backstage/core-components@0.14.2
29
+ - @backstage/core-app-api@1.12.2
30
+ - @backstage/plugin-catalog-react@1.11.1
31
+ - @backstage/frontend-plugin-api@0.6.2
32
+ - @backstage/plugin-home-react@0.1.10
33
+ - @backstage/core-compat-api@0.2.2
34
+ - @backstage/core-plugin-api@1.9.1
35
+ - @backstage/catalog-model@1.4.5
36
+ - @backstage/config@1.2.0
37
+ - @backstage/theme@0.5.2
38
+
3
39
  ## 0.7.0
4
40
 
5
41
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-home",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "main": "../dist/alpha.esm.js",
5
5
  "module": "../dist/alpha.esm.js",
6
6
  "types": "../dist/alpha.d.ts"
package/dist/alpha.esm.js CHANGED
@@ -19,7 +19,7 @@ const homePage = createPageExtension({
19
19
  }
20
20
  )
21
21
  },
22
- loader: ({ inputs }) => import('./esm/index-5967d606.esm.js').then(
22
+ loader: ({ inputs }) => import('./esm/index-Bzg5mDMo.esm.js').then(
23
23
  (m) => {
24
24
  var _a, _b;
25
25
  return compatWrapper(
@@ -1,6 +1,6 @@
1
1
  import React, { createContext, useMemo, useCallback, useEffect } from 'react';
2
2
  import Button from '@material-ui/core/Button';
3
- import { i as isOperator, v as visitsApiRef } from './VisitListener-601cb70c.esm.js';
3
+ import { i as isOperator, v as visitsApiRef } from './VisitListener-dDLtFiIW.esm.js';
4
4
  import Collapse from '@material-ui/core/Collapse';
5
5
  import List from '@material-ui/core/List';
6
6
  import ListItem from '@material-ui/core/ListItem';
@@ -16,7 +16,7 @@ import { parseEntityRef } from '@backstage/catalog-model';
16
16
  import Skeleton from '@material-ui/lab/Skeleton';
17
17
  import '@backstage/core-app-api';
18
18
  import { useApi, configApiRef } from '@backstage/core-plugin-api';
19
- import useAsync from 'react-use/lib/useAsync';
19
+ import useAsync from 'react-use/esm/useAsync';
20
20
 
21
21
  const defaultContextValueOnly = {
22
22
  collapsed: true,
@@ -393,4 +393,4 @@ const Content = ({
393
393
  };
394
394
 
395
395
  export { Actions as A, Content as C, ContextProvider as a };
396
- //# sourceMappingURL=Content-f3dcf261.esm.js.map
396
+ //# sourceMappingURL=Content-Quo42yad.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Content-f3dcf261.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/Button';\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 from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\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/Typography';\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 from '@material-ui/core/Chip';\nimport { makeStyles } from '@material-ui/core/styles';\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 ListItem from '@material-ui/core/ListItem';\nimport ListItemAvatar from '@material-ui/core/ListItemAvatar';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { makeStyles } from '@material-ui/core/styles';\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/Typography';\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/Typography';\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 Collapse from '@material-ui/core/Collapse';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemAvatar from '@material-ui/core/ListItemAvatar';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Skeleton from '@material-ui/lab/Skeleton';\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 from '@material-ui/core/Collapse';\nimport List from '@material-ui/core/List';\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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{"version":3,"file":"Content-Quo42yad.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/Button';\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 from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\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/Typography';\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 from '@material-ui/core/Chip';\nimport { makeStyles } from '@material-ui/core/styles';\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 ListItem from '@material-ui/core/ListItem';\nimport ListItemAvatar from '@material-ui/core/ListItemAvatar';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { makeStyles } from '@material-ui/core/styles';\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/Typography';\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/Typography';\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 Collapse from '@material-ui/core/Collapse';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemAvatar from '@material-ui/core/ListItemAvatar';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Skeleton from '@material-ui/lab/Skeleton';\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 from '@material-ui/core/Collapse';\nimport List from '@material-ui/core/List';\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/esm/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,EAC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AAA;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,8 +1,8 @@
1
- import { C as Content } from './Content-f3dcf261.esm.js';
2
- export { A as Actions, a as ContextProvider } from './Content-f3dcf261.esm.js';
1
+ import { C as Content } from './Content-Quo42yad.esm.js';
2
+ export { A as Actions, a as ContextProvider } from './Content-Quo42yad.esm.js';
3
3
  import React from 'react';
4
4
  import '@material-ui/core/Button';
5
- import './VisitListener-601cb70c.esm.js';
5
+ import './VisitListener-dDLtFiIW.esm.js';
6
6
  import 'react-grid-layout';
7
7
  import '@backstage/core-plugin-api';
8
8
  import 'react-grid-layout/css/styles.css';
@@ -10,7 +10,7 @@ import 'react-resizable/css/styles.css';
10
10
  import '@material-ui/core/Dialog';
11
11
  import '@material-ui/core/styles';
12
12
  import 'lodash';
13
- import 'react-use/lib/useObservable';
13
+ import 'react-use/esm/useObservable';
14
14
  import '@backstage/core-components';
15
15
  import '@material-ui/core/Typography';
16
16
  import '@material-ui/core/DialogContent';
@@ -40,9 +40,9 @@ import 'luxon';
40
40
  import '@material-ui/core/Chip';
41
41
  import '@backstage/theme';
42
42
  import '@material-ui/lab/Skeleton';
43
- import 'react-use/lib/useAsync';
43
+ import 'react-use/esm/useAsync';
44
44
 
45
45
  const RecentlyVisitedContent = (props) => /* @__PURE__ */ React.createElement(Content, { ...props, kind: "recent" });
46
46
 
47
47
  export { RecentlyVisitedContent as Content };
48
- //# sourceMappingURL=RecentlyVisited-399210d7.esm.js.map
48
+ //# sourceMappingURL=RecentlyVisited-qOUgoCVu.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RecentlyVisited-399210d7.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-qOUgoCVu.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,8 +1,8 @@
1
- import { C as Content } from './Content-f3dcf261.esm.js';
2
- export { A as Actions, a as ContextProvider } from './Content-f3dcf261.esm.js';
1
+ import { C as Content } from './Content-Quo42yad.esm.js';
2
+ export { A as Actions, a as ContextProvider } from './Content-Quo42yad.esm.js';
3
3
  import React from 'react';
4
4
  import '@material-ui/core/Button';
5
- import './VisitListener-601cb70c.esm.js';
5
+ import './VisitListener-dDLtFiIW.esm.js';
6
6
  import 'react-grid-layout';
7
7
  import '@backstage/core-plugin-api';
8
8
  import 'react-grid-layout/css/styles.css';
@@ -10,7 +10,7 @@ import 'react-resizable/css/styles.css';
10
10
  import '@material-ui/core/Dialog';
11
11
  import '@material-ui/core/styles';
12
12
  import 'lodash';
13
- import 'react-use/lib/useObservable';
13
+ import 'react-use/esm/useObservable';
14
14
  import '@backstage/core-components';
15
15
  import '@material-ui/core/Typography';
16
16
  import '@material-ui/core/DialogContent';
@@ -40,9 +40,9 @@ import 'luxon';
40
40
  import '@material-ui/core/Chip';
41
41
  import '@backstage/theme';
42
42
  import '@material-ui/lab/Skeleton';
43
- import 'react-use/lib/useAsync';
43
+ import 'react-use/esm/useAsync';
44
44
 
45
45
  const TopVisitedContent = (props) => /* @__PURE__ */ React.createElement(Content, { ...props, kind: "top" });
46
46
 
47
47
  export { TopVisitedContent as Content };
48
- //# sourceMappingURL=TopVisited-93920c20.esm.js.map
48
+ //# sourceMappingURL=TopVisited-B_KhSJit.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopVisited-93920c20.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-B_KhSJit.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;;;;"}
@@ -6,7 +6,7 @@ import 'react-resizable/css/styles.css';
6
6
  import Dialog from '@material-ui/core/Dialog';
7
7
  import { makeStyles, createStyles, useTheme } from '@material-ui/core/styles';
8
8
  import { compact } from 'lodash';
9
- import useObservable from 'react-use/lib/useObservable';
9
+ import useObservable from 'react-use/esm/useObservable';
10
10
  import { ContentHeader, ErrorBoundary } from '@backstage/core-components';
11
11
  import Typography from '@material-ui/core/Typography';
12
12
  import DialogContent from '@material-ui/core/DialogContent';
@@ -624,4 +624,4 @@ const VisitListener = ({
624
624
  };
625
625
 
626
626
  export { CustomHomepageGrid as C, VisitListener as V, isOperator as i, visitsApiRef as v };
627
- //# sourceMappingURL=VisitListener-601cb70c.esm.js.map
627
+ //# sourceMappingURL=VisitListener-dDLtFiIW.esm.js.map