@titaui/pc 1.5.69-beta.2 → 1.5.69-beta.23

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 (151) hide show
  1. package/lib/components/avatar/icon-avatar/index.js +1 -1
  2. package/lib/components/avatar/index.js +5 -1
  3. package/lib/components/avatar/num-avatar/index.css +12 -0
  4. package/lib/components/avatar/num-avatar/index.js +34 -0
  5. package/lib/components/button/default-button/index.css +49 -0
  6. package/lib/components/button/default-button/index.js +51 -0
  7. package/lib/components/button/index.js +8 -2
  8. package/lib/components/communication/CommunicationRecord.js +110 -162
  9. package/lib/components/communication/index.css +4 -0
  10. package/lib/components/communication/index.js +34 -25
  11. package/lib/components/communication/style.js +1 -1
  12. package/lib/components/create-okr/index.css +4 -0
  13. package/lib/components/create-okr/index.js +43 -31
  14. package/lib/components/dropdown-layer/index.js +15 -12
  15. package/lib/components/dynamic/components/condition-render/index.js +20 -0
  16. package/lib/components/dynamic/components/dynamic-search-input/index.css +6 -0
  17. package/lib/components/dynamic/components/dynamic-search-input/index.js +4 -2
  18. package/lib/components/dynamic/components/obj-status/index.css +22 -0
  19. package/lib/components/dynamic/components/obj-status/index.js +38 -0
  20. package/lib/components/dynamic/components/percent/index.css +21 -0
  21. package/lib/components/dynamic/components/percent/index.js +38 -0
  22. package/lib/components/dynamic/components/title/index.css +35 -0
  23. package/lib/components/dynamic/{dynamic-item/components/publish-content → components/title}/index.js +27 -31
  24. package/lib/components/dynamic/constant.js +19 -2
  25. package/lib/components/dynamic/dynamic-item/components/{dynamic-item-header → header}/index.css +1 -1
  26. package/lib/components/dynamic/dynamic-item/components/{dynamic-item-header → header}/index.js +97 -73
  27. package/lib/components/dynamic/dynamic-item/components/icon/index.css +10 -0
  28. package/lib/components/dynamic/dynamic-item/components/icon/index.js +35 -0
  29. package/lib/components/dynamic/dynamic-item/{components/align → dynamic-align}/img/dynamic-align.svg +0 -0
  30. package/lib/components/dynamic/dynamic-item/{components/align → dynamic-align}/img/dynamic-relative.svg +0 -0
  31. package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +95 -0
  32. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +173 -0
  33. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +54 -0
  34. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +107 -0
  35. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +48 -0
  36. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +89 -0
  37. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +96 -0
  38. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +171 -0
  39. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +67 -0
  40. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +110 -0
  41. package/lib/components/dynamic/dynamic-item/{components/task-project → dynamic-milestone}/constant.js +0 -0
  42. package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
  43. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +111 -0
  44. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +158 -0
  45. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +95 -0
  46. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +215 -0
  47. package/lib/components/dynamic/dynamic-item/dynamic-project/constant.js +16 -0
  48. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-project}/img/project.png +0 -0
  49. package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +91 -0
  50. package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +125 -0
  51. package/lib/components/dynamic/dynamic-item/{components/relative → dynamic-relative}/img/dynamic-relative.svg +0 -0
  52. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +95 -0
  53. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +192 -0
  54. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +138 -0
  55. package/lib/components/dynamic/dynamic-item/{components/replay → dynamic-replay}/index.js +76 -11
  56. package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +153 -0
  57. package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +138 -0
  58. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +97 -0
  59. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +207 -0
  60. package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +54 -0
  61. package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +107 -0
  62. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/constant.js +13 -3
  63. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-cancel.png +0 -0
  64. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-delay.png +0 -0
  65. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-done.png +0 -0
  66. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-pause.png +0 -0
  67. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-progress.png +0 -0
  68. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-unaccept.png +0 -0
  69. package/lib/components/dynamic/dynamic-item/{components/task-project-icon → dynamic-task}/img/task-unstart.png +0 -0
  70. package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +111 -0
  71. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +164 -0
  72. package/lib/components/dynamic/dynamic-item/index.css +34 -10
  73. package/lib/components/dynamic/dynamic-item/index.js +155 -85
  74. package/lib/components/dynamic/dynamic-like-ranking/index.css +11 -8
  75. package/lib/components/dynamic/dynamic-like-ranking/index.js +69 -20
  76. package/lib/components/dynamic/dynamic-like-ranking/item.js +28 -51
  77. package/lib/components/dynamic/dynamic-liking/index.css +1 -8
  78. package/lib/components/dynamic/dynamic-liking/index.js +10 -4
  79. package/lib/components/dynamic/dynamic-liking/item.js +46 -25
  80. package/lib/components/dynamic/dynamic-list/index.css +1 -1
  81. package/lib/components/dynamic/dynamic-list/index.js +9 -7
  82. package/lib/components/dynamic/dynamic-topping/index.css +0 -5
  83. package/lib/components/dynamic/dynamic-topping/index.js +1 -1
  84. package/lib/components/dynamic/dynamic-topping/item.js +13 -17
  85. package/lib/components/dynamic/dynamic.css +54 -0
  86. package/lib/components/dynamic/dynamic.js +126 -58
  87. package/lib/components/dynamic/img/dynamic-top.svg +14 -0
  88. package/lib/components/dynamic/quick-operation/index.css +3 -1
  89. package/lib/components/dynamic/quick-operation/index.js +14 -4
  90. package/lib/components/dynamic/request-api.js +20 -8
  91. package/lib/components/dynamic/util.js +41 -7
  92. package/lib/components/file-list/components/single-file/index.css +3 -3
  93. package/lib/components/grid-page/personal-info/index.js +4 -4
  94. package/lib/components/img-viewer/index.css +1 -1
  95. package/lib/components/mblog/index.js +2 -2
  96. package/lib/components/mblog/style.js +2 -2
  97. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +48 -25
  98. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +62 -24
  99. package/lib/components/publish-dynamic-modal/requist-api.js +17 -2
  100. package/lib/components/table/index.css +0 -1
  101. package/lib/components/upload/style.js +1 -1
  102. package/lib/components/upvote/index.js +26 -14
  103. package/lib/components/user-selector/export-modules/field-tree-selector/index.css +4 -0
  104. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +8 -6
  105. package/lib/index.js +5 -1
  106. package/lib/pages/dynamic/index.css +1 -0
  107. package/lib/pages/like-ranking/column.js +33 -14
  108. package/lib/pages/like-ranking/filter-buttons/department.js +8 -11
  109. package/lib/pages/like-ranking/filter-buttons/group.js +34 -0
  110. package/lib/pages/like-ranking/filter-buttons/index.css +4 -8
  111. package/lib/pages/like-ranking/filter-buttons/index.js +18 -11
  112. package/lib/pages/like-ranking/filter-buttons/modular.js +51 -28
  113. package/lib/pages/like-ranking/filter-buttons/name.js +33 -6
  114. package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.css +17 -0
  115. package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.js +8 -2
  116. package/lib/pages/like-ranking/filter-buttons/timer.js +28 -46
  117. package/lib/pages/like-ranking/image/dynamic-empty.png +0 -0
  118. package/lib/pages/like-ranking/image/loading.gif +0 -0
  119. package/lib/pages/like-ranking/index.css +83 -4
  120. package/lib/pages/like-ranking/index.js +183 -22
  121. package/lib/pages/like-ranking/request-api.js +15 -0
  122. package/lib/utils/auth.js +16 -2
  123. package/lib/utils/bs-global.js +19 -2
  124. package/lib/utils/format-time.js +113 -8
  125. package/lib/utils/tools.js +50 -25
  126. package/package.json +1 -1
  127. package/lib/components/dynamic/components/common-title/index.css +0 -106
  128. package/lib/components/dynamic/components/common-title/index.js +0 -129
  129. package/lib/components/dynamic/dynamic-item/components/align/index.css +0 -66
  130. package/lib/components/dynamic/dynamic-item/components/align/index.js +0 -109
  131. package/lib/components/dynamic/dynamic-item/components/assessment/index.css +0 -20
  132. package/lib/components/dynamic/dynamic-item/components/assessment/index.js +0 -48
  133. package/lib/components/dynamic/dynamic-item/components/common-dynamic/index.css +0 -34
  134. package/lib/components/dynamic/dynamic-item/components/common-dynamic/index.js +0 -142
  135. package/lib/components/dynamic/dynamic-item/components/create-o/index.css +0 -52
  136. package/lib/components/dynamic/dynamic-item/components/create-o/index.js +0 -104
  137. package/lib/components/dynamic/dynamic-item/components/dynamic-desc/index.css +0 -62
  138. package/lib/components/dynamic/dynamic-item/components/dynamic-desc/index.js +0 -256
  139. package/lib/components/dynamic/dynamic-item/components/publish-content/index.css +0 -22
  140. package/lib/components/dynamic/dynamic-item/components/relative/index.css +0 -66
  141. package/lib/components/dynamic/dynamic-item/components/relative/index.js +0 -124
  142. package/lib/components/dynamic/dynamic-item/components/replay/index.css +0 -93
  143. package/lib/components/dynamic/dynamic-item/components/report/index.css +0 -32
  144. package/lib/components/dynamic/dynamic-item/components/report/index.js +0 -82
  145. package/lib/components/dynamic/dynamic-item/components/task-project/index.css +0 -57
  146. package/lib/components/dynamic/dynamic-item/components/task-project/index.js +0 -87
  147. package/lib/components/dynamic/dynamic-item/components/task-project-icon/index.css +0 -20
  148. package/lib/components/dynamic/dynamic-item/components/task-project-icon/index.js +0 -40
  149. package/lib/components/dynamic/dynamic-topping/mock.js +0 -1
  150. package/lib/pages/like-ranking/tab-bar/index.css +0 -22
  151. package/lib/pages/like-ranking/tab-bar/index.js +0 -65
@@ -1,93 +0,0 @@
1
- .titaui-dynamic-replay {
2
- font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
3
- }
4
-
5
- .titaui-dynamic-replay__detail {
6
- margin-top: 16px;
7
- }
8
-
9
- .titaui-dynamic-replay__detail-gain {
10
- margin-bottom: 16px;
11
- }
12
-
13
- .titaui-dynamic-replay__detail-drawback {
14
- margin-bottom: 16px;
15
- }
16
-
17
- .titaui-dynamic-replay__detail-tasks-item {
18
- display: flex;
19
- align-items: center;
20
- margin-left: 8px;
21
- font-size: 14px;
22
- color: #6f7886;
23
- line-height: 22px;
24
- cursor: pointer;
25
- }
26
-
27
- .titaui-dynamic-replay__detail-tasks-item::before {
28
- content: "";
29
- display: inline-block;
30
- width: 6px;
31
- height: 6px;
32
- background: #2879ff;
33
- border-radius: 50%;
34
- margin-right: 6px;
35
- }
36
-
37
- .titaui-dynamic-replay__detail-tasks-item:hover {
38
- color: #2879ff;
39
- }
40
-
41
- .titaui-dynamic-replay__detail-block-title {
42
- font-size: 14px;
43
- font-weight: 600;
44
- color: #3f4755;
45
- line-height: 22px;
46
- display: flex;
47
- align-items: center;
48
- margin-bottom: 8px;
49
- }
50
-
51
- .titaui-dynamic-replay__detail-block-title::before {
52
- content: "";
53
- display: inline-block;
54
- width: 4px;
55
- height: 12px;
56
- background: linear-gradient(180deg, #2879ff 0%, #9fbfff 100%);
57
- border-radius: 2px;
58
- margin-right: 4px;
59
- }
60
-
61
- .titaui-dynamic-replay__detail-block-title--sub {
62
- display: flex;
63
- align-items: center;
64
- margin-bottom: 4px;
65
- font-size: 14px;
66
- font-weight: 600;
67
- color: #3f4755;
68
- line-height: 22px;
69
- margin-left: 8px;
70
- }
71
-
72
- .titaui-dynamic-replay__detail-block-title--sub::before {
73
- content: "";
74
- display: inline-block;
75
- width: 6px;
76
- height: 6px;
77
- background: #2879ff;
78
- border-radius: 50%;
79
- margin-right: 6px;
80
- }
81
-
82
- .titaui-dynamic-replay__detail-block-content {
83
- font-size: 14px;
84
- font-weight: 400;
85
- color: #6f7886;
86
- line-height: 22px;
87
- margin-bottom: 4px;
88
- margin-left: 8px;
89
- }
90
-
91
- .titaui-dynamic-replay__detail-block-content--sub {
92
- margin-left: 20px;
93
- }
@@ -1,32 +0,0 @@
1
- .titaui-dynamic-report__summary {
2
- margin-bottom: 16px;
3
- margin-top: 12px;
4
- }
5
-
6
- .titaui-dynamic-report__block-title {
7
- font-size: 14px;
8
- font-weight: 600;
9
- color: #3f4755;
10
- line-height: 22px;
11
- display: flex;
12
- align-items: center;
13
- margin-bottom: 8px;
14
- }
15
-
16
- .titaui-dynamic-report__block-title::before {
17
- content: "";
18
- display: inline-block;
19
- width: 4px;
20
- height: 12px;
21
- background: linear-gradient(180deg, #2879ff 0%, #9fbfff 100%);
22
- border-radius: 2px;
23
- margin-right: 4px;
24
- }
25
-
26
- .titaui-dynamic-report__content {
27
- margin-left: 8px;
28
- }
29
-
30
- .titaui-dynamic-report .highlight {
31
- color: #f05e5e;
32
- }
@@ -1,82 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _context = require("../../../context");
13
-
14
- var _tools = require("../../../../../utils/tools");
15
-
16
- var _commonTitle = _interopRequireDefault(require("../../../components/common-title"));
17
-
18
- var _dangerousHtml = _interopRequireDefault(require("../../../components/dangerous-html"));
19
-
20
- require("./index.css");
21
-
22
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
-
24
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
-
26
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
-
28
- var prefix = "titaui-dynamic-report";
29
-
30
- var DynamicReport = function DynamicReport(_ref) {
31
- var data = _ref.data;
32
- var contentRichTextRef = (0, _react.useRef)();
33
- var workPlanRichTextRef = (0, _react.useRef)();
34
-
35
- var _useContext = (0, _react.useContext)(_context.SearchKeyContext),
36
- searchKeyWord = _useContext.searchKeyWord;
37
-
38
- var handleClickTitle = function handleClickTitle() {
39
- // @ts-ignore
40
- Talent.app.vent.trigger('global-daily-detail-pull-screen', data.feedId);
41
- };
42
-
43
- (0, _react.useEffect)(function () {
44
- (0, _tools.highLightWord)({
45
- parentDom: contentRichTextRef.current,
46
- keyWord: searchKeyWord
47
- });
48
- (0, _tools.highLightWord)({
49
- parentDom: workPlanRichTextRef.current,
50
- keyWord: searchKeyWord
51
- });
52
- }, [data, searchKeyWord]);
53
- return /*#__PURE__*/_react["default"].createElement("div", {
54
- className: prefix
55
- }, /*#__PURE__*/_react["default"].createElement(_commonTitle["default"], {
56
- content: data.name,
57
- showCompleteType: true,
58
- completeType: data.submitState,
59
- onClickTitle: handleClickTitle
60
- }), data.contentRichText && /*#__PURE__*/_react["default"].createElement("div", {
61
- className: prefix + "__summary"
62
- }, /*#__PURE__*/_react["default"].createElement("div", {
63
- className: prefix + "__block-title"
64
- }, "\u603B\u7ED3\u4E0E\u969C\u788D"), /*#__PURE__*/_react["default"].createElement("div", {
65
- className: prefix + "__content",
66
- ref: contentRichTextRef
67
- }, /*#__PURE__*/_react["default"].createElement(_dangerousHtml["default"], {
68
- htmlText: data.contentRichText
69
- }))), data.workPlanRichText && /*#__PURE__*/_react["default"].createElement("div", {
70
- className: prefix + "__work-plan"
71
- }, /*#__PURE__*/_react["default"].createElement("div", {
72
- className: prefix + "__block-title"
73
- }, "\u4E0B\u4E00\u6B65\u5DE5\u4F5C\u8BA1\u5212"), /*#__PURE__*/_react["default"].createElement("div", {
74
- className: prefix + "__content",
75
- ref: workPlanRichTextRef
76
- }, /*#__PURE__*/_react["default"].createElement(_dangerousHtml["default"], {
77
- htmlText: data.workPlanRichText
78
- }))));
79
- };
80
-
81
- var _default = DynamicReport;
82
- exports["default"] = _default;
@@ -1,57 +0,0 @@
1
- .titaui-dynamic-task-project {
2
- height: 78px;
3
- display: flex;
4
- align-items: center;
5
- border-radius: 8px;
6
- background: #f6f7f9;
7
- padding: 16px 12px 16px 16px;
8
- box-sizing: border-box;
9
- font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
10
- }
11
-
12
- .titaui-dynamic-task-project__info {
13
- flex: 1;
14
- display: flex;
15
- flex-direction: column;
16
- margin-left: 16px;
17
- overflow: hidden;
18
- }
19
-
20
- .titaui-dynamic-task-project__status-and-time-range {
21
- display: flex;
22
- align-items: center;
23
- font-size: 12px;
24
- font-weight: 400;
25
- color: #89919F;
26
- line-height: 18px;
27
- }
28
-
29
- .titaui-dynamic-task-project__status-text {
30
- margin-left: 4px;
31
- margin-right: 20px;
32
- }
33
-
34
- .titaui-dynamic-task-project__time-range {
35
- margin-left: 4px;
36
- }
37
-
38
- .titaui-dynamic-task-project__title {
39
- flex: 1;
40
- word-break: keep-all;
41
- white-space: nowrap;
42
- overflow: hidden;
43
- font-size: 16px;
44
- font-weight: 600;
45
- color: #3F4755;
46
- line-height: 24px;
47
- }
48
-
49
- .titaui-dynamic-task-project__title-text {
50
- cursor: pointer;
51
- }
52
-
53
- .titaui-dynamic-task-project__title-priority {
54
- width: 18px;
55
- height: 26px;
56
- margin-right: 4px;
57
- }
@@ -1,87 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
- var _tooltip = require("../../../../tooltip");
15
-
16
- var _taskProjectIcon = _interopRequireDefault(require("../task-project-icon"));
17
-
18
- var _constant = require("./constant");
19
-
20
- var _constant2 = require("../../../constant");
21
-
22
- require("./index.css");
23
-
24
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
-
26
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
-
28
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
-
30
- var prefix = "titaui-dynamic-task-project";
31
-
32
- var DynamicTaskProject = function DynamicTaskProject(_ref) {
33
- var data = _ref.data,
34
- _ref$type = _ref.type,
35
- type = _ref$type === void 0 ? "task" : _ref$type;
36
- var feedType = data.feedType,
37
- status = data.status,
38
- taskName = data.taskName,
39
- workName = data.workName,
40
- startDate = data.startDate,
41
- deadline = data.deadline;
42
-
43
- var handleClickTitle = function handleClickTitle() {
44
- // 任务id不对
45
- if (feedType === _constant2.EFeedType.Task) {
46
- window.Talent.app.vent.trigger("global-pull-screen", data.obj.objId, "task");
47
- }
48
-
49
- if (feedType === _constant2.EFeedType.Project) {
50
- window.open(window.location.href.replace(location.hash, "#work?iTalentNavCode=tita-work&work_id=" + data.obj.objId));
51
- }
52
- };
53
-
54
- var renderName = (0, _react.useMemo)(function () {
55
- return /*#__PURE__*/_react["default"].createElement("span", {
56
- className: prefix + "__title-text",
57
- onClick: handleClickTitle
58
- }, taskName || workName);
59
- }, [taskName, workName]);
60
- return /*#__PURE__*/_react["default"].createElement("div", {
61
- className: prefix
62
- }, /*#__PURE__*/_react["default"].createElement(_taskProjectIcon["default"], {
63
- type: type,
64
- status: status
65
- }), /*#__PURE__*/_react["default"].createElement("div", {
66
- className: prefix + "__info"
67
- }, /*#__PURE__*/_react["default"].createElement("div", {
68
- className: prefix + "__title"
69
- }, /*#__PURE__*/_react["default"].createElement(_tooltip.TooltipText, {
70
- isPercent: true,
71
- text: renderName,
72
- minusWidth: 30
73
- })), /*#__PURE__*/_react["default"].createElement("div", {
74
- className: prefix + "__status-and-time-range"
75
- }, /*#__PURE__*/_react["default"].createElement("i", {
76
- className: (0, _classnames["default"])(_constant2.EStatusStatus2ClassType[status])
77
- }), /*#__PURE__*/_react["default"].createElement("span", {
78
- className: prefix + "__status-text"
79
- }, _constant.EStatusClass2StatusTypeText[status]), /*#__PURE__*/_react["default"].createElement("i", {
80
- className: (0, _classnames["default"])("tu-icon-deferred")
81
- }), /*#__PURE__*/_react["default"].createElement("span", {
82
- className: prefix + "__time-range"
83
- }, startDate, "-", deadline))));
84
- };
85
-
86
- var _default = DynamicTaskProject;
87
- exports["default"] = _default;
@@ -1,20 +0,0 @@
1
- .dynamic-task-project-icon {
2
- display: inline-block;
3
- width: 36px;
4
- height: 36px;
5
- border-radius: 6px;
6
- }
7
-
8
- .dynamic-task-project-icon__task {
9
- background: #6CE7B6;
10
- box-shadow: 0px 2px 6px 0px rgba(90, 216, 166, 0.4);
11
- }
12
-
13
- .dynamic-task-project-icon__project {
14
- background: #5C8EFF;
15
- box-shadow: 0px 2px 6px 0px rgba(92, 142, 255, 0.4);
16
- }
17
-
18
- .dynamic-task-project-icon__icon {
19
- width: 36px;
20
- }
@@ -1,40 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _classnames = _interopRequireDefault(require("classnames"));
11
-
12
- var _constant = require("./constant");
13
-
14
- var _project = _interopRequireDefault(require("./img/project.png"));
15
-
16
- require("./index.css");
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
-
22
- var prefix = 'dynamic-task-project-icon';
23
-
24
- var DynamicTaskProjectIcon = function DynamicTaskProjectIcon(_ref) {
25
- var _classNames;
26
-
27
- var _ref$type = _ref.type,
28
- type = _ref$type === void 0 ? 'task' : _ref$type,
29
- _ref$status = _ref.status,
30
- status = _ref$status === void 0 ? '1' : _ref$status;
31
- return /*#__PURE__*/_react["default"].createElement("span", {
32
- className: (0, _classnames["default"])(prefix, (_classNames = {}, _defineProperty(_classNames, prefix + '__task', true), _defineProperty(_classNames, prefix + '__project', false), _classNames))
33
- }, /*#__PURE__*/_react["default"].createElement("img", {
34
- className: prefix + '__icon',
35
- src: type === 'task' ? _constant.taskStatusMapping[status] : _project["default"]
36
- }));
37
- };
38
-
39
- var _default = DynamicTaskProjectIcon;
40
- exports["default"] = _default;
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,22 +0,0 @@
1
- .tab-bar {
2
- display: flex;
3
- }
4
-
5
- .tab-bar-item {
6
- text-align: center;
7
- width: 64px;
8
- height: 32px;
9
- line-height: 32px;
10
- background: #F7F8FA;
11
- border-radius: 18px;
12
- font-size: 14px;
13
- font-weight: 400;
14
- color: #3F4755;
15
- cursor: pointer;
16
- margin-right: 6px;
17
- }
18
-
19
- .tab-bar-item--selected {
20
- color: #2879ff;
21
- background: rgba(40, 121, 255, 0.1);
22
- }
@@ -1,65 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
- require("./index.css");
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
-
18
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
-
24
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
25
-
26
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
27
-
28
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
29
-
30
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
31
-
32
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
33
-
34
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
35
-
36
- var preCls = 'tab-bar';
37
-
38
- var LikeRanking = function LikeRanking() {
39
- var _useState = (0, _react.useState)('全部'),
40
- _useState2 = _slicedToArray(_useState, 2),
41
- type = _useState2[0],
42
- setType = _useState2[1];
43
-
44
- return /*#__PURE__*/_react["default"].createElement("div", {
45
- className: "".concat(preCls)
46
- }, /*#__PURE__*/_react["default"].createElement("div", {
47
- className: (0, _classnames["default"])("".concat(preCls, "-item"), _defineProperty({}, "".concat(preCls, "-item--selected"), type === '全部')),
48
- onClick: function onClick() {
49
- return setType('全部');
50
- }
51
- }, "\u5168\u90E8"), /*#__PURE__*/_react["default"].createElement("div", {
52
- className: (0, _classnames["default"])("".concat(preCls, "-item"), _defineProperty({}, "".concat(preCls, "-item--selected"), type === '本周')),
53
- onClick: function onClick() {
54
- return setType('本周');
55
- }
56
- }, "\u672C\u5468"), /*#__PURE__*/_react["default"].createElement("div", {
57
- className: (0, _classnames["default"])("".concat(preCls, "-item"), _defineProperty({}, "".concat(preCls, "-item--selected"), type === '本月')),
58
- onClick: function onClick() {
59
- return setType('本月');
60
- }
61
- }, "\u672C\u6708"));
62
- };
63
-
64
- var _default = LikeRanking;
65
- exports["default"] = _default;