@redocly/theme 0.56.0-next.3 → 0.56.0-next.4
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/Catalog/CatalogCardView/CatalogCard.js +4 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +1 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +4 -11
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +7 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +4 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.js +7 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.js +19 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +2 -8
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +55 -0
- package/lib/components/Catalog/CatalogEntityIcon.d.ts +2 -1
- package/lib/components/Catalog/CatalogEntityIcon.js +22 -29
- package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +2 -1
- package/lib/components/Catalog/CatalogEntityTypeIcon.js +11 -23
- package/lib/components/Catalog/CatalogEntityTypeTag.d.ts +7 -0
- package/lib/components/Catalog/CatalogEntityTypeTag.js +36 -0
- package/lib/components/Catalog/CatalogPageDescription.js +2 -2
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +2 -14
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +1 -2
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +3 -30
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +0 -2
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +5 -30
- package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +1 -1
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +3 -3
- package/lib/components/Catalog/variables.js +34 -5
- package/lib/components/Menu/variables.js +2 -0
- package/lib/components/Tag/Tag.d.ts +2 -1
- package/lib/components/Tag/Tag.js +3 -3
- package/lib/components/Tag/variables.js +14 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/icons/MoleculesIcon/MoleculesIcon.d.ts +9 -0
- package/lib/icons/MoleculesIcon/MoleculesIcon.js +22 -0
- package/lib/icons/NetworkIcon/NetworkIcon.d.ts +9 -0
- package/lib/icons/NetworkIcon/NetworkIcon.js +23 -0
- package/lib/icons/NotesIcon/NotesIcon.d.ts +9 -0
- package/lib/icons/NotesIcon/NotesIcon.js +26 -0
- package/package.json +2 -2
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +6 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +7 -15
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +7 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +4 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +2 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +10 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +36 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +4 -22
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +52 -0
- package/src/components/Catalog/CatalogEntityIcon.tsx +33 -33
- package/src/components/Catalog/CatalogEntityTypeIcon.tsx +23 -28
- package/src/components/Catalog/CatalogEntityTypeTag.tsx +43 -0
- package/src/components/Catalog/CatalogPageDescription.tsx +4 -3
- package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +2 -16
- package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +4 -2
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +3 -35
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +5 -35
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +3 -4
- package/src/components/Catalog/variables.ts +34 -5
- package/src/components/Menu/variables.ts +2 -0
- package/src/components/Tag/Tag.tsx +11 -2
- package/src/components/Tag/variables.ts +14 -0
- package/src/core/types/l10n.ts +4 -0
- package/src/icons/MoleculesIcon/MoleculesIcon.tsx +23 -0
- package/src/icons/NetworkIcon/NetworkIcon.tsx +31 -0
- package/src/icons/NotesIcon/NotesIcon.tsx +43 -0
|
@@ -14,6 +14,7 @@ const ArrowUpRightIcon_1 = require("../../../icons/ArrowUpRightIcon/ArrowUpRight
|
|
|
14
14
|
const CatalogTagsWithTooltip_1 = require("../../../components/Catalog/CatalogTagsWithTooltip");
|
|
15
15
|
const CatalogEntityIcon_1 = require("../../../components/Catalog/CatalogEntityIcon");
|
|
16
16
|
const core_1 = require("../../../core");
|
|
17
|
+
const Tooltip_1 = require("../../../components/Tooltip/Tooltip");
|
|
17
18
|
function CatalogCard({ entity, catalogConfig }) {
|
|
18
19
|
var _a, _b, _c;
|
|
19
20
|
const { useTelemetry } = (0, hooks_1.useThemeHooks)();
|
|
@@ -25,8 +26,9 @@ function CatalogCard({ entity, catalogConfig }) {
|
|
|
25
26
|
} },
|
|
26
27
|
react_1.default.createElement(CardContent, null,
|
|
27
28
|
react_1.default.createElement(CardHeader, null,
|
|
28
|
-
react_1.default.createElement(
|
|
29
|
-
react_1.default.createElement(
|
|
29
|
+
react_1.default.createElement(Tooltip_1.TooltipComponent, { tip: entity.type, placement: "bottom", className: "catalog" },
|
|
30
|
+
react_1.default.createElement(HeaderIconWrapper, null,
|
|
31
|
+
react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entity.type, defaultColor: true }))),
|
|
30
32
|
react_1.default.createElement(CardTitle, null,
|
|
31
33
|
react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, entity.title))),
|
|
32
34
|
react_1.default.createElement(CardDescription, null,
|
|
@@ -6,7 +6,5 @@ export type CatalogEntityProps = {
|
|
|
6
6
|
entitiesCatalogConfig: EntitiesCatalogConfig;
|
|
7
7
|
catalogConfig: CatalogEntityConfig;
|
|
8
8
|
initialRelations: BffCatalogRelatedEntityList;
|
|
9
|
-
mainCatalogLabelTranslationKey?: string;
|
|
10
|
-
mainCatalogSlug?: string;
|
|
11
9
|
};
|
|
12
|
-
export declare function CatalogEntity({ entity, entitiesCatalogConfig, catalogConfig, initialRelations,
|
|
10
|
+
export declare function CatalogEntity({ entity, entitiesCatalogConfig, catalogConfig, initialRelations, }: CatalogEntityProps): React.JSX.Element;
|
|
@@ -18,8 +18,9 @@ const Menu_1 = require("../../../components/Menu/Menu");
|
|
|
18
18
|
const Button_1 = require("../../../components/Button/Button");
|
|
19
19
|
const CatalogEntityRelations_1 = require("../../../components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations");
|
|
20
20
|
const hooks_1 = require("../../../core/hooks");
|
|
21
|
-
const SidebarActions_1 = require("
|
|
22
|
-
|
|
21
|
+
const SidebarActions_1 = require("../../../components/SidebarActions/SidebarActions");
|
|
22
|
+
const CatalogEntitySchema_1 = require("../../../components/Catalog/CatalogEntity/CatalogEntitySchema");
|
|
23
|
+
function CatalogEntity({ entity, entitiesCatalogConfig, catalogConfig, initialRelations, }) {
|
|
23
24
|
var _a;
|
|
24
25
|
const { useTranslate, useCatalog } = (0, hooks_1.useThemeHooks)();
|
|
25
26
|
const { translate } = useTranslate();
|
|
@@ -38,14 +39,6 @@ function CatalogEntity({ entity, entitiesCatalogConfig, catalogConfig, initialRe
|
|
|
38
39
|
] }), footer: react_1.default.createElement(SidebarActions_1.SidebarActions, { layout: layout, collapsedSidebar: collapsedSidebar, isApiDocs: false, onChangeViewClick: onChangeViewClick, onChangeCollapseSidebarClick: onChangeCollapseSidebarClick }) }),
|
|
39
40
|
react_1.default.createElement(CatalogPageContent, null,
|
|
40
41
|
react_1.default.createElement(Breadcrumbs_1.Breadcrumbs, { additionalBreadcrumbs: [
|
|
41
|
-
...(mainCatalogLabelTranslationKey
|
|
42
|
-
? [
|
|
43
|
-
{
|
|
44
|
-
label: translate(mainCatalogLabelTranslationKey),
|
|
45
|
-
link: `catalogs/${mainCatalogSlug}`,
|
|
46
|
-
},
|
|
47
|
-
]
|
|
48
|
-
: []),
|
|
49
42
|
{ label: linkToMainCatalogLabel, link: linkToMainCatalog },
|
|
50
43
|
{ label: entity.title },
|
|
51
44
|
] }),
|
|
@@ -53,7 +46,7 @@ function CatalogEntity({ entity, entitiesCatalogConfig, catalogConfig, initialRe
|
|
|
53
46
|
react_1.default.createElement(CatalogPageDescription_1.CatalogPageDescription, { title: entity.title, description: (_a = entity.summary) !== null && _a !== void 0 ? _a : '', tag: entity.key }),
|
|
54
47
|
react_1.default.createElement(CatalogEntityProperties_1.CatalogEntityProperties, { entity: entity }),
|
|
55
48
|
react_1.default.createElement(CatalogTwoColumnsSection, null,
|
|
56
|
-
react_1.default.createElement(CatalogEntityMetadata_1.CatalogEntityMetadata, { entity: entity }),
|
|
49
|
+
entity.type === 'data-schema' ? (react_1.default.createElement(CatalogEntitySchema_1.CatalogEntitySchema, { entity: entity })) : (react_1.default.createElement(CatalogEntityMetadata_1.CatalogEntityMetadata, { entity: entity })),
|
|
57
50
|
react_1.default.createElement(CatalogEntityLinks_1.CatalogEntityLinks, { entity: entity })),
|
|
58
51
|
react_1.default.createElement(CatalogEntityRelations_1.CatalogEntityRelations, { entity: entity, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, initialRelations: initialRelations })))));
|
|
59
52
|
}
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js
CHANGED
|
@@ -14,12 +14,18 @@ const UserEmailProperty_1 = require("../../../../components/Catalog/CatalogEntit
|
|
|
14
14
|
const DomainsProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty");
|
|
15
15
|
const OwnersProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty");
|
|
16
16
|
const ContactProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty");
|
|
17
|
+
const FormatProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty");
|
|
17
18
|
const propertyRenderers = [
|
|
18
19
|
{
|
|
19
20
|
key: 'type',
|
|
20
21
|
condition: (entity) => !!entity.type,
|
|
21
22
|
component: EntityTypeProperty_1.EntityTypeProperty,
|
|
22
23
|
},
|
|
24
|
+
{
|
|
25
|
+
key: 'format',
|
|
26
|
+
condition: (entity) => { var _a; return entity.type === 'data-schema' && !!((_a = entity.metadata) === null || _a === void 0 ? void 0 : _a.specType); },
|
|
27
|
+
component: FormatProperty_1.FormatProperty,
|
|
28
|
+
},
|
|
23
29
|
{
|
|
24
30
|
key: 'contact',
|
|
25
31
|
condition: (entity) => { var _a, _b; return !!((_b = (_a = entity.contact) === null || _a === void 0 ? void 0 : _a.slack) === null || _b === void 0 ? void 0 : _b.channels); },
|
|
@@ -32,7 +38,7 @@ const propertyRenderers = [
|
|
|
32
38
|
},
|
|
33
39
|
{
|
|
34
40
|
key: 'tags',
|
|
35
|
-
condition: (entity) => !!entity.tags,
|
|
41
|
+
condition: (entity) => { var _a; return !!((_a = entity.tags) === null || _a === void 0 ? void 0 : _a.length); },
|
|
36
42
|
component: TagsProperty_1.TagsProperty,
|
|
37
43
|
},
|
|
38
44
|
{
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js
CHANGED
|
@@ -37,6 +37,7 @@ const CardHeader = styled_components_1.default.div `
|
|
|
37
37
|
display: flex;
|
|
38
38
|
align-items: center;
|
|
39
39
|
gap: var(--catalog-card-content-gap);
|
|
40
|
+
font-weight: var(--font-weight-medium);
|
|
40
41
|
`;
|
|
41
42
|
const CardContent = styled_components_1.default.div `
|
|
42
43
|
flex: 1;
|
|
@@ -44,5 +45,8 @@ const CardContent = styled_components_1.default.div `
|
|
|
44
45
|
align-items: center;
|
|
45
46
|
gap: var(--catalog-card-content-gap);
|
|
46
47
|
flex-wrap: wrap;
|
|
48
|
+
color: var(--text-color-primary);
|
|
49
|
+
font-size: var(--font-size-lg);
|
|
50
|
+
line-height: var(--line-height-lg);
|
|
47
51
|
`;
|
|
48
52
|
//# sourceMappingURL=CatalogEntityPropertyCard.js.map
|
|
@@ -6,14 +6,14 @@ 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
|
|
10
|
-
const CatalogEntityPropertyCard_1 = require("
|
|
9
|
+
const Tag_1 = require("../../../../components/Tag/Tag");
|
|
10
|
+
const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
|
|
11
11
|
function DomainsProperty({ entity }) {
|
|
12
12
|
const { domains = [] } = entity;
|
|
13
13
|
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty" },
|
|
14
14
|
react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
|
|
15
15
|
react_1.default.createElement(GraphIcon_1.GraphIcon, null),
|
|
16
|
-
"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(
|
|
16
|
+
"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)' } },
|
|
17
17
|
react_1.default.createElement(GraphIcon_1.GraphIcon, null), domain === null || domain === void 0 ? void 0 :
|
|
18
18
|
domain.title)))) })));
|
|
19
19
|
}
|
|
@@ -8,13 +8,18 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const EntityTypeIcon_1 = require("../../../../icons/EntityTypeIcon/EntityTypeIcon");
|
|
9
9
|
const utils_1 = require("../../../../core/utils");
|
|
10
10
|
const CatalogEntityTypeIcon_1 = require("../../../../components/Catalog/CatalogEntityTypeIcon");
|
|
11
|
-
const CatalogEntityPropertyCard_1 = require("
|
|
11
|
+
const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
|
|
12
|
+
const formatEntityType = (entityType) => {
|
|
13
|
+
return (0, utils_1.capitalize)(entityType.startsWith('api-')
|
|
14
|
+
? entityType.replace('api-', 'API-').replace(/-/g, ' ')
|
|
15
|
+
: entityType.replace(/-/g, ' '));
|
|
16
|
+
};
|
|
12
17
|
function EntityTypeProperty({ entity }) {
|
|
13
18
|
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty" },
|
|
14
19
|
react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
|
|
15
20
|
react_1.default.createElement(EntityTypeIcon_1.EntityTypeIcon, null),
|
|
16
21
|
"Entity type"), content: react_1.default.createElement(react_1.default.Fragment, null,
|
|
17
22
|
react_1.default.createElement(CatalogEntityTypeIcon_1.CatalogEntityTypeIcon, { entityType: entity.type }),
|
|
18
|
-
|
|
23
|
+
formatEntityType(entity.type)) })));
|
|
19
24
|
}
|
|
20
25
|
//# sourceMappingURL=EntityTypeProperty.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FormatProperty = FormatProperty;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const NotesIcon_1 = require("../../../../icons/NotesIcon/NotesIcon");
|
|
9
|
+
const Tag_1 = require("../../../../components/Tag/Tag");
|
|
10
|
+
const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
|
|
11
|
+
function FormatProperty({ entity }) {
|
|
12
|
+
var _a, _b;
|
|
13
|
+
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty" },
|
|
14
|
+
react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
|
|
15
|
+
react_1.default.createElement(NotesIcon_1.NotesIcon, null),
|
|
16
|
+
"Format"), content: react_1.default.createElement(react_1.default.Fragment, null,
|
|
17
|
+
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)) })));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=FormatProperty.js.map
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js
CHANGED
|
@@ -5,11 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CatalogEntityDefaultRelations = CatalogEntityDefaultRelations;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const CatalogTableView_1 = require("../../../../components/Catalog/CatalogTableView/CatalogTableView");
|
|
10
8
|
const CatalogEntityCell_1 = require("../../../../components/Catalog/CatalogTableView/CatalogEntityCell");
|
|
11
|
-
const Tag_1 = require("../../../../components/Tag/Tag");
|
|
12
9
|
const CatalogEntityRelationsTable_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable");
|
|
10
|
+
const CatalogEntityTypeTag_1 = require("../../../../components/Catalog/CatalogEntityTypeTag");
|
|
13
11
|
const CatalogEntityRelationCell_1 = require("../../../../components/Catalog/CatalogTableView/CatalogEntityRelationCell");
|
|
14
12
|
const columns = [
|
|
15
13
|
{
|
|
@@ -23,7 +21,7 @@ const columns = [
|
|
|
23
21
|
{
|
|
24
22
|
key: 'type',
|
|
25
23
|
title: 'Type',
|
|
26
|
-
render: (entity) =>
|
|
24
|
+
render: (entity) => react_1.default.createElement(CatalogEntityTypeTag_1.CatalogEntityTypeTag, { entityType: entity.type }),
|
|
27
25
|
sortable: true,
|
|
28
26
|
sortKey: 'type',
|
|
29
27
|
width: '1fr',
|
|
@@ -39,8 +37,4 @@ function CatalogEntityDefaultRelations({ entity, relations, query, searchQuery,
|
|
|
39
37
|
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations" },
|
|
40
38
|
react_1.default.createElement(CatalogEntityRelationsTable_1.CatalogEntityRelationsTable, { entity: entity, catalogConfig: catalogConfig, entitiesCatalogConfig: entitiesCatalogConfig, relations: relations, query: query, searchQuery: searchQuery, setSearchQuery: setSearchQuery, heading: "Related entities", columns: columns, sortOption: sortOption, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore })));
|
|
41
39
|
}
|
|
42
|
-
const EntityTypeTag = (0, styled_components_1.default)(Tag_1.Tag) `
|
|
43
|
-
font-size: var(--font-size-base);
|
|
44
|
-
background-color: transparent;
|
|
45
|
-
`;
|
|
46
40
|
//# sourceMappingURL=CatalogEntityDefaultRelations.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BffCatalogEntity } from '../../../core/types';
|
|
3
|
+
export type CatalogEntitySchemaProps = {
|
|
4
|
+
entity: BffCatalogEntity;
|
|
5
|
+
};
|
|
6
|
+
export declare function CatalogEntitySchema({ entity }: CatalogEntitySchemaProps): React.JSX.Element | null;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.CatalogEntitySchema = CatalogEntitySchema;
|
|
18
|
+
const react_1 = __importDefault(require("react"));
|
|
19
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
20
|
+
const hooks_1 = require("../../../core/hooks");
|
|
21
|
+
const JsonViewer_1 = require("../../../components/JsonViewer/JsonViewer");
|
|
22
|
+
function CatalogEntitySchema({ entity }) {
|
|
23
|
+
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
24
|
+
const { translate } = useTranslate();
|
|
25
|
+
const _a = entity.metadata || {}, { schema } = _a, metadataToShow = __rest(_a, ["schema"]);
|
|
26
|
+
const metadata = Object.entries(metadataToShow);
|
|
27
|
+
if (!metadata.length) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
let parsedSchema;
|
|
31
|
+
try {
|
|
32
|
+
parsedSchema = JSON.parse(schema);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
return (react_1.default.createElement(MetadataWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityMetadata" },
|
|
38
|
+
react_1.default.createElement(Heading, null, translate('catalog.entity.metadata.title')),
|
|
39
|
+
react_1.default.createElement(JsonViewer_1.JsonViewer, { data: parsedSchema, expandLevel: 3, title: "JSON" })));
|
|
40
|
+
}
|
|
41
|
+
const MetadataWrapper = styled_components_1.default.div `
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: var(--spacing-xs);
|
|
45
|
+
border-radius: var(--border-radius);
|
|
46
|
+
background-color: var(--catalog-metadata-bg-color);
|
|
47
|
+
transition: all 0.2s ease-in-out;
|
|
48
|
+
margin: var(--spacing-lg) 0;
|
|
49
|
+
`;
|
|
50
|
+
const Heading = styled_components_1.default.h2 `
|
|
51
|
+
margin-bottom: var(--spacing-base);
|
|
52
|
+
margin-top: 0;
|
|
53
|
+
font-size: var(--catalog-metadata-heading-size);
|
|
54
|
+
`;
|
|
55
|
+
//# sourceMappingURL=CatalogEntitySchema.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
export type CatalogEntityIconProps = {
|
|
3
3
|
entityType: string;
|
|
4
|
+
defaultColor?: boolean;
|
|
4
5
|
};
|
|
5
|
-
export declare function CatalogEntityIcon({ entityType }: CatalogEntityIconProps): JSX.Element;
|
|
6
|
+
export declare function CatalogEntityIcon({ entityType, defaultColor, }: CatalogEntityIconProps): JSX.Element;
|
|
@@ -9,36 +9,29 @@ const CodeIcon_1 = require("../../icons/CodeIcon/CodeIcon");
|
|
|
9
9
|
const GraphIcon_1 = require("../../icons/GraphIcon/GraphIcon");
|
|
10
10
|
const PeopleIcon_1 = require("../../icons/PeopleIcon/PeopleIcon");
|
|
11
11
|
const UserIcon_1 = require("../../icons/UserIcon/UserIcon");
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
const NetworkIcon_1 = require("../../icons/NetworkIcon/NetworkIcon");
|
|
13
|
+
const MoleculesIcon_1 = require("../../icons/MoleculesIcon/MoleculesIcon");
|
|
14
|
+
const getIconColor = (entityType) => `var(--catalog-entity-icon-color-${entityType})`;
|
|
15
|
+
const getEntityIcon = ({ entityType, defaultColor }) => {
|
|
16
|
+
const iconColor = defaultColor
|
|
17
|
+
? `var(--catalog-entity-icon-color)`
|
|
18
|
+
: getIconColor(entityType);
|
|
19
|
+
const entityIconMap = {
|
|
20
|
+
service: react_1.default.createElement(CodeIcon_1.CodeIcon, { color: iconColor }),
|
|
21
|
+
domain: react_1.default.createElement(GraphIcon_1.GraphIcon, { color: iconColor }),
|
|
22
|
+
team: react_1.default.createElement(PeopleIcon_1.PeopleIcon, { color: iconColor }),
|
|
23
|
+
user: react_1.default.createElement(UserIcon_1.UserIcon, { color: iconColor }),
|
|
24
|
+
'api-description': react_1.default.createElement(CodeIcon_1.CodeIcon, { color: iconColor }),
|
|
25
|
+
'data-schema': react_1.default.createElement(NetworkIcon_1.NetworkIcon, { color: iconColor }),
|
|
26
|
+
'api-operation': react_1.default.createElement(MoleculesIcon_1.MoleculesIcon, { color: iconColor }),
|
|
27
|
+
};
|
|
28
|
+
return entityIconMap[entityType];
|
|
21
29
|
};
|
|
22
|
-
function CatalogEntityIcon({ entityType }) {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return entityIconMap.service;
|
|
27
|
-
case 'domain':
|
|
28
|
-
return entityIconMap.domain;
|
|
29
|
-
case 'team':
|
|
30
|
-
return entityIconMap.team;
|
|
31
|
-
case 'user':
|
|
32
|
-
return entityIconMap.user;
|
|
33
|
-
case 'api-description':
|
|
34
|
-
return entityIconMap['api-description'];
|
|
35
|
-
case 'data-schema':
|
|
36
|
-
return entityIconMap.service;
|
|
37
|
-
case 'api-operation':
|
|
38
|
-
return entityIconMap.service;
|
|
39
|
-
default:
|
|
40
|
-
const exhaustiveCheck = key;
|
|
41
|
-
throw new Error(`Unhandled entity type: ${exhaustiveCheck}`);
|
|
30
|
+
function CatalogEntityIcon({ entityType, defaultColor = false, }) {
|
|
31
|
+
const icon = getEntityIcon({ entityType, defaultColor });
|
|
32
|
+
if (!icon) {
|
|
33
|
+
throw new Error(`Unhandled entity type: ${entityType}`);
|
|
42
34
|
}
|
|
35
|
+
return icon;
|
|
43
36
|
}
|
|
44
37
|
//# sourceMappingURL=CatalogEntityIcon.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type CatalogEntityTypeIconProps = {
|
|
3
3
|
entityType: string;
|
|
4
|
+
defaultColor?: boolean;
|
|
4
5
|
};
|
|
5
|
-
export declare function CatalogEntityTypeIcon({ entityType }: CatalogEntityTypeIconProps): React.JSX.Element;
|
|
6
|
+
export declare function CatalogEntityTypeIcon({ entityType, defaultColor, }: CatalogEntityTypeIconProps): React.JSX.Element;
|
|
@@ -6,27 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.CatalogEntityTypeIcon = CatalogEntityTypeIcon;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const getEntityIcon = (entityType) => {
|
|
14
|
-
const iconColor = 'var(--catalog-entity-icon-color)';
|
|
15
|
-
switch (entityType.toLowerCase()) {
|
|
16
|
-
case 'service':
|
|
17
|
-
return react_1.default.createElement(CodeIcon_1.CodeIcon, { color: iconColor });
|
|
18
|
-
case 'domain':
|
|
19
|
-
return react_1.default.createElement(GraphIcon_1.GraphIcon, { color: iconColor });
|
|
20
|
-
case 'team':
|
|
21
|
-
return react_1.default.createElement(PeopleIcon_1.PeopleIcon, { color: iconColor });
|
|
22
|
-
case 'user':
|
|
23
|
-
return react_1.default.createElement(UserIcon_1.UserIcon, { color: iconColor });
|
|
24
|
-
default:
|
|
25
|
-
return react_1.default.createElement(CodeIcon_1.CodeIcon, { color: iconColor });
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
function CatalogEntityTypeIcon({ entityType }) {
|
|
29
|
-
return (react_1.default.createElement(IconContainer, { "data-component-name": "Catalog/CatalogEntityTypeIcon" }, getEntityIcon(entityType)));
|
|
9
|
+
const CatalogEntityIcon_1 = require("../../components/Catalog/CatalogEntityIcon");
|
|
10
|
+
function CatalogEntityTypeIcon({ entityType, defaultColor = false, }) {
|
|
11
|
+
return (react_1.default.createElement(IconContainer, { "data-component-name": "Catalog/CatalogEntityTypeIcon", entityType: entityType, defaultColor: defaultColor },
|
|
12
|
+
react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entityType, defaultColor: defaultColor })));
|
|
30
13
|
}
|
|
31
14
|
const IconContainer = styled_components_1.default.div `
|
|
32
15
|
display: flex;
|
|
@@ -35,8 +18,13 @@ const IconContainer = styled_components_1.default.div `
|
|
|
35
18
|
width: var(--catalog-table-icon-width);
|
|
36
19
|
height: var(--catalog-table-icon-height);
|
|
37
20
|
border-radius: var(--catalog-table-icon-border-radius);
|
|
38
|
-
background-color:
|
|
21
|
+
background-color: ${({ defaultColor, entityType }) => defaultColor
|
|
22
|
+
? 'var(--catalog-entity-bg-color)'
|
|
23
|
+
: `var(--catalog-entity-bg-color-${entityType})`};
|
|
39
24
|
flex-shrink: 0;
|
|
40
|
-
border:
|
|
25
|
+
border: 1px solid
|
|
26
|
+
${({ defaultColor, entityType }) => defaultColor
|
|
27
|
+
? 'var(--catalog-entity-border-color)'
|
|
28
|
+
: `var(--catalog-entity-border-color-${entityType})`};
|
|
41
29
|
`;
|
|
42
30
|
//# sourceMappingURL=CatalogEntityTypeIcon.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { EntityType } from '../../core/types';
|
|
3
|
+
export type CatalogEntityTypeTagProps = {
|
|
4
|
+
entityType: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const getEntityTagColor: (type: EntityType) => string;
|
|
7
|
+
export declare function CatalogEntityTypeTag({ entityType }: CatalogEntityTypeTagProps): JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getEntityTagColor = void 0;
|
|
7
|
+
exports.CatalogEntityTypeTag = CatalogEntityTypeTag;
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
10
|
+
const Tag_1 = require("../../components/Tag/Tag");
|
|
11
|
+
const entityTagColorMap = {
|
|
12
|
+
service: 'blue',
|
|
13
|
+
domain: 'grass',
|
|
14
|
+
team: 'purple',
|
|
15
|
+
user: 'yellow',
|
|
16
|
+
'api-description': 'sky',
|
|
17
|
+
'data-schema': 'carrot',
|
|
18
|
+
'api-operation': 'raspberry',
|
|
19
|
+
};
|
|
20
|
+
const getEntityTagColor = (type) => {
|
|
21
|
+
const color = entityTagColorMap[type];
|
|
22
|
+
if (!color) {
|
|
23
|
+
throw new Error(`Unhandled entity type: ${type}`);
|
|
24
|
+
}
|
|
25
|
+
return color;
|
|
26
|
+
};
|
|
27
|
+
exports.getEntityTagColor = getEntityTagColor;
|
|
28
|
+
function CatalogEntityTypeTag({ entityType }) {
|
|
29
|
+
return (react_1.default.createElement(EntityTypeTagWrapper, { color: (0, exports.getEntityTagColor)(entityType) }, entityType));
|
|
30
|
+
}
|
|
31
|
+
const EntityTypeTagWrapper = (0, styled_components_1.default)(Tag_1.Tag) `
|
|
32
|
+
font-size: var(--font-size-base);
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
text-transform: lowercase;
|
|
35
|
+
`;
|
|
36
|
+
//# sourceMappingURL=CatalogEntityTypeTag.js.map
|
|
@@ -8,12 +8,12 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
9
|
const utils_1 = require("../../core/utils");
|
|
10
10
|
const H3_1 = require("../../components/Typography/H3");
|
|
11
|
-
const
|
|
11
|
+
const Tag_1 = require("../../components/Tag/Tag");
|
|
12
12
|
function CatalogPageDescription({ title, titleTranslationKey, description, descriptionTranslationKey, tag, }) {
|
|
13
13
|
return (react_1.default.createElement(CatalogPageDescriptionWrapper, null,
|
|
14
14
|
react_1.default.createElement(CatalogTitleWrapper, null,
|
|
15
15
|
react_1.default.createElement(CatalogTitle, { "data-translation-key": titleTranslationKey }, title),
|
|
16
|
-
react_1.default.createElement(
|
|
16
|
+
react_1.default.createElement(Tag_1.Tag, { borderless: true, textTransform: "none" }, tag)),
|
|
17
17
|
react_1.default.createElement(CatalogDescription, { "data-translation-key": descriptionTranslationKey }, description)));
|
|
18
18
|
}
|
|
19
19
|
const CatalogPageDescriptionWrapper = styled_components_1.default.div `
|
|
@@ -7,11 +7,10 @@ exports.CatalogEntityCell = CatalogEntityCell;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
9
|
const CatalogHighlight_1 = require("../../../components/Catalog/CatalogHighlight");
|
|
10
|
-
const
|
|
10
|
+
const CatalogEntityTypeIcon_1 = require("../../../components/Catalog/CatalogEntityTypeIcon");
|
|
11
11
|
function CatalogEntityCell({ entity }) {
|
|
12
12
|
return (react_1.default.createElement(EntityTitleCellWrapper, { "data-component-name": "Catalog/CatalogTableView/CatalogEntityCell" },
|
|
13
|
-
react_1.default.createElement(
|
|
14
|
-
react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entity.type })),
|
|
13
|
+
react_1.default.createElement(CatalogEntityTypeIcon_1.CatalogEntityTypeIcon, { entityType: entity.type, defaultColor: true }),
|
|
15
14
|
react_1.default.createElement(EntityTitleContent, null,
|
|
16
15
|
react_1.default.createElement(EntityTitle, null,
|
|
17
16
|
react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, entity.title)),
|
|
@@ -24,17 +23,6 @@ const EntityTitleCellWrapper = styled_components_1.default.div `
|
|
|
24
23
|
gap: var(--catalog-table-title-cell-gap);
|
|
25
24
|
max-width: 100%;
|
|
26
25
|
`;
|
|
27
|
-
const IconContainer = styled_components_1.default.div `
|
|
28
|
-
display: flex;
|
|
29
|
-
align-items: center;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
width: var(--catalog-table-icon-width);
|
|
32
|
-
height: var(--catalog-table-icon-height);
|
|
33
|
-
border-radius: var(--catalog-table-icon-border-radius);
|
|
34
|
-
background-color: var(--catalog-table-icon-bg-color);
|
|
35
|
-
flex-shrink: 0;
|
|
36
|
-
border: var(--catalog-table-icon-border-width) solid var(--catalog-table-icon-border-color);
|
|
37
|
-
`;
|
|
38
26
|
const EntityTitleContent = styled_components_1.default.div `
|
|
39
27
|
display: flex;
|
|
40
28
|
flex-direction: column;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SortOption } from '../../../core/types';
|
|
3
|
-
import { BaseEntity, CatalogColumn } from '
|
|
3
|
+
import { BaseEntity, CatalogColumn } from '../../../components/Catalog/CatalogTableView/CatalogTableView';
|
|
4
4
|
export type CatalogTableHeaderCellProps<T extends BaseEntity> = {
|
|
5
5
|
column: CatalogColumn<T>;
|
|
6
6
|
setSortOption: (sortOption: SortOption | null) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
3
|
-
import {
|
|
3
|
+
import { SortOption } from '../../../core/types';
|
|
4
4
|
export type BaseEntity = {
|
|
5
5
|
id: string;
|
|
6
6
|
key: string;
|
|
@@ -27,5 +27,4 @@ export type CatalogColumn<T> = {
|
|
|
27
27
|
sortable?: boolean;
|
|
28
28
|
sortKey?: string;
|
|
29
29
|
};
|
|
30
|
-
export declare const getEntityTagColor: (type: EntityType) => string;
|
|
31
30
|
export declare const CatalogTableView: <T extends BaseEntity>({ entities, entitiesCatalogConfig, catalogConfig, columns, setSortOption, currentSortOption, handleSortClick, isColumnSorted, }: CatalogTableViewProps<T>) => React.JSX.Element;
|
|
@@ -3,38 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CatalogTableView =
|
|
6
|
+
exports.CatalogTableView = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
-
const Tag_1 = require("../../../components/Tag/Tag");
|
|
10
9
|
const CatalogOwnersCell_1 = require("../../../components/Catalog/CatalogTableView/CatalogOwnersCell");
|
|
11
10
|
const CatalogDomainsCell_1 = require("../../../components/Catalog/CatalogTableView/CatalogDomainsCell");
|
|
12
11
|
const CatalogEntityCell_1 = require("../../../components/Catalog/CatalogTableView/CatalogEntityCell");
|
|
13
12
|
const CatalogTableHeaderCell_1 = require("../../../components/Catalog/CatalogTableView/CatalogTableHeaderCell");
|
|
14
13
|
const CatalogTagsCell_1 = require("../../../components/Catalog/CatalogTableView/CatalogTagsCell");
|
|
15
14
|
const CatalogTableViewRow_1 = require("../../../components/Catalog/CatalogTableView/CatalogTableViewRow");
|
|
16
|
-
const
|
|
17
|
-
switch (type) {
|
|
18
|
-
case 'service':
|
|
19
|
-
return 'blue';
|
|
20
|
-
case 'domain':
|
|
21
|
-
return 'grass';
|
|
22
|
-
case 'team':
|
|
23
|
-
return 'purple';
|
|
24
|
-
case 'user':
|
|
25
|
-
return 'yellow';
|
|
26
|
-
case 'api-description':
|
|
27
|
-
return 'sky';
|
|
28
|
-
case 'data-schema':
|
|
29
|
-
return 'sky';
|
|
30
|
-
case 'api-operation':
|
|
31
|
-
return 'sky';
|
|
32
|
-
default:
|
|
33
|
-
const exhaustiveCheck = type;
|
|
34
|
-
throw new Error(`Unhandled entity type: ${exhaustiveCheck}`);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
exports.getEntityTagColor = getEntityTagColor;
|
|
15
|
+
const CatalogEntityTypeTag_1 = require("../../../components/Catalog/CatalogEntityTypeTag");
|
|
38
16
|
const baseColumns = [
|
|
39
17
|
{
|
|
40
18
|
key: 'entity',
|
|
@@ -48,7 +26,7 @@ const baseColumns = [
|
|
|
48
26
|
{
|
|
49
27
|
key: 'type',
|
|
50
28
|
title: 'Type',
|
|
51
|
-
render: (entity) =>
|
|
29
|
+
render: (entity) => react_1.default.createElement(CatalogEntityTypeTag_1.CatalogEntityTypeTag, { entityType: entity.type }),
|
|
52
30
|
width: '2fr',
|
|
53
31
|
minWidth: '120px',
|
|
54
32
|
sortable: true,
|
|
@@ -88,11 +66,6 @@ const CatalogTableView = ({ entities, entitiesCatalogConfig, catalogConfig, colu
|
|
|
88
66
|
react_1.default.createElement("div", null, entities.map((entity) => (react_1.default.createElement(CatalogTableViewRow_1.CatalogTableViewRow, { key: entity.id, entity: entity, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, columns: columns }))))));
|
|
89
67
|
};
|
|
90
68
|
exports.CatalogTableView = CatalogTableView;
|
|
91
|
-
const EntityTypeTag = (0, styled_components_1.default)(Tag_1.Tag) `
|
|
92
|
-
font-size: var(--font-size-base);
|
|
93
|
-
background-color: transparent;
|
|
94
|
-
text-transform: lowercase;
|
|
95
|
-
`;
|
|
96
69
|
const CatalogTableWrapper = styled_components_1.default.div `
|
|
97
70
|
width: 100%;
|
|
98
71
|
border-bottom: 1px solid var(--catalog-table-border-color);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
3
|
-
import { EntityType } from '../../../core/types';
|
|
4
3
|
export type BaseEntity = {
|
|
5
4
|
id: string;
|
|
6
5
|
key: string;
|
|
@@ -23,5 +22,4 @@ export type CatalogColumn<T> = {
|
|
|
23
22
|
sortable?: boolean;
|
|
24
23
|
sortKey?: string;
|
|
25
24
|
};
|
|
26
|
-
export declare const getEntityTagColor: (type: EntityType) => string;
|
|
27
25
|
export declare const CatalogTableViewRow: <T extends BaseEntity>({ entity, entitiesCatalogConfig, catalogConfig, columns, }: CatalogTableViewRowProps<T>) => React.JSX.Element;
|