@redocly/theme 0.64.0-next.1 → 0.64.0-next.3
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/lib/components/Admonition/Admonition.d.ts +1 -1
- package/lib/components/Admonition/Admonition.js +2 -0
- package/lib/components/Admonition/variables.dark.js +3 -0
- package/lib/components/Admonition/variables.js +13 -0
- package/lib/components/Banner/Banner.js +3 -3
- package/lib/components/Button/variables.dark.js +2 -2
- package/lib/components/Button/variables.js +3 -3
- package/lib/components/Catalog/CatalogActionsRow.d.ts +3 -3
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +4 -6
- package/lib/components/Catalog/CatalogEntities.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntities.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +1 -8
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js +3 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +1 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +2 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.js +2 -6
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +5 -5
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +15 -7
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.d.ts +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +14 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +13 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +4 -3
- package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +3 -2
- package/lib/components/Catalog/CatalogEntityTypeIcon.js +9 -9
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.d.ts +2 -3
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.d.ts +2 -3
- package/lib/components/Catalog/CatalogPageDescription.js +1 -1
- package/lib/components/Catalog/CatalogSortButton.d.ts +4 -5
- package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.js +6 -2
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +2 -2
- package/lib/components/Catalog/CatalogTableView/CatalogLastUpdateCell.d.ts +5 -0
- package/lib/components/Catalog/CatalogTableView/CatalogLastUpdateCell.js +45 -0
- package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.js +5 -3
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +2 -3
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +3 -2
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +1 -2
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +15 -5
- package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.js +3 -2
- package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +2 -2
- package/lib/components/Catalog/CatalogTags.d.ts +11 -0
- package/lib/components/Catalog/CatalogTags.js +62 -0
- package/lib/components/Catalog/variables.js +22 -14
- package/lib/components/Filter/variables.js +1 -1
- package/lib/components/Link/Link.js +2 -2
- package/lib/components/Menu/MenuItem.js +1 -0
- package/lib/components/Menu/variables.dark.js +2 -0
- package/lib/components/Menu/variables.js +4 -3
- package/lib/components/Search/SearchDialog.js +118 -116
- package/lib/components/SvgViewer/variables.dark.js +1 -1
- package/lib/components/Switch/variables.dark.js +2 -2
- package/lib/components/Switch/variables.js +1 -1
- package/lib/components/TableOfContent/TableOfContent.js +1 -0
- package/lib/components/TableOfContent/variables.js +3 -2
- package/lib/components/Toast/Toast.d.ts +14 -0
- package/lib/components/Toast/Toast.js +239 -0
- package/lib/components/Toast/variables.d.ts +1 -0
- package/lib/components/Toast/variables.js +64 -0
- package/lib/components/Tooltip/JsTooltip.js +1 -1
- package/lib/core/constants/catalog.d.ts +1 -1
- package/lib/core/constants/catalog.js +1 -1
- package/lib/core/constants/toast.d.ts +1 -0
- package/lib/core/constants/toast.js +5 -0
- package/lib/core/contexts/Toast/ToastContext.d.ts +2 -0
- package/lib/core/contexts/Toast/ToastContext.js +6 -0
- package/lib/core/contexts/Toast/ToastProvider.d.ts +3 -0
- package/lib/core/contexts/Toast/ToastProvider.js +156 -0
- package/lib/core/contexts/index.d.ts +2 -0
- package/lib/core/contexts/index.js +2 -0
- package/lib/core/hooks/catalog/use-catalog-entity-link.d.ts +8 -0
- package/lib/core/hooks/catalog/use-catalog-entity-link.js +42 -0
- package/lib/core/hooks/catalog/use-catalog-table-header-cell-actions.d.ts +2 -1
- package/lib/core/hooks/catalog/use-catalog-table-header-cell-actions.js +5 -3
- package/lib/core/hooks/index.d.ts +3 -0
- package/lib/core/hooks/index.js +3 -0
- package/lib/core/hooks/use-toast-logic.d.ts +18 -0
- package/lib/core/hooks/use-toast-logic.js +141 -0
- package/lib/core/hooks/use-toast.d.ts +11 -0
- package/lib/core/hooks/use-toast.js +17 -0
- package/lib/core/styles/dark.d.ts +3 -1
- package/lib/core/styles/dark.js +37 -33
- package/lib/core/styles/global.d.ts +6 -2
- package/lib/core/styles/global.js +56 -46
- package/lib/core/styles/palette.d.ts +6 -0
- package/lib/core/styles/palette.dark.d.ts +3 -0
- package/lib/core/styles/palette.dark.js +201 -0
- package/lib/core/styles/palette.js +175 -0
- package/lib/core/types/catalog.d.ts +23 -7
- package/lib/core/types/hooks.d.ts +6 -4
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/search.d.ts +1 -0
- package/lib/core/types/toast.d.ts +23 -0
- package/lib/core/types/toast.js +3 -0
- package/lib/core/utils/get-auto-dismiss-duration.d.ts +2 -0
- package/lib/core/utils/get-auto-dismiss-duration.js +15 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/icons/CheckboxIcon/CheckboxIcon.js +6 -4
- package/lib/icons/CheckboxIcon/variables.dark.js +2 -1
- package/lib/icons/CheckboxIcon/variables.js +3 -3
- package/lib/icons/IdeaIcon/IdeaIcon.d.ts +9 -0
- package/lib/icons/IdeaIcon/IdeaIcon.js +24 -0
- package/lib/icons/NewChatIcon/NewChatIcon.d.ts +11 -0
- package/lib/icons/NewChatIcon/NewChatIcon.js +25 -0
- package/lib/index.d.ts +5 -1
- package/lib/index.js +5 -1
- package/lib/markdoc/components/Heading/Heading.js +2 -2
- package/lib/markdoc/components/Mermaid/Mermaid.js +0 -2
- package/lib/markdoc/components/Tabs/variables.js +3 -3
- package/lib/markdoc/components/default.d.ts +0 -1
- package/lib/markdoc/components/default.js +0 -1
- package/lib/markdoc/tags/admonition.js +1 -1
- package/package.json +2 -2
- package/src/components/Admonition/Admonition.tsx +3 -1
- package/src/components/Admonition/variables.dark.ts +3 -0
- package/src/components/Admonition/variables.ts +13 -0
- package/src/components/Banner/Banner.tsx +7 -7
- package/src/components/Button/variables.dark.ts +2 -2
- package/src/components/Button/variables.ts +3 -3
- package/src/components/Catalog/CatalogActionsRow.tsx +3 -3
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +4 -6
- package/src/components/Catalog/CatalogEntities.tsx +3 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +3 -24
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx +3 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +1 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +8 -10
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +13 -8
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +1 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +27 -15
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +2 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +9 -9
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +17 -9
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +4 -8
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +2 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +16 -10
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +4 -3
- package/src/components/Catalog/CatalogEntityTypeIcon.tsx +18 -11
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.tsx +3 -3
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.tsx +2 -3
- package/src/components/Catalog/CatalogPageDescription.tsx +1 -1
- package/src/components/Catalog/CatalogSortButton.tsx +5 -6
- package/src/components/Catalog/CatalogTableView/CatalogDomainsCell.tsx +6 -2
- package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +2 -2
- package/src/components/Catalog/CatalogTableView/CatalogLastUpdateCell.tsx +54 -0
- package/src/components/Catalog/CatalogTableView/CatalogOwnersCell.tsx +5 -2
- package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +4 -3
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +17 -7
- package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +3 -2
- package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +2 -2
- package/src/components/Catalog/CatalogTags.tsx +115 -0
- package/src/components/Catalog/variables.ts +22 -14
- package/src/components/Filter/variables.ts +1 -1
- package/src/components/Link/Link.tsx +1 -1
- package/src/components/Menu/MenuItem.tsx +5 -1
- package/src/components/Menu/variables.dark.ts +2 -0
- package/src/components/Menu/variables.ts +4 -3
- package/src/components/Search/SearchDialog.tsx +299 -293
- package/src/components/SvgViewer/variables.dark.ts +1 -1
- package/src/components/Switch/variables.dark.ts +2 -2
- package/src/components/Switch/variables.ts +1 -1
- package/src/components/TableOfContent/TableOfContent.tsx +1 -0
- package/src/components/TableOfContent/variables.ts +3 -2
- package/src/components/Toast/Toast.tsx +289 -0
- package/src/components/Toast/variables.ts +61 -0
- package/src/components/Tooltip/JsTooltip.tsx +1 -1
- package/src/core/constants/catalog.ts +1 -1
- package/src/core/constants/toast.ts +1 -0
- package/src/core/contexts/Toast/ToastContext.tsx +5 -0
- package/src/core/contexts/Toast/ToastProvider.tsx +206 -0
- package/src/core/contexts/index.ts +2 -0
- package/src/core/hooks/catalog/use-catalog-entity-link.ts +46 -0
- package/src/core/hooks/catalog/use-catalog-table-header-cell-actions.ts +10 -2
- package/src/core/hooks/index.ts +3 -0
- package/src/core/hooks/use-toast-logic.ts +203 -0
- package/src/core/hooks/use-toast.ts +47 -0
- package/src/core/styles/dark.ts +9 -4
- package/src/core/styles/global.ts +30 -20
- package/src/core/styles/palette.dark.ts +199 -0
- package/src/core/styles/palette.ts +173 -0
- package/src/core/types/catalog.ts +24 -8
- package/src/core/types/hooks.ts +5 -10
- package/src/core/types/index.ts +1 -0
- package/src/core/types/search.ts +1 -0
- package/src/core/types/toast.ts +28 -0
- package/src/core/utils/get-auto-dismiss-duration.ts +20 -0
- package/src/core/utils/index.ts +1 -0
- package/src/icons/CheckboxIcon/CheckboxIcon.tsx +26 -17
- package/src/icons/CheckboxIcon/variables.dark.ts +2 -1
- package/src/icons/CheckboxIcon/variables.ts +3 -3
- package/src/icons/IdeaIcon/IdeaIcon.tsx +32 -0
- package/src/icons/NewChatIcon/NewChatIcon.tsx +39 -0
- package/src/index.ts +5 -1
- package/src/markdoc/components/Heading/Heading.tsx +2 -1
- package/src/markdoc/components/Mermaid/Mermaid.tsx +0 -2
- package/src/markdoc/components/Tabs/variables.ts +3 -3
- package/src/markdoc/components/default.ts +0 -1
- package/src/markdoc/tags/admonition.ts +1 -1
- package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +0 -10
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +0 -57
- package/lib/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.d.ts +0 -7
- package/lib/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.js +0 -95
- package/lib/markdoc/components/ExcalidrawDiagram/variables.d.ts +0 -1
- package/lib/markdoc/components/ExcalidrawDiagram/variables.dark.d.ts +0 -1
- package/lib/markdoc/components/ExcalidrawDiagram/variables.dark.js +0 -8
- package/lib/markdoc/components/ExcalidrawDiagram/variables.js +0 -15
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +0 -101
- package/src/markdoc/components/ExcalidrawDiagram/ExcalidrawDiagram.tsx +0 -85
- package/src/markdoc/components/ExcalidrawDiagram/variables.dark.ts +0 -5
- package/src/markdoc/components/ExcalidrawDiagram/variables.ts +0 -12
package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx
CHANGED
|
@@ -3,11 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
5
5
|
import type { ListType } from '@redocly/theme/core/types';
|
|
6
|
-
import type {
|
|
7
|
-
BffCatalogEntity,
|
|
8
|
-
BffCatalogRelatedEntity,
|
|
9
|
-
SortOption,
|
|
10
|
-
} from '@redocly/theme/core/types';
|
|
6
|
+
import type { BffCatalogEntity, BffCatalogRelatedEntity } from '@redocly/theme/core/types';
|
|
11
7
|
|
|
12
8
|
import { CatalogColumn } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
|
|
13
9
|
import { CatalogActionsRow } from '@redocly/theme/components/Catalog/CatalogActionsRow';
|
|
@@ -28,8 +24,8 @@ export type CatalogEntityRelationsTableProps = {
|
|
|
28
24
|
setSearchQuery: (query: string) => void;
|
|
29
25
|
heading?: string;
|
|
30
26
|
columns: CatalogColumn<BffCatalogRelatedEntity>[];
|
|
31
|
-
sortOption:
|
|
32
|
-
setSortOption: (sortOption:
|
|
27
|
+
sortOption: string | null;
|
|
28
|
+
setSortOption: (sortOption: string | null) => void;
|
|
33
29
|
handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
|
|
34
30
|
isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
|
|
35
31
|
shouldShowLoadMore: boolean;
|
|
@@ -112,7 +108,7 @@ const CatalogEntityRelationsTableWrapper = styled.div`
|
|
|
112
108
|
`;
|
|
113
109
|
|
|
114
110
|
const Heading = styled.h2`
|
|
115
|
-
margin: var(--spacing-base) 0;
|
|
111
|
+
margin: 0 0 var(--spacing-base) 0;
|
|
116
112
|
font-size: var(--font-size-md);
|
|
117
113
|
color: var(--catalog-metadata-heading-color);
|
|
118
114
|
`;
|
|
@@ -3,7 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
5
5
|
import type { ListType } from '@redocly/theme/core/types';
|
|
6
|
-
import type { BffCatalogRelatedEntity
|
|
6
|
+
import type { BffCatalogRelatedEntity } from '@redocly/theme/core/types';
|
|
7
7
|
|
|
8
8
|
import { ArrowDownIcon } from '@redocly/theme/icons/ArrowDownIcon/ArrowDownIcon';
|
|
9
9
|
import { LoadMore } from '@redocly/theme/components/LoadMore/LoadMore';
|
|
@@ -24,7 +24,7 @@ export type CatalogEntityRelationsTableContentProps = {
|
|
|
24
24
|
};
|
|
25
25
|
searchQuery: string;
|
|
26
26
|
columns: CatalogColumn<BffCatalogRelatedEntity>[];
|
|
27
|
-
sortOption:
|
|
27
|
+
sortOption: string | null;
|
|
28
28
|
handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
|
|
29
29
|
isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
|
|
30
30
|
shouldShowLoadMore: boolean;
|
package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx
CHANGED
|
@@ -2,11 +2,7 @@ import React, { JSX, ReactNode } from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
5
|
-
import type {
|
|
6
|
-
BffCatalogEntity,
|
|
7
|
-
BffCatalogRelatedEntity,
|
|
8
|
-
SortOption,
|
|
9
|
-
} from '@redocly/theme/core/types';
|
|
5
|
+
import type { BffCatalogEntity, BffCatalogRelatedEntity } from '@redocly/theme/core/types';
|
|
10
6
|
|
|
11
7
|
import { Tabs, TabsSize } from '@redocly/theme/markdoc/components/Tabs/Tabs';
|
|
12
8
|
import { PeopleIcon } from '@redocly/theme/icons/PeopleIcon/PeopleIcon';
|
|
@@ -16,6 +12,7 @@ import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
|
16
12
|
import { CatalogEntityRelationsTable } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable';
|
|
17
13
|
import { CatalogUserEntityCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogUserEntityCell';
|
|
18
14
|
import { CatalogEntityDefaultRelations } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations';
|
|
15
|
+
import { CatalogLastUpdateCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogLastUpdateCell';
|
|
19
16
|
|
|
20
17
|
const teamColumns: CatalogColumn<BffCatalogRelatedEntity>[] = [
|
|
21
18
|
{
|
|
@@ -24,12 +21,12 @@ const teamColumns: CatalogColumn<BffCatalogRelatedEntity>[] = [
|
|
|
24
21
|
render: (entity) => (
|
|
25
22
|
<CatalogUserEntityCell name={entity.title} email={entity.metadata?.email as string} />
|
|
26
23
|
),
|
|
27
|
-
width: '
|
|
24
|
+
width: '3fr',
|
|
28
25
|
sortable: true,
|
|
29
26
|
sortKey: 'title',
|
|
30
27
|
},
|
|
31
28
|
{
|
|
32
|
-
key: 'metadata',
|
|
29
|
+
key: 'metadata.role',
|
|
33
30
|
title: 'Role',
|
|
34
31
|
render: (entity) => (entity.metadata?.role ? <Tag>{entity.metadata?.role}</Tag> : null),
|
|
35
32
|
width: '2fr',
|
|
@@ -38,7 +35,16 @@ const teamColumns: CatalogColumn<BffCatalogRelatedEntity>[] = [
|
|
|
38
35
|
key: 'description',
|
|
39
36
|
title: 'Description',
|
|
40
37
|
render: (entity) => <EntityDescription>{entity.summary}</EntityDescription>,
|
|
41
|
-
width: '
|
|
38
|
+
width: '2fr',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: 'lastUpdate',
|
|
42
|
+
title: 'Last update',
|
|
43
|
+
render: (entity) => <CatalogLastUpdateCell lastModified={entity.updatedAt} />,
|
|
44
|
+
width: '1fr',
|
|
45
|
+
minWidth: '112px',
|
|
46
|
+
sortable: true,
|
|
47
|
+
sortKey: 'updated_at',
|
|
42
48
|
},
|
|
43
49
|
];
|
|
44
50
|
|
|
@@ -55,8 +61,8 @@ export type CatalogEntityTeamRelationsProps = {
|
|
|
55
61
|
searchQuery: string;
|
|
56
62
|
setSearchQuery: (query: string) => void;
|
|
57
63
|
setFilter: (filter: string) => void;
|
|
58
|
-
sortOption:
|
|
59
|
-
setSortOption: (sortOption:
|
|
64
|
+
sortOption: string | null;
|
|
65
|
+
setSortOption: (sortOption: string | null) => void;
|
|
60
66
|
handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
|
|
61
67
|
isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
|
|
62
68
|
shouldShowLoadMore: boolean;
|
|
@@ -40,7 +40,7 @@ export function CatalogEntitySchema({
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
return (
|
|
43
|
-
<MetadataWrapper data-component-name="Catalog/CatalogEntity/
|
|
43
|
+
<MetadataWrapper data-component-name="Catalog/CatalogEntity/CatalogEntitySchema">
|
|
44
44
|
<HeaderWrapper>
|
|
45
45
|
<Heading>{translate('catalog.entity.schema.title')}</Heading>
|
|
46
46
|
{!isGraphql && (
|
|
@@ -89,8 +89,7 @@ const MetadataWrapper = styled.div`
|
|
|
89
89
|
flex-direction: column;
|
|
90
90
|
border-radius: var(--border-radius);
|
|
91
91
|
background-color: var(--catalog-metadata-bg-color);
|
|
92
|
-
margin-
|
|
93
|
-
margin-bottom: var(--spacing-xs);
|
|
92
|
+
margin-bottom: var(--spacing-lg);
|
|
94
93
|
`;
|
|
95
94
|
|
|
96
95
|
const SchemaContentWrapper = styled.div`
|
|
@@ -110,6 +109,8 @@ const HeaderWrapper = styled.div`
|
|
|
110
109
|
|
|
111
110
|
const Heading = styled.h2`
|
|
112
111
|
font-size: var(--catalog-metadata-heading-size);
|
|
112
|
+
line-height: var(--line-height-lg);
|
|
113
|
+
margin: 0;
|
|
113
114
|
`;
|
|
114
115
|
|
|
115
116
|
const SplitViewWrapper = styled.div`
|
|
@@ -6,33 +6,40 @@ import { PREDEFINED_ENTITY_TYPES } from '@redocly/theme/core';
|
|
|
6
6
|
|
|
7
7
|
export type CatalogEntityTypeIconProps = {
|
|
8
8
|
entityType: string;
|
|
9
|
-
|
|
9
|
+
defaultColors?: boolean;
|
|
10
|
+
size?: 'large' | 'medium';
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
export function CatalogEntityTypeIcon({
|
|
13
14
|
entityType,
|
|
14
|
-
|
|
15
|
+
defaultColors = false,
|
|
16
|
+
size = 'medium',
|
|
15
17
|
}: CatalogEntityTypeIconProps) {
|
|
16
18
|
return (
|
|
17
19
|
<IconContainer
|
|
18
20
|
data-component-name="Catalog/CatalogEntityTypeIcon"
|
|
19
21
|
entityType={entityType}
|
|
20
|
-
|
|
22
|
+
defaultColors={defaultColors}
|
|
23
|
+
size={size}
|
|
21
24
|
>
|
|
22
|
-
<CatalogEntityIcon entityType={entityType} defaultColor={
|
|
25
|
+
<CatalogEntityIcon entityType={entityType} defaultColor={false} />
|
|
23
26
|
</IconContainer>
|
|
24
27
|
);
|
|
25
28
|
}
|
|
26
29
|
|
|
27
|
-
const IconContainer = styled.div<{
|
|
30
|
+
const IconContainer = styled.div<{
|
|
31
|
+
entityType: string;
|
|
32
|
+
defaultColors: boolean;
|
|
33
|
+
size: 'large' | 'medium';
|
|
34
|
+
}>`
|
|
28
35
|
display: flex;
|
|
29
36
|
align-items: center;
|
|
30
37
|
justify-content: center;
|
|
31
|
-
width: var(--catalog-table-icon-width);
|
|
32
|
-
height: var(--catalog-table-icon-height);
|
|
38
|
+
width: ${({ size }) => (size === 'large' ? 'var(--catalog-table-icon-width-large)' : 'var(--catalog-table-icon-width-medium)')};
|
|
39
|
+
height: ${({ size }) => (size === 'large' ? 'var(--catalog-table-icon-height-large)' : 'var(--catalog-table-icon-height-medium)')};
|
|
33
40
|
border-radius: var(--catalog-table-icon-border-radius);
|
|
34
|
-
background-color: ${({
|
|
35
|
-
if (
|
|
41
|
+
background-color: ${({ defaultColors, entityType }) => {
|
|
42
|
+
if (defaultColors) {
|
|
36
43
|
return 'var(--catalog-entity-bg-color)';
|
|
37
44
|
}
|
|
38
45
|
if (PREDEFINED_ENTITY_TYPES.includes(entityType)) {
|
|
@@ -42,8 +49,8 @@ const IconContainer = styled.div<{ entityType: string; defaultColor: boolean }>`
|
|
|
42
49
|
}};
|
|
43
50
|
flex-shrink: 0;
|
|
44
51
|
border: 1px solid
|
|
45
|
-
${({
|
|
46
|
-
if (
|
|
52
|
+
${({ defaultColors, entityType }) => {
|
|
53
|
+
if (defaultColors) {
|
|
47
54
|
return 'var(--catalog-entity-border-color)';
|
|
48
55
|
}
|
|
49
56
|
if (PREDEFINED_ENTITY_TYPES.includes(entityType)) {
|
|
@@ -3,14 +3,14 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
import { CatalogMobileTopBarFiltersButton } from '@redocly/theme/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton';
|
|
5
5
|
import { CatalogMobileTopBarControls } from '@redocly/theme/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls';
|
|
6
|
-
import { breakpoints
|
|
6
|
+
import { breakpoints } from '@redocly/theme/core';
|
|
7
7
|
import { CatalogViewMode } from '@redocly/theme/core';
|
|
8
8
|
|
|
9
9
|
type CatalogMobileTopBarProps = {
|
|
10
10
|
setMobileFiltersPanelOpen: (open: boolean) => void;
|
|
11
11
|
activeFiltersCount: number;
|
|
12
|
-
setSortOption: (sortOption:
|
|
13
|
-
sortOption:
|
|
12
|
+
setSortOption: (sortOption: string | null) => void;
|
|
13
|
+
sortOption: string | null;
|
|
14
14
|
viewMode: CatalogViewMode;
|
|
15
15
|
setViewMode: (viewMode: CatalogViewMode) => void;
|
|
16
16
|
};
|
|
@@ -3,12 +3,11 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
import { CatalogSortButton } from '@redocly/theme/components/Catalog/CatalogSortButton';
|
|
5
5
|
import { CatalogViewModeToggle } from '@redocly/theme/components/Catalog/CatalogViewModeToggle';
|
|
6
|
-
import { SortOption } from '@redocly/theme/core';
|
|
7
6
|
import { CatalogViewMode } from '@redocly/theme/core';
|
|
8
7
|
|
|
9
8
|
type CatalogMobileTopBarControlsProps = {
|
|
10
|
-
setSortOption: (sortOption:
|
|
11
|
-
sortOption:
|
|
9
|
+
setSortOption: (sortOption: string | null) => void;
|
|
10
|
+
sortOption: string | null;
|
|
12
11
|
viewMode: CatalogViewMode;
|
|
13
12
|
setViewMode: (viewMode: CatalogViewMode) => void;
|
|
14
13
|
};
|
|
@@ -58,7 +58,7 @@ const CatalogDescription = styled.p`
|
|
|
58
58
|
color: var(--catalog-description-text-color);
|
|
59
59
|
font-weight: var(--catalog-description-font-weight);
|
|
60
60
|
font-size: var(--catalog-description-font-size);
|
|
61
|
-
margin:
|
|
61
|
+
margin: 0;
|
|
62
62
|
line-height: var(--catalog-description-line-height);
|
|
63
63
|
display: -webkit-box;
|
|
64
64
|
-webkit-line-clamp: 3;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import { SortOption } from '@redocly/theme/core/types';
|
|
5
4
|
import { AscSortIcon } from '@redocly/theme/icons/AscSortIcon/AscSortIcon';
|
|
6
5
|
import { DescSortIcon } from '@redocly/theme/icons/DescSortIcon/DescSortIcon';
|
|
7
6
|
import { Dropdown } from '@redocly/theme/components/Dropdown/Dropdown';
|
|
@@ -10,16 +9,16 @@ import { DropdownMenuItem } from '@redocly/theme/components/Dropdown/DropdownMen
|
|
|
10
9
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
11
10
|
|
|
12
11
|
export type CatalogSortButtonProps = {
|
|
13
|
-
onSortChange: (sortOption:
|
|
14
|
-
currentSort?:
|
|
12
|
+
onSortChange: (sortOption: string | null) => void;
|
|
13
|
+
currentSort?: string | null;
|
|
15
14
|
};
|
|
16
15
|
|
|
17
16
|
export function CatalogSortButton({
|
|
18
17
|
onSortChange,
|
|
19
18
|
currentSort,
|
|
20
19
|
}: {
|
|
21
|
-
onSortChange: (sortOption:
|
|
22
|
-
currentSort?:
|
|
20
|
+
onSortChange: (sortOption: string | null) => void;
|
|
21
|
+
currentSort?: string | null;
|
|
23
22
|
}) {
|
|
24
23
|
const { useTranslate } = useThemeHooks();
|
|
25
24
|
const { translate } = useTranslate();
|
|
@@ -27,7 +26,7 @@ export function CatalogSortButton({
|
|
|
27
26
|
const toggleSort = useCallback(
|
|
28
27
|
(field: string): void => {
|
|
29
28
|
const newSort = currentSort === `-${field}` ? field : `-${field}`;
|
|
30
|
-
onSortChange(newSort
|
|
29
|
+
onSortChange(newSort);
|
|
31
30
|
},
|
|
32
31
|
[currentSort, onSortChange],
|
|
33
32
|
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { CatalogTags } from '@redocly/theme/components/Catalog/CatalogTags';
|
|
4
|
+
import { GraphIcon } from '@redocly/theme/icons/GraphIcon/GraphIcon';
|
|
4
5
|
|
|
5
6
|
export type CatalogDomainsCellProps = {
|
|
6
7
|
domains: string[];
|
|
@@ -9,15 +10,18 @@ export type CatalogDomainsCellProps = {
|
|
|
9
10
|
export function CatalogDomainsCell({ domains }: CatalogDomainsCellProps) {
|
|
10
11
|
return (
|
|
11
12
|
<div data-component-name="Catalog/CatalogTableView/CatalogDomainsCell">
|
|
12
|
-
<
|
|
13
|
+
<CatalogTags
|
|
13
14
|
data-testid="catalog-domains-cell"
|
|
14
15
|
items={domains}
|
|
15
16
|
showPlaceholder={false}
|
|
16
17
|
tagProps={{
|
|
18
|
+
variant: 'outline',
|
|
19
|
+
icon: <GraphIcon />,
|
|
17
20
|
style: {
|
|
18
21
|
fontSize: 'var(--font-size-base)',
|
|
19
22
|
backgroundColor: 'transparent',
|
|
20
23
|
borderRadius: 'var(--border-radius-xl)',
|
|
24
|
+
margin: 0,
|
|
21
25
|
},
|
|
22
26
|
textTransform: 'none',
|
|
23
27
|
}}
|
|
@@ -13,7 +13,7 @@ export type CatalogEntityCellProps<T extends Entity> = {
|
|
|
13
13
|
export function CatalogEntityCell<T extends Entity>({ entity }: CatalogEntityCellProps<T>) {
|
|
14
14
|
return (
|
|
15
15
|
<EntityTitleCellWrapper data-component-name="Catalog/CatalogTableView/CatalogEntityCell">
|
|
16
|
-
<CatalogEntityTypeIcon entityType={entity.type} />
|
|
16
|
+
<CatalogEntityTypeIcon entityType={entity.type} size="large" defaultColors={true} />
|
|
17
17
|
<EntityTitleContent>
|
|
18
18
|
<EntityTitle data-component-name="Catalog/CatalogTableView/CatalogEntityTitle">
|
|
19
19
|
<CatalogHighlight>{entity.title}</CatalogHighlight>
|
|
@@ -40,7 +40,7 @@ const EntityTitleContent = styled.div`
|
|
|
40
40
|
flex-direction: column;
|
|
41
41
|
max-width: calc(
|
|
42
42
|
100% - var(--catalog-table-entity-title-content-offset)
|
|
43
|
-
); /* Account for icon width (
|
|
43
|
+
); /* Account for icon width (32px) + gap (8px) */
|
|
44
44
|
overflow: hidden;
|
|
45
45
|
`;
|
|
46
46
|
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { Tooltip } from '@redocly/theme/components/Tooltip/Tooltip';
|
|
5
|
+
|
|
6
|
+
export type CatalogLastUpdateCellProps = {
|
|
7
|
+
lastModified: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
function formatLastModified(isoString: string): string {
|
|
11
|
+
const date = new Date(isoString);
|
|
12
|
+
if (Number.isNaN(date.getTime())) {
|
|
13
|
+
return isoString;
|
|
14
|
+
}
|
|
15
|
+
return date.toLocaleDateString('en-US', {
|
|
16
|
+
year: 'numeric',
|
|
17
|
+
month: 'short',
|
|
18
|
+
day: 'numeric',
|
|
19
|
+
timeZone: 'UTC',
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function formatLastModifiedTooltip(isoString: string): string {
|
|
24
|
+
const date = new Date(isoString);
|
|
25
|
+
if (Number.isNaN(date.getTime())) {
|
|
26
|
+
return isoString;
|
|
27
|
+
}
|
|
28
|
+
return date.toLocaleString('en-US', {
|
|
29
|
+
year: 'numeric',
|
|
30
|
+
month: 'short',
|
|
31
|
+
day: 'numeric',
|
|
32
|
+
hour: '2-digit',
|
|
33
|
+
minute: '2-digit',
|
|
34
|
+
second: '2-digit',
|
|
35
|
+
hour12: false,
|
|
36
|
+
timeZone: 'UTC',
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function CatalogLastUpdateCell({
|
|
41
|
+
lastModified,
|
|
42
|
+
}: CatalogLastUpdateCellProps): React.ReactElement {
|
|
43
|
+
return (
|
|
44
|
+
<CatalogLastUpdateCellWrapper data-component-name="Catalog/CatalogTableView/CatalogLastUpdateCell">
|
|
45
|
+
<Tooltip tip={formatLastModifiedTooltip(lastModified)} placement="bottom">
|
|
46
|
+
{formatLastModified(lastModified)}
|
|
47
|
+
</Tooltip>
|
|
48
|
+
</CatalogLastUpdateCellWrapper>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const CatalogLastUpdateCellWrapper = styled.div`
|
|
53
|
+
color: var(--text-color-helper);
|
|
54
|
+
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { CatalogTags } from '@redocly/theme/components/Catalog/CatalogTags';
|
|
4
4
|
|
|
5
5
|
export type CatalogOwnersCellProps = {
|
|
6
6
|
owners: string[];
|
|
@@ -9,18 +9,21 @@ export type CatalogOwnersCellProps = {
|
|
|
9
9
|
export function CatalogOwnersCell({ owners }: CatalogOwnersCellProps) {
|
|
10
10
|
return (
|
|
11
11
|
<div data-component-name="Catalog/CatalogTableView/CatalogOwnersCell">
|
|
12
|
-
<
|
|
12
|
+
<CatalogTags
|
|
13
13
|
data-testid="catalog-owners-cell"
|
|
14
14
|
items={owners}
|
|
15
15
|
showPlaceholder={false}
|
|
16
16
|
tagProps={{
|
|
17
|
+
variant: 'outline',
|
|
17
18
|
style: {
|
|
18
19
|
fontSize: 'var(--font-size-base)',
|
|
19
20
|
backgroundColor: 'transparent',
|
|
20
21
|
borderRadius: 'var(--border-radius-xl)',
|
|
22
|
+
margin: 0,
|
|
21
23
|
},
|
|
22
24
|
textTransform: 'none',
|
|
23
25
|
}}
|
|
26
|
+
showAvatars={true}
|
|
24
27
|
/>
|
|
25
28
|
</div>
|
|
26
29
|
);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import { SortOption } from '@redocly/theme/core/types';
|
|
5
4
|
import { CaretDownIcon } from '@redocly/theme/icons/CaretDownIcon/CaretDownIcon';
|
|
6
5
|
import { CaretUpIcon } from '@redocly/theme/icons/CaretUpIcon/CaretUpIcon';
|
|
7
6
|
import { useCatalogTableHeaderCellActions } from '@redocly/theme/core/hooks';
|
|
@@ -12,18 +11,20 @@ import {
|
|
|
12
11
|
|
|
13
12
|
export type CatalogTableHeaderCellProps<T extends BaseEntity> = {
|
|
14
13
|
column: CatalogColumn<T>;
|
|
15
|
-
currentSortOption?:
|
|
14
|
+
currentSortOption?: string | null;
|
|
16
15
|
handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
|
|
17
16
|
isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
|
|
18
17
|
};
|
|
19
18
|
|
|
20
19
|
export const CatalogTableHeaderCell = <T extends BaseEntity>({
|
|
21
20
|
column,
|
|
21
|
+
currentSortOption,
|
|
22
22
|
handleSortClick,
|
|
23
23
|
isColumnSorted,
|
|
24
24
|
}: CatalogTableHeaderCellProps<T>) => {
|
|
25
25
|
const { handleCellClick, sortKey, isUpActive, isDownActive } = useCatalogTableHeaderCellActions({
|
|
26
26
|
column,
|
|
27
|
+
currentSortOption,
|
|
27
28
|
handleSortClick,
|
|
28
29
|
isColumnSorted,
|
|
29
30
|
});
|
|
@@ -88,7 +89,7 @@ const SortIndicator = styled.div`
|
|
|
88
89
|
flex-direction: column;
|
|
89
90
|
align-items: center;
|
|
90
91
|
justify-content: center;
|
|
91
|
-
margin-left:
|
|
92
|
+
margin-left: 4px;
|
|
92
93
|
gap: 2px;
|
|
93
94
|
color: var(--catalog-table-header-sort-indicator-color);
|
|
94
95
|
`;
|
|
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
5
|
-
import type {
|
|
5
|
+
import type { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
6
6
|
|
|
7
7
|
import { CatalogOwnersCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogOwnersCell';
|
|
8
8
|
import { CatalogDomainsCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogDomainsCell';
|
|
@@ -12,6 +12,7 @@ import { CatalogTagsCell } from '@redocly/theme/components/Catalog/CatalogTableV
|
|
|
12
12
|
import { CatalogTableViewRow } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableViewRow';
|
|
13
13
|
import { CatalogEntityTypeTag } from '@redocly/theme/components/Catalog/CatalogEntityTypeTag';
|
|
14
14
|
import { breakpoints } from '@redocly/theme/core';
|
|
15
|
+
import { CatalogLastUpdateCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogLastUpdateCell';
|
|
15
16
|
|
|
16
17
|
export type BaseEntity = {
|
|
17
18
|
id: string;
|
|
@@ -26,7 +27,7 @@ export type CatalogTableViewProps<T extends BaseEntity> = {
|
|
|
26
27
|
entitiesCatalogConfig?: EntitiesCatalogConfig;
|
|
27
28
|
catalogConfig: CatalogEntityConfig;
|
|
28
29
|
columns?: CatalogColumn<T>[];
|
|
29
|
-
currentSortOption?:
|
|
30
|
+
currentSortOption?: string | null;
|
|
30
31
|
onRowClick?: (entity: T) => void;
|
|
31
32
|
handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
|
|
32
33
|
isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
|
|
@@ -50,7 +51,7 @@ const baseColumns: CatalogColumn<BffCatalogEntity>[] = [
|
|
|
50
51
|
title: 'Entity',
|
|
51
52
|
render: (entity) => <CatalogEntityCell entity={entity} />,
|
|
52
53
|
width: '3fr',
|
|
53
|
-
minWidth: '
|
|
54
|
+
minWidth: '164px',
|
|
54
55
|
sortable: true,
|
|
55
56
|
sortKey: 'title',
|
|
56
57
|
},
|
|
@@ -59,7 +60,7 @@ const baseColumns: CatalogColumn<BffCatalogEntity>[] = [
|
|
|
59
60
|
title: 'Type',
|
|
60
61
|
render: (entity) => <CatalogEntityTypeTag entityType={entity.type} />,
|
|
61
62
|
width: '2fr',
|
|
62
|
-
minWidth: '
|
|
63
|
+
minWidth: '162px',
|
|
63
64
|
sortable: true,
|
|
64
65
|
sortKey: 'type',
|
|
65
66
|
},
|
|
@@ -70,7 +71,7 @@ const baseColumns: CatalogColumn<BffCatalogEntity>[] = [
|
|
|
70
71
|
<CatalogDomainsCell domains={entity.domains?.map((domain) => domain.title) || []} />
|
|
71
72
|
),
|
|
72
73
|
width: '2fr',
|
|
73
|
-
minWidth: '
|
|
74
|
+
minWidth: '162px',
|
|
74
75
|
},
|
|
75
76
|
{
|
|
76
77
|
key: 'owners',
|
|
@@ -79,14 +80,23 @@ const baseColumns: CatalogColumn<BffCatalogEntity>[] = [
|
|
|
79
80
|
<CatalogOwnersCell owners={entity.owners?.map((owner) => owner.title) || []} />
|
|
80
81
|
),
|
|
81
82
|
width: '2fr',
|
|
82
|
-
minWidth: '
|
|
83
|
+
minWidth: '162px',
|
|
83
84
|
},
|
|
84
85
|
{
|
|
85
86
|
key: 'tags',
|
|
86
87
|
title: 'Tags',
|
|
87
88
|
render: (entity) => <CatalogTagsCell entity={entity} />,
|
|
88
89
|
width: '2fr',
|
|
89
|
-
minWidth: '
|
|
90
|
+
minWidth: '160px',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
key: 'lastUpdate',
|
|
94
|
+
title: 'Last update',
|
|
95
|
+
render: (entity) => <CatalogLastUpdateCell lastModified={entity.updatedAt} />,
|
|
96
|
+
width: '1fr',
|
|
97
|
+
minWidth: '112px',
|
|
98
|
+
sortable: true,
|
|
99
|
+
sortKey: 'updated_at',
|
|
90
100
|
},
|
|
91
101
|
];
|
|
92
102
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
|
-
import {
|
|
4
|
+
import { CatalogTags } from '@redocly/theme/components/Catalog/CatalogTags';
|
|
5
5
|
|
|
6
6
|
export type CatalogTagsCellProps = {
|
|
7
7
|
entity: BffCatalogEntity;
|
|
@@ -10,7 +10,7 @@ export type CatalogTagsCellProps = {
|
|
|
10
10
|
export function CatalogTagsCell({ entity }: CatalogTagsCellProps) {
|
|
11
11
|
return (
|
|
12
12
|
<div data-component-name="Catalog/CatalogTableView/CatalogTagsCell">
|
|
13
|
-
<
|
|
13
|
+
<CatalogTags
|
|
14
14
|
data-testid="catalog-tags-cell"
|
|
15
15
|
items={entity.tags || []}
|
|
16
16
|
showPlaceholder={false}
|
|
@@ -18,6 +18,7 @@ export function CatalogTagsCell({ entity }: CatalogTagsCellProps) {
|
|
|
18
18
|
style: {
|
|
19
19
|
fontSize: 'var(--font-size-base)',
|
|
20
20
|
borderRadius: 'var(--border-radius)',
|
|
21
|
+
margin: 0,
|
|
21
22
|
},
|
|
22
23
|
borderless: true,
|
|
23
24
|
color: 'grey',
|
|
@@ -48,8 +48,8 @@ const EntityTitle = styled.div`
|
|
|
48
48
|
`;
|
|
49
49
|
|
|
50
50
|
export const Email = styled.div`
|
|
51
|
-
font-size: var(--catalog-
|
|
52
|
-
line-height: var(--catalog-
|
|
51
|
+
font-size: var(--catalog-user-entity-cell-email-font-size);
|
|
52
|
+
line-height: var(--catalog-user-entity-cell-email-line-height);
|
|
53
53
|
color: var(--color-blue-6);
|
|
54
54
|
white-space: nowrap;
|
|
55
55
|
overflow: hidden;
|