@redocly/theme 0.63.0-next.5 → 0.63.0-next.6
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/Accordion/variables.js +2 -2
- package/lib/components/Catalog/Catalog.js +114 -50
- package/lib/components/Catalog/CatalogAvatar.d.ts +5 -0
- package/lib/components/Catalog/CatalogAvatar.js +92 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +26 -7
- package/lib/components/Catalog/CatalogCardView/CatalogCardView.js +10 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +17 -17
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.js +4 -20
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.d.ts +7 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.js +53 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.js +3 -17
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.js +30 -9
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +16 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js +8 -4
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +11 -5
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.js +7 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.d.ts +4 -2
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.js +25 -8
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.d.ts +7 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.js +24 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.d.ts +6 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.js +26 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.d.ts +7 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.js +30 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.d.ts +13 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.js +30 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.d.ts +11 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.js +21 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.d.ts +7 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.js +25 -0
- package/lib/components/Catalog/CatalogPageDescription.js +0 -6
- package/lib/components/Catalog/CatalogSelector.d.ts +0 -1
- package/lib/components/Catalog/CatalogSelector.js +50 -16
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +2 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +20 -5
- package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +2 -23
- package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +2 -1
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +14 -6
- package/lib/components/Catalog/variables.js +78 -36
- package/lib/components/Filter/variables.js +1 -1
- package/lib/components/LoadMore/LoadMore.js +1 -0
- package/lib/components/PageActions/PageActions.js +1 -2
- package/lib/components/UserMenu/UserMenu.js +1 -3
- package/lib/core/hooks/index.d.ts +1 -0
- package/lib/core/hooks/index.js +1 -0
- package/lib/core/hooks/use-is-truncated.d.ts +1 -0
- package/lib/core/hooks/use-is-truncated.js +19 -0
- package/lib/core/hooks/use-tabs.d.ts +1 -1
- package/lib/core/hooks/use-tabs.js +30 -17
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/utils/custom-catalog-options-casing.d.ts +15 -0
- package/lib/core/utils/custom-catalog-options-casing.js +32 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/markdoc/components/MarkdocExample/MarkdocExample.js +2 -2
- package/lib/markdoc/components/Tabs/Tabs.d.ts +1 -2
- package/lib/markdoc/components/Tabs/Tabs.js +9 -22
- package/package.json +4 -4
- package/src/components/Accordion/variables.ts +2 -2
- package/src/components/Catalog/Catalog.tsx +157 -95
- package/src/components/Catalog/CatalogAvatar.tsx +68 -0
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +29 -5
- package/src/components/Catalog/CatalogCardView/CatalogCardView.tsx +10 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +17 -17
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.tsx +4 -21
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.tsx +82 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.tsx +4 -22
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.tsx +39 -10
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +19 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx +8 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +12 -10
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +5 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +1 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +6 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +10 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -1
- package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +1 -1
- package/src/components/Catalog/CatalogFilter/CatalogFilterContent.tsx +30 -6
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.tsx +31 -0
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.tsx +34 -0
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.tsx +40 -0
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.tsx +54 -0
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.tsx +34 -0
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.tsx +39 -0
- package/src/components/Catalog/CatalogPageDescription.tsx +0 -6
- package/src/components/Catalog/CatalogSelector.tsx +23 -21
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +37 -6
- package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +2 -26
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +24 -9
- package/src/components/Catalog/variables.ts +78 -36
- package/src/components/Filter/variables.ts +1 -1
- package/src/components/LoadMore/LoadMore.tsx +1 -0
- package/src/components/PageActions/PageActions.tsx +1 -2
- package/src/components/UserMenu/UserMenu.tsx +1 -3
- package/src/core/hooks/code-walkthrough/use-code-walkthrough.ts +1 -1
- package/src/core/hooks/index.ts +1 -0
- package/src/core/hooks/use-is-truncated.ts +20 -0
- package/src/core/hooks/use-tabs.ts +40 -21
- package/src/core/types/l10n.ts +2 -0
- package/src/core/utils/custom-catalog-options-casing.ts +29 -0
- package/src/core/utils/index.ts +1 -0
- package/src/markdoc/components/MarkdocExample/MarkdocExample.tsx +2 -6
- package/src/markdoc/components/Tabs/Tabs.tsx +4 -37
|
@@ -30,7 +30,7 @@ exports.accordion = (0, styled_components_1.css) `
|
|
|
30
30
|
--accordion-header-font-size: var(--font-size-base); // @presenter FontSize
|
|
31
31
|
--accordion-header-font-weight: var(--font-weight-medium, 500); // @presenter FontWeight
|
|
32
32
|
--accordion-header-text-color: var(--text-color-primary);
|
|
33
|
-
--accordion-header-padding: var(--spacing-sm) var(--spacing-base);
|
|
33
|
+
--accordion-header-padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-xs) var(--spacing-base);
|
|
34
34
|
--accordion-header-line-height: var(--line-height-base); // @presenter LineHeight
|
|
35
35
|
--accordion-header-bg-color: transparent; // @presenter Color
|
|
36
36
|
--accordion-header-border: none; // @presenter Border
|
|
@@ -43,7 +43,7 @@ exports.accordion = (0, styled_components_1.css) `
|
|
|
43
43
|
--accordion-body-font-size: var(--font-size-base); // @presenter FontSize
|
|
44
44
|
--accordion-body-font-weight: var(--font-weight-regular); // @presenter FontWeight
|
|
45
45
|
--accordion-body-text-color: var(--text-color-secondary);
|
|
46
|
-
--accordion-body-padding: 0 var(--spacing-
|
|
46
|
+
--accordion-body-padding: 0 var(--spacing-sm) var(--spacing-sm) var(--spacing-base);
|
|
47
47
|
--accordion-body-bg-color: transparent; // @presenter Color
|
|
48
48
|
--accordion-body-border: none; // @presenter Border
|
|
49
49
|
|
|
@@ -1,10 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
39
|
exports.Catalog = Catalog;
|
|
7
|
-
const react_1 =
|
|
40
|
+
const react_1 = __importStar(require("react"));
|
|
8
41
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
42
|
const utils_1 = require("../../core/utils");
|
|
10
43
|
const hooks_1 = require("../../core/hooks");
|
|
@@ -18,20 +51,22 @@ const FilterInput_1 = require("../../components/Filter/FilterInput");
|
|
|
18
51
|
const CatalogViewModeToggle_1 = require("../../components/Catalog/CatalogViewModeToggle");
|
|
19
52
|
const CatalogSortButton_1 = require("../../components/Catalog/CatalogSortButton");
|
|
20
53
|
const CatalogEntities_1 = require("../../components/Catalog/CatalogEntities");
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
54
|
+
const CatalogMobileTopBar_1 = require("../../components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar");
|
|
55
|
+
const CatalogMobileFiltersPanelOverlay_1 = require("../../components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay");
|
|
56
|
+
function getActiveFiltersCount(filters, filterTerm) {
|
|
57
|
+
const filterOptionsCount = filters.reduce((sum, filter) => {
|
|
58
|
+
if (filter.selectedOptions instanceof Set)
|
|
59
|
+
return sum + filter.selectedOptions.size;
|
|
60
|
+
if ((0, utils_1.isFromToSelectedOptions)(filter.selectedOptions) &&
|
|
61
|
+
filter.selectedOptions.from &&
|
|
62
|
+
filter.selectedOptions.to) {
|
|
63
|
+
return sum + 1;
|
|
30
64
|
}
|
|
31
|
-
return
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
|
|
65
|
+
return sum;
|
|
66
|
+
}, 0);
|
|
67
|
+
const searchTermCount = filterTerm.trim() ? 1 : 0;
|
|
68
|
+
return searchTermCount + filterOptionsCount;
|
|
69
|
+
}
|
|
35
70
|
function Catalog(props) {
|
|
36
71
|
const { catalogConfig, filters: serverFilters, entitiesTypes, initialEntitiesList, catalogSwitcherItems, initialViewMode, } = props;
|
|
37
72
|
const { useTranslate, useCatalog } = (0, hooks_1.useThemeHooks)();
|
|
@@ -42,35 +77,46 @@ function Catalog(props) {
|
|
|
42
77
|
serverFilters,
|
|
43
78
|
initialViewMode,
|
|
44
79
|
});
|
|
80
|
+
const [mobileFiltersPanelOpen, setMobileFiltersPanelOpen] = (0, react_1.useState)(false);
|
|
81
|
+
const activeFiltersCount = (0, react_1.useMemo)(() => getActiveFiltersCount(filters, searchQuery), [filters, searchQuery]);
|
|
82
|
+
const filterContent = (react_1.default.createElement(CatalogFilterContent_1.CatalogFilterContent, { catalogSelector: react_1.default.createElement(CatalogSelector_1.CatalogSelector, { catalogSwitcherItems: catalogSwitcherItems, onChange: () => {
|
|
83
|
+
setSearchQuery('');
|
|
84
|
+
setSortOption(null);
|
|
85
|
+
} }), filters: filters, filterTerm: searchQuery, filterValuesCasing: utils_1.customCatalogOptionsCasing, onClear: () => {
|
|
86
|
+
setSearchQuery('');
|
|
87
|
+
}, searchInput: react_1.default.createElement(FilterInput_1.FilterInput, { value: searchQuery, onChange: (updatedTerm) => setSearchQuery(updatedTerm), dataTestId: "catalog-filter-search-input" }) }));
|
|
45
88
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
46
89
|
react_1.default.createElement(CatalogPageWrapper, { "data-component-name": "Catalog/Catalog" },
|
|
47
|
-
react_1.default.createElement(FiltersSidebar, { collapsed: collapsedSidebar,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
react_1.default.createElement(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
react_1.default.createElement(
|
|
68
|
-
react_1.default.createElement(CatalogViewModeToggle_1.CatalogViewModeToggle, { viewMode: viewMode, onViewModeChange: setViewMode }))),
|
|
69
|
-
react_1.default.createElement(CatalogEntities_1.CatalogEntities, { catalogConfig: catalogConfig, excludedEntities: catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.excludes, filterQuery: filterQuery, entitiesTypes: entitiesTypes, sortOption: sortOption, searchQuery: searchQuery, viewMode: viewMode, setEntitiesCounter: setEntitiesCounter, initialEntitiesList: initialEntitiesList, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted })))));
|
|
90
|
+
react_1.default.createElement(FiltersSidebar, { collapsed: collapsedSidebar, menu: filterContent, footer: react_1.default.createElement(SidebarActions_1.SidebarActions, { layout: layout, collapsedSidebar: collapsedSidebar, isApiDocs: false, onChangeViewClick: onChangeViewClick, onChangeCollapseSidebarClick: onChangeCollapseSidebarClick }) }),
|
|
91
|
+
react_1.default.createElement(CatalogContentWrapper, null,
|
|
92
|
+
react_1.default.createElement(CatalogMobileTopBar_1.CatalogMobileTopBar, { setMobileFiltersPanelOpen: setMobileFiltersPanelOpen, activeFiltersCount: activeFiltersCount, setSortOption: setSortOption, sortOption: sortOption, viewMode: viewMode, setViewMode: setViewMode }),
|
|
93
|
+
mobileFiltersPanelOpen ? (react_1.default.createElement(CatalogMobileFiltersPanelOverlay_1.CatalogMobileFiltersPanelOverlay, { setMobileFiltersPanelOpen: setMobileFiltersPanelOpen, filterContent: filterContent })) : null,
|
|
94
|
+
react_1.default.createElement(CatalogContentScrollWrapper, null,
|
|
95
|
+
react_1.default.createElement(CatalogPageContentWrapper, null,
|
|
96
|
+
react_1.default.createElement(CatalogTitleWrapper, null,
|
|
97
|
+
react_1.default.createElement(CatalogTitle, { "data-translation-key": catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.titleTranslationKey },
|
|
98
|
+
(catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.titleTranslationKey)
|
|
99
|
+
? translate(catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.titleTranslationKey)
|
|
100
|
+
: catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.slug,
|
|
101
|
+
' '),
|
|
102
|
+
react_1.default.createElement(CounterTag_1.CounterTag, { borderless: true }, entitiesCounter)),
|
|
103
|
+
react_1.default.createElement(CatalogDescription, { "data-translation-key": catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.descriptionTranslationKey }, translate(catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.descriptionTranslationKey)),
|
|
104
|
+
react_1.default.createElement(CatalogActionsRow, null,
|
|
105
|
+
react_1.default.createElement(CatalogSearchInputWrapper, null,
|
|
106
|
+
react_1.default.createElement(FilterInput_1.FilterInput, { value: searchQuery, onChange: (updatedTerm) => setSearchQuery(updatedTerm), dataTestId: "catalog-search-input" })),
|
|
107
|
+
react_1.default.createElement(CatalogControlsWrapper, null,
|
|
108
|
+
react_1.default.createElement(CatalogSortButton_1.CatalogSortButton, { onSortChange: setSortOption, currentSort: sortOption }),
|
|
109
|
+
react_1.default.createElement(CatalogViewModeToggle_1.CatalogViewModeToggle, { viewMode: viewMode, onViewModeChange: setViewMode }))),
|
|
110
|
+
react_1.default.createElement(CatalogEntities_1.CatalogEntities, { catalogConfig: catalogConfig, excludedEntities: catalogConfig === null || catalogConfig === void 0 ? void 0 : catalogConfig.excludes, filterQuery: filterQuery, entitiesTypes: entitiesTypes, sortOption: sortOption, searchQuery: searchQuery, viewMode: viewMode, setEntitiesCounter: setEntitiesCounter, initialEntitiesList: initialEntitiesList, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted })))))));
|
|
70
111
|
}
|
|
71
112
|
const CatalogActionsRow = styled_components_1.default.div `
|
|
72
113
|
display: flex;
|
|
73
114
|
align-items: center;
|
|
115
|
+
margin-bottom: var(--spacing-xl);
|
|
116
|
+
|
|
117
|
+
@media screen and (max-width: ${utils_1.breakpoints.medium}) {
|
|
118
|
+
display: none;
|
|
119
|
+
}
|
|
74
120
|
`;
|
|
75
121
|
const CatalogControlsWrapper = styled_components_1.default.div `
|
|
76
122
|
display: var(--catalog-controls-wrapper-display);
|
|
@@ -78,14 +124,28 @@ const CatalogControlsWrapper = styled_components_1.default.div `
|
|
|
78
124
|
margin-left: var(--catalog-controls-wrapper-margin-left);
|
|
79
125
|
gap: var(--catalog-controls-wrapper-gap);
|
|
80
126
|
`;
|
|
81
|
-
const
|
|
127
|
+
const CatalogContentWrapper = styled_components_1.default.div `
|
|
128
|
+
flex: 1;
|
|
129
|
+
min-width: 0;
|
|
130
|
+
min-height: 0;
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
overflow: hidden;
|
|
134
|
+
`;
|
|
135
|
+
const CatalogContentScrollWrapper = styled_components_1.default.div `
|
|
82
136
|
flex: 1;
|
|
83
|
-
|
|
84
|
-
|
|
137
|
+
min-height: 0;
|
|
138
|
+
overflow-y: auto;
|
|
139
|
+
overflow-x: hidden;
|
|
140
|
+
`;
|
|
141
|
+
const CatalogPageContentWrapper = styled_components_1.default.main `
|
|
142
|
+
width: var(--catalog-page-content-width);
|
|
143
|
+
margin: var(--catalog-page-content-margin);
|
|
144
|
+
padding: var(--catalog-page-padding);
|
|
145
|
+
max-width: 1072px;
|
|
85
146
|
|
|
86
|
-
@media screen and (
|
|
87
|
-
|
|
88
|
-
padding: var(--catalog-page-padding);
|
|
147
|
+
@media screen and (max-width: ${utils_1.breakpoints.small}) {
|
|
148
|
+
padding: var(--catalog-page-padding-mobile);
|
|
89
149
|
}
|
|
90
150
|
`;
|
|
91
151
|
const CatalogTitleWrapper = styled_components_1.default.div `
|
|
@@ -112,8 +172,10 @@ const CatalogDescription = styled_components_1.default.p `
|
|
|
112
172
|
const CatalogPageWrapper = styled_components_1.default.div `
|
|
113
173
|
--sidebar-width: var(--catalog-sidebar-width);
|
|
114
174
|
|
|
175
|
+
height: calc(100vh - var(--navbar-height) - var(--banner-height));
|
|
115
176
|
display: flex;
|
|
116
177
|
flex-direction: column;
|
|
178
|
+
overflow: hidden;
|
|
117
179
|
|
|
118
180
|
font-weight: var(--catalog-page-wrapper-font-weight);
|
|
119
181
|
color: var(--catalog-page-wrapper-text-color);
|
|
@@ -138,16 +200,13 @@ const CatalogPageWrapper = styled_components_1.default.div `
|
|
|
138
200
|
padding: 0;
|
|
139
201
|
}
|
|
140
202
|
`;
|
|
141
|
-
const CatalogPageDescription = styled_components_1.default.div `
|
|
142
|
-
display: var(--catalog-page-description-display-mobile);
|
|
143
|
-
|
|
144
|
-
@media screen and (min-width: ${utils_1.breakpoints.medium}) {
|
|
145
|
-
display: var(--catalog-page-description-display-desktop);
|
|
146
|
-
}
|
|
147
|
-
`;
|
|
148
203
|
const FiltersSidebar = (0, styled_components_1.default)(Sidebar_1.Sidebar) `
|
|
149
204
|
display: var(--catalog-sidebar-display-mobile);
|
|
150
205
|
|
|
206
|
+
@media screen and (max-width: ${utils_1.breakpoints.medium}) {
|
|
207
|
+
display: none;
|
|
208
|
+
}
|
|
209
|
+
|
|
151
210
|
@media screen and (min-width: ${utils_1.breakpoints.medium}) {
|
|
152
211
|
display: var(--catalog-sidebar-display-desktop);
|
|
153
212
|
}
|
|
@@ -158,6 +217,11 @@ const FiltersSidebar = (0, styled_components_1.default)(Sidebar_1.Sidebar) `
|
|
|
158
217
|
}
|
|
159
218
|
`;
|
|
160
219
|
const CatalogSearchInputWrapper = styled_components_1.default.div `
|
|
220
|
+
display: none;
|
|
161
221
|
width: var(--catalog-search-input-wrapper-width);
|
|
222
|
+
|
|
223
|
+
@media screen and (min-width: ${utils_1.breakpoints.medium}) {
|
|
224
|
+
display: block;
|
|
225
|
+
}
|
|
162
226
|
`;
|
|
163
227
|
//# sourceMappingURL=Catalog.js.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.CatalogAvatar = CatalogAvatar;
|
|
40
|
+
const styled_components_1 = __importStar(require("styled-components"));
|
|
41
|
+
const react_1 = __importDefault(require("react"));
|
|
42
|
+
const extractInitials = (value) => {
|
|
43
|
+
const trimmed = value.trim();
|
|
44
|
+
if (!trimmed)
|
|
45
|
+
return '';
|
|
46
|
+
if (trimmed.split('-').length > 1) {
|
|
47
|
+
return trimmed
|
|
48
|
+
.split('-')
|
|
49
|
+
.filter((part) => part.length > 0)
|
|
50
|
+
.map((part) => part[0])
|
|
51
|
+
.join('')
|
|
52
|
+
.toUpperCase()
|
|
53
|
+
.slice(0, 2);
|
|
54
|
+
}
|
|
55
|
+
const initials = trimmed.split(' ').map((n) => n[0]);
|
|
56
|
+
if (initials.length === 1) {
|
|
57
|
+
return initials[0];
|
|
58
|
+
}
|
|
59
|
+
return initials[0] + initials[initials.length - 1];
|
|
60
|
+
};
|
|
61
|
+
function CatalogAvatar({ value, size, }) {
|
|
62
|
+
return (react_1.default.createElement(CatalogAvatarWrapper, { "data-component-name": "Catalog/CatalogAvatar", size: size }, extractInitials(value)));
|
|
63
|
+
}
|
|
64
|
+
const CatalogAvatarWrapper = styled_components_1.default.div `
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
border-radius: 50%;
|
|
69
|
+
background-color: var(--catalog-avatar-bg-color);
|
|
70
|
+
flex-shrink: 0;
|
|
71
|
+
font-weight: var(--catalog-avatar-font-weight);
|
|
72
|
+
line-height: var(--catalog-avatar-line-height);
|
|
73
|
+
${({ size }) => SIZES[size]};
|
|
74
|
+
`;
|
|
75
|
+
const SIZES = {
|
|
76
|
+
small: (0, styled_components_1.css) `
|
|
77
|
+
width: var(--catalog-avatar-small-size);
|
|
78
|
+
height: var(--catalog-avatar-small-size);
|
|
79
|
+
font-size: var(--catalog-avatar-font-size-small);
|
|
80
|
+
`,
|
|
81
|
+
medium: (0, styled_components_1.css) `
|
|
82
|
+
width: var(--catalog-avatar-medium-size);
|
|
83
|
+
height: var(--catalog-avatar-medium-size);
|
|
84
|
+
font-size: var(--catalog-avatar-font-size-medium);
|
|
85
|
+
`,
|
|
86
|
+
large: (0, styled_components_1.css) `
|
|
87
|
+
width: var(--catalog-avatar-large-size);
|
|
88
|
+
height: var(--catalog-avatar-large-size);
|
|
89
|
+
font-size: var(--catalog-avatar-font-size-large);
|
|
90
|
+
`,
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=CatalogAvatar.js.map
|
|
@@ -15,7 +15,7 @@ const CatalogTagsWithTooltip_1 = require("../../../components/Catalog/CatalogTag
|
|
|
15
15
|
const CatalogEntityIcon_1 = require("../../../components/Catalog/CatalogEntityIcon");
|
|
16
16
|
const utils_1 = require("../../../core/utils");
|
|
17
17
|
function CatalogCard({ entity, catalogConfig }) {
|
|
18
|
-
var _a, _b, _c;
|
|
18
|
+
var _a, _b, _c, _d;
|
|
19
19
|
const { useTelemetry, useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
20
20
|
const { translate } = useTranslate();
|
|
21
21
|
const telemetry = useTelemetry();
|
|
@@ -32,30 +32,34 @@ function CatalogCard({ entity, catalogConfig }) {
|
|
|
32
32
|
react_1.default.createElement(CardDescription, null,
|
|
33
33
|
react_1.default.createElement(CardTitle, null,
|
|
34
34
|
react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, entity.title)),
|
|
35
|
-
react_1.default.createElement(
|
|
35
|
+
react_1.default.createElement(CardSummary, null,
|
|
36
|
+
react_1.default.createElement(CatalogHighlight_1.CatalogHighlight, null, (_a = entity.summary) !== null && _a !== void 0 ? _a : ''))),
|
|
36
37
|
react_1.default.createElement(CardMetadataSection, null,
|
|
37
38
|
react_1.default.createElement(MetadataRow, null,
|
|
38
39
|
react_1.default.createElement(MetadataLabel, null, translate('catalog.metadata.domains', 'Domains:')),
|
|
39
|
-
react_1.default.createElement(CatalogTagsWithTooltip_1.CatalogTagsWithTooltip, { items: ((_b = entity.domains) === null || _b === void 0 ? void 0 : _b.map((domain) => domain.title)) || [], tagProps: {
|
|
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
41
|
style: {
|
|
41
42
|
fontSize: 'var(--catalog-card-font-size)',
|
|
42
43
|
backgroundColor: 'var(--catalog-card-icon-bg-color)',
|
|
43
44
|
},
|
|
44
45
|
icon: react_1.default.createElement(GraphIcon_1.GraphIcon, { color: "var(--color-green-8)" }),
|
|
45
46
|
textTransform: 'none',
|
|
47
|
+
variant: 'outline',
|
|
46
48
|
} })),
|
|
47
49
|
react_1.default.createElement(MetadataRow, null,
|
|
48
50
|
react_1.default.createElement(MetadataLabel, null, translate('catalog.metadata.owners', 'Owners:')),
|
|
49
|
-
react_1.default.createElement(CatalogTagsWithTooltip_1.CatalogTagsWithTooltip, { items: ((_c = entity.owners) === null || _c === void 0 ? void 0 : _c.map((owner) => owner.key)) || [], tagProps: {
|
|
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: {
|
|
50
52
|
style: {
|
|
51
53
|
fontSize: 'var(--catalog-card-font-size)',
|
|
52
54
|
backgroundColor: 'var(--catalog-card-icon-bg-color)',
|
|
53
55
|
borderRadius: 'var(--border-radius-xl)',
|
|
56
|
+
paddingLeft: 'var(--catalog-card-metadata-owner-tag-left-padding)',
|
|
54
57
|
},
|
|
55
58
|
textTransform: 'none',
|
|
59
|
+
variant: 'outline',
|
|
56
60
|
} })))),
|
|
57
61
|
react_1.default.createElement(Divider, null),
|
|
58
|
-
react_1.default.createElement(CardFooter, null,
|
|
62
|
+
react_1.default.createElement(CardFooter, { hasTags: !!((_d = entity.tags) === null || _d === void 0 ? void 0 : _d.length) },
|
|
59
63
|
react_1.default.createElement(CatalogTagsWithTooltip_1.CatalogTagsWithTooltip, { items: entity.tags || [], tagProps: {
|
|
60
64
|
style: {
|
|
61
65
|
fontSize: 'var(--catalog-card-font-size)',
|
|
@@ -123,6 +127,7 @@ const ArrowCircle = styled_components_1.default.div `
|
|
|
123
127
|
}
|
|
124
128
|
`;
|
|
125
129
|
const CardContent = styled_components_1.default.div `
|
|
130
|
+
min-width: 0;
|
|
126
131
|
padding: var(--catalog-card-padding-vertical) var(--catalog-card-padding-horizontal);
|
|
127
132
|
height: 100%;
|
|
128
133
|
`;
|
|
@@ -130,7 +135,7 @@ const CardFooter = styled_components_1.default.div `
|
|
|
130
135
|
height: var(--catalog-card-footer-height);
|
|
131
136
|
display: flex;
|
|
132
137
|
align-items: center;
|
|
133
|
-
justify-content: space-between;
|
|
138
|
+
justify-content: ${({ hasTags }) => (hasTags ? 'space-between' : 'flex-end')};
|
|
134
139
|
padding: var(--catalog-card-padding-vertical) var(--catalog-card-padding-horizontal);
|
|
135
140
|
`;
|
|
136
141
|
const Divider = styled_components_1.default.div `
|
|
@@ -139,6 +144,8 @@ const Divider = styled_components_1.default.div `
|
|
|
139
144
|
background-color: var(--catalog-card-divider-color);
|
|
140
145
|
`;
|
|
141
146
|
const CatalogCardWrapper = styled_components_1.default.div `
|
|
147
|
+
min-width: 0;
|
|
148
|
+
max-width: 100%;
|
|
142
149
|
color: var(--catalog-card-text-color);
|
|
143
150
|
font-size: var(--catalog-card-font-size);
|
|
144
151
|
font-weight: var(--catalog-card-font-weight);
|
|
@@ -171,7 +178,19 @@ const CardTitle = styled_components_1.default.div `
|
|
|
171
178
|
font-size: var(--catalog-card-title-font-size);
|
|
172
179
|
font-weight: var(--catalog-card-title-font-weight);
|
|
173
180
|
line-height: var(--catalog-card-title-line-height);
|
|
174
|
-
|
|
181
|
+
height: var(--catalog-card-title-height);
|
|
182
|
+
display: var(--catalog-card-title-display);
|
|
183
|
+
align-items: var(--catalog-card-title-align-items);
|
|
184
|
+
margin-bottom: var(--catalog-card-title-margin-bottom);
|
|
185
|
+
`;
|
|
186
|
+
const CardSummary = styled_components_1.default.div `
|
|
187
|
+
min-width: 0;
|
|
188
|
+
font-size: var(--catalog-card-summary-font-size);
|
|
189
|
+
font-weight: var(--catalog-card-summary-font-weight);
|
|
190
|
+
line-height: var(--catalog-card-summary-line-height);
|
|
191
|
+
white-space: nowrap;
|
|
192
|
+
overflow: hidden;
|
|
193
|
+
text-overflow: ellipsis;
|
|
175
194
|
`;
|
|
176
195
|
const CardDescription = styled_components_1.default.div `
|
|
177
196
|
margin-top: var(--catalog-card-description-margin-top);
|
|
@@ -6,15 +6,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.CatalogCardView = CatalogCardView;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const utils_1 = require("../../../core/utils");
|
|
9
10
|
const CatalogCard_1 = require("../../../components/Catalog/CatalogCardView/CatalogCard");
|
|
10
11
|
function CatalogCardView({ entities, catalogConfig }) {
|
|
11
12
|
return (react_1.default.createElement(CatalogCardsWrapper, { "data-component-name": "Catalog/CatalogCardView/CatalogCardView" }, entities.map((entity) => (react_1.default.createElement(CatalogCard_1.CatalogCard, { key: entity.id, entity: entity, catalogConfig: catalogConfig })))));
|
|
12
13
|
}
|
|
13
14
|
const CatalogCardsWrapper = styled_components_1.default.div `
|
|
14
15
|
display: grid;
|
|
15
|
-
grid-template-columns: repeat(auto-fill, minmax(var(--catalog-card-min-width), 1fr));
|
|
16
16
|
gap: var(--catalog-cards-group-gap);
|
|
17
17
|
margin-bottom: var(--spacing-xl);
|
|
18
|
-
|
|
18
|
+
overflow-x: auto;
|
|
19
|
+
|
|
20
|
+
@media screen and (min-width: ${utils_1.breakpoints.small}) {
|
|
21
|
+
grid-template-columns: repeat(2, 1fr);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media screen and (max-width: ${utils_1.breakpoints.medium}) {
|
|
25
|
+
margin-top: 0;
|
|
26
|
+
}
|
|
19
27
|
`;
|
|
20
28
|
//# sourceMappingURL=CatalogCardView.js.map
|
|
@@ -72,6 +72,22 @@ function CatalogEntity({ RedocSchema, StoreProvider, GraphqlTypeRenderer, }) {
|
|
|
72
72
|
react_1.default.createElement(react_router_dom_1.Route, { path: "relations-graph", element: react_1.default.createElement(CatalogEntityRelationsGraph_lazy_1.CatalogEntityRelationsGraph, { entity: entity }) })))))));
|
|
73
73
|
}
|
|
74
74
|
const CatalogPageWrapper = styled_components_1.default.div `
|
|
75
|
+
max-width: var(--catalog-entity-max-width);
|
|
76
|
+
margin: var(--catalog-entity-margin);
|
|
77
|
+
padding: var(--catalog-entity-padding);
|
|
78
|
+
|
|
79
|
+
@media screen and (max-width: ${utils_1.breakpoints.large}) {
|
|
80
|
+
padding: var(--catalog-entity-padding-large);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@media screen and (max-width: ${utils_1.breakpoints.medium}) {
|
|
84
|
+
padding: var(--catalog-entity-padding-medium);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@media screen and (max-width: ${utils_1.breakpoints.small}) {
|
|
88
|
+
padding: var(--catalog-entity-padding-small);
|
|
89
|
+
}
|
|
90
|
+
|
|
75
91
|
--sidebar-width: var(--catalog-sidebar-width);
|
|
76
92
|
--link-color-primary: var(--breadcrumbs-text-color);
|
|
77
93
|
|
|
@@ -85,32 +101,16 @@ const CatalogPageWrapper = styled_components_1.default.div `
|
|
|
85
101
|
font-family: var(--font-family-base);
|
|
86
102
|
line-height: var(--line-height-base);
|
|
87
103
|
|
|
88
|
-
hr {
|
|
89
|
-
border: 0;
|
|
90
|
-
width: calc(100% + 48px);
|
|
91
|
-
margin: auto -24px 0 -24px;
|
|
92
|
-
border-top: 1px solid var(--border-color-primary);
|
|
93
|
-
}
|
|
94
104
|
a:not([role='button']) {
|
|
95
105
|
text-decoration: none;
|
|
96
106
|
color: var(--link-color-primary);
|
|
97
107
|
font-weight: var(--link-font-weight);
|
|
98
108
|
}
|
|
99
|
-
|
|
100
|
-
@media screen and (min-width: ${utils_1.breakpoints.medium}) {
|
|
101
|
-
flex-direction: row;
|
|
102
|
-
padding: 0;
|
|
103
|
-
}
|
|
104
109
|
`;
|
|
105
110
|
const CatalogPageContent = styled_components_1.default.main `
|
|
106
111
|
flex: 1;
|
|
107
|
-
width:
|
|
112
|
+
width: 100%;
|
|
108
113
|
margin: 0 auto;
|
|
109
|
-
|
|
110
|
-
@media screen and (min-width: ${utils_1.breakpoints.medium}) {
|
|
111
|
-
width: 100%;
|
|
112
|
-
padding: var(--catalog-page-padding);
|
|
113
|
-
}
|
|
114
114
|
`;
|
|
115
115
|
const CatalogEntityPageWrapper = styled_components_1.default.div `
|
|
116
116
|
display: flex;
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.js
CHANGED
|
@@ -6,28 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.CatalogEntityRelationsLinkedNode = CatalogEntityRelationsLinkedNode;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const react_2 = require("@xyflow/react");
|
|
9
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
10
|
-
const CatalogEntityIcon_1 = require("../../../../components/Catalog/CatalogEntityIcon");
|
|
11
9
|
const Link_1 = require("../../../../components/Link/Link");
|
|
12
10
|
const catalog_1 = require("../../../../core/constants/catalog");
|
|
11
|
+
const CatalogEntityRelationsNodeContent_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent");
|
|
13
12
|
function CatalogEntityRelationsLinkedNode({ label, entityType, className, to, }) {
|
|
14
|
-
return (react_1.default.createElement(
|
|
15
|
-
react_1.default.createElement(
|
|
16
|
-
react_1.default.createElement(
|
|
17
|
-
react_1.default.createElement("div", null, label)));
|
|
13
|
+
return (react_1.default.createElement(Link_1.Link, { className: className, to: to, "data-component-name": "Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode" },
|
|
14
|
+
react_1.default.createElement(CatalogEntityRelationsNodeContent_1.CatalogEntityRelationsNodeContent, { entityType: entityType, label: label, isRoot: false }),
|
|
15
|
+
react_1.default.createElement(react_2.Handle, { type: catalog_1.GraphHandleType.Target, position: react_2.Position.Top, id: catalog_1.GraphHandleType.Target })));
|
|
18
16
|
}
|
|
19
|
-
const RelationsLinkedNodeWrapper = (0, styled_components_1.default)(Link_1.Link) `
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
gap: var(--catalog-entity-relations-node-gap);
|
|
23
|
-
padding: var(--catalog-entity-relations-node-padding);
|
|
24
|
-
border-radius: var(--catalog-entity-relations-node-border-radius);
|
|
25
|
-
font-style: normal;
|
|
26
|
-
font-weight: var(--catalog-entity-relations-node-font-weight);
|
|
27
|
-
background: var(--catalog-entity-relations-node-bg-color);
|
|
28
|
-
color: var(--catalog-entity-relations-node-text-color);
|
|
29
|
-
border: var(--catalog-entity-relations-node-border-width)
|
|
30
|
-
var(--catalog-entity-relations-node-border-style)
|
|
31
|
-
var(--catalog-entity-relations-node-border-color);
|
|
32
|
-
`;
|
|
33
17
|
//# sourceMappingURL=CatalogEntityRelationsLinkedNode.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type CatalogEntityRelationsNodeContentProps = {
|
|
3
|
+
entityType: string;
|
|
4
|
+
label: string;
|
|
5
|
+
isRoot: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function CatalogEntityRelationsNodeContent({ entityType, label, isRoot, }: CatalogEntityRelationsNodeContentProps): React.ReactElement;
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
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.CatalogEntityRelationsNodeContent = CatalogEntityRelationsNodeContent;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const CatalogEntityIcon_1 = require("../../../../components/Catalog/CatalogEntityIcon");
|
|
10
|
+
const utils_1 = require("../../../../core/utils");
|
|
11
|
+
function CatalogEntityRelationsNodeContent({ entityType, label, isRoot, }) {
|
|
12
|
+
const formattedEntityType = (0, utils_1.customCatalogOptionsCasing)(entityType);
|
|
13
|
+
return (react_1.default.createElement(CatalogEntityRelationsNodeContentWrapper, { isRoot: isRoot, "data-component-name": "Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent" },
|
|
14
|
+
react_1.default.createElement(CatalogEntityRelationsNodeTypeRow, { isRoot: isRoot },
|
|
15
|
+
isRoot ? (react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entityType, forceColor: "var(--catalog-entity-relations-node-root-icon-color)" })) : (react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entityType, defaultColor: false })),
|
|
16
|
+
react_1.default.createElement("span", null, formattedEntityType)),
|
|
17
|
+
react_1.default.createElement(CatalogEntityRelationsNodeLabelRow, { isRoot: isRoot }, label)));
|
|
18
|
+
}
|
|
19
|
+
const CatalogEntityRelationsNodeTypeRow = styled_components_1.default.div `
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: var(--catalog-entity-relations-node-gap);
|
|
23
|
+
line-height: var(--line-height-sm);
|
|
24
|
+
font-size: var(--font-size-sm);
|
|
25
|
+
color: ${({ isRoot }) => isRoot
|
|
26
|
+
? 'var(--catalog-entity-relations-node-root-text-color)'
|
|
27
|
+
: 'var(--text-color-description)'};
|
|
28
|
+
`;
|
|
29
|
+
const CatalogEntityRelationsNodeLabelRow = styled_components_1.default.div `
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: var(--catalog-entity-relations-node-gap);
|
|
33
|
+
line-height: var(--line-height-lg);
|
|
34
|
+
font-size: var(--font-size-lg);
|
|
35
|
+
color: ${({ isRoot }) => isRoot ? 'var(--catalog-entity-relations-node-root-text-color)' : 'var(--text-color-primary)'};
|
|
36
|
+
`;
|
|
37
|
+
const CatalogEntityRelationsNodeContentWrapper = styled_components_1.default.div `
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
align-items: flex-start;
|
|
41
|
+
gap: var(--catalog-entity-relations-node-gap);
|
|
42
|
+
padding: var(--catalog-entity-relations-node-padding);
|
|
43
|
+
border-radius: var(--catalog-entity-relations-node-border-radius);
|
|
44
|
+
font-style: normal;
|
|
45
|
+
font-weight: var(--catalog-entity-relations-node-font-weight);
|
|
46
|
+
background: ${({ isRoot }) => isRoot
|
|
47
|
+
? 'var(--catalog-entity-relations-node-root-bg-color)'
|
|
48
|
+
: 'var(--catalog-entity-relations-node-bg-color)'};
|
|
49
|
+
border: ${({ isRoot }) => isRoot
|
|
50
|
+
? 'none'
|
|
51
|
+
: `var(--catalog-entity-relations-node-border-width) var(--catalog-entity-relations-node-border-style) var(--catalog-entity-relations-node-border-color)`};
|
|
52
|
+
`;
|
|
53
|
+
//# sourceMappingURL=CatalogEntityRelationsNodeContent.js.map
|