beca-ui 2.0.19-beta.9 → 2.0.19-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 (79) hide show
  1. package/dist/ConvertVietnameseNumber.js +136 -0
  2. package/dist/DynamicWorkflowScript.js +1142 -0
  3. package/dist/beca-ui.js +146792 -117190
  4. package/dist/components/Button/Button.types.d.ts +8 -4
  5. package/dist/components/Button/index.d.ts +1 -2
  6. package/dist/components/Layout/Layout.d.ts +1 -10
  7. package/dist/components/Layout/index.d.ts +1 -0
  8. package/dist/components/MainLayout/Header/Header.d.ts +2 -2
  9. package/dist/components/MainLayout/Header/Header.types.d.ts +3 -3
  10. package/dist/components/MainLayout/MainLayout.types.d.ts +3 -3
  11. package/dist/components/MainLayout/SideBarMenu/SideBarMenu.types.d.ts +2 -2
  12. package/dist/components/Menu/Menu.types.d.ts +2 -2
  13. package/dist/components/Menu/index.d.ts +1 -2
  14. package/dist/components/Pagination/Pagination.d.ts +1 -1
  15. package/dist/components/ScrollView/ScrollView.types.d.ts +2 -15
  16. package/dist/components/Select/index.d.ts +2 -2
  17. package/dist/components/WorkflowForm/WorkflowForm.types.d.ts +3 -1
  18. package/dist/components/WorkflowForm/components/AddRelatedWorkModal.d.ts +13 -0
  19. package/dist/components/WorkflowForm/components/DynamicAttachTable/DynamicAttachTable.d.ts +1 -1
  20. package/dist/components/{BecaCard → WorkflowForm/components/DynamicAttachTable/components}/BecaCard.d.ts +1 -1
  21. package/dist/components/{BecaCard → WorkflowForm/components/DynamicAttachTable/components}/BecaCard.types.d.ts +1 -1
  22. package/dist/components/WorkflowForm/components/NewUserWorkflow/ProcessModal.d.ts +25 -0
  23. package/dist/components/WorkflowForm/components/ProcessSection/ProcessDetailModal.d.ts +13 -0
  24. package/dist/components/WorkflowForm/components/ProcessSection/ProcessSection.d.ts +12 -0
  25. package/dist/components/WorkflowForm/components/ProcessStepItem.d.ts +16 -0
  26. package/dist/components/WorkflowForm/components/RelatedUserWorkflowSection.d.ts +13 -0
  27. package/dist/components/WorkflowForm/components/UserWorkflowShare/AddUserWorkflowShareModal.d.ts +10 -0
  28. package/dist/components/WorkflowForm/components/UserWorkflowShare/UpdateUserWorkflowShareModal.d.ts +8 -0
  29. package/dist/components/WorkflowForm/deviceHooks.d.ts +2 -1
  30. package/dist/components/WorkflowForm/extensions/image-extensions.json.d.ts +125 -0
  31. package/dist/components/WorkflowForm/extensions/video-extensions.json.d.ts +4 -0
  32. package/dist/components/WorkflowForm/hooks/processHooks.d.ts +15 -0
  33. package/dist/components/WorkflowForm/models/AddUserWorkflowShareModel.d.ts +1 -1
  34. package/dist/components/WorkflowForm/models/UserWorkflowModel.d.ts +1 -1
  35. package/dist/components/WorkflowForm/models/UserWorkflowShareModel.d.ts +1 -1
  36. package/dist/components/WorkflowForm/models/WorkflowStepModel.d.ts +7 -2
  37. package/dist/components/WorkflowForm/models/flowModels/FlowModel.d.ts +6 -0
  38. package/dist/components/WorkflowForm/models/flowModels/InitialDataModel.d.ts +3 -0
  39. package/dist/components/WorkflowForm/models/flowModels/{IInitialEdgeModel.d.ts → InitialEdgeModel.d.ts} +1 -1
  40. package/dist/components/WorkflowForm/models/flowModels/InitialNodeModels.d.ts +14 -0
  41. package/dist/components/WorkflowForm/models/flowModels/InitialPositionModel.d.ts +4 -0
  42. package/dist/components/WorkflowForm/models/flowModels/{IInitialStyleModel.d.ts → InitialStyleModel.d.ts} +1 -1
  43. package/dist/components/WorkflowForm/models/ui/index.d.ts +1 -1
  44. package/dist/components/WorkflowForm/services/{DataServices.d.ts → DataServices2.d.ts} +2 -2
  45. package/dist/components/WorkflowForm/services/PermissionService.d.ts +6 -0
  46. package/dist/components/WorkflowForm/services/SendWorkflowService.d.ts +1 -1
  47. package/dist/components/WorkflowForm/services/UserCheckListService.d.ts +1 -1
  48. package/dist/components/WorkflowForm/services/UserWorkflowService.d.ts +1 -1
  49. package/dist/components/WorkflowForm/services/UserWorkflowShareService.d.ts +15 -0
  50. package/dist/components/WorkflowForm/services/WorkflowService.d.ts +67 -0
  51. package/dist/components/WorkflowForm/services/index.d.ts +22 -0
  52. package/dist/components/WorkflowForm/utils/index.d.ts +0 -4
  53. package/dist/components/index.d.ts +1 -1
  54. package/dist/data/LocalesTexts/EnglishTexts.d.ts +4 -0
  55. package/dist/data/LocalesTexts/VietnameseTexts.d.ts +4 -0
  56. package/dist/data/SideBarMenu.d.ts +2 -2
  57. package/dist/hooks/ApiHooks.d.ts +23 -0
  58. package/dist/hooks/LocaleHook.d.ts +4 -0
  59. package/dist/hooks/WorkflowHooks.d.ts +49 -0
  60. package/dist/hooks/index.d.ts +3 -0
  61. package/dist/main.css +1 -1
  62. package/dist/models/Core/Result.d.ts +1 -1
  63. package/dist/models/Layout/{IMenuModel.d.ts → MenuModel.d.ts} +3 -3
  64. package/dist/models/Layout/SideBarMenuModel.d.ts +5 -0
  65. package/dist/models/Layout/index.d.ts +2 -2
  66. package/dist/models/{IPersonalProfileModel.d.ts → PersonalProfileModel.d.ts} +1 -1
  67. package/dist/models/SupportContactModel.d.ts +8 -0
  68. package/dist/models/index.d.ts +2 -2
  69. package/dist/services/LayoutService.d.ts +4 -4
  70. package/dist/theme/styles.d.ts +2 -1
  71. package/package.json +32 -29
  72. package/dist/components/BecaCard/index.d.ts +0 -2
  73. package/dist/components/WorkflowForm/models/flowModels/IFlowModel.d.ts +0 -6
  74. package/dist/components/WorkflowForm/models/flowModels/IInitialDataModel.d.ts +0 -3
  75. package/dist/components/WorkflowForm/models/flowModels/IInitialNodeModels.d.ts +0 -14
  76. package/dist/components/WorkflowForm/models/flowModels/IInitialPositionModel.d.ts +0 -4
  77. package/dist/models/ISupportContactModel.d.ts +0 -8
  78. package/dist/models/Layout/ISideBarMenuModel.d.ts +0 -5
  79. /package/dist/{theme → components/WorkflowForm/theme}/Colors.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- export default class Result<T> {
1
+ export default class Result<T = any> {
2
2
  value: T;
3
3
  errors: any[];
4
4
  get success(): boolean;
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
- export interface IMenuModel extends IMenuChildModel {
3
- children?: IMenuChildModel[];
2
+ export interface MenuModel extends MenuChildModel {
3
+ children?: MenuChildModel[];
4
4
  }
5
- export interface IMenuChildModel {
5
+ export interface MenuChildModel {
6
6
  id?: string;
7
7
  title: string | React.ReactNode;
8
8
  label?: React.ReactNode;
@@ -0,0 +1,5 @@
1
+ import { MenuModel } from ".";
2
+ export interface SideBarMenuModel {
3
+ name: string;
4
+ menus: MenuModel[];
5
+ }
@@ -1,2 +1,2 @@
1
- export * from "./ISideBarMenuModel";
2
- export * from "./IMenuModel";
1
+ export * from "./SideBarMenuModel";
2
+ export * from "./MenuModel";
@@ -1,4 +1,4 @@
1
- export interface IPersonalProfileModel {
1
+ export interface PersonalProfileModel {
2
2
  accountId?: string;
3
3
  accountName?: string;
4
4
  name?: string;
@@ -0,0 +1,8 @@
1
+ import { PersonalProfileModel } from "./PersonalProfileModel";
2
+ export interface SupportContactModel {
3
+ title: string;
4
+ phoneNumber: string;
5
+ personalProfileId: number;
6
+ personalProfile: PersonalProfileModel;
7
+ personalProfileName?: string;
8
+ }
@@ -1,6 +1,6 @@
1
1
  export * from "./Session";
2
2
  export * from "./Layout";
3
3
  export * from "./Core";
4
- export * from "./IPersonalProfileModel";
5
- export * from "./ISupportContactModel";
4
+ export * from "./PersonalProfileModel";
5
+ export * from "./SupportContactModel";
6
6
  export * from "./NotificationModel";
@@ -1,11 +1,11 @@
1
- import { IMenuModel, ISideBarMenuModel } from "../models";
1
+ import { MenuModel, SideBarMenuModel } from "../models";
2
2
  interface GetMenusProps {
3
3
  name: string;
4
- menus: ISideBarMenuModel[];
4
+ menus: SideBarMenuModel[];
5
5
  defaultMenu: string;
6
6
  }
7
7
  export declare class LayoutService {
8
- static getMenus: (data: GetMenusProps) => IMenuModel[];
9
- static getPlatform: (customNavigator?: Navigator) => "Chrome" | "Firefox" | "Safari" | "" | "iOS";
8
+ static getMenus: (data: GetMenusProps) => MenuModel[];
9
+ static getPlatform: (customNavigator?: Navigator) => "" | "Chrome" | "Firefox" | "Safari" | "iOS";
10
10
  }
11
11
  export {};
@@ -1,6 +1,7 @@
1
1
  import { ThemeConfig } from "antd";
2
2
  export declare const APPLE_FONT = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
3
3
  export declare const INTER_FONT = "\"Inter\", sans-serif;";
4
- export declare const CALIBRI_FONT = "\"Calibri\", sans-serif;";
4
+ export declare const BVP_FONT = "\"BeVietnamPro\", sans-serif;";
5
5
  export declare const mobileWidth = 992;
6
6
  export declare const themeConfig: ThemeConfig;
7
+ export declare const officeThemeConfig: ThemeConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beca-ui",
3
- "version": "2.0.19-beta.9",
3
+ "version": "2.0.19-beta.91",
4
4
  "description": "Becawork UI",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -33,11 +33,11 @@
33
33
  "antd-img-crop": "4.12.2",
34
34
  "axios": "1.6.7",
35
35
  "beca-icons": "0.0.6",
36
- "crypto-js": "^4.2.0",
36
+ "crypto-js": "4.2.0",
37
37
  "dayjs": "1.11.13",
38
38
  "dompurify": "3.0.5",
39
39
  "i18next": "23.2.7",
40
- "mime-types": "^2.1.35",
40
+ "mime": "4.0.6",
41
41
  "prosemirror-commands": "1.5.0",
42
42
  "prosemirror-dropcursor": "1.6.1",
43
43
  "prosemirror-gapcursor": "1.3.1",
@@ -45,36 +45,35 @@
45
45
  "prosemirror-keymap": "1.2.0",
46
46
  "prosemirror-schema-list": "1.2.2",
47
47
  "prosemirror-tables": "1.3.7",
48
- "react": "18.2.0",
49
- "react-barcode": "^1.5.3",
48
+ "react": "19.0.0",
49
+ "react-barcode": "1.5.3",
50
50
  "react-color": "2.19.3",
51
- "react-custom-scroll": "7.0.0",
52
- "react-device-detect": "^2.2.3",
53
- "react-dom": "18.2.0",
51
+ "react-device-detect": "2.2.3",
52
+ "react-dom": "19.0.0",
53
+ "react-helmet-async": "2.0.5",
54
54
  "react-i18next": "13.0.1",
55
55
  "react-infinite-scroll-component": "6.1.0",
56
56
  "react-paginate": "8.2.0",
57
57
  "react-resizable": "3.0.5",
58
- "react-virtuoso": "4.6.2",
59
- "tippy.js": "6.3.7",
60
- "xlsx": "^0.18.5"
58
+ "react-virtuoso": "4.6.2"
61
59
  },
62
60
  "peerDependencies": {
63
- "react": "18.2.0",
64
- "react-dom": "18.2.0"
61
+ "react": "19.0.0",
62
+ "react-dom": "19.0.0"
65
63
  },
66
64
  "devDependencies": {
67
65
  "@chromatic-com/storybook": "3.2.2",
68
66
  "@faker-js/faker": "8.4.1",
69
- "@storybook/addon-essentials": "8.4.5",
70
- "@storybook/addon-interactions": "8.4.5",
71
- "@storybook/addon-links": "8.4.5",
72
- "@storybook/addon-mdx-gfm": "8.4.5",
73
- "@storybook/addon-onboarding": "8.4.5",
74
- "@storybook/blocks": "8.4.5",
75
- "@storybook/react": "8.4.5",
76
- "@storybook/react-vite": "8.4.5",
77
- "@storybook/test": "8.4.5",
67
+ "@rollup/plugin-alias": "5.1.1",
68
+ "@storybook/addon-essentials": "8.6.7",
69
+ "@storybook/addon-interactions": "8.6.7",
70
+ "@storybook/addon-links": "8.6.7",
71
+ "@storybook/addon-mdx-gfm": "8.6.7",
72
+ "@storybook/addon-onboarding": "8.6.7",
73
+ "@storybook/blocks": "8.6.7",
74
+ "@storybook/react": "8.6.7",
75
+ "@storybook/react-vite": "8.6.7",
76
+ "@storybook/test": "8.6.7",
78
77
  "@tiptap/core": "2.1.12",
79
78
  "@tiptap/extension-blockquote": "2.10.3",
80
79
  "@tiptap/extension-bold": "2.10.4",
@@ -83,6 +82,7 @@
83
82
  "@tiptap/extension-document": "2.10.3",
84
83
  "@tiptap/extension-focus": "2.10.3",
85
84
  "@tiptap/extension-font-family": "2.10.3",
85
+ "@tiptap/extension-heading": "2.11.5",
86
86
  "@tiptap/extension-highlight": "2.10.3",
87
87
  "@tiptap/extension-image": "2.10.3",
88
88
  "@tiptap/extension-italic": "2.10.4",
@@ -104,13 +104,13 @@
104
104
  "@tiptap/react": "2.10.3",
105
105
  "@tiptap/starter-kit": "2.10.3",
106
106
  "@tiptap/suggestion": "2.10.3",
107
- "@types/crypto-js": "^4.2.2",
107
+ "@types/crypto-js": "4.2.2",
108
108
  "@types/dompurify": "3.0.2",
109
- "@types/mime-types": "^2.1.4",
109
+ "@types/lodash": "4.17.16",
110
110
  "@types/node": "20.10.5",
111
- "@types/react": "18.2.45",
111
+ "@types/react": "19.0.11",
112
112
  "@types/react-color": "3.0.6",
113
- "@types/react-dom": "18.2.18",
113
+ "@types/react-dom": "19.0.4",
114
114
  "@types/react-resizable": "3.0.7",
115
115
  "@typescript-eslint/eslint-plugin": "6.0.0",
116
116
  "@typescript-eslint/parser": "6.0.0",
@@ -122,15 +122,18 @@
122
122
  "eslint-plugin-react-refresh": "0.4.3",
123
123
  "eslint-plugin-storybook": "0.11.1",
124
124
  "path": "0.12.7",
125
- "query-string": "^9.1.1",
125
+ "query-string": "9.1.1",
126
126
  "sass": "1.69.5",
127
127
  "sass-loader": "14.1.0",
128
- "storybook": "8.4.5",
128
+ "simplebar-react": "3.3.0",
129
+ "storybook": "8.6.7",
129
130
  "style-loader": "3.3.4",
131
+ "tippy.js": "6.3.7",
130
132
  "typescript": "5.6.3",
131
133
  "vite": "5.0.10",
132
134
  "vite-plugin-dts": "3.6.4",
133
- "vite-plugin-lib-inject-css": "1.3.0"
135
+ "vite-plugin-lib-inject-css": "1.3.0",
136
+ "xlsx": "0.18.5"
134
137
  },
135
138
  "sideEffects": [
136
139
  "**/*.css"
@@ -1,2 +0,0 @@
1
- export * from './BecaCard';
2
- export * from './BecaCard.types';
@@ -1,6 +0,0 @@
1
- import { IInitialEdgeModel } from './IInitialEdgeModel';
2
- import { IInitialNodeModels } from './IInitialNodeModels';
3
- export interface IFlowModel {
4
- initialNodes: IInitialNodeModels[];
5
- initialEdges: IInitialEdgeModel[];
6
- }
@@ -1,3 +0,0 @@
1
- export interface IInitialDataModel {
2
- label: string;
3
- }
@@ -1,14 +0,0 @@
1
- import { IInitialDataModel } from './IInitialDataModel';
2
- import { IInitialPositionModel } from './IInitialPositionModel';
3
- import { IInitialStyleModel } from './IInitialStyleModel';
4
- export interface IInitialNodeModels {
5
- id: string;
6
- type: string;
7
- sourcePosition: string;
8
- targetPosition: string;
9
- data: IInitialDataModel;
10
- position: IInitialPositionModel;
11
- className: string;
12
- parentNode: string;
13
- style: IInitialStyleModel;
14
- }
@@ -1,4 +0,0 @@
1
- export interface IInitialPositionModel {
2
- x: number;
3
- y: number;
4
- }
@@ -1,8 +0,0 @@
1
- import { IPersonalProfileModel } from "./IPersonalProfileModel";
2
- export interface ISupportContactModel {
3
- title: string;
4
- phoneNumber: string;
5
- personalProfileId: number;
6
- personalProfile: IPersonalProfileModel;
7
- personalProfileName?: string;
8
- }
@@ -1,5 +0,0 @@
1
- import { IMenuModel } from ".";
2
- export interface ISideBarMenuModel {
3
- name: string;
4
- menus: IMenuModel[];
5
- }