@redocly/theme 0.57.0-next.2 → 0.57.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/Breadcrumbs/Breadcrumbs.js +4 -7
- package/lib/components/Buttons/EditPageButton.js +1 -1
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +1 -35
- package/lib/components/CatalogClassic/CatalogClassicActions.js +1 -1
- package/lib/components/CatalogClassic/CatalogClassicCard.js +1 -1
- package/lib/components/CatalogClassic/CatalogClassicInfoBlock.js +1 -1
- package/lib/components/CodeBlock/CodeBlockControls.js +7 -9
- package/lib/components/Feedback/Feedback.js +1 -1
- package/lib/components/Feedback/ReportDialog.js +1 -1
- package/lib/components/Filter/FilterCheckboxes.js +1 -1
- package/lib/components/Footer/FooterItem.js +1 -1
- package/lib/components/LanguagePicker/LanguagePicker.js +1 -4
- package/lib/components/Logo/Logo.js +1 -1
- package/lib/components/Menu/MenuItem.js +3 -6
- package/lib/components/Navbar/Navbar.js +2 -2
- package/lib/components/Navbar/NavbarItem.js +1 -1
- package/lib/components/Search/SearchDialog.js +9 -15
- package/lib/components/Search/SearchInput.js +1 -1
- package/lib/components/Search/SearchRecent.js +1 -1
- package/lib/components/SidebarActions/SidebarActions.js +3 -3
- package/lib/components/Switch/Switch.d.ts +4 -1
- package/lib/components/Switch/Switch.js +12 -3
- package/lib/components/TableOfContent/TableOfContent.js +1 -1
- package/lib/components/Tooltip/TooltipWrapper.d.ts +2 -2
- package/lib/components/Tooltip/TooltipWrapper.js +2 -4
- package/lib/components/UserMenu/LoginButton.js +1 -1
- package/lib/components/UserMenu/LogoutMenuItem.js +1 -1
- package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +1 -0
- package/lib/core/hooks/__mocks__/use-theme-hooks.js +1 -0
- package/lib/core/hooks/search/use-search-dialog.js +2 -2
- package/lib/core/hooks/use-color-switcher.js +1 -4
- package/lib/core/hooks/use-product-picker.js +1 -1
- package/lib/core/hooks/use-telemetry-fallback.d.ts +60 -0
- package/lib/core/hooks/use-telemetry-fallback.js +66 -0
- package/lib/core/hooks/use-theme-hooks.js +2 -1
- package/lib/core/types/hooks.d.ts +2 -4
- package/lib/core/types/index.d.ts +0 -1
- package/lib/core/types/index.js +0 -1
- package/lib/icons/PlayIcon/PlayIcon.d.ts +9 -0
- package/lib/icons/PlayIcon/PlayIcon.js +21 -0
- package/lib/icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon.d.ts +9 -0
- package/lib/icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon.js +23 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/layouts/ThreePanelLayout.js +1 -4
- package/lib/markdoc/components/CodeWalkthrough/CodeFilters.js +2 -2
- package/lib/markdoc/components/CodeWalkthrough/CodePanel.js +1 -0
- package/lib/markdoc/components/CodeWalkthrough/CodeToggle.js +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.js +7 -8
- package/package.json +2 -2
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +4 -7
- package/src/components/Buttons/EditPageButton.tsx +1 -1
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +4 -76
- package/src/components/CatalogClassic/CatalogClassicActions.tsx +1 -1
- package/src/components/CatalogClassic/CatalogClassicCard.tsx +1 -1
- package/src/components/CatalogClassic/CatalogClassicInfoBlock.tsx +1 -3
- package/src/components/CodeBlock/CodeBlockControls.tsx +19 -9
- package/src/components/Feedback/Feedback.tsx +1 -1
- package/src/components/Feedback/ReportDialog.tsx +1 -1
- package/src/components/Filter/FilterCheckboxes.tsx +1 -1
- package/src/components/Footer/FooterItem.tsx +1 -1
- package/src/components/LanguagePicker/LanguagePicker.tsx +1 -4
- package/src/components/Logo/Logo.tsx +1 -1
- package/src/components/Menu/MenuItem.tsx +3 -6
- package/src/components/Navbar/Navbar.tsx +2 -2
- package/src/components/Navbar/NavbarItem.tsx +1 -3
- package/src/components/Search/SearchDialog.tsx +9 -15
- package/src/components/Search/SearchInput.tsx +1 -1
- package/src/components/Search/SearchRecent.tsx +1 -1
- package/src/components/SidebarActions/SidebarActions.tsx +3 -3
- package/src/components/Switch/Switch.tsx +34 -3
- package/src/components/TableOfContent/TableOfContent.tsx +1 -1
- package/src/components/Tooltip/TooltipWrapper.tsx +4 -6
- package/src/components/UserMenu/LoginButton.tsx +1 -1
- package/src/components/UserMenu/LogoutMenuItem.tsx +1 -1
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +1 -0
- package/src/core/hooks/search/use-search-dialog.ts +2 -2
- package/src/core/hooks/use-color-switcher.ts +1 -4
- package/src/core/hooks/use-product-picker.ts +1 -1
- package/src/core/hooks/use-telemetry-fallback.ts +61 -0
- package/src/core/hooks/use-theme-hooks.ts +2 -1
- package/src/core/types/hooks.ts +10 -4
- package/src/core/types/index.ts +0 -1
- package/src/icons/PlayIcon/PlayIcon.tsx +22 -0
- package/src/icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon.tsx +32 -0
- package/src/index.ts +2 -0
- package/src/layouts/ThreePanelLayout.tsx +1 -4
- package/src/markdoc/components/CodeWalkthrough/CodeFilters.tsx +2 -2
- package/src/markdoc/components/CodeWalkthrough/CodePanel.tsx +1 -0
- package/src/markdoc/components/CodeWalkthrough/CodeToggle.tsx +5 -1
- package/src/markdoc/components/CodeWalkthrough/CodeWalkthrough.tsx +7 -8
- package/lib/core/types/telemetry.d.ts +0 -17
- package/lib/core/types/telemetry.js +0 -3
- package/src/core/types/telemetry.ts +0 -28
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export declare const useTelemetryFallback: () => {
|
|
2
|
+
send: () => void;
|
|
3
|
+
sendPageViewedMessage: () => void;
|
|
4
|
+
sendErrorMessage: () => void;
|
|
5
|
+
sendClientErrorMessage: () => void;
|
|
6
|
+
sendBreadcrumbClickedMessage: () => void;
|
|
7
|
+
sendColorModeSwitchedMessage: () => void;
|
|
8
|
+
sendSidebarItemClickedMessage: () => void;
|
|
9
|
+
sendSidebarItemExpandedMessage: () => void;
|
|
10
|
+
sendSidebarItemCollapsedMessage: () => void;
|
|
11
|
+
sendChangeLayoutButtonClickedMessage: () => void;
|
|
12
|
+
sendEditPageLinkClickedMessage: () => void;
|
|
13
|
+
sendCodeSnippetReportedMessage: () => void;
|
|
14
|
+
sendNavbarMenuItemClickedMessage: () => void;
|
|
15
|
+
sendLoginButtonClickedMessage: () => void;
|
|
16
|
+
sendLoginProviderButtonClickedMessage: () => void;
|
|
17
|
+
sendLogoutMenuItemClickedMessage: () => void;
|
|
18
|
+
sendLogoClickedMessage: () => void;
|
|
19
|
+
sendTocItemClickedMessage: () => void;
|
|
20
|
+
sendCatalogFilterChangedMessage: () => void;
|
|
21
|
+
sendCatalogItemClickedMessage: () => void;
|
|
22
|
+
sendScorecardLinkClickedMessage: () => void;
|
|
23
|
+
sendBackToCatalogButtonClickedMessage: () => void;
|
|
24
|
+
sendSidebarDrilldownBackButtonClickedMessage: () => void;
|
|
25
|
+
sendFooterItemClickedMessage: () => void;
|
|
26
|
+
sendCatalogActionsButtonClickedMessage: () => void;
|
|
27
|
+
sendMobileMenuButtonCloseClickedMessage: () => void;
|
|
28
|
+
sendMobileMenuButtonOpenClickedMessage: () => void;
|
|
29
|
+
sendSearchInputResetButtonClickedMessage: () => void;
|
|
30
|
+
sendSearchRecentRemoveButtonClickedMessage: () => void;
|
|
31
|
+
sendSearchRecentClickedMessage: () => void;
|
|
32
|
+
sendRequestApiAccessButtonClickedMessage: () => void;
|
|
33
|
+
sendVersionPickerSelectionChangeMessage: () => void;
|
|
34
|
+
sendProductPickedMessage: () => void;
|
|
35
|
+
sendFilterCheckboxToggledMessage: () => void;
|
|
36
|
+
sendLanguagePickerLocaleChangedMessage: () => void;
|
|
37
|
+
sendSearchOpenedMessage: () => void;
|
|
38
|
+
sendSearchQueryMessage: () => void;
|
|
39
|
+
sendSearchAIQueryMessage: () => void;
|
|
40
|
+
sendFeedbackMessage: () => void;
|
|
41
|
+
sendSearchResultClickedMessage: () => void;
|
|
42
|
+
sendRedirectMessage: () => void;
|
|
43
|
+
sendOpenapiDocsMessage: () => void;
|
|
44
|
+
sendCopyCodeSnippetClickedMessage: () => void;
|
|
45
|
+
sendOpenapiDocsViewedMessage: () => void;
|
|
46
|
+
sendOpenapiDocsPerformanceMetricsMessage: () => void;
|
|
47
|
+
sendOpenapiDocsDownloadDefinitionClickedMessage: () => void;
|
|
48
|
+
sendOpenapiDocsSelectLanguageClickedMessage: () => void;
|
|
49
|
+
sendOpenapiDocsExpandCollapseAllClickedMessage: () => void;
|
|
50
|
+
sendOpenapiDocsSwitchServersClickedMessage: () => void;
|
|
51
|
+
sendOpenapiDocsExamplesSwitcherClickedMessage: () => void;
|
|
52
|
+
sendOpenapiDocsTryItOpenedMessage: () => void;
|
|
53
|
+
sendAsyncapiDocsViewedMessage: () => void;
|
|
54
|
+
sendAsyncapiDocsPerformanceMetricsMessage: () => void;
|
|
55
|
+
sendAsyncapiDocsSwitchMessageClickedMessage: () => void;
|
|
56
|
+
sendAsyncapiDocsSwitchExampleClickedMessage: () => void;
|
|
57
|
+
sendAsyncapiDocsMessageClickedMessage: () => void;
|
|
58
|
+
sendAsyncapiDocsServerModalOpenedMessage: () => void;
|
|
59
|
+
sendAsyncapiDocsDownloadDefinitionClickedMessage: () => void;
|
|
60
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTelemetryFallback = void 0;
|
|
4
|
+
// TODO we need to create some common way to do this.
|
|
5
|
+
const useTelemetryFallback = () => ({
|
|
6
|
+
send: () => { },
|
|
7
|
+
sendPageViewedMessage: () => { },
|
|
8
|
+
sendErrorMessage: () => { },
|
|
9
|
+
sendClientErrorMessage: () => { },
|
|
10
|
+
sendBreadcrumbClickedMessage: () => { },
|
|
11
|
+
sendColorModeSwitchedMessage: () => { },
|
|
12
|
+
sendSidebarItemClickedMessage: () => { },
|
|
13
|
+
sendSidebarItemExpandedMessage: () => { },
|
|
14
|
+
sendSidebarItemCollapsedMessage: () => { },
|
|
15
|
+
sendChangeLayoutButtonClickedMessage: () => { },
|
|
16
|
+
sendEditPageLinkClickedMessage: () => { },
|
|
17
|
+
sendCodeSnippetReportedMessage: () => { },
|
|
18
|
+
sendNavbarMenuItemClickedMessage: () => { },
|
|
19
|
+
sendLoginButtonClickedMessage: () => { },
|
|
20
|
+
sendLoginProviderButtonClickedMessage: () => { },
|
|
21
|
+
sendLogoutMenuItemClickedMessage: () => { },
|
|
22
|
+
sendLogoClickedMessage: () => { },
|
|
23
|
+
sendTocItemClickedMessage: () => { },
|
|
24
|
+
sendCatalogFilterChangedMessage: () => { },
|
|
25
|
+
sendCatalogItemClickedMessage: () => { },
|
|
26
|
+
sendScorecardLinkClickedMessage: () => { },
|
|
27
|
+
sendBackToCatalogButtonClickedMessage: () => { },
|
|
28
|
+
sendSidebarDrilldownBackButtonClickedMessage: () => { },
|
|
29
|
+
sendFooterItemClickedMessage: () => { },
|
|
30
|
+
sendCatalogActionsButtonClickedMessage: () => { },
|
|
31
|
+
sendMobileMenuButtonCloseClickedMessage: () => { },
|
|
32
|
+
sendMobileMenuButtonOpenClickedMessage: () => { },
|
|
33
|
+
sendSearchInputResetButtonClickedMessage: () => { },
|
|
34
|
+
sendSearchRecentRemoveButtonClickedMessage: () => { },
|
|
35
|
+
sendSearchRecentClickedMessage: () => { },
|
|
36
|
+
sendRequestApiAccessButtonClickedMessage: () => { },
|
|
37
|
+
sendVersionPickerSelectionChangeMessage: () => { },
|
|
38
|
+
sendProductPickedMessage: () => { },
|
|
39
|
+
sendFilterCheckboxToggledMessage: () => { },
|
|
40
|
+
sendLanguagePickerLocaleChangedMessage: () => { },
|
|
41
|
+
sendSearchOpenedMessage: () => { },
|
|
42
|
+
sendSearchQueryMessage: () => { },
|
|
43
|
+
sendSearchAIQueryMessage: () => { },
|
|
44
|
+
sendFeedbackMessage: () => { },
|
|
45
|
+
sendSearchResultClickedMessage: () => { },
|
|
46
|
+
sendRedirectMessage: () => { },
|
|
47
|
+
sendOpenapiDocsMessage: () => { },
|
|
48
|
+
sendCopyCodeSnippetClickedMessage: () => { },
|
|
49
|
+
sendOpenapiDocsViewedMessage: () => { },
|
|
50
|
+
sendOpenapiDocsPerformanceMetricsMessage: () => { },
|
|
51
|
+
sendOpenapiDocsDownloadDefinitionClickedMessage: () => { },
|
|
52
|
+
sendOpenapiDocsSelectLanguageClickedMessage: () => { },
|
|
53
|
+
sendOpenapiDocsExpandCollapseAllClickedMessage: () => { },
|
|
54
|
+
sendOpenapiDocsSwitchServersClickedMessage: () => { },
|
|
55
|
+
sendOpenapiDocsExamplesSwitcherClickedMessage: () => { },
|
|
56
|
+
sendOpenapiDocsTryItOpenedMessage: () => { },
|
|
57
|
+
sendAsyncapiDocsViewedMessage: () => { },
|
|
58
|
+
sendAsyncapiDocsPerformanceMetricsMessage: () => { },
|
|
59
|
+
sendAsyncapiDocsSwitchMessageClickedMessage: () => { },
|
|
60
|
+
sendAsyncapiDocsSwitchExampleClickedMessage: () => { },
|
|
61
|
+
sendAsyncapiDocsMessageClickedMessage: () => { },
|
|
62
|
+
sendAsyncapiDocsServerModalOpenedMessage: () => { },
|
|
63
|
+
sendAsyncapiDocsDownloadDefinitionClickedMessage: () => { },
|
|
64
|
+
});
|
|
65
|
+
exports.useTelemetryFallback = useTelemetryFallback;
|
|
66
|
+
//# sourceMappingURL=use-telemetry-fallback.js.map
|
|
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useThemeHooks = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const ThemeDataContext_1 = require("../contexts/ThemeDataContext");
|
|
6
|
+
const use_telemetry_fallback_1 = require("./use-telemetry-fallback");
|
|
6
7
|
const fallbacks = {
|
|
7
8
|
useTranslate: () => ({
|
|
8
9
|
translate: (value, options) => (typeof options === 'string' ? options : options === null || options === void 0 ? void 0 : options.defaultValue) || value || '',
|
|
9
10
|
}),
|
|
10
11
|
useSubmitFeedback: () => ({ submitFeedback: () => { } }),
|
|
11
|
-
useTelemetry:
|
|
12
|
+
useTelemetry: use_telemetry_fallback_1.useTelemetryFallback,
|
|
12
13
|
/**
|
|
13
14
|
* @deprecated use `useTelemetry` instead
|
|
14
15
|
**/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AsyncApiRealmUI } from '@redocly/realm-asyncapi-sdk';
|
|
1
2
|
import type { CatalogEntityConfig, PageData, PageProps, ResolvedNavItemWithLink, Version } from '@redocly/config';
|
|
2
3
|
import type { ShikiTransformer } from '@shikijs/types';
|
|
3
4
|
import type { Callback, TFunction as TFunc } from 'i18next';
|
|
@@ -7,7 +8,6 @@ import type { UseCatalogResponse, CatalogApiResults, CatalogApiParams, FilteredC
|
|
|
7
8
|
import type { UserMenuData } from './user-menu';
|
|
8
9
|
import type { ItemState } from './sidebar';
|
|
9
10
|
import type { SearchItemData, SearchFacet, SearchFilterItem, SearchFacetQuery, AiSearchConversationItem } from './search';
|
|
10
|
-
import type { EventType, SendEventParams } from './telemetry';
|
|
11
11
|
import type { SubmitFeedbackParams } from './feedback';
|
|
12
12
|
import type { TFunction } from './l10n';
|
|
13
13
|
import type { BreadcrumbItem } from './breadcrumb';
|
|
@@ -117,9 +117,7 @@ export type ThemeHooks = {
|
|
|
117
117
|
entityKey: string;
|
|
118
118
|
}, initialData?: BffCatalogRelatedEntityList) => CatalogApiResults<BffCatalogRelatedEntity, BffCatalogRelatedEntityList>;
|
|
119
119
|
useCatalogClassic: (config: CatalogConfig) => FilteredCatalog;
|
|
120
|
-
useTelemetry: () =>
|
|
121
|
-
send<TEventType extends EventType>(event: SendEventParams<TEventType>): void;
|
|
122
|
-
};
|
|
120
|
+
useTelemetry: () => Omit<AsyncApiRealmUI.Telemetry, 'init' | 'updateCloudEventData' | 'forceFlush' | 'startSpan' | 'constructCloudEvent' | 'sendToOtelService'>;
|
|
123
121
|
useUserTeams: () => string[];
|
|
124
122
|
usePageData: () => PageData | null;
|
|
125
123
|
usePageProps: <T extends Record<string, unknown>>() => PageProps & T;
|
package/lib/core/types/index.js
CHANGED
|
@@ -31,6 +31,5 @@ __exportStar(require("./common"), exports);
|
|
|
31
31
|
__exportStar(require("./open-api-server"), exports);
|
|
32
32
|
__exportStar(require("./marker"), exports);
|
|
33
33
|
__exportStar(require("./code-walkthrough"), exports);
|
|
34
|
-
__exportStar(require("./telemetry"), exports);
|
|
35
34
|
__exportStar(require("./page-actions"), exports);
|
|
36
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const PlayIcon: 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,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PlayIcon = 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({ viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M3.0625 12.25C2.94647 12.25 2.83519 12.2039 2.75314 12.1219C2.67109 12.0398 2.625 11.9286 2.625 11.8125V2.18753C2.62499 2.1115 2.6448 2.03678 2.68247 1.97074C2.72014 1.9047 2.77437 1.84961 2.83981 1.81092C2.90526 1.77222 2.97965 1.75124 3.05567 1.75005C3.13169 1.74887 3.20671 1.76751 3.27333 1.80415L12.0233 6.61665C12.092 6.6544 12.1492 6.70989 12.1891 6.77733C12.229 6.84476 12.25 6.92167 12.25 7.00001C12.25 7.07835 12.229 7.15526 12.1891 7.22269C12.1492 7.29013 12.092 7.34562 12.0233 7.38337L3.27333 12.1959C3.20874 12.2314 3.13622 12.25 3.0625 12.25ZM3.5 2.9273V11.0726L10.9046 7.00003L3.5 2.9273Z" })));
|
|
12
|
+
exports.PlayIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
13
|
+
'data-component-name': 'icons/PlayIcon/PlayIcon',
|
|
14
|
+
})) `
|
|
15
|
+
path {
|
|
16
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
17
|
+
}
|
|
18
|
+
height: ${({ size }) => size || '16px'};
|
|
19
|
+
width: ${({ size }) => size || '16px'};
|
|
20
|
+
`;
|
|
21
|
+
//# sourceMappingURL=PlayIcon.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const WorkflowHierarchyIcon: 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.WorkflowHierarchyIcon = 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({ viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
11
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.5 6.5H13.5C13.7651 6.4997 14.0193 6.39424 14.2068 6.20677C14.3942 6.0193 14.4997 5.76512 14.5 5.5V2.5C14.4997 2.23488 14.3942 1.9807 14.2068 1.79323C14.0193 1.60576 13.7651 1.5003 13.5 1.5H2.5C2.23488 1.5003 1.9807 1.60576 1.79323 1.79323C1.60576 1.9807 1.5003 2.23488 1.5 2.5V5.5C1.5003 5.76512 1.60576 6.0193 1.79323 6.20677C1.9807 6.39424 2.23488 6.4997 2.5 6.5H3.5H4.5ZM13.5 2.5H2.5V5.5H13.5V2.5Z" }),
|
|
12
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.5 9.5H8.5C8.23488 9.5003 7.9807 9.60576 7.79323 9.79323C7.60576 9.9807 7.5003 10.2349 7.5 10.5V11.5H4.5V9.29295V8.5V6.5H3.5V9.29295V11.5C3.5003 11.7651 3.60576 12.0193 3.79323 12.2068C3.9807 12.3942 4.23488 12.4997 4.5 12.5H7.5V13.5C7.5003 13.7651 7.60576 14.0193 7.79323 14.2068C7.9807 14.3942 8.23488 14.4997 8.5 14.5H13.5C13.7651 14.4997 14.0193 14.3942 14.2068 14.2068C14.3942 14.0193 14.4997 13.7651 14.5 13.5V10.5C14.4997 10.2349 14.3942 9.9807 14.2068 9.79323C14.0193 9.60576 13.7651 9.5003 13.5 9.5ZM8.5 10.5V13.5H13.5V10.5H8.5Z" })));
|
|
13
|
+
exports.WorkflowHierarchyIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
14
|
+
'data-component-name': 'icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon',
|
|
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=WorkflowHierarchyIcon.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -238,6 +238,7 @@ export * from './icons/CharacterIcon/CharacterIcon';
|
|
|
238
238
|
export * from './icons/FileIcon/FileIcon';
|
|
239
239
|
export * from './icons/ExportIcon/ExportIcon';
|
|
240
240
|
export * from './icons/CertificateIcon/CertificateIcon';
|
|
241
|
+
export * from './icons/PlayIcon/PlayIcon';
|
|
241
242
|
export * from './icons/PlaylistIcon/PlaylistIcon';
|
|
242
243
|
export * from './icons/WorkflowAutomationIcon/WorkflowAutomationIcon';
|
|
243
244
|
export * from './icons/TaskViewIcon/TaskViewIcon';
|
|
@@ -254,6 +255,7 @@ export * from './icons/RabbitMQIcon/RabbitMQIcon';
|
|
|
254
255
|
export * from './icons/CurveAutoColonIcon/CurveAutoColonIcon';
|
|
255
256
|
export * from './icons/AiStarsIcon/AiStarsIcon';
|
|
256
257
|
export * from './icons/AiStarsGradientIcon/AiStarsGradientIcon';
|
|
258
|
+
export * from './icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon';
|
|
257
259
|
export * from './icons/GenericIcon/GenericIcon';
|
|
258
260
|
export * from './layouts/RootLayout';
|
|
259
261
|
export * from './layouts/PageLayout';
|
package/lib/index.js
CHANGED
|
@@ -291,6 +291,7 @@ __exportStar(require("./icons/CharacterIcon/CharacterIcon"), exports);
|
|
|
291
291
|
__exportStar(require("./icons/FileIcon/FileIcon"), exports);
|
|
292
292
|
__exportStar(require("./icons/ExportIcon/ExportIcon"), exports);
|
|
293
293
|
__exportStar(require("./icons/CertificateIcon/CertificateIcon"), exports);
|
|
294
|
+
__exportStar(require("./icons/PlayIcon/PlayIcon"), exports);
|
|
294
295
|
__exportStar(require("./icons/PlaylistIcon/PlaylistIcon"), exports);
|
|
295
296
|
__exportStar(require("./icons/WorkflowAutomationIcon/WorkflowAutomationIcon"), exports);
|
|
296
297
|
__exportStar(require("./icons/TaskViewIcon/TaskViewIcon"), exports);
|
|
@@ -307,6 +308,7 @@ __exportStar(require("./icons/RabbitMQIcon/RabbitMQIcon"), exports);
|
|
|
307
308
|
__exportStar(require("./icons/CurveAutoColonIcon/CurveAutoColonIcon"), exports);
|
|
308
309
|
__exportStar(require("./icons/AiStarsIcon/AiStarsIcon"), exports);
|
|
309
310
|
__exportStar(require("./icons/AiStarsGradientIcon/AiStarsGradientIcon"), exports);
|
|
311
|
+
__exportStar(require("./icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon"), exports);
|
|
310
312
|
__exportStar(require("./icons/GenericIcon/GenericIcon"), exports);
|
|
311
313
|
/* Layouts */
|
|
312
314
|
__exportStar(require("./layouts/RootLayout"), exports);
|
|
@@ -54,14 +54,11 @@ const Wrapper = styled_components_1.default.div `
|
|
|
54
54
|
margin: 0 auto;
|
|
55
55
|
width: 100%;
|
|
56
56
|
|
|
57
|
-
${({ layout = config_1.LayoutVariant.THREE_PANEL
|
|
57
|
+
${({ layout = config_1.LayoutVariant.THREE_PANEL }) => {
|
|
58
58
|
return (0, styled_components_1.css) `
|
|
59
59
|
max-width: ${layout === config_1.LayoutVariant.THREE_PANEL ? '100%' : ''};
|
|
60
60
|
|
|
61
61
|
@media screen and (min-width: ${media_css_1.breakpoints.small}) {
|
|
62
|
-
width: ${collapsedSidebar
|
|
63
|
-
? `var(--layout-${layout}-small-max-width)`
|
|
64
|
-
: 'calc(100% - var(--sidebar-width))'};
|
|
65
62
|
max-width: var(--layout-${layout}-small-max-width);
|
|
66
63
|
}
|
|
67
64
|
|
|
@@ -40,11 +40,11 @@ const FilterWrapper = styled_components_1.default.div `
|
|
|
40
40
|
flex-wrap: wrap;
|
|
41
41
|
position: sticky;
|
|
42
42
|
|
|
43
|
-
padding-top:
|
|
43
|
+
padding-top: var(--spacing-xl);
|
|
44
44
|
padding-right: var(--spacing-xl);
|
|
45
45
|
padding-left: var(--spacing-xl);
|
|
46
46
|
padding-bottom: var(--spacing-xs);
|
|
47
|
-
top:
|
|
47
|
+
top: var(--navbar-height);
|
|
48
48
|
background-color: var(--bg-color);
|
|
49
49
|
z-index: 1;
|
|
50
50
|
max-width: var(--md-content-max-width);
|
|
@@ -44,7 +44,7 @@ function CodeToggle(props) {
|
|
|
44
44
|
return (react_1.default.createElement(exports.ToggleWrapper, { "data-component-name": "Markdoc/CodeWalkthrough/CodeToggle" },
|
|
45
45
|
react_1.default.createElement(ToggleContentWrapper, null,
|
|
46
46
|
react_1.default.createElement(exports.ToggleSubtitle, null,
|
|
47
|
-
react_1.default.createElement(Switch_1.Switch, { value: checked, onChange: (newValue) => changeControlState(id, newValue) }),
|
|
47
|
+
react_1.default.createElement(Switch_1.Switch, { value: checked, onChange: (newValue) => changeControlState(id, newValue), stopPropagation: true }),
|
|
48
48
|
react_1.default.createElement("div", null, label)),
|
|
49
49
|
description ? (react_1.default.createElement("div", null, description.map((paragraph, idx) => (react_1.default.createElement(react_1.default.Fragment, { key: idx }, paragraph))))) : null),
|
|
50
50
|
checked ? children : null));
|
|
@@ -87,9 +87,14 @@ const DocsPanel = styled_components_1.default.div `
|
|
|
87
87
|
min-height: 0;
|
|
88
88
|
min-height: calc(100vh - var(--navbar-height));
|
|
89
89
|
|
|
90
|
+
padding-top: var(--spacing-xl);
|
|
90
91
|
padding-right: var(--spacing-xs);
|
|
91
92
|
padding-bottom: calc(var(--spacing-xs) + var(--spacing-xl));
|
|
92
93
|
gap: var(--spacing-xl);
|
|
94
|
+
|
|
95
|
+
&:has([data-component-name='Markdoc/CodeWalkthrough/CodeFilters']) {
|
|
96
|
+
padding-top: 0;
|
|
97
|
+
}
|
|
93
98
|
`;
|
|
94
99
|
const ContentWrapper = styled_components_1.default.div `
|
|
95
100
|
flex-grow: 1;
|
|
@@ -115,14 +120,8 @@ const ContentWrapper = styled_components_1.default.div `
|
|
|
115
120
|
-ms-overflow-style: none; /* IE and Edge */
|
|
116
121
|
scrollbar-width: none; /* Firefox */
|
|
117
122
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&:not(:first-child) {
|
|
123
|
-
& > *:first-child {
|
|
124
|
-
margin-top: 0;
|
|
125
|
-
}
|
|
123
|
+
&& > *:first-child {
|
|
124
|
+
margin-top: 0;
|
|
126
125
|
}
|
|
127
126
|
`;
|
|
128
127
|
//# sourceMappingURL=CodeWalkthrough.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.57.0-next.
|
|
3
|
+
"version": "0.57.0-next.4",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"react-calendar": "5.1.0",
|
|
88
88
|
"react-date-picker": "11.0.0",
|
|
89
89
|
"@redocly/config": "0.28.0",
|
|
90
|
-
"@redocly/realm-asyncapi-sdk": "0.3.0-next.
|
|
90
|
+
"@redocly/realm-asyncapi-sdk": "0.3.0-next.1"
|
|
91
91
|
},
|
|
92
92
|
"scripts": {
|
|
93
93
|
"watch": "tsc -p tsconfig.build.json && (concurrently \"tsc -w -p tsconfig.build.json\" \"tsc-alias -w -p tsconfig.build.json\")",
|
|
@@ -31,13 +31,10 @@ export function Breadcrumbs(props: {
|
|
|
31
31
|
label={breadcrumb.label}
|
|
32
32
|
isActive={isLast}
|
|
33
33
|
onClick={() => {
|
|
34
|
-
telemetry.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
position: idx + 1,
|
|
39
|
-
totalBreadcrumbs: breadcrumbs.length,
|
|
40
|
-
},
|
|
34
|
+
telemetry.sendBreadcrumbClickedMessage({
|
|
35
|
+
link: breadcrumb.link,
|
|
36
|
+
position: idx + 1,
|
|
37
|
+
totalBreadcrumbs: breadcrumbs.length,
|
|
41
38
|
});
|
|
42
39
|
}}
|
|
43
40
|
/>
|
|
@@ -21,7 +21,7 @@ export function EditPageButton({ to }: EditPageButtonProps): JSX.Element {
|
|
|
21
21
|
data-component-name="Buttons/EditPageButton"
|
|
22
22
|
target="_blank"
|
|
23
23
|
to={to}
|
|
24
|
-
onClick={() => telemetry.
|
|
24
|
+
onClick={() => telemetry.sendEditPageLinkClickedMessage(undefined)}
|
|
25
25
|
>
|
|
26
26
|
<ButtonIcon />
|
|
27
27
|
<ButtonText data-translation-key="markdown.editPage.text">
|
|
@@ -30,7 +30,7 @@ export function CatalogCard({ entity, catalogConfig }: CatalogCardProps): JSX.El
|
|
|
30
30
|
window.location.assign(
|
|
31
31
|
`${pathPrefix}/catalogs/${catalogConfig.slug}/entities/${entity.key}`,
|
|
32
32
|
);
|
|
33
|
-
telemetry.
|
|
33
|
+
telemetry.sendCatalogItemClickedMessage(undefined);
|
|
34
34
|
}}
|
|
35
35
|
>
|
|
36
36
|
<CardContent>
|
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
4
|
-
import { Route, Routes
|
|
4
|
+
import { Route, Routes } from 'react-router-dom';
|
|
5
5
|
|
|
6
6
|
import type { BffCatalogEntity, BffCatalogRelatedEntityList } from '@redocly/theme/core/types';
|
|
7
7
|
|
|
8
8
|
import { breakpoints } from '@redocly/theme/core/utils';
|
|
9
|
-
import { ArrowLeftIcon } from '@redocly/theme/icons/ArrowLeftIcon/ArrowLeftIcon';
|
|
10
9
|
import { CatalogPageDescription } from '@redocly/theme/components/Catalog/CatalogPageDescription';
|
|
11
10
|
import { CatalogEntityProperties } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties';
|
|
12
11
|
import { CatalogEntityMetadata } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityMetadata';
|
|
13
12
|
import { CatalogEntityLinks } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityLinks';
|
|
14
13
|
import { Breadcrumbs } from '@redocly/theme/components/Breadcrumbs/Breadcrumbs';
|
|
15
|
-
import { Sidebar } from '@redocly/theme/components/Sidebar/Sidebar';
|
|
16
|
-
import { Menu } from '@redocly/theme/components/Menu/Menu';
|
|
17
|
-
import { Button } from '@redocly/theme/components/Button/Button';
|
|
18
14
|
import { CatalogEntityRelations } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations';
|
|
19
15
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
20
|
-
import { SidebarActions } from '@redocly/theme/components/SidebarActions/SidebarActions';
|
|
21
16
|
import { CatalogEntitySchema } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntitySchema';
|
|
22
17
|
import { CatalogEntityMethodAndPath } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath';
|
|
23
18
|
import { CatalogEntityRelationsGraph } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy';
|
|
@@ -48,64 +43,14 @@ export function CatalogEntity({
|
|
|
48
43
|
}: CatalogEntityProps) {
|
|
49
44
|
const { useTranslate, useCatalog } = useThemeHooks();
|
|
50
45
|
const { translate } = useTranslate();
|
|
46
|
+
|
|
51
47
|
const linkToMainCatalog = `catalogs/${catalogConfig.slug}`;
|
|
52
48
|
const linkToMainCatalogLabel = translate(catalogConfig.titleTranslationKey);
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
collapsedSidebar,
|
|
56
|
-
onChangeViewClick,
|
|
57
|
-
onChangeCollapseSidebarClick,
|
|
58
|
-
searchQuery,
|
|
59
|
-
setSearchQuery,
|
|
60
|
-
} = useCatalog();
|
|
61
|
-
|
|
62
|
-
const { pathname } = useLocation();
|
|
63
|
-
const linkBase = `${linkToMainCatalog}/entities/${entity.key}`;
|
|
64
|
-
const menuItemDefs = [
|
|
65
|
-
{ label: 'Overview', path: linkBase, end: true },
|
|
66
|
-
{ label: 'Relations Graph', path: `${linkBase}/relations-graph`, end: true },
|
|
67
|
-
];
|
|
68
|
-
const sidebarMenuItems = menuItemDefs.map(({ label, path, end }) => ({
|
|
69
|
-
label,
|
|
70
|
-
link: path,
|
|
71
|
-
active: Boolean(matchPath({ path: `/${path}`, end }, pathname)),
|
|
72
|
-
items: [],
|
|
73
|
-
hasActiveSubItem: false,
|
|
74
|
-
}));
|
|
49
|
+
|
|
50
|
+
const { searchQuery, setSearchQuery } = useCatalog();
|
|
75
51
|
|
|
76
52
|
return (
|
|
77
53
|
<CatalogPageWrapper data-component-name="Catalog/CatalogEntity/CatalogEntity">
|
|
78
|
-
<CatalogSidebar
|
|
79
|
-
collapsed={collapsedSidebar}
|
|
80
|
-
header={
|
|
81
|
-
<BackLink
|
|
82
|
-
icon={<ArrowLeftIcon />}
|
|
83
|
-
iconPosition="left"
|
|
84
|
-
variant="ghost"
|
|
85
|
-
size="medium"
|
|
86
|
-
data-component-name="Sidebar/BackButton"
|
|
87
|
-
to={linkToMainCatalog}
|
|
88
|
-
>
|
|
89
|
-
{collapsedSidebar ? (
|
|
90
|
-
''
|
|
91
|
-
) : (
|
|
92
|
-
<div data-translation-key="sidebar.menu.backLabel">
|
|
93
|
-
{translate('sidebar.menu.backLabel')}
|
|
94
|
-
</div>
|
|
95
|
-
)}
|
|
96
|
-
</BackLink>
|
|
97
|
-
}
|
|
98
|
-
menu={<Menu items={sidebarMenuItems} />}
|
|
99
|
-
footer={
|
|
100
|
-
<SidebarActions
|
|
101
|
-
layout={layout}
|
|
102
|
-
collapsedSidebar={collapsedSidebar}
|
|
103
|
-
isApiDocs={false}
|
|
104
|
-
onChangeViewClick={onChangeViewClick}
|
|
105
|
-
onChangeCollapseSidebarClick={onChangeCollapseSidebarClick}
|
|
106
|
-
/>
|
|
107
|
-
}
|
|
108
|
-
/>
|
|
109
54
|
<CatalogPageContent>
|
|
110
55
|
<Breadcrumbs
|
|
111
56
|
additionalBreadcrumbs={[
|
|
@@ -196,15 +141,6 @@ const CatalogPageContent = styled.main`
|
|
|
196
141
|
}
|
|
197
142
|
`;
|
|
198
143
|
|
|
199
|
-
const CatalogSidebar = styled(Sidebar)`
|
|
200
|
-
display: none;
|
|
201
|
-
|
|
202
|
-
@media screen and (min-width: ${breakpoints.medium}) {
|
|
203
|
-
display: flex;
|
|
204
|
-
}
|
|
205
|
-
--menu-container-padding-top: 0;
|
|
206
|
-
`;
|
|
207
|
-
|
|
208
144
|
const CatalogEntityPageWrapper = styled.div`
|
|
209
145
|
display: flex;
|
|
210
146
|
flex-direction: column;
|
|
@@ -223,11 +159,3 @@ const CatalogTwoColumnsSection = styled.section`
|
|
|
223
159
|
gap: 24px;
|
|
224
160
|
align-items: start;
|
|
225
161
|
`;
|
|
226
|
-
|
|
227
|
-
const BackLink = styled(Button)`
|
|
228
|
-
padding: var(--spacing-unit) 0;
|
|
229
|
-
height: calc(var(--line-height-base) + var(--spacing-unit) * 2);
|
|
230
|
-
justify-content: flex-start;
|
|
231
|
-
width: 100%;
|
|
232
|
-
margin-bottom: 0px;
|
|
233
|
-
`;
|
|
@@ -42,7 +42,7 @@ export function CatalogClassicActions(props: CatalogClassicActionsProps): JSX.El
|
|
|
42
42
|
iconPosition="left"
|
|
43
43
|
onClick={() => {
|
|
44
44
|
onOpenFilter();
|
|
45
|
-
telemetry.
|
|
45
|
+
telemetry.sendCatalogActionsButtonClickedMessage(undefined);
|
|
46
46
|
}}
|
|
47
47
|
data-translation-key="catalog.filters.title"
|
|
48
48
|
>
|
|
@@ -38,7 +38,7 @@ export function CatalogClassicCard({ item }: CatalogClassicCardProps): JSX.Eleme
|
|
|
38
38
|
<Link key={item.docsLink || item.link} to={item.docsLink || item.link}>
|
|
39
39
|
<StyledCard
|
|
40
40
|
data-component-name="CatalogClassic/CatalogClassicCard"
|
|
41
|
-
onClick={() => telemetry.
|
|
41
|
+
onClick={() => telemetry.sendCatalogItemClickedMessage(undefined)}
|
|
42
42
|
>
|
|
43
43
|
<CardContent>
|
|
44
44
|
<CardTitleWrapper>
|
|
@@ -51,9 +51,7 @@ function ScorecardBadge(props: {
|
|
|
51
51
|
return (
|
|
52
52
|
<Link to={slug}>
|
|
53
53
|
<Tag
|
|
54
|
-
onClick={() =>
|
|
55
|
-
telemetry.send({ type: 'scorecard_link.clicked', payload: { action: 'click' } })
|
|
56
|
-
}
|
|
54
|
+
onClick={() => telemetry.sendScorecardLinkClickedMessage({ action: 'click' })}
|
|
57
55
|
withStatusDot
|
|
58
56
|
statusDotColor={`var(${colorVariable})`}
|
|
59
57
|
>
|