@redocly/theme 0.70.0-next.3 → 0.70.0-next.5
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/Catalog.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +30 -11
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.js +1 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.js +2 -2
- package/lib/components/Dropdown/Dropdown.js +3 -1
- package/lib/components/Dropdown/DropdownMenu.d.ts +1 -0
- package/lib/components/Dropdown/DropdownMenu.js +1 -1
- package/lib/components/Feedback/Reasons.js +3 -2
- package/lib/components/Filter/FilterCheckboxes.js +30 -11
- package/lib/components/Image/Image.js +24 -4
- package/lib/components/Markdown/Markdown.js +3 -2
- package/lib/components/Menu/Menu.js +4 -0
- package/lib/components/Menu/MenuSelect.d.ts +7 -0
- package/lib/components/Menu/MenuSelect.js +129 -0
- package/lib/components/Menu/variables.js +43 -4
- package/lib/components/Navbar/Navbar.js +44 -5
- package/lib/components/Navbar/variables.js +3 -0
- package/lib/components/NavigationTabs/NavigationTab.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTab.js +93 -0
- package/lib/components/NavigationTabs/NavigationTabContent.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabContent.js +50 -0
- package/lib/components/NavigationTabs/NavigationTabMenu.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabMenu.js +18 -0
- package/lib/components/NavigationTabs/NavigationTabs.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabs.js +97 -0
- package/lib/components/NavigationTabs/variables.d.ts +1 -0
- package/lib/components/NavigationTabs/variables.js +37 -0
- package/lib/components/Search/SearchTrigger.js +8 -2
- package/lib/components/Segmented/Segmented.js +23 -3
- package/lib/components/Select/Select.js +10 -3
- package/lib/components/Select/SelectInput.d.ts +1 -0
- package/lib/components/Select/SelectInput.js +3 -3
- package/lib/components/Sidebar/Sidebar.js +2 -2
- package/lib/components/TableOfContent/TableOfContent.js +2 -2
- package/lib/core/constants/common.d.ts +1 -0
- package/lib/core/constants/common.js +1 -0
- package/lib/core/hooks/index.d.ts +2 -0
- package/lib/core/hooks/index.js +2 -0
- package/lib/core/hooks/menu/use-mobile-menu-items.js +75 -51
- package/lib/core/hooks/menu/use-mobile-menu-levels.js +12 -7
- package/lib/core/hooks/use-scroll-item-into-view.d.ts +2 -0
- package/lib/core/hooks/use-scroll-item-into-view.js +16 -0
- package/lib/core/hooks/use-tab-list.d.ts +31 -0
- package/lib/core/hooks/use-tab-list.js +49 -0
- package/lib/core/hooks/use-theme-hooks.js +2 -0
- package/lib/core/styles/global.js +12 -2
- package/lib/core/types/hooks.d.ts +5 -0
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/navigation-tabs.d.ts +49 -0
- package/lib/core/types/navigation-tabs.js +3 -0
- package/lib/core/utils/Dynamic.d.ts +8 -1
- package/lib/core/utils/Dynamic.js +34 -3
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/core/utils/menu.d.ts +4 -0
- package/lib/core/utils/menu.js +42 -3
- package/lib/core/utils/navigation-tabs.d.ts +8 -0
- package/lib/core/utils/navigation-tabs.js +71 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +7 -1
- package/lib/layouts/PageLayout.js +1 -1
- package/lib/layouts/RootLayout.js +2 -2
- package/lib/markdoc/components/CodeWalkthrough/CodeFilters.js +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanel.js +3 -3
- package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.js +1 -1
- package/package.json +3 -3
- package/src/components/Catalog/Catalog.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +2 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -1
- package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +37 -22
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.tsx +1 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.tsx +2 -2
- package/src/components/Dropdown/Dropdown.tsx +4 -1
- package/src/components/Dropdown/DropdownMenu.tsx +7 -1
- package/src/components/Feedback/Reasons.tsx +3 -2
- package/src/components/Filter/FilterCheckboxes.tsx +33 -18
- package/src/components/Image/Image.tsx +26 -5
- package/src/components/Markdown/Markdown.tsx +3 -2
- package/src/components/Menu/Menu.tsx +5 -0
- package/src/components/Menu/MenuSelect.tsx +198 -0
- package/src/components/Menu/variables.ts +43 -4
- package/src/components/Navbar/Navbar.tsx +22 -5
- package/src/components/Navbar/variables.ts +3 -0
- package/src/components/NavigationTabs/NavigationTab.tsx +148 -0
- package/src/components/NavigationTabs/NavigationTabContent.tsx +66 -0
- package/src/components/NavigationTabs/NavigationTabMenu.tsx +40 -0
- package/src/components/NavigationTabs/NavigationTabs.tsx +83 -0
- package/src/components/NavigationTabs/variables.ts +34 -0
- package/src/components/Search/SearchTrigger.tsx +11 -2
- package/src/components/Segmented/Segmented.tsx +25 -16
- package/src/components/Select/Select.tsx +12 -6
- package/src/components/Select/SelectInput.tsx +8 -10
- package/src/components/Sidebar/Sidebar.tsx +2 -2
- package/src/components/TableOfContent/TableOfContent.tsx +2 -2
- package/src/core/constants/common.ts +1 -0
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +3 -0
- package/src/core/hooks/index.ts +2 -0
- package/src/core/hooks/menu/use-mobile-menu-items.ts +91 -56
- package/src/core/hooks/menu/use-mobile-menu-levels.ts +14 -6
- package/src/core/hooks/use-scroll-item-into-view.ts +18 -0
- package/src/core/hooks/use-tab-list.ts +63 -0
- package/src/core/hooks/use-theme-hooks.ts +2 -0
- package/src/core/styles/global.ts +12 -2
- package/src/core/types/hooks.ts +5 -0
- package/src/core/types/index.ts +1 -0
- package/src/core/types/l10n.ts +3 -0
- package/src/core/types/navigation-tabs.ts +54 -0
- package/src/core/utils/Dynamic.tsx +67 -35
- package/src/core/utils/index.ts +1 -0
- package/src/core/utils/menu.ts +49 -3
- package/src/core/utils/navigation-tabs.ts +99 -0
- package/src/icons/CheckboxIcon/CheckboxIcon.tsx +1 -0
- package/src/icons/ChevronSortIcon/ChevronSortIcon.tsx +1 -0
- package/src/index.ts +6 -0
- package/src/layouts/PageLayout.tsx +1 -1
- package/src/layouts/RootLayout.tsx +2 -2
- package/src/markdoc/components/CodeWalkthrough/CodeFilters.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodePanel.tsx +3 -3
- package/src/markdoc/components/CodeWalkthrough/CodeWalkthrough.tsx +1 -1
|
@@ -21,6 +21,7 @@ var FEEDBACK_TYPES;
|
|
|
21
21
|
exports.DEFAULT_FEEDBACK_TYPE = FEEDBACK_TYPES.SENTIMENT;
|
|
22
22
|
var MenuItemType;
|
|
23
23
|
(function (MenuItemType) {
|
|
24
|
+
MenuItemType["Select"] = "select";
|
|
24
25
|
MenuItemType["Separator"] = "separator";
|
|
25
26
|
MenuItemType["DrillDown"] = "drilldown";
|
|
26
27
|
MenuItemType["Group"] = "group";
|
|
@@ -21,6 +21,7 @@ export * from './menu/use-mobile-menu-levels';
|
|
|
21
21
|
export * from './menu/use-collapse';
|
|
22
22
|
export * from './feedback/use-report-dialog';
|
|
23
23
|
export * from './use-tabs';
|
|
24
|
+
export * from './use-tab-list';
|
|
24
25
|
export * from './use-focus-trap';
|
|
25
26
|
export * from './use-consent-dialog';
|
|
26
27
|
export * from './use-consent-telemetry';
|
|
@@ -58,3 +59,4 @@ export * from './use-toast-logic';
|
|
|
58
59
|
export * from './use-banner-telemetry';
|
|
59
60
|
export * from './use-tooltip-fallback-placement';
|
|
60
61
|
export * from './use-anchor-positioning';
|
|
62
|
+
export * from './use-scroll-item-into-view';
|
package/lib/core/hooks/index.js
CHANGED
|
@@ -37,6 +37,7 @@ __exportStar(require("./menu/use-mobile-menu-levels"), exports);
|
|
|
37
37
|
__exportStar(require("./menu/use-collapse"), exports);
|
|
38
38
|
__exportStar(require("./feedback/use-report-dialog"), exports);
|
|
39
39
|
__exportStar(require("./use-tabs"), exports);
|
|
40
|
+
__exportStar(require("./use-tab-list"), exports);
|
|
40
41
|
__exportStar(require("./use-focus-trap"), exports);
|
|
41
42
|
__exportStar(require("./use-consent-dialog"), exports);
|
|
42
43
|
__exportStar(require("./use-consent-telemetry"), exports);
|
|
@@ -74,4 +75,5 @@ __exportStar(require("./use-toast-logic"), exports);
|
|
|
74
75
|
__exportStar(require("./use-banner-telemetry"), exports);
|
|
75
76
|
__exportStar(require("./use-tooltip-fallback-placement"), exports);
|
|
76
77
|
__exportStar(require("./use-anchor-positioning"), exports);
|
|
78
|
+
__exportStar(require("./use-scroll-item-into-view"), exports);
|
|
77
79
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useMobileMenuItems = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
4
5
|
const react_router_1 = require("react-router");
|
|
5
6
|
const use_theme_hooks_1 = require("../use-theme-hooks");
|
|
6
7
|
const use_theme_config_1 = require("../use-theme-config");
|
|
@@ -10,73 +11,96 @@ const MENU_SEPARATOR = {
|
|
|
10
11
|
type: 'separator',
|
|
11
12
|
separatorLine: true,
|
|
12
13
|
};
|
|
14
|
+
const NO_VERSIONS = [];
|
|
15
|
+
const NO_NAV_ITEMS = [];
|
|
13
16
|
const useMobileMenuItems = (menuType) => {
|
|
14
|
-
var _a, _b, _c;
|
|
15
|
-
|
|
16
|
-
const {
|
|
17
|
+
var _a, _b, _c, _d;
|
|
18
|
+
var _e, _f, _g;
|
|
19
|
+
const { useTranslate, useL10nConfig, useCurrentProduct, usePageVersions, useSidebarItems, useNavigationTabs, } = (0, use_theme_hooks_1.useThemeHooks)();
|
|
20
|
+
const versions = (_e = (_a = usePageVersions()) === null || _a === void 0 ? void 0 : _a.versions) !== null && _e !== void 0 ? _e : NO_VERSIONS;
|
|
17
21
|
const { defaultLocale, currentLocale, locales } = useL10nConfig();
|
|
18
22
|
const { translate } = useTranslate();
|
|
19
23
|
const activeVersion = versions.find((version) => version.active);
|
|
20
24
|
const { currentItems: sidebarItems, pushDrilldownState, popDrilldownState, backLink, } = useSidebarItems(activeVersion);
|
|
25
|
+
const navigationTabs = useNavigationTabs();
|
|
21
26
|
const location = (0, react_router_1.useLocation)();
|
|
22
27
|
const currentProduct = useCurrentProduct();
|
|
23
|
-
const hasProductNavbarOverride = (
|
|
28
|
+
const hasProductNavbarOverride = (_b = currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.configOverride) === null || _b === void 0 ? void 0 : _b.navbar;
|
|
24
29
|
const productThemeConfig = (0, use_theme_config_1.useThemeConfig)();
|
|
25
30
|
const baseThemeConfig = (0, use_theme_config_1.useThemeConfig)(false);
|
|
26
|
-
const baseNavItems = (((
|
|
27
|
-
const productNavItems = (hasProductNavbarOverride ? ((
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
const baseNavItems = ((_f = (_c = baseThemeConfig.navbar) === null || _c === void 0 ? void 0 : _c.items) !== null && _f !== void 0 ? _f : NO_NAV_ITEMS);
|
|
32
|
+
const productNavItems = (hasProductNavbarOverride ? ((_g = (_d = productThemeConfig.navbar) === null || _d === void 0 ? void 0 : _d.items) !== null && _g !== void 0 ? _g : NO_NAV_ITEMS) : NO_NAV_ITEMS);
|
|
33
|
+
const products = baseThemeConfig.products;
|
|
34
|
+
const items = (0, react_1.useMemo)(() => {
|
|
35
|
+
const menuItems = [];
|
|
36
|
+
const navigationTabsSelect = menuType === common_1.MobileMenuType.PAGE ? (0, menu_1.buildNavigationTabsSelect)({ navigationTabs }) : undefined;
|
|
37
|
+
if (menuType === common_1.MobileMenuType.PAGE) {
|
|
38
|
+
if (activeVersion) {
|
|
39
|
+
menuItems.push(...(0, menu_1.buildVersionSection)(translate, versions, activeVersion));
|
|
40
|
+
}
|
|
41
|
+
if (menuItems.length && sidebarItems.length) {
|
|
42
|
+
menuItems.push(MENU_SEPARATOR);
|
|
43
|
+
}
|
|
44
|
+
menuItems.push(...sidebarItems);
|
|
35
45
|
}
|
|
36
|
-
if (
|
|
37
|
-
menuItems.push(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
menuItems.push(MENU_SEPARATOR);
|
|
45
|
-
}
|
|
46
|
-
if (baseNavItems.length) {
|
|
47
|
-
menuItems.push(...baseNavItems);
|
|
46
|
+
else if (menuType === common_1.MobileMenuType.PRODUCT) {
|
|
47
|
+
menuItems.push(...productNavItems);
|
|
48
|
+
if (menuItems.length && baseNavItems.length) {
|
|
49
|
+
menuItems.push(MENU_SEPARATOR);
|
|
50
|
+
}
|
|
51
|
+
if (baseNavItems.length) {
|
|
52
|
+
menuItems.push(...baseNavItems);
|
|
53
|
+
}
|
|
48
54
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
else if (menuType === common_1.MobileMenuType.MAIN_MENU) {
|
|
56
|
+
const productMenuItems = Object.values(products || {}).map((product) => ({
|
|
57
|
+
label: product.name,
|
|
58
|
+
link: product.link,
|
|
59
|
+
icon: product.icon,
|
|
60
|
+
type: 'link',
|
|
61
|
+
}));
|
|
62
|
+
if (productMenuItems.length) {
|
|
63
|
+
menuItems.push({
|
|
64
|
+
type: 'separator',
|
|
65
|
+
label: translate('mobileMenu.products', 'Products'),
|
|
66
|
+
});
|
|
67
|
+
menuItems.push(...productMenuItems);
|
|
68
|
+
}
|
|
69
|
+
if (menuItems.length && baseNavItems.length) {
|
|
70
|
+
menuItems.push(MENU_SEPARATOR);
|
|
71
|
+
}
|
|
72
|
+
if (baseNavItems.length) {
|
|
73
|
+
menuItems.push(...baseNavItems);
|
|
74
|
+
}
|
|
63
75
|
}
|
|
64
|
-
|
|
76
|
+
const languagesMenu = (0, menu_1.buildLanguagesGroup)(locales, defaultLocale, currentLocale);
|
|
77
|
+
if (menuItems.length && languagesMenu) {
|
|
65
78
|
menuItems.push(MENU_SEPARATOR);
|
|
66
79
|
}
|
|
67
|
-
if (
|
|
68
|
-
menuItems.push(
|
|
80
|
+
if (languagesMenu) {
|
|
81
|
+
menuItems.push(languagesMenu);
|
|
69
82
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
83
|
+
return [
|
|
84
|
+
...(navigationTabsSelect ? [navigationTabsSelect] : []),
|
|
85
|
+
...(0, menu_1.mapNavbarItems)(menuItems, defaultLocale, currentLocale, locales, location),
|
|
86
|
+
];
|
|
87
|
+
}, [
|
|
88
|
+
menuType,
|
|
89
|
+
navigationTabs,
|
|
90
|
+
activeVersion,
|
|
91
|
+
versions,
|
|
92
|
+
sidebarItems,
|
|
93
|
+
productNavItems,
|
|
94
|
+
baseNavItems,
|
|
95
|
+
products,
|
|
96
|
+
translate,
|
|
97
|
+
locales,
|
|
98
|
+
defaultLocale,
|
|
99
|
+
currentLocale,
|
|
100
|
+
location,
|
|
101
|
+
]);
|
|
78
102
|
return {
|
|
79
|
-
items
|
|
103
|
+
items,
|
|
80
104
|
popDrilldownState,
|
|
81
105
|
pushDrilldownState,
|
|
82
106
|
backLink,
|
|
@@ -7,31 +7,36 @@ const use_theme_hooks_1 = require("../use-theme-hooks");
|
|
|
7
7
|
const use_theme_config_1 = require("../use-theme-config");
|
|
8
8
|
const common_1 = require("../../constants/common");
|
|
9
9
|
const useMobileMenuLevels = () => {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
const { useTranslate, useCurrentProduct, usePageVersions, useSidebarItems } = (0, use_theme_hooks_1.useThemeHooks)();
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
const { useTranslate, useCurrentProduct, usePageVersions, useSidebarItems, useNavigationTabs } = (0, use_theme_hooks_1.useThemeHooks)();
|
|
12
12
|
const { versions = [] } = usePageVersions() || {};
|
|
13
13
|
const activeVersion = versions.find((version) => version === null || version === void 0 ? void 0 : version.active);
|
|
14
14
|
const { currentItems: sidebarItems } = useSidebarItems(activeVersion);
|
|
15
|
+
const navigationTabs = useNavigationTabs();
|
|
15
16
|
const { translate } = useTranslate();
|
|
16
17
|
const currentProduct = useCurrentProduct();
|
|
17
18
|
const productThemeConfig = (0, use_theme_config_1.useThemeConfig)();
|
|
19
|
+
const baseThemeConfig = (0, use_theme_config_1.useThemeConfig)(false);
|
|
18
20
|
const location = (0, react_router_1.useLocation)();
|
|
19
21
|
const hasProductNavbarOverride = (_a = currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.configOverride) === null || _a === void 0 ? void 0 : _a.navbar;
|
|
20
22
|
const productNavItems = (hasProductNavbarOverride ? ((_b = productThemeConfig.navbar) === null || _b === void 0 ? void 0 : _b.items) || [] : []);
|
|
23
|
+
const hasMainMenuItems = Object.values(baseThemeConfig.products || {}).length > 0 ||
|
|
24
|
+
(((_c = baseThemeConfig.navbar) === null || _c === void 0 ? void 0 : _c.items) || []).length > 0;
|
|
21
25
|
const menuLevels = (0, react_1.useMemo)(() => {
|
|
22
|
-
const menuLevels = [
|
|
23
|
-
|
|
26
|
+
const menuLevels = [];
|
|
27
|
+
if (hasMainMenuItems) {
|
|
28
|
+
menuLevels.push({
|
|
24
29
|
label: translate('mobileMenu.mainMenu', 'Main menu'),
|
|
25
30
|
type: common_1.MobileMenuType.MAIN_MENU,
|
|
26
|
-
}
|
|
27
|
-
|
|
31
|
+
});
|
|
32
|
+
}
|
|
28
33
|
if (currentProduct && productNavItems.length) {
|
|
29
34
|
menuLevels.push({
|
|
30
35
|
label: currentProduct.name,
|
|
31
36
|
type: common_1.MobileMenuType.PRODUCT,
|
|
32
37
|
});
|
|
33
38
|
}
|
|
34
|
-
if (sidebarItems.length || activeVersion) {
|
|
39
|
+
if (sidebarItems.length || activeVersion || (navigationTabs === null || navigationTabs === void 0 ? void 0 : navigationTabs.tabs.length)) {
|
|
35
40
|
menuLevels.push({
|
|
36
41
|
label: translate('mobileMenu.previous', 'Previous'),
|
|
37
42
|
type: common_1.MobileMenuType.PAGE,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useScrollItemIntoView = useScrollItemIntoView;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function useScrollItemIntoView(listRef, activeIndex) {
|
|
6
|
+
(0, react_1.useEffect)(() => {
|
|
7
|
+
const list = listRef.current;
|
|
8
|
+
const activeItem = activeIndex === -1 ? undefined : list === null || list === void 0 ? void 0 : list.children[activeIndex];
|
|
9
|
+
if (!list || !activeItem)
|
|
10
|
+
return;
|
|
11
|
+
const listRect = list.getBoundingClientRect();
|
|
12
|
+
const itemRect = activeItem.getBoundingClientRect();
|
|
13
|
+
list.scrollLeft += itemRect.left - listRect.left - (listRect.width - itemRect.width) / 2;
|
|
14
|
+
}, [listRef, activeIndex]);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=use-scroll-item-into-view.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { KeyboardEvent } from 'react';
|
|
2
|
+
type UseTabListProps = {
|
|
3
|
+
count: number;
|
|
4
|
+
activeIndex: number;
|
|
5
|
+
onChange: (index: number) => void;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Props for a WAI-ARIA tab list with automatic activation: only the active tab is a tab stop,
|
|
9
|
+
* and Left/Right/Home/End select and focus another tab.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useTabList({ count, activeIndex, onChange }: UseTabListProps): {
|
|
12
|
+
tabListProps: {
|
|
13
|
+
role: string;
|
|
14
|
+
};
|
|
15
|
+
getTabProps: (index: number) => {
|
|
16
|
+
id: string;
|
|
17
|
+
role: string;
|
|
18
|
+
'aria-selected': boolean;
|
|
19
|
+
'aria-controls': string;
|
|
20
|
+
tabIndex: number;
|
|
21
|
+
ref: (element: HTMLElement | null) => void;
|
|
22
|
+
onClick: () => void;
|
|
23
|
+
onKeyDown: (event: KeyboardEvent) => void;
|
|
24
|
+
};
|
|
25
|
+
getTabPanelProps: (index: number) => {
|
|
26
|
+
id: string;
|
|
27
|
+
role: string;
|
|
28
|
+
'aria-labelledby': string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTabList = useTabList;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
/**
|
|
6
|
+
* Props for a WAI-ARIA tab list with automatic activation: only the active tab is a tab stop,
|
|
7
|
+
* and Left/Right/Home/End select and focus another tab.
|
|
8
|
+
*/
|
|
9
|
+
function useTabList({ count, activeIndex, onChange }) {
|
|
10
|
+
const idPrefix = (0, react_1.useId)();
|
|
11
|
+
const focusableIndex = activeIndex >= 0 ? activeIndex : 0;
|
|
12
|
+
const tabRefs = (0, react_1.useRef)([]);
|
|
13
|
+
const select = (0, react_1.useCallback)((index) => {
|
|
14
|
+
var _a;
|
|
15
|
+
onChange(index);
|
|
16
|
+
(_a = tabRefs.current[index]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
17
|
+
}, [onChange]);
|
|
18
|
+
const onKeyDown = (0, react_1.useCallback)((event, index) => {
|
|
19
|
+
const target = {
|
|
20
|
+
ArrowRight: (index + 1) % count,
|
|
21
|
+
ArrowLeft: (index - 1 + count) % count,
|
|
22
|
+
Home: 0,
|
|
23
|
+
End: count - 1,
|
|
24
|
+
}[event.key];
|
|
25
|
+
if (target === undefined)
|
|
26
|
+
return;
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
select(target);
|
|
29
|
+
}, [count, select]);
|
|
30
|
+
const getTabProps = (index) => ({
|
|
31
|
+
id: `${idPrefix}-tab-${index}`,
|
|
32
|
+
role: 'tab',
|
|
33
|
+
'aria-selected': index === activeIndex,
|
|
34
|
+
'aria-controls': `${idPrefix}-panel-${index}`,
|
|
35
|
+
tabIndex: index === focusableIndex ? 0 : -1,
|
|
36
|
+
ref: (element) => {
|
|
37
|
+
tabRefs.current[index] = element;
|
|
38
|
+
},
|
|
39
|
+
onClick: () => select(index),
|
|
40
|
+
onKeyDown: (event) => onKeyDown(event, index),
|
|
41
|
+
});
|
|
42
|
+
const getTabPanelProps = (index) => ({
|
|
43
|
+
id: `${idPrefix}-panel-${index}`,
|
|
44
|
+
role: 'tabpanel',
|
|
45
|
+
'aria-labelledby': `${idPrefix}-tab-${index}`,
|
|
46
|
+
});
|
|
47
|
+
return { tabListProps: { role: 'tablist' }, getTabProps, getTabPanelProps };
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=use-tab-list.js.map
|
|
@@ -37,6 +37,8 @@ const fallbacks = {
|
|
|
37
37
|
usePageProps: () => ({}),
|
|
38
38
|
usePageSharedData: () => null,
|
|
39
39
|
useMcpData: () => ({ docs: { enabled: false } }),
|
|
40
|
+
useSearchFeatures: () => ({}),
|
|
41
|
+
useNavigationTabs: () => undefined,
|
|
40
42
|
};
|
|
41
43
|
const useThemeHooks = () => {
|
|
42
44
|
const context = (0, react_1.useContext)(ThemeDataContext_1.ThemeDataContext);
|
|
@@ -51,6 +51,8 @@ const variables_46 = require("../../components/PageActions/variables");
|
|
|
51
51
|
const variables_47 = require("../../components/SvgViewer/variables");
|
|
52
52
|
const variables_48 = require("../../components/Toast/variables");
|
|
53
53
|
const variables_49 = require("../../components/PageNavigation/variables");
|
|
54
|
+
const variables_50 = require("../../components/NavigationTabs/variables");
|
|
55
|
+
const utils_1 = require("../../core/utils");
|
|
54
56
|
const palette_1 = require("./palette");
|
|
55
57
|
const dark_1 = require("./dark");
|
|
56
58
|
const themeColors = (0, styled_components_1.css) `
|
|
@@ -1112,8 +1114,8 @@ const error = (0, styled_components_1.css) `
|
|
|
1112
1114
|
--detailed-error-overlay-z-index: var(--z-index-raised);
|
|
1113
1115
|
|
|
1114
1116
|
--detailed-error-modal-width: calc(100% - var(--spacing-lg) * 2);
|
|
1115
|
-
--detailed-error-modal-height: calc(100vh - var(--navbar-height) - var(--spacing-lg) * 2);
|
|
1116
|
-
--detailed-error-modal-top: calc(var(--spacing-lg) + var(--navbar-height));
|
|
1117
|
+
--detailed-error-modal-height: calc(100vh - var(--navbar-stack-height) - var(--spacing-lg) * 2);
|
|
1118
|
+
--detailed-error-modal-top: calc(var(--spacing-lg) + var(--navbar-stack-height));
|
|
1117
1119
|
--detailed-error-modal-border-radius: var(--border-radius-md);
|
|
1118
1120
|
--detailed-error-modal-bg-color: var(--bg-color-raised);
|
|
1119
1121
|
--detailed-error-modal-color: var(--text-color-primary);
|
|
@@ -1350,6 +1352,7 @@ exports.styles = (0, styled_components_1.css) `
|
|
|
1350
1352
|
${variables_26.productPicker}
|
|
1351
1353
|
${variables_12.responsePanelColors}
|
|
1352
1354
|
${variables_23.search}
|
|
1355
|
+
${variables_50.navigationTabs}
|
|
1353
1356
|
${variables_14.select}
|
|
1354
1357
|
${variables_4.sidebar}
|
|
1355
1358
|
${sizeAndSpace}
|
|
@@ -1390,6 +1393,13 @@ exports.styles = (0, styled_components_1.css) `
|
|
|
1390
1393
|
${dark_1.darkMode};
|
|
1391
1394
|
}
|
|
1392
1395
|
|
|
1396
|
+
@media screen and (min-width: ${utils_1.breakpoints.medium}) {
|
|
1397
|
+
:root:has([data-component-name='NavigationTabs/NavigationTabs']) {
|
|
1398
|
+
--navbar-stack-height: calc(var(--navbar-height) + var(--navigation-tabs-height, 48px));
|
|
1399
|
+
--navbar-row-bottom-border-color: transparent;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1393
1403
|
:root.notransition * {
|
|
1394
1404
|
transition: none !important;
|
|
1395
1405
|
}
|
|
@@ -8,6 +8,7 @@ import type { CatalogConfig, ProductUiConfig } from '../../config';
|
|
|
8
8
|
import type { UseCatalogResponse, FilteredCatalog, UseCatalogSortResponse, UseCatalogSearchResponse, UseCatalogProps, CatalogApiParams, CatalogApiResults, BffCatalogEntity, BffCatalogEntityList, BffCatalogRelatedEntity, BffCatalogRelatedEntityList, BffCatalogEntityRevision, BffCatalogEntityRevisionList } from './catalog';
|
|
9
9
|
import type { UserMenuData } from './user-menu';
|
|
10
10
|
import type { ItemState, DrilldownMenuItemDetails } from './sidebar';
|
|
11
|
+
import type { NavigationTabsState } from './navigation-tabs';
|
|
11
12
|
import type { SearchItemData, SearchFacet, SearchFilterItem, SearchFacetQuery, AiSearchConversationItem, ContentSegment, ToolCall } from './search';
|
|
12
13
|
import type { SubmitFeedbackParams } from './feedback';
|
|
13
14
|
import type { TFunction } from './l10n';
|
|
@@ -85,6 +86,9 @@ export type ThemeHooks = {
|
|
|
85
86
|
askAi?: boolean;
|
|
86
87
|
retrySearch: () => Promise<void>;
|
|
87
88
|
};
|
|
89
|
+
useSearchFeatures: () => {
|
|
90
|
+
askAi?: boolean;
|
|
91
|
+
};
|
|
88
92
|
useAiSearch: (options?: {
|
|
89
93
|
filter?: SearchFilterItem[];
|
|
90
94
|
product?: string;
|
|
@@ -128,6 +132,7 @@ export type ThemeHooks = {
|
|
|
128
132
|
label?: string;
|
|
129
133
|
};
|
|
130
134
|
};
|
|
135
|
+
useNavigationTabs: () => NavigationTabsState | undefined;
|
|
131
136
|
useSidebarSiblingsData: () => {
|
|
132
137
|
prevPage?: ResolvedNavItemWithLink;
|
|
133
138
|
nextPage?: ResolvedNavItemWithLink;
|
|
@@ -7,6 +7,7 @@ export type * from './feedback';
|
|
|
7
7
|
export type * from './hooks';
|
|
8
8
|
export type * from './markdown';
|
|
9
9
|
export type * from './navbar';
|
|
10
|
+
export type * from './navigation-tabs';
|
|
10
11
|
export * from './search';
|
|
11
12
|
export type * from './select';
|
|
12
13
|
export type * from './sidebar';
|
package/lib/core/types/l10n.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TOptions } from 'i18next';
|
|
2
|
-
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.create.app.dialog.callbackUrls' | 'dev.create.app.dialog.callbackUrls.placeholder' | 'dev.create.app.dialog.callbackUrls.hint' | 'dev.app.callbackUrls.title' | 'dev.edit.callbackUrls.dialog.title' | 'dev.edit.callbackUrls.dialog.placeholder' | 'dev.edit.callbackUrls.dialog.hint' | 'dev.edit.callbackUrls.dialog.save' | 'dev.edit.callbackUrls.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.error.title' | 'search.error.button' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.assistant' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.send' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.toolCall.executed' | 'search.ai.toolCall.executing' | 'search.ai.toolCall.withArgs' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.searchItem.enum' | 'search.searchItem.example' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.forbidden.description' | 'page.notFound.title' | 'page.notFound.description' | 'page.apiNotFound.title' | 'page.apiNotFound.description' | 'page.apiNotFound.hint' | 'page.apiNotFound.backButton' | 'page.mcpNotAllowed.title' | 'page.mcpNotAllowed.description' | 'page.mcpNotAllowed.publicNote' | 'page.mcpNotAllowed.publicEndpointHint' | 'page.mcpNotAllowed.mainEndpointHint' | 'page.mcpNotAllowed.snippets.terminal.hint' | 'page.mcpNotAllowed.snippets.claudeCode.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.instruction' | 'page.mcpNotAllowed.snippets.chatgptApp.headline' | 'page.mcpNotAllowed.snippets.chatgptApp.instruction' | 'page.mcpNotAllowed.snippets.codexCli.headline' | 'page.mcpNotAllowed.snippets.prompt.headline' | 'page.mcpNotAllowed.snippets.prompt.hint' | 'page.mcpNotAllowed.snippets.json.hint' | 'page.mcpNotAllowed.tabs.claude' | 'page.mcpNotAllowed.tabs.chatgpt' | 'page.mcpNotAllowed.tabs.json' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'catalog.backToAllLabel' | 'catalog.notConnected' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | 'catalog.filters.close' | 'catalog.history.version.notSpecified' | 'catalog.history.version.default' | 'catalog.history.revisions.limitMessage' | 'catalog.history.revision.current' | 'catalog.history.revisions.showLess' | 'catalog.history.revisions.showMore' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.maxLength' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'jsonViewer.showMore' | 'jsonViewer.showLess' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.claudeCode' | 'page.actions.connectMcp.claudeCodeDescription' | 'page.actions.connectMcp.codex' | 'page.actions.connectMcp.codexDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | 'page.actions.connectMcp.moreOptions' | 'page.actions.moreActions' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'graphql.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.languages.moreButton.tooltipText' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.schemas' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.querystring' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.property' | 'openapi.properties' | 'openapi.details' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.noRequestData' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'openapi.mcp.title' | 'openapi.mcp.endpoint' | 'openapi.mcp.tools' | 'openapi.mcp.protocolVersion' | 'openapi.mcp.capabilities' | 'openapi.mcp.experimentalCapabilities' | 'openapi.mcp.inputSchema' | 'openapi.mcp.inputExample' | 'openapi.mcp.outputSchema' | 'openapi.mcp.outputExample' | 'openapi.mcp.exampleTitle' | 'openapi.mcp.argumentsExample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'asyncapi.info.contact.url' | 'asyncapi.info.contact.name' | 'asyncapi.info.license' | 'asyncapi.info.termsOfService' | 'asyncapi.key' | 'asyncapi.value' | 'asyncapi.variables' | 'asyncapi.required' | 'asyncapi.requiredScopes' | 'asyncapi.viewSecurityDetails' | 'graphql.download.description.title' | 'graphql.info.title' | 'graphql.info.contact.url' | 'graphql.info.contact.name' | 'graphql.info.license' | 'graphql.info.termsOfService' | 'graphql.overview' | 'graphql.metadata' | 'graphql.key' | 'graphql.value' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.actions.show' | 'graphql.actions.hide' | 'graphql.actions.more' | 'graphql.fields' | 'graphql.inputFields' | 'graphql.values' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | 'graphql.implementedInterfaces' | 'graphql.implementedBy' | 'graphql.nonNull' | 'graphql.required' | 'asyncapi.badges.deprecated' | 'graphql.badges.deprecated' | 'asyncapi.actions.show' | 'asyncapi.actions.hide' | 'asyncapi.actions.more' | 'asyncapi.payload' | 'asyncapi.parameters' | 'asyncapi.messages' | 'asyncapi.contentType' | 'asyncapi.moreDetails' | 'asyncapi.property' | 'asyncapi.properties' | 'asyncapi.details' | 'asyncapi.reply' | 'asyncapi.servers.title' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'button.download.tooltipText' | 'button.externalLink.tooltipText' | 'button.email.tooltipText' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to' | 'diagram.openFullscreen' | 'diagram.zoomIn' | 'diagram.zoomOut' | 'diagram.reset' | 'diagram.close' | 'diagram.viewer' | 'consent.title' | 'consent.message' | 'consent.privacyPolicy' | 'consent.customize' | 'consent.rejectAll' | 'consent.acceptAll' | 'consent.acceptAllCookies' | 'consent.savePreferences' | 'consent.dialog.title' | 'consent.dialog.description' | 'consent.dialog.close' | 'consent.alwaysOn' | 'consent.alwaysOff' | 'consent.gpcNotice' | 'consent.category.necessary.title' | 'consent.category.necessary.description' | 'consent.category.analytics.title' | 'consent.category.analytics.description' | 'consent.category.marketing.title' | 'consent.category.marketing.description' | 'consent.settingsLink';
|
|
2
|
+
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.create.app.dialog.callbackUrls' | 'dev.create.app.dialog.callbackUrls.placeholder' | 'dev.create.app.dialog.callbackUrls.hint' | 'dev.app.callbackUrls.title' | 'dev.edit.callbackUrls.dialog.title' | 'dev.edit.callbackUrls.dialog.placeholder' | 'dev.edit.callbackUrls.dialog.hint' | 'dev.edit.callbackUrls.dialog.save' | 'dev.edit.callbackUrls.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.error.title' | 'search.error.button' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.assistant' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.send' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.toolCall.executed' | 'search.ai.toolCall.executing' | 'search.ai.toolCall.withArgs' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.searchItem.enum' | 'search.searchItem.example' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.forbidden.description' | 'page.notFound.title' | 'page.notFound.description' | 'page.apiNotFound.title' | 'page.apiNotFound.description' | 'page.apiNotFound.hint' | 'page.apiNotFound.backButton' | 'page.mcpNotAllowed.title' | 'page.mcpNotAllowed.description' | 'page.mcpNotAllowed.publicNote' | 'page.mcpNotAllowed.publicEndpointHint' | 'page.mcpNotAllowed.mainEndpointHint' | 'page.mcpNotAllowed.snippets.terminal.hint' | 'page.mcpNotAllowed.snippets.claudeCode.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.instruction' | 'page.mcpNotAllowed.snippets.chatgptApp.headline' | 'page.mcpNotAllowed.snippets.chatgptApp.instruction' | 'page.mcpNotAllowed.snippets.codexCli.headline' | 'page.mcpNotAllowed.snippets.prompt.headline' | 'page.mcpNotAllowed.snippets.prompt.hint' | 'page.mcpNotAllowed.snippets.json.hint' | 'page.mcpNotAllowed.tabs.claude' | 'page.mcpNotAllowed.tabs.chatgpt' | 'page.mcpNotAllowed.tabs.json' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'catalog.backToAllLabel' | 'catalog.notConnected' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | 'catalog.filters.close' | 'catalog.history.version.notSpecified' | 'catalog.history.version.default' | 'catalog.history.revisions.limitMessage' | 'catalog.history.revision.current' | 'catalog.history.revisions.showLess' | 'catalog.history.revisions.showMore' | 'navigationTabs.label' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.maxLength' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'jsonViewer.showMore' | 'jsonViewer.showLess' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.label' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.claudeCode' | 'page.actions.connectMcp.claudeCodeDescription' | 'page.actions.connectMcp.codex' | 'page.actions.connectMcp.codexDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | 'page.actions.connectMcp.moreOptions' | 'page.actions.moreActions' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'graphql.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.languages.moreButton.tooltipText' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.schemas' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.querystring' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.property' | 'openapi.properties' | 'openapi.details' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.deepLink.tooltip' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.noRequestData' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'openapi.mcp.title' | 'openapi.mcp.endpoint' | 'openapi.mcp.tools' | 'openapi.mcp.protocolVersion' | 'openapi.mcp.capabilities' | 'openapi.mcp.experimentalCapabilities' | 'openapi.mcp.inputSchema' | 'openapi.mcp.inputExample' | 'openapi.mcp.outputSchema' | 'openapi.mcp.outputExample' | 'openapi.mcp.exampleTitle' | 'openapi.mcp.argumentsExample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'asyncapi.info.contact.url' | 'asyncapi.info.contact.name' | 'asyncapi.info.license' | 'asyncapi.info.termsOfService' | 'asyncapi.key' | 'asyncapi.value' | 'asyncapi.variables' | 'asyncapi.required' | 'asyncapi.requiredScopes' | 'asyncapi.viewSecurityDetails' | 'graphql.download.description.title' | 'graphql.info.title' | 'graphql.info.contact.url' | 'graphql.info.contact.name' | 'graphql.info.license' | 'graphql.info.termsOfService' | 'graphql.overview' | 'graphql.metadata' | 'graphql.key' | 'graphql.value' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.actions.show' | 'graphql.actions.hide' | 'graphql.actions.more' | 'graphql.fields' | 'graphql.inputFields' | 'graphql.values' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | 'graphql.implementedInterfaces' | 'graphql.implementedBy' | 'graphql.nonNull' | 'graphql.required' | 'asyncapi.badges.deprecated' | 'graphql.badges.deprecated' | 'asyncapi.actions.show' | 'asyncapi.actions.hide' | 'asyncapi.actions.more' | 'asyncapi.payload' | 'asyncapi.parameters' | 'asyncapi.messages' | 'asyncapi.contentType' | 'asyncapi.moreDetails' | 'asyncapi.property' | 'asyncapi.properties' | 'asyncapi.details' | 'asyncapi.reply' | 'asyncapi.servers.title' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'button.download.tooltipText' | 'button.externalLink.tooltipText' | 'button.email.tooltipText' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to' | 'diagram.openFullscreen' | 'diagram.zoomIn' | 'diagram.zoomOut' | 'diagram.reset' | 'diagram.close' | 'diagram.viewer' | 'consent.title' | 'consent.message' | 'consent.privacyPolicy' | 'consent.customize' | 'consent.rejectAll' | 'consent.acceptAll' | 'consent.acceptAllCookies' | 'consent.savePreferences' | 'consent.dialog.title' | 'consent.dialog.description' | 'consent.dialog.close' | 'consent.alwaysOn' | 'consent.alwaysOff' | 'consent.gpcNotice' | 'consent.category.necessary.title' | 'consent.category.necessary.description' | 'consent.category.analytics.title' | 'consent.category.analytics.description' | 'consent.category.marketing.title' | 'consent.category.marketing.description' | 'consent.settingsLink';
|
|
3
3
|
export type Locale = {
|
|
4
4
|
code: string;
|
|
5
5
|
name: string;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type NavigationTabMenuEntry = {
|
|
2
|
+
tabId: string;
|
|
3
|
+
label: string;
|
|
4
|
+
labelTranslationKey?: string;
|
|
5
|
+
link: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
srcSet?: string;
|
|
8
|
+
external?: boolean;
|
|
9
|
+
target?: '_self' | '_blank';
|
|
10
|
+
};
|
|
11
|
+
export type NavigationTab = {
|
|
12
|
+
tabId: string;
|
|
13
|
+
label: string;
|
|
14
|
+
labelTranslationKey?: string;
|
|
15
|
+
link?: string;
|
|
16
|
+
icon?: string;
|
|
17
|
+
srcSet?: string;
|
|
18
|
+
menu?: NavigationTabMenuEntry[];
|
|
19
|
+
};
|
|
20
|
+
export type NavigationTabsState = {
|
|
21
|
+
tabs: NavigationTab[];
|
|
22
|
+
activeTab?: NavigationTab;
|
|
23
|
+
activeMenuEntry?: NavigationTabMenuEntry;
|
|
24
|
+
};
|
|
25
|
+
export type NavigationTabItem = {
|
|
26
|
+
type: 'link';
|
|
27
|
+
label: string;
|
|
28
|
+
labelTranslationKey?: string;
|
|
29
|
+
link: string;
|
|
30
|
+
icon?: string;
|
|
31
|
+
srcSet?: string;
|
|
32
|
+
external?: boolean;
|
|
33
|
+
target?: '_self' | '_blank';
|
|
34
|
+
active?: boolean;
|
|
35
|
+
};
|
|
36
|
+
type NavigationTabGroupItem = {
|
|
37
|
+
type: 'group';
|
|
38
|
+
label: string;
|
|
39
|
+
labelTranslationKey?: string;
|
|
40
|
+
icon?: string;
|
|
41
|
+
srcSet?: string;
|
|
42
|
+
items: NavigationTabItem[];
|
|
43
|
+
active?: boolean;
|
|
44
|
+
};
|
|
45
|
+
export type NavigationTabRowItem = NavigationTabItem | NavigationTabGroupItem;
|
|
46
|
+
export type NavigationTabsConfig = {
|
|
47
|
+
items: NavigationTabRowItem[];
|
|
48
|
+
};
|
|
49
|
+
export {};
|
|
@@ -3,7 +3,14 @@ interface DynamicOptions<TProps extends Record<string, unknown>> {
|
|
|
3
3
|
ssr?: boolean;
|
|
4
4
|
loading?: React.ComponentType<TProps>;
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* A component from `dynamic()`. After `preload()` resolves, the component renders without a
|
|
8
|
+
* loading state. On the server, `preload()` does not load a client-only component (`ssr: false`).
|
|
9
|
+
*/
|
|
10
|
+
export type DynamicComponent<TProps> = React.ComponentType<TProps> & {
|
|
11
|
+
preload(): Promise<void>;
|
|
12
|
+
};
|
|
6
13
|
export declare function dynamic<TProps extends Record<string, unknown>>(factory: () => Promise<React.ComponentType<TProps> | {
|
|
7
14
|
default: React.ComponentType<TProps>;
|
|
8
|
-
} | Record<string, unknown>>, { ssr, loading }?: DynamicOptions<TProps>):
|
|
15
|
+
} | Record<string, unknown>>, { ssr, loading }?: DynamicOptions<TProps>): DynamicComponent<TProps>;
|
|
9
16
|
export {};
|