@redocly/theme 0.55.0-next.7 → 0.55.0-next.8
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/Breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.js +2 -1
- package/lib/components/Catalog/Catalog.d.ts +11 -0
- package/lib/components/Catalog/Catalog.js +138 -0
- package/lib/components/Catalog/CatalogActionsRow.d.ts +15 -0
- package/lib/components/Catalog/CatalogActionsRow.js +34 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCard.d.ts +8 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +179 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCardView.d.ts +8 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCardView.js +20 -0
- package/lib/components/Catalog/CatalogEntities.d.ts +18 -0
- package/lib/components/Catalog/CatalogEntities.js +63 -0
- package/lib/components/Catalog/CatalogEntitiesEmptyState.d.ts +2 -0
- package/lib/components/Catalog/CatalogEntitiesEmptyState.js +38 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +12 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +133 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.d.ts +7 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +49 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.js +48 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +111 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.js +25 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +69 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.d.ts +7 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +48 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.js +19 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +20 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.js +20 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.js +23 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +21 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +24 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.js +21 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +21 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +37 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +10 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +31 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +25 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +27 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +22 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +60 -0
- package/lib/components/Catalog/CatalogEntityIcon.d.ts +5 -0
- package/lib/components/Catalog/CatalogEntityIcon.js +38 -0
- package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +5 -0
- package/lib/components/Catalog/CatalogEntityTypeIcon.js +42 -0
- package/lib/components/Catalog/CatalogHighlight.d.ts +4 -0
- package/lib/components/Catalog/CatalogHighlight.js +48 -0
- package/lib/components/Catalog/CatalogPageDescription.d.ts +9 -0
- package/lib/components/Catalog/CatalogPageDescription.js +52 -0
- package/lib/components/Catalog/CatalogSelector.d.ts +12 -0
- package/lib/components/Catalog/CatalogSelector.js +48 -0
- package/lib/components/Catalog/CatalogSortButton.d.ts +10 -0
- package/lib/components/Catalog/CatalogSortButton.js +71 -0
- package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.d.ts +5 -0
- package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.js +19 -0
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.d.ts +6 -0
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +63 -0
- package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.d.ts +5 -0
- package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.js +19 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +11 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +101 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +31 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +106 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +27 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +127 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.d.ts +6 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.js +20 -0
- package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.d.ts +7 -0
- package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +66 -0
- package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +9 -0
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +46 -0
- package/lib/components/Catalog/CatalogViewModeToggle.d.ts +7 -0
- package/lib/components/Catalog/CatalogViewModeToggle.js +67 -0
- package/lib/components/Catalog/variables.d.ts +1 -0
- package/lib/components/Catalog/variables.dark.d.ts +1 -0
- package/lib/components/Catalog/variables.dark.js +8 -0
- package/lib/components/Catalog/variables.js +354 -0
- package/lib/components/CatalogClassic/CatalogClassicHighlight.js +1 -1
- package/lib/components/Filter/Filter.d.ts +1 -1
- package/lib/components/Filter/Filter.js +2 -2
- package/lib/components/Filter/FilterCheckboxes.d.ts +1 -1
- package/lib/components/Filter/FilterCheckboxes.js +4 -4
- package/lib/components/Filter/FilterContent.d.ts +3 -1
- package/lib/components/Filter/FilterContent.js +34 -4
- package/lib/components/Filter/FilterInput.js +35 -3
- package/lib/components/Filter/FilterSelect.d.ts +1 -1
- package/lib/components/Filter/FilterSelect.js +4 -4
- package/lib/components/LoadMore/LoadMore.d.ts +8 -0
- package/lib/components/LoadMore/LoadMore.js +18 -0
- package/lib/components/Markdown/Markdown.js +1 -1
- package/lib/components/PageNavigation/NavigationButton.d.ts +13 -0
- package/lib/components/PageNavigation/NavigationButton.js +32 -0
- package/lib/components/PageNavigation/NextButton.js +10 -29
- package/lib/components/PageNavigation/PageNavigation.js +1 -1
- package/lib/components/PageNavigation/PreviousButton.js +11 -27
- package/lib/components/Search/SearchAiConversationInput.js +2 -1
- package/lib/components/Select/Select.js +3 -3
- package/lib/components/Sidebar/Sidebar.d.ts +3 -0
- package/lib/components/Sidebar/Sidebar.js +3 -2
- package/lib/components/Tag/Tag.d.ts +3 -1
- package/lib/components/Tag/Tag.js +54 -2
- package/lib/components/Tag/variables.js +21 -0
- package/lib/components/Tooltip/Tooltip.d.ts +2 -1
- package/lib/components/Tooltip/Tooltip.js +26 -19
- package/lib/components/Tooltip/variables.js +17 -0
- package/lib/core/constants/catalog.d.ts +1 -0
- package/lib/core/constants/catalog.js +5 -0
- package/lib/core/constants/index.d.ts +1 -0
- package/lib/core/constants/index.js +1 -0
- package/lib/core/constants/search.d.ts +1 -0
- package/lib/core/constants/search.js +2 -1
- package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +1 -0
- package/lib/core/hooks/__mocks__/use-theme-hooks.js +1 -0
- package/lib/core/hooks/catalog/useCatalogEntities.d.ts +4 -0
- package/lib/core/hooks/catalog/useCatalogEntities.js +17 -0
- package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.d.ts +15 -0
- package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.js +23 -0
- package/lib/core/hooks/catalog/useCatalogTableViewRow.d.ts +11 -0
- package/lib/core/hooks/catalog/useCatalogTableViewRow.js +26 -0
- package/lib/core/hooks/index.d.ts +2 -0
- package/lib/core/hooks/index.js +2 -0
- package/lib/core/hooks/use-user-teams.d.ts +1 -0
- package/lib/core/hooks/use-user-teams.js +10 -0
- package/lib/core/styles/dark.js +2 -0
- package/lib/core/styles/global.js +63 -60
- package/lib/core/types/catalog.d.ts +118 -5
- package/lib/core/types/filter.d.ts +1 -0
- package/lib/core/types/hooks.d.ts +11 -4
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/index.js +1 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/telemetry.d.ts +32 -0
- package/lib/core/types/telemetry.js +3 -0
- package/lib/icons/AscSortIcon/AscSortIcon.d.ts +9 -0
- package/lib/icons/AscSortIcon/AscSortIcon.js +25 -0
- package/lib/icons/CardsIcon/CardsIcon.d.ts +9 -0
- package/lib/icons/CardsIcon/CardsIcon.js +25 -0
- package/lib/icons/CaretDownIcon/CaretDownIcon.d.ts +9 -0
- package/lib/icons/CaretDownIcon/CaretDownIcon.js +22 -0
- package/lib/icons/CaretUpIcon/CaretUpIcon.d.ts +9 -0
- package/lib/icons/CaretUpIcon/CaretUpIcon.js +22 -0
- package/lib/icons/DescSortIcon/DescSortIcon.d.ts +9 -0
- package/lib/icons/DescSortIcon/DescSortIcon.js +25 -0
- package/lib/icons/EntityTypeIcon/EntityTypeIcon.d.ts +9 -0
- package/lib/icons/EntityTypeIcon/EntityTypeIcon.js +26 -0
- package/lib/icons/GithubIcon/GithubIcon.d.ts +9 -0
- package/lib/icons/GithubIcon/GithubIcon.js +22 -0
- package/lib/icons/GraphIcon/GraphIcon.d.ts +9 -0
- package/lib/icons/GraphIcon/GraphIcon.js +22 -0
- package/lib/icons/PeopleIcon/PeopleIcon.d.ts +9 -0
- package/lib/icons/PeopleIcon/PeopleIcon.js +27 -0
- package/lib/icons/SlackIcon/SlackIcon.d.ts +9 -0
- package/lib/icons/SlackIcon/SlackIcon.js +29 -0
- package/lib/icons/SortIcon/SortIcon.d.ts +9 -0
- package/lib/icons/SortIcon/SortIcon.js +25 -0
- package/lib/icons/TableIcon/TableIcon.d.ts +9 -0
- package/lib/icons/TableIcon/TableIcon.js +22 -0
- package/lib/icons/TagsIcon/TagsIcon.d.ts +9 -0
- package/lib/icons/TagsIcon/TagsIcon.js +24 -0
- package/lib/index.d.ts +18 -0
- package/lib/index.js +19 -0
- package/lib/markdoc/components/Tabs/Tab.d.ts +2 -1
- package/lib/markdoc/components/Tabs/Tab.js +10 -2
- package/lib/markdoc/components/Tabs/TabList.js +2 -2
- package/lib/markdoc/components/Tabs/Tabs.d.ts +3 -1
- package/lib/markdoc/components/Tabs/Tabs.js +2 -2
- package/package.json +2 -1
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +7 -2
- package/src/components/Catalog/Catalog.tsx +235 -0
- package/src/components/Catalog/CatalogActionsRow.tsx +58 -0
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +227 -0
- package/src/components/Catalog/CatalogCardView/CatalogCardView.tsx +29 -0
- package/src/components/Catalog/CatalogEntities.tsx +107 -0
- package/src/components/Catalog/CatalogEntitiesEmptyState.tsx +38 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +207 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +60 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +67 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +93 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.tsx +35 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +83 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +62 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +36 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +38 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +33 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.tsx +41 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +42 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +39 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.tsx +31 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +97 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +80 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +92 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +127 -0
- package/src/components/Catalog/CatalogEntityIcon.tsx +41 -0
- package/src/components/Catalog/CatalogEntityTypeIcon.tsx +48 -0
- package/src/components/Catalog/CatalogHighlight.tsx +56 -0
- package/src/components/Catalog/CatalogPageDescription.tsx +72 -0
- package/src/components/Catalog/CatalogSelector.tsx +67 -0
- package/src/components/Catalog/CatalogSortButton.tsx +78 -0
- package/src/components/Catalog/CatalogTableView/CatalogDomainsCell.tsx +26 -0
- package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +77 -0
- package/src/components/Catalog/CatalogTableView/CatalogOwnersCell.tsx +26 -0
- package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +120 -0
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +176 -0
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +180 -0
- package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +28 -0
- package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +77 -0
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +83 -0
- package/src/components/Catalog/CatalogViewModeToggle.tsx +65 -0
- package/src/components/Catalog/variables.dark.ts +5 -0
- package/src/components/Catalog/variables.ts +351 -0
- package/src/components/CatalogClassic/CatalogClassicHighlight.tsx +1 -1
- package/src/components/Filter/Filter.tsx +10 -2
- package/src/components/Filter/FilterCheckboxes.tsx +8 -4
- package/src/components/Filter/FilterContent.tsx +21 -5
- package/src/components/Filter/FilterInput.tsx +16 -4
- package/src/components/Filter/FilterSelect.tsx +8 -4
- package/src/components/LoadMore/LoadMore.tsx +38 -0
- package/src/components/Markdown/Markdown.tsx +1 -1
- package/src/components/PageNavigation/NavigationButton.tsx +68 -0
- package/src/components/PageNavigation/NextButton.tsx +20 -43
- package/src/components/PageNavigation/PageNavigation.tsx +1 -1
- package/src/components/PageNavigation/PreviousButton.tsx +20 -43
- package/src/components/Search/SearchAiConversationInput.tsx +3 -0
- package/src/components/Select/Select.tsx +5 -3
- package/src/components/Sidebar/Sidebar.tsx +1 -1
- package/src/components/Tag/Tag.tsx +67 -1
- package/src/components/Tag/variables.ts +21 -0
- package/src/components/Tooltip/Tooltip.tsx +31 -22
- package/src/components/Tooltip/variables.ts +17 -0
- package/src/core/constants/catalog.ts +1 -0
- package/src/core/constants/index.ts +1 -0
- package/src/core/constants/search.ts +2 -0
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +1 -0
- package/src/core/hooks/catalog/useCatalogEntities.ts +16 -0
- package/src/core/hooks/catalog/useCatalogTableHeaderCellActions.ts +38 -0
- package/src/core/hooks/catalog/useCatalogTableViewRow.ts +40 -0
- package/src/core/hooks/index.ts +2 -0
- package/src/core/hooks/use-user-teams.ts +8 -0
- package/src/core/styles/dark.ts +2 -0
- package/src/core/styles/global.ts +3 -0
- package/src/core/types/catalog.ts +143 -5
- package/src/core/types/filter.ts +1 -0
- package/src/core/types/hooks.ts +32 -5
- package/src/core/types/index.ts +1 -0
- package/src/core/types/l10n.ts +20 -0
- package/src/core/types/telemetry.ts +36 -0
- package/src/core/utils/load-and-navigate.ts +5 -4
- package/src/icons/AscSortIcon/AscSortIcon.tsx +29 -0
- package/src/icons/CardsIcon/CardsIcon.tsx +38 -0
- package/src/icons/CaretDownIcon/CaretDownIcon.tsx +26 -0
- package/src/icons/CaretUpIcon/CaretUpIcon.tsx +26 -0
- package/src/icons/DescSortIcon/DescSortIcon.tsx +29 -0
- package/src/icons/EntityTypeIcon/EntityTypeIcon.tsx +49 -0
- package/src/icons/GithubIcon/GithubIcon.tsx +35 -0
- package/src/icons/GraphIcon/GraphIcon.tsx +26 -0
- package/src/icons/PeopleIcon/PeopleIcon.tsx +46 -0
- package/src/icons/SlackIcon/SlackIcon.tsx +61 -0
- package/src/icons/SortIcon/SortIcon.tsx +29 -0
- package/src/icons/TableIcon/TableIcon.tsx +26 -0
- package/src/icons/TagsIcon/TagsIcon.tsx +41 -0
- package/src/index.ts +20 -0
- package/src/markdoc/components/Tabs/Tab.tsx +12 -1
- package/src/markdoc/components/Tabs/TabList.tsx +2 -1
- package/src/markdoc/components/Tabs/Tabs.tsx +8 -3
|
@@ -0,0 +1,23 @@
|
|
|
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.GitProperty = GitProperty;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const GithubIcon_1 = require("../../../../icons/GithubIcon/GithubIcon");
|
|
9
|
+
const utils_1 = require("../../../../core/utils");
|
|
10
|
+
const Tag_1 = require("../../../../components/Tag/Tag");
|
|
11
|
+
const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
|
|
12
|
+
function GitProperty({ entity }) {
|
|
13
|
+
const git = entity.git;
|
|
14
|
+
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/GitProperty" },
|
|
15
|
+
react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
|
|
16
|
+
react_1.default.createElement(GithubIcon_1.GithubIcon, null),
|
|
17
|
+
"Repositories"), content: react_1.default.createElement(react_1.default.Fragment, null, git === null || git === void 0 ? void 0 : git.map((repo) => {
|
|
18
|
+
const url = new URL(repo);
|
|
19
|
+
const repoName = (0, utils_1.removeLeadingSlash)(url.pathname);
|
|
20
|
+
return (react_1.default.createElement(Tag_1.Tag, { key: repo, style: { backgroundColor: 'var(--bg-color)' } }, repoName));
|
|
21
|
+
})) })));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=GitProperty.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
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.OwnersProperty = OwnersProperty;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const PeopleIcon_1 = require("../../../../icons/PeopleIcon/PeopleIcon");
|
|
9
|
+
const Tag_1 = require("../../../../components/Tag/Tag");
|
|
10
|
+
const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
|
|
11
|
+
function OwnersProperty({ entity }) {
|
|
12
|
+
const { owners = [] } = entity;
|
|
13
|
+
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty" },
|
|
14
|
+
react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
|
|
15
|
+
react_1.default.createElement(PeopleIcon_1.PeopleIcon, null),
|
|
16
|
+
"Owners"), content: react_1.default.createElement(react_1.default.Fragment, null, owners.map((owner) => (react_1.default.createElement(Tag_1.Tag, { key: owner === null || owner === void 0 ? void 0 : owner.id, style: {
|
|
17
|
+
backgroundColor: 'var(--bg-color)',
|
|
18
|
+
borderRadius: 'var(--border-radius-xl)',
|
|
19
|
+
} }, owner === null || owner === void 0 ? void 0 : owner.title)))) })));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=OwnersProperty.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
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.TagsProperty = TagsProperty;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const TagsIcon_1 = require("../../../../icons/TagsIcon/TagsIcon");
|
|
9
|
+
const theme_1 = require("../../../../index.js");
|
|
10
|
+
const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
|
|
11
|
+
function TagsProperty({ entity }) {
|
|
12
|
+
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty" },
|
|
13
|
+
react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
|
|
14
|
+
react_1.default.createElement(TagsIcon_1.TagsIcon, null),
|
|
15
|
+
"Tags"), content: react_1.default.createElement(theme_1.CatalogTagsWithTooltip, { itemsToShow: 8, items: entity.tags || [], tagProps: {
|
|
16
|
+
style: {
|
|
17
|
+
fontSize: 'var(--font-size-base)',
|
|
18
|
+
borderRadius: 'var(--border-radius)',
|
|
19
|
+
},
|
|
20
|
+
borderless: true,
|
|
21
|
+
color: 'grey',
|
|
22
|
+
} }) })));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=TagsProperty.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
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.UserEmailProperty = UserEmailProperty;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const EmailIcon_1 = require("../../../../icons/EmailIcon/EmailIcon");
|
|
9
|
+
const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
|
|
10
|
+
const CatalogUserEntityCell_1 = require("../../../../components/Catalog/CatalogTableView/CatalogUserEntityCell");
|
|
11
|
+
function UserEmailProperty({ entity }) {
|
|
12
|
+
var _a;
|
|
13
|
+
const email = (_a = entity.metadata) === null || _a === void 0 ? void 0 : _a.email;
|
|
14
|
+
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty" },
|
|
15
|
+
react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
|
|
16
|
+
react_1.default.createElement(EmailIcon_1.EmailIcon, null),
|
|
17
|
+
"Email"), content: react_1.default.createElement(CatalogUserEntityCell_1.Email, null, email), onClick: () => {
|
|
18
|
+
window.open(`mailto:${email}`, '_blank');
|
|
19
|
+
} })));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=UserEmailProperty.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
3
|
+
import { BffCatalogEntity, BffCatalogRelatedEntity, SortOption } from '../../../../core/types';
|
|
4
|
+
export type CatalogEntityDefaultRelationsProps = {
|
|
5
|
+
entity: BffCatalogEntity;
|
|
6
|
+
entitiesCatalogConfig: EntitiesCatalogConfig;
|
|
7
|
+
catalogConfig: CatalogEntityConfig;
|
|
8
|
+
relations: BffCatalogRelatedEntity[];
|
|
9
|
+
query: {
|
|
10
|
+
fetchNextPage: () => void;
|
|
11
|
+
isFetchingNextPage: boolean;
|
|
12
|
+
};
|
|
13
|
+
searchQuery: string;
|
|
14
|
+
setSearchQuery: (query: string) => void;
|
|
15
|
+
sortOption: SortOption | null;
|
|
16
|
+
setSortOption: (sortOption: SortOption | null) => void;
|
|
17
|
+
handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
|
|
18
|
+
isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
|
|
19
|
+
shouldShowLoadMore: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare function CatalogEntityDefaultRelations({ entity, relations, query, searchQuery, setSearchQuery, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }: CatalogEntityDefaultRelationsProps): JSX.Element;
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
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.CatalogEntityDefaultRelations = CatalogEntityDefaultRelations;
|
|
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
|
+
const CatalogEntityCell_1 = require("../../../../components/Catalog/CatalogTableView/CatalogEntityCell");
|
|
11
|
+
const Tag_1 = require("../../../../components/Tag/Tag");
|
|
12
|
+
const CatalogEntityRelationsTable_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable");
|
|
13
|
+
const columns = [
|
|
14
|
+
{
|
|
15
|
+
key: 'entity',
|
|
16
|
+
title: 'Entity',
|
|
17
|
+
render: (entity) => react_1.default.createElement(CatalogEntityCell_1.CatalogEntityCell, { entity: entity }),
|
|
18
|
+
sortable: true,
|
|
19
|
+
sortKey: 'title',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
key: 'type',
|
|
23
|
+
title: 'Type',
|
|
24
|
+
render: (entity) => (react_1.default.createElement(EntityTypeTag, { color: (0, CatalogTableView_1.getEntityTagColor)(entity.type) }, entity.type)),
|
|
25
|
+
sortable: true,
|
|
26
|
+
sortKey: 'type',
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
function CatalogEntityDefaultRelations({ entity, relations, query, searchQuery, setSearchQuery, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }) {
|
|
30
|
+
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations" },
|
|
31
|
+
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 })));
|
|
32
|
+
}
|
|
33
|
+
const EntityTypeTag = (0, styled_components_1.default)(Tag_1.Tag) `
|
|
34
|
+
font-size: var(--font-size-base);
|
|
35
|
+
background-color: transparent;
|
|
36
|
+
`;
|
|
37
|
+
//# sourceMappingURL=CatalogEntityDefaultRelations.js.map
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
3
|
+
import { BffCatalogEntity, BffCatalogRelatedEntityList } from '../../../../core/types';
|
|
4
|
+
export type CatalogEntityRelationsProps = {
|
|
5
|
+
entity: BffCatalogEntity;
|
|
6
|
+
entitiesCatalogConfig: EntitiesCatalogConfig;
|
|
7
|
+
catalogConfig: CatalogEntityConfig;
|
|
8
|
+
initialRelations: BffCatalogRelatedEntityList;
|
|
9
|
+
};
|
|
10
|
+
export declare function CatalogEntityRelations({ entity, entitiesCatalogConfig, initialRelations, catalogConfig, }: CatalogEntityRelationsProps): JSX.Element | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
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.CatalogEntityRelations = CatalogEntityRelations;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const hooks_1 = require("../../../../core/hooks");
|
|
9
|
+
const CatalogEntityDefaultRelations_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations");
|
|
10
|
+
const CatalogEntityTeamRelations_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations");
|
|
11
|
+
const LOAD_MORE_THRESHOLD = 10;
|
|
12
|
+
function CatalogEntityRelations({ entity, entitiesCatalogConfig, initialRelations, catalogConfig, }) {
|
|
13
|
+
const { useCatalogSort, useCatalogSearch, useFetchCatalogEntitiesRelations } = (0, hooks_1.useThemeHooks)();
|
|
14
|
+
const { sortOption, setSortOption, handleSortClick, isColumnSorted } = useCatalogSort();
|
|
15
|
+
const { searchQuery, setSearchQuery } = useCatalogSearch();
|
|
16
|
+
const { items: relations, query } = useFetchCatalogEntitiesRelations({ entityKey: entity.key, search: searchQuery, sort: sortOption !== null && sortOption !== void 0 ? sortOption : undefined }, initialRelations);
|
|
17
|
+
if (relations.length === 0) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
const shouldShowLoadMore = query.hasNextPage ||
|
|
21
|
+
(query.isPlaceholderData && relations && relations.length >= LOAD_MORE_THRESHOLD);
|
|
22
|
+
switch (entity.type) {
|
|
23
|
+
case 'team':
|
|
24
|
+
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations/CatalogEntityTeamRelations" },
|
|
25
|
+
react_1.default.createElement(CatalogEntityTeamRelations_1.CatalogEntityTeamRelations, { entity: entity, catalogConfig: catalogConfig, entitiesCatalogConfig: entitiesCatalogConfig, relations: relations, query: query, searchQuery: searchQuery, setSearchQuery: setSearchQuery, sortOption: sortOption, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore })));
|
|
26
|
+
default:
|
|
27
|
+
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations/CatalogEntityDefaultRelations" },
|
|
28
|
+
react_1.default.createElement(CatalogEntityDefaultRelations_1.CatalogEntityDefaultRelations, { entity: entity, catalogConfig: catalogConfig, entitiesCatalogConfig: entitiesCatalogConfig, relations: relations, query: query, searchQuery: searchQuery, setSearchQuery: setSearchQuery, sortOption: sortOption, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore })));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=CatalogEntityRelations.js.map
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
3
|
+
import { BffCatalogEntity, BffCatalogRelatedEntity, SortOption } from '../../../../core/types';
|
|
4
|
+
import { CatalogColumn } from '../../../../components/Catalog/CatalogTableView/CatalogTableView';
|
|
5
|
+
export type CatalogEntityRelationsTableProps = {
|
|
6
|
+
entity: BffCatalogEntity;
|
|
7
|
+
entitiesCatalogConfig: EntitiesCatalogConfig;
|
|
8
|
+
catalogConfig: CatalogEntityConfig;
|
|
9
|
+
relations: BffCatalogRelatedEntity[];
|
|
10
|
+
query: {
|
|
11
|
+
fetchNextPage: () => void;
|
|
12
|
+
isFetchingNextPage: boolean;
|
|
13
|
+
};
|
|
14
|
+
searchQuery: string;
|
|
15
|
+
setSearchQuery: (query: string) => void;
|
|
16
|
+
heading: string;
|
|
17
|
+
filter?: string;
|
|
18
|
+
columns: CatalogColumn<BffCatalogRelatedEntity>[];
|
|
19
|
+
sortOption: SortOption | null;
|
|
20
|
+
setSortOption: (sortOption: SortOption | null) => void;
|
|
21
|
+
handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
|
|
22
|
+
isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
|
|
23
|
+
shouldShowLoadMore: boolean;
|
|
24
|
+
};
|
|
25
|
+
export declare function CatalogEntityRelationsTable({ entitiesCatalogConfig, catalogConfig, relations, query, searchQuery, setSearchQuery, heading, columns, setSortOption, sortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }: CatalogEntityRelationsTableProps): JSX.Element;
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
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.CatalogEntityRelationsTable = CatalogEntityRelationsTable;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const ArrowDownIcon_1 = require("../../../../icons/ArrowDownIcon/ArrowDownIcon");
|
|
10
|
+
const LoadMore_1 = require("../../../../components/LoadMore/LoadMore");
|
|
11
|
+
const CatalogTableView_1 = require("../../../../components/Catalog/CatalogTableView/CatalogTableView");
|
|
12
|
+
const CatalogActionsRow_1 = require("../../../../components/Catalog/CatalogActionsRow");
|
|
13
|
+
const CatalogHighlight_1 = require("../../../../components/Catalog/CatalogHighlight");
|
|
14
|
+
function CatalogEntityRelationsTable({ entitiesCatalogConfig, catalogConfig, relations, query, searchQuery, setSearchQuery, heading, columns, setSortOption, sortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }) {
|
|
15
|
+
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable" },
|
|
16
|
+
react_1.default.createElement(Heading, null, heading),
|
|
17
|
+
react_1.default.createElement(CatalogActionsRow_1.CatalogActionsRow, { searchQuery: searchQuery, setSearchQuery: setSearchQuery, sortOption: sortOption, setSortOption: setSortOption, style: { marginBottom: '12px' } }),
|
|
18
|
+
relations.length > 0 && (react_1.default.createElement(CatalogHighlight_1.HighlightContext.Provider, { value: [searchQuery] },
|
|
19
|
+
react_1.default.createElement(CatalogTableView_1.CatalogTableView, { entities: relations, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, columns: columns, setSortOption: setSortOption, currentSortOption: sortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted }))),
|
|
20
|
+
shouldShowLoadMore && (react_1.default.createElement(LoadMore_1.LoadMore, { icon: react_1.default.createElement(ArrowDownIcon_1.ArrowDownIcon, { size: "var(--catalog-load-more-icon-size)" }), onClick: query.fetchNextPage, disabled: query.isFetchingNextPage, blinking: query.isFetchingNextPage, label: query.isFetchingNextPage ? 'Loading...' : 'Load More' }))));
|
|
21
|
+
}
|
|
22
|
+
const Heading = styled_components_1.default.h2 `
|
|
23
|
+
margin: var(--spacing-base) 0;
|
|
24
|
+
font-size: var(--font-size-md);
|
|
25
|
+
color: var(--catalog-metadata-heading-color);
|
|
26
|
+
`;
|
|
27
|
+
//# sourceMappingURL=CatalogEntityRelationsTable.js.map
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
3
|
+
import { BffCatalogEntity, BffCatalogRelatedEntity, SortOption } from '../../../../core/types';
|
|
4
|
+
export type CatalogEntityTeamRelationsProps = {
|
|
5
|
+
entity: BffCatalogEntity;
|
|
6
|
+
catalogConfig: CatalogEntityConfig;
|
|
7
|
+
entitiesCatalogConfig: EntitiesCatalogConfig;
|
|
8
|
+
relations: BffCatalogRelatedEntity[];
|
|
9
|
+
query: {
|
|
10
|
+
fetchNextPage: () => void;
|
|
11
|
+
isFetchingNextPage: boolean;
|
|
12
|
+
hasNextPage: boolean;
|
|
13
|
+
};
|
|
14
|
+
searchQuery: string;
|
|
15
|
+
setSearchQuery: (query: string) => void;
|
|
16
|
+
sortOption: SortOption | null;
|
|
17
|
+
setSortOption: (sortOption: SortOption | null) => void;
|
|
18
|
+
handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
|
|
19
|
+
isColumnSorted: (sortKey: string, direction: 'asc' | 'desc') => boolean;
|
|
20
|
+
shouldShowLoadMore: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare function CatalogEntityTeamRelations({ entity, relations, query, searchQuery, setSearchQuery, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }: CatalogEntityTeamRelationsProps): JSX.Element;
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
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.CatalogEntityTeamRelations = CatalogEntityTeamRelations;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const Tabs_1 = require("../../../../markdoc/components/Tabs/Tabs");
|
|
10
|
+
const PeopleIcon_1 = require("../../../../icons/PeopleIcon/PeopleIcon");
|
|
11
|
+
const EntityTypeIcon_1 = require("../../../../icons/EntityTypeIcon/EntityTypeIcon");
|
|
12
|
+
const Tag_1 = require("../../../../components/Tag/Tag");
|
|
13
|
+
const CatalogEntityRelationsTable_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable");
|
|
14
|
+
const CatalogUserEntityCell_1 = require("../../../../components/Catalog/CatalogTableView/CatalogUserEntityCell");
|
|
15
|
+
const CatalogEntityDefaultRelations_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations");
|
|
16
|
+
const teamColumns = [
|
|
17
|
+
{
|
|
18
|
+
key: 'entity',
|
|
19
|
+
title: 'User name',
|
|
20
|
+
render: (entity) => {
|
|
21
|
+
var _a;
|
|
22
|
+
return (react_1.default.createElement(CatalogUserEntityCell_1.CatalogUserEntityCell, { name: entity.title, email: (_a = entity.metadata) === null || _a === void 0 ? void 0 : _a.email }));
|
|
23
|
+
},
|
|
24
|
+
width: '2fr',
|
|
25
|
+
sortable: true,
|
|
26
|
+
sortKey: 'title',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: 'metadata',
|
|
30
|
+
title: 'Role',
|
|
31
|
+
render: (entity) => { var _a, _b; return (((_a = entity.metadata) === null || _a === void 0 ? void 0 : _a.role) ? react_1.default.createElement(Tag_1.Tag, null, (_b = entity.metadata) === null || _b === void 0 ? void 0 : _b.role) : null); },
|
|
32
|
+
width: '2fr',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
key: 'description',
|
|
36
|
+
title: 'Description',
|
|
37
|
+
render: (entity) => react_1.default.createElement(EntityDescription, null, entity.summary),
|
|
38
|
+
width: '3fr',
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
function CatalogEntityTeamRelations({ entity, relations, query, searchQuery, setSearchQuery, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }) {
|
|
42
|
+
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations" },
|
|
43
|
+
react_1.default.createElement(Tabs_1.Tabs, { forceReady: relations.length > 0, size: Tabs_1.TabsSize.MEDIUM },
|
|
44
|
+
react_1.default.createElement(TabItem, { label: "Members", icon: react_1.default.createElement(PeopleIcon_1.PeopleIcon, null) },
|
|
45
|
+
react_1.default.createElement(CatalogEntityRelationsTable_1.CatalogEntityRelationsTable, { entity: entity, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, relations: relations, query: query, searchQuery: searchQuery, setSearchQuery: setSearchQuery, heading: "Members", filter: "type:user", columns: teamColumns, sortOption: sortOption, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore })),
|
|
46
|
+
react_1.default.createElement(TabItem, { label: "Related entities", icon: react_1.default.createElement(EntityTypeIcon_1.EntityTypeIcon, null) },
|
|
47
|
+
react_1.default.createElement(CatalogEntityDefaultRelations_1.CatalogEntityDefaultRelations, { entity: entity, relations: relations, query: query, searchQuery: searchQuery, setSearchQuery: setSearchQuery, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, sortOption: sortOption, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore })))));
|
|
48
|
+
}
|
|
49
|
+
const TabItem = styled_components_1.default.div `
|
|
50
|
+
padding: 12px;
|
|
51
|
+
`;
|
|
52
|
+
const EntityDescription = styled_components_1.default.div `
|
|
53
|
+
font-size: var(--catalog-table-entity-summary-font-size);
|
|
54
|
+
line-height: var(--catalog-table-entity-summary-line-height);
|
|
55
|
+
display: -webkit-box;
|
|
56
|
+
-webkit-line-clamp: 2;
|
|
57
|
+
-webkit-box-orient: vertical;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
`;
|
|
60
|
+
//# sourceMappingURL=CatalogEntityTeamRelations.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
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.CatalogEntityIcon = CatalogEntityIcon;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const CodeIcon_1 = require("../../icons/CodeIcon/CodeIcon");
|
|
9
|
+
const GraphIcon_1 = require("../../icons/GraphIcon/GraphIcon");
|
|
10
|
+
const PeopleIcon_1 = require("../../icons/PeopleIcon/PeopleIcon");
|
|
11
|
+
const UserIcon_1 = require("../../icons/UserIcon/UserIcon");
|
|
12
|
+
const iconColor = 'var(--catalog-entity-icon-color)';
|
|
13
|
+
const entityIconMap = {
|
|
14
|
+
service: react_1.default.createElement(CodeIcon_1.CodeIcon, { color: iconColor }),
|
|
15
|
+
domain: react_1.default.createElement(GraphIcon_1.GraphIcon, { color: iconColor }),
|
|
16
|
+
team: react_1.default.createElement(PeopleIcon_1.PeopleIcon, { color: iconColor }),
|
|
17
|
+
user: react_1.default.createElement(UserIcon_1.UserIcon, { color: iconColor }),
|
|
18
|
+
'api-description': react_1.default.createElement(CodeIcon_1.CodeIcon, { color: iconColor }),
|
|
19
|
+
};
|
|
20
|
+
function CatalogEntityIcon({ entityType }) {
|
|
21
|
+
const key = entityType.toLowerCase();
|
|
22
|
+
switch (key) {
|
|
23
|
+
case 'service':
|
|
24
|
+
return entityIconMap.service;
|
|
25
|
+
case 'domain':
|
|
26
|
+
return entityIconMap.domain;
|
|
27
|
+
case 'team':
|
|
28
|
+
return entityIconMap.team;
|
|
29
|
+
case 'user':
|
|
30
|
+
return entityIconMap.user;
|
|
31
|
+
case 'api-description':
|
|
32
|
+
return entityIconMap['api-description'];
|
|
33
|
+
default:
|
|
34
|
+
const exhaustiveCheck = key;
|
|
35
|
+
throw new Error(`Unhandled entity type: ${exhaustiveCheck}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=CatalogEntityIcon.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
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.CatalogEntityTypeIcon = CatalogEntityTypeIcon;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const CodeIcon_1 = require("../../icons/CodeIcon/CodeIcon");
|
|
10
|
+
const GraphIcon_1 = require("../../icons/GraphIcon/GraphIcon");
|
|
11
|
+
const PeopleIcon_1 = require("../../icons/PeopleIcon/PeopleIcon");
|
|
12
|
+
const UserIcon_1 = require("../../icons/UserIcon/UserIcon");
|
|
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)));
|
|
30
|
+
}
|
|
31
|
+
const IconContainer = styled_components_1.default.div `
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
width: var(--catalog-table-icon-width);
|
|
36
|
+
height: var(--catalog-table-icon-height);
|
|
37
|
+
border-radius: var(--catalog-table-icon-border-radius);
|
|
38
|
+
background-color: var(--catalog-table-icon-bg-color);
|
|
39
|
+
flex-shrink: 0;
|
|
40
|
+
border: var(--catalog-table-icon-border-width) solid var(--catalog-table-icon-border-color);
|
|
41
|
+
`;
|
|
42
|
+
//# sourceMappingURL=CatalogEntityTypeIcon.js.map
|
|
@@ -0,0 +1,48 @@
|
|
|
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.HighlightContext = void 0;
|
|
7
|
+
exports.CatalogHighlight = CatalogHighlight;
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const highlight_words_core_1 = require("highlight-words-core");
|
|
10
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
11
|
+
exports.HighlightContext = react_1.default.createContext([]);
|
|
12
|
+
function CatalogHighlight(props) {
|
|
13
|
+
const { children } = props;
|
|
14
|
+
const searchWords = react_1.default.useContext(exports.HighlightContext);
|
|
15
|
+
if (!searchWords.length) {
|
|
16
|
+
return children ? react_1.default.createElement(react_1.default.Fragment, null, children) : null;
|
|
17
|
+
}
|
|
18
|
+
function highlight(str, childIdx = 0) {
|
|
19
|
+
const chunks = (0, highlight_words_core_1.findAll)({
|
|
20
|
+
searchWords,
|
|
21
|
+
textToHighlight: str,
|
|
22
|
+
});
|
|
23
|
+
return (react_1.default.createElement("span", { "data-component-name": "Catalog/CatalogHighlight", key: childIdx }, chunks.map((chunk, idx) => {
|
|
24
|
+
const { end, highlight, start } = chunk;
|
|
25
|
+
const text = str.substr(start, end - start);
|
|
26
|
+
if (highlight) {
|
|
27
|
+
return react_1.default.createElement(HighlightedText, { key: idx }, text);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return text;
|
|
31
|
+
}
|
|
32
|
+
})));
|
|
33
|
+
}
|
|
34
|
+
if (typeof children === 'string') {
|
|
35
|
+
return highlight(children);
|
|
36
|
+
}
|
|
37
|
+
else if (Array.isArray(children)) {
|
|
38
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, children.map((child, idx) => typeof children === 'string' ? highlight(child, idx) : child || null)));
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return react_1.default.createElement(react_1.default.Fragment, null, children);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const HighlightedText = styled_components_1.default.span `
|
|
45
|
+
background-color: var(--catalog-highlight-bg-color);
|
|
46
|
+
color: var(--catalog-highlight-text-color);
|
|
47
|
+
`;
|
|
48
|
+
//# sourceMappingURL=CatalogHighlight.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type CatalogPageDescriptionProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
titleTranslationKey?: string;
|
|
5
|
+
description: string;
|
|
6
|
+
descriptionTranslationKey?: string;
|
|
7
|
+
tag: number | string;
|
|
8
|
+
};
|
|
9
|
+
export declare function CatalogPageDescription({ title, titleTranslationKey, description, descriptionTranslationKey, tag, }: CatalogPageDescriptionProps): React.JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
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.CatalogPageDescription = CatalogPageDescription;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const utils_1 = require("../../core/utils");
|
|
10
|
+
const H3_1 = require("../../components/Typography/H3");
|
|
11
|
+
const CounterTag_1 = require("../Tags/CounterTag");
|
|
12
|
+
function CatalogPageDescription({ title, titleTranslationKey, description, descriptionTranslationKey, tag, }) {
|
|
13
|
+
return (react_1.default.createElement(CatalogPageDescriptionWrapper, null,
|
|
14
|
+
react_1.default.createElement(CatalogTitleWrapper, null,
|
|
15
|
+
react_1.default.createElement(CatalogTitle, { "data-translation-key": titleTranslationKey }, title),
|
|
16
|
+
react_1.default.createElement(CounterTag_1.CounterTag, { borderless: true }, tag)),
|
|
17
|
+
react_1.default.createElement(CatalogDescription, { "data-translation-key": descriptionTranslationKey }, description)));
|
|
18
|
+
}
|
|
19
|
+
const CatalogPageDescriptionWrapper = styled_components_1.default.div `
|
|
20
|
+
margin: var(--catalog-heading-margin);
|
|
21
|
+
display: var(--catalog-page-description-display-mobile);
|
|
22
|
+
|
|
23
|
+
@media screen and (min-width: ${utils_1.breakpoints.medium}) {
|
|
24
|
+
display: var(--catalog-page-description-display-desktop);
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
const CatalogTitleWrapper = styled_components_1.default.div `
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
color: var(--catalog-title-text-color);
|
|
31
|
+
font-weight: var(--catalog-title-font-weight) !important;
|
|
32
|
+
font-size: var(--catalog-title-font-size);
|
|
33
|
+
`;
|
|
34
|
+
const CatalogTitle = (0, styled_components_1.default)(H3_1.H3) `
|
|
35
|
+
color: var(--catalog-title-text-color);
|
|
36
|
+
font-weight: var(--catalog-title-font-weight) !important;
|
|
37
|
+
font-size: var(--catalog-title-font-size);
|
|
38
|
+
margin: var(--catalog-title-margin);
|
|
39
|
+
margin-right: var(--catalog-title-spacing-right);
|
|
40
|
+
`;
|
|
41
|
+
const CatalogDescription = styled_components_1.default.p `
|
|
42
|
+
color: var(--catalog-description-text-color);
|
|
43
|
+
font-weight: var(--catalog-description-font-weight);
|
|
44
|
+
font-size: var(--catalog-description-font-size);
|
|
45
|
+
margin: var(--catalog-description-margin);
|
|
46
|
+
line-height: var(--catalog-description-line-height);
|
|
47
|
+
display: -webkit-box;
|
|
48
|
+
-webkit-line-clamp: 3;
|
|
49
|
+
-webkit-box-orient: vertical;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
`;
|
|
52
|
+
//# sourceMappingURL=CatalogPageDescription.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { Select } from '../../components/Select/Select';
|
|
3
|
+
import { CatalogSwitcherItem, SortOption } from '../../core';
|
|
4
|
+
export type CatalogSelectorProps = {
|
|
5
|
+
catalogSwitcherItems: CatalogSwitcherItem[];
|
|
6
|
+
setSearchQuery: (query: string) => void;
|
|
7
|
+
setSortOption: (option: SortOption | null) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function CatalogSelector({ catalogSwitcherItems, setSearchQuery, setSortOption, }: CatalogSelectorProps): JSX.Element;
|
|
10
|
+
export declare const CatalogSelectWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
11
|
+
export declare const CatalogSelectLabel: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
12
|
+
export declare const CatalogSelect: import("styled-components").StyledComponent<typeof Select, any, {}, never>;
|