@redocly/theme 0.61.0 → 0.62.0-custom.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Admonition/Admonition.js +14 -18
- package/lib/components/Admonition/variables.dark.d.ts +1 -0
- package/lib/components/Admonition/variables.dark.js +18 -0
- package/lib/components/Admonition/variables.js +24 -28
- package/lib/components/AsyncApiDocs/hooks/AfterAsyncApiChannelDescription.d.ts +1 -0
- package/lib/components/AsyncApiDocs/hooks/AfterAsyncApiChannelDescription.js +12 -0
- package/lib/components/Badge/Badge.d.ts +2 -1
- package/lib/components/Badge/Badge.js +24 -2
- package/lib/components/Banner/Banner.js +19 -1
- package/lib/components/Banner/variables.js +1 -0
- package/lib/components/Breadcrumbs/Breadcrumb.js +1 -1
- package/lib/components/Breadcrumbs/BreadcrumbDropdown.js +9 -6
- package/lib/components/Breadcrumbs/Breadcrumbs.js +24 -15
- package/lib/components/Buttons/AIAssistantButton.js +7 -4
- package/lib/components/Catalog/CatalogEntities.js +10 -8
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +5 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +13 -11
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +7 -5
- package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +9 -7
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +1 -1
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +2 -2
- package/lib/components/CatalogClassic/CatalogClassicInfoBlock.js +1 -1
- package/lib/components/CodeBlock/CodeBlockControls.js +8 -6
- package/lib/components/Filter/FilterCheckboxes.js +1 -1
- package/lib/components/JsonViewer/JsonViewer.js +2 -2
- package/lib/components/JsonViewer/{Helpers.js → helpers.js} +2 -1
- package/lib/components/LanguagePicker/LanguagePicker.js +1 -1
- package/lib/components/Markdown/Markdown.js +2 -2
- package/lib/components/Menu/MenuItem.js +41 -15
- package/lib/components/Navbar/NavbarItem.js +1 -1
- package/lib/components/OpenApiDocs/hooks/AdditionalOverviewInfo.d.ts +1 -0
- package/lib/components/OpenApiDocs/hooks/AdditionalOverviewInfo.js +12 -0
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.d.ts +1 -0
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.js +6 -0
- package/lib/components/PageActions/PageActions.js +25 -8
- package/lib/components/Search/SearchAiDialog.d.ts +4 -2
- package/lib/components/Search/SearchAiDialog.js +23 -4
- package/lib/components/Search/SearchAiMessage.d.ts +4 -2
- package/lib/components/Search/SearchAiMessage.js +82 -23
- package/lib/components/Search/SearchDialog.js +50 -25
- package/lib/components/Select/variables.js +2 -2
- package/lib/components/SvgViewer/SvgViewer.d.ts +15 -0
- package/lib/components/SvgViewer/SvgViewer.js +312 -0
- package/lib/components/SvgViewer/variables.d.ts +1 -0
- package/lib/components/SvgViewer/variables.dark.d.ts +1 -0
- package/lib/components/SvgViewer/variables.dark.js +8 -0
- package/lib/components/SvgViewer/variables.js +17 -0
- package/lib/components/Tag/Tag.js +1 -1
- package/lib/components/Tag/variables.dark.js +6 -0
- package/lib/components/Tag/variables.js +6 -0
- package/lib/components/Tooltip/Tooltip.d.ts +2 -3
- package/lib/components/Tooltip/Tooltip.js +66 -113
- package/lib/components/Tooltip/variables.dark.js +4 -0
- package/lib/components/Tooltip/variables.js +3 -3
- package/lib/components/UserMenu/LoginButton.d.ts +8 -2
- package/lib/components/UserMenu/LoginButton.js +4 -3
- package/lib/core/constants/search.d.ts +5 -1
- package/lib/core/constants/search.js +24 -1
- package/lib/core/hooks/search/use-search-dialog.js +2 -2
- package/lib/core/hooks/use-color-switcher.d.ts +1 -0
- package/lib/core/hooks/use-color-switcher.js +8 -1
- package/lib/core/hooks/use-mcp-config.js +2 -1
- package/lib/core/hooks/use-modal-scroll-lock.js +24 -10
- package/lib/core/hooks/use-outside-click.d.ts +3 -1
- package/lib/core/hooks/use-outside-click.js +8 -4
- package/lib/core/hooks/use-page-actions.d.ts +1 -1
- package/lib/core/hooks/use-page-actions.js +44 -11
- package/lib/core/hooks/use-product-picker.js +1 -1
- package/lib/core/hooks/use-unique-svg-ids.d.ts +6 -0
- package/lib/core/hooks/use-unique-svg-ids.js +15 -0
- package/lib/core/openapi/index.d.ts +1 -0
- package/lib/core/openapi/index.js +3 -1
- package/lib/core/styles/dark.js +4 -0
- package/lib/core/styles/global.js +31 -15
- package/lib/core/types/catalog.d.ts +1 -1
- package/lib/core/types/hooks.d.ts +23 -2
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/search.d.ts +24 -0
- package/lib/core/types/search.js +9 -1
- package/lib/core/utils/content-segments.d.ts +2 -0
- package/lib/core/utils/content-segments.js +22 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/core/utils/transform-revisions-to-version-history.js +8 -51
- package/lib/ext/process-scorecard.d.ts +5 -0
- package/lib/ext/process-scorecard.js +11 -0
- package/lib/icons/FitToViewIcon/FitToViewIcon.d.ts +9 -0
- package/lib/icons/FitToViewIcon/FitToViewIcon.js +25 -0
- package/lib/icons/WarningCycleIcon/WarningCycleIcon.d.ts +9 -0
- package/lib/icons/WarningCycleIcon/WarningCycleIcon.js +24 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +9 -0
- package/lib/layouts/DocumentationLayout.js +4 -25
- package/lib/layouts/DocumentationLayoutBottom.d.ts +11 -0
- package/lib/layouts/DocumentationLayoutBottom.js +28 -0
- package/lib/layouts/DocumentationLayoutTop.d.ts +13 -0
- package/lib/layouts/DocumentationLayoutTop.js +33 -0
- package/lib/layouts/Forbidden.js +22 -18
- package/lib/markdoc/components/Cards/Card.js +1 -0
- package/lib/markdoc/components/CodeWalkthrough/CodeFilters.js +1 -1
- package/lib/markdoc/components/Heading/Heading.js +40 -2
- package/lib/markdoc/components/LoginButton/LoginButton.d.ts +9 -0
- package/lib/markdoc/components/LoginButton/LoginButton.js +48 -0
- package/lib/markdoc/components/Mermaid/Mermaid.js +70 -2
- package/lib/markdoc/components/default.d.ts +1 -0
- package/lib/markdoc/components/default.js +1 -0
- package/lib/markdoc/default.d.ts +6 -0
- package/lib/markdoc/default.js +2 -0
- package/lib/markdoc/tags/login-button.d.ts +2 -0
- package/lib/markdoc/tags/login-button.js +32 -0
- package/package.json +9 -9
- package/src/components/Admonition/Admonition.tsx +14 -18
- package/src/components/Admonition/variables.dark.ts +15 -0
- package/src/components/Admonition/variables.ts +24 -28
- package/src/components/AsyncApiDocs/hooks/AfterAsyncApiChannelDescription.tsx +10 -0
- package/src/components/Badge/Badge.tsx +18 -2
- package/src/components/Banner/Banner.tsx +23 -1
- package/src/components/Banner/variables.ts +1 -0
- package/src/components/Breadcrumbs/Breadcrumb.tsx +3 -3
- package/src/components/Breadcrumbs/BreadcrumbDropdown.tsx +11 -8
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +24 -15
- package/src/components/Buttons/AIAssistantButton.tsx +7 -4
- package/src/components/Catalog/CatalogEntities.tsx +10 -8
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +7 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +13 -11
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +7 -5
- package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +9 -7
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +1 -2
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +9 -5
- package/src/components/CatalogClassic/CatalogClassicInfoBlock.tsx +3 -1
- package/src/components/CodeBlock/CodeBlockControls.tsx +16 -10
- package/src/components/Filter/FilterCheckboxes.tsx +1 -1
- package/src/components/JsonViewer/JsonViewer.tsx +1 -2
- package/src/components/JsonViewer/{Helpers.tsx → helpers.tsx} +1 -0
- package/src/components/LanguagePicker/LanguagePicker.tsx +1 -1
- package/src/components/Markdown/Markdown.tsx +2 -2
- package/src/components/Menu/MenuItem.tsx +61 -16
- package/src/components/Navbar/NavbarItem.tsx +3 -1
- package/src/components/OpenApiDocs/hooks/AdditionalOverviewInfo.tsx +10 -0
- package/src/components/OpenApiDocs/hooks/AfterOpenApiDescription.tsx +2 -0
- package/src/components/PageActions/PageActions.tsx +38 -15
- package/src/components/Search/SearchAiDialog.tsx +31 -2
- package/src/components/Search/SearchAiMessage.tsx +103 -17
- package/src/components/Search/SearchDialog.tsx +70 -37
- package/src/components/Select/variables.ts +2 -2
- package/src/components/SvgViewer/SvgViewer.tsx +405 -0
- package/src/components/SvgViewer/variables.dark.ts +5 -0
- package/src/components/SvgViewer/variables.ts +14 -0
- package/src/components/Tag/Tag.tsx +2 -1
- package/src/components/Tag/variables.dark.ts +6 -0
- package/src/components/Tag/variables.ts +6 -0
- package/src/components/Tooltip/Tooltip.tsx +77 -120
- package/src/components/Tooltip/variables.dark.ts +4 -0
- package/src/components/Tooltip/variables.ts +3 -3
- package/src/components/UserMenu/LoginButton.tsx +23 -8
- package/src/core/constants/search.ts +27 -1
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +10 -1
- package/src/core/hooks/search/use-search-dialog.ts +2 -2
- package/src/core/hooks/use-color-switcher.ts +10 -2
- package/src/core/hooks/use-mcp-config.ts +2 -1
- package/src/core/hooks/use-modal-scroll-lock.ts +29 -10
- package/src/core/hooks/use-outside-click.ts +16 -5
- package/src/core/hooks/use-page-actions.ts +66 -25
- package/src/core/hooks/use-product-picker.ts +1 -1
- package/src/core/hooks/use-unique-svg-ids.ts +12 -0
- package/src/core/openapi/index.ts +1 -0
- package/src/core/styles/dark.ts +4 -0
- package/src/core/styles/global.ts +31 -15
- package/src/core/types/catalog.ts +1 -1
- package/src/core/types/hooks.ts +29 -1
- package/src/core/types/l10n.ts +12 -1
- package/src/core/types/search.ts +19 -0
- package/src/core/utils/content-segments.ts +27 -0
- package/src/core/utils/index.ts +1 -0
- package/src/core/utils/transform-revisions-to-version-history.ts +8 -80
- package/src/ext/process-scorecard.ts +14 -0
- package/src/icons/FitToViewIcon/FitToViewIcon.tsx +26 -0
- package/src/icons/WarningCycleIcon/WarningCycleIcon.tsx +32 -0
- package/src/index.ts +9 -0
- package/src/layouts/DocumentationLayout.tsx +4 -30
- package/src/layouts/DocumentationLayoutBottom.tsx +42 -0
- package/src/layouts/DocumentationLayoutTop.tsx +52 -0
- package/src/layouts/Forbidden.tsx +36 -21
- package/src/markdoc/components/Cards/Card.tsx +1 -0
- package/src/markdoc/components/CodeWalkthrough/CodeFilters.tsx +1 -1
- package/src/markdoc/components/Heading/Heading.tsx +52 -4
- package/src/markdoc/components/LoginButton/LoginButton.tsx +38 -0
- package/src/markdoc/components/Mermaid/Mermaid.tsx +57 -8
- package/src/markdoc/components/default.ts +1 -0
- package/src/markdoc/default.ts +2 -0
- package/src/markdoc/tags/login-button.ts +30 -0
- package/lib/components/Tooltip/TooltipWrapper.d.ts +0 -12
- package/lib/components/Tooltip/TooltipWrapper.js +0 -34
- package/src/components/Tooltip/TooltipWrapper.tsx +0 -70
- /package/lib/components/JsonViewer/{Helpers.d.ts → helpers.d.ts} +0 -0
|
@@ -39,15 +39,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.Admonition = Admonition;
|
|
40
40
|
const react_1 = __importDefault(require("react"));
|
|
41
41
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
42
|
+
const WarningCycleIcon_1 = require("../../icons/WarningCycleIcon/WarningCycleIcon");
|
|
43
|
+
const CheckmarkOutlineIcon_1 = require("../../icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon");
|
|
44
|
+
const ErrorIcon_1 = require("../../icons/ErrorIcon/ErrorIcon");
|
|
45
|
+
const InformationIcon_1 = require("../../icons/InformationIcon/InformationIcon");
|
|
46
46
|
const IconsMap = {
|
|
47
|
-
warning:
|
|
48
|
-
success:
|
|
49
|
-
danger:
|
|
50
|
-
info:
|
|
47
|
+
warning: WarningCycleIcon_1.WarningCycleIcon,
|
|
48
|
+
success: CheckmarkOutlineIcon_1.CheckmarkOutlineIcon,
|
|
49
|
+
danger: ErrorIcon_1.ErrorIcon,
|
|
50
|
+
info: InformationIcon_1.InformationIcon,
|
|
51
51
|
};
|
|
52
52
|
function Admonition({ type = 'info', name, children, className, 'data-source': dataSource, 'data-hash': dataHash, }) {
|
|
53
53
|
const Icon = IconsMap[type] || IconsMap['info'];
|
|
@@ -69,9 +69,9 @@ const Content = styled_components_1.default.div `
|
|
|
69
69
|
const AdmonitionWrapper = styled_components_1.default.div `
|
|
70
70
|
display: flex;
|
|
71
71
|
flex-direction: row;
|
|
72
|
-
gap: var(--
|
|
73
|
-
margin: var(--admonition-margin
|
|
74
|
-
padding: var(--admonition-padding
|
|
72
|
+
gap: var(--admonition-gap);
|
|
73
|
+
margin: var(--admonition-margin);
|
|
74
|
+
padding: var(--admonition-padding);
|
|
75
75
|
border-radius: var(--admonition-border-radius);
|
|
76
76
|
font-size: var(--admonition-font-size);
|
|
77
77
|
font-weight: var(--admonition-font-weight);
|
|
@@ -83,17 +83,12 @@ const AdmonitionWrapper = styled_components_1.default.div `
|
|
|
83
83
|
${({ type }) => (0, styled_components_1.css) `
|
|
84
84
|
background-color: var(--admonition-${type}-bg-color);
|
|
85
85
|
color: var(--admonition-${type}-text-color);
|
|
86
|
-
border
|
|
86
|
+
border: var(--admonition-${type}-border);
|
|
87
87
|
`};
|
|
88
88
|
|
|
89
|
-
&:has(${Content}) {
|
|
90
|
-
padding: var(--admonition-padding-vertical-md) var(--admonition-padding-horizontal);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
89
|
&:not(:has(${Content})) {
|
|
94
90
|
--admonition-heading-font-size: var(--admonition-font-size);
|
|
95
91
|
--admonition-heading-line-height: var(--admonition-line-height);
|
|
96
|
-
--admonition-icon-size: 16px;
|
|
97
92
|
|
|
98
93
|
align-items: center;
|
|
99
94
|
gap: calc(var(--spacing-xxs) * 1.5);
|
|
@@ -103,6 +98,7 @@ const AdmonitionWrapper = styled_components_1.default.div `
|
|
|
103
98
|
width: var(--admonition-icon-size);
|
|
104
99
|
height: var(--admonition-icon-size);
|
|
105
100
|
flex-shrink: 0;
|
|
101
|
+
margin: var(--admonition-icon-margin);
|
|
106
102
|
|
|
107
103
|
fill: ${({ type }) => `var(--admonition-${type}-icon-color)`};
|
|
108
104
|
|
|
@@ -115,7 +111,7 @@ const AdmonitionWrapper = styled_components_1.default.div `
|
|
|
115
111
|
const TextContainer = styled_components_1.default.div `
|
|
116
112
|
display: flex;
|
|
117
113
|
flex-direction: column;
|
|
118
|
-
gap: var(--
|
|
114
|
+
gap: var(--admonition-text-gap);
|
|
119
115
|
width: 100%;
|
|
120
116
|
`;
|
|
121
117
|
const Heading = styled_components_1.default.div `
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const admonitionDarkMode: import("styled-components").FlattenSimpleInterpolation;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.admonitionDarkMode = void 0;
|
|
4
|
+
const styled_components_1 = require("styled-components");
|
|
5
|
+
exports.admonitionDarkMode = (0, styled_components_1.css) `
|
|
6
|
+
--admonition-info-bg-color: color-mix(in srgb, var(--color-blue-1) 40%, transparent); // @presenter Color
|
|
7
|
+
--admonition-info-border: var(--admonition-border-width) var(--admonition-border-style) color-mix(in srgb, var(--color-blue-3) 40%, transparent); // @presenter Border
|
|
8
|
+
|
|
9
|
+
--admonition-warning-bg-color: color-mix(in srgb, var(--color-carrot-1) 40%, transparent); // @presenter Color
|
|
10
|
+
--admonition-warning-border: var(--admonition-border-width) var(--admonition-border-style) color-mix(in srgb, var(--color-carrot-3) 40%, transparent); // @presenter Border
|
|
11
|
+
|
|
12
|
+
--admonition-danger-bg-color: color-mix(in srgb, var(--color-raspberry-1) 40%, transparent); // @presenter Color
|
|
13
|
+
--admonition-danger-border: var(--admonition-border-width) var(--admonition-border-style) color-mix(in srgb, var(--color-raspberry-3) 40%, transparent); // @presenter Border
|
|
14
|
+
|
|
15
|
+
--admonition-success-bg-color: color-mix(in srgb, var(--color-green-1) 40%, transparent); // @presenter Color
|
|
16
|
+
--admonition-success-border: var(--admonition-border-width) var(--admonition-border-style) color-mix(in srgb, var(--color-green-3) 40%, transparent); // @presenter Border
|
|
17
|
+
`;
|
|
18
|
+
//# sourceMappingURL=variables.dark.js.map
|
|
@@ -12,23 +12,23 @@ exports.admonition = (0, styled_components_1.css) `
|
|
|
12
12
|
--admonition-font-size: var(--font-size-base); // @presenter FontSize
|
|
13
13
|
--admonition-font-weight: var(--font-weight-regular); // @presenter FontWeight
|
|
14
14
|
--admonition-line-height: var(--line-height-base); // @presenter LineHeight
|
|
15
|
-
--admonition-heading-font-size: var(--font-size-
|
|
16
|
-
--admonition-heading-font-weight: var(--font-weight-
|
|
17
|
-
--admonition-heading-line-height: var(--line-height-
|
|
18
|
-
--admonition-heading-letter-spacing: 0
|
|
15
|
+
--admonition-heading-font-size: var(--font-size-base); // @presenter FontSize
|
|
16
|
+
--admonition-heading-font-weight: var(--font-weight-semibold); // @presenter FontWeight
|
|
17
|
+
--admonition-heading-line-height: var(--line-height-base); // @presenter LineHeight
|
|
18
|
+
--admonition-heading-letter-spacing: 0; // @presenter LetterSpacing
|
|
19
19
|
--admonition-heading-transform: none;
|
|
20
|
-
|
|
20
|
+
--admonition-heading-text-color: var(--color-warm-grey-11); // @presenter Color
|
|
21
21
|
/**
|
|
22
22
|
* @tokens Admonition spacing
|
|
23
23
|
* @presenter Spacing
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
--admonition-
|
|
27
|
-
--admonition-
|
|
28
|
-
--admonition-
|
|
29
|
-
--admonition-padding
|
|
30
|
-
--admonition-
|
|
31
|
-
--admonition-icon-size:
|
|
26
|
+
--admonition-gap: var(--spacing-sm); // @presenter Spacing
|
|
27
|
+
--admonition-text-gap: var(--spacing-xxs); // @presenter Spacing
|
|
28
|
+
--admonition-margin: var(--spacing-base) 0 var(--spacing-md) 0; // @presenter Spacing
|
|
29
|
+
--admonition-padding: var(--spacing-sm) var(--spacing-base); // @presenter Spacing
|
|
30
|
+
--admonition-icon-margin: calc(var(--spacing-unit) / 2) 0; // @presenter Spacing
|
|
31
|
+
--admonition-icon-size: 18px; // @presenter Spacing
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* @tokens Admonition border
|
|
@@ -36,21 +36,20 @@ exports.admonition = (0, styled_components_1.css) `
|
|
|
36
36
|
|
|
37
37
|
--admonition-border-radius: var(--border-radius-lg); // @presenter BorderRadius
|
|
38
38
|
--admonition-border-style: var(--border-style);
|
|
39
|
-
--admonition-border-width:
|
|
39
|
+
--admonition-border-width: 1px;
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* @tokens Admonition type info
|
|
43
43
|
*/
|
|
44
44
|
|
|
45
45
|
--admonition-info-bg-color: var(--color-info-bg); // @presenter Color
|
|
46
|
-
--admonition-info-heading-text-color: var(--text-color
|
|
47
|
-
--admonition-info-text-color: var(--text-color
|
|
48
|
-
--admonition-info-icon-color: var(--color-info-
|
|
46
|
+
--admonition-info-heading-text-color: var(--admonition-heading-text-color); // @presenter Color
|
|
47
|
+
--admonition-info-text-color: var(--admonition-heading-text-color); // @presenter Color
|
|
48
|
+
--admonition-info-icon-color: var(--color-info-active); // @presenter Color
|
|
49
49
|
--admonition-info-border-color: var(--color-info-border); // @presenter Color
|
|
50
50
|
--admonition-info-border-style: var(--admonition-border-style);
|
|
51
51
|
--admonition-info-border-width: var(--admonition-border-width);
|
|
52
52
|
--admonition-info-border: var(--admonition-info-border-width) var(--admonition-info-border-style) var(--admonition-info-border-color); // @presenter Border
|
|
53
|
-
--admonition-info-icon: none;
|
|
54
53
|
|
|
55
54
|
/**
|
|
56
55
|
* @tokens Admonition type warning
|
|
@@ -58,42 +57,39 @@ exports.admonition = (0, styled_components_1.css) `
|
|
|
58
57
|
|
|
59
58
|
/* warning */
|
|
60
59
|
--admonition-warning-bg-color: var(--color-warning-bg); // @presenter Color
|
|
61
|
-
--admonition-warning-text-color: var(--text-color
|
|
62
|
-
--admonition-warning-heading-text-color: var(--text-color
|
|
63
|
-
--admonition-warning-icon-color: var(--color-warning-
|
|
60
|
+
--admonition-warning-text-color: var(--admonition-heading-text-color); // @presenter Color
|
|
61
|
+
--admonition-warning-heading-text-color: var(--admonition-heading-text-color); // @presenter Color
|
|
62
|
+
--admonition-warning-icon-color: var(--color-warning-active); // @presenter Color
|
|
64
63
|
--admonition-warning-border-color: var(--color-warning-border); // @presenter Color
|
|
65
64
|
--admonition-warning-border-style: var(--admonition-border-style); // @presenter Color
|
|
66
65
|
--admonition-warning-border-width: var(--admonition-border-width); // @presenter Color
|
|
67
66
|
--admonition-warning-border: var(--admonition-warning-border-width) var(--admonition-warning-border-style) var(--admonition-warning-border-color); // @presenter Border
|
|
68
|
-
--admonition-warning-icon: none;
|
|
69
67
|
|
|
70
68
|
/**
|
|
71
69
|
* @tokens Admonition type danger
|
|
72
70
|
*/
|
|
73
71
|
|
|
74
72
|
--admonition-danger-bg-color: var(--color-error-bg); // @presenter Color
|
|
75
|
-
--admonition-danger-text-color: var(--text-color
|
|
76
|
-
--admonition-danger-heading-text-color: var(--text-color
|
|
77
|
-
--admonition-danger-icon-color: var(--color-error-
|
|
73
|
+
--admonition-danger-text-color: var(--admonition-heading-text-color); // @presenter Color
|
|
74
|
+
--admonition-danger-heading-text-color: var(--admonition-heading-text-color); // @presenter Color
|
|
75
|
+
--admonition-danger-icon-color: var(--color-error-active); // @presenter Color
|
|
78
76
|
--admonition-danger-border-color: var(--color-error-border); // @presenter Color
|
|
79
77
|
--admonition-danger-border-style: var(--admonition-border-style); // @presenter Color
|
|
80
78
|
--admonition-danger-border-width: var(--admonition-border-width); // @presenter Color
|
|
81
79
|
--admonition-danger-border: var(--admonition-danger-border-width) var(--admonition-danger-border-style) var(--admonition-danger-border-color); // @presenter Border
|
|
82
|
-
--admonition-danger-icon: none;
|
|
83
80
|
|
|
84
81
|
/**
|
|
85
82
|
* @tokens Admonition type success
|
|
86
83
|
*/
|
|
87
84
|
|
|
88
85
|
--admonition-success-bg-color: var(--color-success-bg); // @presenter Color
|
|
89
|
-
--admonition-success-text-color: var(--text-color
|
|
90
|
-
--admonition-success-heading-text-color: var(--text-color
|
|
91
|
-
--admonition-success-icon-color: var(--color-success-
|
|
86
|
+
--admonition-success-text-color: var(--admonition-heading-text-color); // @presenter Color
|
|
87
|
+
--admonition-success-heading-text-color: var(--admonition-heading-text-color); // @presenter Color
|
|
88
|
+
--admonition-success-icon-color: var(--color-success-active); // @presenter Color
|
|
92
89
|
--admonition-success-border-color: var(--color-success-border); // @presenter Color
|
|
93
90
|
--admonition-success-border-style: var(--admonition-border-style); // @presenter Color
|
|
94
91
|
--admonition-success-border-width: var(--admonition-border-width); // @presenter Color
|
|
95
92
|
--admonition-success-border: var(--admonition-success-border-width) var(--admonition-success-border-style) var(--admonition-success-border-color); // @presenter Border
|
|
96
|
-
--admonition-success-icon: none;
|
|
97
93
|
|
|
98
94
|
// @tokens End
|
|
99
95
|
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AfterAsyncApiChannelDescription: any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// interface AfterAsyncApiChannelDescriptionProps {
|
|
3
|
+
// channel: any;
|
|
4
|
+
// }
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AfterAsyncApiChannelDescription = void 0;
|
|
7
|
+
// export function AfterAsyncApiChannelDescription(_props: AfterAsyncApiChannelDescriptionProps) {
|
|
8
|
+
// return null;
|
|
9
|
+
// }
|
|
10
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
11
|
+
exports.AfterAsyncApiChannelDescription = null;
|
|
12
|
+
//# sourceMappingURL=AfterAsyncApiChannelDescription.js.map
|
|
@@ -4,5 +4,6 @@ export type BadgeProps = PropsWithChildren<{
|
|
|
4
4
|
color?: string;
|
|
5
5
|
key?: string;
|
|
6
6
|
className?: string;
|
|
7
|
+
icon?: string;
|
|
7
8
|
}>;
|
|
8
|
-
export declare function Badge(props: BadgeProps): JSX.Element;
|
|
9
|
+
export declare function Badge({ icon, children, ...props }: BadgeProps): JSX.Element;
|
|
@@ -32,6 +32,17 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
36
|
+
var t = {};
|
|
37
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
38
|
+
t[p] = s[p];
|
|
39
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
40
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
41
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
42
|
+
t[p[i]] = s[p[i]];
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
45
|
+
};
|
|
35
46
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
47
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
48
|
};
|
|
@@ -39,8 +50,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
50
|
exports.Badge = Badge;
|
|
40
51
|
const react_1 = __importDefault(require("react"));
|
|
41
52
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
42
|
-
|
|
43
|
-
|
|
53
|
+
const GenericIcon_1 = require("../../icons/GenericIcon/GenericIcon");
|
|
54
|
+
function Badge(_a) {
|
|
55
|
+
var { icon, children } = _a, props = __rest(_a, ["icon", "children"]);
|
|
56
|
+
return (react_1.default.createElement(BadgeComponent, Object.assign({}, props, { "data-component-name": "Badge/Badge" }),
|
|
57
|
+
icon ? react_1.default.createElement(BadgeIcon, { icon: icon }) : null,
|
|
58
|
+
children));
|
|
44
59
|
}
|
|
45
60
|
const BadgeComponent = styled_components_1.default.span `
|
|
46
61
|
display: inline-block;
|
|
@@ -61,4 +76,11 @@ const BadgeComponent = styled_components_1.default.span `
|
|
|
61
76
|
border-radius: var(--badge-deprecated-border-radius);
|
|
62
77
|
`}
|
|
63
78
|
`;
|
|
79
|
+
const BadgeIcon = (0, styled_components_1.default)(GenericIcon_1.GenericIcon) `
|
|
80
|
+
--icon-width: var(--font-size-sm);
|
|
81
|
+
--icon-height: var(--font-size-sm);
|
|
82
|
+
margin-right: var(--spacing-xxs);
|
|
83
|
+
flex-shrink: 0;
|
|
84
|
+
vertical-align: middle;
|
|
85
|
+
`;
|
|
64
86
|
//# sourceMappingURL=Badge.js.map
|
|
@@ -37,9 +37,11 @@ exports.Banner = Banner;
|
|
|
37
37
|
const react_1 = __importStar(require("react"));
|
|
38
38
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
39
39
|
const hooks_1 = require("../../core/hooks");
|
|
40
|
+
const utils_1 = require("../../core/utils");
|
|
40
41
|
const Markdown_1 = require("../../components/Markdown/Markdown");
|
|
41
42
|
const CloseIcon_1 = require("../../icons/CloseIcon/CloseIcon");
|
|
42
43
|
const Button_1 = require("../../components/Button/Button");
|
|
44
|
+
const ANIMATION_DURATION = 0.4;
|
|
43
45
|
function setBannerHeight(height) {
|
|
44
46
|
document.documentElement.style.setProperty('--banner-height', `${height}px`);
|
|
45
47
|
}
|
|
@@ -86,6 +88,22 @@ function Banner({ className }) {
|
|
|
86
88
|
setBannerHeight(height);
|
|
87
89
|
};
|
|
88
90
|
updateHeight();
|
|
91
|
+
if (window.location.hash) {
|
|
92
|
+
setTimeout(() => {
|
|
93
|
+
var _a;
|
|
94
|
+
const hash = window.location.hash;
|
|
95
|
+
const el = document.getElementById(hash.slice(1));
|
|
96
|
+
if (el) {
|
|
97
|
+
const navbar = (0, utils_1.getNavbarElement)();
|
|
98
|
+
const navbarHeight = (_a = navbar === null || navbar === void 0 ? void 0 : navbar.getBoundingClientRect().height) !== null && _a !== void 0 ? _a : 0;
|
|
99
|
+
const elementTop = el.getBoundingClientRect().top + window.scrollY;
|
|
100
|
+
const scrollPosition = elementTop - navbarHeight;
|
|
101
|
+
if (Math.abs(window.scrollY - scrollPosition) > 1) {
|
|
102
|
+
window.scrollTo({ top: scrollPosition });
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}, ANIMATION_DURATION * 1000 + 100);
|
|
106
|
+
}
|
|
89
107
|
const resizeObserver = new ResizeObserver(updateHeight);
|
|
90
108
|
resizeObserver.observe(bannerElement);
|
|
91
109
|
return () => {
|
|
@@ -148,7 +166,7 @@ const BannerWrapper = styled_components_1.default.div `
|
|
|
148
166
|
width: 100%;
|
|
149
167
|
z-index: var(--z-index-overlay);
|
|
150
168
|
transform: ${({ $isVisible }) => ($isVisible ? 'translateY(0)' : 'translateY(-100%)')};
|
|
151
|
-
transition: transform
|
|
169
|
+
transition: transform ${ANIMATION_DURATION}s ease-out;
|
|
152
170
|
${({ $color }) => $color &&
|
|
153
171
|
(0, styled_components_1.css) `
|
|
154
172
|
background-color: var(--banner-${$color}-bg-color);
|
|
@@ -6,6 +6,7 @@ exports.banner = (0, styled_components_1.css) `
|
|
|
6
6
|
/**
|
|
7
7
|
* @tokens Banner
|
|
8
8
|
*/
|
|
9
|
+
--banner-height: 0px; /* default 0px so calc formulas work on page load */
|
|
9
10
|
--banner-button-size: 22px;
|
|
10
11
|
--banner-button-padding: 3px; // @presenter Spacing
|
|
11
12
|
--banner-button-font-size: var(--font-size-base);
|
|
@@ -51,7 +51,7 @@ function Breadcrumb({ label, link, isActive, onClick, icon }) {
|
|
|
51
51
|
react_1.default.createElement(BreadcrumbIcon_1.BreadcrumbIcon, { icon: icon }),
|
|
52
52
|
displayLabel));
|
|
53
53
|
const breadcrumbContent = link ? (react_1.default.createElement(BreadcrumbLink, { "data-component-name": "Breadcrumbs/BreadcrumbLink", to: link, onClick: onClick, "$isActive": isActive }, content)) : (react_1.default.createElement(BreadcrumbWrapper, { "data-component-name": "Breadcrumbs/BreadcrumbWrapper", "$isActive": isActive, onClick: onClick, tabIndex: -1 }, content));
|
|
54
|
-
return isTruncated ? (react_1.default.createElement(Tooltip_1.
|
|
54
|
+
return isTruncated ? (react_1.default.createElement(Tooltip_1.Tooltip, { tip: label, placement: "bottom" }, breadcrumbContent)) : (breadcrumbContent);
|
|
55
55
|
}
|
|
56
56
|
const baseBreadcrumbStyles = `
|
|
57
57
|
display: flex;
|
|
@@ -55,7 +55,7 @@ function BreadcrumbDropdown({ children, label, items, onItemClick, className, })
|
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
57
57
|
const isTruncated = label.length > constants_1.BREADCRUMB_MAX_LENGTH;
|
|
58
|
-
const triggerContent = isTruncated ? (react_1.default.createElement(Tooltip_1.
|
|
58
|
+
const triggerContent = isTruncated ? (react_1.default.createElement(Tooltip_1.Tooltip, { tip: label, placement: "bottom" },
|
|
59
59
|
react_1.default.createElement(TriggerContentWrapper, null, children))) : (children);
|
|
60
60
|
const trigger = react_1.default.createElement(StyledDropdownTrigger, null, triggerContent);
|
|
61
61
|
return (react_1.default.createElement(BreadcrumbDropdownWrapper, { "data-component-name": "Breadcrumbs/BreadcrumbDropdown", className: className, "data-testid": "breadcrumb-dropdown" },
|
|
@@ -66,11 +66,14 @@ function BreadcrumbDropdown({ children, label, items, onItemClick, className, })
|
|
|
66
66
|
const translatedLabel = translate(item.labelTranslationKey, item.label);
|
|
67
67
|
return (react_1.default.createElement(StyledDropdownMenuItem, { key: index, onAction: () => {
|
|
68
68
|
onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item, index);
|
|
69
|
-
telemetry.sendBreadcrumbClickedMessage(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
telemetry.sendBreadcrumbClickedMessage([
|
|
70
|
+
{
|
|
71
|
+
object: 'breadcrumb',
|
|
72
|
+
link: item.link,
|
|
73
|
+
position: index + 1,
|
|
74
|
+
totalBreadcrumbs: items.length,
|
|
75
|
+
},
|
|
76
|
+
]);
|
|
74
77
|
}, "$hasLink": hasLink, to: item.link, dataAttributes: !hasLink ? { 'aria-disabled': 'true' } : {} },
|
|
75
78
|
react_1.default.createElement(DropdownContent, { "$isActive": isActive },
|
|
76
79
|
react_1.default.createElement(BreadcrumbIcon_1.BreadcrumbIcon, { icon: item.icon }),
|
|
@@ -46,20 +46,26 @@ function Breadcrumbs(props) {
|
|
|
46
46
|
...currentItemSiblings,
|
|
47
47
|
];
|
|
48
48
|
const translatedLabel = translate(breadcrumb.labelTranslationKey, breadcrumb.label);
|
|
49
|
-
return (react_1.default.createElement(BreadcrumbDropdown_1.BreadcrumbDropdown, { label: translatedLabel, items: siblingsWithActive, onItemClick: (item, itemIdx) => telemetry.sendBreadcrumbClickedMessage(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
return (react_1.default.createElement(BreadcrumbDropdown_1.BreadcrumbDropdown, { label: translatedLabel, items: siblingsWithActive, onItemClick: (item, itemIdx) => telemetry.sendBreadcrumbClickedMessage([
|
|
50
|
+
{
|
|
51
|
+
object: 'breadcrumb',
|
|
52
|
+
link: item.link,
|
|
53
|
+
position: itemIdx + 1,
|
|
54
|
+
totalBreadcrumbs: siblingsWithActive.length,
|
|
55
|
+
},
|
|
56
|
+
]) },
|
|
54
57
|
react_1.default.createElement(BreadcrumbIcon_1.BreadcrumbIcon, { icon: breadcrumb.icon }),
|
|
55
58
|
(0, utils_1.trimText)(translatedLabel, constants_1.BREADCRUMB_MAX_LENGTH),
|
|
56
59
|
react_1.default.createElement(GenericIcon_1.GenericIcon, { icon: "chevron-down" })));
|
|
57
60
|
}
|
|
58
|
-
return (react_1.default.createElement(Breadcrumb_1.Breadcrumb, { link: breadcrumb.link, label: translate(breadcrumb.labelTranslationKey, breadcrumb.label), isActive: isActive, icon: breadcrumb.icon, onClick: () => telemetry.sendBreadcrumbClickedMessage(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
return (react_1.default.createElement(Breadcrumb_1.Breadcrumb, { link: breadcrumb.link, label: translate(breadcrumb.labelTranslationKey, breadcrumb.label), isActive: isActive, icon: breadcrumb.icon, onClick: () => telemetry.sendBreadcrumbClickedMessage([
|
|
62
|
+
{
|
|
63
|
+
object: 'breadcrumb',
|
|
64
|
+
link: breadcrumb.link,
|
|
65
|
+
position: idx + 1,
|
|
66
|
+
totalBreadcrumbs: breadcrumbs.length,
|
|
67
|
+
},
|
|
68
|
+
]) }));
|
|
63
69
|
};
|
|
64
70
|
return (react_1.default.createElement(BreadcrumbsWrapper, { "data-component-name": "Breadcrumbs/Breadcrumbs", className: props.className }, items.map(({ breadcrumb, idx, isLast, inDropdown }) => {
|
|
65
71
|
if (inDropdown)
|
|
@@ -69,11 +75,14 @@ function Breadcrumbs(props) {
|
|
|
69
75
|
return (react_1.default.createElement(react_1.default.Fragment, { key: idx },
|
|
70
76
|
renderBreadcrumb(breadcrumb, idx, isLast),
|
|
71
77
|
react_1.default.createElement(BreadcrumbSeparator, null, "/"),
|
|
72
|
-
react_1.default.createElement(BreadcrumbDropdown_1.BreadcrumbDropdown, { label: "...", items: collapsedBreadcrumbs, onItemClick: (item, itemIdx) => telemetry.sendBreadcrumbClickedMessage(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
react_1.default.createElement(BreadcrumbDropdown_1.BreadcrumbDropdown, { label: "...", items: collapsedBreadcrumbs, onItemClick: (item, itemIdx) => telemetry.sendBreadcrumbClickedMessage([
|
|
79
|
+
{
|
|
80
|
+
object: 'breadcrumb',
|
|
81
|
+
link: item.link,
|
|
82
|
+
position: itemIdx + 1,
|
|
83
|
+
totalBreadcrumbs: breadcrumbs.length,
|
|
84
|
+
},
|
|
85
|
+
]) }, "..."),
|
|
77
86
|
react_1.default.createElement(BreadcrumbSeparator, null, "/")));
|
|
78
87
|
}
|
|
79
88
|
return (react_1.default.createElement(react_1.default.Fragment, { key: idx },
|
|
@@ -86,9 +86,12 @@ function AIAssistantButton() {
|
|
|
86
86
|
const text = translate('aiAssistant.trigger', 'Ask AI');
|
|
87
87
|
const handleOpen = () => {
|
|
88
88
|
setIsOpen(true);
|
|
89
|
-
telemetry.sendSearchAiOpenedMessage(
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
telemetry.sendSearchAiOpenedMessage([
|
|
90
|
+
{
|
|
91
|
+
object: 'search',
|
|
92
|
+
method: 'ai_trigger_button',
|
|
93
|
+
},
|
|
94
|
+
]);
|
|
92
95
|
};
|
|
93
96
|
const handleClose = () => {
|
|
94
97
|
setIsOpen(false);
|
|
@@ -102,7 +105,7 @@ function AIAssistantButton() {
|
|
|
102
105
|
const StyledAIAssistantButton = (0, styled_components_1.default)(Button_1.Button) `
|
|
103
106
|
position: fixed;
|
|
104
107
|
bottom: var(--ai-assistant-button-bottom);
|
|
105
|
-
right: var(--ai-assistant-button-right);
|
|
108
|
+
right: calc(var(--ai-assistant-button-right) + var(--modal-scrollbar-width, 0px));
|
|
106
109
|
${({ $inputType }) => $inputType === 'icon'
|
|
107
110
|
? `
|
|
108
111
|
border-radius: var(--ai-assistant-button-border-radius-icon);
|
|
@@ -64,14 +64,16 @@ function CatalogEntities(props) {
|
|
|
64
64
|
}, props.initialEntitiesList);
|
|
65
65
|
const onRowClick = (entity) => {
|
|
66
66
|
if (searchQuery) {
|
|
67
|
-
telemetry.sendCatalogEntitiesListSearchResultClickedMessage(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
telemetry.sendCatalogEntitiesListSearchResultClickedMessage([
|
|
68
|
+
{
|
|
69
|
+
id: entity.id,
|
|
70
|
+
object: 'catalog_entity',
|
|
71
|
+
uri: getEntityDetailsLink(entity),
|
|
72
|
+
query: searchQuery,
|
|
73
|
+
entityKey: entity.key,
|
|
74
|
+
entityType: entity.type,
|
|
75
|
+
},
|
|
76
|
+
]);
|
|
75
77
|
}
|
|
76
78
|
};
|
|
77
79
|
const shouldShowLoadMore = query.hasNextPage ||
|
|
@@ -18,7 +18,7 @@ const hooks_1 = require("../../../core/hooks");
|
|
|
18
18
|
const CatalogEntitySchema_1 = require("../../../components/Catalog/CatalogEntity/CatalogEntitySchema");
|
|
19
19
|
const CatalogEntityMethodAndPath_1 = require("../../../components/Catalog/CatalogEntity/CatalogEntityMethodAndPath");
|
|
20
20
|
const CatalogEntityRelationsGraph_lazy_1 = require("../../../components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy");
|
|
21
|
-
const
|
|
21
|
+
const CatalogEntityHistorySidebar_1 = require("../../../components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar");
|
|
22
22
|
const renderFirstColumnEntitySection = (entity) => {
|
|
23
23
|
switch (entity.type) {
|
|
24
24
|
case 'api-operation':
|
|
@@ -45,7 +45,7 @@ function CatalogEntity({ RedocSchema, StoreProvider, GraphqlTypeRenderer, }) {
|
|
|
45
45
|
const linkToMainCatalogLabel = translate(catalogConfig.titleTranslationKey);
|
|
46
46
|
const { searchQuery, setSearchQuery } = useCatalog();
|
|
47
47
|
return (react_1.default.createElement(CatalogPageWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntity" },
|
|
48
|
-
react_1.default.createElement(
|
|
48
|
+
react_1.default.createElement(CatalogEntityHistorySidebar_1.CatalogEntityHistorySidebar, { entityKey: entity.key, revision: revision, version: version }),
|
|
49
49
|
react_1.default.createElement(CatalogPageContent, null,
|
|
50
50
|
react_1.default.createElement(Breadcrumbs_1.Breadcrumbs, { additionalBreadcrumbs: [
|
|
51
51
|
{ label: linkToMainCatalogLabel, link: linkToMainCatalog },
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js
CHANGED
|
@@ -44,7 +44,8 @@ const CloseIcon_1 = require("../../../../icons/CloseIcon/CloseIcon");
|
|
|
44
44
|
const hooks_1 = require("../../../../core/hooks");
|
|
45
45
|
const MenuContainer_1 = require("../../../../components/Menu/MenuContainer");
|
|
46
46
|
const utils_1 = require("../../../../core/utils");
|
|
47
|
-
const
|
|
47
|
+
const constants_1 = require("../../../../core/constants");
|
|
48
|
+
const CatalogEntityVersionItem_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem");
|
|
48
49
|
function CatalogEntityHistorySidebar({ entityKey, revision, version, className, }) {
|
|
49
50
|
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
50
51
|
const location = (0, react_router_dom_1.useLocation)();
|
|
@@ -53,12 +54,13 @@ function CatalogEntityHistorySidebar({ entityKey, revision, version, className,
|
|
|
53
54
|
const { translate } = useTranslate();
|
|
54
55
|
const { currentLocale } = useL10nConfig();
|
|
55
56
|
const { items: revisions } = useFetchCatalogEntityRevisions({ entityKey });
|
|
57
|
+
const normalizedLocale = currentLocale && currentLocale !== constants_1.DEFAULT_LOCALE_PLACEHOLDER ? currentLocale : 'en-US';
|
|
56
58
|
const versionHistoryItems = (0, react_1.useMemo)(() => (0, utils_1.transformRevisionsToVersionHistory)({
|
|
57
59
|
revisions,
|
|
58
60
|
currentRevisionDate: revision,
|
|
59
61
|
currentVersion: version,
|
|
60
|
-
locale:
|
|
61
|
-
}), [revisions, revision, version,
|
|
62
|
+
locale: normalizedLocale,
|
|
63
|
+
}), [revisions, revision, version, normalizedLocale]);
|
|
62
64
|
const activeRevisionLabel = (0, react_1.useMemo)(() => {
|
|
63
65
|
var _a;
|
|
64
66
|
const itemWithActiveRevision = versionHistoryItems.find((item) => { var _a; return (_a = item.revisions) === null || _a === void 0 ? void 0 : _a.some((revision) => revision.isActive); });
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.TagsProperty = TagsProperty;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const TagsIcon_1 = require("../../../../icons/TagsIcon/TagsIcon");
|
|
9
|
-
const
|
|
9
|
+
const CatalogTagsWithTooltip_1 = require("../../../../components/Catalog/CatalogTagsWithTooltip");
|
|
10
10
|
const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
|
|
11
11
|
const hooks_1 = require("../../../../core/hooks");
|
|
12
12
|
function TagsProperty({ entity }) {
|
|
@@ -15,7 +15,7 @@ function TagsProperty({ entity }) {
|
|
|
15
15
|
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty" },
|
|
16
16
|
react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
|
|
17
17
|
react_1.default.createElement(TagsIcon_1.TagsIcon, null),
|
|
18
|
-
translate('catalog.tags.label', 'Tags')), content: react_1.default.createElement(
|
|
18
|
+
translate('catalog.tags.label', 'Tags')), content: react_1.default.createElement(CatalogTagsWithTooltip_1.CatalogTagsWithTooltip, { itemsToShow: 8, items: entity.tags || [], tagProps: {
|
|
19
19
|
style: {
|
|
20
20
|
fontSize: 'var(--font-size-base)',
|
|
21
21
|
borderRadius: 'var(--border-radius)',
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js
CHANGED
|
@@ -19,17 +19,19 @@ function CatalogEntityRelationsTable({ entity, entitiesCatalogConfig, catalogCon
|
|
|
19
19
|
});
|
|
20
20
|
const onRowClick = (relatedEntity) => {
|
|
21
21
|
if (searchQuery) {
|
|
22
|
-
telemetry.sendCatalogEntitiesRelatedEntitiesListSearchResultClickMessage(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
telemetry.sendCatalogEntitiesRelatedEntitiesListSearchResultClickMessage([
|
|
23
|
+
{
|
|
24
|
+
id: relatedEntity.id,
|
|
25
|
+
object: 'catalog_entity',
|
|
26
|
+
uri: getEntityDetailsLink(relatedEntity),
|
|
27
|
+
query: searchQuery,
|
|
28
|
+
entityKey: entity.key,
|
|
29
|
+
entityType: entity.type,
|
|
30
|
+
relationType: constants_1.reverseRelationMap[relatedEntity.relationType],
|
|
31
|
+
relatedEntityKey: relatedEntity.key,
|
|
32
|
+
relatedEntityType: relatedEntity.type,
|
|
33
|
+
},
|
|
34
|
+
]);
|
|
33
35
|
}
|
|
34
36
|
};
|
|
35
37
|
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable" },
|
|
@@ -58,11 +58,13 @@ function CatalogEntitySchema({ entity, relatedEntity, catalogConfig, RedocSchema
|
|
|
58
58
|
return (react_1.default.createElement(MetadataWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityMetadata" },
|
|
59
59
|
react_1.default.createElement(HeaderWrapper, null,
|
|
60
60
|
react_1.default.createElement(Heading, null, translate('catalog.entity.schema.title')),
|
|
61
|
-
!isGraphql && (react_1.default.createElement(CopyButton_1.CopyButton, { data: rawSchema, buttonText: "Copy Schema", type: "compound", variant: "secondary", iconPosition: "right", size: "medium", onCopyClick: () => telemetry.sendCatalogEntitiesCopyDataSchemaClickedMessage(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
!isGraphql && (react_1.default.createElement(CopyButton_1.CopyButton, { data: rawSchema, buttonText: "Copy Schema", type: "compound", variant: "secondary", iconPosition: "right", size: "medium", onCopyClick: () => telemetry.sendCatalogEntitiesCopyDataSchemaClickedMessage([
|
|
62
|
+
{
|
|
63
|
+
id: entity.id,
|
|
64
|
+
object: 'catalog_entity',
|
|
65
|
+
uri: getEntityDetailsLink(entity),
|
|
66
|
+
},
|
|
67
|
+
]) }))),
|
|
66
68
|
react_1.default.createElement(SplitViewWrapper, null,
|
|
67
69
|
react_1.default.createElement(SchemaContentWrapper, null, isGraphql && graphqlSDL && GraphqlTypeRenderer ? (react_1.default.createElement(GraphqlTypeRenderer, { sdl: graphqlSDL, typeName: entity.title })) : (react_1.default.createElement(StoreProvider, { definition: definition },
|
|
68
70
|
react_1.default.createElement(RedocSchema, { schema: parsedSchema })))),
|