@redocly/theme 0.64.0-next.0 → 0.64.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.
Files changed (143) hide show
  1. package/lib/components/Banner/Banner.js +3 -3
  2. package/lib/components/Catalog/CatalogActionsRow.d.ts +3 -3
  3. package/lib/components/Catalog/CatalogCardView/CatalogCard.js +4 -6
  4. package/lib/components/Catalog/CatalogEntities.d.ts +2 -2
  5. package/lib/components/Catalog/CatalogEntities.js +1 -1
  6. package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +1 -8
  7. package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +1 -1
  8. package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.js +1 -1
  9. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +1 -0
  10. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +2 -1
  11. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.js +2 -6
  12. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +5 -5
  13. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.js +1 -1
  14. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +15 -7
  15. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +2 -2
  16. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.d.ts +3 -3
  17. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +4 -1
  18. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +3 -3
  19. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +14 -2
  20. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +1 -1
  21. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +3 -3
  22. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +1 -1
  23. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.d.ts +2 -2
  24. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +3 -3
  25. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +13 -3
  26. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +4 -3
  27. package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +3 -2
  28. package/lib/components/Catalog/CatalogEntityTypeIcon.js +9 -9
  29. package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.d.ts +2 -3
  30. package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.d.ts +2 -3
  31. package/lib/components/Catalog/CatalogPageDescription.js +1 -1
  32. package/lib/components/Catalog/CatalogSortButton.d.ts +4 -5
  33. package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.js +6 -2
  34. package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +2 -2
  35. package/lib/components/Catalog/CatalogTableView/CatalogLastUpdateCell.d.ts +5 -0
  36. package/lib/components/Catalog/CatalogTableView/CatalogLastUpdateCell.js +45 -0
  37. package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.js +5 -3
  38. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +2 -3
  39. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +3 -2
  40. package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +1 -2
  41. package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +15 -5
  42. package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.js +3 -2
  43. package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +2 -2
  44. package/lib/components/Catalog/CatalogTags.d.ts +11 -0
  45. package/lib/components/Catalog/CatalogTags.js +62 -0
  46. package/lib/components/Catalog/variables.js +22 -14
  47. package/lib/components/Search/SearchDialog.js +118 -116
  48. package/lib/components/SvgViewer/variables.dark.js +1 -1
  49. package/lib/core/constants/catalog.d.ts +1 -1
  50. package/lib/core/constants/catalog.js +1 -1
  51. package/lib/core/hooks/catalog/use-catalog-entity-link.d.ts +8 -0
  52. package/lib/core/hooks/catalog/use-catalog-entity-link.js +42 -0
  53. package/lib/core/hooks/catalog/use-catalog-table-header-cell-actions.d.ts +2 -1
  54. package/lib/core/hooks/catalog/use-catalog-table-header-cell-actions.js +5 -3
  55. package/lib/core/hooks/index.d.ts +1 -0
  56. package/lib/core/hooks/index.js +1 -0
  57. package/lib/core/styles/dark.d.ts +3 -1
  58. package/lib/core/styles/dark.js +42 -31
  59. package/lib/core/styles/global.d.ts +6 -2
  60. package/lib/core/styles/global.js +54 -39
  61. package/lib/core/styles/palette.d.ts +6 -0
  62. package/lib/core/styles/palette.dark.d.ts +3 -0
  63. package/lib/core/styles/palette.dark.js +216 -0
  64. package/lib/core/styles/palette.js +179 -0
  65. package/lib/core/types/catalog.d.ts +23 -7
  66. package/lib/core/types/hooks.d.ts +6 -4
  67. package/lib/icons/ColorPaletteIcon/ColorPaletteIcon.d.ts +9 -0
  68. package/lib/icons/ColorPaletteIcon/ColorPaletteIcon.js +27 -0
  69. package/lib/icons/StopIcon/StopIcon.d.ts +9 -0
  70. package/lib/icons/StopIcon/StopIcon.js +22 -0
  71. package/lib/index.d.ts +3 -1
  72. package/lib/index.js +3 -1
  73. package/lib/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.d.ts +7 -0
  74. package/lib/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.js +95 -0
  75. package/lib/markdoc/components/ExcalidrawDiagram/variables.d.ts +1 -0
  76. package/lib/markdoc/components/ExcalidrawDiagram/variables.dark.d.ts +1 -0
  77. package/lib/markdoc/components/ExcalidrawDiagram/variables.dark.js +8 -0
  78. package/lib/markdoc/components/ExcalidrawDiagram/variables.js +15 -0
  79. package/lib/markdoc/components/Heading/Heading.js +2 -2
  80. package/lib/markdoc/components/Mermaid/Mermaid.js +2 -0
  81. package/lib/markdoc/components/default.d.ts +1 -0
  82. package/lib/markdoc/components/default.js +1 -0
  83. package/package.json +2 -2
  84. package/src/components/Banner/Banner.tsx +7 -7
  85. package/src/components/Catalog/CatalogActionsRow.tsx +3 -3
  86. package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +4 -6
  87. package/src/components/Catalog/CatalogEntities.tsx +3 -3
  88. package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +3 -24
  89. package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +1 -1
  90. package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +1 -1
  91. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +1 -0
  92. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +2 -1
  93. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +8 -10
  94. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +13 -8
  95. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +1 -0
  96. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +27 -15
  97. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +2 -2
  98. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +9 -9
  99. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +17 -9
  100. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +1 -1
  101. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +4 -8
  102. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +2 -2
  103. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +16 -10
  104. package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +4 -3
  105. package/src/components/Catalog/CatalogEntityTypeIcon.tsx +18 -11
  106. package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.tsx +3 -3
  107. package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.tsx +2 -3
  108. package/src/components/Catalog/CatalogPageDescription.tsx +1 -1
  109. package/src/components/Catalog/CatalogSortButton.tsx +5 -6
  110. package/src/components/Catalog/CatalogTableView/CatalogDomainsCell.tsx +6 -2
  111. package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +2 -2
  112. package/src/components/Catalog/CatalogTableView/CatalogLastUpdateCell.tsx +54 -0
  113. package/src/components/Catalog/CatalogTableView/CatalogOwnersCell.tsx +5 -2
  114. package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +4 -3
  115. package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +17 -7
  116. package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +3 -2
  117. package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +2 -2
  118. package/src/components/Catalog/CatalogTags.tsx +115 -0
  119. package/src/components/Catalog/variables.ts +22 -14
  120. package/src/components/Search/SearchDialog.tsx +299 -293
  121. package/src/components/SvgViewer/variables.dark.ts +1 -1
  122. package/src/core/constants/catalog.ts +1 -1
  123. package/src/core/hooks/catalog/use-catalog-entity-link.ts +46 -0
  124. package/src/core/hooks/catalog/use-catalog-table-header-cell-actions.ts +10 -2
  125. package/src/core/hooks/index.ts +1 -0
  126. package/src/core/styles/dark.ts +14 -2
  127. package/src/core/styles/global.ts +28 -13
  128. package/src/core/styles/palette.dark.ts +214 -0
  129. package/src/core/styles/palette.ts +177 -0
  130. package/src/core/types/catalog.ts +24 -8
  131. package/src/core/types/hooks.ts +5 -10
  132. package/src/icons/ColorPaletteIcon/ColorPaletteIcon.tsx +28 -0
  133. package/src/icons/StopIcon/StopIcon.tsx +23 -0
  134. package/src/index.ts +3 -1
  135. package/src/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.tsx +85 -0
  136. package/src/markdoc/components/ExcalidrawDiagram/variables.dark.ts +5 -0
  137. package/src/markdoc/components/ExcalidrawDiagram/variables.ts +12 -0
  138. package/src/markdoc/components/Heading/Heading.tsx +2 -1
  139. package/src/markdoc/components/Mermaid/Mermaid.tsx +2 -0
  140. package/src/markdoc/components/default.ts +1 -0
  141. package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +0 -10
  142. package/lib/components/Catalog/CatalogTagsWithTooltip.js +0 -57
  143. package/src/components/Catalog/CatalogTagsWithTooltip.tsx +0 -101
@@ -46,11 +46,11 @@ function setBannerHeight(height) {
46
46
  document.documentElement.style.setProperty('--banner-height', `${height}px`);
47
47
  }
48
48
  function Banner({ className }) {
49
- const { useBanner, useMarkdownText } = (0, hooks_1.useThemeHooks)();
49
+ const { useBanner, useMarkdocRenderer } = (0, hooks_1.useThemeHooks)();
50
50
  const { banner, dismissBanner } = useBanner();
51
51
  const [displayBanner, setDisplayBanner] = (0, react_1.useState)(undefined);
52
52
  const [isVisible, setIsVisible] = (0, react_1.useState)(false);
53
- const markdownContent = useMarkdownText((displayBanner === null || displayBanner === void 0 ? void 0 : displayBanner.content) || '');
53
+ const markdownContent = useMarkdocRenderer(displayBanner === null || displayBanner === void 0 ? void 0 : displayBanner.ast);
54
54
  const bannerRef = (0, react_1.useRef)(null);
55
55
  (0, react_1.useEffect)(() => {
56
56
  if (banner) {
@@ -117,7 +117,7 @@ function Banner({ className }) {
117
117
  return (react_1.default.createElement(BannerWrapper, { ref: bannerRef, "data-component-name": "Banner/Banner", className: className, "$color": bannerColor, "$isVisible": isVisible },
118
118
  react_1.default.createElement(BannerContent, null,
119
119
  react_1.default.createElement(Markdown_1.Markdown, { compact: true }, markdownContent)),
120
- displayBanner.dismissible && (react_1.default.createElement(DismissButton, { variant: "ghost", size: "var(--banner-button-size)", icon: react_1.default.createElement(CloseIcon_1.CloseIcon, { color: `var(--banner-${bannerColor}-icon-color)`, size: "16px" }), onClick: () => dismissBanner(displayBanner.content), "aria-label": "Dismiss banner" }))));
120
+ displayBanner.dismissible && (react_1.default.createElement(DismissButton, { variant: "ghost", size: "var(--banner-button-size)", icon: react_1.default.createElement(CloseIcon_1.CloseIcon, { color: `var(--banner-${bannerColor}-icon-color)`, size: "16px" }), onClick: () => dismissBanner(displayBanner.hash), "aria-label": "Dismiss banner" }))));
121
121
  }
122
122
  const BannerContent = styled_components_1.default.div `
123
123
  flex: 1;
@@ -1,10 +1,10 @@
1
1
  import { JSX } from 'react';
2
- import { SortOption, CatalogViewMode } from '../../core/types';
2
+ import { CatalogViewMode } from '../../core/types';
3
3
  export type CatalogActionsRowProps = {
4
4
  searchQuery: string;
5
5
  setSearchQuery: (updatedTerm: string) => void;
6
- sortOption: SortOption | null;
7
- setSortOption: (option: SortOption | null) => void;
6
+ sortOption: string | null;
7
+ setSortOption: (option: string | null) => void;
8
8
  viewMode?: CatalogViewMode;
9
9
  onViewModeChange?: (mode: CatalogViewMode) => void;
10
10
  isDetailsPage?: boolean;
@@ -11,7 +11,7 @@ const CatalogHighlight_1 = require("../../../components/Catalog/CatalogHighlight
11
11
  const GraphIcon_1 = require("../../../icons/GraphIcon/GraphIcon");
12
12
  const ArrowRightIcon_1 = require("../../../icons/ArrowRightIcon/ArrowRightIcon");
13
13
  const ArrowUpRightIcon_1 = require("../../../icons/ArrowUpRightIcon/ArrowUpRightIcon");
14
- const CatalogTagsWithTooltip_1 = require("../../../components/Catalog/CatalogTagsWithTooltip");
14
+ const CatalogTags_1 = require("../../../components/Catalog/CatalogTags");
15
15
  const CatalogEntityIcon_1 = require("../../../components/Catalog/CatalogEntityIcon");
16
16
  const utils_1 = require("../../../core/utils");
17
17
  function CatalogCard({ entity, catalogConfig }) {
@@ -37,7 +37,7 @@ function CatalogCard({ entity, catalogConfig }) {
37
37
  react_1.default.createElement(CardMetadataSection, null,
38
38
  react_1.default.createElement(MetadataRow, null,
39
39
  react_1.default.createElement(MetadataLabel, null, translate('catalog.metadata.domains', 'Domains:')),
40
- react_1.default.createElement(CatalogTagsWithTooltip_1.CatalogTagsWithTooltip, { items: ((_b = entity.domains) === null || _b === void 0 ? void 0 : _b.map((domain) => domain.title)) || [], showPlaceholder: true, tagProps: {
40
+ react_1.default.createElement(CatalogTags_1.CatalogTags, { items: ((_b = entity.domains) === null || _b === void 0 ? void 0 : _b.map((domain) => domain.title)) || [], showPlaceholder: true, tagProps: {
41
41
  style: {
42
42
  fontSize: 'var(--catalog-card-font-size)',
43
43
  backgroundColor: 'var(--catalog-card-icon-bg-color)',
@@ -48,19 +48,18 @@ function CatalogCard({ entity, catalogConfig }) {
48
48
  } })),
49
49
  react_1.default.createElement(MetadataRow, null,
50
50
  react_1.default.createElement(MetadataLabel, null, translate('catalog.metadata.owners', 'Owners:')),
51
- react_1.default.createElement(CatalogTagsWithTooltip_1.CatalogTagsWithTooltip, { items: ((_c = entity.owners) === null || _c === void 0 ? void 0 : _c.map((owner) => owner.key)) || [], showPlaceholder: true, showAvatars: true, tagProps: {
51
+ react_1.default.createElement(CatalogTags_1.CatalogTags, { items: ((_c = entity.owners) === null || _c === void 0 ? void 0 : _c.map((owner) => owner.key)) || [], showPlaceholder: true, showAvatars: true, tagProps: {
52
52
  style: {
53
53
  fontSize: 'var(--catalog-card-font-size)',
54
54
  backgroundColor: 'var(--catalog-card-icon-bg-color)',
55
55
  borderRadius: 'var(--border-radius-xl)',
56
- paddingLeft: 'var(--catalog-card-metadata-owner-tag-left-padding)',
57
56
  },
58
57
  textTransform: 'none',
59
58
  variant: 'outline',
60
59
  } })))),
61
60
  react_1.default.createElement(Divider, null),
62
61
  react_1.default.createElement(CardFooter, { hasTags: !!((_d = entity.tags) === null || _d === void 0 ? void 0 : _d.length) },
63
- react_1.default.createElement(CatalogTagsWithTooltip_1.CatalogTagsWithTooltip, { items: entity.tags || [], tagProps: {
62
+ react_1.default.createElement(CatalogTags_1.CatalogTags, { items: entity.tags || [], tagProps: {
64
63
  style: {
65
64
  fontSize: 'var(--catalog-card-font-size)',
66
65
  borderRadius: 'var(--border-radius)',
@@ -129,7 +128,6 @@ const ArrowCircle = styled_components_1.default.div `
129
128
  const CardContent = styled_components_1.default.div `
130
129
  min-width: 0;
131
130
  padding: var(--catalog-card-padding-vertical) var(--catalog-card-padding-horizontal);
132
- height: 100%;
133
131
  `;
134
132
  const CardFooter = styled_components_1.default.div `
135
133
  height: var(--catalog-card-footer-height);
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react';
2
2
  import type { CatalogEntityConfig } from '@redocly/config';
3
- import { BffCatalogEntityList, SortOption } from '../../core/types';
3
+ import { BffCatalogEntityList } from '../../core/types';
4
4
  export type CatalogEntitiesProps = {
5
5
  catalogConfig: CatalogEntityConfig;
6
6
  excludedEntities?: CatalogEntityConfig['excludes'];
@@ -10,7 +10,7 @@ export type CatalogEntitiesProps = {
10
10
  viewMode: string;
11
11
  setEntitiesCounter: (counter: number) => void;
12
12
  initialEntitiesList?: BffCatalogEntityList;
13
- sortOption: SortOption | null;
13
+ sortOption: string | null;
14
14
  handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
15
15
  isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
16
16
  };
@@ -59,7 +59,7 @@ function CatalogEntities(props) {
59
59
  filter: initialFilter && filterQuery
60
60
  ? `(${initialFilter}) AND (${filterQuery})`
61
61
  : initialFilter || filterQuery,
62
- sort: sortOption || undefined,
62
+ sort: sortOption || (viewMode === 'table' ? 'updated_at' : 'type,title'),
63
63
  search: searchQuery,
64
64
  }, props.initialEntitiesList);
65
65
  const onRowClick = (entity) => {
@@ -1,10 +1,3 @@
1
1
  import React from 'react';
2
- export type CatalogEntityProps = {
3
- RedocSchema: React.ComponentType<any>;
4
- StoreProvider: React.ComponentType<any>;
5
- GraphqlTypeRenderer?: React.ComponentType<{
6
- sdl: string;
7
- typeName: string;
8
- }>;
9
- };
2
+ import type { CatalogEntityProps } from '../../../core/types';
10
3
  export declare function CatalogEntity({ RedocSchema, StoreProvider, GraphqlTypeRenderer, }: CatalogEntityProps): React.JSX.Element;
@@ -93,7 +93,7 @@ const MetadataWrapper = styled_components_1.default.div `
93
93
  border-radius: var(--border-radius);
94
94
  background-color: var(--catalog-metadata-bg-color);
95
95
  transition: all 0.2s ease-in-out;
96
- margin: var(--spacing-lg) 0;
96
+ margin-bottom: var(--spacing-base);
97
97
  `;
98
98
  const Label = styled_components_1.default.span `
99
99
  font-weight: var(--font-weight-medium);
@@ -37,7 +37,7 @@ const LinksWrapper = styled_components_1.default.div `
37
37
  border-radius: var(--border-radius);
38
38
  background-color: var(--catalog-metadata-bg-color);
39
39
  transition: all 0.2s ease-in-out;
40
- margin: var(--spacing-lg) 0;
40
+ margin: 0 0 var(--spacing-base) 0;
41
41
  `;
42
42
  const Label = styled_components_1.default.div `
43
43
  display: flex;
@@ -65,6 +65,7 @@ const CatalogEntityPropertiesGridWrapper = styled_components_1.default.div `
65
65
  display: grid;
66
66
  gap: var(--spacing-base);
67
67
  grid-template-columns: 1fr;
68
+ margin-bottom: var(--spacing-lg);
68
69
 
69
70
  @media screen and (min-width: ${core_1.breakpoints.small}) {
70
71
  grid-template-columns: repeat(2, 1fr);
@@ -45,11 +45,12 @@ const CardHeader = styled_components_1.default.div `
45
45
  const CardContent = styled_components_1.default.div `
46
46
  flex: 1;
47
47
  display: flex;
48
- align-items: flex-end;
48
+ align-items: center;
49
49
  gap: var(--catalog-card-content-gap);
50
50
  flex-wrap: wrap;
51
51
  color: var(--text-color-primary);
52
52
  font-size: var(--font-size-lg);
53
53
  line-height: var(--line-height-lg);
54
+ font-weight: var(--font-weight-semibold);
54
55
  `;
55
56
  //# sourceMappingURL=CatalogEntityPropertyCard.js.map
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ContactProperty = ContactProperty;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const SlackIcon_1 = require("../../../../icons/SlackIcon/SlackIcon");
9
- const Tag_1 = require("../../../../components/Tag/Tag");
10
9
  const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
11
10
  const hooks_1 = require("../../../../core/hooks");
11
+ const Button_1 = require("../../../../components/Button/Button");
12
12
  function ContactProperty({ entity }) {
13
13
  var _a, _b;
14
14
  const { useTranslate } = (0, hooks_1.useThemeHooks)();
@@ -17,10 +17,6 @@ function ContactProperty({ entity }) {
17
17
  return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty" },
18
18
  react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
19
19
  react_1.default.createElement(SlackIcon_1.SlackIcon, null),
20
- translate('catalog.contact.label', 'Slack channels')), content: react_1.default.createElement(react_1.default.Fragment, null, channels === null || channels === void 0 ? void 0 : channels.map((channel) => (react_1.default.createElement(Tag_1.Tag, { key: channel.name, textTransform: "none", style: { backgroundColor: 'var(--bg-color)', cursor: 'pointer' }, onClick: () => {
21
- if (channel.url) {
22
- window.open(channel.url, '_blank');
23
- }
24
- } }, channel.name)))) })));
20
+ translate('catalog.contact.label', 'Slack channels')), content: react_1.default.createElement(react_1.default.Fragment, null, channels === null || channels === void 0 ? void 0 : channels.map((channel) => (react_1.default.createElement(Button_1.Button, { key: channel.name, variant: "outlined", size: "small", style: { backgroundColor: 'var(--bg-color)' }, to: channel.url, external: true }, channel.name)))) })));
25
21
  }
26
22
  //# sourceMappingURL=ContactProperty.js.map
@@ -6,18 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.DomainsProperty = DomainsProperty;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const GraphIcon_1 = require("../../../../icons/GraphIcon/GraphIcon");
9
- const Tag_1 = require("../../../../components/Tag/Tag");
10
9
  const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
11
10
  const hooks_1 = require("../../../../core/hooks");
11
+ const Button_1 = require("../../../../components/Button/Button");
12
12
  function DomainsProperty({ entity }) {
13
- const { useTranslate } = (0, hooks_1.useThemeHooks)();
13
+ const { useTranslate, usePageProps } = (0, hooks_1.useThemeHooks)();
14
+ const { entitiesCatalogConfig } = usePageProps();
15
+ const { getEntityLink } = (0, hooks_1.useCatalogEntityLink)(entitiesCatalogConfig);
14
16
  const { translate } = useTranslate();
15
17
  const { domains = [] } = entity;
16
18
  return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty" },
17
19
  react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
18
20
  react_1.default.createElement(GraphIcon_1.GraphIcon, null),
19
- translate('catalog.domains.label', 'Domains')), content: react_1.default.createElement(react_1.default.Fragment, null, domains === null || domains === void 0 ? void 0 : domains.map((domain) => (react_1.default.createElement(Tag_1.Tag, { key: domain === null || domain === void 0 ? void 0 : domain.id, style: { backgroundColor: 'var(--bg-color)' }, variant: "outline" },
20
- react_1.default.createElement(GraphIcon_1.GraphIcon, null), domain === null || domain === void 0 ? void 0 :
21
- domain.title)))) })));
21
+ translate('catalog.domains.label', 'Domains')), content: react_1.default.createElement(react_1.default.Fragment, null, domains === null || domains === void 0 ? void 0 : domains.map((domain) => (react_1.default.createElement(Button_1.Button, { key: domain === null || domain === void 0 ? void 0 : domain.id, variant: "outlined", size: "small", style: { backgroundColor: 'var(--bg-color)' }, to: getEntityLink(domain), icon: react_1.default.createElement(GraphIcon_1.GraphIcon, null), external: true }, domain === null || domain === void 0 ? void 0 : domain.title)))) })));
22
22
  }
23
23
  //# sourceMappingURL=DomainsProperty.js.map
@@ -17,6 +17,6 @@ function FormatProperty({ entity }) {
17
17
  react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
18
18
  react_1.default.createElement(NotesIcon_1.NotesIcon, null),
19
19
  translate('catalog.format.label', 'Format')), content: react_1.default.createElement(react_1.default.Fragment, null,
20
- react_1.default.createElement(Tag_1.Tag, { textTransform: "none", key: (_a = entity.metadata) === null || _a === void 0 ? void 0 : _a.specType, style: { backgroundColor: 'var(--bg-color)' } }, (_b = entity.metadata) === null || _b === void 0 ? void 0 : _b.specType)), hoverEffect: false })));
20
+ react_1.default.createElement(Tag_1.Tag, { variant: "outline", textTransform: "none", key: (_a = entity.metadata) === null || _a === void 0 ? void 0 : _a.specType, style: { backgroundColor: 'var(--bg-color)' } }, (_b = entity.metadata) === null || _b === void 0 ? void 0 : _b.specType)), hoverEffect: false })));
21
21
  }
22
22
  //# sourceMappingURL=FormatProperty.js.map
@@ -5,20 +5,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.OwnersProperty = OwnersProperty;
7
7
  const react_1 = __importDefault(require("react"));
8
+ const hooks_1 = require("../../../../core/hooks");
8
9
  const PeopleIcon_1 = require("../../../../icons/PeopleIcon/PeopleIcon");
9
- const Tag_1 = require("../../../../components/Tag/Tag");
10
10
  const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
11
- const hooks_1 = require("../../../../core/hooks");
11
+ const hooks_2 = require("../../../../core/hooks");
12
+ const Button_1 = require("../../../../components/Button/Button");
13
+ const CatalogAvatar_1 = require("../../../../components/Catalog/CatalogAvatar");
12
14
  function OwnersProperty({ entity }) {
13
- const { useTranslate } = (0, hooks_1.useThemeHooks)();
15
+ const { useTranslate, usePageProps } = (0, hooks_2.useThemeHooks)();
14
16
  const { translate } = useTranslate();
17
+ const { entitiesCatalogConfig } = usePageProps();
18
+ const { getEntityLink } = (0, hooks_1.useCatalogEntityLink)(entitiesCatalogConfig);
15
19
  const { owners = [] } = entity;
16
20
  return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty" },
17
21
  react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
18
22
  react_1.default.createElement(PeopleIcon_1.PeopleIcon, null),
19
- translate('catalog.owners.label', 'Owners')), content: react_1.default.createElement(react_1.default.Fragment, null, owners.map((owner) => (react_1.default.createElement(Tag_1.Tag, { key: owner === null || owner === void 0 ? void 0 : owner.id, style: {
20
- backgroundColor: 'var(--bg-color)',
21
- borderRadius: 'var(--border-radius-xl)',
22
- }, variant: "outline" }, owner === null || owner === void 0 ? void 0 : owner.title)))) })));
23
+ translate('catalog.owners.label', 'Owners')), content: react_1.default.createElement(react_1.default.Fragment, null, owners.map((owner) => {
24
+ const entityLink = getEntityLink(owner);
25
+ return (react_1.default.createElement(Button_1.Button, { key: owner === null || owner === void 0 ? void 0 : owner.id, variant: "outlined", size: "small", style: {
26
+ backgroundColor: 'var(--bg-color)',
27
+ borderRadius: 'var(--border-radius-xl)',
28
+ paddingLeft: '2px',
29
+ }, to: entityLink, icon: react_1.default.createElement(CatalogAvatar_1.CatalogAvatar, { value: owner === null || owner === void 0 ? void 0 : owner.key, size: "small" }), external: true }, owner === null || owner === void 0 ? void 0 : owner.title));
30
+ })) })));
23
31
  }
24
32
  //# sourceMappingURL=OwnersProperty.js.map
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.TagsProperty = TagsProperty;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const TagsIcon_1 = require("../../../../icons/TagsIcon/TagsIcon");
9
- const CatalogTagsWithTooltip_1 = require("../../../../components/Catalog/CatalogTagsWithTooltip");
9
+ const CatalogTags_1 = require("../../../../components/Catalog/CatalogTags");
10
10
  const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
11
11
  const hooks_1 = require("../../../../core/hooks");
12
12
  function TagsProperty({ entity }) {
@@ -15,7 +15,7 @@ function TagsProperty({ entity }) {
15
15
  return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty" },
16
16
  react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
17
17
  react_1.default.createElement(TagsIcon_1.TagsIcon, null),
18
- translate('catalog.tags.label', 'Tags')), content: react_1.default.createElement(CatalogTagsWithTooltip_1.CatalogTagsWithTooltip, { itemsToShow: 8, items: entity.tags || [], tagProps: {
18
+ translate('catalog.tags.label', 'Tags')), content: react_1.default.createElement(CatalogTags_1.CatalogTags, { itemsToShow: 8, items: entity.tags || [], tagProps: {
19
19
  style: {
20
20
  fontSize: 'var(--font-size-base)',
21
21
  borderRadius: 'var(--border-radius)',
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react';
2
2
  import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
3
- import type { BffCatalogEntity, BffCatalogRelatedEntity, SortOption } from '../../../../core/types';
3
+ import type { BffCatalogEntity, BffCatalogRelatedEntity } from '../../../../core/types';
4
4
  export type CatalogEntityApiDescriptionRelationsProps = {
5
5
  entity: BffCatalogEntity;
6
6
  catalogConfig: CatalogEntityConfig;
@@ -14,8 +14,8 @@ export type CatalogEntityApiDescriptionRelationsProps = {
14
14
  searchQuery: string;
15
15
  setSearchQuery: (query: string) => void;
16
16
  setFilter: (filter?: string) => void;
17
- sortOption: SortOption | null;
18
- setSortOption: (sortOption: SortOption | null) => void;
17
+ sortOption: string | null;
18
+ setSortOption: (sortOption: string | null) => void;
19
19
  handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
20
20
  isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
21
21
  shouldShowLoadMore: boolean;
@@ -12,7 +12,7 @@ const CatalogEntityDefaultRelations_1 = require("../../../../components/Catalog/
12
12
  const MoleculesIcon_1 = require("../../../../icons/MoleculesIcon/MoleculesIcon");
13
13
  const NetworkIcon_1 = require("../../../../icons/NetworkIcon/NetworkIcon");
14
14
  function CatalogEntityApiDescriptionRelations({ entity, relations, query, searchQuery, setSearchQuery, setFilter, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }) {
15
- return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations" },
15
+ return (react_1.default.createElement(TabsWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations" },
16
16
  react_1.default.createElement(Tabs_1.Tabs, { key: entity.id, size: Tabs_1.TabsSize.MEDIUM },
17
17
  react_1.default.createElement(TabItem, { label: "Operations", icon: react_1.default.createElement(MoleculesIcon_1.MoleculesIcon, null), onClick: () => setFilter('type:api-operation') },
18
18
  react_1.default.createElement(CatalogEntityDefaultRelations_1.CatalogEntityDefaultRelations, { key: "operations-table", entity: entity, relations: relations, query: query, searchQuery: searchQuery, setSearchQuery: setSearchQuery, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, sortOption: sortOption, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore, shouldShowHeading: false, listType: "api-operation" })),
@@ -24,4 +24,7 @@ function CatalogEntityApiDescriptionRelations({ entity, relations, query, search
24
24
  const TabItem = styled_components_1.default.div `
25
25
  padding: var(--spacing-sm);
26
26
  `;
27
+ const TabsWrapper = styled_components_1.default.div `
28
+ --md-tabs-container-margin: none;
29
+ `;
27
30
  //# sourceMappingURL=CatalogEntityApiDescriptionRelations.js.map
@@ -1,7 +1,7 @@
1
1
  import { JSX } from 'react';
2
2
  import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
3
3
  import type { ListType } from '../../../../core/types';
4
- import type { BffCatalogEntity, BffCatalogRelatedEntity, SortOption } from '../../../../core/types';
4
+ import type { BffCatalogEntity, BffCatalogRelatedEntity } from '../../../../core/types';
5
5
  export type CatalogEntityDefaultRelationsProps = {
6
6
  entity: BffCatalogEntity;
7
7
  entitiesCatalogConfig: EntitiesCatalogConfig;
@@ -13,8 +13,8 @@ export type CatalogEntityDefaultRelationsProps = {
13
13
  };
14
14
  searchQuery: string;
15
15
  setSearchQuery: (query: string) => void;
16
- sortOption: SortOption | null;
17
- setSortOption: (sortOption: SortOption | null) => void;
16
+ sortOption: string | null;
17
+ setSortOption: (sortOption: string | null) => void;
18
18
  handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
19
19
  isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
20
20
  shouldShowLoadMore: boolean;
@@ -9,6 +9,7 @@ const CatalogEntityCell_1 = require("../../../../components/Catalog/CatalogTable
9
9
  const CatalogEntityRelationsTable_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable");
10
10
  const CatalogEntityTypeTag_1 = require("../../../../components/Catalog/CatalogEntityTypeTag");
11
11
  const CatalogEntityRelationCell_1 = require("../../../../components/Catalog/CatalogTableView/CatalogEntityRelationCell");
12
+ const CatalogLastUpdateCell_1 = require("../../../../components/Catalog/CatalogTableView/CatalogLastUpdateCell");
12
13
  function CatalogEntityDefaultRelations({ entity, relations, query, searchQuery, setSearchQuery, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, shouldShowHeading = true, listType, }) {
13
14
  return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations" },
14
15
  react_1.default.createElement(CatalogEntityRelationsTable_1.CatalogEntityRelationsTable, { entity: entity, catalogConfig: catalogConfig, entitiesCatalogConfig: entitiesCatalogConfig, relations: relations, query: query, searchQuery: searchQuery, setSearchQuery: setSearchQuery, heading: shouldShowHeading ? 'Related entities' : undefined, columns: getRelationsTableColumns(listType), sortOption: sortOption, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore, listType: listType })));
@@ -21,7 +22,7 @@ function getRelationsTableColumns(listType) {
21
22
  render: (entity) => react_1.default.createElement(CatalogEntityCell_1.CatalogEntityCell, { entity: entity }),
22
23
  sortable: true,
23
24
  sortKey: 'title',
24
- width: '2.5fr',
25
+ width: '4fr',
25
26
  },
26
27
  {
27
28
  key: 'type',
@@ -29,13 +30,24 @@ function getRelationsTableColumns(listType) {
29
30
  render: (entity) => react_1.default.createElement(CatalogEntityTypeTag_1.CatalogEntityTypeTag, { entityType: entity.type }),
30
31
  sortable: true,
31
32
  sortKey: 'type',
32
- width: '1fr',
33
+ width: '2fr',
33
34
  },
34
35
  {
35
36
  key: 'relationType',
36
37
  title: 'Relations',
37
38
  render: (entity) => (react_1.default.createElement(CatalogEntityRelationCell_1.CatalogEntityRelationCell, { relationType: entity.relationType, relationRole: entity.relationRole })),
39
+ width: '2fr',
40
+ sortable: true,
41
+ sortKey: 'relation_type',
42
+ },
43
+ {
44
+ key: 'lastUpdate',
45
+ title: 'Last update',
46
+ render: (entity) => react_1.default.createElement(CatalogLastUpdateCell_1.CatalogLastUpdateCell, { lastModified: entity.updatedAt }),
38
47
  width: '1fr',
48
+ minWidth: '112px',
49
+ sortable: true,
50
+ sortKey: 'updated_at',
39
51
  },
40
52
  ];
41
53
  if (listType === 'api-operation' || listType === 'data-schema') {
@@ -46,7 +46,7 @@ const ENTITY_DEFAULT_FILTERS = {
46
46
  };
47
47
  function CatalogEntityRelations({ entity, entitiesCatalogConfig, initialRelations, catalogConfig, searchQuery, setSearchQuery, }) {
48
48
  const { useCatalogSort, useFetchCatalogEntitiesRelations } = (0, hooks_1.useThemeHooks)();
49
- const { sortOption, setSortOption, handleSortClick, isColumnSorted } = useCatalogSort('title');
49
+ const { sortOption, setSortOption, handleSortClick, isColumnSorted } = useCatalogSort();
50
50
  const [filter, setFilter] = (0, react_1.useState)(ENTITY_DEFAULT_FILTERS[entity.type]);
51
51
  (0, react_1.useEffect)(() => {
52
52
  setFilter(ENTITY_DEFAULT_FILTERS[entity.key]);
@@ -1,7 +1,7 @@
1
1
  import { JSX } from 'react';
2
2
  import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
3
3
  import type { ListType } from '../../../../core/types';
4
- import type { BffCatalogEntity, BffCatalogRelatedEntity, SortOption } from '../../../../core/types';
4
+ import type { BffCatalogEntity, BffCatalogRelatedEntity } from '../../../../core/types';
5
5
  import { CatalogColumn } from '../../../../components/Catalog/CatalogTableView/CatalogTableView';
6
6
  export type CatalogEntityRelationsTableProps = {
7
7
  entity: BffCatalogEntity;
@@ -16,8 +16,8 @@ export type CatalogEntityRelationsTableProps = {
16
16
  setSearchQuery: (query: string) => void;
17
17
  heading?: string;
18
18
  columns: CatalogColumn<BffCatalogRelatedEntity>[];
19
- sortOption: SortOption | null;
20
- setSortOption: (sortOption: SortOption | null) => void;
19
+ sortOption: string | null;
20
+ setSortOption: (sortOption: string | null) => void;
21
21
  handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
22
22
  isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
23
23
  shouldShowLoadMore: boolean;
@@ -43,7 +43,7 @@ const CatalogEntityRelationsTableWrapper = styled_components_1.default.div `
43
43
  min-width: 0;
44
44
  `;
45
45
  const Heading = styled_components_1.default.h2 `
46
- margin: var(--spacing-base) 0;
46
+ margin: 0 0 var(--spacing-base) 0;
47
47
  font-size: var(--font-size-md);
48
48
  color: var(--catalog-metadata-heading-color);
49
49
  `;
@@ -1,7 +1,7 @@
1
1
  import { JSX } from 'react';
2
2
  import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
3
3
  import type { ListType } from '../../../../core/types';
4
- import type { BffCatalogRelatedEntity, SortOption } from '../../../../core/types';
4
+ import type { BffCatalogRelatedEntity } from '../../../../core/types';
5
5
  import { CatalogColumn } from '../../../../components/Catalog/CatalogTableView/CatalogTableView';
6
6
  export type CatalogEntityRelationsTableContentProps = {
7
7
  entitiesCatalogConfig: EntitiesCatalogConfig;
@@ -13,7 +13,7 @@ export type CatalogEntityRelationsTableContentProps = {
13
13
  };
14
14
  searchQuery: string;
15
15
  columns: CatalogColumn<BffCatalogRelatedEntity>[];
16
- sortOption: SortOption | null;
16
+ sortOption: string | null;
17
17
  handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
18
18
  isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
19
19
  shouldShowLoadMore: boolean;
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react';
2
2
  import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
3
- import type { BffCatalogEntity, BffCatalogRelatedEntity, SortOption } from '../../../../core/types';
3
+ import type { BffCatalogEntity, BffCatalogRelatedEntity } from '../../../../core/types';
4
4
  export type CatalogEntityTeamRelationsProps = {
5
5
  entity: BffCatalogEntity;
6
6
  catalogConfig: CatalogEntityConfig;
@@ -14,8 +14,8 @@ export type CatalogEntityTeamRelationsProps = {
14
14
  searchQuery: string;
15
15
  setSearchQuery: (query: string) => void;
16
16
  setFilter: (filter: string) => void;
17
- sortOption: SortOption | null;
18
- setSortOption: (sortOption: SortOption | null) => void;
17
+ sortOption: string | null;
18
+ setSortOption: (sortOption: string | null) => void;
19
19
  handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
20
20
  isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
21
21
  shouldShowLoadMore: boolean;
@@ -13,6 +13,7 @@ const Tag_1 = require("../../../../components/Tag/Tag");
13
13
  const CatalogEntityRelationsTable_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable");
14
14
  const CatalogUserEntityCell_1 = require("../../../../components/Catalog/CatalogTableView/CatalogUserEntityCell");
15
15
  const CatalogEntityDefaultRelations_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations");
16
+ const CatalogLastUpdateCell_1 = require("../../../../components/Catalog/CatalogTableView/CatalogLastUpdateCell");
16
17
  const teamColumns = [
17
18
  {
18
19
  key: 'entity',
@@ -21,12 +22,12 @@ const teamColumns = [
21
22
  var _a;
22
23
  return (react_1.default.createElement(CatalogUserEntityCell_1.CatalogUserEntityCell, { name: entity.title, email: (_a = entity.metadata) === null || _a === void 0 ? void 0 : _a.email }));
23
24
  },
24
- width: '2fr',
25
+ width: '3fr',
25
26
  sortable: true,
26
27
  sortKey: 'title',
27
28
  },
28
29
  {
29
- key: 'metadata',
30
+ key: 'metadata.role',
30
31
  title: 'Role',
31
32
  render: (entity) => { var _a, _b; return (((_a = entity.metadata) === null || _a === void 0 ? void 0 : _a.role) ? react_1.default.createElement(Tag_1.Tag, null, (_b = entity.metadata) === null || _b === void 0 ? void 0 : _b.role) : null); },
32
33
  width: '2fr',
@@ -35,7 +36,16 @@ const teamColumns = [
35
36
  key: 'description',
36
37
  title: 'Description',
37
38
  render: (entity) => react_1.default.createElement(EntityDescription, null, entity.summary),
38
- width: '3fr',
39
+ width: '2fr',
40
+ },
41
+ {
42
+ key: 'lastUpdate',
43
+ title: 'Last update',
44
+ render: (entity) => react_1.default.createElement(CatalogLastUpdateCell_1.CatalogLastUpdateCell, { lastModified: entity.updatedAt }),
45
+ width: '1fr',
46
+ minWidth: '112px',
47
+ sortable: true,
48
+ sortKey: 'updated_at',
39
49
  },
40
50
  ];
41
51
  function CatalogEntityTeamRelations({ entity, relations, query, searchQuery, setSearchQuery, setFilter, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }) {
@@ -55,7 +55,7 @@ function CatalogEntitySchema({ entity, relatedEntity, catalogConfig, RedocSchema
55
55
  const { getEntityDetailsLink } = (0, hooks_1.useCatalogEntityDetails)({
56
56
  catalogConfig,
57
57
  });
58
- return (react_1.default.createElement(MetadataWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityMetadata" },
58
+ return (react_1.default.createElement(MetadataWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntitySchema" },
59
59
  react_1.default.createElement(HeaderWrapper, null,
60
60
  react_1.default.createElement(Heading, null, translate('catalog.entity.schema.title')),
61
61
  !isGraphql && (react_1.default.createElement(CopyButton_1.CopyButton, { data: rawSchema, buttonText: "Copy Schema", type: "compound", variant: "secondary", iconPosition: "right", size: "medium", onCopyClick: () => telemetry.sendCatalogEntitiesCopyDataSchemaClickedMessage([
@@ -76,8 +76,7 @@ const MetadataWrapper = styled_components_1.default.div `
76
76
  flex-direction: column;
77
77
  border-radius: var(--border-radius);
78
78
  background-color: var(--catalog-metadata-bg-color);
79
- margin-top: var(--spacing-base);
80
- margin-bottom: var(--spacing-xs);
79
+ margin-bottom: var(--spacing-lg);
81
80
  `;
82
81
  const SchemaContentWrapper = styled_components_1.default.div `
83
82
  flex: 1;
@@ -94,6 +93,8 @@ const HeaderWrapper = styled_components_1.default.div `
94
93
  `;
95
94
  const Heading = styled_components_1.default.h2 `
96
95
  font-size: var(--catalog-metadata-heading-size);
96
+ line-height: var(--line-height-lg);
97
+ margin: 0;
97
98
  `;
98
99
  const SplitViewWrapper = styled_components_1.default.div `
99
100
  display: flex;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  export type CatalogEntityTypeIconProps = {
3
3
  entityType: string;
4
- defaultColor?: boolean;
4
+ defaultColors?: boolean;
5
+ size?: 'large' | 'medium';
5
6
  };
6
- export declare function CatalogEntityTypeIcon({ entityType, defaultColor, }: CatalogEntityTypeIconProps): React.JSX.Element;
7
+ export declare function CatalogEntityTypeIcon({ entityType, defaultColors, size, }: CatalogEntityTypeIconProps): React.JSX.Element;
@@ -8,19 +8,19 @@ const react_1 = __importDefault(require("react"));
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const CatalogEntityIcon_1 = require("../../components/Catalog/CatalogEntityIcon");
10
10
  const core_1 = require("../../core");
11
- function CatalogEntityTypeIcon({ entityType, defaultColor = false, }) {
12
- return (react_1.default.createElement(IconContainer, { "data-component-name": "Catalog/CatalogEntityTypeIcon", entityType: entityType, defaultColor: defaultColor },
13
- react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entityType, defaultColor: defaultColor })));
11
+ function CatalogEntityTypeIcon({ entityType, defaultColors = false, size = 'medium', }) {
12
+ return (react_1.default.createElement(IconContainer, { "data-component-name": "Catalog/CatalogEntityTypeIcon", entityType: entityType, defaultColors: defaultColors, size: size },
13
+ react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entityType, defaultColor: false })));
14
14
  }
15
15
  const IconContainer = styled_components_1.default.div `
16
16
  display: flex;
17
17
  align-items: center;
18
18
  justify-content: center;
19
- width: var(--catalog-table-icon-width);
20
- height: var(--catalog-table-icon-height);
19
+ width: ${({ size }) => (size === 'large' ? 'var(--catalog-table-icon-width-large)' : 'var(--catalog-table-icon-width-medium)')};
20
+ height: ${({ size }) => (size === 'large' ? 'var(--catalog-table-icon-height-large)' : 'var(--catalog-table-icon-height-medium)')};
21
21
  border-radius: var(--catalog-table-icon-border-radius);
22
- background-color: ${({ defaultColor, entityType }) => {
23
- if (defaultColor) {
22
+ background-color: ${({ defaultColors, entityType }) => {
23
+ if (defaultColors) {
24
24
  return 'var(--catalog-entity-bg-color)';
25
25
  }
26
26
  if (core_1.PREDEFINED_ENTITY_TYPES.includes(entityType)) {
@@ -30,8 +30,8 @@ const IconContainer = styled_components_1.default.div `
30
30
  }};
31
31
  flex-shrink: 0;
32
32
  border: 1px solid
33
- ${({ defaultColor, entityType }) => {
34
- if (defaultColor) {
33
+ ${({ defaultColors, entityType }) => {
34
+ if (defaultColors) {
35
35
  return 'var(--catalog-entity-border-color)';
36
36
  }
37
37
  if (core_1.PREDEFINED_ENTITY_TYPES.includes(entityType)) {
@@ -1,11 +1,10 @@
1
1
  import { JSX } from 'react';
2
- import { SortOption } from '../../../core';
3
2
  import { CatalogViewMode } from '../../../core';
4
3
  type CatalogMobileTopBarProps = {
5
4
  setMobileFiltersPanelOpen: (open: boolean) => void;
6
5
  activeFiltersCount: number;
7
- setSortOption: (sortOption: SortOption | null) => void;
8
- sortOption: SortOption | null;
6
+ setSortOption: (sortOption: string | null) => void;
7
+ sortOption: string | null;
9
8
  viewMode: CatalogViewMode;
10
9
  setViewMode: (viewMode: CatalogViewMode) => void;
11
10
  };