@giteeteam/apps-team-components 1.3.0-alpha.2 → 1.3.0-alpha.3

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.
Files changed (69) hide show
  1. package/README.md +21 -21
  2. package/dist/components/common/PriceTag.js +18 -18
  3. package/dist/components/common/expand-component/style.js +6 -6
  4. package/dist/components/common/overflow-tooltip/style/index.js +13 -13
  5. package/dist/components/common/style/global.js +2 -2
  6. package/dist/components/common/style/mixin.js +14 -14
  7. package/dist/components/common/user-field/style/index.js +21 -21
  8. package/dist/components/default-empty-icon/style.js +52 -52
  9. package/dist/components/fields/bind-workspace/style/index.js +3 -3
  10. package/dist/components/fields/dropdown/BaseField.js +11 -0
  11. package/dist/components/fields/dropdown/style.js +72 -72
  12. package/dist/components/fields/hyper-link/style/index.js +14 -14
  13. package/dist/components/fields/item-type/style/index.js +5 -5
  14. package/dist/components/fields/long-text/style/index.js +5 -5
  15. package/dist/components/fields/priority/style/index.js +50 -50
  16. package/dist/components/fields/status/style/index.js +297 -297
  17. package/dist/components/fields/tag/style/index.js +5 -5
  18. package/dist/components/fields/team/style/index.js +2 -2
  19. package/dist/components/fields/user/style/index.js +8 -8
  20. package/dist/components/table-components/EditTableCell.d.ts +1 -0
  21. package/dist/components/table-components/EditTableCell.js +32 -13
  22. package/dist/components/table-components/index.js +1 -1
  23. package/dist/components/table-components/style/index.js +5 -5
  24. package/dist/icons/empty-icon/workspace-empty.svg +126 -126
  25. package/dist/icons/style/index.js +21 -21
  26. package/dist/public/icons/BulbIcon.svg +1 -1
  27. package/dist/public/icons/Cloud.svg +1 -1
  28. package/dist/public/icons/ConsultIcon.svg +1 -1
  29. package/dist/public/icons/Demo.svg +1 -1
  30. package/dist/public/icons/ErrorTemplate.svg +1 -1
  31. package/dist/public/icons/Fail.svg +1 -1
  32. package/dist/public/icons/Flag.svg +1 -1
  33. package/dist/public/icons/GiteeIcon.svg +1 -1
  34. package/dist/public/icons/IntelligenceGradient.svg +1 -1
  35. package/dist/public/icons/Issue_Approval.svg +1 -1
  36. package/dist/public/icons/Issue_Bug.svg +1 -1
  37. package/dist/public/icons/Issue_Demand.svg +1 -1
  38. package/dist/public/icons/Issue_Doc.svg +1 -1
  39. package/dist/public/icons/Issue_Idea.svg +1 -1
  40. package/dist/public/icons/Issue_List.svg +1 -1
  41. package/dist/public/icons/Issue_Plan.svg +1 -1
  42. package/dist/public/icons/Issue_Product.svg +1 -1
  43. package/dist/public/icons/Issue_Risk.svg +1 -1
  44. package/dist/public/icons/Issue_Story.svg +1 -1
  45. package/dist/public/icons/Issue_Subtask.svg +1 -1
  46. package/dist/public/icons/Issue_Task.svg +1 -1
  47. package/dist/public/icons/Issue_Test.svg +1 -1
  48. package/dist/public/icons/Issue_TestExcution.svg +1 -1
  49. package/dist/public/icons/Issue_TestPlan.svg +1 -1
  50. package/dist/public/icons/Issue_Time.svg +1 -1
  51. package/dist/public/icons/Issue_develop.svg +1 -1
  52. package/dist/public/icons/KanbanCover.svg +7 -7
  53. package/dist/public/icons/ListCover.svg +117 -117
  54. package/dist/public/icons/ManHour.svg +1 -1
  55. package/dist/public/icons/MobileIcon.svg +1 -1
  56. package/dist/public/icons/NoItemType.svg +10 -10
  57. package/dist/public/icons/ProductIcon.svg +1 -1
  58. package/dist/public/icons/RedFlagIcon.svg +1 -1
  59. package/dist/public/icons/Safe.svg +1 -1
  60. package/dist/public/icons/StarIcon.svg +60 -60
  61. package/dist/public/icons/StructureCover.svg +1 -1
  62. package/dist/public/icons/Success.svg +1 -1
  63. package/dist/public/icons/TeamIcon.svg +1 -1
  64. package/dist/public/icons/WebIcon.svg +1 -1
  65. package/dist/public/icons/iconfont.svg +467 -467
  66. package/dist/public/icons/iconfont_single_color.css +912 -912
  67. package/dist/public/mockServiceWorker.js +284 -284
  68. package/dist/style/global.js +7 -7
  69. package/package.json +111 -111
package/README.md CHANGED
@@ -1,21 +1,21 @@
1
- # @giteeteam/apps-team-components
2
-
3
- - gitee team components
4
-
5
- ## 安装
6
-
7
- ```bash
8
- pnpm i
9
- ```
10
-
11
- ## 预览
12
- **开发前务必先阅读预览首页文档**
13
- ```
14
- pnpm storybook
15
- ```
16
-
17
- # 1.1.x版本
18
- - team最低版本为4.16.0
19
-
20
- # 1.2.x版本
21
- - team最低版本为4.21.0
1
+ # @giteeteam/apps-team-components
2
+
3
+ - gitee team components
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ pnpm i
9
+ ```
10
+
11
+ ## 预览
12
+ **开发前务必先阅读预览首页文档**
13
+ ```
14
+ pnpm storybook
15
+ ```
16
+
17
+ # 1.1.x版本
18
+ - team最低版本为4.16.0
19
+
20
+ # 1.2.x版本
21
+ - team最低版本为4.21.0
@@ -4,26 +4,26 @@ import { ClassNames } from '@emotion/react';
4
4
  import { i18n } from '../../lib/i18n.js';
5
5
  import SimpleOverflowToolTip from './overflow-tooltip/SimpleOverflowToolTip.js';
6
6
 
7
- const containerStyle = `
8
- display: inline-flex;
9
- align-items: center;
10
- max-width: 100%;
7
+ const containerStyle = `
8
+ display: inline-flex;
9
+ align-items: center;
10
+ max-width: 100%;
11
11
  `;
12
- const textStyle = `
13
- flex: 1;
14
- width: 0;
12
+ const textStyle = `
13
+ flex: 1;
14
+ width: 0;
15
15
  `;
16
- const tagStyle = `
17
- height: 18px;
18
- padding: 0 4px;
19
- margin-left: 8px;
20
- font-size: 12px;
21
- font-weight: 500;
22
- line-height: 18px;
23
- color: #fff;
24
- background: linear-gradient(230deg, #66dbff 0%, #3683ff 100%);
25
- border-radius: 5px 0;
26
- white-space: nowrap;
16
+ const tagStyle = `
17
+ height: 18px;
18
+ padding: 0 4px;
19
+ margin-left: 8px;
20
+ font-size: 12px;
21
+ font-weight: 500;
22
+ line-height: 18px;
23
+ color: #fff;
24
+ background: linear-gradient(230deg, #66dbff 0%, #3683ff 100%);
25
+ border-radius: 5px 0;
26
+ white-space: nowrap;
27
27
  `;
28
28
  const PriceTag = ({ text, className, edition, expired }) => {
29
29
  const isTagVisible = useMemo(() => {
@@ -1,10 +1,10 @@
1
- const expandFooter = `
2
- font-size: 12px;
3
- color: #0c62ff;
4
- text-align: right;
1
+ const expandFooter = `
2
+ font-size: 12px;
3
+ color: #0c62ff;
4
+ text-align: right;
5
5
  `;
6
- const expandBtn = `
7
- cursor: pointer;
6
+ const expandBtn = `
7
+ cursor: pointer;
8
8
  `;
9
9
 
10
10
  export { expandBtn, expandFooter };
@@ -1,19 +1,19 @@
1
- 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
+ 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
- const simpleTooltipStyle = `
10
- overflow: hidden;
11
- text-overflow: ellipsis;
12
- white-space: nowrap;
9
+ const simpleTooltipStyle = `
10
+ overflow: hidden;
11
+ text-overflow: ellipsis;
12
+ white-space: nowrap;
13
13
  `;
14
14
  const getTooltipMaxlineStyle = (n) => {
15
- return `
16
- -webkit-line-clamp: ${n};
15
+ return `
16
+ -webkit-line-clamp: ${n};
17
17
  `;
18
18
  };
19
19
 
@@ -1,5 +1,5 @@
1
- const fieldValueOverlayStyle = `
2
- width: 100%;
1
+ const fieldValueOverlayStyle = `
2
+ width: 100%;
3
3
  `;
4
4
 
5
5
  export { fieldValueOverlayStyle };
@@ -1,20 +1,20 @@
1
1
  import { gray4, gray6 } from '../../../style/common.js';
2
2
 
3
- const hoverStyle = `
4
- box-sizing: border-box;
5
- display: flex;
6
- align-items: center;
7
- justify-content: space-between;
8
- height: 32px;
9
- padding: 0 8px !important;
10
- color: rgb(226 236 255 50%);
11
- border: 1px solid ${gray4};
12
- border-radius: 4px;
3
+ const hoverStyle = `
4
+ box-sizing: border-box;
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: space-between;
8
+ height: 32px;
9
+ padding: 0 8px !important;
10
+ color: rgb(226 236 255 50%);
11
+ border: 1px solid ${gray4};
12
+ border-radius: 4px;
13
13
  `;
14
- const hoverIconStyle = `
15
- display: none;
16
- font-size: 12px;
17
- color: ${gray6};
14
+ const hoverIconStyle = `
15
+ display: none;
16
+ font-size: 12px;
17
+ color: ${gray6};
18
18
  `;
19
19
 
20
20
  export { hoverIconStyle, hoverStyle };
@@ -1,27 +1,27 @@
1
1
  const avatarSize = '20px';
2
- const avatarItemStyle = `
3
- flex-shrink: 0;
2
+ const avatarItemStyle = `
3
+ flex-shrink: 0;
4
4
  `;
5
- 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
+ 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
- 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
+ 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
  `;
26
26
 
27
27
  export { avatarItemStyle, avatarStyle, defaultAvatarStyle };
@@ -10,58 +10,58 @@ const autoMarginClass = randomClassName('auto-margin');
10
10
  const smallDefaultClass = randomClassName('small-default');
11
11
  const largeWorkspaceClass = randomClassName('large-workspace');
12
12
  const largeItemClass = randomClassName('large-item');
13
- const emptyIconWrapper = `
14
- margin-top: 12px;
15
- text-align: center;
16
-
17
- &.${centerClass} {
18
- display: flex;
19
- flex-direction: column;
20
- align-items: center;
21
- justify-content: center;
22
- user-select: none;
23
- }
24
-
25
- &.${smallTextClass} {
26
- .${textClass} {
27
- font-size: 12px;
28
- }
29
- }
30
-
31
- &.${smallMarginClass} {
32
- margin-top: 16px;
33
- }
34
-
35
- &.${largeMarginClass} {
36
- margin-top: 48px;
37
- }
38
-
39
- &.${noMarginClass} {
40
- margin: 0;
41
- }
42
-
43
- &.${autoMarginClass} {
44
- margin: auto;
45
- }
46
-
47
- .${smallDefaultClass} {
48
- width: 90px;
49
- height: 90px;
50
- }
51
-
52
- .${largeWorkspaceClass},
53
- .${largeItemClass} {
54
- width: 180px;
55
- height: 180px;
56
- }
57
-
58
- .${textClass} {
59
- padding: 0;
60
- margin: 12px 0;
61
- font-size: 14px;
62
- line-height: 22px;
63
- color: #848c9f;
64
- }
13
+ const emptyIconWrapper = `
14
+ margin-top: 12px;
15
+ text-align: center;
16
+
17
+ &.${centerClass} {
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ justify-content: center;
22
+ user-select: none;
23
+ }
24
+
25
+ &.${smallTextClass} {
26
+ .${textClass} {
27
+ font-size: 12px;
28
+ }
29
+ }
30
+
31
+ &.${smallMarginClass} {
32
+ margin-top: 16px;
33
+ }
34
+
35
+ &.${largeMarginClass} {
36
+ margin-top: 48px;
37
+ }
38
+
39
+ &.${noMarginClass} {
40
+ margin: 0;
41
+ }
42
+
43
+ &.${autoMarginClass} {
44
+ margin: auto;
45
+ }
46
+
47
+ .${smallDefaultClass} {
48
+ width: 90px;
49
+ height: 90px;
50
+ }
51
+
52
+ .${largeWorkspaceClass},
53
+ .${largeItemClass} {
54
+ width: 180px;
55
+ height: 180px;
56
+ }
57
+
58
+ .${textClass} {
59
+ padding: 0;
60
+ margin: 12px 0;
61
+ font-size: 14px;
62
+ line-height: 22px;
63
+ color: #848c9f;
64
+ }
65
65
  `;
66
66
 
67
67
  export { autoMarginClass, centerClass, emptyIconWrapper, largeItemClass, largeMarginClass, largeWorkspaceClass, noMarginClass, smallDefaultClass, smallMarginClass, smallTextClass, textClass };
@@ -1,6 +1,6 @@
1
- const pointerStyle = `
2
- color: #0c62ff;
3
- cursor: pointer;
1
+ const pointerStyle = `
2
+ color: #0c62ff;
3
+ cursor: pointer;
4
4
  `;
5
5
 
6
6
  export { pointerStyle };
@@ -52,6 +52,7 @@ const Dropdown = props => {
52
52
  const valueRef = useRef([]);
53
53
  const containerRef = useRef(null);
54
54
  const targetRef = useRef(null);
55
+ const onBlurRef = useRef({ time: 0, e: null });
55
56
  const [isClicked, setClicked] = useState(false);
56
57
  const optionLoadedRef = useRef(false);
57
58
  const loadMoreRef = useRef(false);
@@ -430,6 +431,7 @@ const Dropdown = props => {
430
431
  const handleBlur = useCallback(e => {
431
432
  var _a;
432
433
  if (open) {
434
+ onBlurRef.current = { time: Date.now(), e: e };
433
435
  return;
434
436
  }
435
437
  if (!editMode) {
@@ -497,6 +499,15 @@ const Dropdown = props => {
497
499
  });
498
500
  }
499
501
  }, [isMultiple]);
502
+ useEffect(() => {
503
+ if (!open) {
504
+ const now = Date.now();
505
+ if (now > onBlurRef.current.time && now - onBlurRef.current.time < 200) {
506
+ handleBlur(onBlurRef.current.e);
507
+ onBlurRef.current.time = 0;
508
+ }
509
+ }
510
+ }, [handleBlur, open]);
500
511
  const dropdownRender = useCallback(({ cx, css }) => {
501
512
  return menu => {
502
513
  if (!isShowOnlyWorkspace)
@@ -1,16 +1,16 @@
1
1
  import { randomClassName } from '../../../style/common.js';
2
2
  import { hoverStyle, hoverIconStyle } from '../../common/style/mixin.js';
3
3
 
4
- const dropdownSelectDisabled = `
5
- text-decoration: line-through;
4
+ const dropdownSelectDisabled = `
5
+ text-decoration: line-through;
6
6
  `;
7
- const onlyWorkspaceStyle = `
8
- padding: 5px 12px;
7
+ const onlyWorkspaceStyle = `
8
+ padding: 5px 12px;
9
9
  `;
10
- const onlyWorkspaceDividerStyle = `
11
- &:not(.add-weights) {
12
- margin: 4px 0;
13
- }
10
+ const onlyWorkspaceDividerStyle = `
11
+ &:not(.add-weights) {
12
+ margin: 4px 0;
13
+ }
14
14
  `;
15
15
  const hiddenHoverClass = randomClassName('hidden-hover');
16
16
  const displayWrapClass = randomClassName('display-wrap');
@@ -21,73 +21,73 @@ const valueOptionLabelClass = randomClassName('value-option-label');
21
21
  const workspaceClass = randomClassName('workspace');
22
22
  const hoverIconClass = randomClassName('hover-icon');
23
23
  const optionDisplayWrapClass = randomClassName('option-display-wrap');
24
- const dropdownStyle = (antPrefix) => `
25
- width: 100%;
26
-
27
- &:not(.${hiddenHoverClass}) &:not(.${displayWrapClass}) :hover {
28
- ${hoverStyle}
29
-
30
- .${hoverIconClass} {
31
- display: inline-block;
32
- }
33
- }
34
-
35
- .${hoverIconClass} {
36
- ${hoverIconStyle}
37
- }
38
-
39
- .${antPrefix}-select {
40
- width: 100%;
41
- }
42
-
43
- .${antPrefix}-select-selection-item) {
44
- .${workspaceClass} {
45
- display: none;
46
- }
47
- }
48
-
49
- .${valueOptionClass} {
50
- margin-bottom: 8px;
51
- }
52
-
53
- .${valueOptionContentClass} {
54
- width: 100%;
55
- padding-top: 6px;
56
-
57
- .${valueOptionIconClass} {
58
- position: absolute;
59
- margin-top: 3px;
60
- }
61
-
62
- .${valueOptionLabelClass} {
63
- display: inline-block;
64
- width: ~'calc(100% - 22px)';
65
- margin-left: 22px;
66
- overflow: hidden;
67
- text-overflow: ellipsis;
68
- white-space: nowrap;
69
- }
70
- }
71
-
72
- .${optionDisplayWrapClass} {
73
- .${antPrefix}-select-selection-overflow {
74
- display: block;
75
- .${antPrefix}-select-selection-overflow-item {
76
- width: fit-content;
77
- }
78
- }
79
- }
24
+ const dropdownStyle = (antPrefix) => `
25
+ width: 100%;
26
+
27
+ &:not(.${hiddenHoverClass}) &:not(.${displayWrapClass}) :hover {
28
+ ${hoverStyle}
29
+
30
+ .${hoverIconClass} {
31
+ display: inline-block;
32
+ }
33
+ }
34
+
35
+ .${hoverIconClass} {
36
+ ${hoverIconStyle}
37
+ }
38
+
39
+ .${antPrefix}-select {
40
+ width: 100%;
41
+ }
42
+
43
+ .${antPrefix}-select-selection-item) {
44
+ .${workspaceClass} {
45
+ display: none;
46
+ }
47
+ }
48
+
49
+ .${valueOptionClass} {
50
+ margin-bottom: 8px;
51
+ }
52
+
53
+ .${valueOptionContentClass} {
54
+ width: 100%;
55
+ padding-top: 6px;
56
+
57
+ .${valueOptionIconClass} {
58
+ position: absolute;
59
+ margin-top: 3px;
60
+ }
61
+
62
+ .${valueOptionLabelClass} {
63
+ display: inline-block;
64
+ width: ~'calc(100% - 22px)';
65
+ margin-left: 22px;
66
+ overflow: hidden;
67
+ text-overflow: ellipsis;
68
+ white-space: nowrap;
69
+ }
70
+ }
71
+
72
+ .${optionDisplayWrapClass} {
73
+ .${antPrefix}-select-selection-overflow {
74
+ display: block;
75
+ .${antPrefix}-select-selection-overflow-item {
76
+ width: fit-content;
77
+ }
78
+ }
79
+ }
80
80
  `;
81
81
  const dropdownSelectOptionClass = randomClassName('dropdown-select-option');
82
82
  const disabledClass = randomClassName('disabled');
83
- const dropdownSelectStyle = (antPrefix) => `
84
- .${dropdownSelectOptionClass}.${disabledClass} {
85
- text-decoration: line-through;
86
- }
87
-
88
- .${antPrefix}-select-selection-item-content {
89
- text-decoration: line-through;
90
- }
83
+ const dropdownSelectStyle = (antPrefix) => `
84
+ .${dropdownSelectOptionClass}.${disabledClass} {
85
+ text-decoration: line-through;
86
+ }
87
+
88
+ .${antPrefix}-select-selection-item-content {
89
+ text-decoration: line-through;
90
+ }
91
91
  `;
92
92
 
93
93
  export { disabledClass, displayWrapClass, dropdownSelectDisabled, dropdownSelectOptionClass, dropdownSelectStyle, dropdownStyle, hiddenHoverClass, hoverIconClass, onlyWorkspaceDividerStyle, onlyWorkspaceStyle, optionDisplayWrapClass, valueOptionClass, valueOptionContentClass, valueOptionIconClass, valueOptionLabelClass, workspaceClass };
@@ -1,21 +1,21 @@
1
1
  import { blue6 } from '../../../../style/common.js';
2
2
 
3
- const hyperLinkListStyle = `
4
- display: flex;
5
- width: 100%;
3
+ const hyperLinkListStyle = `
4
+ display: flex;
5
+ width: 100%;
6
6
  `;
7
- const hyperLinkItemStyle = `
8
- ${hyperLinkListStyle} & {
9
- overflow: hidden;
10
- color: @blue-6;
11
- text-overflow: ellipsis;
12
- white-space: nowrap;
13
- -webkit-line-clamp: 1;
14
- }
7
+ const hyperLinkItemStyle = `
8
+ ${hyperLinkListStyle} & {
9
+ overflow: hidden;
10
+ color: @blue-6;
11
+ text-overflow: ellipsis;
12
+ white-space: nowrap;
13
+ -webkit-line-clamp: 1;
14
+ }
15
15
  `;
16
- const hyperLinkTipItem = `
17
- display: block;
18
- color: ${blue6};
16
+ const hyperLinkTipItem = `
17
+ display: block;
18
+ color: ${blue6};
19
19
  `;
20
20
 
21
21
  export { hyperLinkItemStyle, hyperLinkListStyle, hyperLinkTipItem };
@@ -1,8 +1,8 @@
1
- const nameItemTypeImg = `
2
- width: 16px;
3
- height: 16px;
4
- margin-right: 8px;
5
- font-size: 16px;
1
+ const nameItemTypeImg = `
2
+ width: 16px;
3
+ height: 16px;
4
+ margin-right: 8px;
5
+ font-size: 16px;
6
6
  `;
7
7
 
8
8
  export { nameItemTypeImg };
@@ -1,8 +1,8 @@
1
- const whiteSpacePreStyle = `
2
- padding-top: 5px;
3
- padding-bottom: 5px;
4
- word-break: break-all;
5
- white-space: pre-wrap;
1
+ const whiteSpacePreStyle = `
2
+ padding-top: 5px;
3
+ padding-bottom: 5px;
4
+ word-break: break-all;
5
+ white-space: pre-wrap;
6
6
  `;
7
7
 
8
8
  export { whiteSpacePreStyle };