@szjy/workflow 0.1.10 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +18615 -18503
- package/dist/index.umd.js +221 -221
- package/dist/packages/components/Workflow/biz-logic/leave/utils/findElementUtil.d.ts +2 -0
- package/dist/packages/components/Workflow/exposeApi.d.ts +7 -11
- package/dist/packages/components/Workflow/index.vue.d.ts +4 -2
- package/dist/packages/components/Workflow/store/bpmn-utils/initiatorUtil.d.ts +1 -0
- package/dist/packages/components/Workflow/store/permission/constants.d.ts +39 -5
- package/dist/packages/components/Workflow/store/permission/index.d.ts +31 -16
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/packages/components/Workflow/biz-logic/form-permissions/util.d.ts +0 -2
@@ -1,2 +1,4 @@
|
|
1
1
|
import type { ElementLike } from 'diagram-js/lib/model/Types';
|
2
2
|
export declare const findByBizType: (bizType: string) => ElementLike[];
|
3
|
+
export declare const getAllElementIds: () => string[];
|
4
|
+
export declare const getElementsByCondition: (condition: (element: ElementLike) => boolean) => ElementLike[];
|
@@ -1,14 +1,10 @@
|
|
1
|
+
import { FieldItemType, FieldPermissionConfigMapNode, PermissionJSONLike } from "./store/permission/constants";
|
1
2
|
export declare const getWorkflowXml: () => Promise<string | undefined>;
|
2
|
-
export declare function getPermissionJSON(): {
|
3
|
-
createFieldPermission: {
|
4
|
-
assigneeFieldPermissionMap: {
|
5
|
-
[key: string]: "EDITABLE" | "READ_ONLY" | "HIDDEN";
|
6
|
-
};
|
7
|
-
othersFieldPermissionMap: {
|
8
|
-
[key: string]: "EDITABLE" | "READ_ONLY" | "HIDDEN";
|
9
|
-
};
|
10
|
-
};
|
11
|
-
taskToFieldPermissionMap: any;
|
12
|
-
};
|
13
3
|
export declare function initXmlToStore(xml: string): Promise<void>;
|
14
4
|
export declare function updateProcessId(processId: string): void;
|
5
|
+
export declare function getPermissionJSON(): {
|
6
|
+
createFieldPermission: {};
|
7
|
+
taskToFieldPermissionMap: FieldPermissionConfigMapNode;
|
8
|
+
};
|
9
|
+
export declare function setPermissionByFields(permissonJSON: PermissionJSONLike, fields: FieldItemType[]): void;
|
10
|
+
export declare function updatePermFields(fields: FieldItemType[]): void;
|
@@ -1,10 +1,12 @@
|
|
1
|
-
import { getPermissionJSON, initXmlToStore, updateProcessId } from "./exposeApi";
|
1
|
+
import { getPermissionJSON, initXmlToStore, updateProcessId, setPermissionByFields, updatePermFields } from "./exposeApi";
|
2
2
|
import BpmnModeler from 'bpmn-js/lib/Modeler.js';
|
3
3
|
declare const _default: import("vue").DefineComponent<{}, {
|
4
4
|
getWorkflowXml: () => Promise<string | undefined>;
|
5
|
-
getPermissionJSON: typeof getPermissionJSON;
|
6
5
|
initXmlToStore: typeof initXmlToStore;
|
7
6
|
updateProcessId: typeof updateProcessId;
|
7
|
+
getPermissionJSON: typeof getPermissionJSON;
|
8
|
+
setPermissionByFields: typeof setPermissionByFields;
|
9
|
+
updatePermFields: typeof updatePermFields;
|
8
10
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
9
11
|
init: (modeler: BpmnModeler) => void;
|
10
12
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
@@ -2,4 +2,5 @@ import type { Element } from 'bpmn-js/lib/model/Types';
|
|
2
2
|
export declare function getInitiatorValue(element: Element): string | undefined;
|
3
3
|
export declare function setInitiatorValue(element: Element, value: string | undefined): void;
|
4
4
|
export declare function isStartInitializable(element: Element): boolean;
|
5
|
+
export declare function isStartEvent(element: Element): boolean;
|
5
6
|
export declare function isUserAssignmentSupported(element: Element): boolean;
|
@@ -1,20 +1,29 @@
|
|
1
1
|
export declare const PERMISSION_TYPE: {
|
2
2
|
readonly EDITABLE: "EDITABLE";
|
3
|
-
readonly
|
3
|
+
readonly ALL_READ_ONLY: "ALL_READ_ONLY";
|
4
4
|
readonly HIDDEN: "HIDDEN";
|
5
5
|
};
|
6
6
|
export declare const ASSIGNEE_MAP_KEY = "assigneeFieldPermissionMap";
|
7
7
|
export declare const OTHER_MAP_KEY = "othersFieldPermissionMap";
|
8
|
+
export declare const DEFAULT_PERM_VALUE_KEY = "defaultPermission";
|
8
9
|
export type PermissionGroupName = "assigneeFieldPermissionMap" | "othersFieldPermissionMap";
|
9
10
|
export type PermissionType = keyof typeof PERMISSION_TYPE;
|
10
11
|
export declare const CREATION_KEY = "createFieldPermission";
|
11
12
|
export declare const EDITABLE_KEY = "taskToFieldPermissionMap";
|
13
|
+
export type FieldItemType = {
|
14
|
+
id: string;
|
15
|
+
name?: string;
|
16
|
+
type?: string;
|
17
|
+
};
|
12
18
|
export declare const PERMISSION_OPTIONS: ({
|
13
19
|
label: string;
|
14
20
|
value: "EDITABLE";
|
15
21
|
} | {
|
16
22
|
label: string;
|
17
|
-
value: "
|
23
|
+
value: "ALL_READ_ONLY";
|
24
|
+
} | {
|
25
|
+
label: string;
|
26
|
+
value: "HIDDEN";
|
18
27
|
})[];
|
19
28
|
export type TaskPermissionMap = {
|
20
29
|
[ASSIGNEE_MAP_KEY]: PermissionItem[];
|
@@ -23,19 +32,44 @@ export type TaskPermissionMap = {
|
|
23
32
|
export type AllTaskPermissionMap = {
|
24
33
|
[key: string]: TaskPermissionMap;
|
25
34
|
};
|
35
|
+
export type TaskConfig = {
|
36
|
+
[DEFAULT_PERM_VALUE_KEY]?: PermissionType;
|
37
|
+
isStartTask?: boolean;
|
38
|
+
};
|
39
|
+
export type AllTaskConfigMap = {
|
40
|
+
[key: string]: TaskConfig;
|
41
|
+
};
|
26
42
|
export type PermissionItem = {
|
27
43
|
key: string;
|
44
|
+
fieldId: string;
|
28
45
|
fieldName: string;
|
29
46
|
permission: PermissionType;
|
30
47
|
};
|
31
48
|
export declare const convertPermissionArrayToMap: (permissionArray?: PermissionItem[]) => {
|
32
|
-
[key: string]: "EDITABLE" | "
|
49
|
+
[key: string]: "EDITABLE" | "ALL_READ_ONLY" | "HIDDEN";
|
33
50
|
};
|
34
51
|
export declare const convertTaskPermissionMapToMap: (taskPermissionMap: Partial<TaskPermissionMap>) => {
|
35
52
|
assigneeFieldPermissionMap: {
|
36
|
-
[key: string]: "EDITABLE" | "
|
53
|
+
[key: string]: "EDITABLE" | "ALL_READ_ONLY" | "HIDDEN";
|
37
54
|
};
|
38
55
|
othersFieldPermissionMap: {
|
39
|
-
[key: string]: "EDITABLE" | "
|
56
|
+
[key: string]: "EDITABLE" | "ALL_READ_ONLY" | "HIDDEN";
|
40
57
|
};
|
41
58
|
};
|
59
|
+
export type ExtraInfo = {
|
60
|
+
[key: string]: {
|
61
|
+
name?: string;
|
62
|
+
[key: string]: any;
|
63
|
+
};
|
64
|
+
};
|
65
|
+
export declare const convertPermissionMapToArray: (obj: Record<string, PermissionType>, extraInfo: ExtraInfo) => PermissionItem[];
|
66
|
+
export type FieldPermissionConfig = ReturnType<typeof convertPermissionArrayToMap>;
|
67
|
+
export type FieldPermissionConfigMap = ReturnType<typeof convertTaskPermissionMapToMap>;
|
68
|
+
export type FieldPermissionConfigMapNode = {
|
69
|
+
[key: string]: FieldPermissionConfigMap;
|
70
|
+
};
|
71
|
+
export type PermissionJSONLike = {
|
72
|
+
[CREATION_KEY]?: FieldPermissionConfigMap;
|
73
|
+
[EDITABLE_KEY]?: FieldPermissionConfigMapNode;
|
74
|
+
[key: string]: any;
|
75
|
+
};
|
@@ -1,27 +1,42 @@
|
|
1
|
-
import { type AllTaskPermissionMap, type PermissionGroupName, type PermissionType,
|
1
|
+
import { type AllTaskPermissionMap, type PermissionGroupName, type PermissionType, TaskConfig, FieldItemType, FieldPermissionConfigMapNode, PermissionJSONLike } from './constants';
|
2
2
|
declare const usePermissionStore: import("pinia").StoreDefinition<"permission", import("pinia")._UnwrapAll<Pick<{
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
allTaskPermMap: import("vue").Ref<AllTaskPermissionMap>;
|
4
|
+
getPermissionJSON: () => {
|
5
|
+
createFieldPermission: {};
|
6
|
+
taskToFieldPermissionMap: FieldPermissionConfigMapNode;
|
7
|
+
};
|
8
|
+
initAllPermByFields: (permissonJSON: PermissionJSONLike, fields: FieldItemType[]) => void;
|
6
9
|
curNodeId: import("vue").Ref<string>;
|
7
10
|
setCurNodeId: (id?: string) => void;
|
8
|
-
|
11
|
+
setTaskConfig: (id?: string, config?: TaskConfig) => void;
|
12
|
+
curTaskMap: import("vue").ComputedRef<any>;
|
9
13
|
updateFieldPermission: (groupName: PermissionGroupName, idx: number, permission: PermissionType) => void;
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
+
setAllFields: (fields: FieldItemType[]) => void;
|
15
|
+
}, "allTaskPermMap" | "curNodeId">>, Pick<{
|
16
|
+
allTaskPermMap: import("vue").Ref<AllTaskPermissionMap>;
|
17
|
+
getPermissionJSON: () => {
|
18
|
+
createFieldPermission: {};
|
19
|
+
taskToFieldPermissionMap: FieldPermissionConfigMapNode;
|
20
|
+
};
|
21
|
+
initAllPermByFields: (permissonJSON: PermissionJSONLike, fields: FieldItemType[]) => void;
|
14
22
|
curNodeId: import("vue").Ref<string>;
|
15
23
|
setCurNodeId: (id?: string) => void;
|
16
|
-
|
24
|
+
setTaskConfig: (id?: string, config?: TaskConfig) => void;
|
25
|
+
curTaskMap: import("vue").ComputedRef<any>;
|
17
26
|
updateFieldPermission: (groupName: PermissionGroupName, idx: number, permission: PermissionType) => void;
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
27
|
+
setAllFields: (fields: FieldItemType[]) => void;
|
28
|
+
}, "curTaskMap">, Pick<{
|
29
|
+
allTaskPermMap: import("vue").Ref<AllTaskPermissionMap>;
|
30
|
+
getPermissionJSON: () => {
|
31
|
+
createFieldPermission: {};
|
32
|
+
taskToFieldPermissionMap: FieldPermissionConfigMapNode;
|
33
|
+
};
|
34
|
+
initAllPermByFields: (permissonJSON: PermissionJSONLike, fields: FieldItemType[]) => void;
|
22
35
|
curNodeId: import("vue").Ref<string>;
|
23
36
|
setCurNodeId: (id?: string) => void;
|
24
|
-
|
37
|
+
setTaskConfig: (id?: string, config?: TaskConfig) => void;
|
38
|
+
curTaskMap: import("vue").ComputedRef<any>;
|
25
39
|
updateFieldPermission: (groupName: PermissionGroupName, idx: number, permission: PermissionType) => void;
|
26
|
-
|
40
|
+
setAllFields: (fields: FieldItemType[]) => void;
|
41
|
+
}, "getPermissionJSON" | "initAllPermByFields" | "setCurNodeId" | "setTaskConfig" | "updateFieldPermission" | "setAllFields">>;
|
27
42
|
export default usePermissionStore;
|