@redocly/theme 0.30.1 → 0.30.2
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/Menu/MenuItemSwitch.js +2 -2
- package/lib/components/Sidebar/DrilldownMenu.d.ts +1 -1
- package/lib/components/Sidebar/DrilldownMenu.js +2 -5
- package/lib/components/Sidebar/types.d.ts +0 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +1 -1
- package/package.json +1 -1
- package/src/components/Menu/MenuItemSwitch.tsx +0 -2
- package/src/components/Sidebar/DrilldownMenu.tsx +1 -6
- package/src/components/Sidebar/types.ts +0 -1
- package/src/config.ts +1 -1
|
@@ -16,7 +16,7 @@ const MenuItem_1 = require("../../components/Menu/MenuItem");
|
|
|
16
16
|
function MenuItemSwitch(props) {
|
|
17
17
|
var _a;
|
|
18
18
|
const type = (0, getMenuType_1.getMenuType)(props.item);
|
|
19
|
-
const { Drilldown, handleBack, handleExpand, isExpanded: drilldownIsExpanded,
|
|
19
|
+
const { Drilldown, handleBack, handleExpand, isExpanded: drilldownIsExpanded, } = (0, useDrilldown_1.useDrilldown)(props);
|
|
20
20
|
const { MenuGroup, handleGroupClick, isExpanded } = (0, useMenuGroup_1.useMenuGroup)(props.item);
|
|
21
21
|
switch (type) {
|
|
22
22
|
case types_1.MenuType.Separator:
|
|
@@ -31,7 +31,7 @@ function MenuItemSwitch(props) {
|
|
|
31
31
|
}
|
|
32
32
|
return (react_1.default.createElement(Group, { item: props.item, isExpanded: isExpanded, toggleExpanded: handleGroupClick }, props.children));
|
|
33
33
|
case types_1.MenuType.DrillDown:
|
|
34
|
-
return (react_1.default.createElement(Drilldown, { item: props.item, isExpanded: drilldownIsExpanded, back: handleBack, expand: handleExpand
|
|
34
|
+
return (react_1.default.createElement(Drilldown, { item: props.item, isExpanded: drilldownIsExpanded, back: handleBack, expand: handleExpand }, props.children));
|
|
35
35
|
default:
|
|
36
36
|
return react_1.default.createElement(MenuItem_1.MenuItem, Object.assign({}, props));
|
|
37
37
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DrilldownMenuProps } from '../../components/Sidebar/types';
|
|
3
|
-
export declare function DrilldownMenu({ item, back,
|
|
3
|
+
export declare function DrilldownMenu({ item, back, children, className, }: React.PropsWithChildren<DrilldownMenuProps>): JSX.Element;
|
|
@@ -33,15 +33,12 @@ const BackButton_1 = require("../../components/Sidebar/BackButton");
|
|
|
33
33
|
const DrilldownMenuItem_1 = require("../../components/Sidebar/DrilldownMenuItem");
|
|
34
34
|
const hooks_1 = require("../../mocks/hooks");
|
|
35
35
|
const Menu_1 = require("../../components/Menu");
|
|
36
|
-
function DrilldownMenu({ item, back,
|
|
36
|
+
function DrilldownMenu({ item, back, children, className, }) {
|
|
37
37
|
const { translate } = (0, hooks_1.useTranslate)();
|
|
38
|
-
const label = item.label === (prevActiveItem === null || prevActiveItem === void 0 ? void 0 : prevActiveItem.label) || !(prevActiveItem === null || prevActiveItem === void 0 ? void 0 : prevActiveItem.label)
|
|
39
|
-
? translate('theme.sidebar.menu.backLabel', 'Back')
|
|
40
|
-
: prevActiveItem === null || prevActiveItem === void 0 ? void 0 : prevActiveItem.label;
|
|
41
38
|
return (react_1.default.createElement(MenuContainer, { "data-component-name": "Sidebar/DrilldownMenu", className: className },
|
|
42
39
|
react_1.default.createElement(MenuContent, null,
|
|
43
40
|
react_1.default.createElement(MenuWrapper, null,
|
|
44
|
-
react_1.default.createElement(BackButton_1.BackButton, { back: back, "data-translation-key": "theme.sidebar.menu.backLabel" },
|
|
41
|
+
react_1.default.createElement(BackButton_1.BackButton, { back: back, "data-translation-key": "theme.sidebar.menu.backLabel" }, translate('theme.sidebar.menu.backLabel', 'Back')),
|
|
45
42
|
react_1.default.createElement(Menu_1.MenuLinkItem, { item: item },
|
|
46
43
|
react_1.default.createElement(DrilldownMenuItem_1.DrilldownMenuItem, { item: item }))),
|
|
47
44
|
children)));
|
package/lib/config.d.ts
CHANGED
|
@@ -282,7 +282,7 @@ declare const scorecardConfigSchema: {
|
|
|
282
282
|
readonly additionalProperties: true;
|
|
283
283
|
readonly required: readonly ["levels"];
|
|
284
284
|
readonly properties: {
|
|
285
|
-
readonly
|
|
285
|
+
readonly ignoreNonCompliant: {
|
|
286
286
|
readonly type: "boolean";
|
|
287
287
|
readonly default: false;
|
|
288
288
|
};
|
|
@@ -1851,7 +1851,7 @@ export declare const themeConfigSchema: {
|
|
|
1851
1851
|
readonly additionalProperties: true;
|
|
1852
1852
|
readonly required: readonly ["levels"];
|
|
1853
1853
|
readonly properties: {
|
|
1854
|
-
readonly
|
|
1854
|
+
readonly ignoreNonCompliant: {
|
|
1855
1855
|
readonly type: "boolean";
|
|
1856
1856
|
readonly default: false;
|
|
1857
1857
|
};
|
package/lib/config.js
CHANGED
|
@@ -264,7 +264,7 @@ const scorecardConfigSchema = {
|
|
|
264
264
|
additionalProperties: true,
|
|
265
265
|
required: ['levels'],
|
|
266
266
|
properties: {
|
|
267
|
-
|
|
267
|
+
ignoreNonCompliant: { type: 'boolean', default: false },
|
|
268
268
|
teamMetadataProperty: {
|
|
269
269
|
type: 'object',
|
|
270
270
|
properties: {
|
package/package.json
CHANGED
|
@@ -19,7 +19,6 @@ export function MenuItemSwitch(props: PropsWithChildren<MenuItemProps>) {
|
|
|
19
19
|
handleBack,
|
|
20
20
|
handleExpand,
|
|
21
21
|
isExpanded: drilldownIsExpanded,
|
|
22
|
-
prevActiveItem,
|
|
23
22
|
} = useDrilldown(props);
|
|
24
23
|
|
|
25
24
|
const { MenuGroup, handleGroupClick, isExpanded } = useMenuGroup(props.item);
|
|
@@ -52,7 +51,6 @@ export function MenuItemSwitch(props: PropsWithChildren<MenuItemProps>) {
|
|
|
52
51
|
isExpanded={drilldownIsExpanded}
|
|
53
52
|
back={handleBack}
|
|
54
53
|
expand={handleExpand}
|
|
55
|
-
prevActiveItem={prevActiveItem}
|
|
56
54
|
>
|
|
57
55
|
{props.children}
|
|
58
56
|
</Drilldown>
|
|
@@ -10,22 +10,17 @@ import { MenuLinkItem } from '@theme/components/Menu';
|
|
|
10
10
|
export function DrilldownMenu({
|
|
11
11
|
item,
|
|
12
12
|
back,
|
|
13
|
-
prevActiveItem,
|
|
14
13
|
children,
|
|
15
14
|
className,
|
|
16
15
|
}: React.PropsWithChildren<DrilldownMenuProps>): JSX.Element {
|
|
17
16
|
const { translate } = useTranslate();
|
|
18
|
-
const label =
|
|
19
|
-
item.label === prevActiveItem?.label || !prevActiveItem?.label
|
|
20
|
-
? translate('theme.sidebar.menu.backLabel', 'Back')
|
|
21
|
-
: prevActiveItem?.label;
|
|
22
17
|
|
|
23
18
|
return (
|
|
24
19
|
<MenuContainer data-component-name="Sidebar/DrilldownMenu" className={className}>
|
|
25
20
|
<MenuContent>
|
|
26
21
|
<MenuWrapper>
|
|
27
22
|
<BackButton back={back} data-translation-key="theme.sidebar.menu.backLabel">
|
|
28
|
-
{
|
|
23
|
+
{translate('theme.sidebar.menu.backLabel', 'Back')}
|
|
29
24
|
</BackButton>
|
|
30
25
|
<MenuLinkItem item={item}>
|
|
31
26
|
<DrilldownMenuItem item={item} />
|
package/src/config.ts
CHANGED
|
@@ -303,7 +303,7 @@ const scorecardConfigSchema = {
|
|
|
303
303
|
additionalProperties: true,
|
|
304
304
|
required: ['levels'],
|
|
305
305
|
properties: {
|
|
306
|
-
|
|
306
|
+
ignoreNonCompliant: { type: 'boolean', default: false },
|
|
307
307
|
teamMetadataProperty: {
|
|
308
308
|
type: 'object',
|
|
309
309
|
properties: {
|