@backstage/plugin-catalog-react 1.2.0-next.2 → 1.2.1-next.0

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,49 @@
1
1
  # @backstage/plugin-catalog-react
2
2
 
3
+ ## 1.2.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - a889314692: Both `EntityProvider` and `AsyncEntityProvider` contexts now wrap all children with an `AnalyticsContext` containing the corresponding `entityRef`; this opens up the possibility for all events underneath these contexts to be associated with and aggregated by the corresponding entity.
8
+ - e47f466f80: Removed forced capitalization for Entity types in the catalog sidebar.
9
+ - Updated dependencies
10
+ - @backstage/core-components@0.12.0-next.0
11
+ - @backstage/core-plugin-api@1.1.0-next.0
12
+ - @backstage/integration@1.4.0-next.0
13
+ - @backstage/catalog-model@1.1.3-next.0
14
+ - @backstage/plugin-permission-common@0.7.1-next.0
15
+ - @backstage/types@1.0.1-next.0
16
+ - @backstage/plugin-permission-react@0.4.7-next.0
17
+ - @backstage/catalog-client@1.1.2-next.0
18
+ - @backstage/errors@1.1.3-next.0
19
+ - @backstage/theme@0.2.16
20
+ - @backstage/version-bridge@1.0.1
21
+ - @backstage/plugin-catalog-common@1.0.8-next.0
22
+
23
+ ## 1.2.0
24
+
25
+ ### Minor Changes
26
+
27
+ - 4efadb6968: Implemented the visual parts of `EntityKindPicker` so that it can be shown alongside the other filters on the left side of your catalog pages.
28
+
29
+ ### Patch Changes
30
+
31
+ - 7939e743f5: Added two new `EntityRefLinks` props, the first being `getTitle` that allows for customization of the title used for each link. The second one is `fetchEntities`, which triggers a fetching of all entities so that the full entity definition is available in the `getTitle` callback.
32
+ - e9e532ebd8: Fixed issue where the query kind parameter is not honored
33
+ - Updated dependencies
34
+ - @backstage/catalog-model@1.1.2
35
+ - @backstage/core-components@0.11.2
36
+ - @backstage/plugin-catalog-common@1.0.7
37
+ - @backstage/plugin-permission-common@0.7.0
38
+ - @backstage/catalog-client@1.1.1
39
+ - @backstage/core-plugin-api@1.0.7
40
+ - @backstage/errors@1.1.2
41
+ - @backstage/integration@1.3.2
42
+ - @backstage/theme@0.2.16
43
+ - @backstage/types@1.0.0
44
+ - @backstage/version-bridge@1.0.1
45
+ - @backstage/plugin-permission-react@0.4.6
46
+
3
47
  ## 1.2.0-next.2
4
48
 
5
49
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-react",
3
- "version": "1.2.0-next.2",
3
+ "version": "1.2.1-next.0",
4
4
  "main": "../dist/index.esm.js",
5
5
  "types": "../dist/index.alpha.d.ts"
6
6
  }
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { CATALOG_FILTER_EXISTS } from '@backstage/catalog-client';
2
- import { createApiRef, createRouteRef, useRouteRef, useApi, identityApiRef, alertApiRef, useApp, configApiRef } from '@backstage/core-plugin-api';
2
+ import { createApiRef, createRouteRef, useRouteRef, useApi, AnalyticsContext, identityApiRef, alertApiRef, useApp, configApiRef } from '@backstage/core-plugin-api';
3
3
  import ObservableImpl from 'zen-observable';
4
4
  import React, { useState, forwardRef, createContext, useMemo, useCallback, useContext, useEffect, useRef, useLayoutEffect, Fragment } from 'react';
5
5
  import { Grid, useMediaQuery, useTheme, Button, Drawer, Box, Typography, Tooltip, makeStyles, FormControlLabel, Checkbox, TextField, Toolbar, FormControl, Input, InputAdornment, IconButton, withStyles, DialogContentText, ListItemText as ListItemText$1, ListSubheader as ListSubheader$1, Card, CardContent, ListItem, ListItemIcon, List, Dialog, DialogTitle, DialogContent, Tabs, Tab, DialogActions, Divider, MenuItem, ListItemSecondaryAction } from '@material-ui/core';
@@ -471,7 +471,11 @@ const AsyncEntityProvider = ({
471
471
  const value = { entity, loading, error, refresh };
472
472
  return /* @__PURE__ */ React.createElement(NewEntityContext.Provider, {
473
473
  value: createVersionedValueMap({ 1: value })
474
- }, children);
474
+ }, /* @__PURE__ */ React.createElement(AnalyticsContext, {
475
+ attributes: {
476
+ ...entity ? { entityRef: stringifyEntityRef(entity) } : void 0
477
+ }
478
+ }, children));
475
479
  };
476
480
  const EntityProvider = (props) => /* @__PURE__ */ React.createElement(AsyncEntityProvider, {
477
481
  entity: props.entity,
@@ -932,10 +936,7 @@ const EntityKindPicker = (props) => {
932
936
  severity: "error"
933
937
  });
934
938
  }
935
- if (initialFilter) {
936
- setSelectedKind(initialFilter);
937
- }
938
- }, [error, alertApi, initialFilter, setSelectedKind]);
939
+ }, [error, alertApi]);
939
940
  if ((availableKinds == null ? void 0 : availableKinds.length) === 0 || error)
940
941
  return null;
941
942
  const items = [
@@ -1440,10 +1441,10 @@ const EntityTypePicker = (props) => {
1440
1441
  if (availableTypes.length === 0 || error)
1441
1442
  return null;
1442
1443
  const items = [
1443
- { value: "all", label: "All" },
1444
+ { value: "all", label: "all" },
1444
1445
  ...availableTypes.map((type) => ({
1445
1446
  value: type,
1446
- label: capitalize(type)
1447
+ label: type
1447
1448
  }))
1448
1449
  ];
1449
1450
  return hidden ? null : /* @__PURE__ */ React.createElement(Box, {