@giteeteam/apps-team-components 1.7.2 → 1.8.0
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
CHANGED
|
@@ -8,6 +8,21 @@
|
|
|
8
8
|
pnpm i
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## 使用注意
|
|
12
|
+
插件使用需要加上speedy:false,防止切换应用时css会丢失。
|
|
13
|
+
|
|
14
|
+
```jsx
|
|
15
|
+
import { LibraryProvider } from "@giteeteam/apps-team-components";
|
|
16
|
+
|
|
17
|
+
const Demo = ({children}) => {
|
|
18
|
+
return (
|
|
19
|
+
<LibraryProvider emotionCacheOptions={{ key: "appKey", speedy: false }}>
|
|
20
|
+
{children}
|
|
21
|
+
</LibraryProvider>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
11
26
|
## 预览
|
|
12
27
|
**开发前务必先阅读预览首页文档**
|
|
13
28
|
```
|
|
@@ -29,6 +44,7 @@ pnpm storybook
|
|
|
29
44
|
|
|
30
45
|
| 组件库版本 | team版本 |
|
|
31
46
|
| --| -- |
|
|
47
|
+
| 1.8.x | >=4.36.0 |
|
|
32
48
|
| 1.7.x | >=4.30.0 |
|
|
33
49
|
| 1.6.x | >=4.29.0 |
|
|
34
50
|
| 1.5.x | >=4.27.0 |
|
|
@@ -206,7 +206,7 @@ const TransitionPanel = ({ itemId, itemType, workspace, objectId, onTransitionSu
|
|
|
206
206
|
useEffect(() => {
|
|
207
207
|
logger('updateWorkflowMessage', statusId);
|
|
208
208
|
updateWorkflowMessage(workflowData, statusId, checkResultList);
|
|
209
|
-
}, [statusId, workflowData, checkResultList, itemData
|
|
209
|
+
}, [statusId, workflowData, checkResultList, itemData]);
|
|
210
210
|
const refreshItem = useCallback((status) => {
|
|
211
211
|
if (newItem.current !== itemId) {
|
|
212
212
|
return;
|
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 };
|