@giteeteam/apps-team-components 1.2.2-alpha.3 → 1.2.2
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 +28 -28
- package/dist/components/common/PriceTag.js +18 -18
- package/dist/components/common/overflow-tooltip/style/index.js +13 -13
- package/dist/components/common/style/global.js +2 -2
- package/dist/components/common/user-field/style/index.js +21 -21
- package/dist/components/fields/bind-workspace/style/index.js +3 -3
- package/dist/components/fields/dropdown/ReadView.js +16 -1
- package/dist/components/fields/hyper-link/style/index.js +14 -14
- package/dist/components/fields/long-text/style/index.js +5 -5
- package/dist/components/fields/priority/style/index.js +50 -50
- package/dist/components/fields/status/SelectTransition.js +2 -2
- package/dist/components/fields/status/TransitionButton.d.ts +0 -3
- package/dist/components/fields/status/TransitionButton.js +1 -7
- package/dist/components/fields/status/style/index.js +323 -323
- package/dist/components/fields/tag/style/index.js +5 -5
- package/dist/components/fields/team/style/index.js +2 -2
- package/dist/components/fields/user/style/index.js +8 -8
- package/dist/components/table-components/style/index.js +5 -5
- package/dist/icons/svg/DottedCircle.svg +7 -7
- package/dist/icons/svg/HollowCircle.svg +6 -6
- package/dist/icons/svg/Workflow.svg +12 -12
- package/dist/lib/workflow.js +20 -86
- package/package.json +69 -70
package/README.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# @giteeteam/apps-team-components
|
|
2
|
-
|
|
3
|
-
- gitee team components
|
|
4
|
-
|
|
5
|
-
## 注意
|
|
6
|
-
插件使用需要加上speedy:false,防止切换应用时css会丢失
|
|
7
|
-
|
|
8
|
-
```jsx
|
|
9
|
-
import { LibraryProvider } from "@giteeteam/apps-team-components";
|
|
10
|
-
|
|
11
|
-
const Demo = ({children}) => {
|
|
12
|
-
return (
|
|
13
|
-
<LibraryProvider emotionCacheOptions={{ key: "appKey", speedy: false }}>
|
|
14
|
-
{children}
|
|
15
|
-
</LibraryProvider>
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## TODO
|
|
21
|
-
- SimpleOverflowTooltip 统一为 BaseOverflowToolTip 导出
|
|
22
|
-
- 去除 BaseOverflowToolTip 的 maxline
|
|
23
|
-
|
|
24
|
-
# 1.1.x版本
|
|
25
|
-
- team最低版本为4.16.0
|
|
26
|
-
|
|
27
|
-
# 1.2.x版本
|
|
28
|
-
- team最低版本为4.21.0
|
|
1
|
+
# @giteeteam/apps-team-components
|
|
2
|
+
|
|
3
|
+
- gitee team components
|
|
4
|
+
|
|
5
|
+
## 注意
|
|
6
|
+
插件使用需要加上speedy:false,防止切换应用时css会丢失
|
|
7
|
+
|
|
8
|
+
```jsx
|
|
9
|
+
import { LibraryProvider } from "@giteeteam/apps-team-components";
|
|
10
|
+
|
|
11
|
+
const Demo = ({children}) => {
|
|
12
|
+
return (
|
|
13
|
+
<LibraryProvider emotionCacheOptions={{ key: "appKey", speedy: false }}>
|
|
14
|
+
{children}
|
|
15
|
+
</LibraryProvider>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## TODO
|
|
21
|
+
- SimpleOverflowTooltip 统一为 BaseOverflowToolTip 导出
|
|
22
|
+
- 去除 BaseOverflowToolTip 的 maxline
|
|
23
|
+
|
|
24
|
+
# 1.1.x版本
|
|
25
|
+
- team最低版本为4.16.0
|
|
26
|
+
|
|
27
|
+
# 1.2.x版本
|
|
28
|
+
- team最低版本为4.21.0
|
|
@@ -3,26 +3,26 @@ import { useMemo } from 'react';
|
|
|
3
3
|
import { ClassNames } from '@emotion/react';
|
|
4
4
|
import { i18n } from '../../lib/i18n';
|
|
5
5
|
import SimpleOverflowToolTip from './overflow-tooltip/SimpleOverflowToolTip';
|
|
6
|
-
export const containerStyle = `
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
max-width: 100%;
|
|
6
|
+
export const containerStyle = `
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
max-width: 100%;
|
|
10
10
|
`;
|
|
11
|
-
export const textStyle = `
|
|
12
|
-
flex: 1;
|
|
13
|
-
width: 0;
|
|
11
|
+
export const textStyle = `
|
|
12
|
+
flex: 1;
|
|
13
|
+
width: 0;
|
|
14
14
|
`;
|
|
15
|
-
export const tagStyle = `
|
|
16
|
-
height: 18px;
|
|
17
|
-
padding: 0 4px;
|
|
18
|
-
margin-left: 8px;
|
|
19
|
-
font-size: 12px;
|
|
20
|
-
font-weight: 500;
|
|
21
|
-
line-height: 18px;
|
|
22
|
-
color: #fff;
|
|
23
|
-
background: linear-gradient(230deg, #66dbff 0%, #3683ff 100%);
|
|
24
|
-
border-radius: 5px 0;
|
|
25
|
-
white-space: nowrap;
|
|
15
|
+
export const tagStyle = `
|
|
16
|
+
height: 18px;
|
|
17
|
+
padding: 0 4px;
|
|
18
|
+
margin-left: 8px;
|
|
19
|
+
font-size: 12px;
|
|
20
|
+
font-weight: 500;
|
|
21
|
+
line-height: 18px;
|
|
22
|
+
color: #fff;
|
|
23
|
+
background: linear-gradient(230deg, #66dbff 0%, #3683ff 100%);
|
|
24
|
+
border-radius: 5px 0;
|
|
25
|
+
white-space: nowrap;
|
|
26
26
|
`;
|
|
27
27
|
export const PriceTag = ({ text, className, edition, expired }) => {
|
|
28
28
|
const isTagVisible = useMemo(() => {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export const tooltipOverflowStyle = `
|
|
2
|
-
display: -webkit-box;
|
|
3
|
-
overflow: hidden;
|
|
4
|
-
text-overflow: ellipsis;
|
|
5
|
-
word-break: break-all;
|
|
6
|
-
white-space: pre-line !important;
|
|
7
|
-
-webkit-box-orient: vertical;
|
|
1
|
+
export const tooltipOverflowStyle = `
|
|
2
|
+
display: -webkit-box;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
text-overflow: ellipsis;
|
|
5
|
+
word-break: break-all;
|
|
6
|
+
white-space: pre-line !important;
|
|
7
|
+
-webkit-box-orient: vertical;
|
|
8
8
|
`;
|
|
9
|
-
export const simpleTooltipStyle = `
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
text-overflow: ellipsis;
|
|
12
|
-
white-space: nowrap;
|
|
9
|
+
export const simpleTooltipStyle = `
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
text-overflow: ellipsis;
|
|
12
|
+
white-space: nowrap;
|
|
13
13
|
`;
|
|
14
14
|
export const getTooltipMaxlineStyle = (n) => {
|
|
15
|
-
return `
|
|
16
|
-
-webkit-line-clamp: ${n};
|
|
15
|
+
return `
|
|
16
|
+
-webkit-line-clamp: ${n};
|
|
17
17
|
`;
|
|
18
18
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const fieldValueOverlayStyle = `
|
|
2
|
-
width: 100%;
|
|
1
|
+
export const fieldValueOverlayStyle = `
|
|
2
|
+
width: 100%;
|
|
3
3
|
`;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
const avatarSize = '20px';
|
|
2
|
-
export const avatarItemStyle = `
|
|
3
|
-
flex-shrink: 0;
|
|
2
|
+
export const avatarItemStyle = `
|
|
3
|
+
flex-shrink: 0;
|
|
4
4
|
`;
|
|
5
|
-
export const avatarStyle = `
|
|
6
|
-
display: inline-block;
|
|
7
|
-
width: ${avatarSize};
|
|
8
|
-
height: ${avatarSize};
|
|
9
|
-
margin-right: 3px;
|
|
10
|
-
vertical-align: middle;
|
|
11
|
-
background: #fff center/contain no-repeat;
|
|
12
|
-
border-radius: 50%;
|
|
5
|
+
export const avatarStyle = `
|
|
6
|
+
display: inline-block;
|
|
7
|
+
width: ${avatarSize};
|
|
8
|
+
height: ${avatarSize};
|
|
9
|
+
margin-right: 3px;
|
|
10
|
+
vertical-align: middle;
|
|
11
|
+
background: #fff center/contain no-repeat;
|
|
12
|
+
border-radius: 50%;
|
|
13
13
|
`;
|
|
14
|
-
export const defaultAvatarStyle = `
|
|
15
|
-
display: inline-flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
width: ${avatarSize};
|
|
19
|
-
height: ${avatarSize};
|
|
20
|
-
margin-right: 6px;
|
|
21
|
-
font-size: 12px;
|
|
22
|
-
color: #fff;
|
|
23
|
-
background: #5243aa;
|
|
24
|
-
border-radius: 50%;
|
|
14
|
+
export const defaultAvatarStyle = `
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
width: ${avatarSize};
|
|
19
|
+
height: ${avatarSize};
|
|
20
|
+
margin-right: 6px;
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
color: #fff;
|
|
23
|
+
background: #5243aa;
|
|
24
|
+
border-radius: 50%;
|
|
25
25
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const pointerStyle = `
|
|
2
|
-
color: #0c62ff;
|
|
3
|
-
cursor: pointer;
|
|
1
|
+
export const pointerStyle = `
|
|
2
|
+
color: #0c62ff;
|
|
3
|
+
cursor: pointer;
|
|
4
4
|
`;
|
|
@@ -58,7 +58,22 @@ const DropdownReadView = memo(props => {
|
|
|
58
58
|
return optionsMap[label] ? getFormattedLabel(optionsMap[label]) : label;
|
|
59
59
|
}
|
|
60
60
|
}, [mode, options, optionsMap, value]);
|
|
61
|
-
|
|
61
|
+
const showValueTitle = useMemo(() => {
|
|
62
|
+
var _a;
|
|
63
|
+
if (!(value === null || value === void 0 ? void 0 : value.length))
|
|
64
|
+
return '';
|
|
65
|
+
if ((_a = value[0]) === null || _a === void 0 ? void 0 : _a.label) {
|
|
66
|
+
return value.map(item => item.label).join(',');
|
|
67
|
+
}
|
|
68
|
+
if (!(options === null || options === void 0 ? void 0 : options.length))
|
|
69
|
+
return '';
|
|
70
|
+
const result = value
|
|
71
|
+
.map(item => { var _a; return (item === null || item === void 0 ? void 0 : item.label) || ((_a = options.find(opt => opt.value === handleValue(item))) === null || _a === void 0 ? void 0 : _a.label); })
|
|
72
|
+
.filter(Boolean)
|
|
73
|
+
.join(',');
|
|
74
|
+
return result;
|
|
75
|
+
}, [options, value]);
|
|
76
|
+
return (_jsx(_Fragment, { children: showValue ? (_jsx(SimpleOverflowToolTip, { title: showValueTitle, children: showValue })) : (_jsx(EmptyField, { readonly: readonly })) }));
|
|
62
77
|
});
|
|
63
78
|
DropdownReadView.displayName = 'DropdownReadView';
|
|
64
79
|
export default DropdownReadView;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { blue6 } from '../../../../style/common';
|
|
2
|
-
export const hyperLinkListStyle = `
|
|
3
|
-
display: flex;
|
|
4
|
-
width: 100%;
|
|
2
|
+
export const hyperLinkListStyle = `
|
|
3
|
+
display: flex;
|
|
4
|
+
width: 100%;
|
|
5
5
|
`;
|
|
6
|
-
export const hyperLinkItemStyle = `
|
|
7
|
-
${hyperLinkListStyle} & {
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
color: @blue-6;
|
|
10
|
-
text-overflow: ellipsis;
|
|
11
|
-
white-space: nowrap;
|
|
12
|
-
-webkit-line-clamp: 1;
|
|
13
|
-
}
|
|
6
|
+
export const hyperLinkItemStyle = `
|
|
7
|
+
${hyperLinkListStyle} & {
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
color: @blue-6;
|
|
10
|
+
text-overflow: ellipsis;
|
|
11
|
+
white-space: nowrap;
|
|
12
|
+
-webkit-line-clamp: 1;
|
|
13
|
+
}
|
|
14
14
|
`;
|
|
15
|
-
export const hyperLinkTipItem = `
|
|
16
|
-
display: block;
|
|
17
|
-
color: ${blue6};
|
|
15
|
+
export const hyperLinkTipItem = `
|
|
16
|
+
display: block;
|
|
17
|
+
color: ${blue6};
|
|
18
18
|
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const whiteSpacePreStyle = `
|
|
2
|
-
padding-top: 5px;
|
|
3
|
-
padding-bottom: 5px;
|
|
4
|
-
word-break: break-all;
|
|
5
|
-
white-space: pre-wrap;
|
|
1
|
+
export const whiteSpacePreStyle = `
|
|
2
|
+
padding-top: 5px;
|
|
3
|
+
padding-bottom: 5px;
|
|
4
|
+
word-break: break-all;
|
|
5
|
+
white-space: pre-wrap;
|
|
6
6
|
`;
|
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
import { fieldLabelColor } from '../../../../style/common';
|
|
2
|
-
export const cellBoxStyle = (antPrefix) => `
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
line-height: unset;
|
|
6
|
-
|
|
7
|
-
.${antPrefix}-dropdown-menu-title-content {
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: center;
|
|
10
|
-
max-width: 150px;
|
|
11
|
-
|
|
12
|
-
.anticon {
|
|
13
|
-
flex-shrink: 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
& > span {
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
2
|
+
export const cellBoxStyle = (antPrefix) => `
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
line-height: unset;
|
|
6
|
+
|
|
7
|
+
.${antPrefix}-dropdown-menu-title-content {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
max-width: 150px;
|
|
11
|
+
|
|
12
|
+
.anticon {
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
& > span {
|
|
17
|
+
white-space: pre-line;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
20
|
`;
|
|
21
|
-
export const headerCellStyle = `
|
|
22
|
-
max-width: 120px;
|
|
23
|
-
height: 24px;
|
|
24
|
-
padding: 0 8px;
|
|
25
|
-
font-size: 12px;
|
|
26
|
-
font-weight: 600;
|
|
27
|
-
line-height: 24px;
|
|
28
|
-
color: #213053;
|
|
29
|
-
text-align: center;
|
|
30
|
-
background-color: #f5f6f8;
|
|
31
|
-
border-radius: 4px;
|
|
21
|
+
export const headerCellStyle = `
|
|
22
|
+
max-width: 120px;
|
|
23
|
+
height: 24px;
|
|
24
|
+
padding: 0 8px;
|
|
25
|
+
font-size: 12px;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
line-height: 24px;
|
|
28
|
+
color: #213053;
|
|
29
|
+
text-align: center;
|
|
30
|
+
background-color: #f5f6f8;
|
|
31
|
+
border-radius: 4px;
|
|
32
32
|
`;
|
|
33
|
-
export const emptyTextStyle = `
|
|
34
|
-
display: flex;
|
|
35
|
-
align-items: center;
|
|
36
|
-
width: 100%;
|
|
37
|
-
height: 100%;
|
|
33
|
+
export const emptyTextStyle = `
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
38
|
`;
|
|
39
|
-
export const colorIconStyle = `
|
|
40
|
-
margin-right: 5px;
|
|
41
|
-
font-size: 12px;
|
|
39
|
+
export const colorIconStyle = `
|
|
40
|
+
margin-right: 5px;
|
|
41
|
+
font-size: 12px;
|
|
42
42
|
`;
|
|
43
|
-
export const emptyStyle = `
|
|
44
|
-
color: ${fieldLabelColor};
|
|
43
|
+
export const emptyStyle = `
|
|
44
|
+
color: ${fieldLabelColor};
|
|
45
45
|
`;
|
|
46
|
-
export const emptyIconStyle = `
|
|
47
|
-
margin-right: 5px;
|
|
48
|
-
font-size: 12px!important;
|
|
49
|
-
width: 12px!important;
|
|
50
|
-
margin-left: 0!important;
|
|
46
|
+
export const emptyIconStyle = `
|
|
47
|
+
margin-right: 5px;
|
|
48
|
+
font-size: 12px!important;
|
|
49
|
+
width: 12px!important;
|
|
50
|
+
margin-left: 0!important;
|
|
51
51
|
`;
|
|
52
|
-
export const downIconStyle = `
|
|
53
|
-
margin-left: 2px;
|
|
54
|
-
|
|
55
|
-
svg {
|
|
56
|
-
vertical-align: inherit;
|
|
57
|
-
}
|
|
52
|
+
export const downIconStyle = `
|
|
53
|
+
margin-left: 2px;
|
|
54
|
+
|
|
55
|
+
svg {
|
|
56
|
+
vertical-align: inherit;
|
|
57
|
+
}
|
|
58
58
|
`;
|
|
@@ -8,8 +8,8 @@ import TransitionButton from './TransitionButton';
|
|
|
8
8
|
import View from './View';
|
|
9
9
|
const SelectTransition = ({ fetching, flowing, tasks, itemId, itemData, currentUser, workspace, setPopoverVisible, name, objectId, workflowData, roleIds, groupIds, workspaceRoleIds, approval, checkIn, handleTransition, readonly, flowHandlerActive, }) => {
|
|
10
10
|
return (_jsx(ClassNames, { children: ({ cx, css }) => (_jsxs(_Fragment, { children: [fetching ? (_jsx(Spin, { css: css(spinStyle) })) : tasks.length ? (_jsx("div", { className: cx(css(flowNextStyle), `flow-next-global`), children: _jsx("div", { className: cx(css(flowWrapperStyle)), children: tasks.map(task => {
|
|
11
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r
|
|
12
|
-
return (_jsx(TransitionButton, { itemId: itemId, loading: flowing, text: task.name, item: itemData, workspace: workspace, userId: currentUser.id, groupIds: groupIds, roleIds: roleIds, workspaceRoleIds: workspaceRoleIds, currentTaskId: task.id, authUsers: (_b = (_a = task.parameters) === null || _a === void 0 ? void 0 : _a.permissionType) === null || _b === void 0 ? void 0 : _b.users, authRoles: (_d = (_c = task.parameters) === null || _c === void 0 ? void 0 : _c.permissionType) === null || _d === void 0 ? void 0 : _d.roles, authGroups: (_f = (_e = task.parameters) === null || _e === void 0 ? void 0 : _e.permissionType) === null || _f === void 0 ? void 0 : _f.groups, authUserFields: (_h = (_g = task.parameters) === null || _g === void 0 ? void 0 : _g.permissionType) === null || _h === void 0 ? void 0 : _h.customFields, authWorkSpaceRoles: (_k = (_j = task.parameters) === null || _j === void 0 ? void 0 : _j.permissionType) === null || _k === void 0 ? void 0 : _k.workspaceRoles, creatorAuth: (_m = (_l = task.parameters) === null || _l === void 0 ? void 0 : _l.permissionType) === null || _m === void 0 ? void 0 : _m.creatorAuth, scriptValidator: (_o = task.parameters) === null || _o === void 0 ? void 0 : _o.scriptValidator, conditions: (_p = task.parameters) === null || _p === void 0 ? void 0 : _p.fieldType, screenId: (_r = (_q = task.parameters) === null || _q === void 0 ? void 0 : _q.screen) === null || _r === void 0 ? void 0 : _r.key, target: task.target, approval: approval, checkIn: checkIn, handleTransition: handleTransition, hiddenPopover: () => setPopoverVisible(false), readonly: readonly, flowHandlerActive: flowHandlerActive
|
|
11
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
12
|
+
return (_jsx(TransitionButton, { itemId: itemId, loading: flowing, text: task.name, item: itemData, workspace: workspace, userId: currentUser.id, groupIds: groupIds, roleIds: roleIds, workspaceRoleIds: workspaceRoleIds, currentTaskId: task.id, authUsers: (_b = (_a = task.parameters) === null || _a === void 0 ? void 0 : _a.permissionType) === null || _b === void 0 ? void 0 : _b.users, authRoles: (_d = (_c = task.parameters) === null || _c === void 0 ? void 0 : _c.permissionType) === null || _d === void 0 ? void 0 : _d.roles, authGroups: (_f = (_e = task.parameters) === null || _e === void 0 ? void 0 : _e.permissionType) === null || _f === void 0 ? void 0 : _f.groups, authUserFields: (_h = (_g = task.parameters) === null || _g === void 0 ? void 0 : _g.permissionType) === null || _h === void 0 ? void 0 : _h.customFields, authWorkSpaceRoles: (_k = (_j = task.parameters) === null || _j === void 0 ? void 0 : _j.permissionType) === null || _k === void 0 ? void 0 : _k.workspaceRoles, creatorAuth: (_m = (_l = task.parameters) === null || _l === void 0 ? void 0 : _l.permissionType) === null || _m === void 0 ? void 0 : _m.creatorAuth, scriptValidator: (_o = task.parameters) === null || _o === void 0 ? void 0 : _o.scriptValidator, conditions: (_p = task.parameters) === null || _p === void 0 ? void 0 : _p.fieldType, screenId: (_r = (_q = task.parameters) === null || _q === void 0 ? void 0 : _q.screen) === null || _r === void 0 ? void 0 : _r.key, target: task.target, approval: approval, checkIn: checkIn, handleTransition: handleTransition, hiddenPopover: () => setPopoverVisible(false), readonly: readonly, flowHandlerActive: flowHandlerActive }, task.id));
|
|
13
13
|
}) }) })) : (_jsx("span", { onClick: () => {
|
|
14
14
|
setPopoverVisible(false);
|
|
15
15
|
}, css: css(noPermissionStyle), children: i18n.t('pages.fields.view.noWorkflowOrAuth') })), _jsx(View, { workflowData: workflowData, hiddenPopover: () => setPopoverVisible(false), name: name, objectId: objectId })] })) }));
|
|
@@ -29,9 +29,6 @@ interface FlowButtonProps {
|
|
|
29
29
|
};
|
|
30
30
|
hiddenPopover?: () => void;
|
|
31
31
|
readonly?: boolean;
|
|
32
|
-
conditionKey: string;
|
|
33
|
-
fieldTypeConditionKey: string;
|
|
34
|
-
userConditionKey: string;
|
|
35
32
|
flowHandlerActive?: boolean;
|
|
36
33
|
}
|
|
37
34
|
declare const _default: React.NamedExoticComponent<FlowButtonProps>;
|
|
@@ -15,7 +15,7 @@ const CheckInStatus = {
|
|
|
15
15
|
closed: 'closed',
|
|
16
16
|
pending: 'pending',
|
|
17
17
|
};
|
|
18
|
-
const FlowButton = ({ loading, screenId, text, item, userId, roleIds, groupIds, workspaceRoleIds, authRoles, authUsers, authGroups, creatorAuth, authUserFields, authWorkSpaceRoles, scriptValidator, approval, checkIn, conditions = [], handleTransition, target, readonly,
|
|
18
|
+
const FlowButton = ({ loading, screenId, text, item, userId, roleIds, groupIds, workspaceRoleIds, authRoles, authUsers, authGroups, creatorAuth, authUserFields, authWorkSpaceRoles, scriptValidator, approval, checkIn, conditions = [], handleTransition, target, readonly, flowHandlerActive, }) => {
|
|
19
19
|
const [isCheck, setIsCheck] = useState(true);
|
|
20
20
|
const [tip, setTip] = useState('');
|
|
21
21
|
const checkApproval = useCallback(() => {
|
|
@@ -62,7 +62,6 @@ const FlowButton = ({ loading, screenId, text, item, userId, roleIds, groupIds,
|
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
const transition = {
|
|
65
|
-
conditionKey,
|
|
66
65
|
parameters: {
|
|
67
66
|
fieldType: conditions,
|
|
68
67
|
permissionType: {
|
|
@@ -72,9 +71,7 @@ const FlowButton = ({ loading, screenId, text, item, userId, roleIds, groupIds,
|
|
|
72
71
|
workspaceRoles: authWorkSpaceRoles,
|
|
73
72
|
customFields: authUserFields,
|
|
74
73
|
creatorAuth,
|
|
75
|
-
conditionKey: userConditionKey,
|
|
76
74
|
},
|
|
77
|
-
fieldTypeConditionKey,
|
|
78
75
|
},
|
|
79
76
|
};
|
|
80
77
|
const checkResult = checkTransition(item, transition, { userId, roleIds, groupIds, workspaceRoleIds }, flowHandlerActive);
|
|
@@ -97,9 +94,6 @@ const FlowButton = ({ loading, screenId, text, item, userId, roleIds, groupIds,
|
|
|
97
94
|
roleIds,
|
|
98
95
|
groupIds,
|
|
99
96
|
workspaceRoleIds,
|
|
100
|
-
conditionKey,
|
|
101
|
-
fieldTypeConditionKey,
|
|
102
|
-
userConditionKey,
|
|
103
97
|
flowHandlerActive,
|
|
104
98
|
]);
|
|
105
99
|
useEffect(() => {
|