@adminui-dev/antd-layout 1.0.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/dist/components/AntdLayout/AsidePanel.d.ts +28 -0
- package/dist/components/AntdLayout/AvatarPanel.d.ts +21 -0
- package/dist/components/AntdLayout/BrandPanel.d.ts +33 -0
- package/dist/components/AntdLayout/CollapsedPanel.d.ts +24 -0
- package/dist/components/AntdLayout/Container.d.ts +17 -0
- package/dist/components/AntdLayout/IconPanel.d.ts +874 -0
- package/dist/components/AntdLayout/ImagePanel.d.ts +19 -0
- package/dist/components/AntdLayout/MainAside.d.ts +8 -0
- package/dist/components/AntdLayout/MainBreadcrumb.d.ts +3 -0
- package/dist/components/AntdLayout/MainContext.d.ts +19 -0
- package/dist/components/AntdLayout/MainHeader.d.ts +2 -0
- package/dist/components/AntdLayout/MainLayout.d.ts +10 -0
- package/dist/components/AntdLayout/SoltPanel.d.ts +12 -0
- package/dist/components/AntdLayout/SvgPanel.d.ts +87 -0
- package/dist/components/AntdLayout/ToolbarPanel.d.ts +22 -0
- package/dist/components/AntdLayout/common/ColorUtil.d.ts +4 -0
- package/dist/components/AntdLayout/common/MenuUtil.d.ts +36 -0
- package/dist/components/AntdLayout/common/RouteUtil.d.ts +15 -0
- package/dist/components/AntdLayout/common/StringUtil.d.ts +96 -0
- package/dist/components/AntdLayout/index.d.ts +27 -0
- package/dist/components/AntdLayout/typings.d.ts +78 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/typings.d.ts +2 -0
- package/dist/index.cjs.js +10 -0
- package/dist/index.d.ts +253 -0
- package/dist/index.esm.js +10 -0
- package/package.json +83 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AvatarProps } from "antd";
|
|
2
|
+
/**
|
|
3
|
+
* Avatar lazy
|
|
4
|
+
* @param props
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
declare function LazyAvatar(props: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Image lazy
|
|
10
|
+
* @param props
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
declare function LazyImage(props: React.ImgHTMLAttributes<HTMLImageElement> & {
|
|
14
|
+
hasChild?: boolean;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function SpinImage(props: React.ImgHTMLAttributes<HTMLImageElement> & {
|
|
17
|
+
hasChild?: boolean;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { LazyAvatar, LazyImage, SpinImage };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AsideLayoutProps } from "./typings";
|
|
2
|
+
/**
|
|
3
|
+
* AsideBar
|
|
4
|
+
*
|
|
5
|
+
* Side sliding surface version, usually on the left side, with the parent container based on grid layout
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export default function (props: AsideLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PopoverDispatcher, MainDispatcher } from "./typings";
|
|
2
|
+
import type { BrandInfo, UserInfo, OutletContainer } from "@adminui-dev/layout";
|
|
3
|
+
export declare const ROLE_ASIDE_HEADER: unique symbol;
|
|
4
|
+
export declare const ROLE_ASIDE_FOOTER: unique symbol;
|
|
5
|
+
export declare const ROLE_ASIDE_CONTENT_ITEMS: unique symbol;
|
|
6
|
+
export declare const ROLE_ASIDE_CONTENT_ITEM: unique symbol;
|
|
7
|
+
export declare const ROLE_CONTENT_FOOTER: unique symbol;
|
|
8
|
+
export declare const ROLE_AVATAR_POPOVER_CONTENT: unique symbol;
|
|
9
|
+
export declare const ROLE_BRAND_POPOVER_CONTENT: unique symbol;
|
|
10
|
+
export declare const ROLE_SOLT_CONTENT: unique symbol;
|
|
11
|
+
export declare const ROLE_TOOLBAR_EXTRA_ITEMS: unique symbol;
|
|
12
|
+
export declare const createMainContext: () => import("react").Context<MainDispatcher>;
|
|
13
|
+
export declare const useMainContext: () => MainDispatcher;
|
|
14
|
+
export declare const useMainCollapsed: () => boolean;
|
|
15
|
+
export declare const useContainerOutlet: () => OutletContainer;
|
|
16
|
+
export declare const createAvatarPopoverContext: () => import("react").Context<PopoverDispatcher<UserInfo>>;
|
|
17
|
+
export declare const createBrandPopoverContext: () => import("react").Context<PopoverDispatcher<BrandInfo>>;
|
|
18
|
+
export declare const useAvatarPopover: () => PopoverDispatcher<UserInfo>;
|
|
19
|
+
export declare const useBrandPopover: () => PopoverDispatcher<BrandInfo>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MainLayoutProps } from "./typings";
|
|
2
|
+
/**
|
|
3
|
+
* Main layout
|
|
4
|
+
* header,aside,content,outlet
|
|
5
|
+
* @author zhouwenqi
|
|
6
|
+
* @param props
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
declare function MainLayout(props: MainLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default MainLayout;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ROLE_SOLT_CONTENT } from "./MainContext";
|
|
2
|
+
/**
|
|
3
|
+
* Solt - layout
|
|
4
|
+
* @param props
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
declare function SoltPanel(props: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare namespace SoltPanel {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
var role: typeof ROLE_SOLT_CONTENT;
|
|
11
|
+
}
|
|
12
|
+
export { SoltPanel };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChevronLeft
|
|
3
|
+
* default svg
|
|
4
|
+
* @param props
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
declare function ChevronLeft(props: {
|
|
8
|
+
size?: number;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* ChevronRight
|
|
12
|
+
* default svg
|
|
13
|
+
* @param props
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
declare function ChevronRight(props: {
|
|
17
|
+
size?: number;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* ListIndentDecrease
|
|
21
|
+
* default svg
|
|
22
|
+
* @param props
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
declare function ListIndentDecrease(props: {
|
|
26
|
+
size?: number;
|
|
27
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
/**
|
|
29
|
+
* ListIndentIncrease
|
|
30
|
+
* default svg
|
|
31
|
+
* @param props
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
declare function ListIndentIncrease(props: {
|
|
35
|
+
size?: number;
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* ChevronsUpDown
|
|
39
|
+
* default svg
|
|
40
|
+
* @param props
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
declare function ChevronsUpDown(props: {
|
|
44
|
+
size?: number;
|
|
45
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
/**
|
|
47
|
+
* ChevronsDownUp
|
|
48
|
+
* default svg
|
|
49
|
+
* @param props
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
declare function ChevronsDownUp(props: {
|
|
53
|
+
size?: number;
|
|
54
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
/**
|
|
56
|
+
* User
|
|
57
|
+
* default svg
|
|
58
|
+
* @param props
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
61
|
+
declare function User(props: {
|
|
62
|
+
size?: number;
|
|
63
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
/**
|
|
65
|
+
* Minimize
|
|
66
|
+
* default svg
|
|
67
|
+
* @param props
|
|
68
|
+
* @returns
|
|
69
|
+
*/
|
|
70
|
+
declare function Minimize(props: {
|
|
71
|
+
size?: number;
|
|
72
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
/**
|
|
74
|
+
* Minimize
|
|
75
|
+
* default svg
|
|
76
|
+
* @param props
|
|
77
|
+
* @returns
|
|
78
|
+
*/
|
|
79
|
+
declare function Maximize(props: {
|
|
80
|
+
size?: number;
|
|
81
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
declare function DefaultLogo(props: {
|
|
83
|
+
size?: number;
|
|
84
|
+
color?: string;
|
|
85
|
+
linearColor?: string[];
|
|
86
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
87
|
+
export { ChevronLeft, ChevronRight, ListIndentDecrease, ListIndentIncrease, ChevronsUpDown, ChevronsDownUp, User, Minimize, Maximize, DefaultLogo };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { LayoutProps } from "@adminui-dev/layout";
|
|
2
|
+
import { ROLE_TOOLBAR_EXTRA_ITEMS } from "./MainContext";
|
|
3
|
+
/**
|
|
4
|
+
* Toolbar for header
|
|
5
|
+
* @author zhouwenqi
|
|
6
|
+
* @param props
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
declare function HeaderToolbar(props: LayoutProps & {
|
|
10
|
+
showAvatar?: boolean;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* Toolbar extra items
|
|
14
|
+
* @param props
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
declare function ToolbarExtraItems(props: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare namespace ToolbarExtraItems {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
var role: typeof ROLE_TOOLBAR_EXTRA_ITEMS;
|
|
21
|
+
}
|
|
22
|
+
export { HeaderToolbar, ToolbarExtraItems };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { MenuData } from "@adminui-dev/layout";
|
|
2
|
+
import type { AntdMenuData } from "../typings";
|
|
3
|
+
import { type IntlShape } from "react-intl";
|
|
4
|
+
import { type UIMatch } from "react-router-dom";
|
|
5
|
+
/**
|
|
6
|
+
* separate menu data
|
|
7
|
+
* @param antdMenuData menu data
|
|
8
|
+
* @param selectKeys
|
|
9
|
+
* @returns current select keys
|
|
10
|
+
*/
|
|
11
|
+
declare function separateMenuData(antdMenuData: AntdMenuData[], selectKeys?: string[]): {
|
|
12
|
+
rootMenuItems: AntdMenuData[];
|
|
13
|
+
childrenMenuItems: AntdMenuData[];
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* transform antd-menu data
|
|
17
|
+
* @param menuData menu data
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
declare const transformToAntdMenuData: (menuData?: MenuData[]) => AntdMenuData[] | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* locale menu data
|
|
23
|
+
* @param menuData menu data
|
|
24
|
+
* @param intl i18n shape
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
declare const localeMenuData: (menuData?: MenuData[], intl?: IntlShape) => MenuData[] | undefined;
|
|
28
|
+
declare const getMenuLabel: (menuData: MenuData, intl?: IntlShape) => string;
|
|
29
|
+
declare const getRouterLabel: (route: UIMatch, intl?: IntlShape) => string;
|
|
30
|
+
/**
|
|
31
|
+
* get antd menu item
|
|
32
|
+
* @param menuDataItem menu data item
|
|
33
|
+
* @returns
|
|
34
|
+
*/
|
|
35
|
+
declare const getAntdMenuItem: (menuDataItem: MenuData) => AntdMenuData;
|
|
36
|
+
export { separateMenuData, transformToAntdMenuData, localeMenuData, getAntdMenuItem, getMenuLabel, getRouterLabel };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MenuData } from "@adminui-dev/layout";
|
|
2
|
+
import { type RouteObject } from "react-router-dom";
|
|
3
|
+
declare function pathToKeys(pathname: string): string[];
|
|
4
|
+
declare function matchPathToKeys(pathname: string): string[];
|
|
5
|
+
declare function splitMenuKeys(arr: string[]): [string[], string[]];
|
|
6
|
+
declare function transformMenuData(rootPath: string, routes?: MenuData[]): MenuData[] | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* transform route object to menu data
|
|
9
|
+
* @param rootPath root path
|
|
10
|
+
* @param routes router data
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
declare function transformRouteToMenuData(rootPath: string, routes?: RouteObject[]): MenuData[] | undefined;
|
|
14
|
+
declare function buildRouteWithParams(baseRoute: string, params?: Record<string, any>): string;
|
|
15
|
+
export { pathToKeys, matchPathToKeys, transformRouteToMenuData, buildRouteWithParams, splitMenuKeys, transformMenuData };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { type LayoutConfig, type Theme, type ThemeSkin } from "@adminui-dev/layout";
|
|
2
|
+
import { type IntlShape } from "react-intl";
|
|
3
|
+
declare const useAppIntl: () => {
|
|
4
|
+
f: (msg: {
|
|
5
|
+
id: string;
|
|
6
|
+
defaultMessage: string;
|
|
7
|
+
}) => string | undefined;
|
|
8
|
+
t: (id: string, defaultMessage: string) => string | undefined;
|
|
9
|
+
formatMessage(this: void, descriptor: import("react-intl").MessageDescriptor, values?: Record<string, import("intl-messageformat").PrimitiveType | import("intl-messageformat").FormatXMLElementFn<string, string>>, opts?: import("intl-messageformat").Options): string;
|
|
10
|
+
formatMessage(this: void, descriptor: import("react-intl").MessageDescriptor, values?: Record<string, React.ReactNode | import("intl-messageformat").PrimitiveType | import("intl-messageformat").FormatXMLElementFn<string, React.ReactNode>>, opts?: import("intl-messageformat").Options): Array<React.ReactNode>;
|
|
11
|
+
formatters: import("react-intl").Formatters;
|
|
12
|
+
textComponent?: React.ComponentType | keyof React.JSX.IntrinsicElements;
|
|
13
|
+
wrapRichTextChunksInFragment?: boolean;
|
|
14
|
+
locale: string;
|
|
15
|
+
timeZone?: string;
|
|
16
|
+
fallbackOnEmptyString?: boolean;
|
|
17
|
+
formats: import("react-intl").CustomFormats;
|
|
18
|
+
messages: Record<string, string> | Record<string, import("react-intl").MessageFormatElement[]>;
|
|
19
|
+
defaultLocale: string;
|
|
20
|
+
defaultFormats: import("react-intl").CustomFormats;
|
|
21
|
+
defaultRichTextElements?: Record<string, import("intl-messageformat").FormatXMLElementFn<import("react").ReactNode>> | undefined;
|
|
22
|
+
onError: import("@formatjs/intl").OnErrorFn;
|
|
23
|
+
onWarn?: import("@formatjs/intl").OnWarnFn;
|
|
24
|
+
formatDateTimeRange(this: void, from: Parameters<Intl.DateTimeFormat["formatRange"]>[0] | string, to: Parameters<Intl.DateTimeFormat["formatRange"]>[1] | string, opts?: import("@formatjs/intl").FormatDateTimeRangeOptions): string;
|
|
25
|
+
formatDate(this: void, value: Parameters<Intl.DateTimeFormat["format"]>[0] | string, opts?: import("react-intl").FormatDateOptions): string;
|
|
26
|
+
formatTime(this: void, value: Parameters<Intl.DateTimeFormat["format"]>[0] | string, opts?: import("@formatjs/intl").FormatTimeOptions): string;
|
|
27
|
+
formatDateToParts(this: void, value: Parameters<Intl.DateTimeFormat["format"]>[0] | string, opts?: import("react-intl").FormatDateOptions): Intl.DateTimeFormatPart[];
|
|
28
|
+
formatTimeToParts(this: void, value: Parameters<Intl.DateTimeFormat["format"]>[0] | string, opts?: import("react-intl").FormatDateOptions): Intl.DateTimeFormatPart[];
|
|
29
|
+
formatRelativeTime(this: void, value: Parameters<Intl.RelativeTimeFormat["format"]>[0], unit?: Parameters<Intl.RelativeTimeFormat["format"]>[1], opts?: import("react-intl").FormatRelativeTimeOptions): string;
|
|
30
|
+
formatNumber(this: void, value: Parameters<Intl.NumberFormat["format"]>[0], opts?: import("react-intl").FormatNumberOptions): string;
|
|
31
|
+
formatNumberToParts(this: void, value: Parameters<Intl.NumberFormat["format"]>[0], opts?: import("react-intl").FormatNumberOptions): Intl.NumberFormatPart[];
|
|
32
|
+
formatPlural(this: void, value: Parameters<Intl.PluralRules["select"]>[0], opts?: import("react-intl").FormatPluralOptions): ReturnType<Intl.PluralRules["select"]>;
|
|
33
|
+
$t(this: void, descriptor: import("react-intl").MessageDescriptor, values?: Record<string, import("intl-messageformat").PrimitiveType | import("intl-messageformat").FormatXMLElementFn<string, string>>, opts?: import("intl-messageformat").Options): string;
|
|
34
|
+
$t<T extends import("react").ReactNode>(this: void, descriptor: import("react-intl").MessageDescriptor, values?: Record<string, import("intl-messageformat").PrimitiveType | T | import("intl-messageformat").FormatXMLElementFn<T>> | undefined, opts?: import("intl-messageformat").Options): string | T | (string | T)[];
|
|
35
|
+
formatList(this: void, values: Iterable<string>, opts?: import("react-intl").FormatListOptions): string;
|
|
36
|
+
formatList<T extends import("react").ReactNode>(this: void, values: Iterable<string | T>, opts?: import("react-intl").FormatListOptions): string | T | (string | T)[];
|
|
37
|
+
formatListToParts<T extends import("react").ReactNode>(this: void, values: Iterable<string | T>, opts?: import("react-intl").FormatListOptions): import("@formatjs/intl").Part[];
|
|
38
|
+
formatDisplayName(this: void, value: Parameters<Intl.DisplayNames["of"]>[0], opts: import("react-intl").FormatDisplayNameOptions): string | undefined;
|
|
39
|
+
};
|
|
40
|
+
declare const getAppIntl: (intl?: IntlShape) => {
|
|
41
|
+
f: (msg: {
|
|
42
|
+
id: string;
|
|
43
|
+
defaultMessage: string;
|
|
44
|
+
}) => string | undefined;
|
|
45
|
+
t: (id: string, defaultMessage: string) => string | undefined;
|
|
46
|
+
};
|
|
47
|
+
declare const getBasicLayoutConfig: (config: LayoutConfig) => {
|
|
48
|
+
layoutType?: import("@adminui-dev/layout").LayoutType;
|
|
49
|
+
headerHeight?: number;
|
|
50
|
+
asideWidth?: number;
|
|
51
|
+
theme?: Theme;
|
|
52
|
+
locale?: string;
|
|
53
|
+
disabledLocale?: boolean;
|
|
54
|
+
skinName?: string;
|
|
55
|
+
primaryColor?: string;
|
|
56
|
+
highlight?: boolean;
|
|
57
|
+
flated?: boolean;
|
|
58
|
+
menuIconSize?: number;
|
|
59
|
+
compact?: boolean;
|
|
60
|
+
largeBrand?: boolean;
|
|
61
|
+
splitMenu?: boolean;
|
|
62
|
+
asideMenuInline?: boolean;
|
|
63
|
+
asideMenuGroup?: boolean;
|
|
64
|
+
hideBorder?: boolean;
|
|
65
|
+
hideTitle?: boolean;
|
|
66
|
+
hideFooter?: boolean;
|
|
67
|
+
hideBreadcrumb?: boolean;
|
|
68
|
+
asideTransparent?: boolean;
|
|
69
|
+
headerTransparent?: boolean;
|
|
70
|
+
containerTransparent?: boolean;
|
|
71
|
+
asideBlur?: boolean;
|
|
72
|
+
headerBlur?: boolean;
|
|
73
|
+
containerBlur?: boolean;
|
|
74
|
+
collapsedPosition?: import("@adminui-dev/layout").Position;
|
|
75
|
+
avatarPosition?: import("@adminui-dev/layout").AvatarPosition;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Retrieve the configuration stored in the storage
|
|
79
|
+
* @param name key
|
|
80
|
+
* @returns
|
|
81
|
+
*/
|
|
82
|
+
declare const getStorageConfig: (name?: string) => LayoutConfig | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Save configuration to storage
|
|
85
|
+
* @param config configuration
|
|
86
|
+
* @param name key
|
|
87
|
+
*/
|
|
88
|
+
declare const setStorageConfig: (config: LayoutConfig, name?: string) => void;
|
|
89
|
+
/**
|
|
90
|
+
* Setting layout config for skin
|
|
91
|
+
* @param layoutConfig
|
|
92
|
+
* @param themeSkin
|
|
93
|
+
* @returns
|
|
94
|
+
*/
|
|
95
|
+
declare const setSkinConfig: (layoutConfig: LayoutConfig, themeSkin?: ThemeSkin) => LayoutConfig;
|
|
96
|
+
export { useAppIntl, getAppIntl, getStorageConfig, setStorageConfig, getBasicLayoutConfig, setSkinConfig };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RootLayoutProps } from "@adminui-dev/layout";
|
|
2
|
+
import "./index.css";
|
|
3
|
+
import type { IconComponents, LocaleMessage } from "./typings";
|
|
4
|
+
import { SoltPanel } from "./SoltPanel";
|
|
5
|
+
import { ToolbarExtraItems } from "./ToolbarPanel";
|
|
6
|
+
/**
|
|
7
|
+
* adminui-dev / antd layout
|
|
8
|
+
* @param props layout properites
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
declare function AntdLayout(props: RootLayoutProps<LocaleMessage> & {
|
|
12
|
+
layoutIcons?: IconComponents;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare namespace AntdLayout {
|
|
15
|
+
var AsideHeader: typeof import("./AsidePanel").AsideHeader;
|
|
16
|
+
var AsideFooter: typeof import("./AsidePanel").AsideFooter;
|
|
17
|
+
var Footer: {
|
|
18
|
+
(props: import("@adminui-dev/layout").LayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
role: typeof import("./MainContext").ROLE_CONTENT_FOOTER;
|
|
21
|
+
};
|
|
22
|
+
var AvatarPopoverContent: typeof import("./AvatarPanel").AvatarPopoverContent;
|
|
23
|
+
var BrandPopoverContent: typeof import("./BrandPanel").BrandPopoverContent;
|
|
24
|
+
var SoltContent: typeof SoltPanel;
|
|
25
|
+
var HeaderToolbarExtra: typeof ToolbarExtraItems;
|
|
26
|
+
}
|
|
27
|
+
export default AntdLayout;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { LocaleMessageData, MenuData } from "@adminui-dev/layout";
|
|
2
|
+
import type { Locale } from "antd/es/locale";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
interface LocaleMessage extends LocaleMessageData {
|
|
5
|
+
antdLocale: Locale;
|
|
6
|
+
}
|
|
7
|
+
interface IconComponents {
|
|
8
|
+
fullScreenIcons?: React.ReactNode[];
|
|
9
|
+
collapsedIcons?: React.ReactNode[];
|
|
10
|
+
mobileAsideIcons?: React.ReactNode[];
|
|
11
|
+
expandIcon?: React.ReactNode[];
|
|
12
|
+
itemMoreIcon?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
interface MainDispatcher {
|
|
15
|
+
collapsed: boolean;
|
|
16
|
+
headerHeight: number;
|
|
17
|
+
layoutIcons?: IconComponents;
|
|
18
|
+
brandPopoverContent?: React.ReactNode;
|
|
19
|
+
avatarPopoverContent?: React.ReactNode;
|
|
20
|
+
toolbarExtraItems?: React.ReactNode;
|
|
21
|
+
setCollapsed: (collapsed: boolean) => void;
|
|
22
|
+
}
|
|
23
|
+
interface PopoverDispatcher<T> {
|
|
24
|
+
close?: () => void;
|
|
25
|
+
record?: T;
|
|
26
|
+
}
|
|
27
|
+
interface MainLayoutProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
28
|
+
menuData?: MenuData[];
|
|
29
|
+
layoutIcons?: IconComponents;
|
|
30
|
+
brandPopover?: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
interface AsidePanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
33
|
+
collapsed?: boolean;
|
|
34
|
+
width?: number;
|
|
35
|
+
iconSize?: number;
|
|
36
|
+
}
|
|
37
|
+
interface AsideContentProps extends AsidePanelProps {
|
|
38
|
+
}
|
|
39
|
+
interface CollapsedPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
40
|
+
width?: number;
|
|
41
|
+
iconSize?: number;
|
|
42
|
+
}
|
|
43
|
+
interface BrandPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
44
|
+
collapsed?: boolean;
|
|
45
|
+
width?: number;
|
|
46
|
+
iconSize?: number;
|
|
47
|
+
hideTitle?: boolean;
|
|
48
|
+
}
|
|
49
|
+
interface AvatarPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
50
|
+
collapsed?: boolean;
|
|
51
|
+
width?: number;
|
|
52
|
+
iconSize?: number;
|
|
53
|
+
}
|
|
54
|
+
interface AsideLayoutProps {
|
|
55
|
+
menuData?: any[];
|
|
56
|
+
headerHeight: number;
|
|
57
|
+
header?: React.ReactNode;
|
|
58
|
+
footer?: React.ReactNode;
|
|
59
|
+
selectedKeys?: string[];
|
|
60
|
+
openerKeys?: string[];
|
|
61
|
+
}
|
|
62
|
+
interface HeaderLayoutProps {
|
|
63
|
+
menuData?: any[];
|
|
64
|
+
height: number;
|
|
65
|
+
title?: string;
|
|
66
|
+
selectedKeys?: string[];
|
|
67
|
+
openerKeys?: string[];
|
|
68
|
+
}
|
|
69
|
+
interface AntdMenuData {
|
|
70
|
+
key: string;
|
|
71
|
+
label: ReactNode | string;
|
|
72
|
+
icon?: ReactNode;
|
|
73
|
+
theme?: string;
|
|
74
|
+
children?: AntdMenuData[];
|
|
75
|
+
title?: string;
|
|
76
|
+
extra?: ReactNode;
|
|
77
|
+
}
|
|
78
|
+
export type { LocaleMessage, IconComponents, MainDispatcher, PopoverDispatcher, MainLayoutProps, AsidePanelProps, AsideContentProps, CollapsedPanelProps, BrandPanelProps, AvatarPanelProps, AsideLayoutProps, HeaderLayoutProps, AntdMenuData };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import AntdLayout from "./AntdLayout";
|
|
2
|
+
import { useAvatarPopover, useBrandPopover, useMainCollapsed, useContainerOutlet } from "./AntdLayout/MainContext";
|
|
3
|
+
import { useConfigAction, useConfigState, useTheme } from "@adminui-dev/layout";
|
|
4
|
+
export * from "./AntdLayout/common/ColorUtil";
|
|
5
|
+
export * from "./AntdLayout/common/MenuUtil";
|
|
6
|
+
export * from "./AntdLayout/common/RouteUtil";
|
|
7
|
+
export * from "./AntdLayout/common/StringUtil";
|
|
8
|
+
export { useAvatarPopover, useBrandPopover, useMainCollapsed, useContainerOutlet, useConfigAction, useConfigState, useTheme };
|
|
9
|
+
export default AntdLayout;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";var n,r=require("react"),e=require("antd"),t=require("react-intl"),o=require("react-router"),i=require("react-router-dom"),a=require("@ant-design/colors"),d={exports:{}},l={};var s,u={};
|
|
2
|
+
/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.development.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/"production"===process.env.NODE_ENV?d.exports=function(){if(n)return l;n=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,e,t){var o=null;if(void 0!==t&&(o=""+t),void 0!==e.key&&(o=""+e.key),"key"in e)for(var i in t={},e)"key"!==i&&(t[i]=e[i]);else t=e;return e=t.ref,{$$typeof:r,type:n,key:o,ref:void 0!==e?e:null,props:t}}return l.Fragment=e,l.jsx=t,l.jsxs=t,l}():d.exports=(s||(s=1,"production"!==process.env.NODE_ENV&&function(){function n(r){if(null==r)return null;if("function"==typeof r)return r.$$typeof===j?null:r.displayName||r.name||null;if("string"==typeof r)return r;switch(r){case f:return"Fragment";case _:return"Profiler";case x:return"StrictMode";case v:return"Suspense";case w:return"SuspenseList";case S:return"Activity"}if("object"==typeof r)switch("number"==typeof r.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case h:return"Portal";case y:return r.displayName||"Context";case g:return(r._context.displayName||"Context")+".Consumer";case b:var e=r.render;return(r=r.displayName)||(r=""!==(r=e.displayName||e.name||"")?"ForwardRef("+r+")":"ForwardRef"),r;case k:return null!==(e=r.displayName||null)?e:n(r.type)||"Memo";case C:e=r._payload,r=r._init;try{return n(r(e))}catch(n){}}return null}function e(n){return""+n}function t(n){try{e(n);var r=!1}catch(n){r=!0}if(r){var t=(r=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),e(n)}}function o(r){if(r===f)return"<>";if("object"==typeof r&&null!==r&&r.$$typeof===C)return"<...>";try{var e=n(r);return e?"<"+e+">":"<...>"}catch(n){return"<...>"}}function i(){return Error("react-stack-top-frame")}function a(){var r=n(this.type);return z[r]||(z[r]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(r=this.props.ref)?r:null}function d(r,e,o,i,d,s){var u,m=e.children;if(void 0!==m)if(i)if(L(m)){for(i=0;i<m.length;i++)l(m[i]);Object.freeze&&Object.freeze(m)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else l(m);if(P.call(e,"key")){m=n(r);var h=Object.keys(e).filter(function(n){return"key"!==n});i=0<h.length?"{key: someKey, "+h.join(": ..., ")+": ...}":"{key: someKey}",I[m+i]||(h=0<h.length?"{"+h.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',i,m,h,m),I[m+i]=!0)}if(m=null,void 0!==o&&(t(o),m=""+o),function(n){if(P.call(n,"key")){var r=Object.getOwnPropertyDescriptor(n,"key").get;if(r&&r.isReactWarning)return!1}return void 0!==n.key}(e)&&(t(e.key),m=""+e.key),"key"in e)for(var f in o={},e)"key"!==f&&(o[f]=e[f]);else o=e;return m&&function(n,r){function e(){c||(c=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}e.isReactWarning=!0,Object.defineProperty(n,"key",{get:e,configurable:!0})}(o,"function"==typeof r?r.displayName||r.name||"Unknown":r),function(n,r,e,t,o,i){var d=e.ref;return n={$$typeof:p,type:n,key:r,props:e,_owner:t},null!==(void 0!==d?d:null)?Object.defineProperty(n,"ref",{enumerable:!1,get:a}):Object.defineProperty(n,"ref",{enumerable:!1,value:null}),n._store={},Object.defineProperty(n._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(n,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(n,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:o}),Object.defineProperty(n,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n}(r,m,o,null===(u=B.A)?null:u.getOwner(),d,s)}function l(n){s(n)?n._store&&(n._store.validated=1):"object"==typeof n&&null!==n&&n.$$typeof===C&&("fulfilled"===n._payload.status?s(n._payload.value)&&n._payload.value._store&&(n._payload.value._store.validated=1):n._store&&(n._store.validated=1))}function s(n){return"object"==typeof n&&null!==n&&n.$$typeof===p}var c,m=r,p=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),y=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),j=Symbol.for("react.client.reference"),B=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.prototype.hasOwnProperty,L=Array.isArray,T=console.createTask?console.createTask:function(){return null},z={},N=(m={react_stack_bottom_frame:function(n){return n()}}).react_stack_bottom_frame.bind(m,i)(),F=T(o(i)),I={};u.Fragment=f,u.jsx=function(n,r,e){var t=1e4>B.recentlyCreatedOwnerStacks++;return d(n,r,e,!1,t?Error("react-stack-top-frame"):N,t?T(o(n)):F)},u.jsxs=function(n,r,e){var t=1e4>B.recentlyCreatedOwnerStacks++;return d(n,r,e,!0,t?Error("react-stack-top-frame"):N,t?T(o(n)):F)}}()),u);var c=d.exports;function m(n,r){void 0===r&&(r={});var e=r.insertAt;if(n&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===e&&t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}}m("@layer base {\r\n html, body {\r\n padding: 0;\r\n margin: 0;\r\n border: 0;\r\n width: 100%; \r\n height: 100%;\r\n }\r\n #Layout-module_root__3x-pW { \r\n text-align: initial;\r\n width: 100%;\r\n height:100%\r\n } \r\n}\r\n*, *:before, *:after {\r\n box-sizing: border-box;\r\n}\r\n.Layout-module_rootBox__3JHjy {\r\n text-rendering: optimizeLegibility;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n width: 100%;\r\n min-height: 100%;\r\n}\r\n.Layout-module_rootBackground__j3UVG {\r\n box-sizing: border-box; \r\n pointer-events: none;\r\n inset-block-start:0;\r\n inset-inline-start:0; \r\n width: 100%; \r\n min-width: 100vw;\r\n height:100%;\r\n min-height: 100vh;\r\n overflow: hidden;\r\n position: fixed;\r\n z-index: 0;\r\n}\r\n.Layout-module_rootBackground__j3UVG>div{\r\n width:100%;\r\n height: 100%;\r\n overflow: hidden;\r\n}\r\n.Layout-module_rootLayout__jVEEF {\r\n position: relative;\r\n z-index: 1;\r\n box-sizing: border-box; \r\n width: 100%;\r\n min-height: 100%;\r\n display: flex; \r\n flex-flow: row;\r\n background-color: transparent;\r\n container-type: inline-size;\r\n}\r\n\r\n.Layout-module_mainLayout__6W9W9 {\r\n box-sizing: border-box; \r\n display: flex;\r\n flex-flow: column; \r\n width: 100%;\r\n}\r\n");const p=Symbol("LayoutAside"),h=Symbol("LayoutContent"),f=Symbol("LayoutHeader"),x=Symbol("LayoutBackground"),_=r.createContext({setLayoutConfig:()=>{},setLocale:()=>{}}),g=r.createContext({locale:"en-US",languages:[],layoutConfig:{},themeSkinMap:{tidy:[],rich:[]}}),y=()=>r.useContext(g);function b(n){return c.jsx("div",{className:"Layout-module_rootBackground__j3UVG",children:c.jsx(c.Fragment,{children:n.children})})}function v(n){return c.jsx(c.Fragment,{children:n.children})}function w(n){return c.jsx(c.Fragment,{children:n.children})}function k(n){return c.jsx(c.Fragment,{children:n.children})}function C(n,r){void 0===r&&(r={});var e=r.insertAt;if(n&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===e&&t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}}b.displayName="LayoutBackground",b.role=x,v.displayName="LayoutContent",v.role=h,w.displayName="LayoutAside",w.role=p,k.displayName="LayoutHeader",k.role=f,m("@layer base {\r\n html, body {\r\n padding: 0;\r\n margin: 0;\r\n border: 0;\r\n width: 100%; \r\n height: 100%;\r\n }\r\n #layout-module_root__0efzq { \r\n text-align: initial;\r\n width: 100%;\r\n height:100%\r\n } \r\n}\r\n*, *:before, *:after {\r\n box-sizing: border-box;\r\n}\r\n.layout-module_rootBox__Y8bEx {\r\n text-rendering: optimizeLegibility;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n width: 100%;\r\n min-height: 100%;\r\n}\r\n.layout-module_rootBackground__vEs6e {\r\n box-sizing: border-box; \r\n pointer-events: none;\r\n inset-block-start:0;\r\n inset-inline-start:0; \r\n width: 100%; \r\n min-width: 100vw;\r\n height:100%;\r\n min-height: 100vh;\r\n overflow: hidden;\r\n position: fixed;\r\n z-index: 0;\r\n}\r\n.layout-module_rootBackground__vEs6e>div{\r\n width:100%;\r\n height: 100%;\r\n overflow: hidden;\r\n}\r\n.layout-module_rootLayout__TePvr {\r\n position: relative;\r\n z-index: 1;\r\n box-sizing: border-box; \r\n width: 100%;\r\n min-height: 100%;\r\n display: flex; \r\n flex-flow: row;\r\n background-color: transparent;\r\n container-type: inline-size;\r\n}\r\n\r\n.layout-module_mainLayout__a8Tb9 {\r\n box-sizing: border-box; \r\n display: flex;\r\n flex-flow: column; \r\n width: 100%;\r\n}\r\n");C("@layer base { \r\n :root{\r\n --pageload-bar-color:#ff6600\r\n } \r\n #index_root__t3vw8 {\r\n padding: 0;\r\n margin: 0;\r\n border: 0;\r\n width: 100%;\r\n height: 100%;\r\n }\r\n}\r\n\r\n/** Menu icon automatic compact mode */\r\n.index_adminui-menu-icon__sDVLQ {\r\n font-size: var(--adminui-menu-icon-size);\r\n width: var(--adminui-menu-icon-size);\r\n height: var(--adminui-menu-icon-size);\r\n}\r\n");var S="index-module_toolbarItem__RkaXd",j="index-module_siderContentBox__dGgRe",B="index-module_siderContentItem__kl3cR";C('@layer base { \r\n\r\n :root { \r\n --sb-track-color: transparent;\r\n --sb-thumb-color: #ccc;\r\n --sb-thumb-hover: #b3b3b3;\r\n --sb-html-track-color: rgb(250,250,250);\r\n color-scheme: light;\r\n }\r\n\r\n * {\r\n box-sizing: border-box;\r\n scrollbar-width: thin;\r\n scrollbar-color: var(--sb-thumb-color) var(--sb-track-color);\r\n }\r\n\r\n html {\r\n scrollbar-color: var(--sb-thumb-color) var(--sb-html-track-color);\r\n }\r\n \r\n @media (prefers-color-scheme: dark) {\r\n :root {\r\n --sb-track-color: transparent;\r\n --sb-thumb-color: #383838;\r\n --sb-thumb-hover: rgb(49, 49, 49);\r\n --sb-html-track-color: rgb(20,20,20);\r\n color-scheme: dark;\r\n }\r\n }\r\n\r\n :root[style="color-scheme: dark;"],\r\n :root[class="dark"] { \r\n --sb-track-color: transparent;\r\n --sb-thumb-color: #383838;\r\n --sb-thumb-hover: rgb(49, 49, 49); \r\n --sb-html-track-color: rgb(20,20,20); \r\n color-scheme: dark; \r\n }\r\n\r\n ::-webkit-scrollbar {\r\n width: 8px;\r\n height: 8px;\r\n background-color: transparent;\r\n } \r\n\r\n ::-webkit-scrollbar-track {\r\n background-color: var(--sb-track-color);\r\n border-radius: 10px;\r\n }\r\n\r\n ::-webkit-scrollbar-thumb {\r\n background-color: var(--sb-thumb-color);\r\n border-radius: 10px; \r\n border: 2px solid var(--sb-track-color);\r\n }\r\n ::-webkit-scrollbar-thumb:hover {\r\n background-color: var(--sb-thumb-hover);\r\n } \r\n}\r\n/** header */\r\n.index-module_headerLayout__rv59v {\r\n box-sizing: border-box;\r\n min-width: 100%;\r\n padding-block: 0;\r\n padding-inline: 0; \r\n transition: opacity var(--adminui-motion-duration-mid), padding var(--adminui-motion-duration-mid), width var(--adminui-motion-duration-mid);\r\n}\r\n\r\n.index-module_headerLayoutSticky__6uFCj {\r\n position: sticky;\r\n width: 100%;\r\n z-index: 100;\r\n top:0;\r\n}\r\n.index-module_headerLayoutFixed__t5Hmo {\r\n position: fixed;\r\n width: 100%;\r\n z-index: 100;\r\n inset-block-start: 0;\r\n inset-inline-end: 0;\r\n}\r\n.index-module_headerLayoutBox__h0fIt {\r\n display: flex;\r\n flex-flow: row;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n.index-module_headerMenu__WHmJN {\r\n border:0px;\r\n background-color: transparent;\r\n flex:1;\r\n height: 100%;\r\n min-width: 0px;\r\n}\r\n.index-module_headerTitle__jGbCX {\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n}\r\n.index-module_headerBrandBox__U2J16 {\r\n width: auto; \r\n}\r\n\r\n.index-module_layoutBlur__GpCPx { \r\n transform: translateZ(0);\r\n backdrop-filter: blur(8px);\r\n}\r\n\r\n.index-module_toolbarPanel__Pp8PS {\r\n display: flex;\r\n justify-content: end;\r\n align-items: center;\r\n}\r\n.index-module_toolbarPanel__Pp8PS .index-module_toolbarItem__RkaXd {\r\n display: flex;\r\n justify-content: end;\r\n align-items: center;\r\n}\r\n.index-module_toolbarAvatarItem__p6TXY {\r\n display: flex;\r\n align-items: center;\r\n padding-inline: var(--adminui-padding-xs); \r\n gap: 8px;\r\n cursor: pointer;\r\n}\r\n.index-module_toolbarAvatarItem__p6TXY span {\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n min-width: 0;\r\n max-width: 100px;\r\n}\r\n\r\n/** sider */\r\n.index-module_siderBaseStyle__zg1FM {\r\n background:\'transparent\'; \r\n padding-bottom: 0px; \r\n z-index: 10;\r\n transition: opacity var(--adminui-motion-duration-mid), padding var(--adminui-motion-duration-mid), width var(--adminui-motion-duration-mid); \r\n}\r\n\r\n.index-module_siderMask__cCjMh {\r\n overflow: hidden;\r\n transition:background-color 0.3s, min-width 0.3s, max-width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)\r\n}\r\n.index-module_siderContentBox__dGgRe {\r\n display: flex;\r\n flex-flow: column;\r\n align-items: center;\r\n width: 100%;\r\n min-height: 0px;\r\n transition: opacity var(--adminui-motion-duration-mid), padding var(--adminui-motion-duration-mid), width var(--adminui-motion-duration-mid); \r\n}\r\n\r\n.index-module_siderContentItem__kl3cR { \r\n display: flex; \r\n align-items: center;\r\n width: 100%; \r\n min-height: 0px;\r\n transition: opacity var(--adminui-motion-duration-mid), padding var(--adminui-motion-duration-mid), width var(--adminui-motion-duration-mid); \r\n}\r\n.index-module_siderContentItem__kl3cR>div{\r\n display: flex; \r\n align-items: center;\r\n opacity: 1;\r\n transition: opacity var(--adminui-motion-duration-mid), padding var(--adminui-motion-duration-mid), width var(--adminui-motion-duration-mid); \r\n}\r\n\r\n.index-module_collapsedTrack__LoJ3V {\r\n display: flex;\r\n flex-flow: column;\r\n justify-content: center;\r\n align-items: center; \r\n position: absolute;\r\n top:0px;\r\n bottom:0px;\r\n right:-14px;\r\n cursor: pointer;\r\n}\r\n.index-module_collapsedTrack__LoJ3V .index-module_collapsedTrackButton__m33XS {\r\n width: 14px;\r\n height: 36px;\r\n border-top-right-radius: 4px;\r\n border-bottom-right-radius: 4px;\r\n display: flex;\r\n flex-flow: column;\r\n justify-content: center;\r\n align-items: center; \r\n opacity: 0; \r\n transition: opacity var(--adminui-motion-duration-mid), padding var(--adminui-motion-duration-mid), width var(--adminui-motion-duration-mid); \r\n\r\n}\r\n.index-module_collapsedTrack__LoJ3V:hover .index-module_collapsedTrackButton__m33XS {\r\n opacity: 1;\r\n}\r\n\r\n/** brand */ \r\n.index-module_brandPanel__2GRgq {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding:var(--adminui-margin-xxs);\r\n}\r\n.index-module_brandPanel__2GRgq button {\r\n display: flex;\r\n width: 100%;\r\n align-items: center;\r\n opacity: 1;\r\n padding-inline: var(--adminui-padding-xs); \r\n transition: all 0.3s;\r\n\r\n}\r\n.index-module_brandPanel__2GRgq a {\r\n display: flex;\r\n width: 100%;\r\n height: 100%;\r\n align-items: center;\r\n opacity: 1;\r\n color:inherit; \r\n transition: all 0.3s; \r\n padding-inline: var(--adminui-padding-xs);\r\n border-radius: var(--adminui-border-radius-lg);\r\n}\r\n\r\n.index-module_brandPanel__2GRgq a:hover{\r\n background-color: var(--adminui-control-item-bg-hover);\r\n}\r\n.index-module_brandPanel__2GRgq a:active{\r\n background-color: var(--adminui-control-item-bg-active);\r\n}\r\n\r\n.index-module_brandPanel__2GRgq h4{\r\n margin:0px;\r\n padding:0px;\r\n line-height: 1rem;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n min-width: 0;\r\n}\r\n.index-module_brandPanel__2GRgq span {\r\n margin:0px; \r\n line-height: 1rem;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n min-width: 0;\r\n}\r\n\r\n.index-module_brandPanel__2GRgq .index-module_labelBox__dX8fY {\r\n width: 100%; \r\n display:flex;\r\n flex-flow:column;\r\n justify-content:space-between;\r\n transition: opacity var(--adminui-motion-duration-slow) var(--adminui-motion-ease-in-out), padding var(--adminui-motion-duration-mid) var(--adminui-motion-ease-in-out);\r\n}\r\n.index-module_brandNodeBox__W-iM6 {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n color:var(--adminui-color-primary);\r\n transition: opacity var(--adminui-motion-duration-slow) var(--adminui-motion-ease-in-out), width var(--adminui-motion-duration-mid) var(--adminui-motion-ease-in-out);\r\n}\r\n\r\n.index-module_brandMobilePanel__m1Diu {\r\n opacity: 0;\r\n width: 0px;\r\n overflow: hidden;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n height: 100%;\r\n gap: 8px;\r\n transition: opacity var(--adminui-motion-duration-slow) var(--adminui-motion-ease-in-out), width var(--adminui-motion-duration-mid) var(--adminui-motion-ease-in-out),padding var(--adminui-motion-duration-mid) var(--adminui-motion-ease-in-out);\r\n}\r\n.index-module_brandMobilePanel__m1Diu a {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n.index-module_largeBrandPanel__pLn-- {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n flex-flow: column;\r\n gap: 2px;\r\n padding: var(--adminui-padding-lg); \r\n}\r\n\r\n.index-module_largeBrandPanel__pLn-- img {\r\n transition: width var(--adminui-motion-duration-slow) var(--adminui-motion-ease-in-out); \r\n}\r\n.index-module_largeBrandPanel__pLn--\x3ediv{\r\n opacity: 1;\r\n text-align: center;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n flex-flow: column; \r\n overflow: hidden;\r\n width: 100%;\r\n transition: opacity var(--adminui-motion-duration-slow) var(--adminui-motion-ease-in-out), height var(--adminui-motion-duration-slow) var(--adminui-motion-ease-in-out);\r\n}\r\n.index-module_largeBrandPanel__pLn-- span {\r\n font-size: large;\r\n width: 100%;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n min-width: 0;\r\n}\r\n.index-module_largeBrandPanel__pLn-- span.index-module_title__SbfFY {\r\n font-size: small;\r\n color:var(--adminui-color-text-tertiary);\r\n}\r\n.index-module_largeBrandCollPanel__nsGKB {\r\n padding: var(--adminui-margin-xxs);\r\n}\r\n.index-module_largeBrandCollPanel__nsGKB a {\r\n opacity: 1;\r\n color:inherit; \r\n padding: var(--adminui-padding-xs);\r\n border-radius: var(--adminui-border-radius-lg);\r\n}\r\n.index-module_largeBrandCollPanel__nsGKB a:hover{\r\n background-color: var(--adminui-control-item-bg-hover);\r\n}\r\n.index-module_largeBrandCollPanel__nsGKB a:active{\r\n background-color: var(--adminui-control-item-bg-active);\r\n}\r\n/** avatar */\r\n.index-module_avatarPanel__fFvCS {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding:var(--adminui-margin-xxs);\r\n}\r\n.index-module_avatarPanel__fFvCS a {\r\n display: flex;\r\n width: 100%;\r\n height: 100%;\r\n align-items: center;\r\n opacity: 1;\r\n color:inherit; \r\n transition: all 0.3s;\r\n padding-inline: var(--adminui-padding-xs);\r\n border-radius: var(--adminui-border-radius-lg);\r\n}\r\n\r\n.index-module_avatarPanel__fFvCS a:hover{\r\n background-color: var(--adminui-control-item-bg-hover);\r\n}\r\n.index-module_avatarPanel__fFvCS a:active{\r\n background-color: var(--adminui-control-item-bg-active);\r\n}\r\n\r\n.index-module_avatarPanel__fFvCS h4{\r\n width: 90%;\r\n margin:0px;\r\n padding:0px;\r\n line-height: 1rem;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n min-width: 0;\r\n}\r\n.index-module_avatarPanel__fFvCS span {\r\n width: 90%;\r\n margin:0px; \r\n line-height: 1rem;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n min-width: 0;\r\n}\r\n\r\n.index-module_avatarPanel__fFvCS .index-module_labelBox__dX8fY {\r\n width: 100%;\r\n display:flex;\r\n flex-flow:column;\r\n justify-content:space-between;\r\n transition: opacity var(--adminui-motion-duration-slow) var(--adminui-motion-ease-in-out);\r\n}\r\n\r\n.index-module_collapsedMobile__Yu8F4 { \r\n display: none;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n\r\n\r\n/** container */\r\n.index-module_containerBox__pv0qs {\r\n box-sizing: border-box;\r\n background-color: transparent;\r\n display: flex;\r\n flex-flow: column;\r\n flex:auto;\r\n}\r\n.index-module_containerBox__pv0qs>h3 {\r\n box-sizing: border-box;\r\n line-height: var(--adminui-line-height);\r\n margin:0 0 var(--adminui-margin);\r\n}\r\n.index-module_containerBox__pv0qs>footer{\r\n display: flex;\r\n flex-flow: column;\r\n align-items: center;\r\n justify-content: center;\r\n width: 100%;\r\n color:var(--adminui-color-text-description);\r\n padding:var(--adminui-padding);\r\n}\r\n.index-module_containerBox__pv0qs>footer>div{\r\n text-align: center;\r\n}\r\n\r\n\r\n/** antd(adminui) */\r\n.index-module_headerLayout__rv59v .adminui-layout-header{\r\n padding-inline: 0px;\r\n}\r\n.index-module_headerLayout__rv59v .adminui-btn,\r\n.index-module_siderBaseStyle__zg1FM .adminui-btn{\r\n font-size: inherit;\r\n}\r\n.index-module_headerLayoutBox__h0fIt.index-module_round__WoVxM .adminui-menu-horizontal >.adminui-menu-item::after, \r\n.index-module_headerLayoutBox__h0fIt.index-module_round__WoVxM .adminui-menu-horizontal >.adminui-menu-submenu::after { \r\n border-radius: 4px;\r\n}\r\n\r\n.index-module_siderBaseStyle__zg1FM .adminui-layout-sider-trigger{\r\n position: absolute; \r\n top:0; \r\n right:0;\r\n height:100%;\r\n}\r\n.index-module_siderBaseStyle__zg1FM .adminui-layout-sider-children {\r\n display: flex;\r\n flex-flow: column;\r\n margin-top: 0px;\r\n padding-top: 0px;\r\n\r\n}\r\n\r\n@container (max-width: 576px) { \r\n .index-module_headerLayout__rv59v .adminui-layout-header {\r\n padding-inline-start: var(--adminui-padding-xs);\r\n }\r\n .index-module_headerMenu__WHmJN {\r\n justify-content: end;\r\n max-width: 80px;\r\n } \r\n .index-module_headerBrandBox__U2J16 {\r\n display: none;\r\n }\r\n .index-module_siderMask__cCjMh {\r\n display: none;\r\n }\r\n .index-module_brandMobilePanel__m1Diu {\r\n opacity: 1; \r\n padding-inline: var(--adminui-padding-xs);\r\n justify-content: flex-start;\r\n flex:1;\r\n }\r\n .index-module_largeBrandPanel__pLn-- {\r\n display: none;\r\n }\r\n .index-module_collapsedMobile__Yu8F4 {\r\n display: flex;\r\n }\r\n .index-module_collapsedTrack__LoJ3V {\r\n visibility: collapse;\r\n }\r\n .index-module_toolbarPanel__Pp8PS *[data-adminui-role="desk-toolbar"] {\r\n display: none;\r\n }\r\n .index-module_toolbarAvatarItem__p6TXY span {\r\n display: none;\r\n }\r\n}\r\n');const P=r.createContext({collapsed:!1,headerHeight:50,setCollapsed:()=>{}}),L=r.createContext({close:()=>{}}),T=r.createContext({close:()=>{}}),z=Symbol("AsideFooter"),N=Symbol("AsideHeader"),F=Symbol("AsideContentItems"),I=Symbol("AsideContentItem"),M=Symbol("ContentFooter"),A=Symbol("AvatarPopoverContent"),R=Symbol("BrandPopoverContent"),O=Symbol("SoltContent"),E=Symbol("ToolbarExtraItems"),W=()=>r.useContext(P).collapsed,{useToken:G}=e.theme;function q(n){return c.jsx("div",{style:{...n.style},children:n.children})}q.displayName="BrandPopoverContent",q.role=R;const{useToken:$}=e.theme;function D(n){return c.jsx("div",{style:{...n.style},children:n.children})}D.displayName="AvatarPopoverContent",D.role=A;const{useToken:V}=e.theme;function J(n){const r=c.jsx("div",{className:S,"data-adminui-role":"desk-toolbar",children:n.children});return n?c.jsx(c.Fragment,{children:r}):c.jsx(c.Fragment,{})}J.displayName="ToolbarExtraItems",J.role=E;const{useToken:X}=e.theme,{Header:U}=e.Layout,{useToken:H}=e.theme,{Sider:Y}=e.Layout,{useToken:K}=e.theme,{useBreakpoint:Q}=e.Grid;const Z=n=>{let r=[];if(!(null==n||n.length<=0))return n.forEach(n=>{let e=tn(n);e.children=Z(n.children),r.push(e)}),r},nn=(n,r)=>{if(n)return n.map(n=>{const e=en(n,r),t={...n,label:e};return n.children&&(t.children=nn(n.children,r)),t})},rn=(n,r,e,t)=>{if(t){const o="menu"+n.replaceAll("/",".");return t.formatMessage({id:o,defaultMessage:e||r})}return e||r},en=(n,r)=>{const e=n.path||"";return rn(e,n.name,n.label,r)},tn=n=>({key:n.path||n.name,label:n.label||n.name,icon:n.icon,extra:n.extra,title:n.label});function on(n){const r="/"===n?"/":n.replace(/\/+$/,"");if("/"===r)return["/"];const e=r.split("/").filter(Boolean),t=["/"];let o="";for(const n of e)o+=`/${n}`,t.push(o);return t}const an=n=>r.isValidElement(n)?n:"function"==typeof n||"object"==typeof n?r.createElement(n):null,{useToken:dn}=e.theme,ln=n=>a.generate(n);function sn(n){const r=W(),{layoutConfig:e}=y(),t=e.compact?"16px":"20px";let o={justifyContent:"flex-start",paddingInline:e.compact?"14px":"16px",marginInline:"4px",marginBlock:"4px",gap:(e.compact?6:8)+"px"};return r&&(o={...o,paddingInline:`calc(50% - calc(${t} / 2))`}),!n.icon&&r?c.jsx(c.Fragment,{}):c.jsxs("div",{className:B,style:o,children:[c.jsx("div",{children:n.icon}),c.jsx("div",{style:{opacity:r?"0":"1"},children:n.children})]})}function un(n){return c.jsx(c.Fragment,{children:n.children})}function cn(n){return c.jsx("div",{className:j,children:n.children})}function mn(n){return c.jsx("div",{className:j,children:n.children})}un.displayName="AsideContentItems",sn.displayName="AsideContentItem",mn.displayName="AsideHeaderContent",mn.Items=un,mn.Item=sn,cn.displayName="AsideFooterContent",cn.Items=un,cn.Item=sn,cn.role=N,mn.role=z,un.role=F,sn.role=I;const pn="adminui-default-config",hn=n=>({f:r=>{const{id:e,defaultMessage:t}=r;return n?n.formatMessage({id:e,defaultMessage:t}):t||e.split(".").pop()},t:(r,e)=>n?n.formatMessage({id:r,defaultMessage:e}):e||r.split(".").pop()}),{useToken:fn}=e.theme,xn=n=>c.jsx("div",{...n,children:n.children});function _n(n){return c.jsx(c.Fragment,{children:n.children})}xn.displayName="ContentFooter",xn.role=M,_n.displayName="SoltContent",_n.role=O,Object.defineProperty(exports,"generate",{enumerable:!0,get:function(){return a.generate}}),exports.buildRouteWithParams=function(n,r={}){if(!Object.keys(r).some(n=>null!=r[n]))return n.split("/:")[0];const e=n.split("/"),t=[];for(const n of e)if(n.startsWith(":")){const e=n.slice(1),o=r[e];if(null==o)break;t.push(encodeURIComponent(String(o)))}else t.push(n);return t.join("/")},exports.getAntdMenuItem=tn,exports.getAppIntl=hn,exports.getBasicLayoutConfig=n=>{const{brandInfo:r,userInfo:e,...t}=n;return t},exports.getBlackColors=()=>ln("#22222222"),exports.getMenuLabel=en,exports.getRouterLabel=(n,r)=>rn(n.pathname,n.id,"",r),exports.getStorageConfig=n=>{n||(n=pn);const r=window.localStorage.getItem(n);try{if(r)return JSON.parse(r)}catch(n){console.error(n)}},exports.getWhiteColors=()=>ln("#FFFFFF"),exports.localeMenuData=nn,exports.matchPathToKeys=function(n){let r=on(n);return r&&r.length>1&&"/"==r[0]&&r.splice(0,1),r},exports.pathToKeys=on,exports.separateMenuData=function(n,r){let e=[],t=[];return n.forEach(n=>{n.key==r[1]&&(t=n.children??[]);const o={...n,children:void 0};e.push(o)}),{rootMenuItems:e,childrenMenuItems:t}},exports.setSkinConfig=(n,r)=>{let e={...n};if(r){const n=r.theme.length<2?r.theme[0]:e.theme;e={...e,primaryColor:r.primaryColor??e.primaryColor,containerBlur:r.containerBlur??e.containerBlur,asideBlur:r.asideBlur??e.asideBlur,asideWidth:r.asideWidth??e.asideWidth,headerBlur:r.asideBlur??e.headerBlur,theme:n}}return e},exports.setStorageConfig=(n,r)=>{r||(r=pn);const{brandInfo:e,userInfo:t,...o}=n,i=JSON.stringify(o);window.localStorage.setItem(r,i)},exports.splitMenuKeys=function(n){const r=n.length;if(0===r)return[[],[]];const e=[n[1]],t=new Array(r-2);for(let e=1;e<r;e++)t[e-1]=n[e];return[e,t]},exports.transformMenuData=function n(r,e){if(e)return!r.endsWith("/")&&r.length>1&&(r+="/"),e.map(e=>{const t=function(n,r){let e=r.path||r.name;e?.startsWith("/")&&(e=e.slice(1));e?.startsWith("./")&&(e=e.slice(2));let t=n+e,o={name:t,path:t,originalPath:t,extra:an(r.extra),icon:an(r.icon)};return o}(r,e);return e.children&&(t.children=n(t.path,e.children)),t})},exports.transformRouteToMenuData=function n(r,e){if(e)return!r.endsWith("/")&&r.length>1&&(r+="/"),e.filter(n=>!!n.handle).map(e=>{const t=function(n,r){const{handle:e}=r;let t=r.path;t&&e.params&&(t=i.generatePath(t,e.params));t?.startsWith("/")&&(t=t.slice(1));let o=n+t,a={...e,path:o,originalPath:r.path,extra:an(e.extra),icon:an(e.icon)};return a}(r,e);return e.children&&(t.children=n(t.path,e.children)),t})},exports.transformToAntdMenuData=Z,exports.useAppIntl=()=>{const n=t.useIntl(),{layoutConfig:r}=y(),{f:e,t:o}=hn(r.disabledLocale?void 0:n);return{...n,f:e,t:o}},exports.useAvatarPopover=()=>r.useContext(L),exports.useBrandPopover=()=>r.useContext(T),exports.useConfigAction=()=>r.useContext(_),exports.useConfigState=y,exports.useContainerOutlet=()=>o.useOutletContext(),exports.useMainCollapsed=W,exports.useTheme=()=>y().layoutConfig.theme;
|