beca-ui 2.0.19-beta.45 → 2.0.19-beta.47
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/ConvertVietnameseNumber.js +136 -0
- package/dist/DynamicWorkflowScript.js +1142 -0
- package/dist/beca-ui.js +59876 -59003
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/WorkflowForm/WorkflowForm.types.d.ts +3 -1
- package/dist/components/WorkflowForm/components/NewUserWorkflow/ProcessModal.d.ts +25 -0
- package/dist/components/WorkflowForm/components/UserWorkflowShare/AddUserWorkflowShareModal.d.ts +10 -0
- package/dist/components/WorkflowForm/models/WorkflowStepModel.d.ts +7 -2
- package/dist/components/WorkflowForm/models/ui/index.d.ts +1 -1
- package/dist/components/WorkflowForm/services/SendWorkflowService.d.ts +1 -1
- package/dist/components/WorkflowForm/services/UserCheckListService.d.ts +1 -1
- package/dist/components/WorkflowForm/services/UserWorkflowService.d.ts +1 -1
- package/dist/components/WorkflowForm/services/index.d.ts +22 -0
- package/dist/hooks/ApiHooks.d.ts +23 -0
- package/dist/hooks/WorkflowHooks.d.ts +49 -0
- package/dist/hooks/index.d.ts +3 -0
- package/package.json +2 -1
- /package/dist/components/WorkflowForm/components/{UpdateUserWorkflowShareModal.d.ts → UserWorkflowShare/UpdateUserWorkflowShareModal.d.ts} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SelectProps, OptionProps, PopupPosition, SelectRefs } from "./Select.types";
|
|
1
|
+
import { SelectProps, OptionProps, PopupPosition, SelectRefs, BaseSelectRef } from "./Select.types";
|
|
2
2
|
export { default as Select } from "./Select";
|
|
3
|
-
export type { SelectProps, OptionProps, PopupPosition, SelectRefs };
|
|
3
|
+
export type { SelectProps, OptionProps, PopupPosition, SelectRefs, BaseSelectRef, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Theme } from "../MainLayout";
|
|
2
2
|
import { LANGUAGE } from "../ConfigProvider";
|
|
3
|
-
type WorkflowType = "Resource" | "Application" | "Workflow" | "Public";
|
|
3
|
+
export type WorkflowType = "Resource" | "Application" | "Workflow" | "Public";
|
|
4
4
|
export interface WorkflowFormProps {
|
|
5
5
|
theme?: Theme;
|
|
6
6
|
userWorkflowId?: number;
|
|
@@ -18,6 +18,8 @@ export interface WorkflowFormProps {
|
|
|
18
18
|
preventScrollReset?: boolean;
|
|
19
19
|
unstable_viewTransition?: boolean;
|
|
20
20
|
}) => void;
|
|
21
|
+
closeProcessModal?: (isAccepted: boolean, isError?: boolean) => void;
|
|
22
|
+
onDrafted?: () => void;
|
|
21
23
|
}
|
|
22
24
|
interface WorkflowFormContextType {
|
|
23
25
|
theme: Theme;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ProcessStatusModel } from "../../models/ProcessStatusModel";
|
|
2
|
+
interface ProcessModalProps {
|
|
3
|
+
workflowId: number;
|
|
4
|
+
userWorkflowId: number;
|
|
5
|
+
isVisible: boolean;
|
|
6
|
+
defaultWorkflowPriority?: string;
|
|
7
|
+
onCancel?: (isAccepted: boolean, isError?: true) => void;
|
|
8
|
+
isDetail?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function ProcessModal({ workflowId, userWorkflowId, isVisible, onCancel, defaultWorkflowPriority, isDetail, }: ProcessModalProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
interface StepProps {
|
|
12
|
+
step: ProcessStatusModel;
|
|
13
|
+
index: number;
|
|
14
|
+
onClickTitle?: () => void;
|
|
15
|
+
onMultiChange?: (userIds: number[]) => void;
|
|
16
|
+
isPrint?: boolean;
|
|
17
|
+
showIcon?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function StepItem(props: StepProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
interface StatusIconProps {
|
|
21
|
+
step: ProcessStatusModel;
|
|
22
|
+
size?: number;
|
|
23
|
+
}
|
|
24
|
+
export declare const StatusIcon: ({ step, size }: StatusIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default ProcessModal;
|
package/dist/components/WorkflowForm/components/UserWorkflowShare/AddUserWorkflowShareModal.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UserWorkflowShareModel } from "../../models/UserWorkflowShareModel";
|
|
2
|
+
interface AddUserWorkflowShareModalProps {
|
|
3
|
+
userWorkflowId?: number;
|
|
4
|
+
isVisible: boolean;
|
|
5
|
+
onCancel: () => void;
|
|
6
|
+
data: UserWorkflowShareModel[];
|
|
7
|
+
onChange?: (data: UserWorkflowShareModel[]) => void;
|
|
8
|
+
}
|
|
9
|
+
declare function AddUserWorkflowShareModal({ isVisible, onCancel, data, onChange, }: AddUserWorkflowShareModalProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default AddUserWorkflowShareModal;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { EngineEntity } from "./EngineEntity";
|
|
2
1
|
import { IAssignmentRuleModel } from "./AssignmentRuleModel";
|
|
3
|
-
export interface WorkflowStepModel
|
|
2
|
+
export interface WorkflowStepModel {
|
|
3
|
+
id: number;
|
|
4
|
+
createdBy?: string;
|
|
5
|
+
createdTime?: string | Date | undefined;
|
|
6
|
+
lastModified?: string | Date | undefined;
|
|
7
|
+
modifiedBy?: string;
|
|
8
|
+
isDeleted?: boolean;
|
|
4
9
|
title: string;
|
|
5
10
|
titleEN?: string;
|
|
6
11
|
workflowId: number;
|
|
@@ -2,7 +2,7 @@ import { LANGUAGE } from "../..";
|
|
|
2
2
|
import { AddSendUserWorkflowModel } from "../models/AddSendUserWorkflowModel";
|
|
3
3
|
import { ProcessStatusModel } from "../models/ProcessStatusModel";
|
|
4
4
|
type AcceptModel = {
|
|
5
|
-
note
|
|
5
|
+
note?: string;
|
|
6
6
|
sendWorkflowModels: ProcessStatusModel[];
|
|
7
7
|
priorityId?: number;
|
|
8
8
|
};
|
|
@@ -5,7 +5,7 @@ import { UploadFileModel } from "../models/UploadFileModel";
|
|
|
5
5
|
import { UserCheckListModel } from "../models/UserCheckListModel";
|
|
6
6
|
import { SignaturedManuallyModel } from "../models/UserWorkflowModel";
|
|
7
7
|
import { UploadFile } from "../..";
|
|
8
|
-
|
|
8
|
+
type FileType = {
|
|
9
9
|
url: string;
|
|
10
10
|
isDownload: boolean;
|
|
11
11
|
};
|
|
@@ -52,7 +52,7 @@ export default class UserWorkflowService {
|
|
|
52
52
|
static getRelateds(relatedId: string): Promise<Result<UserWorkflowModel[]>>;
|
|
53
53
|
static getStatistic(params?: UserWorkflowParams): Promise<Result<UserWorkflowStatisticModel>>;
|
|
54
54
|
static isDate(date: any): boolean;
|
|
55
|
-
static addUserWorkflow(workflowId: number, workflowStepId: number, model: PropertyModel[], note?: string, mainUserWorkflowStepId?: number, workId?: number, formFormat?: RowsType[], workType?: string): Promise<Result<UserWorkflowModel>>;
|
|
55
|
+
static addUserWorkflow(workflowId: number, workflowStepId: number, model: PropertyModel[], note?: string | null, mainUserWorkflowStepId?: number, workId?: number, formFormat?: RowsType[], workType?: string): Promise<Result<UserWorkflowModel>>;
|
|
56
56
|
static updateUserWorkflow(userWorkflowId: number, model: PropertyModel[], note?: string, formFormat?: RowsType[], activeEditUserWorkflow?: boolean): Promise<Result<UserWorkflowModel>>;
|
|
57
57
|
static deleteOldWf({ data }: {
|
|
58
58
|
data: any;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from "./AccountService";
|
|
2
|
+
export * from "./AppService";
|
|
3
|
+
export * from "./CheckListService";
|
|
4
|
+
export * from "./CleanHtmlService";
|
|
5
|
+
export * from "./DataServices2";
|
|
6
|
+
export * from "./DynamicWorkflowService";
|
|
7
|
+
export * from "./FormatDateTimeService";
|
|
8
|
+
export * from "./MasterDetailService";
|
|
9
|
+
export * from "./NetworkService";
|
|
10
|
+
export * from "./PermissionService";
|
|
11
|
+
export * from "./PersonalProfileService";
|
|
12
|
+
export * from "./PropertyService";
|
|
13
|
+
export * from "./SendWorkflowService";
|
|
14
|
+
export * from "./UserCheckListChangelogService";
|
|
15
|
+
export * from "./UserCheckListService";
|
|
16
|
+
export * from "./UserWorkflowLinkingService";
|
|
17
|
+
export * from "./UserWorkflowService";
|
|
18
|
+
export * from "./UserWorkflowShareService";
|
|
19
|
+
export * from "./UserWorkflowStepService";
|
|
20
|
+
export * from "./WorkflowReportService";
|
|
21
|
+
export * from "./WorkflowService";
|
|
22
|
+
export * from "./WorkflowStepService";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SelectOption } from "../components/WorkflowForm/models/ui";
|
|
2
|
+
interface ApiProps {
|
|
3
|
+
api: string;
|
|
4
|
+
params?: any;
|
|
5
|
+
defaultData?: any;
|
|
6
|
+
option?: {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
};
|
|
10
|
+
required?: any[];
|
|
11
|
+
standBy?: boolean;
|
|
12
|
+
isQueryResult?: boolean;
|
|
13
|
+
loadData?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function useAPI<T = any>({ api, params, defaultData, option, standBy, required, isQueryResult, loadData, }: ApiProps, deps?: any[]): {
|
|
16
|
+
data: T;
|
|
17
|
+
options: SelectOption[];
|
|
18
|
+
status: "success" | "fail" | undefined;
|
|
19
|
+
isLoading: boolean;
|
|
20
|
+
totalItems: number;
|
|
21
|
+
fetchData: () => Promise<void>;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { UserWorkflowModel } from "../components/WorkflowForm/models/UserWorkflowModel";
|
|
2
|
+
import { WorkflowModel } from "../components/WorkflowForm/models/WorkflowModel";
|
|
3
|
+
import { MasterDetailType, RowsType } from '../components/WorkflowForm/models/DynamicWorkflowModel';
|
|
4
|
+
import { AttachDataType } from '../components/WorkflowForm/services/CheckListService';
|
|
5
|
+
import { WorkflowType } from '../components/WorkflowForm/models/enums/WorkflowType';
|
|
6
|
+
import { UserWorkflowActionsModel } from '../components/WorkflowForm/models/UserWorkflowActionsModel';
|
|
7
|
+
import { UserWorkflowShareModel } from '../components/WorkflowForm/models/UserWorkflowShareModel';
|
|
8
|
+
interface WorkflowHooksProps {
|
|
9
|
+
workflowId?: number;
|
|
10
|
+
userWorkflowId: number;
|
|
11
|
+
workflowType?: WorkflowType;
|
|
12
|
+
goBack?: () => void;
|
|
13
|
+
onDrafted?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function useWorkflow(props: WorkflowHooksProps): {
|
|
16
|
+
workflow: WorkflowModel | undefined;
|
|
17
|
+
setWorkflow: import("react").Dispatch<import("react").SetStateAction<WorkflowModel | undefined>>;
|
|
18
|
+
userWorkflowId: number;
|
|
19
|
+
addUserWorkflow: (values: any) => Promise<void>;
|
|
20
|
+
isAdding: boolean;
|
|
21
|
+
masterDetailValues: any;
|
|
22
|
+
setMasterDetailValues: import("react").Dispatch<any>;
|
|
23
|
+
masterDetailFormats: MasterDetailType[];
|
|
24
|
+
setMasterDetailFormats: import("react").Dispatch<import("react").SetStateAction<MasterDetailType[]>>;
|
|
25
|
+
rows: RowsType[];
|
|
26
|
+
setRows: import("react").Dispatch<import("react").SetStateAction<RowsType[]>>;
|
|
27
|
+
attachDataSource: AttachDataType[];
|
|
28
|
+
setAttachDataSource: import("react").Dispatch<import("react").SetStateAction<AttachDataType[]>>;
|
|
29
|
+
uploadAttachFiles: (userWorkflowId: number) => Promise<{
|
|
30
|
+
isSuccess: boolean;
|
|
31
|
+
message: any;
|
|
32
|
+
} | {
|
|
33
|
+
isSuccess: boolean;
|
|
34
|
+
message?: undefined;
|
|
35
|
+
}>;
|
|
36
|
+
form: import("antd").FormInstance<any>;
|
|
37
|
+
attachForm: import("antd").FormInstance<any>;
|
|
38
|
+
workflowId: number | undefined;
|
|
39
|
+
setWorkflowId: import("react").Dispatch<import("react").SetStateAction<number | undefined>>;
|
|
40
|
+
relatedUserWorkflows: UserWorkflowModel[];
|
|
41
|
+
setRelatedUserWorkflows: import("react").Dispatch<import("react").SetStateAction<UserWorkflowModel[]>>;
|
|
42
|
+
userWorkflowShares: UserWorkflowShareModel[];
|
|
43
|
+
setUserWorkflowShares: import("react").Dispatch<import("react").SetStateAction<UserWorkflowShareModel[]>>;
|
|
44
|
+
actions: UserWorkflowActionsModel | undefined;
|
|
45
|
+
setActions: import("react").Dispatch<import("react").SetStateAction<UserWorkflowActionsModel | undefined>>;
|
|
46
|
+
isProcessModalVisible: boolean;
|
|
47
|
+
setIsProcessModalVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
48
|
+
};
|
|
49
|
+
export {};
|
package/dist/hooks/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beca-ui",
|
|
3
|
-
"version": "2.0.19-beta.
|
|
3
|
+
"version": "2.0.19-beta.47",
|
|
4
4
|
"description": "Becawork UI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@chromatic-com/storybook": "3.2.2",
|
|
69
69
|
"@faker-js/faker": "8.4.1",
|
|
70
|
+
"@rollup/plugin-alias": "^5.1.1",
|
|
70
71
|
"@storybook/addon-essentials": "8.4.5",
|
|
71
72
|
"@storybook/addon-interactions": "8.4.5",
|
|
72
73
|
"@storybook/addon-links": "8.4.5",
|