@imperium/layout 7.3.1 → 8.1.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/README.md +0 -345
- package/dist/client.js +389 -112
- package/dist/client.min.js +1 -1
- package/dist/client.min.js.map +1 -1
- package/dist/commonItems.d.ts +5 -4
- package/dist/content/hooks/useBuildContentData.d.ts +3 -1
- package/dist/content/types.d.ts +6 -3
- package/dist/content/utils.d.ts +1 -1
- package/dist/datahooks/DataHooks.d.ts +1 -1
- package/dist/datahooks/ExecutePermissionHook.d.ts +7 -0
- package/dist/datahooks/PermissionHooks.d.ts +7 -0
- package/dist/datahooks/types.d.ts +1 -1
- package/dist/hooks/useBuildData.d.ts +3 -2
- package/dist/hooks/useSelectPermission.d.ts +2 -0
- package/dist/layout/types.d.ts +5 -4
- package/dist/layout/utils.d.ts +1 -1
- package/dist/state.d.ts +38 -0
- package/dist/types.d.ts +4 -0
- package/package.json +7 -6
- package/dist/content/components/ActionLinkSidebarItemComponent.d.ts +0 -9
- package/dist/content/components/ContentItemWrapper.d.ts +0 -12
- package/dist/content/components/dividerSidebarItem.d.ts +0 -2
- package/dist/hooks/DataHooks.d.ts +0 -12
- package/dist/hooks/ExecuteDataHook.d.ts +0 -7
- package/dist/hooks/types.d.ts +0 -19
- package/dist/layout/components/CustomItem.d.ts +0 -7
- package/dist/layout/components/CustomItemComponent.d.ts +0 -7
- package/dist/layout/components/ItemBar.d.ts +0 -15
- package/dist/layout/components/ItemWrapper.d.ts +0 -19
- package/dist/layout/components/SidebarToggleMenuItem.d.ts +0 -7
- package/dist/layout/hooks/useBuildData.d.ts +0 -3
- package/dist/layout/hooks/useIsActiveRoute.d.ts +0 -2
- package/dist/layout/hooks/useSelectState.d.ts +0 -2
- package/dist/layout/mergeItems.d.ts +0 -2
package/dist/content/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type React from 'react';
|
|
|
3
3
|
import type { SemanticCOLORS, SemanticICONS } from 'semantic-ui-react';
|
|
4
4
|
import type { RouteItem, VisibilityItem, WeightedItem } from '../commonItems';
|
|
5
5
|
import type { DataHookItem } from '../datahooks/types';
|
|
6
|
-
import type { Data, StateSelectorHook } from '../types';
|
|
6
|
+
import type { Data, PermissionSelectorHook, StateSelectorHook } from '../types';
|
|
7
7
|
export declare type RouteParameters<T extends readonly string[] | undefined> = T extends readonly string[] ? ParametersFromAssertion<T> : never;
|
|
8
8
|
export interface ContentData<T extends DefineRouteOptions, K extends keyof T> extends Data {
|
|
9
9
|
params: RouteParameters<T[K]['params']>;
|
|
@@ -35,7 +35,7 @@ export interface ActionFormSidebarItem<T extends DefineRouteOptions, K extends k
|
|
|
35
35
|
export interface CustomSidebarItem<T extends DefineRouteOptions, K extends keyof T> extends WeightedItem, VisibilityItem {
|
|
36
36
|
render: (data: ContentData<T, K>) => JSX.Element | null;
|
|
37
37
|
}
|
|
38
|
-
export declare type SidebarItem<T extends DefineRouteOptions, K extends keyof T> = (BaseSidebarItem<T, K> & RouteItem) | ActionSidebarItem<T, K> | CustomSidebarItem<T, K> | ActionFormSidebarItem<T, K> | DividerSidebarItem<T, K>;
|
|
38
|
+
export declare type SidebarItem<T extends DefineRouteOptions, K extends keyof T> = (BaseSidebarItem<T, K> & RouteItem<ContentData<T, K>>) | ActionSidebarItem<T, K> | CustomSidebarItem<T, K> | ActionFormSidebarItem<T, K> | DividerSidebarItem<T, K>;
|
|
39
39
|
export declare type ContentHeader<T extends DefineRouteOptions, K extends keyof T> = string | {
|
|
40
40
|
title: string;
|
|
41
41
|
icon?: string;
|
|
@@ -46,13 +46,16 @@ export declare type ContentHeader<T extends DefineRouteOptions, K extends keyof
|
|
|
46
46
|
export interface Page<T extends DefineRouteOptions, K extends keyof T> {
|
|
47
47
|
dataHooks?: DataHookItem[];
|
|
48
48
|
stateSelectorHook?: StateSelectorHook | StateSelectorHook[];
|
|
49
|
+
permissionSelectorHook?: PermissionSelectorHook | PermissionSelectorHook[];
|
|
49
50
|
content: Content<T, K>;
|
|
50
51
|
header?: ContentHeader<T, K>;
|
|
51
52
|
sidebar?: SidebarItem<T, K>[];
|
|
53
|
+
full?: boolean;
|
|
52
54
|
}
|
|
53
55
|
export declare type Pages<T extends DefineRouteOptions> = {
|
|
54
|
-
[key in keyof T]: Page<T, key>;
|
|
56
|
+
[key in keyof T]: Page<T, key> | Content<T, key>;
|
|
55
57
|
};
|
|
58
|
+
export declare function isPage<T extends DefineRouteOptions, K extends keyof T>(value: any): value is Page<T, K>;
|
|
56
59
|
export declare function isActionSidebarItem<T extends DefineRouteOptions, K extends keyof T>(value: any): value is ActionSidebarItem<T, K>;
|
|
57
60
|
export declare function isActionFormSidebarItem<T extends DefineRouteOptions, K extends keyof T>(value: any): value is ActionFormSidebarItem<T, K>;
|
|
58
61
|
export declare function isCustomSidebarItem<T extends DefineRouteOptions, K extends keyof T>(value: any): value is CustomSidebarItem<T, K>;
|
package/dist/content/utils.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ import { SemanticCOLORS } from 'semantic-ui-react';
|
|
|
4
4
|
import type { RouteItem } from '../commonItems';
|
|
5
5
|
import type { BaseSidebarItem, ContentData } from './types';
|
|
6
6
|
export declare function getIcon<T extends DefineRouteOptions, K extends keyof T>(item: BaseSidebarItem<T, K>, data: ContentData<T, K>): JSX.Element | null;
|
|
7
|
-
export declare function getRouteTo<T extends DefineRouteOptions, K extends keyof T>(item: RouteItem, data: ContentData<T, K>): string;
|
|
7
|
+
export declare function getRouteTo<T extends DefineRouteOptions, K extends keyof T>(item: RouteItem<ContentData<T, K>>, data: ContentData<T, K>): string;
|
|
8
8
|
export declare function getText<T extends DefineRouteOptions, K extends keyof T>(item: BaseSidebarItem<T, K>, data: ContentData<T, K>): string;
|
|
9
9
|
export declare function getColor<T extends DefineRouteOptions, K extends keyof T>(item: BaseSidebarItem<T, K>, data: ContentData<T, K>): SemanticCOLORS;
|
|
@@ -4,7 +4,7 @@ interface DataHooksProps {
|
|
|
4
4
|
dataHooks: DataHookItem[];
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
|
-
* Renders layout data hooks. These hooks should return nothing. All interaction should be in side
|
|
7
|
+
* Renders layout data hooks. These hooks should return nothing. All interaction should be in side effects, usually retrieving data and setting Redux state.
|
|
8
8
|
* @param dataHooks
|
|
9
9
|
* @constructor
|
|
10
10
|
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PermissionSelectorHook } from '../types';
|
|
2
|
+
interface ExecutePermissionHookProps {
|
|
3
|
+
permissionHook: PermissionSelectorHook;
|
|
4
|
+
routeParams?: any;
|
|
5
|
+
}
|
|
6
|
+
export declare function ExecutePermissionHook({ permissionHook, routeParams }: ExecutePermissionHookProps): null;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { PermissionSelectorHook } from '../types';
|
|
3
|
+
interface PermissionHooksProps {
|
|
4
|
+
permissionHooks: PermissionSelectorHook[];
|
|
5
|
+
}
|
|
6
|
+
export declare function PermissionHooks({ permissionHooks }: PermissionHooksProps): JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -14,6 +14,6 @@ export declare type DataHookRoute = {
|
|
|
14
14
|
dataHook: DataHook | DataHook[];
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* A datahook can either be a simple hook, or one or more hooks
|
|
17
|
+
* A datahook can either be a simple hook, or one or more hooks dependent on one or more route match functions.
|
|
18
18
|
*/
|
|
19
19
|
export declare type DataHookItem = DataHook | DataHookRoute;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { Data, StateSelectorHook } from '../types';
|
|
1
|
+
import type { Data, PermissionSelectorHook, StateSelectorHook } from '../types';
|
|
2
2
|
export interface UseBuildDataParams {
|
|
3
3
|
data?: Data;
|
|
4
4
|
routeItem?: any;
|
|
5
5
|
stateSelectorHook?: StateSelectorHook | StateSelectorHook[];
|
|
6
|
+
permissionSelectorHook?: PermissionSelectorHook | PermissionSelectorHook[];
|
|
6
7
|
}
|
|
7
|
-
export declare function useBuildData({ stateSelectorHook, data, routeItem }: UseBuildDataParams): Data;
|
|
8
|
+
export declare function useBuildData({ stateSelectorHook, permissionSelectorHook, data, routeItem }: UseBuildDataParams): Data;
|
package/dist/layout/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { SemanticICONS } from 'semantic-ui-react';
|
|
3
3
|
import type { HorizontalPositionedItem, RouteItem, VisibilityItem, WeightedItem } from '../commonItems';
|
|
4
4
|
import type { DataHookItem } from '../datahooks/types';
|
|
5
|
-
import type { Data } from '../types';
|
|
5
|
+
import type { Data, PermissionSelectorHook } from '../types';
|
|
6
6
|
/**
|
|
7
7
|
* Describes a basic weighted, possibly visible item
|
|
8
8
|
*/
|
|
@@ -19,21 +19,22 @@ export interface CustomLayoutItem extends WeightedItem, VisibilityItem {
|
|
|
19
19
|
* Describes a menu that displays a dropdown list of items
|
|
20
20
|
*/
|
|
21
21
|
export interface DropdownLayoutItem extends BaseLayoutItem {
|
|
22
|
-
dropdown: ((BaseLayoutItem & RouteItem) | CustomLayoutItem)[];
|
|
22
|
+
dropdown: ((BaseLayoutItem & RouteItem<Data>) | CustomLayoutItem)[];
|
|
23
23
|
key?: string;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Describes a menu that displays a sub menu (not a dropdown list)
|
|
27
27
|
*/
|
|
28
28
|
export interface MenuLayoutItem extends BaseLayoutItem {
|
|
29
|
-
menu: ((BaseLayoutItem & RouteItem) | CustomLayoutItem)[];
|
|
29
|
+
menu: ((BaseLayoutItem & RouteItem<Data>) | CustomLayoutItem)[];
|
|
30
30
|
key?: string;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Describes a horizontal menu item which is either a route item or dropdown menu
|
|
34
34
|
*/
|
|
35
|
-
export declare type LayoutItem = (BaseLayoutItem & RouteItem) | DropdownLayoutItem | MenuLayoutItem | CustomLayoutItem;
|
|
35
|
+
export declare type LayoutItem = (BaseLayoutItem & RouteItem<Data>) | DropdownLayoutItem | MenuLayoutItem | CustomLayoutItem;
|
|
36
36
|
export interface LayoutData {
|
|
37
|
+
permissionSelectorHooks?: PermissionSelectorHook[];
|
|
37
38
|
dataHooks?: DataHookItem[];
|
|
38
39
|
primaryMenu?: (LayoutItem & HorizontalPositionedItem)[];
|
|
39
40
|
statusbar?: (LayoutItem & HorizontalPositionedItem)[];
|
package/dist/layout/utils.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare function splitPositionedItems<T extends LayoutItem>(items: T[]):
|
|
|
11
11
|
leftItems: T[];
|
|
12
12
|
rightItems: T[];
|
|
13
13
|
};
|
|
14
|
-
export declare function linkParameters(item: BaseLayoutItem & RouteItem
|
|
14
|
+
export declare function linkParameters(item: BaseLayoutItem & RouteItem<Data>, data: Data): {
|
|
15
15
|
as: typeof Link;
|
|
16
16
|
active: boolean;
|
|
17
17
|
to: string;
|
package/dist/state.d.ts
CHANGED
|
@@ -1,20 +1,58 @@
|
|
|
1
1
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
2
|
export declare const state: import("@reduxjs/toolkit").Slice<{
|
|
3
3
|
isMobile: boolean;
|
|
4
|
+
params: {};
|
|
5
|
+
permissions: Record<string, boolean>;
|
|
4
6
|
}, {
|
|
5
7
|
setMobile: (st: import("immer/dist/internal").WritableDraft<{
|
|
6
8
|
isMobile: boolean;
|
|
9
|
+
params: {};
|
|
10
|
+
permissions: Record<string, boolean>;
|
|
7
11
|
}>, action: PayloadAction<boolean>) => {
|
|
8
12
|
isMobile: boolean;
|
|
13
|
+
params: import("immer/dist/internal").WritableDraft<{}>;
|
|
14
|
+
permissions: import("immer/dist/internal").WritableDraft<Record<string, boolean>>;
|
|
9
15
|
};
|
|
16
|
+
setParams: (st: import("immer/dist/internal").WritableDraft<{
|
|
17
|
+
isMobile: boolean;
|
|
18
|
+
params: {};
|
|
19
|
+
permissions: Record<string, boolean>;
|
|
20
|
+
}>, action: PayloadAction<Record<string, string>>) => void;
|
|
21
|
+
setPermission: (st: import("immer/dist/internal").WritableDraft<{
|
|
22
|
+
isMobile: boolean;
|
|
23
|
+
params: {};
|
|
24
|
+
permissions: Record<string, boolean>;
|
|
25
|
+
}>, action: PayloadAction<{
|
|
26
|
+
permission: string;
|
|
27
|
+
result: boolean;
|
|
28
|
+
}>) => void;
|
|
10
29
|
}, "imperiumLayout">;
|
|
11
30
|
export declare const useLayoutState: () => {
|
|
12
31
|
isMobile: boolean;
|
|
32
|
+
params: import("immer/dist/internal").WritableDraft<{}>;
|
|
33
|
+
permissions: import("immer/dist/internal").WritableDraft<Record<string, boolean>>;
|
|
13
34
|
};
|
|
14
35
|
export declare const actions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
15
36
|
setMobile: (st: import("immer/dist/internal").WritableDraft<{
|
|
16
37
|
isMobile: boolean;
|
|
38
|
+
params: {};
|
|
39
|
+
permissions: Record<string, boolean>;
|
|
17
40
|
}>, action: PayloadAction<boolean>) => {
|
|
18
41
|
isMobile: boolean;
|
|
42
|
+
params: import("immer/dist/internal").WritableDraft<{}>;
|
|
43
|
+
permissions: import("immer/dist/internal").WritableDraft<Record<string, boolean>>;
|
|
19
44
|
};
|
|
45
|
+
setParams: (st: import("immer/dist/internal").WritableDraft<{
|
|
46
|
+
isMobile: boolean;
|
|
47
|
+
params: {};
|
|
48
|
+
permissions: Record<string, boolean>;
|
|
49
|
+
}>, action: PayloadAction<Record<string, string>>) => void;
|
|
50
|
+
setPermission: (st: import("immer/dist/internal").WritableDraft<{
|
|
51
|
+
isMobile: boolean;
|
|
52
|
+
params: {};
|
|
53
|
+
permissions: Record<string, boolean>;
|
|
54
|
+
}>, action: PayloadAction<{
|
|
55
|
+
permission: string;
|
|
56
|
+
result: boolean;
|
|
57
|
+
}>) => void;
|
|
20
58
|
}>;
|
package/dist/types.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export declare type State = Record<string, any>;
|
|
|
6
6
|
* A hook that selects from redux state.
|
|
7
7
|
*/
|
|
8
8
|
export declare type StateSelectorHook = () => State;
|
|
9
|
+
export declare type PermissionResults = Record<string, boolean>;
|
|
10
|
+
export declare type PermissionSelectorHook = (data: Data) => PermissionResults;
|
|
9
11
|
/**
|
|
10
12
|
* The visibility query can either be a mingo query or a function that returns a boolean. The data is an object with the router path merged with any state selector hook data.
|
|
11
13
|
*/
|
|
@@ -19,6 +21,8 @@ export interface Data extends Record<string, unknown> {
|
|
|
19
21
|
};
|
|
20
22
|
state: State;
|
|
21
23
|
active: boolean;
|
|
24
|
+
permissions: PermissionResults;
|
|
25
|
+
id?: string;
|
|
22
26
|
}
|
|
23
27
|
export interface ImperiumLayoutClientModule extends ImperiumClientModule {
|
|
24
28
|
layout: LayoutData;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imperium/layout",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "Imperium Layout package",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/darkadept/imperium/issues"
|
|
@@ -32,10 +32,11 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@imperium/client": "^
|
|
36
|
-
"@imperium/
|
|
37
|
-
"@imperium/
|
|
38
|
-
"@
|
|
35
|
+
"@imperium/auth-client": "^8.1.0",
|
|
36
|
+
"@imperium/client": "^8.1.0",
|
|
37
|
+
"@imperium/router": "^8.1.0",
|
|
38
|
+
"@imperium/state": "^8.1.0",
|
|
39
|
+
"@thx/controls": "^15.1.1",
|
|
39
40
|
"debug": "^4.3.2",
|
|
40
41
|
"history": "^5.0.1",
|
|
41
42
|
"lodash": "^4.17.21",
|
|
@@ -57,5 +58,5 @@
|
|
|
57
58
|
"publishConfig": {
|
|
58
59
|
"access": "public"
|
|
59
60
|
},
|
|
60
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "a61829b481e35a444a7257daf41eac61cfb83f7e"
|
|
61
62
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { DefineRouteOptions } from '@imperium/router';
|
|
3
|
-
import type { BaseSidebarItem, ContentData } from '../types';
|
|
4
|
-
interface ActionLinkSidebarItemProps<T extends DefineRouteOptions, K extends keyof T> {
|
|
5
|
-
item: BaseSidebarItem<T, K>;
|
|
6
|
-
data: ContentData<T, K>;
|
|
7
|
-
}
|
|
8
|
-
export declare function ActionLinkSidebarItemComponent<T extends DefineRouteOptions, K extends keyof T>({ item, data }: ActionLinkSidebarItemProps<T, K>): JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { DefineRouteOptions } from '@imperium/router';
|
|
3
|
-
import type { ContentData, RouteParameters, SidebarItem } from '../types';
|
|
4
|
-
interface ContentItemWrapperProps<T extends DefineRouteOptions, K extends keyof T> {
|
|
5
|
-
item: SidebarItem<T, K>;
|
|
6
|
-
as?: React.ComponentClass;
|
|
7
|
-
vertical?: boolean;
|
|
8
|
-
data?: ContentData<T, K>;
|
|
9
|
-
params: RouteParameters<T[K]['params']>;
|
|
10
|
-
}
|
|
11
|
-
export declare function ContentItemWrapper<T extends DefineRouteOptions, K extends keyof T>({ item, data: parentData, params }: ContentItemWrapperProps<T, K>): JSX.Element | null;
|
|
12
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { DataHookItem } from './types';
|
|
3
|
-
interface DataHooksProps {
|
|
4
|
-
dataHooks: DataHookItem[];
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Renders layout data hooks. These hooks should return nothing. All interaction should be in side-effects, usually retrieving data and setting Redux state.
|
|
8
|
-
* @param dataHooks
|
|
9
|
-
* @constructor
|
|
10
|
-
*/
|
|
11
|
-
export declare function DataHooks({ dataHooks }: DataHooksProps): JSX.Element;
|
|
12
|
-
export {};
|
package/dist/hooks/types.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A simple hook, that doesn't return anything. If used together with a route match function, the returned route parameters are passed in.
|
|
3
|
-
*/
|
|
4
|
-
export declare type DataHook = (routeParams?: any) => void;
|
|
5
|
-
/**
|
|
6
|
-
* A route match function that can be used by data hooks. Usually is the @imperium/router `routes.match.x()` functions.
|
|
7
|
-
*/
|
|
8
|
-
export declare type DataHookRouteMatchFn = (route: string) => any;
|
|
9
|
-
/**
|
|
10
|
-
* An object that can specify one or more data hooks that can receive route parameters from one or more route match functions.
|
|
11
|
-
*/
|
|
12
|
-
export declare type DataHookRoute = {
|
|
13
|
-
routeMatch: DataHookRouteMatchFn | DataHookRouteMatchFn[];
|
|
14
|
-
dataHook: DataHook | DataHook[];
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* A datahook can either be a simple hook, or one or more hooks dependant on one or more route match functions.
|
|
18
|
-
*/
|
|
19
|
-
export declare type DataHookItem = DataHook | DataHookRoute;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { CustomLayoutItem } from '../types';
|
|
3
|
-
interface CustomItemComponentProps {
|
|
4
|
-
item: CustomLayoutItem;
|
|
5
|
-
}
|
|
6
|
-
export declare function CustomItemComponent({ item }: CustomItemComponentProps): JSX.Element | null;
|
|
7
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { MenuProps } from 'semantic-ui-react';
|
|
3
|
-
import type { LayoutItem } from '../types';
|
|
4
|
-
interface ItemBarProps extends MenuProps {
|
|
5
|
-
items: LayoutItem[];
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Renders a horizontal or vertical bar of menu items.
|
|
9
|
-
* @param name
|
|
10
|
-
* @param items
|
|
11
|
-
* @param rest
|
|
12
|
-
* @constructor
|
|
13
|
-
*/
|
|
14
|
-
export declare function ItemBar({ items, ...rest }: ItemBarProps): JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { LayoutItem } from '../types';
|
|
3
|
-
import type { Data } from '../../types';
|
|
4
|
-
interface ItemWrapperProps {
|
|
5
|
-
item: LayoutItem;
|
|
6
|
-
as?: React.ComponentClass;
|
|
7
|
-
vertical?: boolean;
|
|
8
|
-
data?: Data;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Renders any type of Item. Gathers state, route and other data and checks for visibility.
|
|
12
|
-
* @param item
|
|
13
|
-
* @param as
|
|
14
|
-
* @param vertical
|
|
15
|
-
* @param parentData
|
|
16
|
-
* @constructor
|
|
17
|
-
*/
|
|
18
|
-
export declare function ItemWrapper({ item, as, vertical, data: parentData }: ItemWrapperProps): JSX.Element | null;
|
|
19
|
-
export {};
|