beca-ui 3.0.0-beta.1 → 3.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beca-ui.js +34415 -34125
- package/dist/components/MainLayout/MainLayout.types.d.ts +1 -1
- package/dist/components/MainLayout/SideBarMenu/SideBarFooterToolbar.d.ts +29 -0
- package/dist/components/MainLayout/SideBarMenu/SideBarMenu.d.ts +2 -2
- package/dist/components/MainLayout/SideBarMenu/SideBarMenu.types.d.ts +23 -1
- package/dist/data/LocalesTexts/EnglishTexts.d.ts +13 -0
- package/dist/data/LocalesTexts/VietnameseTexts.d.ts +13 -0
- package/dist/hooks/LocaleHook.d.ts +13 -0
- package/dist/main.css +1 -1
- package/dist/theme/styles.d.ts +1 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { HeaderProps, NotificationRef } from "./Header";
|
|
|
4
4
|
import { SideBarMenuModel } from "../../models";
|
|
5
5
|
import { ThemeConfig } from "antd";
|
|
6
6
|
export type MainTheme = "Beca" | "Office" | "SHE";
|
|
7
|
-
export interface MainLayoutProps extends Omit<SideBarMenuProps, "sideBarMenus">, HeaderProps {
|
|
7
|
+
export interface MainLayoutProps extends Omit<SideBarMenuProps, "sideBarMenus" | keyof HeaderProps>, HeaderProps {
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
onChangeCollapse?: (collapsed: boolean) => void;
|
|
10
10
|
sideBarMenus: SideBarMenuModel[] | (() => SideBarMenuModel[]);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MenuItemType } from "../..";
|
|
3
|
+
import { PersonalProfileModel, SupportContactModel } from "../../../models";
|
|
4
|
+
import { ApplicationsCardItem } from "../../ApplicationsCard/ApplicationsCard.types";
|
|
5
|
+
import { NotiRef } from "../Header/Notification";
|
|
6
|
+
import { AppTheme, MainLayoutConfig, ThemeModel } from "../MainLayout.types";
|
|
7
|
+
import { NotificationProps, Theme } from "../Header/Header.types";
|
|
8
|
+
import { LANGUAGE } from "../../ConfigProvider";
|
|
9
|
+
export interface SideBarFooterToolbarProps {
|
|
10
|
+
collapsed: boolean;
|
|
11
|
+
isMobile: boolean;
|
|
12
|
+
config?: MainLayoutConfig;
|
|
13
|
+
notification?: NotificationProps;
|
|
14
|
+
personalProfile?: PersonalProfileModel;
|
|
15
|
+
profileMenuItems?: MenuItemType[];
|
|
16
|
+
isSwitchTheme?: boolean;
|
|
17
|
+
theme?: ThemeModel;
|
|
18
|
+
onSwitchedTheme?: (theme: Theme) => void;
|
|
19
|
+
onChangeTheme?: (theme: AppTheme) => Promise<void>;
|
|
20
|
+
supportContactData?: SupportContactModel[];
|
|
21
|
+
lang?: LANGUAGE;
|
|
22
|
+
onChangeLocale?: (lang: LANGUAGE) => void;
|
|
23
|
+
applicationsCardData?: ApplicationsCardItem[];
|
|
24
|
+
avatarUrl?: string;
|
|
25
|
+
avatarThumbnailUrl?: string;
|
|
26
|
+
LinkComponent?: any;
|
|
27
|
+
notiRef?: React.RefObject<NotiRef>;
|
|
28
|
+
}
|
|
29
|
+
export declare const SideBarFooterToolbar: React.FC<SideBarFooterToolbarProps>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { SideBarMenu2Props } from "./SideBarMenu.types";
|
|
2
|
+
import { SideBarMenu2Props, SideBarMenuRef } from "./SideBarMenu.types";
|
|
3
3
|
interface LinkProps {
|
|
4
4
|
LinkComponent: any;
|
|
5
5
|
to: string;
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
}
|
|
8
8
|
export declare const Link: (props: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export declare const SideBarMenu: React.
|
|
9
|
+
export declare const SideBarMenu: React.ForwardRefExoticComponent<SideBarMenu2Props & React.RefAttributes<SideBarMenuRef>>;
|
|
10
10
|
export {};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { SideBarMenuModel } from "../../../models";
|
|
2
|
+
import { PersonalProfileModel, SideBarMenuModel, SupportContactModel } from "../../../models";
|
|
3
|
+
import { ApplicationsCardItem } from "../../ApplicationsCard/ApplicationsCard.types";
|
|
4
|
+
import { MenuItemType } from "../../Menu";
|
|
5
|
+
import { NotificationProps, Theme } from "../Header/Header.types";
|
|
6
|
+
import { AppTheme, MainLayoutConfig, ThemeModel } from "../MainLayout.types";
|
|
7
|
+
import { LANGUAGE } from "../../ConfigProvider";
|
|
3
8
|
export interface SideBarMenuProps {
|
|
4
9
|
sideBarMenus: SideBarMenuModel[];
|
|
5
10
|
activeMenu?: string;
|
|
@@ -11,6 +16,20 @@ export interface SideBarMenuProps {
|
|
|
11
16
|
isShowCollapseButton?: boolean;
|
|
12
17
|
headerTitle?: string;
|
|
13
18
|
avatarUrl?: string;
|
|
19
|
+
avatarThumbnailUrl?: string;
|
|
20
|
+
config?: MainLayoutConfig;
|
|
21
|
+
notification?: NotificationProps;
|
|
22
|
+
personalProfile?: PersonalProfileModel;
|
|
23
|
+
profileMenuItems?: MenuItemType[];
|
|
24
|
+
isSwitchTheme?: boolean;
|
|
25
|
+
theme?: ThemeModel;
|
|
26
|
+
onSwitchedTheme?: (theme: Theme) => void;
|
|
27
|
+
onChangeTheme?: (theme: AppTheme) => Promise<void>;
|
|
28
|
+
supportContactData?: SupportContactModel[];
|
|
29
|
+
lang?: LANGUAGE;
|
|
30
|
+
onChangeLocale?: (lang: LANGUAGE) => void;
|
|
31
|
+
applicationsCardData?: ApplicationsCardItem[];
|
|
32
|
+
currentApp?: string;
|
|
14
33
|
}
|
|
15
34
|
export interface SideBarMenu2Props extends SideBarMenuProps {
|
|
16
35
|
collapsed: boolean;
|
|
@@ -27,3 +46,6 @@ export interface SideBarMenuItemProps {
|
|
|
27
46
|
icon: React.ReactNode;
|
|
28
47
|
label: string;
|
|
29
48
|
}
|
|
49
|
+
export interface SideBarMenuRef {
|
|
50
|
+
fetchNotifications?: (type?: any, isReload?: boolean) => void;
|
|
51
|
+
}
|
|
@@ -38,7 +38,20 @@ declare const _default: {
|
|
|
38
38
|
vietnamese: string;
|
|
39
39
|
default: string;
|
|
40
40
|
new: string;
|
|
41
|
+
classicTheme: string;
|
|
42
|
+
appSidebarTheme: string;
|
|
43
|
+
betaTheme: string;
|
|
44
|
+
version: string;
|
|
45
|
+
displaySettings: string;
|
|
46
|
+
reset: string;
|
|
47
|
+
betaWarning: string;
|
|
41
48
|
primaryColor: string;
|
|
49
|
+
primaryColorDesc1: string;
|
|
50
|
+
primaryColorDesc2: string;
|
|
51
|
+
primaryColorDesc3: string;
|
|
52
|
+
primaryColorDesc4: string;
|
|
53
|
+
primaryColorDesc5: string;
|
|
54
|
+
primaryColorDesc6: string;
|
|
42
55
|
save: string;
|
|
43
56
|
edit: string;
|
|
44
57
|
more: string;
|
|
@@ -38,7 +38,20 @@ declare const _default: {
|
|
|
38
38
|
vietnamese: string;
|
|
39
39
|
default: string;
|
|
40
40
|
new: string;
|
|
41
|
+
classicTheme: string;
|
|
42
|
+
appSidebarTheme: string;
|
|
43
|
+
betaTheme: string;
|
|
44
|
+
version: string;
|
|
45
|
+
displaySettings: string;
|
|
46
|
+
reset: string;
|
|
47
|
+
betaWarning: string;
|
|
41
48
|
primaryColor: string;
|
|
49
|
+
primaryColorDesc1: string;
|
|
50
|
+
primaryColorDesc2: string;
|
|
51
|
+
primaryColorDesc3: string;
|
|
52
|
+
primaryColorDesc4: string;
|
|
53
|
+
primaryColorDesc5: string;
|
|
54
|
+
primaryColorDesc6: string;
|
|
42
55
|
save: string;
|
|
43
56
|
edit: string;
|
|
44
57
|
more: string;
|
|
@@ -40,7 +40,20 @@ export declare function useTranslation(): {
|
|
|
40
40
|
vietnamese: string;
|
|
41
41
|
default: string;
|
|
42
42
|
new: string;
|
|
43
|
+
classicTheme: string;
|
|
44
|
+
appSidebarTheme: string;
|
|
45
|
+
betaTheme: string;
|
|
46
|
+
version: string;
|
|
47
|
+
displaySettings: string;
|
|
48
|
+
reset: string;
|
|
49
|
+
betaWarning: string;
|
|
43
50
|
primaryColor: string;
|
|
51
|
+
primaryColorDesc1: string;
|
|
52
|
+
primaryColorDesc2: string;
|
|
53
|
+
primaryColorDesc3: string;
|
|
54
|
+
primaryColorDesc4: string;
|
|
55
|
+
primaryColorDesc5: string;
|
|
56
|
+
primaryColorDesc6: string;
|
|
44
57
|
save: string;
|
|
45
58
|
edit: string;
|
|
46
59
|
more: string;
|