@admin-layout/client 2.0.1-alpha.6 → 3.0.0-alpha.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/ApplicationErrorFillWrapper.d.ts +1 -0
- package/lib/components/ApplicationErrorHandlerCommon.js +1 -1
- package/lib/components/ApplicationErrorHandlerCommon.js.map +1 -1
- package/lib/config/config.js +2 -14
- package/lib/config/config.js.map +1 -1
- package/lib/config/defaultSettings.d.ts +12 -0
- package/lib/config/defaultSettings.js +29 -0
- package/lib/config/defaultSettings.js.map +1 -0
- package/lib/graphql/link/error-link.js +2 -2
- package/lib/graphql/link/error-link.js.map +1 -1
- package/lib/interfaces/index.d.ts +1 -0
- package/lib/interfaces/index.js +1 -0
- package/lib/interfaces/index.js.map +1 -1
- package/lib/interfaces/layout/base-menu.d.ts +35 -0
- package/lib/interfaces/layout/base-menu.js +2 -0
- package/lib/interfaces/layout/base-menu.js.map +1 -0
- package/lib/interfaces/layout/basic-layout.d.ts +68 -0
- package/lib/interfaces/layout/basic-layout.js +2 -0
- package/lib/interfaces/layout/basic-layout.js.map +1 -0
- package/lib/interfaces/layout/breadcrum.d.ts +34 -0
- package/lib/interfaces/layout/breadcrum.js +2 -0
- package/lib/interfaces/layout/breadcrum.js.map +1 -0
- package/lib/interfaces/layout/global-footer.d.ts +14 -0
- package/lib/interfaces/layout/global-footer.js +2 -0
- package/lib/interfaces/layout/global-footer.js.map +1 -0
- package/lib/interfaces/layout/global-header.d.ts +31 -0
- package/lib/interfaces/layout/global-header.js +2 -0
- package/lib/interfaces/layout/global-header.js.map +1 -0
- package/lib/interfaces/layout/index.d.ts +8 -0
- package/lib/interfaces/layout/index.js +9 -0
- package/lib/interfaces/layout/index.js.map +1 -0
- package/lib/interfaces/layout/menu.d.ts +33 -0
- package/lib/interfaces/layout/menu.js +2 -0
- package/lib/interfaces/layout/menu.js.map +1 -0
- package/lib/interfaces/layout/page.d.ts +16 -0
- package/lib/interfaces/layout/page.js +2 -0
- package/lib/interfaces/layout/page.js.map +1 -0
- package/lib/interfaces/layout/sider-menu.d.ts +41 -0
- package/lib/interfaces/layout/sider-menu.js +2 -0
- package/lib/interfaces/layout/sider-menu.js.map +1 -0
- package/lib/interfaces/pure-settings.d.ts +6 -5
- package/lib/interfaces/typings.d.ts +2 -0
- package/lib/redux/selectors/index.js +1 -1
- package/lib/redux/selectors/index.js.map +1 -1
- package/lib/redux/settings.d.ts +6 -5
- package/lib/redux/settings.js +2 -1
- package/lib/redux/settings.js.map +1 -1
- package/package.json +2 -2
|
@@ -16,7 +16,7 @@ import { backendErrorSelector } from '../redux/selectors';
|
|
|
16
16
|
*/
|
|
17
17
|
export const ApplicationErrorHandlerCommon = (FallbackComponent, ApplicationErrorSlot = undefined) => ({ plugins, children }) => {
|
|
18
18
|
const applicationErrors = useSelector((state) => state === null || state === void 0 ? void 0 : state.applicationErrors);
|
|
19
|
-
const errors = applicationErrors.filter((error) => !!plugins.find((plugin) => plugin.name === (error === null || error === void 0 ? void 0 : error.pluginName)));
|
|
19
|
+
const errors = applicationErrors === null || applicationErrors === void 0 ? void 0 : applicationErrors.filter((error) => !!plugins.find((plugin) => plugin.name === (error === null || error === void 0 ? void 0 : error.pluginName)));
|
|
20
20
|
const backendError = useSelector(backendErrorSelector);
|
|
21
21
|
const RenderApplicationErrorSlot = (props) => {
|
|
22
22
|
return !!ApplicationErrorSlot ? React.createElement(ApplicationErrorSlot, Object.assign({}, props)) : React.createElement(Slot, Object.assign({}, props));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationErrorHandlerCommon.js","sourceRoot":"","sources":["../../src/components/ApplicationErrorHandlerCommon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CA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CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,MAAK,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,CAAA,CAAC,CAAC,CAAA;IAClH,MAAM,YAAY,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC;IACvD,MAAM,0BAA0B,GAAG,CAAC,KAAK,EAAE,EAAE;QAC3C,OAAO,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAC,oBAAoB,oBAAK,KAAK,EAAI,CAAC,CAAC,CAAC,oBAAC,IAAI,oBAAK,KAAK,EAAI,CAAA;IAC3F,CAAC,CAAA;IACD,OAAO,CACL;QACG,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,oBAAC,iBAAiB,IAAC,KAAK,EAAE,YAAY,GAAI,CAAC,CAAC,CAAC,IAAI;QAClE,CAAC,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CAAA;YACf,CAAC,CAAC,oBAAC,0BAA0B,IAAC,IAAI,EAAE,2BAA2B,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAI;YAC3H,CAAC,CAAC,QAAQ,CAEX,CACJ,CAAA;AACH,CAAC,CAAA"}
|
package/lib/config/config.js
CHANGED
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
import * as envalid from 'envalid';
|
|
2
|
+
import { defaultSettings } from './defaultSettings';
|
|
2
3
|
const { json } = envalid;
|
|
3
4
|
const env = process.APP_ENV || process.env;
|
|
4
5
|
export const config = envalid.cleanEnv(env, {
|
|
5
6
|
LAYOUT_SETTINGS: json({
|
|
6
|
-
default: JSON.stringify(
|
|
7
|
-
logo: 'https://cdmbase.s3.ca-central-1.amazonaws.com/favicon-new-128.svg',
|
|
8
|
-
navTheme: 'light',
|
|
9
|
-
primaryColor: '#3FA541C',
|
|
10
|
-
layout: 'side',
|
|
11
|
-
contentWidth: 'Fluid',
|
|
12
|
-
fixedHeader: false,
|
|
13
|
-
fixSiderbar: true,
|
|
14
|
-
searchBarRender: false,
|
|
15
|
-
colorWeak: false,
|
|
16
|
-
title: 'CDMBase LLC',
|
|
17
|
-
iconfontUrl: '',
|
|
18
|
-
language: 'en-US',
|
|
19
|
-
}),
|
|
7
|
+
default: JSON.stringify(defaultSettings),
|
|
20
8
|
}),
|
|
21
9
|
});
|
|
22
10
|
//# sourceMappingURL=config.js.map
|
package/lib/config/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;AACzB,MAAM,GAAG,GAAI,OAAe,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC;AAEpD,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE;IACxC,eAAe,EAAE,IAAI,CAAkB;QACnC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,eAAe,CAAQ;KAClD,CAAC;CACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ProSettings } from '../interfaces';
|
|
2
|
+
export declare const defaultSettings: ProSettings & {
|
|
3
|
+
logo: string;
|
|
4
|
+
showSettingPanel: boolean;
|
|
5
|
+
titleColor: string;
|
|
6
|
+
language: string;
|
|
7
|
+
fontFamily: string;
|
|
8
|
+
titleFontWeight: string;
|
|
9
|
+
titleHeight: string;
|
|
10
|
+
titleFontSize: string;
|
|
11
|
+
letterSpacings: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const defaultSettings = {
|
|
2
|
+
logo: 'https://cdmbase.s3.ca-central-1.amazonaws.com/favicon-new-128.svg',
|
|
3
|
+
navTheme: 'light',
|
|
4
|
+
primaryColor: '#3FA541C',
|
|
5
|
+
layout: 'side',
|
|
6
|
+
contentWidth: 'Fluid',
|
|
7
|
+
fixedHeader: false,
|
|
8
|
+
fixSiderbar: true,
|
|
9
|
+
searchBarRender: true,
|
|
10
|
+
colorWeak: false,
|
|
11
|
+
title: 'CDMBase LLC',
|
|
12
|
+
iconfontUrl: '',
|
|
13
|
+
showSettingPanel: true,
|
|
14
|
+
titleColor: '#2869E0',
|
|
15
|
+
language: 'en-US',
|
|
16
|
+
fontFamily: 'Poppins, sans-serif',
|
|
17
|
+
titleFontWeight: '700',
|
|
18
|
+
titleHeight: '30px',
|
|
19
|
+
titleFontSize: '1.8rem',
|
|
20
|
+
letterSpacings: '1px',
|
|
21
|
+
showHeader: true,
|
|
22
|
+
showFooter: true,
|
|
23
|
+
showMenu: false,
|
|
24
|
+
headerTheme: undefined,
|
|
25
|
+
headerHeight: undefined,
|
|
26
|
+
menu: undefined,
|
|
27
|
+
splitMenus: false,
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=defaultSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultSettings.js","sourceRoot":"","sources":["../../src/config/defaultSettings.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAUxB;IACA,IAAI,EAAE,mEAAmE;IACzE,QAAQ,EAAE,OAAO;IACjB,YAAY,EAAE,UAAU;IACxB,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,OAAO;IACrB,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,IAAI;IACjB,eAAe,EAAE,IAAI;IACrB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,EAAE;IACf,gBAAgB,EAAE,IAAI;IACtB,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,OAAO;IACjB,UAAU,EAAE,qBAAqB;IACjC,eAAe,EAAE,KAAK;IACtB,WAAW,EAAE,MAAM;IACnB,aAAa,EAAE,QAAQ;IACvB,cAAc,EAAE,KAAK;IACrB,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,SAAS;IACtB,YAAY,EAAE,SAAS;IACvB,IAAI,EAAE,SAAS;IACf,UAAU,EAAE,KAAK;CACpB,CAAC"}
|
|
@@ -22,7 +22,7 @@ export class ErrorLink {
|
|
|
22
22
|
}
|
|
23
23
|
getErrorLink(container) {
|
|
24
24
|
return onError(err => {
|
|
25
|
-
var _a
|
|
25
|
+
var _a;
|
|
26
26
|
const { networkError, graphQLErrors } = err;
|
|
27
27
|
if (graphQLErrors === null || graphQLErrors === void 0 ? void 0 : graphQLErrors.length) {
|
|
28
28
|
graphQLErrors.forEach((error) => {
|
|
@@ -30,7 +30,7 @@ export class ErrorLink {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
if (networkError) {
|
|
33
|
-
const serverErrors = (
|
|
33
|
+
const serverErrors = (_a = networkError === null || networkError === void 0 ? void 0 : networkError.result) === null || _a === void 0 ? void 0 : _a.errors;
|
|
34
34
|
if (serverErrors === null || serverErrors === void 0 ? void 0 : serverErrors.length) {
|
|
35
35
|
serverErrors.map((error) => {
|
|
36
36
|
this.dispatchErrorAction(container, error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-link.js","sourceRoot":"","sources":["../../../src/graphql/link/error-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAIpD,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;A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AK,EAAE,EAAE;wBACzB,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;oBAC5C,CAAC,CAAC,CAAA;iBACH;qBAAM;oBACL,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAA;iBAClD;aACF;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AAGD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAA+B,EAAE,EAAE;IAChE,OAAO,IAAI,SAAS,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;AAChD,CAAC,CAAA"}
|
package/lib/interfaces/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MenuTheme, PureSettings } from "../pure-settings";
|
|
3
|
+
import { MenuDataItem, MessageDescriptor, Route, RouterTypes, WithFalse } from "../typings";
|
|
4
|
+
import { MenuProps } from "./menu";
|
|
5
|
+
export declare type MenuMode = 'vertical' | 'horizontal' | 'inline';
|
|
6
|
+
export interface BaseMenuProps extends Partial<RouterTypes<Route>>, Omit<MenuProps, 'openKeys' | 'onOpenChange' | 'title'>, Partial<PureSettings> {
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Whether the default is expanded, it will be affected by BreakPoint
|
|
10
|
+
*/
|
|
11
|
+
defaultCollapsed?: boolean;
|
|
12
|
+
collapsed?: boolean;
|
|
13
|
+
splitMenus?: boolean;
|
|
14
|
+
isMobile?: boolean;
|
|
15
|
+
menuData?: MenuDataItem[];
|
|
16
|
+
mode?: MenuMode;
|
|
17
|
+
onCollapse?: (collapsed: boolean) => void;
|
|
18
|
+
openKeys?: WithFalse<string[]> | undefined;
|
|
19
|
+
handleOpenChange?: (openKeys: string[]) => void;
|
|
20
|
+
/**
|
|
21
|
+
* To give the version of the props, refer to the properties of the ANTD-MENU. Https: //ant.design/components/menu-cn/
|
|
22
|
+
*/
|
|
23
|
+
menuProps?: MenuProps;
|
|
24
|
+
style?: React.CSSProperties;
|
|
25
|
+
theme?: MenuTheme;
|
|
26
|
+
params?: any;
|
|
27
|
+
formatMessage?: (message: MessageDescriptor) => string;
|
|
28
|
+
subMenuItemRender?: WithFalse<(item: MenuDataItem & {
|
|
29
|
+
isUrl: boolean;
|
|
30
|
+
}, defaultDom: React.ReactNode) => React.ReactNode>;
|
|
31
|
+
menuItemRender?: WithFalse<(item: MenuDataItem & {
|
|
32
|
+
isUrl: boolean;
|
|
33
|
+
}, defaultDom: React.ReactNode) => React.ReactNode>;
|
|
34
|
+
postMenuData?: (menusData?: MenuDataItem[]) => MenuDataItem[];
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-menu.js","sourceRoot":"","sources":["../../../src/interfaces/layout/base-menu.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { MenuDataItem, MessageDescriptor, Route, RouterTypes, WithFalse } from '../typings';
|
|
3
|
+
import { BaseBreadcrumbProps } from './breadcrum';
|
|
4
|
+
import { BaseMenuProps } from './base-menu';
|
|
5
|
+
import { HeaderViewProps } from './global-header';
|
|
6
|
+
import { GetPageTitleProps } from './page';
|
|
7
|
+
import { SiderMenuProps } from './sider-menu';
|
|
8
|
+
import { ProSettings } from '../pure-settings';
|
|
9
|
+
import { IPermissionType } from '@adminide-stack/core';
|
|
10
|
+
export declare type LocaleType = {
|
|
11
|
+
'zh-CN': {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
'zh-TW': {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
};
|
|
17
|
+
'en-US': {
|
|
18
|
+
[key: string]: string;
|
|
19
|
+
};
|
|
20
|
+
'it-IT': {
|
|
21
|
+
[key: string]: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
declare type MergerSettingsType<T> = Partial<T> & {
|
|
25
|
+
primaryColor?: string;
|
|
26
|
+
colorWeak?: boolean;
|
|
27
|
+
};
|
|
28
|
+
export declare type BasicLayoutProps = Partial<RouterTypes<Route>> & SiderMenuProps & HeaderViewProps & {
|
|
29
|
+
pure?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
*@name logo url
|
|
32
|
+
*/
|
|
33
|
+
logo?: React.ReactNode | WithFalse<() => React.ReactNode>;
|
|
34
|
+
/**
|
|
35
|
+
*@name Triggered when the page is switched
|
|
36
|
+
*/
|
|
37
|
+
onPageChange?: (location?: RouterTypes<Route>['location']) => void;
|
|
38
|
+
loading?: boolean;
|
|
39
|
+
settings?: any;
|
|
40
|
+
authorities?: Record<string, IPermissionType>;
|
|
41
|
+
onSettingChange?: (settings: MergerSettingsType<ProSettings>) => void;
|
|
42
|
+
locale?: LocaleType;
|
|
43
|
+
onCollapse?: (collapsed: boolean) => void;
|
|
44
|
+
footerRender?: WithFalse<(props: HeaderViewProps, defaultDom: React.ReactNode) => React.ReactNode>;
|
|
45
|
+
breadcrumbRender?: (routers: BaseBreadcrumbProps['routes']) => BaseBreadcrumbProps['routes'];
|
|
46
|
+
menuItemRender?: BaseMenuProps['menuItemRender'];
|
|
47
|
+
pageTitleRender?: WithFalse<(props: GetPageTitleProps, defaultPageTitle?: string, info?: {
|
|
48
|
+
title: string;
|
|
49
|
+
id: string;
|
|
50
|
+
pageName: string;
|
|
51
|
+
}) => string>;
|
|
52
|
+
menuDataRender?: (menuData: MenuDataItem[]) => MenuDataItem[];
|
|
53
|
+
itemRender?: BaseBreadcrumbProps['itemRender'];
|
|
54
|
+
formatMessage?: (message: MessageDescriptor) => string;
|
|
55
|
+
/**
|
|
56
|
+
* Whether to disable the mobile terminal mode, some management systems do not need
|
|
57
|
+
* the mobile terminal mode, this property can be set to true
|
|
58
|
+
*/
|
|
59
|
+
disableMobile?: boolean;
|
|
60
|
+
contentStyle?: CSSProperties;
|
|
61
|
+
isChildrenLayout?: boolean;
|
|
62
|
+
className?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Use both content margin
|
|
65
|
+
*/
|
|
66
|
+
disableContentMargin?: boolean;
|
|
67
|
+
};
|
|
68
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic-layout.js","sourceRoot":"","sources":["../../../src/interfaces/layout/basic-layout.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import H from 'history';
|
|
3
|
+
import { ProSettings } from "../pure-settings";
|
|
4
|
+
import { MenuDataItem, MessageDescriptor } from "../typings";
|
|
5
|
+
export interface BreadcrumbRoute {
|
|
6
|
+
path: string;
|
|
7
|
+
breadcrumbName: string;
|
|
8
|
+
children?: Omit<BreadcrumbRoute, 'children'>[];
|
|
9
|
+
}
|
|
10
|
+
export interface BaseBreadcrumbProps {
|
|
11
|
+
prefixCls?: string;
|
|
12
|
+
routes?: BreadcrumbRoute[];
|
|
13
|
+
params?: any;
|
|
14
|
+
separator?: React.ReactNode;
|
|
15
|
+
itemRender?: (route: BreadcrumbRoute, params: any, routes: Array<BreadcrumbRoute>, paths: Array<string>) => React.ReactNode;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
className?: string;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export interface BreadcrumbProps {
|
|
21
|
+
breadcrumbList?: {
|
|
22
|
+
title: string;
|
|
23
|
+
href: string;
|
|
24
|
+
}[];
|
|
25
|
+
home?: string;
|
|
26
|
+
location?: H.Location | {
|
|
27
|
+
pathname?: string;
|
|
28
|
+
};
|
|
29
|
+
menu?: ProSettings['menu'];
|
|
30
|
+
breadcrumbMap?: Map<string, MenuDataItem>;
|
|
31
|
+
formatMessage?: (message: MessageDescriptor) => string;
|
|
32
|
+
breadcrumbRender?: (routers: BaseBreadcrumbProps['routes']) => BaseBreadcrumbProps['routes'];
|
|
33
|
+
itemRender?: BaseBreadcrumbProps['itemRender'];
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrum.js","sourceRoot":"","sources":["../../../src/interfaces/layout/breadcrum.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WithFalse } from "../typings";
|
|
3
|
+
export interface GlobalFooterProps {
|
|
4
|
+
links?: WithFalse<{
|
|
5
|
+
key?: string;
|
|
6
|
+
title: React.ReactNode;
|
|
7
|
+
href: string;
|
|
8
|
+
blankTarget?: boolean;
|
|
9
|
+
}[]>;
|
|
10
|
+
copyright?: React.ReactNode;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
prefixCls?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-footer.js","sourceRoot":"","sources":["../../../src/interfaces/layout/global-footer.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PureSettings } from '../pure-settings';
|
|
3
|
+
import { MenuDataItem, WithFalse } from '../typings';
|
|
4
|
+
import { PrivateSiderMenuProps, SiderMenuProps } from './sider-menu';
|
|
5
|
+
export declare type HeaderViewProps = GlobalHeaderProps & {
|
|
6
|
+
isMobile?: boolean;
|
|
7
|
+
collapsed?: boolean;
|
|
8
|
+
logo?: React.ReactNode;
|
|
9
|
+
menuContentRender?: WithFalse<(props: HeaderViewProps, defaultDom: React.ReactNode) => React.ReactNode>;
|
|
10
|
+
headerRender?: WithFalse<(props: HeaderViewProps, defaultDom: React.ReactNode) => React.ReactNode>;
|
|
11
|
+
headerTitleRender?: WithFalse<(props: HeaderViewProps, defaultDom: React.ReactNode) => React.ReactNode>;
|
|
12
|
+
headerContentRender?: WithFalse<(props: HeaderViewProps) => React.ReactNode>;
|
|
13
|
+
siderWidth?: number;
|
|
14
|
+
hasSiderMenu?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export interface GlobalHeaderProps extends Partial<PureSettings> {
|
|
17
|
+
collapsed?: boolean;
|
|
18
|
+
onCollapse?: (collapsed: boolean) => void;
|
|
19
|
+
isMobile?: boolean;
|
|
20
|
+
logo?: React.ReactNode;
|
|
21
|
+
menuRender?: WithFalse<(props: HeaderViewProps, defaultDom: React.ReactNode) => React.ReactNode>;
|
|
22
|
+
rightContentRender?: WithFalse<(props: HeaderViewProps & PrivateSiderMenuProps) => React.ReactNode>;
|
|
23
|
+
className?: string;
|
|
24
|
+
prefixCls?: string;
|
|
25
|
+
menuData?: MenuDataItem[];
|
|
26
|
+
onMenuHeaderClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
27
|
+
style?: React.CSSProperties;
|
|
28
|
+
menuHeaderRender?: SiderMenuProps['menuHeaderRender'];
|
|
29
|
+
collapsedButtonRender?: SiderMenuProps['collapsedButtonRender'];
|
|
30
|
+
splitMenus?: boolean;
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-header.js","sourceRoot":"","sources":["../../../src/interfaces/layout/global-header.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './base-menu';
|
|
2
|
+
export * from './global-header';
|
|
3
|
+
export * from './menu';
|
|
4
|
+
export * from './sider-menu';
|
|
5
|
+
export * from './global-footer';
|
|
6
|
+
export * from './page';
|
|
7
|
+
export * from './basic-layout';
|
|
8
|
+
export * from './breadcrum';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MenuTheme } from "../pure-settings";
|
|
3
|
+
import type { MenuProps as RcMenuProps } from 'rc-menu';
|
|
4
|
+
import type { MenuDividerType as RcMenuDividerType, MenuItemGroupType as RcMenuItemGroupType, MenuItemType as RcMenuItemType, SubMenuType as RcSubMenuType } from 'rc-menu/lib/interface';
|
|
5
|
+
export interface MenuItemType extends RcMenuItemType {
|
|
6
|
+
danger?: boolean;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
title?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SubMenuType extends Omit<RcSubMenuType, 'children'> {
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
theme?: 'dark' | 'light';
|
|
13
|
+
children: ItemType[];
|
|
14
|
+
}
|
|
15
|
+
export interface MenuItemGroupType extends Omit<RcMenuItemGroupType, 'children'> {
|
|
16
|
+
children?: ItemType[];
|
|
17
|
+
key?: React.Key;
|
|
18
|
+
}
|
|
19
|
+
export interface MenuDividerType extends RcMenuDividerType {
|
|
20
|
+
dashed?: boolean;
|
|
21
|
+
key?: React.Key;
|
|
22
|
+
}
|
|
23
|
+
export declare type ItemType = MenuItemType | SubMenuType | MenuItemGroupType | MenuDividerType | null;
|
|
24
|
+
export interface MenuProps extends Omit<RcMenuProps, 'items'> {
|
|
25
|
+
theme?: MenuTheme;
|
|
26
|
+
inlineIndent?: number;
|
|
27
|
+
/**
|
|
28
|
+
* @private Internal Usage. Not promise crash if used in production. Connect with chenshuai2144
|
|
29
|
+
* for removing.
|
|
30
|
+
*/
|
|
31
|
+
_internalDisableMenuItemTitleTooltip?: boolean;
|
|
32
|
+
items?: ItemType[];
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../../src/interfaces/layout/menu.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ProSettings } from "../pure-settings";
|
|
2
|
+
import { MenuDataItem } from "../typings";
|
|
3
|
+
export interface GetPageTitleProps {
|
|
4
|
+
pathname?: string;
|
|
5
|
+
breadcrumb?: {
|
|
6
|
+
[path: string]: MenuDataItem;
|
|
7
|
+
};
|
|
8
|
+
breadcrumbMap?: Map<string, MenuDataItem>;
|
|
9
|
+
menu?: ProSettings['menu'];
|
|
10
|
+
title?: ProSettings['title'];
|
|
11
|
+
pageName?: string;
|
|
12
|
+
formatMessage?: (data: {
|
|
13
|
+
id: any;
|
|
14
|
+
defaultMessage?: string;
|
|
15
|
+
}) => string;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/interfaces/layout/page.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WithFalse } from "../typings";
|
|
3
|
+
import { BaseMenuProps } from "./base-menu";
|
|
4
|
+
export declare type PrivateSiderMenuProps = {
|
|
5
|
+
matchMenuKeys: string[];
|
|
6
|
+
};
|
|
7
|
+
export interface SiderMenuProps extends Pick<BaseMenuProps, Exclude<keyof BaseMenuProps, ['onCollapse']>> {
|
|
8
|
+
logo?: React.ReactNode;
|
|
9
|
+
siderWidth?: number;
|
|
10
|
+
menuHeaderRender?: WithFalse<(logo: React.ReactNode, title: React.ReactNode, props?: SiderMenuProps) => React.ReactNode>;
|
|
11
|
+
menuFooterRender?: WithFalse<(props?: SiderMenuProps) => React.ReactNode>;
|
|
12
|
+
menuContentRender?: WithFalse<(props: SiderMenuProps, defaultDom: React.ReactNode) => React.ReactNode>;
|
|
13
|
+
menuExtraRender?: WithFalse<(props: SiderMenuProps) => React.ReactNode>;
|
|
14
|
+
collapsedButtonRender?: WithFalse<(collapsed?: boolean) => React.ReactNode>;
|
|
15
|
+
breakpoint?: SiderProps['breakpoint'] | false;
|
|
16
|
+
onMenuHeaderClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
17
|
+
hide?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
style?: any;
|
|
20
|
+
links?: React.ReactNode[];
|
|
21
|
+
onOpenChange?: (openKeys: WithFalse<string[]>) => void;
|
|
22
|
+
getContainer?: false;
|
|
23
|
+
}
|
|
24
|
+
declare type SiderTheme = 'light' | 'dark';
|
|
25
|
+
declare type CollapseType = 'clickTrigger' | 'responsive';
|
|
26
|
+
export interface SiderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
27
|
+
prefixCls?: string;
|
|
28
|
+
collapsible?: boolean;
|
|
29
|
+
collapsed?: boolean;
|
|
30
|
+
defaultCollapsed?: boolean;
|
|
31
|
+
reverseArrow?: boolean;
|
|
32
|
+
onCollapse?: (collapsed: boolean, type: CollapseType) => void;
|
|
33
|
+
zeroWidthTriggerStyle?: React.CSSProperties;
|
|
34
|
+
trigger?: React.ReactNode;
|
|
35
|
+
width?: number | string;
|
|
36
|
+
collapsedWidth?: number | string;
|
|
37
|
+
breakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
38
|
+
theme?: SiderTheme;
|
|
39
|
+
onBreakpoint?: (broken: boolean) => void;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sider-menu.js","sourceRoot":"","sources":["../../../src/interfaces/layout/sider-menu.ts"],"names":[],"mappings":""}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export declare type ContentWidth = 'Fluid' | 'Fixed';
|
|
2
2
|
export declare type MenuTheme = 'light' | 'dark';
|
|
3
3
|
export interface RenderSetting {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
searchBarRender?:
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
showHeader?: boolean | any;
|
|
5
|
+
showFooter?: boolean | any;
|
|
6
|
+
searchBarRender?: boolean | any;
|
|
7
|
+
showMenu?: boolean | any;
|
|
8
|
+
menuRender?: false | any;
|
|
9
|
+
menuHeaderRender?: false | any;
|
|
9
10
|
}
|
|
10
11
|
export interface PureSettings {
|
|
11
12
|
/**
|
|
@@ -60,7 +60,9 @@ export interface MenuDataItem {
|
|
|
60
60
|
[key: string]: any;
|
|
61
61
|
}
|
|
62
62
|
export interface Route extends MenuDataItem {
|
|
63
|
+
path: string;
|
|
63
64
|
routes?: Route[];
|
|
65
|
+
breadcrumbName: string;
|
|
64
66
|
}
|
|
65
67
|
export declare type WithFalse<T> = T | false;
|
|
66
68
|
export interface RouterTypes<P> extends Omit<BasicRouteProps, 'location'> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createSelector } from 'reselect';
|
|
2
2
|
import { BACKEND_ERROR } from '../../constants';
|
|
3
|
-
export const backendErrorSelector = createSelector((state) => state.applicationErrors, (applicationErrors) => applicationErrors.find((error) => error.type === BACKEND_ERROR));
|
|
3
|
+
export const backendErrorSelector = createSelector((state) => state.applicationErrors, (applicationErrors) => applicationErrors === null || applicationErrors === void 0 ? void 0 : applicationErrors.find((error) => error.type === BACKEND_ERROR));
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/redux/selectors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAO/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAChD,CAAC,KAAY,EAAE,EAAE,CAAC,KAAK,CAAC,iBAAiB,EACzC,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/redux/selectors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAO/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAChD,CAAC,KAAY,EAAE,EAAE,CAAC,KAAK,CAAC,iBAAiB,EACzC,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,aAAa,CAAC,CACxF,CAAA"}
|
package/lib/redux/settings.d.ts
CHANGED
|
@@ -21,10 +21,11 @@ declare const settingsReducer: (state: DefaultSettings | undefined, { type, payl
|
|
|
21
21
|
primaryColor?: string | undefined;
|
|
22
22
|
colorWeak?: boolean | undefined;
|
|
23
23
|
splitMenus?: boolean | undefined;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
searchBarRender?:
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
showHeader?: any;
|
|
25
|
+
showFooter?: any;
|
|
26
|
+
searchBarRender?: any;
|
|
27
|
+
showMenu?: any;
|
|
28
|
+
menuRender?: any;
|
|
29
|
+
menuHeaderRender?: any;
|
|
29
30
|
};
|
|
30
31
|
export { settingsReducer };
|
package/lib/redux/settings.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/* eslint-disable no-case-declarations */
|
|
3
3
|
import { CHANGE_SETTINGS_ACTION, CHANGE_LANGUAGE } from '../constants';
|
|
4
4
|
import { config } from '../config';
|
|
5
|
+
import { keys, pick } from 'lodash';
|
|
5
6
|
// Note: We customize reducer part as AntPro uses inbuild way.
|
|
6
7
|
const updateColorWeak = (colorWeak) => {
|
|
7
8
|
// @sri to avoid breaking during SSR, split into to checks
|
|
@@ -27,7 +28,7 @@ const settingsReducer = (state = config.LAYOUT_SETTINGS, { type, payload = {} })
|
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
updateColorWeak(!!colorWeak);
|
|
30
|
-
return Object.assign(Object.assign({}, state), payload);
|
|
31
|
+
return Object.assign(Object.assign({}, state), pick(payload, keys(config.LAYOUT_SETTINGS)));
|
|
31
32
|
case CHANGE_LANGUAGE:
|
|
32
33
|
return Object.assign(Object.assign({}, state), { language: payload });
|
|
33
34
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/redux/settings.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,yCAAyC;AACzC,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/redux/settings.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,yCAAyC;AACzC,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACpC,8DAA8D;AAC9D,MAAM,eAAe,GAAiC,CAAC,SAAS,EAAE,EAAE;IAChE,0DAA0D;IAC1D,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAI,EAAE;YACN,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;SACjD;KACJ;AACL,CAAC,CAAC;AACF,oCAAoC;AACpC,sBAAsB;AACtB,yBAAyB;AACzB,IAAI;AAIJ,MAAM,eAAe,GAAG,CACpB,KAAK,GAAG,MAAM,CAAC,eAAe,EAC9B,EAAE,IAAI,EAAE,OAAO,GAAG,EAAE,EAA8C,EACpE,EAAE;IACA,QAAQ,IAAI,EAAE;QACV,KAAK,sBAAsB;YACvB,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;YAC5C,0DAA0D;YAC1D,IAAI,KAAK,CAAC,YAAY,KAAK,YAAY,EAAE;gBACrC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;oBAC/B,MAAM,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;iBAC7C;aACJ;YACD,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC7B,uCACO,KAAK,GACL,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAChD;QACN,KAAK,eAAe;YAChB,uCACO,KAAK,KACR,QAAQ,EAAE,OAAO,IACnB;QAEN;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha.0",
|
|
4
4
|
"description": "Sample client for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"typescript": {
|
|
35
35
|
"definition": "lib/index.d.ts"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "9702667ead74e9de98d2b71a33447f2e20d0f28e"
|
|
38
38
|
}
|