beca-ui 2.1.0-beta.8 → 2.1.0-beta.80
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/DynamicWorkflowScript.js +0 -1
- package/dist/assets/locales/en.json.d.ts +7 -1
- package/dist/assets/locales/vi.json.d.ts +7 -1
- package/dist/beca-ui.js +57341 -49578
- package/dist/components/Anchor/Anchor.types.d.ts +2 -3
- package/dist/components/Anchor/index.d.ts +1 -2
- package/dist/components/ApplicationsCard/ApplicationsCard.types.d.ts +15 -7
- package/dist/components/Carousel/Carousel.d.ts +2 -0
- package/dist/components/Carousel/Carousel.types.d.ts +3 -0
- package/dist/components/Carousel/index.d.ts +3 -0
- package/dist/components/Checkbox/index.d.ts +1 -2
- package/dist/components/Form/Form.types.d.ts +2 -2
- package/dist/components/MainLayout/AppMenu/AppMenu.d.ts +4 -0
- package/dist/components/MainLayout/Header/Header.types.d.ts +20 -4
- package/dist/components/MainLayout/MainLayout.d.ts +3 -1
- package/dist/components/MainLayout/MainLayout.types.d.ts +64 -21
- package/dist/components/MainLayout/SideBarMenu/SideBarMenu.types.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Space/Space.types.d.ts +3 -3
- package/dist/components/Space/index.d.ts +1 -2
- package/dist/components/VirtualList/VirtualList.types.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/data/LocalesTexts/EnglishTexts.d.ts +11 -0
- package/dist/data/LocalesTexts/VietnameseTexts.d.ts +11 -0
- package/dist/hooks/LocaleHook.d.ts +11 -0
- package/dist/main.css +1 -1
- package/package.json +51 -50
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { AnchorProps
|
|
2
|
-
export
|
|
3
|
-
}
|
|
1
|
+
import { AnchorProps } from "antd";
|
|
2
|
+
export type { AnchorProps };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { LANGUAGE } from "..";
|
|
3
2
|
export interface ApplicationsCardProps {
|
|
4
3
|
applicationsCardData: ApplicationsCardItem[];
|
|
@@ -7,12 +6,21 @@ export interface ApplicationsCardProps {
|
|
|
7
6
|
lang: LANGUAGE;
|
|
8
7
|
}
|
|
9
8
|
export interface ApplicationsCardItem {
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
href: string;
|
|
10
|
+
appId?: string | null;
|
|
11
|
+
image: string;
|
|
12
12
|
name: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
workflowCode: string;
|
|
14
|
+
createdTime: string;
|
|
15
|
+
nameEng?: string | null;
|
|
16
16
|
order?: number;
|
|
17
|
-
|
|
17
|
+
iconBackgroundColor?: string;
|
|
18
|
+
image2: string;
|
|
19
|
+
Status: string;
|
|
20
|
+
WorkflowCode: string;
|
|
21
|
+
WorkflowTitle: string;
|
|
22
|
+
Approver: string;
|
|
23
|
+
UserStatus: number;
|
|
24
|
+
ApprovedTime: string;
|
|
25
|
+
id: number;
|
|
18
26
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FormProps as AntFormProps, FormItemProps, FormInstance, FormListFieldData } from "antd";
|
|
1
|
+
import { FormProps as AntFormProps, FormItemProps, FormInstance, FormListFieldData, FormRule } from "antd";
|
|
2
2
|
export interface FormProps extends AntFormProps {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
}
|
|
5
|
-
export type { FormInstance, FormListFieldData, FormItemProps };
|
|
5
|
+
export type { FormInstance, FormListFieldData, FormItemProps, FormRule };
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { ApplicationsCardItem } from "../../ApplicationsCard";
|
|
2
|
+
import { LANGUAGE } from "../../../components";
|
|
2
3
|
interface AppMenuProps {
|
|
3
4
|
logoUrl: string;
|
|
4
5
|
applicationsCardData: ApplicationsCardItem[];
|
|
5
6
|
currentApp: string;
|
|
6
7
|
totalDisplay?: number;
|
|
8
|
+
userTheme?: string;
|
|
9
|
+
onChangeTheme: (theme: string) => Promise<void>;
|
|
10
|
+
lang: LANGUAGE;
|
|
7
11
|
}
|
|
8
12
|
export declare const AppMenu: (props: AppMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
13
|
export {};
|
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { PersonalProfileModel, SupportContactModel } from "../../../models";
|
|
3
|
-
import { ApplicationsCardProps } from "../../ApplicationsCard";
|
|
3
|
+
import { ApplicationsCardItem, ApplicationsCardProps } from "../../ApplicationsCard";
|
|
4
4
|
import { MenuItemType } from "../../Menu";
|
|
5
5
|
import { LANGUAGE } from "../../ConfigProvider";
|
|
6
6
|
import { MainLayoutConfig } from "../MainLayout.types";
|
|
7
7
|
export type NotiType = "All" | "Unseen";
|
|
8
8
|
export type NotiStatus = "Read" | "Unread";
|
|
9
9
|
export type Theme = "Light" | "Dark";
|
|
10
|
+
export interface AppTheme {
|
|
11
|
+
fontFamily?: string;
|
|
12
|
+
primaryColor1?: string;
|
|
13
|
+
primaryColor2?: string;
|
|
14
|
+
primaryColor3?: string;
|
|
15
|
+
primaryColor4?: string;
|
|
16
|
+
primaryColor5?: string;
|
|
17
|
+
primaryColor6?: string;
|
|
18
|
+
theme?: "default" | "new";
|
|
19
|
+
appMenu?: {
|
|
20
|
+
items: ApplicationsCardItem[];
|
|
21
|
+
totalDisplay?: number;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
10
24
|
export interface ExtraHeaderProps {
|
|
11
|
-
|
|
25
|
+
appTheme?: string;
|
|
26
|
+
onChangeTheme?: (theme: AppTheme) => Promise<void>;
|
|
12
27
|
}
|
|
13
28
|
export interface HeaderProps extends ApplicationsCardProps {
|
|
14
29
|
logoUrl: string;
|
|
@@ -17,8 +32,6 @@ export interface HeaderProps extends ApplicationsCardProps {
|
|
|
17
32
|
avatarUrl?: string;
|
|
18
33
|
avatarThumbnailUrl?: string;
|
|
19
34
|
isMobile: boolean;
|
|
20
|
-
isShowCollapseButton?: boolean;
|
|
21
|
-
headerTitle?: string;
|
|
22
35
|
profileMenuItems?: MenuItemType[];
|
|
23
36
|
homePageUrl: string;
|
|
24
37
|
customHeader?: React.ReactNode;
|
|
@@ -33,6 +46,8 @@ export interface HeaderProps extends ApplicationsCardProps {
|
|
|
33
46
|
scrolled?: boolean;
|
|
34
47
|
personalProfile: PersonalProfileModel;
|
|
35
48
|
config?: MainLayoutConfig;
|
|
49
|
+
isShowCollapseButton?: boolean;
|
|
50
|
+
headerTitle?: string;
|
|
36
51
|
}
|
|
37
52
|
export type ThemeModel = {
|
|
38
53
|
getApi?: string;
|
|
@@ -50,6 +65,7 @@ export interface NotificationType {
|
|
|
50
65
|
onLoadData: (type: NotiType, page: number, pageSize: number) => Promise<void>;
|
|
51
66
|
totalNumber: number;
|
|
52
67
|
unseenTotal: number;
|
|
68
|
+
defaultIconUrl?: string;
|
|
53
69
|
}
|
|
54
70
|
export interface NotificationProps extends NotificationType {
|
|
55
71
|
visible?: boolean;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { MainLayoutConfig, MainLayoutProps } from ".";
|
|
2
|
-
import { MainTheme, UserConfig } from "../../main";
|
|
2
|
+
import { AppTheme, MainTheme, UserConfig } from "../../main";
|
|
3
3
|
interface AppContextProps {
|
|
4
4
|
LinkComponent?: any;
|
|
5
5
|
mainLayoutConfig: MainLayoutConfig;
|
|
6
6
|
userConfig: UserConfig;
|
|
7
7
|
mainTheme?: MainTheme;
|
|
8
8
|
isHomeApp?: boolean;
|
|
9
|
+
appTheme?: AppTheme;
|
|
9
10
|
}
|
|
10
11
|
export declare const AppContext: import("react").Context<AppContextProps>;
|
|
12
|
+
export declare const DefaultAppTheme: AppTheme;
|
|
11
13
|
export declare const MainLayout: import("react").ForwardRefExoticComponent<MainLayoutProps & import("react").RefAttributes<import("./MainLayout.types").NotificationRef>>;
|
|
12
14
|
export {};
|
|
@@ -15,39 +15,82 @@ export interface MainLayoutProps extends Omit<SideBarMenuProps, "sideBarMenus">,
|
|
|
15
15
|
mainTheme?: MainTheme;
|
|
16
16
|
isHomeApp?: boolean;
|
|
17
17
|
appMenuTotalDisplay?: number;
|
|
18
|
+
appTheme: {
|
|
19
|
+
userTheme: string | undefined;
|
|
20
|
+
adminTheme: string | undefined;
|
|
21
|
+
onChangeTheme: (theme: string) => Promise<void>;
|
|
22
|
+
};
|
|
18
23
|
}
|
|
19
24
|
export interface UserConfig {
|
|
20
25
|
showEventTheme?: boolean;
|
|
21
26
|
}
|
|
22
27
|
export * from "./Header/Header.types";
|
|
23
28
|
export type MainLayoutRef = NotificationRef;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
interface MainLayoutHeaderConfig {
|
|
30
|
+
chat?: {
|
|
31
|
+
visible?: boolean;
|
|
32
|
+
};
|
|
33
|
+
theme?: {
|
|
34
|
+
visible?: boolean;
|
|
35
|
+
};
|
|
36
|
+
notification?: {
|
|
37
|
+
visible: boolean;
|
|
38
|
+
};
|
|
39
|
+
language?: {
|
|
40
|
+
visible?: boolean;
|
|
41
|
+
};
|
|
42
|
+
app?: {
|
|
43
|
+
visible?: boolean;
|
|
44
|
+
};
|
|
45
|
+
support?: {
|
|
46
|
+
visible: boolean;
|
|
47
|
+
};
|
|
48
|
+
profile?: {
|
|
49
|
+
visible?: boolean;
|
|
50
|
+
customizeTheme?: {
|
|
42
51
|
visible?: boolean;
|
|
43
|
-
customizeTheme?: {
|
|
44
|
-
visible?: boolean;
|
|
45
|
-
};
|
|
46
52
|
};
|
|
47
53
|
};
|
|
54
|
+
}
|
|
55
|
+
export interface MainLayoutConfig {
|
|
56
|
+
header?: MainLayoutHeaderConfig;
|
|
48
57
|
layout?: {
|
|
49
58
|
showEventTheme?: boolean;
|
|
50
59
|
};
|
|
51
60
|
}
|
|
52
61
|
export declare const DEFAULT_MAIN_LAYOUT_CONFIG: MainLayoutConfig;
|
|
53
62
|
export declare const DEFAULT_USER_CONFIG: UserConfig;
|
|
63
|
+
interface HiddenMenu {
|
|
64
|
+
path: string;
|
|
65
|
+
}
|
|
66
|
+
interface CustomMenu {
|
|
67
|
+
path: string;
|
|
68
|
+
replaceUrl?: string;
|
|
69
|
+
label?: string;
|
|
70
|
+
labelEN?: string;
|
|
71
|
+
}
|
|
72
|
+
interface SettingLayoutConfigFunction {
|
|
73
|
+
workflow: any;
|
|
74
|
+
homePage: any;
|
|
75
|
+
mail: any;
|
|
76
|
+
calendar: any;
|
|
77
|
+
work: any;
|
|
78
|
+
library: any;
|
|
79
|
+
documentary: any;
|
|
80
|
+
contact: any;
|
|
81
|
+
social: any;
|
|
82
|
+
chat: any;
|
|
83
|
+
crm: any;
|
|
84
|
+
eam: any;
|
|
85
|
+
fsm: any;
|
|
86
|
+
}
|
|
87
|
+
export interface SettingLayoutConfigType {
|
|
88
|
+
layout: string;
|
|
89
|
+
css?: string;
|
|
90
|
+
hiddenMenu: HiddenMenu[];
|
|
91
|
+
customMenu: CustomMenu[];
|
|
92
|
+
defaultWorkflowPriority: string;
|
|
93
|
+
mainTheme: MainTheme;
|
|
94
|
+
functions: Partial<SettingLayoutConfigFunction>;
|
|
95
|
+
}
|
|
96
|
+
export declare const DEFAULT_SETTING_LAYOUT_CONFIG: SettingLayoutConfigType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { PaginationProps } from ".";
|
|
3
|
-
export declare const paginationItemRender: (page: number, type: "page" | "prev" | "next" | "jump-prev" | "jump-next", originalElement: React.ReactNode, size?: "default" | "small" | undefined) => string | number | boolean |
|
|
3
|
+
export declare const paginationItemRender: (page: number, type: "page" | "prev" | "next" | "jump-prev" | "jump-next", originalElement: React.ReactNode, size?: "default" | "small" | undefined) => string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | null | undefined;
|
|
4
4
|
export declare const Pagination: React.FunctionComponent<PaginationProps>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SpaceProps
|
|
2
|
-
|
|
3
|
-
}
|
|
1
|
+
import { SpaceProps } from "antd";
|
|
2
|
+
import { SpaceSize } from "antd/es/space";
|
|
3
|
+
export type { SpaceProps, SpaceSize };
|
|
@@ -29,6 +29,7 @@ export interface VirtualListProps<T = any> extends React.DetailedHTMLProps<React
|
|
|
29
29
|
bottom: number;
|
|
30
30
|
} | undefined;
|
|
31
31
|
totalListHeightChanged?: ((height: number) => void) | undefined;
|
|
32
|
+
reversed?: boolean;
|
|
32
33
|
}
|
|
33
34
|
export interface VirtualListRef {
|
|
34
35
|
scrollToIndex: (index: number) => void;
|
|
@@ -12,6 +12,7 @@ declare const _default: {
|
|
|
12
12
|
justify: string;
|
|
13
13
|
customTheme: string;
|
|
14
14
|
font: string;
|
|
15
|
+
theme: string;
|
|
15
16
|
enterLink: string;
|
|
16
17
|
enterImageLink: string;
|
|
17
18
|
pasteWithTextStylesConfirm: string;
|
|
@@ -34,5 +35,15 @@ declare const _default: {
|
|
|
34
35
|
lightMode: string;
|
|
35
36
|
english: string;
|
|
36
37
|
vietnamese: string;
|
|
38
|
+
default: string;
|
|
39
|
+
new: string;
|
|
40
|
+
primaryColor: string;
|
|
41
|
+
save: string;
|
|
42
|
+
edit: string;
|
|
43
|
+
more: string;
|
|
44
|
+
customAppMenu: string;
|
|
45
|
+
totalDisplay: string;
|
|
46
|
+
sortAppMenuItems: string;
|
|
47
|
+
custom: string;
|
|
37
48
|
};
|
|
38
49
|
export default _default;
|
|
@@ -12,6 +12,7 @@ declare const _default: {
|
|
|
12
12
|
justify: string;
|
|
13
13
|
customTheme: string;
|
|
14
14
|
font: string;
|
|
15
|
+
theme: string;
|
|
15
16
|
enterLink: string;
|
|
16
17
|
enterImageLink: string;
|
|
17
18
|
pasteWithTextStylesConfirm: string;
|
|
@@ -34,5 +35,15 @@ declare const _default: {
|
|
|
34
35
|
lightMode: string;
|
|
35
36
|
english: string;
|
|
36
37
|
vietnamese: string;
|
|
38
|
+
default: string;
|
|
39
|
+
new: string;
|
|
40
|
+
primaryColor: string;
|
|
41
|
+
save: string;
|
|
42
|
+
edit: string;
|
|
43
|
+
more: string;
|
|
44
|
+
customAppMenu: string;
|
|
45
|
+
totalDisplay: string;
|
|
46
|
+
sortAppMenuItems: string;
|
|
47
|
+
custom: string;
|
|
37
48
|
};
|
|
38
49
|
export default _default;
|
|
@@ -14,6 +14,7 @@ export declare function useTranslation(): {
|
|
|
14
14
|
justify: string;
|
|
15
15
|
customTheme: string;
|
|
16
16
|
font: string;
|
|
17
|
+
theme: string;
|
|
17
18
|
enterLink: string;
|
|
18
19
|
enterImageLink: string;
|
|
19
20
|
pasteWithTextStylesConfirm: string;
|
|
@@ -36,5 +37,15 @@ export declare function useTranslation(): {
|
|
|
36
37
|
lightMode: string;
|
|
37
38
|
english: string;
|
|
38
39
|
vietnamese: string;
|
|
40
|
+
default: string;
|
|
41
|
+
new: string;
|
|
42
|
+
primaryColor: string;
|
|
43
|
+
save: string;
|
|
44
|
+
edit: string;
|
|
45
|
+
more: string;
|
|
46
|
+
customAppMenu: string;
|
|
47
|
+
totalDisplay: string;
|
|
48
|
+
sortAppMenuItems: string;
|
|
49
|
+
custom: string;
|
|
39
50
|
};
|
|
40
51
|
export {};
|