@redocly/theme 0.42.3 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Buttons/CopyButton.js +2 -2
- package/lib/components/Buttons/EditPageButton.js +1 -1
- package/lib/components/Catalog/CatalogActions.js +1 -1
- package/lib/components/Dropdown/DropdownMenu.d.ts +2 -0
- package/lib/components/Dropdown/DropdownMenu.js +3 -1
- package/lib/components/Feedback/Comment.js +6 -6
- package/lib/components/Feedback/Mood.js +7 -7
- package/lib/components/Feedback/Rating.js +4 -4
- package/lib/components/Feedback/Reasons.js +3 -3
- package/lib/components/Feedback/Scale.js +10 -10
- package/lib/components/Feedback/Sentiment.js +5 -5
- package/lib/components/Filter/FilterContent.js +2 -2
- package/lib/components/Filter/FilterInput.js +1 -1
- package/lib/components/Filter/FilterPopover.js +2 -2
- package/lib/components/Filter/FilterSelect.js +1 -1
- package/lib/components/Footer/FooterCopyright.js +2 -2
- package/lib/components/LastUpdated/LastUpdated.js +1 -1
- package/lib/components/Loaders/SpinnerLoader.d.ts +5 -0
- package/lib/components/Loaders/SpinnerLoader.js +32 -0
- package/lib/components/PageNavigation/NextButton.js +1 -1
- package/lib/components/PageNavigation/PreviousButton.js +1 -1
- package/lib/components/Product/ProductPicker.js +1 -1
- package/lib/components/Search/FilterFields/SearchFilterFieldSelect.d.ts +12 -0
- package/lib/components/Search/FilterFields/SearchFilterFieldSelect.js +113 -0
- package/lib/components/Search/FilterFields/SearchFilterFieldTags.d.ts +10 -0
- package/lib/components/Search/FilterFields/SearchFilterFieldTags.js +37 -0
- package/lib/components/Search/Search.js +1 -1
- package/lib/components/Search/SearchDialog.js +113 -31
- package/lib/components/Search/SearchFilter.d.ts +11 -0
- package/lib/components/Search/SearchFilter.js +71 -0
- package/lib/components/Search/SearchFilterField.d.ts +11 -0
- package/lib/components/Search/SearchFilterField.js +43 -0
- package/lib/components/Search/SearchGroups.d.ts +9 -0
- package/lib/components/Search/SearchGroups.js +69 -0
- package/lib/components/Search/SearchHighlight.d.ts +1 -1
- package/lib/components/Search/SearchHighlight.js +28 -5
- package/lib/components/Search/SearchInput.d.ts +1 -1
- package/lib/components/Search/SearchInput.js +5 -2
- package/lib/components/Search/SearchItem.d.ts +2 -2
- package/lib/components/Search/SearchItem.js +24 -15
- package/lib/components/Search/SearchRecent.js +1 -1
- package/lib/components/Search/SearchSuggestedPages.js +1 -1
- package/lib/components/Search/SearchTrigger.js +2 -2
- package/lib/components/Search/variables.js +48 -2
- package/lib/components/Segmented/Segmented.d.ts +2 -5
- package/lib/components/Select/Select.d.ts +2 -36
- package/lib/components/Select/Select.js +136 -98
- package/lib/components/Select/SelectInput.d.ts +23 -0
- package/lib/components/Select/SelectInput.js +129 -0
- package/lib/components/Select/variables.js +12 -1
- package/lib/components/SidebarActions/ChangeViewButton.js +1 -1
- package/lib/components/SidebarActions/SidebarActions.js +2 -2
- package/lib/components/TableOfContent/TableOfContent.js +1 -1
- package/lib/components/Tag/Tag.d.ts +4 -2
- package/lib/components/Tag/Tag.js +40 -4
- package/lib/components/Tag/variables.dark.js +20 -5
- package/lib/components/Tag/variables.js +49 -17
- package/lib/components/UserMenu/LoginButton.js +1 -1
- package/lib/components/UserMenu/LogoutMenuItem.js +1 -1
- package/lib/components/UserMenu/UserMenu.js +1 -1
- package/lib/components/VersionPicker/VersionPicker.d.ts +2 -3
- package/lib/components/VersionPicker/VersionPicker.js +14 -31
- package/lib/core/hooks/__mocks__/index.d.ts +2 -1
- package/lib/core/hooks/__mocks__/index.js +2 -1
- package/lib/core/hooks/__mocks__/search/use-search-filter.d.ts +9 -0
- package/lib/core/hooks/__mocks__/search/use-search-filter.js +14 -0
- package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +6 -1
- package/lib/core/hooks/__mocks__/use-theme-hooks.js +6 -1
- package/lib/core/hooks/feedback/use-report-dialog.js +3 -3
- package/lib/core/hooks/index.d.ts +2 -1
- package/lib/core/hooks/index.js +2 -1
- package/lib/core/hooks/menu/use-mobile-menu-items.js +1 -1
- package/lib/core/hooks/menu/use-mobile-menu-levels.js +2 -2
- package/lib/core/hooks/search/use-recent-searches.js +2 -0
- package/lib/core/hooks/{use-search.d.ts → search/use-search-dialog.d.ts} +1 -1
- package/lib/core/hooks/{use-search.js → search/use-search-dialog.js} +5 -5
- package/lib/core/hooks/search/use-search-filter.d.ts +9 -0
- package/lib/core/hooks/search/use-search-filter.js +50 -0
- package/lib/core/types/hooks.d.ts +17 -4
- package/lib/core/types/index.d.ts +1 -1
- package/lib/core/types/index.js +1 -1
- package/lib/core/types/l10n.d.ts +1 -2
- package/lib/core/types/search.d.ts +42 -2
- package/lib/core/types/select.d.ts +31 -0
- package/lib/core/types/{select-option.js → select.js} +1 -1
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/core/utils/menu.js +1 -1
- package/lib/core/utils/text-trimmer.d.ts +1 -0
- package/lib/core/utils/text-trimmer.js +16 -0
- package/lib/icons/ResetIcon/ResetIcon.d.ts +9 -0
- package/lib/icons/ResetIcon/ResetIcon.js +22 -0
- package/lib/icons/SettingsIcon/SettingsIcon.d.ts +9 -0
- package/lib/icons/SettingsIcon/SettingsIcon.js +23 -0
- package/lib/index.d.ts +8 -1
- package/lib/index.js +8 -1
- package/lib/layouts/Forbidden.js +2 -2
- package/lib/layouts/NotFound.js +3 -3
- package/lib/layouts/OIDCForbidden.js +1 -1
- package/lib/markdoc/tags/partial.js +1 -1
- package/package.json +9 -9
- package/src/components/Buttons/CopyButton.tsx +2 -2
- package/src/components/Buttons/EditPageButton.tsx +2 -2
- package/src/components/Catalog/CatalogActions.tsx +2 -2
- package/src/components/Dropdown/DropdownMenu.tsx +2 -1
- package/src/components/Feedback/Comment.tsx +8 -8
- package/src/components/Feedback/Mood.tsx +8 -8
- package/src/components/Feedback/Rating.tsx +5 -5
- package/src/components/Feedback/Reasons.tsx +4 -4
- package/src/components/Feedback/Scale.tsx +13 -13
- package/src/components/Feedback/Sentiment.tsx +6 -6
- package/src/components/Filter/FilterContent.tsx +3 -3
- package/src/components/Filter/FilterInput.tsx +1 -1
- package/src/components/Filter/FilterPopover.tsx +3 -3
- package/src/components/Filter/FilterSelect.tsx +5 -5
- package/src/components/Footer/FooterCopyright.tsx +3 -3
- package/src/components/LastUpdated/LastUpdated.tsx +1 -2
- package/src/components/Loaders/SpinnerLoader.tsx +31 -0
- package/src/components/PageNavigation/NextButton.tsx +1 -1
- package/src/components/PageNavigation/PreviousButton.tsx +1 -1
- package/src/components/Product/ProductPicker.tsx +2 -2
- package/src/components/Search/FilterFields/SearchFilterFieldSelect.tsx +135 -0
- package/src/components/Search/FilterFields/SearchFilterFieldTags.tsx +61 -0
- package/src/components/Search/Search.tsx +2 -2
- package/src/components/Search/SearchDialog.tsx +190 -51
- package/src/components/Search/SearchFilter.tsx +90 -0
- package/src/components/Search/SearchFilterField.tsx +84 -0
- package/src/components/Search/SearchGroups.tsx +81 -0
- package/src/components/Search/SearchHighlight.tsx +29 -2
- package/src/components/Search/SearchInput.tsx +9 -3
- package/src/components/Search/SearchItem.tsx +39 -24
- package/src/components/Search/SearchRecent.tsx +2 -2
- package/src/components/Search/SearchSuggestedPages.tsx +2 -2
- package/src/components/Search/SearchTrigger.tsx +2 -2
- package/src/components/Search/variables.ts +48 -2
- package/src/components/Segmented/Segmented.tsx +2 -2
- package/src/components/Select/Select.tsx +208 -157
- package/src/components/Select/SelectInput.tsx +201 -0
- package/src/components/Select/variables.ts +12 -1
- package/src/components/SidebarActions/ChangeViewButton.tsx +1 -1
- package/src/components/SidebarActions/SidebarActions.tsx +2 -2
- package/src/components/TableOfContent/TableOfContent.tsx +2 -2
- package/src/components/Tag/Tag.tsx +57 -6
- package/src/components/Tag/variables.dark.ts +20 -5
- package/src/components/Tag/variables.ts +49 -17
- package/src/components/UserMenu/LoginButton.tsx +2 -2
- package/src/components/UserMenu/LogoutMenuItem.tsx +2 -2
- package/src/components/UserMenu/UserMenu.tsx +2 -2
- package/src/components/VersionPicker/VersionPicker.tsx +18 -42
- package/src/core/hooks/__mocks__/index.ts +2 -1
- package/src/core/hooks/__mocks__/search/use-search-filter.ts +10 -0
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +6 -1
- package/src/core/hooks/feedback/use-report-dialog.ts +3 -3
- package/src/core/hooks/index.ts +2 -1
- package/src/core/hooks/menu/use-mobile-menu-items.ts +1 -1
- package/src/core/hooks/menu/use-mobile-menu-levels.ts +2 -2
- package/src/core/hooks/search/use-recent-searches.ts +3 -0
- package/src/core/hooks/{use-search.ts → search/use-search-dialog.ts} +1 -1
- package/src/core/hooks/search/use-search-filter.ts +57 -0
- package/src/core/types/hooks.ts +25 -4
- package/src/core/types/index.ts +1 -1
- package/src/core/types/l10n.ts +169 -97
- package/src/core/types/search.ts +53 -2
- package/src/core/types/select.ts +33 -0
- package/src/core/utils/index.ts +1 -0
- package/src/core/utils/menu.ts +1 -1
- package/src/core/utils/text-trimmer.ts +7 -0
- package/src/icons/ResetIcon/ResetIcon.tsx +26 -0
- package/src/icons/SettingsIcon/SettingsIcon.tsx +30 -0
- package/src/index.ts +8 -1
- package/src/layouts/Forbidden.tsx +4 -9
- package/src/layouts/NotFound.tsx +6 -6
- package/src/layouts/OIDCForbidden.tsx +2 -2
- package/src/markdoc/tags/partial.ts +1 -1
- package/lib/core/types/select-option.d.ts +0 -4
- package/src/core/types/select-option.ts +0 -4
- /package/lib/components/{Loading → Loaders}/Loading.d.ts +0 -0
- /package/lib/components/{Loading → Loaders}/Loading.js +0 -0
- /package/src/components/{Loading → Loaders}/Loading.tsx +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSearchFilter = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function useSearchFilter(filter, setFilter) {
|
|
6
|
+
const [isFilterOpen, setIsFilterOpen] = (0, react_1.useState)(false);
|
|
7
|
+
const onFilterToggle = (0, react_1.useCallback)(() => {
|
|
8
|
+
setIsFilterOpen(!isFilterOpen);
|
|
9
|
+
}, [isFilterOpen]);
|
|
10
|
+
const onFilterChange = (field, value, isTop) => {
|
|
11
|
+
const values = value ? (Array.isArray(value) ? value : [value]) : [];
|
|
12
|
+
const _filter = [...filter];
|
|
13
|
+
const fieldIndex = _filter.findIndex((filter) => filter.field === field);
|
|
14
|
+
if (fieldIndex > -1) {
|
|
15
|
+
// filter field already exists
|
|
16
|
+
_filter[fieldIndex].values = values;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
if (!values.length)
|
|
20
|
+
return;
|
|
21
|
+
_filter.push({ field, values, isTop });
|
|
22
|
+
}
|
|
23
|
+
setFilter(_filter.filter((item) => item.values.length));
|
|
24
|
+
};
|
|
25
|
+
const onFilterReset = () => {
|
|
26
|
+
setFilter([]);
|
|
27
|
+
};
|
|
28
|
+
const onTopFacetsReset = () => {
|
|
29
|
+
const _filter = [...filter];
|
|
30
|
+
setFilter(_filter.filter((item) => !item.isTop));
|
|
31
|
+
};
|
|
32
|
+
const onFacetReset = (field) => {
|
|
33
|
+
const _filter = [...filter];
|
|
34
|
+
const fieldIndex = _filter.findIndex((filter) => filter.field === field);
|
|
35
|
+
if (fieldIndex !== -1) {
|
|
36
|
+
_filter[fieldIndex].values = [];
|
|
37
|
+
}
|
|
38
|
+
setFilter(_filter.filter((item) => item.values.length));
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
onFacetReset,
|
|
42
|
+
onTopFacetsReset,
|
|
43
|
+
onFilterChange,
|
|
44
|
+
onFilterReset,
|
|
45
|
+
onFilterToggle,
|
|
46
|
+
isFilterOpen,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
exports.useSearchFilter = useSearchFilter;
|
|
50
|
+
//# sourceMappingURL=use-search-filter.js.map
|
|
@@ -2,7 +2,7 @@ import type { PageProps, ResolvedNavItemWithLink, Version } from '@redocly/confi
|
|
|
2
2
|
import type { Callback, TFunction as TFunc } from 'i18next';
|
|
3
3
|
import type { To, Location } from 'react-router-dom';
|
|
4
4
|
import type { CatalogConfig, ProductUiConfig } from '../../config';
|
|
5
|
-
import type { UserMenuData, FilteredCatalog, ItemState,
|
|
5
|
+
import type { UserMenuData, FilteredCatalog, ItemState, SearchItemData, SubmitFeedbackParams, TFunction, BreadcrumbItem, DrilldownMenuItemDetails, SearchFacet, SearchFilterItem, SearchFacetQuery } from '../../core/types';
|
|
6
6
|
export type ThemeHooks = {
|
|
7
7
|
useTranslate: () => {
|
|
8
8
|
translate: TFunction;
|
|
@@ -45,11 +45,24 @@ export type ThemeHooks = {
|
|
|
45
45
|
location: Location;
|
|
46
46
|
};
|
|
47
47
|
useBreadcrumbs: () => BreadcrumbItem[];
|
|
48
|
-
|
|
48
|
+
useSearch: (product?: string) => {
|
|
49
49
|
query: string;
|
|
50
50
|
setQuery: React.Dispatch<React.SetStateAction<string>>;
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
filter: SearchFilterItem[];
|
|
52
|
+
setFilter: React.Dispatch<React.SetStateAction<SearchFilterItem[]>>;
|
|
53
|
+
items: Record<string, SearchItemData[] | null>;
|
|
54
|
+
isSearchLoading: boolean;
|
|
55
|
+
facets: SearchFacet[];
|
|
56
|
+
setLoadMore: React.Dispatch<React.SetStateAction<{
|
|
57
|
+
groupKey: string;
|
|
58
|
+
offset: number;
|
|
59
|
+
} | undefined>>;
|
|
60
|
+
advancedSearch?: boolean;
|
|
61
|
+
};
|
|
62
|
+
useFacetQuery: (field: string) => {
|
|
63
|
+
searchFacet: SearchFacet | null;
|
|
64
|
+
setSearchFacet: React.Dispatch<React.SetStateAction<SearchFacet | null>>;
|
|
65
|
+
setSearchFacetQuery: React.Dispatch<React.SetStateAction<SearchFacetQuery | null>>;
|
|
53
66
|
};
|
|
54
67
|
useSidebarItems: (activeVersion?: Version | null) => {
|
|
55
68
|
currentItems: ItemState[];
|
|
@@ -6,7 +6,7 @@ export * from '../../core/types/hooks';
|
|
|
6
6
|
export * from '../../core/types/markdown';
|
|
7
7
|
export * from '../../core/types/navbar';
|
|
8
8
|
export * from '../../core/types/search';
|
|
9
|
-
export * from '../../core/types/select
|
|
9
|
+
export * from '../../core/types/select';
|
|
10
10
|
export * from '../../core/types/sidebar';
|
|
11
11
|
export * from '../../core/types/filter';
|
|
12
12
|
export * from '../../core/types/user-menu';
|
package/lib/core/types/index.js
CHANGED
|
@@ -22,7 +22,7 @@ __exportStar(require("../../core/types/hooks"), exports);
|
|
|
22
22
|
__exportStar(require("../../core/types/markdown"), exports);
|
|
23
23
|
__exportStar(require("../../core/types/navbar"), exports);
|
|
24
24
|
__exportStar(require("../../core/types/search"), exports);
|
|
25
|
-
__exportStar(require("../../core/types/select
|
|
25
|
+
__exportStar(require("../../core/types/select"), exports);
|
|
26
26
|
__exportStar(require("../../core/types/sidebar"), exports);
|
|
27
27
|
__exportStar(require("../../core/types/filter"), exports);
|
|
28
28
|
__exportStar(require("../../core/types/user-menu"), exports);
|
package/lib/core/types/l10n.d.ts
CHANGED
|
@@ -1,6 +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.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' | '
|
|
3
|
-
export type GraphQLTranslationKey = 'graphql.sidebar.group.queries' | 'graphql.sidebar.group.mutations' | 'graphql.sidebar.group.subscriptions' | 'graphql.sidebar.group.directives' | 'graphql.sidebar.group.objects' | 'graphql.sidebar.group.interfaces' | 'graphql.sidebar.group.unions' | 'graphql.sidebar.group.enums' | 'graphql.sidebar.group.inputs' | 'graphql.sidebar.group.scalars' | 'graphql.sidebar.group.scalars' | 'graphql.content.arguments.label' | 'graphql.content.arguments.show' | 'graphql.content.arguments.hide' | 'graphql.content.returnTypes.label' | 'graphql.content.returnTypes.show' | 'graphql.content.returnTypes.hide' | 'graphql.content.defaultValue' | 'graphql.content.deprecationReason' | 'graphql.content.implementedInterfaces' | 'graphql.content.argumentsHere' | 'graphql.content.nonNull' | 'graphql.content.required' | 'graphql.content.deprecated' | 'graphql.rightSection.variables' | 'graphql.rightSection.querySample' | 'graphql.rightSection.mutationSample' | 'graphql.rightSection.subscriptionSample' | 'graphql.rightSection.responseSample' | 'graphql.rightSection.locations' | 'graphql.rightSection.sample' | 'graphql.rightSection.referenced' | 'graphql.navigation.next' | 'graphql.navigation.previous';
|
|
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.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.noResults.description' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.notFound.title' | 'page.notFound.description' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'sidebar.menu.backLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeLayout' | '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.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.settings.reasons.send' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'page.nextButton' | 'page.previousButton' | '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' | '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.servers.title' | 'openapi.operations' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | '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.deprecated' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.pdfFileSample' | 'openapi.noResponseExample' | 'openapi.noRequestPayload' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.scopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | '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.implementedInterfaces' | 'graphql.nonNull' | 'graphql.required' | 'graphql.deprecated' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced';
|
|
4
3
|
export type Locale = {
|
|
5
4
|
code: string;
|
|
6
5
|
name: string;
|
|
@@ -12,9 +12,9 @@ export type SearchDocument = {
|
|
|
12
12
|
title: string | string[];
|
|
13
13
|
text: string | string[];
|
|
14
14
|
path?: string[];
|
|
15
|
-
|
|
15
|
+
httpMethod?: string;
|
|
16
|
+
httpPath?: string | string[];
|
|
16
17
|
deprecated?: boolean;
|
|
17
|
-
pathName?: string | string[];
|
|
18
18
|
parameters?: OperationParameter[];
|
|
19
19
|
metadata?: Record<string, any>;
|
|
20
20
|
version?: string;
|
|
@@ -29,4 +29,44 @@ export type SearchDocument = {
|
|
|
29
29
|
fsPath?: string;
|
|
30
30
|
};
|
|
31
31
|
badges?: ItemBadge[];
|
|
32
|
+
facets?: Record<string, string>;
|
|
33
|
+
tags?: string[];
|
|
34
|
+
rbacTeams?: string[];
|
|
35
|
+
};
|
|
36
|
+
export type ParameterHighlight = {
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
place: string;
|
|
40
|
+
path: string[];
|
|
41
|
+
};
|
|
42
|
+
export type SearchItemData = {
|
|
43
|
+
document: SearchDocument;
|
|
44
|
+
highlight: Record<string, string> & {
|
|
45
|
+
parameters?: ParameterHighlight[];
|
|
46
|
+
path?: string[];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type SearchFacet = {
|
|
50
|
+
name: string;
|
|
51
|
+
field: string;
|
|
52
|
+
type: SearchFacetType;
|
|
53
|
+
values: string[] | SearchFacetCount[];
|
|
54
|
+
isTop?: boolean;
|
|
55
|
+
index?: number;
|
|
56
|
+
};
|
|
57
|
+
export type SearchFacetCount = {
|
|
58
|
+
value: string;
|
|
59
|
+
count: number;
|
|
60
|
+
isCounterVisible?: boolean;
|
|
61
|
+
};
|
|
62
|
+
export type SearchFacetQuery = {
|
|
63
|
+
query: string;
|
|
64
|
+
filter: SearchFilterItem[];
|
|
65
|
+
facetQuery: string;
|
|
66
|
+
};
|
|
67
|
+
export type SearchFacetType = 'input' | 'multi-select' | 'select' | 'switch' | 'radio' | 'tags' | 'checkbox';
|
|
68
|
+
export type SearchFilterItem = {
|
|
69
|
+
field: string;
|
|
70
|
+
values: string[];
|
|
71
|
+
isTop?: boolean;
|
|
32
72
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export type SelectOption<T> = {
|
|
3
|
+
value: T;
|
|
4
|
+
element?: React.ReactNode | JSX.Element | string;
|
|
5
|
+
label?: string;
|
|
6
|
+
};
|
|
7
|
+
export type SelectProps<T = any> = {
|
|
8
|
+
value?: SelectOption<T> | SelectOption<T>[] | T | T[];
|
|
9
|
+
options: SelectOption<T>[];
|
|
10
|
+
multiple?: boolean;
|
|
11
|
+
searchable?: boolean;
|
|
12
|
+
clearable?: boolean;
|
|
13
|
+
dataAttributes?: Record<string, string>;
|
|
14
|
+
className?: string;
|
|
15
|
+
withArrow?: boolean;
|
|
16
|
+
triggerEvent?: 'click' | 'hover';
|
|
17
|
+
placement?: 'top' | 'bottom';
|
|
18
|
+
alignment?: 'start' | 'end';
|
|
19
|
+
onlyIcon?: boolean;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
hideCheckmarkIcon?: boolean;
|
|
23
|
+
checkmarkIconPosition?: 'start' | 'end';
|
|
24
|
+
dataTestId?: string;
|
|
25
|
+
icon?: React.ReactNode;
|
|
26
|
+
footer?: React.ReactNode;
|
|
27
|
+
onChange?: (value: T | T[]) => void;
|
|
28
|
+
renderInput?: () => React.ReactElement;
|
|
29
|
+
renderDivider?: () => React.ReactElement;
|
|
30
|
+
onSearch?: (value: T | null) => void;
|
|
31
|
+
};
|
package/lib/core/utils/index.js
CHANGED
|
@@ -40,4 +40,5 @@ __exportStar(require("../../core/utils/format-date-without-timezone"), exports);
|
|
|
40
40
|
__exportStar(require("../../core/utils/details"), exports);
|
|
41
41
|
__exportStar(require("../../core/utils/get-navbar-element"), exports);
|
|
42
42
|
__exportStar(require("../../core/utils/with-load-progress"), exports);
|
|
43
|
+
__exportStar(require("../../core/utils/text-trimmer"), exports);
|
|
43
44
|
//# sourceMappingURL=index.js.map
|
package/lib/core/utils/menu.js
CHANGED
|
@@ -5,7 +5,7 @@ const urls_1 = require("../../core/utils/urls");
|
|
|
5
5
|
const utils_1 = require("../../core/utils");
|
|
6
6
|
const constants_1 = require("../../core/constants");
|
|
7
7
|
const TRANSLATION_KEYS = {
|
|
8
|
-
version: '
|
|
8
|
+
version: 'mobileMenu.version',
|
|
9
9
|
};
|
|
10
10
|
const mapNavbarItems = (items, defaultLocale, currentLocale, locales, location) => {
|
|
11
11
|
return items.map((navItem) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function trimText(text: string | string[], maxLength?: number): string | string[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.trimText = void 0;
|
|
4
|
+
function trimText(text, maxLength = 150) {
|
|
5
|
+
if (typeof text === 'string') {
|
|
6
|
+
if (text.length <= maxLength) {
|
|
7
|
+
return text;
|
|
8
|
+
}
|
|
9
|
+
else
|
|
10
|
+
return `${text.slice(0, maxLength)}...`;
|
|
11
|
+
}
|
|
12
|
+
else
|
|
13
|
+
return text;
|
|
14
|
+
}
|
|
15
|
+
exports.trimText = trimText;
|
|
16
|
+
//# sourceMappingURL=text-trimmer.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const ResetIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & {
|
|
6
|
+
color?: string | undefined;
|
|
7
|
+
size?: string | undefined;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ResetIcon = 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", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M9 14C10.1867 14 11.3467 13.6481 12.3334 12.9888C13.3201 12.3295 14.0892 11.3925 14.5433 10.2961C14.9974 9.19975 15.1162 7.99335 14.8847 6.82946C14.6532 5.66558 14.0818 4.59648 13.2426 3.75736C12.4035 2.91825 11.3344 2.3468 10.1705 2.11529C9.00666 1.88378 7.80026 2.0026 6.7039 2.45673C5.60754 2.91085 4.67047 3.67989 4.01118 4.66658C3.35189 5.65328 3 6.81331 3 8V11.1L1.2 9.3L0.5 10L3.5 13L6.5 10L5.8 9.3L4 11.1V8C4 7.0111 4.29324 6.0444 4.84265 5.22215C5.39206 4.39991 6.17295 3.75904 7.08658 3.38061C8.00021 3.00217 9.00555 2.90315 9.97545 3.09608C10.9454 3.289 11.8363 3.76521 12.5355 4.46447C13.2348 5.16373 13.711 6.05465 13.9039 7.02455C14.0969 7.99446 13.9978 8.99979 13.6194 9.91342C13.241 10.8271 12.6001 11.6079 11.7779 12.1574C10.9556 12.7068 9.98891 13 9 13V14Z", fill: "#1A1C21" })));
|
|
12
|
+
exports.ResetIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
13
|
+
'data-component-name': 'icons/ResetIcon/ResetIcon',
|
|
14
|
+
})) `
|
|
15
|
+
path {
|
|
16
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
height: ${({ size }) => size || '16px'};
|
|
20
|
+
width: ${({ size }) => size || '16px'};
|
|
21
|
+
`;
|
|
22
|
+
//# sourceMappingURL=ResetIcon.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const SettingsIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & {
|
|
6
|
+
color?: string | undefined;
|
|
7
|
+
size?: string | undefined;
|
|
8
|
+
className?: string | undefined;
|
|
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.SettingsIcon = 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", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M15.875 2.5H13.5687C13.2875 1.20625 12.1625 0.25 10.8125 0.25C9.4625 0.25 8.3375 1.20625 8.05625 2.5H0.125V3.625H8.05625C8.3375 4.91875 9.4625 5.875 10.8125 5.875C12.1625 5.875 13.2875 4.91875 13.5687 3.625H15.875V2.5ZM10.8125 4.75C9.85625 4.75 9.125 4.01875 9.125 3.0625C9.125 2.10625 9.85625 1.375 10.8125 1.375C11.7688 1.375 12.5 2.10625 12.5 3.0625C12.5 4.01875 11.7688 4.75 10.8125 4.75Z", fill: "#22242B" }),
|
|
12
|
+
react_1.default.createElement("path", { d: "M0.125 11.5H2.43125C2.7125 12.7937 3.8375 13.75 5.1875 13.75C6.5375 13.75 7.6625 12.7937 7.94375 11.5H15.875V10.375H7.94375C7.6625 9.08125 6.5375 8.125 5.1875 8.125C3.8375 8.125 2.7125 9.08125 2.43125 10.375H0.125V11.5ZM5.1875 9.25C6.14375 9.25 6.875 9.98125 6.875 10.9375C6.875 11.8938 6.14375 12.625 5.1875 12.625C4.23125 12.625 3.5 11.8938 3.5 10.9375C3.5 9.98125 4.23125 9.25 5.1875 9.25Z", fill: "#22242B" })));
|
|
13
|
+
exports.SettingsIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
14
|
+
'data-component-name': 'icons/SettingsIcon/SettingsIcon',
|
|
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=SettingsIcon.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export * from './components/Badge/Badge';
|
|
|
11
11
|
export * from './components/Dropdown/Dropdown';
|
|
12
12
|
export * from './components/Dropdown/DropdownMenu';
|
|
13
13
|
export * from './components/Dropdown/DropdownMenuItem';
|
|
14
|
-
export * from './components/
|
|
14
|
+
export * from './components/Loaders/Loading';
|
|
15
15
|
export * from './components/Link/Link';
|
|
16
16
|
export * from './components/Portal/Portal';
|
|
17
17
|
export * from './components/Segmented/Segmented';
|
|
@@ -112,6 +112,11 @@ export * from './components/Search/SearchShortcut';
|
|
|
112
112
|
export * from './components/Search/SearchTrigger';
|
|
113
113
|
export * from './components/Search/SearchRecent';
|
|
114
114
|
export * from './components/Search/SearchSuggestedPages';
|
|
115
|
+
export * from './components/Search/SearchGroups';
|
|
116
|
+
export * from './components/Search/SearchFilter';
|
|
117
|
+
export * from './components/Search/SearchFilterField';
|
|
118
|
+
export * from './components/Search/FilterFields/SearchFilterFieldSelect';
|
|
119
|
+
export * from './components/Search/FilterFields/SearchFilterFieldTags';
|
|
115
120
|
export * from './icons/ArrowRightIcon/ArrowRightIcon';
|
|
116
121
|
export * from './icons/ArrowUpRightIcon/ArrowUpRightIcon';
|
|
117
122
|
export * from './icons/ArrowLeftIcon/ArrowLeftIcon';
|
|
@@ -126,6 +131,7 @@ export * from './icons/FolderAddIcon/FolderAddIcon';
|
|
|
126
131
|
export * from './icons/FolderIcon/FolderIcon';
|
|
127
132
|
export * from './icons/FolderMoveToIcon/FolderMoveToIcon';
|
|
128
133
|
export * from './icons/SelectIcon/SelectIcon';
|
|
134
|
+
export * from './icons/SettingsIcon/SettingsIcon';
|
|
129
135
|
export * from './icons/CloseIcon/CloseIcon';
|
|
130
136
|
export * from './icons/CloseOutlineIcon/CloseOutlineIcon';
|
|
131
137
|
export * from './icons/CloseFilledIcon/CloseFilledIcon';
|
|
@@ -173,6 +179,7 @@ export * from './icons/MobileSidebarIcon/MobileSidebarIcon';
|
|
|
173
179
|
export * from './icons/CopyLinkIcon/CopyLinkIcon';
|
|
174
180
|
export * from './icons/OverflowMenuHorizontalIcon/OverflowMenuHorizontalIcon';
|
|
175
181
|
export * from './icons/RenewIcon/RenewIcon';
|
|
182
|
+
export * from './icons/ResetIcon/ResetIcon';
|
|
176
183
|
export * from './icons/WarningAltIcon/WarningAltIcon';
|
|
177
184
|
export * from './icons/MoonIcon/MoonIcon';
|
|
178
185
|
export * from './icons/SunIcon/SunIcon';
|
package/lib/index.js
CHANGED
|
@@ -41,7 +41,7 @@ __exportStar(require("./components/Badge/Badge"), exports);
|
|
|
41
41
|
__exportStar(require("./components/Dropdown/Dropdown"), exports);
|
|
42
42
|
__exportStar(require("./components/Dropdown/DropdownMenu"), exports);
|
|
43
43
|
__exportStar(require("./components/Dropdown/DropdownMenuItem"), exports);
|
|
44
|
-
__exportStar(require("./components/
|
|
44
|
+
__exportStar(require("./components/Loaders/Loading"), exports);
|
|
45
45
|
__exportStar(require("./components/Link/Link"), exports);
|
|
46
46
|
__exportStar(require("./components/Portal/Portal"), exports);
|
|
47
47
|
__exportStar(require("./components/Segmented/Segmented"), exports);
|
|
@@ -163,6 +163,11 @@ __exportStar(require("./components/Search/SearchShortcut"), exports);
|
|
|
163
163
|
__exportStar(require("./components/Search/SearchTrigger"), exports);
|
|
164
164
|
__exportStar(require("./components/Search/SearchRecent"), exports);
|
|
165
165
|
__exportStar(require("./components/Search/SearchSuggestedPages"), exports);
|
|
166
|
+
__exportStar(require("./components/Search/SearchGroups"), exports);
|
|
167
|
+
__exportStar(require("./components/Search/SearchFilter"), exports);
|
|
168
|
+
__exportStar(require("./components/Search/SearchFilterField"), exports);
|
|
169
|
+
__exportStar(require("./components/Search/FilterFields/SearchFilterFieldSelect"), exports);
|
|
170
|
+
__exportStar(require("./components/Search/FilterFields/SearchFilterFieldTags"), exports);
|
|
166
171
|
/* Icons */
|
|
167
172
|
__exportStar(require("./icons/ArrowRightIcon/ArrowRightIcon"), exports);
|
|
168
173
|
__exportStar(require("./icons/ArrowUpRightIcon/ArrowUpRightIcon"), exports);
|
|
@@ -178,6 +183,7 @@ __exportStar(require("./icons/FolderAddIcon/FolderAddIcon"), exports);
|
|
|
178
183
|
__exportStar(require("./icons/FolderIcon/FolderIcon"), exports);
|
|
179
184
|
__exportStar(require("./icons/FolderMoveToIcon/FolderMoveToIcon"), exports);
|
|
180
185
|
__exportStar(require("./icons/SelectIcon/SelectIcon"), exports);
|
|
186
|
+
__exportStar(require("./icons/SettingsIcon/SettingsIcon"), exports);
|
|
181
187
|
__exportStar(require("./icons/CloseIcon/CloseIcon"), exports);
|
|
182
188
|
__exportStar(require("./icons/CloseOutlineIcon/CloseOutlineIcon"), exports);
|
|
183
189
|
__exportStar(require("./icons/CloseFilledIcon/CloseFilledIcon"), exports);
|
|
@@ -225,6 +231,7 @@ __exportStar(require("./icons/MobileSidebarIcon/MobileSidebarIcon"), exports);
|
|
|
225
231
|
__exportStar(require("./icons/CopyLinkIcon/CopyLinkIcon"), exports);
|
|
226
232
|
__exportStar(require("./icons/OverflowMenuHorizontalIcon/OverflowMenuHorizontalIcon"), exports);
|
|
227
233
|
__exportStar(require("./icons/RenewIcon/RenewIcon"), exports);
|
|
234
|
+
__exportStar(require("./icons/ResetIcon/ResetIcon"), exports);
|
|
228
235
|
__exportStar(require("./icons/WarningAltIcon/WarningAltIcon"), exports);
|
|
229
236
|
__exportStar(require("./icons/MoonIcon/MoonIcon"), exports);
|
|
230
237
|
__exportStar(require("./icons/SunIcon/SunIcon"), exports);
|
package/lib/layouts/Forbidden.js
CHANGED
|
@@ -13,8 +13,8 @@ function Forbidden() {
|
|
|
13
13
|
const { translate } = useTranslate();
|
|
14
14
|
return (react_1.default.createElement(Wrapper, { "data-component-name": "Pages/Forbidden" },
|
|
15
15
|
react_1.default.createElement(Header, null, "403"),
|
|
16
|
-
react_1.default.createElement(Description, { "data-translation-key": "
|
|
17
|
-
react_1.default.createElement(HomeButton, { variant: "primary", size: "large", to: "/", "data-translation-key": "
|
|
16
|
+
react_1.default.createElement(Description, { "data-translation-key": "page.forbidden.title" }, translate('page.forbidden.title', 'Access forbidden')),
|
|
17
|
+
react_1.default.createElement(HomeButton, { variant: "primary", size: "large", to: "/", "data-translation-key": "page.homeButton" }, translate('page.homeButton', 'Go home'))));
|
|
18
18
|
}
|
|
19
19
|
exports.Forbidden = Forbidden;
|
|
20
20
|
const Wrapper = styled_components_1.default.div `
|
package/lib/layouts/NotFound.js
CHANGED
|
@@ -14,9 +14,9 @@ function NotFound() {
|
|
|
14
14
|
const { translate } = useTranslate();
|
|
15
15
|
return (react_1.default.createElement(NotFoundWrapper, { "data-component-name": "layouts/NotFound" },
|
|
16
16
|
react_1.default.createElement(StatusText, null, "404"),
|
|
17
|
-
react_1.default.createElement(Title, { "data-translation-key": "
|
|
18
|
-
react_1.default.createElement(Description, { "data-translation-key": "
|
|
19
|
-
react_1.default.createElement(Button_1.Button, { variant: "primary", size: "large", to: "/", "data-translation-key": "
|
|
17
|
+
react_1.default.createElement(Title, { "data-translation-key": "page.notFound.title" }, translate('page.notFound.title', 'Something went missing...')),
|
|
18
|
+
react_1.default.createElement(Description, { "data-translation-key": "page.notFound.description" }, translate('page.notFound.description', "The page you were trying to reach doesn't exist or may have been moved. You can go back to the previous page, return to the homepage, or use the search bar to find what you're looking for.")),
|
|
19
|
+
react_1.default.createElement(Button_1.Button, { variant: "primary", size: "large", to: "/", "data-translation-key": "page.homeButton", icon: react_1.default.createElement(ArrowLeftIcon_1.ArrowLeftIcon, null) }, translate('page.homeButton', 'Go home'))));
|
|
20
20
|
}
|
|
21
21
|
exports.NotFound = NotFound;
|
|
22
22
|
const NotFoundWrapper = styled_components_1.default.div `
|
|
@@ -49,7 +49,7 @@ function OIDCForbidden() {
|
|
|
49
49
|
}, [searchParams, setSearchParams]);
|
|
50
50
|
return (react_1.default.createElement(Wrapper, { "data-component-name": "Pages/OIDCForbidden" },
|
|
51
51
|
react_1.default.createElement(Header, null, "403"),
|
|
52
|
-
react_1.default.createElement(Description, { "data-translation-key": "
|
|
52
|
+
react_1.default.createElement(Description, { "data-translation-key": "page.forbidden.title" }, translate('page.forbidden.title', 'Access forbidden')),
|
|
53
53
|
errorDescription && react_1.default.createElement(ErrorDescription, null, renderText(errorDescription))));
|
|
54
54
|
}
|
|
55
55
|
exports.OIDCForbidden = OIDCForbidden;
|
|
@@ -15,7 +15,7 @@ exports.partial = {
|
|
|
15
15
|
return [
|
|
16
16
|
{
|
|
17
17
|
id: '',
|
|
18
|
-
message: `Could not resolve partial ${node.attributes.file}.
|
|
18
|
+
message: `Could not resolve partial ${node.attributes.file}. markdown.partialsFolders is empty.`,
|
|
19
19
|
level: 'error',
|
|
20
20
|
},
|
|
21
21
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -88,18 +88,18 @@
|
|
|
88
88
|
"tsconfig-paths": "4.2.0",
|
|
89
89
|
"tsconfig-paths-webpack-plugin": "3.5.2",
|
|
90
90
|
"typescript": "5.2.2",
|
|
91
|
-
"webpack": "5.
|
|
91
|
+
"webpack": "5.94.0"
|
|
92
92
|
},
|
|
93
93
|
"dependencies": {
|
|
94
|
-
"copy-to-clipboard": "
|
|
95
|
-
"highlight-words-core": "
|
|
96
|
-
"hotkeys-js": "
|
|
94
|
+
"copy-to-clipboard": "3.3.3",
|
|
95
|
+
"highlight-words-core": "1.2.2",
|
|
96
|
+
"hotkeys-js": "3.10.1",
|
|
97
97
|
"react-calendar": "4.2.1",
|
|
98
98
|
"react-date-picker": "10.0.3",
|
|
99
|
-
"timeago.js": "
|
|
100
|
-
"i18next": "
|
|
101
|
-
"nprogress": "
|
|
102
|
-
"@redocly/config": "0.
|
|
99
|
+
"timeago.js": "4.0.2",
|
|
100
|
+
"i18next": "22.4.15",
|
|
101
|
+
"nprogress": "0.2.0",
|
|
102
|
+
"@redocly/config": "0.12.0"
|
|
103
103
|
},
|
|
104
104
|
"scripts": {
|
|
105
105
|
"start": "npm-run-all --parallel storybook storybook:tokens:watch",
|
|
@@ -56,7 +56,7 @@ function CopyButtonComponent({
|
|
|
56
56
|
return (
|
|
57
57
|
<Tooltip
|
|
58
58
|
className={`copy-button ${className ? className : ''}`}
|
|
59
|
-
tip={translate('
|
|
59
|
+
tip={translate('codeSnippet.copy.buttonText', toasterText || 'Copied!')}
|
|
60
60
|
isOpen={tooltip.isOpened}
|
|
61
61
|
placement={toasterPlacement}
|
|
62
62
|
>
|
|
@@ -68,7 +68,7 @@ function CopyButtonComponent({
|
|
|
68
68
|
size="small"
|
|
69
69
|
variant={variant}
|
|
70
70
|
>
|
|
71
|
-
{type !== 'icon' && translate('
|
|
71
|
+
{type !== 'icon' && translate('codeSnippet.copy.toasterText', buttonText || 'Copy')}
|
|
72
72
|
</Button>
|
|
73
73
|
</Tooltip>
|
|
74
74
|
);
|
|
@@ -22,8 +22,8 @@ export function EditPageButton({ to }: EditPageButtonProps): JSX.Element {
|
|
|
22
22
|
onClick={() => telemetry.send('edit_page_link_clicked', {})}
|
|
23
23
|
>
|
|
24
24
|
<ButtonIcon />
|
|
25
|
-
<ButtonText data-translation-key="
|
|
26
|
-
{translate('
|
|
25
|
+
<ButtonText data-translation-key="markdown.editPage.text">
|
|
26
|
+
{translate('markdown.editPage.text', 'Edit')}
|
|
27
27
|
</ButtonText>
|
|
28
28
|
</EditPageButtonWrapper>
|
|
29
29
|
);
|
|
@@ -43,9 +43,9 @@ export function CatalogActions(props: CatalogActionsProps): JSX.Element {
|
|
|
43
43
|
onOpenFilter();
|
|
44
44
|
telemetry.send('catalog_actions_button_clicked', {});
|
|
45
45
|
}}
|
|
46
|
-
data-translation-key="
|
|
46
|
+
data-translation-key="catalog.filters.title"
|
|
47
47
|
>
|
|
48
|
-
{translate('
|
|
48
|
+
{translate('catalog.filters.title', 'Filters')}
|
|
49
49
|
</Button>
|
|
50
50
|
{activeFilters > 0 ? <CounterTag borderless>{activeFilters}</CounterTag> : null}
|
|
51
51
|
</CatalogActionsWrapper>
|
|
@@ -7,7 +7,7 @@ import type { DropdownMenuItemProps } from '@redocly/theme/components/Dropdown/D
|
|
|
7
7
|
import { DropdownMenuItem } from '@redocly/theme/components/Dropdown/DropdownMenuItem';
|
|
8
8
|
|
|
9
9
|
export type DropdownMenuProps =
|
|
10
|
-
| { className?: string; role?: string } & (
|
|
10
|
+
| { className?: string; role?: string; footer?: React.ReactNode } & (
|
|
11
11
|
| {
|
|
12
12
|
items: DropdownMenuItemProps[];
|
|
13
13
|
}
|
|
@@ -37,6 +37,7 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element {
|
|
|
37
37
|
role={props.role || 'menu'}
|
|
38
38
|
>
|
|
39
39
|
{content}
|
|
40
|
+
{props.footer || null}
|
|
40
41
|
</DropdownMenuWrapper>
|
|
41
42
|
);
|
|
42
43
|
}
|