@redocly/theme 0.56.0-next.2 → 0.56.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +4 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +1 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +4 -11
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +7 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +4 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.js +7 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.js +19 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +1 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +11 -8
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +31 -6
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +0 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +2 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +11 -5
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +55 -0
- package/lib/components/Catalog/CatalogEntityIcon.d.ts +2 -1
- package/lib/components/Catalog/CatalogEntityIcon.js +22 -23
- package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +2 -1
- package/lib/components/Catalog/CatalogEntityTypeIcon.js +11 -23
- package/lib/components/Catalog/CatalogEntityTypeTag.d.ts +7 -0
- package/lib/components/Catalog/CatalogEntityTypeTag.js +36 -0
- package/lib/components/Catalog/CatalogPageDescription.js +2 -2
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.d.ts +6 -4
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +2 -14
- package/lib/components/Catalog/CatalogTableView/CatalogEntityRelationCell.d.ts +3 -0
- package/lib/components/Catalog/CatalogTableView/CatalogEntityRelationCell.js +11 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +1 -2
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +3 -26
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +0 -2
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +5 -26
- package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +1 -1
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +5 -6
- package/lib/components/Catalog/variables.js +36 -7
- package/lib/components/Menu/variables.js +2 -0
- package/lib/components/Tag/Tag.d.ts +2 -1
- package/lib/components/Tag/Tag.js +3 -3
- package/lib/components/Tag/variables.js +14 -0
- package/lib/components/Tags/CounterTag.d.ts +1 -1
- package/lib/components/Tags/HttpTag.d.ts +1 -1
- package/lib/core/constants/catalog.d.ts +3 -0
- package/lib/core/constants/catalog.js +55 -1
- package/lib/core/constants/index.d.ts +5 -5
- package/lib/core/constants/index.js +5 -5
- package/lib/core/constants/search.d.ts +1 -1
- package/lib/core/contexts/CodeWalkthrough/CodeWalkthroughControlsContext.d.ts +1 -1
- package/lib/core/contexts/CodeWalkthrough/CodeWalkthroughStepsContext.d.ts +1 -1
- package/lib/core/contexts/ThemeDataContext.d.ts +1 -1
- package/lib/core/contexts/index.d.ts +3 -3
- package/lib/core/contexts/index.js +3 -3
- package/lib/core/hoc/index.d.ts +1 -1
- package/lib/core/hoc/index.js +1 -1
- package/lib/core/hooks/__mocks__/index.d.ts +28 -28
- package/lib/core/hooks/__mocks__/index.js +28 -28
- package/lib/core/hooks/catalog/useCatalogEntities.d.ts +1 -1
- package/lib/core/hooks/catalog/useCatalogTableViewRow.js +2 -2
- package/lib/core/hooks/code-walkthrough/use-code-panel.js +6 -5
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.js +8 -5
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.d.ts +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.js +9 -9
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough.d.ts +2 -2
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough.js +4 -3
- package/lib/core/hooks/code-walkthrough/use-renderable-files.js +6 -4
- package/lib/core/hooks/feedback/use-report-dialog.js +4 -3
- package/lib/core/hooks/index.d.ts +42 -42
- package/lib/core/hooks/index.js +42 -42
- package/lib/core/hooks/menu/use-menu-item-expanded.d.ts +1 -1
- package/lib/core/hooks/menu/use-mobile-menu-items.d.ts +1 -1
- package/lib/core/hooks/menu/use-mobile-menu-items.js +13 -12
- package/lib/core/hooks/menu/use-mobile-menu-levels.d.ts +1 -1
- package/lib/core/hooks/menu/use-mobile-menu-levels.js +8 -7
- package/lib/core/hooks/menu/use-nested-menu.d.ts +1 -1
- package/lib/core/hooks/menu/use-nested-menu.js +8 -6
- package/lib/core/hooks/search/use-recent-searches.js +3 -3
- package/lib/core/hooks/search/use-search-dialog.js +4 -3
- package/lib/core/hooks/search/use-search-filter.d.ts +1 -1
- package/lib/core/hooks/search/use-suggested-pages.js +2 -2
- package/lib/core/hooks/use-active-page-version.js +2 -2
- package/lib/core/hooks/use-active-section-id.js +2 -2
- package/lib/core/hooks/use-color-switcher.js +4 -3
- package/lib/core/hooks/use-input-key-commands.js +2 -2
- package/lib/core/hooks/use-language-picker.d.ts +1 -1
- package/lib/core/hooks/use-language-picker.js +4 -4
- package/lib/core/hooks/use-mobile-menu.js +2 -2
- package/lib/core/hooks/use-navbar-height.js +3 -3
- package/lib/core/hooks/use-page-versions.js +2 -2
- package/lib/core/hooks/use-product-picker.js +2 -2
- package/lib/core/hooks/use-theme-config.js +2 -2
- package/lib/core/hooks/use-theme-hooks.d.ts +1 -1
- package/lib/core/hooks/use-theme-hooks.js +2 -2
- package/lib/core/hooks/use-time-ago.js +2 -2
- package/lib/core/hooks/use-user-teams.js +2 -2
- package/lib/core/index.d.ts +7 -7
- package/lib/core/index.js +7 -7
- package/lib/core/openapi/index.d.ts +18 -0
- package/lib/core/openapi/index.js +48 -0
- package/lib/core/styles/global.js +1 -1
- package/lib/core/styles/index.d.ts +2 -2
- package/lib/core/styles/index.js +2 -2
- package/lib/core/templates/Markdown.d.ts +1 -1
- package/lib/core/templates/Markdown.js +8 -6
- package/lib/core/types/catalog.d.ts +6 -2
- package/lib/core/types/code-walkthrough.d.ts +1 -1
- package/lib/core/types/feedback.d.ts +1 -1
- package/lib/core/types/filter.d.ts +1 -1
- package/lib/core/types/hooks.d.ts +11 -3
- package/lib/core/types/index.d.ts +18 -18
- package/lib/core/types/index.js +18 -18
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/search.d.ts +1 -1
- package/lib/core/types/sidebar.d.ts +1 -1
- package/lib/core/utils/download-code-walkthrough.js +6 -4
- package/lib/core/utils/get-code-walkthrough-file-text.js +4 -3
- package/lib/core/utils/index.d.ts +35 -35
- package/lib/core/utils/index.js +35 -35
- package/lib/core/utils/load-and-navigate.js +2 -2
- package/lib/core/utils/match-code-walkthrough-conditions.js +3 -3
- package/lib/core/utils/menu.d.ts +3 -2
- package/lib/core/utils/menu.js +12 -12
- package/lib/core/utils/toc.d.ts +1 -1
- package/lib/core/utils/type-guards.d.ts +1 -1
- package/lib/core/utils/type-guards.js +5 -5
- package/lib/core/utils/urls.d.ts +1 -1
- package/lib/core/utils/urls.js +2 -2
- package/lib/icons/MoleculesIcon/MoleculesIcon.d.ts +9 -0
- package/lib/icons/MoleculesIcon/MoleculesIcon.js +22 -0
- package/lib/icons/NetworkIcon/NetworkIcon.d.ts +9 -0
- package/lib/icons/NetworkIcon/NetworkIcon.js +23 -0
- package/lib/icons/NotesIcon/NotesIcon.d.ts +9 -0
- package/lib/icons/NotesIcon/NotesIcon.js +26 -0
- package/lib/markdoc/components/Tabs/TabList.js +2 -0
- package/package.json +2 -2
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +6 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +7 -15
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +7 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +4 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +2 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +10 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +36 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +19 -22
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +8 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +0 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +16 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +52 -0
- package/src/components/Catalog/CatalogEntityIcon.tsx +33 -27
- package/src/components/Catalog/CatalogEntityTypeIcon.tsx +23 -28
- package/src/components/Catalog/CatalogEntityTypeTag.tsx +43 -0
- package/src/components/Catalog/CatalogPageDescription.tsx +4 -3
- package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +7 -20
- package/src/components/Catalog/CatalogTableView/CatalogEntityRelationCell.tsx +19 -0
- package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +4 -2
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +3 -31
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +5 -31
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +10 -19
- package/src/components/Catalog/variables.ts +36 -7
- package/src/components/Menu/variables.ts +2 -0
- package/src/components/Tag/Tag.tsx +11 -2
- package/src/components/Tag/variables.ts +14 -0
- package/src/core/constants/catalog.ts +58 -0
- package/src/core/constants/index.ts +5 -5
- package/src/core/constants/search.ts +1 -1
- package/src/core/contexts/CodeWalkthrough/CodeWalkthroughControlsContext.tsx +1 -1
- package/src/core/contexts/CodeWalkthrough/CodeWalkthroughStepsContext.tsx +1 -1
- package/src/core/contexts/ThemeDataContext.tsx +3 -3
- package/src/core/contexts/index.ts +3 -3
- package/src/core/hoc/index.ts +1 -1
- package/src/core/hooks/__mocks__/index.ts +28 -28
- package/src/core/hooks/catalog/useCatalogEntities.ts +1 -1
- package/src/core/hooks/catalog/useCatalogTableViewRow.ts +1 -1
- package/src/core/hooks/code-walkthrough/use-code-panel.ts +3 -5
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-controls.ts +4 -6
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-steps.ts +4 -3
- package/src/core/hooks/code-walkthrough/use-code-walkthrough.ts +3 -3
- package/src/core/hooks/code-walkthrough/use-renderable-files.ts +4 -6
- package/src/core/hooks/feedback/use-report-dialog.ts +3 -2
- package/src/core/hooks/index.ts +42 -42
- package/src/core/hooks/menu/use-menu-item-expanded.ts +1 -1
- package/src/core/hooks/menu/use-mobile-menu-items.ts +4 -7
- package/src/core/hooks/menu/use-mobile-menu-levels.ts +3 -2
- package/src/core/hooks/menu/use-nested-menu.ts +5 -3
- package/src/core/hooks/search/use-recent-searches.ts +1 -1
- package/src/core/hooks/search/use-search-dialog.ts +2 -1
- package/src/core/hooks/search/use-search-filter.ts +1 -1
- package/src/core/hooks/search/use-suggested-pages.ts +1 -1
- package/src/core/hooks/use-active-page-version.ts +1 -1
- package/src/core/hooks/use-active-section-id.ts +1 -1
- package/src/core/hooks/use-codeblock-tabs-controls.ts +1 -1
- package/src/core/hooks/use-color-switcher.ts +2 -1
- package/src/core/hooks/use-input-key-commands.ts +1 -1
- package/src/core/hooks/use-language-picker.ts +3 -3
- package/src/core/hooks/use-mobile-menu.ts +1 -1
- package/src/core/hooks/use-navbar-height.ts +1 -1
- package/src/core/hooks/use-page-versions.ts +1 -1
- package/src/core/hooks/use-product-picker.ts +1 -1
- package/src/core/hooks/use-theme-config.ts +2 -2
- package/src/core/hooks/use-theme-hooks.ts +2 -2
- package/src/core/hooks/use-time-ago.ts +3 -2
- package/src/core/hooks/use-user-teams.ts +1 -1
- package/src/core/index.ts +7 -7
- package/src/core/openapi/index.ts +31 -0
- package/src/core/styles/global.ts +2 -1
- package/src/core/styles/index.ts +2 -2
- package/src/core/templates/Markdown.tsx +8 -4
- package/src/core/types/catalog.ts +15 -2
- package/src/core/types/code-walkthrough.ts +1 -1
- package/src/core/types/feedback.ts +6 -6
- package/src/core/types/filter.ts +1 -1
- package/src/core/types/hooks.ts +17 -16
- package/src/core/types/index.ts +18 -18
- package/src/core/types/l10n.ts +4 -0
- package/src/core/types/search.ts +1 -1
- package/src/core/types/sidebar.ts +1 -1
- package/src/core/utils/download-code-walkthrough.ts +3 -5
- package/src/core/utils/get-code-walkthrough-file-text.ts +2 -1
- package/src/core/utils/index.ts +35 -35
- package/src/core/utils/load-and-navigate.ts +1 -1
- package/src/core/utils/match-code-walkthrough-conditions.ts +1 -1
- package/src/core/utils/menu.ts +4 -3
- package/src/core/utils/toc.ts +1 -1
- package/src/core/utils/type-guards.ts +2 -2
- package/src/core/utils/urls.ts +2 -2
- package/src/icons/MoleculesIcon/MoleculesIcon.tsx +23 -0
- package/src/icons/NetworkIcon/NetworkIcon.tsx +31 -0
- package/src/icons/NotesIcon/NotesIcon.tsx +43 -0
- package/src/markdoc/components/Tabs/TabList.tsx +1 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isFromToSelectedOptions = exports.isNavLinkItem =
|
|
3
|
+
exports.isFromToSelectedOptions = exports.isNavLinkItem = void 0;
|
|
4
4
|
exports.isUndefined = isUndefined;
|
|
5
5
|
exports.isNull = isNull;
|
|
6
6
|
exports.isString = isString;
|
|
7
7
|
exports.isNotNull = isNotNull;
|
|
8
|
+
exports.isObject = isObject;
|
|
8
9
|
function isUndefined(value) {
|
|
9
10
|
return value === undefined;
|
|
10
11
|
}
|
|
@@ -17,16 +18,15 @@ function isString(value) {
|
|
|
17
18
|
function isNotNull(value) {
|
|
18
19
|
return !isNull(value);
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
function isObject(item) {
|
|
21
22
|
return isNotNull(item) && typeof item === 'object';
|
|
22
|
-
}
|
|
23
|
-
exports.isObject = isObject;
|
|
23
|
+
}
|
|
24
24
|
const isNavLinkItem = (item) => {
|
|
25
25
|
return item.link !== undefined;
|
|
26
26
|
};
|
|
27
27
|
exports.isNavLinkItem = isNavLinkItem;
|
|
28
28
|
const isFromToSelectedOptions = (options) => {
|
|
29
|
-
return
|
|
29
|
+
return isObject(options) && 'from' in options && 'to' in options;
|
|
30
30
|
};
|
|
31
31
|
exports.isFromToSelectedOptions = isFromToSelectedOptions;
|
|
32
32
|
//# sourceMappingURL=type-guards.js.map
|
package/lib/core/utils/urls.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Locale } from '
|
|
1
|
+
import type { Locale } from '../types/l10n';
|
|
2
2
|
export declare function combineUrls(baseURL: string, ...relativeURLs: (string | undefined)[]): string;
|
|
3
3
|
export declare function withPathPrefix(url: string): string;
|
|
4
4
|
export declare function withoutPathPrefix(pathname: string): string;
|
package/lib/core/utils/urls.js
CHANGED
|
@@ -14,7 +14,7 @@ exports.slash = slash;
|
|
|
14
14
|
exports.addTrailingSlash = addTrailingSlash;
|
|
15
15
|
exports.getPathnameForLocale = getPathnameForLocale;
|
|
16
16
|
exports.getLocaleFromPathname = getLocaleFromPathname;
|
|
17
|
-
const
|
|
17
|
+
const common_1 = require("../constants/common");
|
|
18
18
|
function combineUrls(baseURL, ...relativeURLs) {
|
|
19
19
|
let res = baseURL;
|
|
20
20
|
for (let relativeURL of relativeURLs) {
|
|
@@ -107,7 +107,7 @@ function getPathnameForLocale(originalPathname, defaultLocale, newLocale, allLoc
|
|
|
107
107
|
* @param allLocales - Array of all available locales to check against
|
|
108
108
|
* @returns The locale code from the pathname, or the default locale if none found
|
|
109
109
|
*/
|
|
110
|
-
function getLocaleFromPathname(pathname, defaultLocale =
|
|
110
|
+
function getLocaleFromPathname(pathname, defaultLocale = common_1.DEFAULT_LOCALE_PLACEHOLDER, allLocales = []) {
|
|
111
111
|
const maybeLocale = pathname === null || pathname === void 0 ? void 0 : pathname.split('/')[1];
|
|
112
112
|
const locale = allLocales.find((locale) => locale.code.toLowerCase() === maybeLocale);
|
|
113
113
|
return (locale === null || locale === void 0 ? void 0 : locale.code) || defaultLocale;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const MoleculesIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & {
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">;
|
|
@@ -0,0 +1,22 @@
|
|
|
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.MoleculesIcon = void 0;
|
|
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 Icon = (props) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M13.625 11.375C13.2277 11.3769 12.8386 11.4878 12.5 11.6956L10.7619 9.95188C11.1663 9.38137 11.3835 8.69932 11.3835 8C11.3835 7.30068 11.1663 6.61863 10.7619 6.04813L12.5 4.30438C12.8386 4.51216 13.2277 4.62306 13.625 4.625C14.07 4.625 14.505 4.49304 14.875 4.24581C15.245 3.99857 15.5334 3.64717 15.7037 3.23604C15.874 2.8249 15.9186 2.3725 15.8318 1.93605C15.745 1.49959 15.5307 1.09868 15.216 0.784011C14.9013 0.469343 14.5004 0.255051 14.064 0.168234C13.6275 0.0814174 13.1751 0.125975 12.764 0.296272C12.3528 0.466569 12.0014 0.754957 11.7542 1.12497C11.507 1.49498 11.375 1.92999 11.375 2.375C11.3769 2.77227 11.4878 3.1614 11.6956 3.5L9.95188 5.23813C9.38137 4.83369 8.69932 4.61645 8 4.61645C7.30068 4.61645 6.61863 4.83369 6.04813 5.23813L4.30438 3.5C4.51216 3.1614 4.62306 2.77227 4.625 2.375C4.625 1.92999 4.49304 1.49498 4.24581 1.12497C3.99857 0.754957 3.64717 0.466569 3.23604 0.296272C2.8249 0.125975 2.3725 0.0814174 1.93605 0.168234C1.49959 0.255051 1.09868 0.469343 0.784011 0.784011C0.469343 1.09868 0.255051 1.49959 0.168234 1.93605C0.0814174 2.3725 0.125975 2.8249 0.296272 3.23604C0.466569 3.64717 0.754957 3.99857 1.12497 4.24581C1.49498 4.49304 1.92999 4.625 2.375 4.625C2.77227 4.62306 3.1614 4.51216 3.5 4.30438L5.23813 6.04813C4.83369 6.61863 4.61645 7.30068 4.61645 8C4.61645 8.69932 4.83369 9.38137 5.23813 9.95188L3.5 11.6956C3.1614 11.4878 2.77227 11.3769 2.375 11.375C1.92999 11.375 1.49498 11.507 1.12497 11.7542C0.754957 12.0014 0.466569 12.3528 0.296272 12.764C0.125975 13.1751 0.0814174 13.6275 0.168234 14.064C0.255051 14.5004 0.469343 14.9013 0.784011 15.216C1.09868 15.5307 1.49959 15.745 1.93605 15.8318C2.3725 15.9186 2.8249 15.874 3.23604 15.7037C3.64717 15.5334 3.99857 15.245 4.24581 14.875C4.49304 14.505 4.625 14.07 4.625 13.625C4.62306 13.2277 4.51216 12.8386 4.30438 12.5L6.04813 10.7619C6.61863 11.1663 7.30068 11.3835 8 11.3835C8.69932 11.3835 9.38137 11.1663 9.95188 10.7619L11.6956 12.5C11.4878 12.8386 11.3769 13.2277 11.375 13.625C11.375 14.07 11.507 14.505 11.7542 14.875C12.0014 15.245 12.3528 15.5334 12.764 15.7037C13.1751 15.874 13.6275 15.9186 14.064 15.8318C14.5004 15.745 14.9013 15.5307 15.216 15.216C15.5307 14.9013 15.745 14.5004 15.8318 14.064C15.9186 13.6275 15.874 13.1751 15.7037 12.764C15.5334 12.3528 15.245 12.0014 14.875 11.7542C14.505 11.507 14.07 11.375 13.625 11.375ZM13.625 1.25C13.8475 1.25 14.065 1.31598 14.25 1.4396C14.435 1.56321 14.5792 1.73892 14.6644 1.94448C14.7495 2.15005 14.7718 2.37625 14.7284 2.59448C14.685 2.81271 14.5778 3.01316 14.4205 3.1705C14.2632 3.32783 14.0627 3.43498 13.8445 3.47838C13.6262 3.52179 13.4 3.49951 13.1945 3.41437C12.9889 3.32922 12.8132 3.18502 12.6896 3.00002C12.566 2.81501 12.5 2.59751 12.5 2.375C12.5 2.07663 12.6185 1.79048 12.8295 1.57951C13.0405 1.36853 13.3266 1.25 13.625 1.25ZM1.25 2.375C1.25 2.1525 1.31598 1.93499 1.4396 1.74998C1.56321 1.56498 1.73892 1.42078 1.94448 1.33564C2.15005 1.25049 2.37625 1.22821 2.59448 1.27162C2.81271 1.31503 3.01316 1.42217 3.1705 1.57951C3.32783 1.73684 3.43498 1.9373 3.47838 2.15552C3.52179 2.37375 3.49951 2.59995 3.41437 2.80552C3.32922 3.01109 3.18502 3.18679 3.00002 3.3104C2.81501 3.43402 2.59751 3.5 2.375 3.5C2.07663 3.5 1.79048 3.38147 1.57951 3.1705C1.36853 2.95952 1.25 2.67337 1.25 2.375ZM2.375 14.75C2.1525 14.75 1.93499 14.684 1.74998 14.5604C1.56498 14.4368 1.42078 14.2611 1.33564 14.0555C1.25049 13.85 1.22821 13.6238 1.27162 13.4055C1.31503 13.1873 1.42217 12.9868 1.57951 12.8295C1.73684 12.6722 1.9373 12.565 2.15552 12.5216C2.37375 12.4782 2.59995 12.5005 2.80552 12.5856C3.01109 12.6708 3.18679 12.815 3.3104 13C3.43402 13.185 3.5 13.4025 3.5 13.625C3.5 13.9234 3.38147 14.2095 3.1705 14.4205C2.95952 14.6315 2.67337 14.75 2.375 14.75ZM8 10.25C7.55499 10.25 7.11998 10.118 6.74997 9.87081C6.37996 9.62357 6.09157 9.27217 5.92127 8.86104C5.75097 8.4499 5.70642 7.99751 5.79323 7.56105C5.88005 7.12459 6.09434 6.72368 6.40901 6.40901C6.72368 6.09434 7.12459 5.88005 7.56105 5.79323C7.99751 5.70642 8.4499 5.75097 8.86104 5.92127C9.27217 6.09157 9.62357 6.37996 9.87081 6.74997C10.118 7.11998 10.25 7.55499 10.25 8C10.25 8.59674 10.0129 9.16903 9.59099 9.59099C9.16903 10.0129 8.59674 10.25 8 10.25ZM13.625 14.75C13.4025 14.75 13.185 14.684 13 14.5604C12.815 14.4368 12.6708 14.2611 12.5856 14.0555C12.5005 13.85 12.4782 13.6238 12.5216 13.4055C12.565 13.1873 12.6722 12.9868 12.8295 12.8295C12.9868 12.6722 13.1873 12.565 13.4055 12.5216C13.6238 12.4782 13.85 12.5005 14.0555 12.5856C14.2611 12.6708 14.4368 12.815 14.5604 13C14.684 13.185 14.75 13.4025 14.75 13.625C14.75 13.9234 14.6315 14.2095 14.4205 14.4205C14.2095 14.6315 13.9234 14.75 13.625 14.75Z" })));
|
|
12
|
+
exports.MoleculesIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
13
|
+
'data-component-name': 'icons/MoleculesIcon/MoleculesIcon',
|
|
14
|
+
})) `
|
|
15
|
+
path {
|
|
16
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
height: ${({ size }) => size || '16px'};
|
|
20
|
+
width: ${({ size }) => size || '16px'};
|
|
21
|
+
`;
|
|
22
|
+
//# sourceMappingURL=MoleculesIcon.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const NetworkIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & {
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">;
|
|
@@ -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.NetworkIcon = void 0;
|
|
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 Icon = (props) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none" }, props),
|
|
11
|
+
react_1.default.createElement("rect", { width: "18", height: "18" }),
|
|
12
|
+
react_1.default.createElement("path", { d: "M16.3125 13.6036V4.39644C16.9659 4.16323 17.4375 3.54471 17.4375 2.8125C17.4375 1.88196 16.6805 1.125 15.75 1.125C14.8195 1.125 14.0625 1.88196 14.0625 2.8125C14.0625 3.03278 14.1078 3.2418 14.1847 3.43462L9 7.97141L3.81527 3.43485C3.89233 3.24174 3.9375 3.03278 3.9375 2.8125C3.9375 1.88196 3.18054 1.125 2.25 1.125C1.31946 1.125 0.5625 1.88196 0.5625 2.8125C0.5625 3.54476 1.0341 4.16329 1.6875 4.39616V13.6038C1.0341 13.8367 0.5625 14.4552 0.5625 15.1874C0.5625 16.118 1.31946 16.8749 2.25 16.8749C3.18054 16.8749 3.9375 16.118 3.9375 15.1874C3.9375 14.8125 3.81049 14.4692 3.6027 14.1888L6.60279 11.5636L7.93283 13.8911C7.55724 14.2009 7.3125 14.6636 7.3125 15.1874C7.3125 16.118 8.06946 16.8749 9 16.8749C9.93054 16.8749 10.6875 16.118 10.6875 15.1874C10.6875 14.6636 10.4426 14.2009 10.0672 13.8911L11.3972 11.5636L14.3973 14.1888C14.1895 14.4692 14.0625 14.8125 14.0625 15.1874C14.0625 16.118 14.8195 16.8749 15.75 16.8749C16.6805 16.8749 17.4375 16.118 17.4375 15.1874C17.4375 14.4552 16.9659 13.8367 16.3125 13.6036ZM15.75 2.25C16.0602 2.25 16.3125 2.50239 16.3125 2.8125C16.3125 3.12261 16.0602 3.375 15.75 3.375C15.4398 3.375 15.1875 3.12261 15.1875 2.8125C15.1875 2.50239 15.4398 2.25 15.75 2.25ZM13.6001 5.44101L11.1028 9.81135L9.85421 8.71875L13.6001 5.44101ZM8.14584 8.71875L6.89709 9.81135L4.39976 5.44101L8.14584 8.71875ZM2.25 2.25C2.56022 2.25 2.8125 2.50239 2.8125 2.8125C2.8125 3.12261 2.56022 3.375 2.25 3.375C1.93978 3.375 1.6875 3.12261 1.6875 2.8125C1.6875 2.50239 1.93978 2.25 2.25 2.25ZM2.25 15.75C1.93978 15.75 1.6875 15.4976 1.6875 15.1875C1.6875 14.8774 1.93978 14.625 2.25 14.625C2.56022 14.625 2.8125 14.8774 2.8125 15.1875C2.8125 15.4976 2.56022 15.75 2.25 15.75ZM2.8125 13.3855V4.93065L6.03343 10.5672L2.8125 13.3855ZM9 15.75C8.68978 15.75 8.4375 15.4976 8.4375 15.1875C8.4375 14.8774 8.68978 14.625 9 14.625C9.31022 14.625 9.5625 14.8774 9.5625 15.1875C9.5625 15.4976 9.31022 15.75 9 15.75ZM9 13.4915L7.46657 10.8078L9 9.46609L10.5334 10.8078L9 13.4915ZM15.1875 4.93042V13.3855L11.9666 10.5672L15.1875 4.93042ZM15.75 15.7501C15.4398 15.7501 15.1875 15.4977 15.1875 15.1876C15.1875 14.8774 15.4398 14.6251 15.75 14.6251C16.0602 14.6251 16.3125 14.8774 16.3125 15.1876C16.3125 15.4977 16.0602 15.7501 15.75 15.7501Z" })));
|
|
13
|
+
exports.NetworkIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
14
|
+
'data-component-name': 'icons/NetworkIcon/NetworkIcon',
|
|
15
|
+
})) `
|
|
16
|
+
path {
|
|
17
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
height: ${({ size }) => size || '16px'};
|
|
21
|
+
width: ${({ size }) => size || '16px'};
|
|
22
|
+
`;
|
|
23
|
+
//# sourceMappingURL=NetworkIcon.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const NotesIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & {
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">;
|
|
@@ -0,0 +1,26 @@
|
|
|
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.NotesIcon = void 0;
|
|
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 Icon = (props) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M15.25 5.875H10.25V7.125H15.25V5.875Z", fill: "currentColor" }),
|
|
12
|
+
react_1.default.createElement("path", { d: "M7.75 10.875H2.75V12.125H7.75V10.875Z", fill: "currentColor" }),
|
|
13
|
+
react_1.default.createElement("path", { d: "M5.25 9C4.75555 9 4.2722 8.85338 3.86107 8.57867C3.44995 8.30397 3.12952 7.91352 2.9403 7.45671C2.75108 6.99989 2.70157 6.49723 2.79804 6.01227C2.8945 5.52732 3.1326 5.08186 3.48223 4.73223C3.83186 4.3826 4.27732 4.1445 4.76227 4.04804C5.24723 3.95157 5.74989 4.00108 6.20671 4.1903C6.66352 4.37952 7.05397 4.69995 7.32867 5.11107C7.60338 5.5222 7.75 6.00555 7.75 6.5C7.74926 7.16281 7.48562 7.79826 7.01694 8.26694C6.54826 8.73562 5.91281 8.99926 5.25 9ZM5.25 5.25C5.00277 5.25 4.7611 5.32331 4.55554 5.46066C4.34998 5.59801 4.18976 5.79324 4.09515 6.02165C4.00054 6.25005 3.97579 6.50139 4.02402 6.74386C4.07225 6.98634 4.1913 7.20907 4.36612 7.38388C4.54093 7.5587 4.76366 7.67775 5.00614 7.72598C5.24861 7.77421 5.49995 7.74946 5.72835 7.65485C5.95676 7.56024 6.15199 7.40002 6.28934 7.19446C6.42669 6.9889 6.5 6.74723 6.5 6.5C6.49967 6.16858 6.36787 5.85083 6.13352 5.61648C5.89917 5.38213 5.58142 5.25033 5.25 5.25Z", fill: "currentColor" }),
|
|
14
|
+
react_1.default.createElement("path", { d: "M12.75 14C12.2555 14 11.7722 13.8534 11.3611 13.5787C10.95 13.304 10.6295 12.9135 10.4403 12.4567C10.2511 11.9999 10.2016 11.4972 10.298 11.0123C10.3945 10.5273 10.6326 10.0819 10.9822 9.73223C11.3319 9.3826 11.7773 9.1445 12.2623 9.04804C12.7472 8.95157 13.2499 9.00108 13.7067 9.1903C14.1635 9.37952 14.554 9.69995 14.8287 10.1111C15.1034 10.5222 15.25 11.0055 15.25 11.5C15.2493 12.1628 14.9856 12.7983 14.5169 13.2669C14.0483 13.7356 13.4128 13.9993 12.75 14ZM12.75 10.25C12.5028 10.25 12.2611 10.3233 12.0555 10.4607C11.85 10.598 11.6898 10.7932 11.5951 11.0216C11.5005 11.2501 11.4758 11.5014 11.524 11.7439C11.5723 11.9863 11.6913 12.2091 11.8661 12.3839C12.0409 12.5587 12.2637 12.6777 12.5061 12.726C12.7486 12.7742 12.9999 12.7495 13.2284 12.6549C13.4568 12.5602 13.652 12.4 13.7893 12.1945C13.9267 11.9889 14 11.7472 14 11.5C13.9997 11.1686 13.8679 10.8508 13.6335 10.6165C13.3992 10.3821 13.0814 10.2503 12.75 10.25Z", fill: "currentColor" }),
|
|
15
|
+
react_1.default.createElement("path", { d: "M16.5 17.75H1.5C1.16859 17.7497 0.850846 17.6178 0.6165 17.3835C0.382155 17.1492 0.250347 16.8314 0.25 16.5V1.5C0.250347 1.16859 0.382155 0.850846 0.6165 0.6165C0.850846 0.382155 1.16859 0.250347 1.5 0.25H16.5C16.8314 0.250347 17.1492 0.382155 17.3835 0.6165C17.6178 0.850846 17.7497 1.16859 17.75 1.5V16.5C17.7497 16.8314 17.6178 17.1492 17.3835 17.3835C17.1492 17.6178 16.8314 17.7497 16.5 17.75ZM1.5 1.5V16.5H16.5V1.5H1.5Z", fill: "currentColor" })));
|
|
16
|
+
exports.NotesIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
17
|
+
'data-component-name': 'icons/NotesIcon/NotesIcon',
|
|
18
|
+
})) `
|
|
19
|
+
path {
|
|
20
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
height: ${({ size }) => size || '16px'};
|
|
24
|
+
width: ${({ size }) => size || '16px'};
|
|
25
|
+
`;
|
|
26
|
+
//# sourceMappingURL=NotesIcon.js.map
|
|
@@ -51,6 +51,8 @@ function TabList({ childrenArray, size, overflowTabs, visibleTabs, setTabRef, on
|
|
|
51
51
|
el.setAttribute('data-animating', isAnimating.toString());
|
|
52
52
|
}
|
|
53
53
|
}, onKeyDown: (event) => handleKeyboard(event, index), onClick: () => {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
(_b = (_a = child.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
54
56
|
onTabClick(label);
|
|
55
57
|
} }));
|
|
56
58
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.56.0-next.
|
|
3
|
+
"version": "0.56.0-next.4",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"./markdoc/*": "./lib/markdoc/*.js"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@markdoc/markdoc": "0.5.
|
|
29
|
+
"@markdoc/markdoc": "0.5.2",
|
|
30
30
|
"lodash.debounce": "^4.0.8",
|
|
31
31
|
"lodash.throttle": "^4.1.1",
|
|
32
32
|
"react": "^19.1.0",
|
|
@@ -11,6 +11,7 @@ import { ArrowUpRightIcon } from '@redocly/theme/icons/ArrowUpRightIcon/ArrowUpR
|
|
|
11
11
|
import { CatalogTagsWithTooltip } from '@redocly/theme/components/Catalog/CatalogTagsWithTooltip';
|
|
12
12
|
import { CatalogEntityIcon } from '@redocly/theme/components/Catalog/CatalogEntityIcon';
|
|
13
13
|
import { getPathPrefix } from '@redocly/theme/core';
|
|
14
|
+
import { TooltipComponent } from '@redocly/theme/components/Tooltip/Tooltip';
|
|
14
15
|
|
|
15
16
|
export type CatalogCardProps = {
|
|
16
17
|
entity: BffCatalogEntity;
|
|
@@ -34,9 +35,11 @@ export function CatalogCard({ entity, catalogConfig }: CatalogCardProps): JSX.El
|
|
|
34
35
|
>
|
|
35
36
|
<CardContent>
|
|
36
37
|
<CardHeader>
|
|
37
|
-
<
|
|
38
|
-
<
|
|
39
|
-
|
|
38
|
+
<TooltipComponent tip={entity.type} placement="bottom" className="catalog">
|
|
39
|
+
<HeaderIconWrapper>
|
|
40
|
+
<CatalogEntityIcon entityType={entity.type} defaultColor={true} />
|
|
41
|
+
</HeaderIconWrapper>
|
|
42
|
+
</TooltipComponent>
|
|
40
43
|
<CardTitle>
|
|
41
44
|
<CatalogHighlight>{entity.title}</CatalogHighlight>
|
|
42
45
|
</CardTitle>
|
|
@@ -16,16 +16,14 @@ import { Menu } from '@redocly/theme/components/Menu/Menu';
|
|
|
16
16
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
17
17
|
import { CatalogEntityRelations } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations';
|
|
18
18
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
19
|
-
|
|
20
|
-
import {
|
|
19
|
+
import { SidebarActions } from '@redocly/theme/components/SidebarActions/SidebarActions';
|
|
20
|
+
import { CatalogEntitySchema } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntitySchema';
|
|
21
21
|
|
|
22
22
|
export type CatalogEntityProps = {
|
|
23
23
|
entity: BffCatalogEntity;
|
|
24
24
|
entitiesCatalogConfig: EntitiesCatalogConfig;
|
|
25
25
|
catalogConfig: CatalogEntityConfig;
|
|
26
26
|
initialRelations: BffCatalogRelatedEntityList;
|
|
27
|
-
mainCatalogLabelTranslationKey?: string;
|
|
28
|
-
mainCatalogSlug?: string;
|
|
29
27
|
};
|
|
30
28
|
|
|
31
29
|
export function CatalogEntity({
|
|
@@ -33,8 +31,6 @@ export function CatalogEntity({
|
|
|
33
31
|
entitiesCatalogConfig,
|
|
34
32
|
catalogConfig,
|
|
35
33
|
initialRelations,
|
|
36
|
-
mainCatalogLabelTranslationKey,
|
|
37
|
-
mainCatalogSlug,
|
|
38
34
|
}: CatalogEntityProps) {
|
|
39
35
|
const { useTranslate, useCatalog } = useThemeHooks();
|
|
40
36
|
const { translate } = useTranslate();
|
|
@@ -92,14 +88,6 @@ export function CatalogEntity({
|
|
|
92
88
|
<CatalogPageContent>
|
|
93
89
|
<Breadcrumbs
|
|
94
90
|
additionalBreadcrumbs={[
|
|
95
|
-
...(mainCatalogLabelTranslationKey
|
|
96
|
-
? [
|
|
97
|
-
{
|
|
98
|
-
label: translate(mainCatalogLabelTranslationKey),
|
|
99
|
-
link: `catalogs/${mainCatalogSlug}`,
|
|
100
|
-
},
|
|
101
|
-
]
|
|
102
|
-
: []),
|
|
103
91
|
{ label: linkToMainCatalogLabel, link: linkToMainCatalog },
|
|
104
92
|
{ label: entity.title },
|
|
105
93
|
]}
|
|
@@ -112,7 +100,11 @@ export function CatalogEntity({
|
|
|
112
100
|
/>
|
|
113
101
|
<CatalogEntityProperties entity={entity} />
|
|
114
102
|
<CatalogTwoColumnsSection>
|
|
115
|
-
|
|
103
|
+
{entity.type === 'data-schema' ? (
|
|
104
|
+
<CatalogEntitySchema entity={entity} />
|
|
105
|
+
) : (
|
|
106
|
+
<CatalogEntityMetadata entity={entity} />
|
|
107
|
+
)}
|
|
116
108
|
<CatalogEntityLinks entity={entity} />
|
|
117
109
|
</CatalogTwoColumnsSection>
|
|
118
110
|
<CatalogEntityRelations
|
package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx
CHANGED
|
@@ -10,6 +10,7 @@ import { UserEmailProperty } from '@redocly/theme/components/Catalog/CatalogEnti
|
|
|
10
10
|
import { DomainsProperty } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty';
|
|
11
11
|
import { OwnersProperty } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty';
|
|
12
12
|
import { ContactProperty } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty';
|
|
13
|
+
import { FormatProperty } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty';
|
|
13
14
|
|
|
14
15
|
type PropertyRenderer = {
|
|
15
16
|
key: string;
|
|
@@ -23,6 +24,11 @@ const propertyRenderers: PropertyRenderer[] = [
|
|
|
23
24
|
condition: (entity) => !!entity.type,
|
|
24
25
|
component: EntityTypeProperty,
|
|
25
26
|
},
|
|
27
|
+
{
|
|
28
|
+
key: 'format',
|
|
29
|
+
condition: (entity) => entity.type === 'data-schema' && !!entity.metadata?.specType,
|
|
30
|
+
component: FormatProperty,
|
|
31
|
+
},
|
|
26
32
|
{
|
|
27
33
|
key: 'contact',
|
|
28
34
|
condition: (entity) => !!entity.contact?.slack?.channels,
|
|
@@ -35,7 +41,7 @@ const propertyRenderers: PropertyRenderer[] = [
|
|
|
35
41
|
},
|
|
36
42
|
{
|
|
37
43
|
key: 'tags',
|
|
38
|
-
condition: (entity) => !!entity.tags,
|
|
44
|
+
condition: (entity) => !!entity.tags?.length,
|
|
39
45
|
component: TagsProperty,
|
|
40
46
|
},
|
|
41
47
|
{
|
package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx
CHANGED
|
@@ -51,6 +51,7 @@ const CardHeader = styled.div`
|
|
|
51
51
|
display: flex;
|
|
52
52
|
align-items: center;
|
|
53
53
|
gap: var(--catalog-card-content-gap);
|
|
54
|
+
font-weight: var(--font-weight-medium);
|
|
54
55
|
`;
|
|
55
56
|
|
|
56
57
|
const CardContent = styled.div`
|
|
@@ -59,4 +60,7 @@ const CardContent = styled.div`
|
|
|
59
60
|
align-items: center;
|
|
60
61
|
gap: var(--catalog-card-content-gap);
|
|
61
62
|
flex-wrap: wrap;
|
|
63
|
+
color: var(--text-color-primary);
|
|
64
|
+
font-size: var(--font-size-lg);
|
|
65
|
+
line-height: var(--line-height-lg);
|
|
62
66
|
`;
|
|
@@ -2,9 +2,8 @@ import React, { JSX } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
4
|
import { GraphIcon } from '@redocly/theme/icons/GraphIcon/GraphIcon';
|
|
5
|
-
import { Tag } from '@redocly/theme';
|
|
6
|
-
|
|
7
|
-
import { CatalogEntityPropertyCard } from './CatalogEntityPropertyCard';
|
|
5
|
+
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
6
|
+
import { CatalogEntityPropertyCard } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard';
|
|
8
7
|
|
|
9
8
|
export type DomainsPropertyProps = {
|
|
10
9
|
entity: BffCatalogEntity;
|
|
@@ -4,13 +4,20 @@ import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
|
4
4
|
import { EntityTypeIcon } from '@redocly/theme/icons/EntityTypeIcon/EntityTypeIcon';
|
|
5
5
|
import { capitalize } from '@redocly/theme/core/utils';
|
|
6
6
|
import { CatalogEntityTypeIcon } from '@redocly/theme/components/Catalog/CatalogEntityTypeIcon';
|
|
7
|
-
|
|
8
|
-
import { CatalogEntityPropertyCard } from './CatalogEntityPropertyCard';
|
|
7
|
+
import { CatalogEntityPropertyCard } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard';
|
|
9
8
|
|
|
10
9
|
export type EntityTypePropertyProps = {
|
|
11
10
|
entity: BffCatalogEntity;
|
|
12
11
|
};
|
|
13
12
|
|
|
13
|
+
const formatEntityType = (entityType: string) => {
|
|
14
|
+
return capitalize(
|
|
15
|
+
entityType.startsWith('api-')
|
|
16
|
+
? entityType.replace('api-', 'API-').replace(/-/g, ' ')
|
|
17
|
+
: entityType.replace(/-/g, ' '),
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
14
21
|
export function EntityTypeProperty({ entity }: EntityTypePropertyProps): JSX.Element {
|
|
15
22
|
return (
|
|
16
23
|
<div data-component-name="Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty">
|
|
@@ -24,7 +31,7 @@ export function EntityTypeProperty({ entity }: EntityTypePropertyProps): JSX.Ele
|
|
|
24
31
|
content={
|
|
25
32
|
<>
|
|
26
33
|
<CatalogEntityTypeIcon entityType={entity.type} />
|
|
27
|
-
|
|
34
|
+
{formatEntityType(entity.type)}
|
|
28
35
|
</>
|
|
29
36
|
}
|
|
30
37
|
/>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React, { JSX } from 'react';
|
|
2
|
+
|
|
3
|
+
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
|
+
import { NotesIcon } from '@redocly/theme/icons/NotesIcon/NotesIcon';
|
|
5
|
+
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
6
|
+
import { CatalogEntityPropertyCard } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard';
|
|
7
|
+
|
|
8
|
+
export type FormatPropertyProps = {
|
|
9
|
+
entity: BffCatalogEntity;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export function FormatProperty({ entity }: FormatPropertyProps): JSX.Element {
|
|
13
|
+
return (
|
|
14
|
+
<div data-component-name="Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty">
|
|
15
|
+
<CatalogEntityPropertyCard
|
|
16
|
+
header={
|
|
17
|
+
<>
|
|
18
|
+
<NotesIcon />
|
|
19
|
+
Format
|
|
20
|
+
</>
|
|
21
|
+
}
|
|
22
|
+
content={
|
|
23
|
+
<>
|
|
24
|
+
<Tag
|
|
25
|
+
textTransform="none"
|
|
26
|
+
key={entity.metadata?.specType}
|
|
27
|
+
style={{ backgroundColor: 'var(--bg-color)' }}
|
|
28
|
+
>
|
|
29
|
+
{entity.metadata?.specType}
|
|
30
|
+
</Tag>
|
|
31
|
+
</>
|
|
32
|
+
}
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
import React, { JSX } from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
2
|
import { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
4
3
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
BffCatalogRelatedEntity,
|
|
8
|
-
EntityType,
|
|
9
|
-
SortOption,
|
|
10
|
-
} from '@redocly/theme/core/types';
|
|
11
|
-
import {
|
|
12
|
-
CatalogColumn,
|
|
13
|
-
getEntityTagColor,
|
|
14
|
-
} from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
|
|
4
|
+
import { BffCatalogEntity, BffCatalogRelatedEntity, SortOption } from '@redocly/theme/core/types';
|
|
5
|
+
import { CatalogColumn } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
|
|
15
6
|
import { CatalogEntityCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogEntityCell';
|
|
16
|
-
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
17
7
|
import { CatalogEntityRelationsTable } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable';
|
|
8
|
+
import { CatalogEntityTypeTag } from '@redocly/theme/components/Catalog/CatalogEntityTypeTag';
|
|
9
|
+
import { CatalogEntityRelationCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogEntityRelationCell';
|
|
18
10
|
|
|
19
11
|
const columns: CatalogColumn<BffCatalogRelatedEntity>[] = [
|
|
20
12
|
{
|
|
@@ -23,17 +15,26 @@ const columns: CatalogColumn<BffCatalogRelatedEntity>[] = [
|
|
|
23
15
|
render: (entity) => <CatalogEntityCell entity={entity} />,
|
|
24
16
|
sortable: true,
|
|
25
17
|
sortKey: 'title',
|
|
18
|
+
width: '2.5fr',
|
|
26
19
|
},
|
|
27
20
|
{
|
|
28
21
|
key: 'type',
|
|
29
22
|
title: 'Type',
|
|
30
|
-
render: (entity) =>
|
|
31
|
-
<EntityTypeTag color={getEntityTagColor(entity.type as EntityType)}>
|
|
32
|
-
{entity.type}
|
|
33
|
-
</EntityTypeTag>
|
|
34
|
-
),
|
|
23
|
+
render: (entity) => <CatalogEntityTypeTag entityType={entity.type} />,
|
|
35
24
|
sortable: true,
|
|
36
25
|
sortKey: 'type',
|
|
26
|
+
width: '1fr',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: 'relationType',
|
|
30
|
+
title: 'Relations',
|
|
31
|
+
render: (entity) => (
|
|
32
|
+
<CatalogEntityRelationCell
|
|
33
|
+
relationType={entity.relationType}
|
|
34
|
+
relationRole={entity.relationRole}
|
|
35
|
+
/>
|
|
36
|
+
),
|
|
37
|
+
width: '1fr',
|
|
37
38
|
},
|
|
38
39
|
];
|
|
39
40
|
|
|
@@ -48,6 +49,7 @@ export type CatalogEntityDefaultRelationsProps = {
|
|
|
48
49
|
};
|
|
49
50
|
searchQuery: string;
|
|
50
51
|
setSearchQuery: (query: string) => void;
|
|
52
|
+
setFilter: (filter: string) => void;
|
|
51
53
|
sortOption: SortOption | null;
|
|
52
54
|
setSortOption: (sortOption: SortOption | null) => void;
|
|
53
55
|
handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
|
|
@@ -90,8 +92,3 @@ export function CatalogEntityDefaultRelations({
|
|
|
90
92
|
</div>
|
|
91
93
|
);
|
|
92
94
|
}
|
|
93
|
-
|
|
94
|
-
const EntityTypeTag = styled(Tag)`
|
|
95
|
-
font-size: var(--font-size-base);
|
|
96
|
-
background-color: transparent;
|
|
97
|
-
`;
|
package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { JSX } from 'react';
|
|
1
|
+
import React, { JSX, useState } from 'react';
|
|
2
2
|
import { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
3
3
|
|
|
4
4
|
import { BffCatalogEntity, BffCatalogRelatedEntityList } from '@redocly/theme/core/types';
|
|
@@ -13,6 +13,9 @@ export type CatalogEntityRelationsProps = {
|
|
|
13
13
|
initialRelations: BffCatalogRelatedEntityList;
|
|
14
14
|
};
|
|
15
15
|
const LOAD_MORE_THRESHOLD = 10;
|
|
16
|
+
const ENTITY_DEFAULT_FILTERS: Record<string, string> = {
|
|
17
|
+
team: 'type:user',
|
|
18
|
+
};
|
|
16
19
|
|
|
17
20
|
export function CatalogEntityRelations({
|
|
18
21
|
entity,
|
|
@@ -23,9 +26,10 @@ export function CatalogEntityRelations({
|
|
|
23
26
|
const { useCatalogSort, useCatalogSearch, useFetchCatalogEntitiesRelations } = useThemeHooks();
|
|
24
27
|
const { sortOption, setSortOption, handleSortClick, isColumnSorted } = useCatalogSort();
|
|
25
28
|
const { searchQuery, setSearchQuery } = useCatalogSearch();
|
|
29
|
+
const [filter, setFilter] = useState<string>(ENTITY_DEFAULT_FILTERS[entity.type] ?? '');
|
|
26
30
|
|
|
27
31
|
const { items: relations, query } = useFetchCatalogEntitiesRelations(
|
|
28
|
-
{ entityKey: entity.key, search: searchQuery, sort: sortOption ?? undefined },
|
|
32
|
+
{ entityKey: entity.key, search: searchQuery, sort: sortOption ?? undefined, filter },
|
|
29
33
|
initialRelations,
|
|
30
34
|
);
|
|
31
35
|
|
|
@@ -49,6 +53,7 @@ export function CatalogEntityRelations({
|
|
|
49
53
|
query={query}
|
|
50
54
|
searchQuery={searchQuery}
|
|
51
55
|
setSearchQuery={setSearchQuery}
|
|
56
|
+
setFilter={setFilter}
|
|
52
57
|
sortOption={sortOption}
|
|
53
58
|
setSortOption={setSortOption}
|
|
54
59
|
handleSortClick={handleSortClick}
|
|
@@ -68,6 +73,7 @@ export function CatalogEntityRelations({
|
|
|
68
73
|
query={query}
|
|
69
74
|
searchQuery={searchQuery}
|
|
70
75
|
setSearchQuery={setSearchQuery}
|
|
76
|
+
setFilter={setFilter}
|
|
71
77
|
sortOption={sortOption}
|
|
72
78
|
setSortOption={setSortOption}
|
|
73
79
|
handleSortClick={handleSortClick}
|
package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx
CHANGED
|
@@ -24,7 +24,6 @@ export type CatalogEntityRelationsTableProps = {
|
|
|
24
24
|
searchQuery: string;
|
|
25
25
|
setSearchQuery: (query: string) => void;
|
|
26
26
|
heading: string;
|
|
27
|
-
filter?: string;
|
|
28
27
|
columns: CatalogColumn<BffCatalogRelatedEntity>[];
|
|
29
28
|
sortOption: SortOption | null;
|
|
30
29
|
setSortOption: (sortOption: SortOption | null) => void;
|
package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx
CHANGED
|
@@ -11,6 +11,7 @@ import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
|
11
11
|
import { CatalogEntityRelationsTable } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable';
|
|
12
12
|
import { CatalogUserEntityCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogUserEntityCell';
|
|
13
13
|
import { CatalogEntityDefaultRelations } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations';
|
|
14
|
+
import { CatalogEntityRelationCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogEntityRelationCell';
|
|
14
15
|
|
|
15
16
|
const teamColumns: CatalogColumn<BffCatalogRelatedEntity>[] = [
|
|
16
17
|
{
|
|
@@ -29,6 +30,16 @@ const teamColumns: CatalogColumn<BffCatalogRelatedEntity>[] = [
|
|
|
29
30
|
render: (entity) => (entity.metadata?.role ? <Tag>{entity.metadata?.role}</Tag> : null),
|
|
30
31
|
width: '2fr',
|
|
31
32
|
},
|
|
33
|
+
{
|
|
34
|
+
key: 'relationType',
|
|
35
|
+
title: 'Relations',
|
|
36
|
+
render: (entity) => (
|
|
37
|
+
<CatalogEntityRelationCell
|
|
38
|
+
relationType={entity.relationType}
|
|
39
|
+
relationRole={entity.relationRole}
|
|
40
|
+
/>
|
|
41
|
+
),
|
|
42
|
+
},
|
|
32
43
|
{
|
|
33
44
|
key: 'description',
|
|
34
45
|
title: 'Description',
|
|
@@ -49,6 +60,7 @@ export type CatalogEntityTeamRelationsProps = {
|
|
|
49
60
|
};
|
|
50
61
|
searchQuery: string;
|
|
51
62
|
setSearchQuery: (query: string) => void;
|
|
63
|
+
setFilter: (filter: string) => void;
|
|
52
64
|
sortOption: SortOption | null;
|
|
53
65
|
setSortOption: (sortOption: SortOption | null) => void;
|
|
54
66
|
handleSortClick: (sortKey: string, direction: 'asc' | 'desc') => void;
|
|
@@ -62,6 +74,7 @@ export function CatalogEntityTeamRelations({
|
|
|
62
74
|
query,
|
|
63
75
|
searchQuery,
|
|
64
76
|
setSearchQuery,
|
|
77
|
+
setFilter,
|
|
65
78
|
entitiesCatalogConfig,
|
|
66
79
|
catalogConfig,
|
|
67
80
|
sortOption,
|
|
@@ -73,7 +86,7 @@ export function CatalogEntityTeamRelations({
|
|
|
73
86
|
return (
|
|
74
87
|
<div data-component-name="Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations">
|
|
75
88
|
<Tabs forceReady={relations.length > 0} size={TabsSize.MEDIUM}>
|
|
76
|
-
<TabItem label="Members" icon={<PeopleIcon />}>
|
|
89
|
+
<TabItem label="Members" icon={<PeopleIcon />} onClick={() => setFilter('type:user')}>
|
|
77
90
|
<CatalogEntityRelationsTable
|
|
78
91
|
entity={entity}
|
|
79
92
|
entitiesCatalogConfig={entitiesCatalogConfig}
|
|
@@ -83,7 +96,6 @@ export function CatalogEntityTeamRelations({
|
|
|
83
96
|
searchQuery={searchQuery}
|
|
84
97
|
setSearchQuery={setSearchQuery}
|
|
85
98
|
heading="Members"
|
|
86
|
-
filter="type:user"
|
|
87
99
|
columns={teamColumns}
|
|
88
100
|
sortOption={sortOption}
|
|
89
101
|
setSortOption={setSortOption}
|
|
@@ -92,13 +104,14 @@ export function CatalogEntityTeamRelations({
|
|
|
92
104
|
shouldShowLoadMore={shouldShowLoadMore}
|
|
93
105
|
/>
|
|
94
106
|
</TabItem>
|
|
95
|
-
<TabItem label="Related entities" icon={<EntityTypeIcon />}>
|
|
107
|
+
<TabItem label="Related entities" icon={<EntityTypeIcon />} onClick={() => setFilter('')}>
|
|
96
108
|
<CatalogEntityDefaultRelations
|
|
97
109
|
entity={entity}
|
|
98
110
|
relations={relations}
|
|
99
111
|
query={query}
|
|
100
112
|
searchQuery={searchQuery}
|
|
101
113
|
setSearchQuery={setSearchQuery}
|
|
114
|
+
setFilter={setFilter}
|
|
102
115
|
entitiesCatalogConfig={entitiesCatalogConfig}
|
|
103
116
|
catalogConfig={catalogConfig}
|
|
104
117
|
sortOption={sortOption}
|