@giteeteam/apps-team-components 1.3.0-alpha.1 → 1.3.0-alpha.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/dist/components/common/EmptyField.d.ts +0 -1
- package/dist/components/common/EmptyField.js +7 -5
- package/dist/components/common/PriceTag.js +11 -8
- package/dist/components/common/expand-component/index.d.ts +0 -1
- package/dist/components/common/expand-component/index.js +12 -10
- package/dist/components/common/expand-component/style.js +4 -2
- package/dist/components/common/item-icon/ItemIcon.d.ts +0 -1
- package/dist/components/common/item-icon/ItemIcon.js +6 -4
- package/dist/components/common/overflow-tooltip/BaseOverflowTooltip.d.ts +0 -1
- package/dist/components/common/overflow-tooltip/BaseOverflowTooltip.js +9 -6
- package/dist/components/common/overflow-tooltip/OverflowTooltip.js +9 -6
- package/dist/components/common/overflow-tooltip/SimpleOverflowToolTip.js +8 -5
- package/dist/components/common/overflow-tooltip/style/index.js +5 -3
- package/dist/components/common/style/global.js +3 -1
- package/dist/components/common/style/mixin.js +6 -3
- package/dist/components/common/user-field/UserAvatar.js +8 -6
- package/dist/components/common/user-field/style/index.js +5 -3
- package/dist/components/common/utils.js +13 -9
- package/dist/components/default-empty-icon/config.js +11 -6
- package/dist/components/default-empty-icon/index.js +10 -9
- package/dist/components/default-empty-icon/style.js +15 -12
- package/dist/components/default-empty-icon/types.js +3 -1
- package/dist/components/field-behavior/fields/type.js +5 -2
- package/dist/components/fields/actors/BaseField.js +5 -2
- package/dist/components/fields/actors/ReadView.d.ts +0 -1
- package/dist/components/fields/actors/ReadView.js +8 -6
- package/dist/components/fields/ancestor/ReadView.js +8 -6
- package/dist/components/fields/ancestor/utils.js +4 -12
- package/dist/components/fields/assignee/ReadView.d.ts +0 -1
- package/dist/components/fields/assignee/ReadView.js +13 -11
- package/dist/components/fields/base-component/utils.js +3 -1
- package/dist/components/fields/bind-workspace/ReadView.d.ts +0 -1
- package/dist/components/fields/bind-workspace/ReadView.js +11 -9
- package/dist/components/fields/bind-workspace/hooks.js +7 -4
- package/dist/components/fields/bind-workspace/style/index.js +3 -1
- package/dist/components/fields/cascade/ReadView.js +8 -6
- package/dist/components/fields/cascade/utils.js +4 -3
- package/dist/components/fields/checkbox/ReadView.d.ts +0 -1
- package/dist/components/fields/checkbox/ReadView.js +7 -5
- package/dist/components/fields/created-at/ReadView.js +10 -8
- package/dist/components/fields/created-by/ReadView.d.ts +0 -1
- package/dist/components/fields/created-by/ReadView.js +11 -9
- package/dist/components/fields/data-quote/ReadView.js +12 -10
- package/dist/components/fields/data-quote/utils.js +5 -3
- package/dist/components/fields/date/ReadView.d.ts +0 -1
- package/dist/components/fields/date/ReadView.js +8 -6
- package/dist/components/fields/dropdown/BaseField.js +42 -40
- package/dist/components/fields/dropdown/Cell.d.ts +0 -1
- package/dist/components/fields/dropdown/Cell.js +6 -4
- package/dist/components/fields/dropdown/ReadView.d.ts +0 -1
- package/dist/components/fields/dropdown/ReadView.js +10 -8
- package/dist/components/fields/dropdown/data.d.ts +1 -1
- package/dist/components/fields/dropdown/data.js +6 -3
- package/dist/components/fields/dropdown/hook.d.ts +0 -1
- package/dist/components/fields/dropdown/hook.js +11 -8
- package/dist/components/fields/dropdown/style.js +21 -18
- package/dist/components/fields/file/ReadView.d.ts +0 -1
- package/dist/components/fields/file/ReadView.js +7 -5
- package/dist/components/fields/formula/ReadView.d.ts +0 -1
- package/dist/components/fields/formula/ReadView.js +7 -5
- package/dist/components/fields/hooks/useViewClass.js +4 -2
- package/dist/components/fields/hyper-link/ReadView.d.ts +0 -1
- package/dist/components/fields/hyper-link/ReadView.js +8 -6
- package/dist/components/fields/hyper-link/style/index.js +7 -4
- package/dist/components/fields/item-group/ReadView.d.ts +0 -1
- package/dist/components/fields/item-group/ReadView.js +6 -4
- package/dist/components/fields/item-type/ItemTypeIcon.js +15 -17
- package/dist/components/fields/item-type/ReadView.d.ts +0 -1
- package/dist/components/fields/item-type/ReadView.js +7 -5
- package/dist/components/fields/item-type/style/index.js +3 -1
- package/dist/components/fields/key/ReadView.d.ts +0 -1
- package/dist/components/fields/key/ReadView.js +7 -5
- package/dist/components/fields/long-text/ReadView.d.ts +0 -1
- package/dist/components/fields/long-text/ReadView.js +8 -6
- package/dist/components/fields/long-text/style/index.js +3 -1
- package/dist/components/fields/number/BaseField.js +5 -2
- package/dist/components/fields/number/ReadView.d.ts +0 -1
- package/dist/components/fields/number/ReadView.js +8 -6
- package/dist/components/fields/priority/ReadView.js +12 -10
- package/dist/components/fields/priority/style/index.js +11 -8
- package/dist/components/fields/radio/ReadView.d.ts +0 -1
- package/dist/components/fields/radio/ReadView.js +8 -6
- package/dist/components/fields/repo-files/ReadView.js +8 -6
- package/dist/components/fields/repo-files/utils.js +5 -3
- package/dist/components/fields/reporter/ReadView.d.ts +0 -1
- package/dist/components/fields/reporter/ReadView.js +11 -9
- package/dist/components/fields/script/BaseField.js +4 -1
- package/dist/components/fields/script/ReadView.d.ts +0 -1
- package/dist/components/fields/script/ReadView.js +10 -8
- package/dist/components/fields/sprint/ReadView.js +7 -5
- package/dist/components/fields/status/Cell.js +8 -6
- package/dist/components/fields/status/Field.d.ts +0 -1
- package/dist/components/fields/status/ReadView.js +10 -8
- package/dist/components/fields/status/SelectFlowHandler.js +15 -12
- package/dist/components/fields/status/SelectTransition.js +13 -10
- package/dist/components/fields/status/Transition.js +18 -15
- package/dist/components/fields/status/TransitionButton.js +17 -14
- package/dist/components/fields/status/TransitionPanel.js +14 -11
- package/dist/components/fields/status/View.js +11 -8
- package/dist/components/fields/status/style/index.js +36 -59
- package/dist/components/fields/story-point/ReadView.d.ts +0 -1
- package/dist/components/fields/story-point/ReadView.js +6 -4
- package/dist/components/fields/tag/ReadView.js +10 -8
- package/dist/components/fields/tag/style/index.js +3 -1
- package/dist/components/fields/team/ReadView.js +10 -8
- package/dist/components/fields/team/style/index.js +4 -2
- package/dist/components/fields/text/BaseField.d.ts +0 -1
- package/dist/components/fields/text/ReadView.js +8 -6
- package/dist/components/fields/tree/ReadView.js +10 -8
- package/dist/components/fields/tree/utils.js +5 -3
- package/dist/components/fields/updated-at/ReadView.js +10 -8
- package/dist/components/fields/updated-by/ReadView.d.ts +0 -1
- package/dist/components/fields/updated-by/ReadView.js +11 -9
- package/dist/components/fields/user/ReadView.d.ts +0 -1
- package/dist/components/fields/user/ReadView.js +11 -9
- package/dist/components/fields/user/style/index.js +7 -4
- package/dist/components/fields/user-group/BaseField.d.ts +0 -1
- package/dist/components/fields/user-group/ReadView.js +11 -13
- package/dist/components/fields/version/ReadView.js +8 -6
- package/dist/components/fields/workspace/ReadView.d.ts +0 -1
- package/dist/components/fields/workspace/ReadView.js +10 -8
- package/dist/components/filters/filter-search/utils.js +6 -6
- package/dist/components/item/hooks.js +5 -2
- package/dist/components/table-components/EditTableCell.js +6 -3
- package/dist/components/table-components/index.js +14 -11
- package/dist/components/table-components/style/index.js +3 -1
- package/dist/components/table-components/utils.js +49 -46
- package/dist/icons/SyncIconFont.js +7 -5
- package/dist/icons/createFromIconFontClass.js +3 -1
- package/dist/icons/empty-icon/index.d.ts +8 -1
- package/dist/icons/empty-icon/large-item@2x.png.js +3 -0
- package/dist/icons/empty-icon/large-workspace@2x.png.js +3 -0
- package/dist/icons/empty-icon/small-default@2x.png.js +3 -0
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +37 -35
- package/dist/icons/style/index.js +4 -2
- package/dist/icons/svg/ArrowBack.svg.js +3 -0
- package/dist/icons/svg/Done.svg.js +3 -0
- package/dist/icons/svg/DottedCircle.svg.js +3 -0
- package/dist/icons/svg/HollowCircle.svg.js +3 -0
- package/dist/icons/svg/Search.svg.js +3 -0
- package/dist/icons/svg/Workflow.svg.js +3 -0
- package/dist/index.js +47 -47
- package/dist/lib/app/utils.d.ts +0 -1
- package/dist/lib/app/utils.js +4 -2
- package/dist/lib/array.js +5 -44
- package/dist/lib/config.js +8 -6
- package/dist/lib/constants/code.js +3 -1
- package/dist/lib/constants/field.js +5 -2
- package/dist/lib/contexts/antdConfig.js +10 -7
- package/dist/lib/contexts/currentUser.js +7 -4
- package/dist/lib/contexts/currentWorkspace.js +7 -4
- package/dist/lib/contexts/datetimeFormat.js +7 -4
- package/dist/lib/contexts/index.js +16 -13
- package/dist/lib/contexts/itemConfig.js +7 -4
- package/dist/lib/contexts/teamConfig.js +8 -5
- package/dist/lib/contexts/tenant.js +7 -4
- package/dist/lib/contexts/workflowConfig.js +7 -4
- package/dist/lib/dataType.js +4 -5
- package/dist/lib/date.js +11 -52
- package/dist/lib/dayjs.js +2 -1
- package/dist/lib/error/log.js +7 -4
- package/dist/lib/error/utils.d.ts +1 -1
- package/dist/lib/error/utils.js +8 -20
- package/dist/lib/error/withServerError.js +3 -1
- package/dist/lib/fetch.js +23 -54
- package/dist/lib/global.js +16 -14
- package/dist/lib/hooks/useAntdConfig.js +4 -2
- package/dist/lib/hooks/useCurrentUser.js +4 -2
- package/dist/lib/hooks/useCurrentWorkspace.js +4 -2
- package/dist/lib/hooks/useDataQuoteStore.js +8 -5
- package/dist/lib/hooks/useDateTimeFormatType.js +4 -2
- package/dist/lib/hooks/useI18n.d.ts +1 -1
- package/dist/lib/hooks/useI18n.js +4 -2
- package/dist/lib/hooks/useItemConfig.js +4 -2
- package/dist/lib/hooks/useTeamConfig.js +4 -2
- package/dist/lib/hooks/useTenant.js +4 -2
- package/dist/lib/hooks/useWorkflowConfig.js +4 -2
- package/dist/lib/i18n.js +6 -3
- package/dist/lib/icons/utils.js +10 -9
- package/dist/lib/isInOne.js +2 -1
- package/dist/lib/number.js +3 -1
- package/dist/lib/path.d.ts +2 -2
- package/dist/lib/path.js +9 -6
- package/dist/lib/regExp.js +3 -1
- package/dist/lib/router.js +4 -1
- package/dist/lib/storage.js +4 -39
- package/dist/lib/store/dataQuoteStore.js +5 -2
- package/dist/lib/swr/constants.js +4 -2
- package/dist/lib/swr/hooks.js +6 -3
- package/dist/lib/swr/throttleWithCache.js +7 -5
- package/dist/lib/throttleFetch.js +4 -2
- package/dist/lib/useConfig.js +9 -6
- package/dist/lib/useUser.js +9 -6
- package/dist/lib/users.js +5 -2
- package/dist/lib/workflow.js +21 -20
- package/dist/locales/index.js +5 -3
- package/dist/style/common.js +11 -24
- package/dist/style/global.js +3 -1
- package/package.json +8 -2
- package/dist/components/fields/base-component/types.js +0 -1
- package/dist/components/fields/hooks/useParamsAdapter.js +0 -1
- package/dist/components/fields/radio/BaseField.js +0 -1
- package/dist/components/fields/status/Field.js +0 -1
- package/dist/components/fields/tag/BaseField.js +0 -1
- package/dist/components/fields/text/BaseField.js +0 -1
- package/dist/components/fields/tree/BaseField.js +0 -1
- package/dist/components/fields/tree/types.js +0 -1
- package/dist/components/fields/types.js +0 -1
- package/dist/components/fields/user-group/ActionCell.js +0 -1
- package/dist/components/fields/user-group/BaseField.js +0 -1
- package/dist/icons/empty-icon/index.js +0 -8
- package/dist/icons/svg/ArrowBack.svg +0 -1
- package/dist/icons/svg/Done.svg +0 -1
- package/dist/icons/svg/DottedCircle.svg +0 -7
- package/dist/icons/svg/HollowCircle.svg +0 -6
- package/dist/icons/svg/Search.svg +0 -1
- package/dist/icons/svg/Workflow.svg +0 -12
- package/dist/lib/error/index.js +0 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { statusCellMinWidth, fieldLabelColor, themeBgColorBase, gray7 } from '../../../../style/common.js';
|
|
2
|
+
|
|
3
|
+
const readViewWrapper = `
|
|
3
4
|
display: -webkit-box;
|
|
4
5
|
align-items: center;
|
|
5
6
|
justify-content: center;
|
|
@@ -12,11 +13,11 @@ export const readViewWrapper = `
|
|
|
12
13
|
text-align: center;
|
|
13
14
|
border-radius: 4px;
|
|
14
15
|
`;
|
|
15
|
-
|
|
16
|
+
const workflowContentStyle = `
|
|
16
17
|
max-width: 200px;
|
|
17
18
|
text-align: left;
|
|
18
19
|
`;
|
|
19
|
-
|
|
20
|
+
const statePopoverStyle = (antPrefix) => `
|
|
20
21
|
z-index: 999 !important;
|
|
21
22
|
|
|
22
23
|
div.${antPrefix}-popover-inner-content, div.${antPrefix}-popover-inner {
|
|
@@ -29,16 +30,16 @@ export const statePopoverStyle = (antPrefix) => `
|
|
|
29
30
|
border-width: 0;
|
|
30
31
|
}
|
|
31
32
|
`;
|
|
32
|
-
|
|
33
|
+
const flowNextStyle = `
|
|
33
34
|
max-height: 260px;
|
|
34
35
|
padding-top: 10px;
|
|
35
36
|
overflow: auto;
|
|
36
37
|
margin: -12px;
|
|
37
38
|
`;
|
|
38
|
-
|
|
39
|
+
const flowWrapperStyle = `
|
|
39
40
|
padding: 4px 0;
|
|
40
41
|
`;
|
|
41
|
-
|
|
42
|
+
const flowStateStyle = `
|
|
42
43
|
min-width: ${statusCellMinWidth};
|
|
43
44
|
height: 24px;
|
|
44
45
|
padding: 0 18px 0 8px;
|
|
@@ -55,7 +56,7 @@ export const flowStateStyle = `
|
|
|
55
56
|
text-decoration: none !important;
|
|
56
57
|
}
|
|
57
58
|
`;
|
|
58
|
-
|
|
59
|
+
const flowStateInWorkflowStyle = `
|
|
59
60
|
&.status-btn:not(.add-weights) {
|
|
60
61
|
min-width: ${statusCellMinWidth};
|
|
61
62
|
height: 22px;
|
|
@@ -73,25 +74,25 @@ export const flowStateInWorkflowStyle = `
|
|
|
73
74
|
justify-content: center;
|
|
74
75
|
}
|
|
75
76
|
`;
|
|
76
|
-
|
|
77
|
+
const flowStateButtonStyle = `
|
|
77
78
|
&:not(.add-weights) > span {
|
|
78
79
|
display: -webkit-box;
|
|
79
80
|
}
|
|
80
81
|
`;
|
|
81
|
-
|
|
82
|
+
const stateBtnStyle = `
|
|
82
83
|
height: 22px;
|
|
83
84
|
line-height: 22px;
|
|
84
85
|
`;
|
|
85
|
-
|
|
86
|
+
const noStateStyle = `
|
|
86
87
|
color: ${fieldLabelColor};
|
|
87
88
|
background: ${themeBgColorBase};
|
|
88
89
|
`;
|
|
89
|
-
|
|
90
|
+
const caretDownStyle = `
|
|
90
91
|
padding-left: 2px;
|
|
91
92
|
margin-left: 0;
|
|
92
93
|
line-height: 10px;
|
|
93
94
|
`;
|
|
94
|
-
|
|
95
|
+
const statusViewGlobalStyle = `
|
|
95
96
|
.field-layout.status-view {
|
|
96
97
|
position: relative;
|
|
97
98
|
padding: 10px;
|
|
@@ -111,17 +112,17 @@ export const statusViewGlobalStyle = `
|
|
|
111
112
|
vertical-align: middle;
|
|
112
113
|
}
|
|
113
114
|
`;
|
|
114
|
-
|
|
115
|
+
const tipLineStyle = `
|
|
115
116
|
margin-bottom: 0;
|
|
116
117
|
`;
|
|
117
|
-
|
|
118
|
+
const tooltipStyle = `
|
|
118
119
|
width: 98px;
|
|
119
120
|
`;
|
|
120
|
-
|
|
121
|
+
const iconStyle = `
|
|
121
122
|
padding: 0 6px;
|
|
122
123
|
color: ${gray7};
|
|
123
124
|
`;
|
|
124
|
-
|
|
125
|
+
const stateBoxStyle = `
|
|
125
126
|
display: flex;
|
|
126
127
|
width: 98px;
|
|
127
128
|
|
|
@@ -129,7 +130,7 @@ export const stateBoxStyle = `
|
|
|
129
130
|
padding-right: 8px;
|
|
130
131
|
}
|
|
131
132
|
`;
|
|
132
|
-
|
|
133
|
+
const flowBtnStyle = `
|
|
133
134
|
display: flex;
|
|
134
135
|
padding: 5px 10px;
|
|
135
136
|
margin: 0;
|
|
@@ -138,46 +139,46 @@ export const flowBtnStyle = `
|
|
|
138
139
|
background-color: var(--select-item-selected-bg, #e6f3ff);
|
|
139
140
|
}
|
|
140
141
|
`;
|
|
141
|
-
|
|
142
|
+
const notAllowedStyle = `
|
|
142
143
|
cursor: not-allowed;
|
|
143
144
|
opacity: 0.3;
|
|
144
145
|
`;
|
|
145
|
-
|
|
146
|
+
const pointerStyle = `
|
|
146
147
|
cursor: pointer;
|
|
147
148
|
`;
|
|
148
|
-
|
|
149
|
+
const spinStyle = `
|
|
149
150
|
width: 150px;
|
|
150
151
|
height: 50px;
|
|
151
152
|
`;
|
|
152
|
-
|
|
153
|
+
const noPermissionStyle = `
|
|
153
154
|
display: block;
|
|
154
155
|
width: 120px;
|
|
155
156
|
padding: 20px 10px 10px;
|
|
156
157
|
font-size: 12px;
|
|
157
158
|
color: #2e405e;
|
|
158
159
|
`;
|
|
159
|
-
|
|
160
|
+
const overflowStyle = `
|
|
160
161
|
display: flex;
|
|
161
162
|
margin-top: 4px;
|
|
162
163
|
`;
|
|
163
|
-
|
|
164
|
+
const overflowStyleText = `
|
|
164
165
|
font-size: 13px;
|
|
165
166
|
line-height: 24px;
|
|
166
167
|
color: ${gray7};
|
|
167
168
|
flex: 1;
|
|
168
169
|
`;
|
|
169
|
-
|
|
170
|
+
const headerFlowStyle = `
|
|
170
171
|
text-align: right;
|
|
171
172
|
`;
|
|
172
|
-
|
|
173
|
+
const headerStateStyle = `
|
|
173
174
|
& > span {
|
|
174
175
|
display: inline-block !important;
|
|
175
176
|
}
|
|
176
177
|
`;
|
|
177
|
-
|
|
178
|
+
const FlowHandlerWrapper = `
|
|
178
179
|
width: 216px;
|
|
179
180
|
`;
|
|
180
|
-
|
|
181
|
+
const FlowHandlerHeader = `
|
|
181
182
|
position: relative;
|
|
182
183
|
font-size: 14px;
|
|
183
184
|
text-align: center;
|
|
@@ -194,7 +195,7 @@ export const FlowHandlerHeader = `
|
|
|
194
195
|
width: 16px !important;
|
|
195
196
|
}
|
|
196
197
|
`;
|
|
197
|
-
|
|
198
|
+
const FlowHandlerSearchWrapper = `
|
|
198
199
|
margin: 0 -12px;
|
|
199
200
|
padding: 5px 10px;
|
|
200
201
|
border-top: 1px solid #f1f2f4;
|
|
@@ -216,33 +217,7 @@ export const FlowHandlerSearchWrapper = `
|
|
|
216
217
|
box-shadow: none !important;
|
|
217
218
|
}
|
|
218
219
|
`;
|
|
219
|
-
|
|
220
|
-
margin: 0 -12px;
|
|
221
|
-
padding: 9px 10px;
|
|
222
|
-
.icon-arrow-down {
|
|
223
|
-
position: relative;
|
|
224
|
-
top: 2px;
|
|
225
|
-
color: #b5bac5;
|
|
226
|
-
font-size: 16px !important;
|
|
227
|
-
width: 16px !important;
|
|
228
|
-
}
|
|
229
|
-
.select-input {
|
|
230
|
-
border: none;
|
|
231
|
-
display: inline-block;
|
|
232
|
-
width: 196px;
|
|
233
|
-
outline: none;
|
|
234
|
-
fill: none;
|
|
235
|
-
box-shadow: none;
|
|
236
|
-
&:focus {
|
|
237
|
-
box-shadow: none;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
.select-input::placeholder {
|
|
241
|
-
color: #b5bac5;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
`;
|
|
245
|
-
export const FlowHandlerSelectMessage = `
|
|
220
|
+
const FlowHandlerSelectMessage = `
|
|
246
221
|
margin: 0 -12px;
|
|
247
222
|
padding: 6px 12px;
|
|
248
223
|
display: flex;
|
|
@@ -280,7 +255,7 @@ export const FlowHandlerSelectMessage = `
|
|
|
280
255
|
}
|
|
281
256
|
}
|
|
282
257
|
`;
|
|
283
|
-
|
|
258
|
+
const FlowHandlerSelectContent = `
|
|
284
259
|
min-height: 200px;
|
|
285
260
|
max-height: 200px;
|
|
286
261
|
overflow-y: auto;
|
|
@@ -289,7 +264,7 @@ export const FlowHandlerSelectContent = `
|
|
|
289
264
|
height: 200px !important;
|
|
290
265
|
}
|
|
291
266
|
`;
|
|
292
|
-
|
|
267
|
+
const FlowHandlerSelectItem = `
|
|
293
268
|
position: relative;
|
|
294
269
|
margin: 0 4px;
|
|
295
270
|
padding: 5px 12px;
|
|
@@ -317,9 +292,11 @@ export const FlowHandlerSelectItem = `
|
|
|
317
292
|
font-weight: 600;
|
|
318
293
|
}
|
|
319
294
|
`;
|
|
320
|
-
|
|
295
|
+
const FlowHandlerSubmitWrapper = `
|
|
321
296
|
border-top: 1px solid #f1f2f4;
|
|
322
297
|
padding: 6px 6px 6px 0;
|
|
323
298
|
margin: 0 -12px -12px -12px;
|
|
324
299
|
text-align: right;
|
|
325
300
|
`;
|
|
301
|
+
|
|
302
|
+
export { FlowHandlerHeader, FlowHandlerSearchWrapper, FlowHandlerSelectContent, FlowHandlerSelectItem, FlowHandlerSelectMessage, FlowHandlerSubmitWrapper, FlowHandlerWrapper, caretDownStyle, flowBtnStyle, flowNextStyle, flowStateButtonStyle, flowStateInWorkflowStyle, flowStateStyle, flowWrapperStyle, headerFlowStyle, headerStateStyle, iconStyle, noPermissionStyle, noStateStyle, notAllowedStyle, overflowStyle, overflowStyleText, pointerStyle, readViewWrapper, spinStyle, stateBoxStyle, stateBtnStyle, statePopoverStyle, statusViewGlobalStyle, tipLineStyle, tooltipStyle, workflowContentStyle };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import NumberReadView from '../number/ReadView';
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import NumberReadView from '../number/ReadView.js';
|
|
3
|
+
|
|
3
4
|
const StoryPointReadView = props => {
|
|
4
|
-
return
|
|
5
|
+
return jsx(NumberReadView, { ...props });
|
|
5
6
|
};
|
|
6
7
|
StoryPointReadView.displayName = 'StoryPointReadView';
|
|
7
|
-
|
|
8
|
+
|
|
9
|
+
export { StoryPointReadView as default };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx, Fragment } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { memo, useMemo } from 'react';
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import { Tag
|
|
4
|
+
import { Tag } from 'antd';
|
|
5
5
|
import { isObject } from 'lodash-es';
|
|
6
|
-
import EmptyField from '../../common/EmptyField';
|
|
7
|
-
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
|
|
8
|
-
import { baseTagStyle } from './style';
|
|
6
|
+
import EmptyField from '../../common/EmptyField.js';
|
|
7
|
+
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
|
|
8
|
+
import { baseTagStyle } from './style/index.js';
|
|
9
|
+
|
|
9
10
|
const TagReadView = memo(({ value }) => {
|
|
10
11
|
const tags = useMemo(() => {
|
|
11
12
|
return Array.isArray(value)
|
|
@@ -14,8 +15,9 @@ const TagReadView = memo(({ value }) => {
|
|
|
14
15
|
})
|
|
15
16
|
: [];
|
|
16
17
|
}, [value]);
|
|
17
|
-
const content = useMemo(() => tags.length ? (tags.map(item => (
|
|
18
|
-
return
|
|
18
|
+
const content = useMemo(() => tags.length ? (tags.map(item => (jsx(Tag, { css: css(baseTagStyle), children: jsx(BaseOverflowTooltip, { title: item, children: item }) }, item)))) : (jsx(EmptyField, { readonly: true })), [tags]);
|
|
19
|
+
return jsx(Fragment, { children: content });
|
|
19
20
|
});
|
|
20
21
|
TagReadView.displayName = 'TagReadView';
|
|
21
|
-
|
|
22
|
+
|
|
23
|
+
export { TagReadView as default };
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import useCurrentWorkspace from '../../../lib/hooks/useCurrentWorkspace';
|
|
5
|
-
import { i18n } from '../../../lib/i18n';
|
|
6
|
-
import EmptyField from '../../common/EmptyField';
|
|
7
|
-
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
|
|
8
|
-
import {
|
|
4
|
+
import useCurrentWorkspace from '../../../lib/hooks/useCurrentWorkspace.js';
|
|
5
|
+
import { i18n } from '../../../lib/i18n.js';
|
|
6
|
+
import EmptyField from '../../common/EmptyField.js';
|
|
7
|
+
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
|
|
8
|
+
import { forbiddenStyle, deletedStyle } from './style/index.js';
|
|
9
|
+
|
|
9
10
|
const TeamReadView = memo(({ value, readonly }) => {
|
|
10
11
|
var _a;
|
|
11
12
|
const hasName = value === null || value === void 0 ? void 0 : value.every(team => team.name);
|
|
12
13
|
const deleted = value === null || value === void 0 ? void 0 : value.every(team => team.deleted);
|
|
13
14
|
const forbidden = value === null || value === void 0 ? void 0 : value.every(team => !team.enable);
|
|
14
15
|
const { workspaceKey } = useCurrentWorkspace();
|
|
15
|
-
return (value === null || value === void 0 ? void 0 : value.length) ? (hasName ? (
|
|
16
|
+
return (value === null || value === void 0 ? void 0 : value.length) ? (hasName ? (jsx(BaseOverflowTooltip, { css: forbidden ? css(forbiddenStyle) : undefined, children: (_a = value === null || value === void 0 ? void 0 : value.map(team => (team.enable ? team.name : `${team.name}(${i18n.t('global.columns.forbiddenActive')})`))) === null || _a === void 0 ? void 0 : _a.join(',') })) : deleted ? (jsx(BaseOverflowTooltip, { css: css(deletedStyle), children: i18n.t('global.haveDelete') })) : null) : (jsx(EmptyField, { readonly: readonly || !workspaceKey }));
|
|
16
17
|
});
|
|
17
18
|
TeamReadView.displayName = 'TeamReadView';
|
|
18
|
-
|
|
19
|
+
|
|
20
|
+
export { TeamReadView as default };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { memo, useMemo } from 'react';
|
|
3
|
-
import EmptyField from '../../common/EmptyField';
|
|
4
|
-
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
|
|
3
|
+
import EmptyField from '../../common/EmptyField.js';
|
|
4
|
+
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
|
|
5
|
+
|
|
5
6
|
const TextReadView = memo(({ value: propsValue = '', addonBefore = '', addonAfter = '', readonly }) => {
|
|
6
7
|
const showValue = useMemo(() => {
|
|
7
8
|
if (propsValue) {
|
|
@@ -10,9 +11,10 @@ const TextReadView = memo(({ value: propsValue = '', addonBefore = '', addonAfte
|
|
|
10
11
|
return '';
|
|
11
12
|
}, [propsValue, addonBefore, addonAfter]);
|
|
12
13
|
if (!showValue) {
|
|
13
|
-
return
|
|
14
|
+
return jsx(EmptyField, { readonly: readonly });
|
|
14
15
|
}
|
|
15
|
-
return
|
|
16
|
+
return jsx(BaseOverflowTooltip, { title: showValue, children: showValue });
|
|
16
17
|
});
|
|
17
18
|
TextReadView.displayName = 'TextReadView';
|
|
18
|
-
|
|
19
|
+
|
|
20
|
+
export { TextReadView as default };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { memo,
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { memo, useState, useMemo, useEffect } from 'react';
|
|
3
3
|
import { cloneDeep } from 'lodash-es';
|
|
4
|
-
import EmptyField from '../../common/EmptyField';
|
|
5
|
-
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
|
|
6
|
-
import {
|
|
4
|
+
import EmptyField from '../../common/EmptyField.js';
|
|
5
|
+
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
|
|
6
|
+
import { toTree, toFlatten } from './utils.js';
|
|
7
|
+
|
|
7
8
|
const TreeReadView = memo(({ value: propsValue, options: originalOptions, multiple, readonly, showParentPath }) => {
|
|
8
9
|
const [value, setValue] = useState(null);
|
|
9
10
|
const { options, optionList } = useMemo(() => {
|
|
@@ -50,9 +51,10 @@ const TreeReadView = memo(({ value: propsValue, options: originalOptions, multip
|
|
|
50
51
|
return showValue;
|
|
51
52
|
}, [value, multiple, optionList]);
|
|
52
53
|
if (!showValue) {
|
|
53
|
-
return
|
|
54
|
+
return jsx(EmptyField, { readonly: readonly });
|
|
54
55
|
}
|
|
55
|
-
return
|
|
56
|
+
return jsx(BaseOverflowTooltip, { title: showValue, children: showValue });
|
|
56
57
|
});
|
|
57
58
|
TreeReadView.displayName = 'TreeReadView';
|
|
58
|
-
|
|
59
|
+
|
|
60
|
+
export { TreeReadView as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const titleDelimiter = '/';
|
|
2
2
|
const addFullTitle = (showParentPath, tree, parentTitle) => {
|
|
3
3
|
if (!tree)
|
|
4
4
|
return;
|
|
@@ -17,7 +17,7 @@ const addFullTitle = (showParentPath, tree, parentTitle) => {
|
|
|
17
17
|
addFullTitle(showParentPath, item.children, nextTitle);
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
const toTree = (data, showParentPath = false) => {
|
|
21
21
|
const temp = {};
|
|
22
22
|
const tree = [];
|
|
23
23
|
for (const i in data) {
|
|
@@ -37,6 +37,8 @@ export const toTree = (data, showParentPath = false) => {
|
|
|
37
37
|
addFullTitle(showParentPath, tree);
|
|
38
38
|
return tree;
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
const toFlatten = (data) => {
|
|
41
41
|
return data.reduce((arr, { id, title, parentId, value, label, fullTitle, children = [] }) => arr.concat([{ id, title, parentId, value, label, fullTitle }], toFlatten(children)), []);
|
|
42
42
|
};
|
|
43
|
+
|
|
44
|
+
export { titleDelimiter, toFlatten, toTree };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { memo, useMemo } from 'react';
|
|
3
|
-
import useDateTimeFormatType from '../../../lib/hooks/useDateTimeFormatType';
|
|
4
|
-
import EmptyField from '../../common/EmptyField';
|
|
5
|
-
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
|
|
6
|
-
import { dateFormat } from '../../common/utils';
|
|
3
|
+
import useDateTimeFormatType from '../../../lib/hooks/useDateTimeFormatType.js';
|
|
4
|
+
import EmptyField from '../../common/EmptyField.js';
|
|
5
|
+
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
|
|
6
|
+
import { dateFormat } from '../../common/utils.js';
|
|
7
|
+
|
|
7
8
|
const UpdatedAtReadView = memo(({ value }) => {
|
|
8
9
|
const dateFormatType = useDateTimeFormatType();
|
|
9
10
|
const showValue = useMemo(() => {
|
|
@@ -13,9 +14,10 @@ const UpdatedAtReadView = memo(({ value }) => {
|
|
|
13
14
|
return '';
|
|
14
15
|
}, [value, dateFormatType]);
|
|
15
16
|
if (!showValue) {
|
|
16
|
-
return
|
|
17
|
+
return jsx(EmptyField, { readonly: true });
|
|
17
18
|
}
|
|
18
|
-
return
|
|
19
|
+
return jsx(BaseOverflowTooltip, { title: showValue, children: showValue });
|
|
19
20
|
});
|
|
20
21
|
UpdatedAtReadView.displayName = 'UpdatedAtReadView';
|
|
21
|
-
|
|
22
|
+
|
|
23
|
+
export { UpdatedAtReadView as default };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { memo, useMemo } from 'react';
|
|
3
3
|
import { ClassNames } from '@emotion/react';
|
|
4
|
-
import { generateUserDisplayName, isUserDeleted, isUserDisabled } from '../../../lib/useUser';
|
|
5
|
-
import EmptyField from '../../common/EmptyField';
|
|
6
|
-
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
|
|
7
|
-
import UserAvatar from '../../common/user-field/UserAvatar';
|
|
8
|
-
import { userDeletedStyle, userDisabledStyle
|
|
4
|
+
import { generateUserDisplayName, isUserDeleted, isUserDisabled } from '../../../lib/useUser.js';
|
|
5
|
+
import EmptyField from '../../common/EmptyField.js';
|
|
6
|
+
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
|
|
7
|
+
import UserAvatar from '../../common/user-field/UserAvatar.js';
|
|
8
|
+
import { usernameStyle, userDeletedStyle, userDisabledStyle } from '../user/style/index.js';
|
|
9
|
+
|
|
9
10
|
const UpdatedByReadView = memo(({ value }) => {
|
|
10
11
|
const showValue = useMemo(() => {
|
|
11
12
|
if (value) {
|
|
@@ -14,9 +15,10 @@ const UpdatedByReadView = memo(({ value }) => {
|
|
|
14
15
|
return '';
|
|
15
16
|
}, [value]);
|
|
16
17
|
if (!showValue) {
|
|
17
|
-
return
|
|
18
|
+
return jsx(EmptyField, { readonly: true });
|
|
18
19
|
}
|
|
19
|
-
return (
|
|
20
|
+
return (jsx(ClassNames, { children: ({ cx, css }) => (jsxs(BaseOverflowTooltip, { title: showValue, maxline: 1, children: [jsx(UserAvatar, { user: value }), jsx("span", { className: cx(css(usernameStyle), isUserDeleted(value) ? css(userDeletedStyle) : '', isUserDisabled(value) ? css(userDisabledStyle) : ''), children: showValue })] })) }));
|
|
20
21
|
});
|
|
21
22
|
UpdatedByReadView.displayName = 'UpdatedByReadView';
|
|
22
|
-
|
|
23
|
+
|
|
24
|
+
export { UpdatedByReadView as default };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { memo, useMemo } from 'react';
|
|
3
3
|
import { ClassNames } from '@emotion/react';
|
|
4
|
-
import {
|
|
5
|
-
import EmptyField from '../../common/EmptyField';
|
|
6
|
-
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
|
|
7
|
-
import { userDeletedStyle, userDisabledStyle } from '
|
|
4
|
+
import { userDataFormat, isUserDeleted, isUserDisabled, generateUserDisplayName } from '../../../lib/useUser.js';
|
|
5
|
+
import EmptyField from '../../common/EmptyField.js';
|
|
6
|
+
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
|
|
7
|
+
import { userDeletedStyle, userDisabledStyle } from './style/index.js';
|
|
8
|
+
|
|
8
9
|
const EMPTY_ARRAY = [];
|
|
9
10
|
const UserReadView = memo(({ value, readonly }) => {
|
|
10
11
|
const displayValues = useMemo(() => {
|
|
11
12
|
return ((value === null || value === void 0 ? void 0 : value.map((val, i) => {
|
|
12
13
|
const item = userDataFormat(val);
|
|
13
|
-
return (
|
|
14
|
+
return (jsxs("span", { children: [i ? ',' : '', jsx(ClassNames, { children: ({ cx, css }) => (jsx("span", { className: cx({ [css(userDeletedStyle)]: isUserDeleted(item) }, { [css(userDisabledStyle)]: isUserDisabled(item) }), children: generateUserDisplayName(item) })) })] }, i));
|
|
14
15
|
})) || EMPTY_ARRAY);
|
|
15
16
|
}, [value]);
|
|
16
17
|
const tooltipValues = useMemo(() => {
|
|
@@ -20,9 +21,10 @@ const UserReadView = memo(({ value, readonly }) => {
|
|
|
20
21
|
});
|
|
21
22
|
}, [value]);
|
|
22
23
|
if (!displayValues.length) {
|
|
23
|
-
return
|
|
24
|
+
return jsx(EmptyField, { readonly: readonly, isUser: true });
|
|
24
25
|
}
|
|
25
|
-
return (
|
|
26
|
+
return (jsx(BaseOverflowTooltip, { title: tooltipValues.join(','), maxline: 1, children: displayValues }));
|
|
26
27
|
});
|
|
27
28
|
UserReadView.displayName = 'UserReadView';
|
|
28
|
-
|
|
29
|
+
|
|
30
|
+
export { UserReadView as default };
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { gray6, gray9 } from '../../../../style/common';
|
|
2
|
-
|
|
1
|
+
import { gray6, gray9 } from '../../../../style/common.js';
|
|
2
|
+
|
|
3
|
+
const userDisabledStyle = `
|
|
3
4
|
color: ${gray6};
|
|
4
5
|
`;
|
|
5
|
-
|
|
6
|
+
const userDeletedStyle = `
|
|
6
7
|
text-decoration: line-through;
|
|
7
8
|
`;
|
|
8
|
-
|
|
9
|
+
const usernameStyle = `
|
|
9
10
|
font-size: 14px;
|
|
10
11
|
line-height: 20px;
|
|
11
12
|
color: ${gray9};
|
|
12
13
|
`;
|
|
14
|
+
|
|
15
|
+
export { userDeletedStyle, userDisabledStyle, usernameStyle };
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { useEffect, useMemo
|
|
3
|
-
import {
|
|
4
|
-
import EmptyField from '../../common/EmptyField';
|
|
5
|
-
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
|
|
6
|
-
import { handleValue } from '../dropdown/BaseField';
|
|
7
|
-
|
|
8
|
-
var _a;
|
|
9
|
-
return (_a = value === null || value === void 0 ? void 0 : value.filter) === null || _a === void 0 ? void 0 : _a.call(value, val => !isNil(val));
|
|
10
|
-
};
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { useState, useEffect, useMemo } from 'react';
|
|
3
|
+
import { isObject } from 'lodash-es';
|
|
4
|
+
import EmptyField from '../../common/EmptyField.js';
|
|
5
|
+
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
|
|
6
|
+
import { handleValue } from '../dropdown/BaseField.js';
|
|
7
|
+
|
|
11
8
|
const UserGroupReadView = props => {
|
|
12
9
|
const { value: propsValue, options, mode, readonly } = props;
|
|
13
10
|
const [value, setValue] = useState([]);
|
|
@@ -49,9 +46,10 @@ const UserGroupReadView = props => {
|
|
|
49
46
|
return showValue;
|
|
50
47
|
}, [mode, value, options]);
|
|
51
48
|
if (!showValue) {
|
|
52
|
-
return
|
|
49
|
+
return jsx(EmptyField, { readonly: readonly });
|
|
53
50
|
}
|
|
54
|
-
return
|
|
51
|
+
return jsx(BaseOverflowTooltip, { title: showValue, children: showValue });
|
|
55
52
|
};
|
|
56
53
|
UserGroupReadView.displayName = 'UserGroupReadView';
|
|
57
|
-
|
|
54
|
+
|
|
55
|
+
export { UserGroupReadView as default };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { memo } from 'react';
|
|
3
|
-
import useCurrentWorkspace from '../../../lib/hooks/useCurrentWorkspace';
|
|
4
|
-
import EmptyField from '../../common/EmptyField';
|
|
5
|
-
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
|
|
3
|
+
import useCurrentWorkspace from '../../../lib/hooks/useCurrentWorkspace.js';
|
|
4
|
+
import EmptyField from '../../common/EmptyField.js';
|
|
5
|
+
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
|
|
6
|
+
|
|
6
7
|
const VersionReadView = memo(({ value, readonly }) => {
|
|
7
8
|
var _a;
|
|
8
9
|
const { workspaceKey } = useCurrentWorkspace();
|
|
9
|
-
return (value === null || value === void 0 ? void 0 : value.length) ? (
|
|
10
|
+
return (value === null || value === void 0 ? void 0 : value.length) ? (jsx(BaseOverflowTooltip, { children: (_a = value === null || value === void 0 ? void 0 : value.map(version => version.name)) === null || _a === void 0 ? void 0 : _a.join(',') })) : (jsx(EmptyField, { readonly: readonly || !workspaceKey }));
|
|
10
11
|
});
|
|
11
12
|
VersionReadView.displayName = 'VersionReadView';
|
|
12
|
-
|
|
13
|
+
|
|
14
|
+
export { VersionReadView as default };
|