@giteeteam/apps-team-components 1.7.4 → 1.8.1
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/README.md +1 -0
- package/dist/lib/workflow.d.ts +10 -0
- package/dist/lib/workflow.js +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/lib/workflow.d.ts
CHANGED
|
@@ -95,6 +95,16 @@ export declare const DropdownConditions: {
|
|
|
95
95
|
name: string;
|
|
96
96
|
};
|
|
97
97
|
};
|
|
98
|
+
export declare const WorkspaceConditions: {
|
|
99
|
+
belongTo: {
|
|
100
|
+
key: string;
|
|
101
|
+
name: string;
|
|
102
|
+
};
|
|
103
|
+
notBelongTo: {
|
|
104
|
+
key: string;
|
|
105
|
+
name: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
98
108
|
export declare function isEmptyCondition(key: string): boolean;
|
|
99
109
|
interface CheckUserPermissionParams {
|
|
100
110
|
transition: TransitionProps;
|
package/dist/lib/workflow.js
CHANGED
|
@@ -53,6 +53,10 @@ const DropdownConditions = {
|
|
|
53
53
|
isEmpty: EmptyCondition,
|
|
54
54
|
notEmpty: NotEmptyCondition,
|
|
55
55
|
};
|
|
56
|
+
const WorkspaceConditions = {
|
|
57
|
+
belongTo: { key: 'belongTo', name: '属于' },
|
|
58
|
+
notBelongTo: { key: 'notBelongTo', name: '不属于' },
|
|
59
|
+
};
|
|
56
60
|
const ItemFieldType = {
|
|
57
61
|
name: 'name',
|
|
58
62
|
itemType: 'itemType',
|
|
@@ -112,6 +116,10 @@ function listToCompare(list1, list2, compareString) {
|
|
|
112
116
|
const r = !list1.includes(item);
|
|
113
117
|
return r;
|
|
114
118
|
});
|
|
119
|
+
case WorkspaceConditions.belongTo.key:
|
|
120
|
+
return list2.includes(list1[0]);
|
|
121
|
+
case WorkspaceConditions.notBelongTo.key:
|
|
122
|
+
return !list2.includes(list1[0]);
|
|
115
123
|
default:
|
|
116
124
|
return false;
|
|
117
125
|
}
|
|
@@ -416,4 +424,4 @@ const useWorkflowPermission = (workspaceId) => {
|
|
|
416
424
|
return [groups, roles, workspaceRoles];
|
|
417
425
|
};
|
|
418
426
|
|
|
419
|
-
export { DropdownConditions, ElementEnum, EmptyConditionList, NodeEnum, NumberConditions, StringConditions, checkFlowHandler, checkItemCondition, checkTransition, checkUserPermission, getScriptUser, isEmptyCondition, useWorkflowPermission };
|
|
427
|
+
export { DropdownConditions, ElementEnum, EmptyConditionList, NodeEnum, NumberConditions, StringConditions, WorkspaceConditions, checkFlowHandler, checkItemCondition, checkTransition, checkUserPermission, getScriptUser, isEmptyCondition, useWorkflowPermission };
|