beca-ui 2.1.0-beta.9 → 2.1.0-beta.91

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.
Files changed (29) hide show
  1. package/dist/DynamicWorkflowScript.js +0 -1
  2. package/dist/assets/locales/en.json.d.ts +7 -1
  3. package/dist/assets/locales/vi.json.d.ts +7 -1
  4. package/dist/beca-ui.js +57362 -49579
  5. package/dist/components/Anchor/Anchor.types.d.ts +2 -3
  6. package/dist/components/Anchor/index.d.ts +1 -2
  7. package/dist/components/ApplicationsCard/ApplicationsCard.types.d.ts +16 -7
  8. package/dist/components/Carousel/Carousel.d.ts +2 -0
  9. package/dist/components/Carousel/Carousel.types.d.ts +3 -0
  10. package/dist/components/Carousel/index.d.ts +3 -0
  11. package/dist/components/Checkbox/index.d.ts +1 -2
  12. package/dist/components/Form/Form.types.d.ts +2 -2
  13. package/dist/components/List/List.d.ts +3 -1
  14. package/dist/components/MainLayout/AppMenu/AppMenu.d.ts +4 -0
  15. package/dist/components/MainLayout/Header/Header.types.d.ts +20 -4
  16. package/dist/components/MainLayout/MainLayout.d.ts +3 -1
  17. package/dist/components/MainLayout/MainLayout.types.d.ts +65 -21
  18. package/dist/components/MainLayout/SideBarMenu/SideBarMenu.types.d.ts +2 -0
  19. package/dist/components/Pagination/Pagination.d.ts +1 -1
  20. package/dist/components/Space/Space.d.ts +2 -3
  21. package/dist/components/Space/Space.types.d.ts +3 -3
  22. package/dist/components/Space/index.d.ts +2 -3
  23. package/dist/components/VirtualList/VirtualList.types.d.ts +1 -0
  24. package/dist/components/index.d.ts +1 -0
  25. package/dist/data/LocalesTexts/EnglishTexts.d.ts +11 -0
  26. package/dist/data/LocalesTexts/VietnameseTexts.d.ts +11 -0
  27. package/dist/hooks/LocaleHook.d.ts +11 -0
  28. package/dist/main.css +1 -1
  29. package/package.json +51 -50
@@ -1,3 +1,2 @@
1
- import { AnchorProps as AntAnchorProps } from "antd";
2
- export interface AnchorProps extends AntAnchorProps {
3
- }
1
+ import { AnchorProps } from "antd";
2
+ export type { AnchorProps };
@@ -1,3 +1,2 @@
1
- import { AnchorProps } from "./Anchor.types";
2
1
  export { default as Anchor } from "./Anchor";
3
- export type { AnchorProps };
2
+ export * from "./Anchor.types";
@@ -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,22 @@ export interface ApplicationsCardProps {
7
6
  lang: LANGUAGE;
8
7
  }
9
8
  export interface ApplicationsCardItem {
10
- appId?: string;
11
- id: string;
9
+ href: string;
10
+ appId?: string | null;
11
+ image: string;
12
12
  name: string;
13
- image: string | React.ReactNode;
14
- href?: string;
15
- iconBackgroundColor?: string;
13
+ workflowCode: string;
14
+ createdTime: string;
15
+ nameEng?: string | null;
16
16
  order?: number;
17
- nameEng?: string;
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;
26
+ Id?: number;
18
27
  }
@@ -0,0 +1,2 @@
1
+ import { Carousel } from "antd";
2
+ export default Carousel;
@@ -0,0 +1,3 @@
1
+ import { CarouselProps as AntCarouselProps } from "antd";
2
+ export interface CarouselProps extends AntCarouselProps {
3
+ }
@@ -0,0 +1,3 @@
1
+ import { CarouselProps } from "./Carousel.types";
2
+ export { default as Carousel } from "./Carousel";
3
+ export type { CarouselProps };
@@ -1,3 +1,2 @@
1
- import { CheckboxChangeEvent, CheckboxProps, CheckboxGroupProps } from "./Checkbox.types";
2
1
  export { default as Checkbox } from "./Checkbox";
3
- export type { CheckboxChangeEvent, CheckboxProps, CheckboxGroupProps };
2
+ export * from "./Checkbox.types";
@@ -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,8 +1,10 @@
1
1
  import React from "react";
2
2
  import { ListItemMetaProps, ListItemProps, ListProps } from ".";
3
- declare const List: React.FunctionComponent<ListProps<any>> & {
3
+ type ListComponent = {
4
+ <T = any>(props: ListProps<T>): React.ReactElement;
4
5
  Item: React.FunctionComponent<ListItemProps> & {
5
6
  Meta: React.FunctionComponent<ListItemMetaProps>;
6
7
  };
7
8
  };
9
+ declare const List: ListComponent;
8
10
  export default List;
@@ -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
- onChangeTheme: (theme: any) => void;
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,83 @@ 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
- export interface MainLayoutConfig {
25
- header?: {
26
- theme?: {
27
- visible?: boolean;
28
- };
29
- notification?: {
30
- visible: boolean;
31
- };
32
- language?: {
33
- visible?: boolean;
34
- };
35
- app?: {
36
- visible?: boolean;
37
- };
38
- support?: {
39
- visible: boolean;
40
- };
41
- profile?: {
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
+ export declare const BECA_MODULES: string[];
73
+ interface SettingLayoutConfigFunction {
74
+ workflow: any;
75
+ homePage: any;
76
+ mail: any;
77
+ calendar: any;
78
+ work: any;
79
+ library: any;
80
+ documentary: any;
81
+ contact: any;
82
+ social: any;
83
+ chat: any;
84
+ crm: any;
85
+ eam: any;
86
+ fsm: any;
87
+ }
88
+ export interface SettingLayoutConfigType {
89
+ layout: string;
90
+ css?: string;
91
+ hiddenMenu: HiddenMenu[];
92
+ customMenu: CustomMenu[];
93
+ defaultWorkflowPriority: string;
94
+ mainTheme: MainTheme;
95
+ functions: Partial<SettingLayoutConfigFunction>;
96
+ }
97
+ export declare const DEFAULT_SETTING_LAYOUT_CONFIG: SettingLayoutConfigType;
@@ -8,6 +8,8 @@ export interface SideBarMenuProps {
8
8
  isMobile: boolean;
9
9
  homePageUrl: string;
10
10
  showLargeMenu?: boolean;
11
+ isShowCollapseButton?: boolean;
12
+ headerTitle?: string;
11
13
  }
12
14
  export interface SideBarMenu2Props extends SideBarMenuProps {
13
15
  collapsed: boolean;
@@ -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 | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
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,2 @@
1
- import React from "react";
2
- import { SpaceProps } from ".";
3
- export declare const Space: React.FunctionComponent<SpaceProps>;
1
+ import { Space } from "antd";
2
+ export default Space;
@@ -1,3 +1,3 @@
1
- import { SpaceProps as AntSpaceProps } from "antd";
2
- export interface SpaceProps extends AntSpaceProps {
3
- }
1
+ import { SpaceProps } from "antd";
2
+ import { SpaceSize } from "antd/es/space";
3
+ export type { SpaceProps, SpaceSize };
@@ -1,3 +1,2 @@
1
- import { SpaceProps } from "./Space.types";
2
- export * from "./Space";
3
- export type { SpaceProps };
1
+ export { default as Space } from "./Space";
2
+ export * from "./Space.types";
@@ -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;
@@ -33,6 +33,7 @@ export * from "./Tooltip";
33
33
  export * from "./Content";
34
34
  export * from "./DatePicker";
35
35
  export * from "./TimePicker";
36
+ export * from "./Carousel";
36
37
  export * from "./Upload";
37
38
  export * from "./Space";
38
39
  export * from "./Skeleton";
@@ -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 {};