@titaui/pc 1.12.0-beta.2 → 1.12.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.
Files changed (130) hide show
  1. package/lib/components/button/images/blue.svg +21 -0
  2. package/lib/components/button/images/red.svg +21 -0
  3. package/lib/components/button/images/white.svg +19 -0
  4. package/lib/components/button/rect-btn/index.js +3 -3
  5. package/lib/components/checkbox/index.css +4 -0
  6. package/lib/components/contact-kefu/index.css +10 -0
  7. package/lib/components/contact-kefu/index.js +8 -2
  8. package/lib/components/create-okr-modal/index.js +3 -1
  9. package/lib/components/dynamic/constant.js +1 -1
  10. package/lib/components/dynamic/dynamic-list/index.js +14 -7
  11. package/lib/components/dynamic/index.js +9 -12
  12. package/lib/components/dynamic/request-api.js +7 -68
  13. package/lib/components/nav-top/components/menu/index.js +16 -14
  14. package/lib/components/nav-top/index.js +2 -2
  15. package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
  16. package/lib/components/okr-detail/e-list/index.js +2 -2
  17. package/lib/components/period-selector/interface.js +7 -0
  18. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
  19. package/lib/components/search-input/index.css +1 -1
  20. package/lib/components/select-layer/index.css +1 -1
  21. package/lib/components/task-relation-modal/helper.js +139 -2
  22. package/lib/components/task-relation-modal/image/loading.gif +0 -0
  23. package/lib/components/task-relation-modal/index.js +9 -0
  24. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +18 -0
  25. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +262 -0
  26. package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +135 -0
  27. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.css +0 -0
  28. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +129 -0
  29. package/lib/components/task-relation-modal/okr-relation/request-api.js +106 -0
  30. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +120 -0
  31. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +185 -0
  32. package/lib/components/task-relation-modal/request-api.js +28 -2
  33. package/lib/components/task-relation-modal/search/okr-status-select.js +3 -3
  34. package/lib/components/task-relation-modal/search/principal.js +36 -19
  35. package/lib/components/task-relation-modal/search/search-dropdown/index.css +2 -1
  36. package/lib/components/task-relation-modal/search/search-dropdown/index.js +1 -1
  37. package/lib/components/{dynamic/dynamic-topping/index.js → task-relation-modal/search/task-relation.js} +45 -44
  38. package/lib/components/task-relation-modal/search/task-status-select.js +87 -0
  39. package/lib/components/{dynamic/dynamic-liking/index.js → task-relation-modal/search/work-relation.js} +43 -39
  40. package/lib/components/task-relation-modal/search/work-status-select.js +74 -0
  41. package/lib/components/task-relation-modal/tree/category-tree/index.css +3 -3
  42. package/lib/components/task-relation-modal/tree/okr-tree/index.css +1 -1
  43. package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +16 -2
  44. package/lib/components/task-relation-modal/tree/task-list/index.css +0 -0
  45. package/lib/components/task-relation-modal/tree/task-list/index.js +1 -0
  46. package/lib/components/task-relation-modal/tree/work-list/index.css +14 -0
  47. package/lib/components/task-relation-modal/tree/work-list/index.js +176 -0
  48. package/lib/components/task-relation-modal/tree/work-list/search-form.js +123 -0
  49. package/lib/components/task-relation-modal/tree/work-tree/index.css +1 -1
  50. package/lib/components/task-relation-modal/tree-node/category-node/index.css +1 -1
  51. package/lib/components/task-relation-modal/tree-node/work-node/index.js +3 -1
  52. package/lib/components/task-relation-modal/work-relation/index.css +0 -0
  53. package/lib/components/task-relation-modal/work-relation/index.js +256 -0
  54. package/lib/components/tooltip/index.js +3 -0
  55. package/lib/components/tooltip/tooltip-rows/index.css +26 -0
  56. package/lib/components/{dynamic/advertise → tooltip/tooltip-rows}/index.js +65 -85
  57. package/lib/components/user-selector/category-selector-panel/index.js +6 -1
  58. package/lib/components/{dynamic/quick-operation/components/create-task/index.js → user-selector/category-selector-panel/subordinate-tree.js} +37 -20
  59. package/lib/components/user-selector/constant.js +10 -2
  60. package/lib/components/user-selector/export-modules/depart-search-selector/index.js +0 -3
  61. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +3 -1
  62. package/lib/components/user-selector/request-apis.js +28 -9
  63. package/lib/components/user-selector/searched-panel/index.js +21 -8
  64. package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +46 -18
  65. package/lib/utils/planDataJson.js +11115 -0
  66. package/package.json +2 -2
  67. package/lib/components/dynamic/advertise/components/next-btn/index.css +0 -27
  68. package/lib/components/dynamic/advertise/components/next-btn/index.js +0 -32
  69. package/lib/components/dynamic/advertise/components/pre-btn/index.css +0 -26
  70. package/lib/components/dynamic/advertise/components/pre-btn/index.js +0 -32
  71. package/lib/components/dynamic/advertise/index.css +0 -21
  72. package/lib/components/dynamic/advertise/interface.js +0 -5
  73. package/lib/components/dynamic/advertise/util.js +0 -28
  74. package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -81
  75. package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -203
  76. package/lib/components/dynamic/components/first-level-tabs/index.css +0 -101
  77. package/lib/components/dynamic/components/first-level-tabs/index.js +0 -131
  78. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
  79. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  80. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  81. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  82. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
  83. package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -146
  84. package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -180
  85. package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -105
  86. package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
  87. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
  88. package/lib/components/dynamic/dynamic-liking/index.css +0 -81
  89. package/lib/components/dynamic/dynamic-liking/item.js +0 -75
  90. package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
  91. package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +0 -16
  92. package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +0 -30
  93. package/lib/components/dynamic/dynamic-topping/index.css +0 -141
  94. package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
  95. package/lib/components/dynamic/dynamic-topping/item.js +0 -153
  96. package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
  97. package/lib/components/dynamic/dynamic.css +0 -173
  98. package/lib/components/dynamic/dynamic.js +0 -428
  99. package/lib/components/dynamic/export-module/index.js +0 -37
  100. package/lib/components/dynamic/img/dynamic-top.svg +0 -14
  101. package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
  102. package/lib/components/dynamic/my-team/img/line.png +0 -0
  103. package/lib/components/dynamic/my-team/img/team.png +0 -0
  104. package/lib/components/dynamic/my-team/index.css +0 -184
  105. package/lib/components/dynamic/my-team/index.js +0 -263
  106. package/lib/components/dynamic/my-team/request-api.js +0 -52
  107. package/lib/components/dynamic/my-team/util.js +0 -20
  108. package/lib/components/dynamic/new-ui.css +0 -192
  109. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +0 -58
  110. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +0 -68
  111. package/lib/components/dynamic/online-broadcast/data.js +0 -95
  112. package/lib/components/dynamic/online-broadcast/img/broadcast.svg +0 -14
  113. package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
  114. package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
  115. package/lib/components/dynamic/online-broadcast/index.css +0 -46
  116. package/lib/components/dynamic/online-broadcast/index.js +0 -61
  117. package/lib/components/dynamic/online-broadcast/interfact.js +0 -5
  118. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
  119. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -39
  120. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
  121. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -39
  122. package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
  123. package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -39
  124. package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
  125. package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
  126. package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
  127. package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
  128. package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
  129. package/lib/components/dynamic/quick-operation/index.css +0 -51
  130. package/lib/components/dynamic/quick-operation/index.js +0 -120
@@ -1,131 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _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 _conditionRender = _interopRequireDefault(require("../../../condition-render"));
15
-
16
- var _popup = _interopRequireDefault(require("../../../popup"));
17
-
18
- var _useGlobalValue3 = _interopRequireDefault(require("../../../nav-top/useGlobalValue"));
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
- 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; }
29
-
30
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
31
-
32
- 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."); }
33
-
34
- 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); }
35
-
36
- 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; }
37
-
38
- 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; }
39
-
40
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
41
-
42
- var prefix = "titaui-dynamic-first-level-tabs";
43
- var popupAlign = {
44
- offset: [0, 5],
45
- overflow: {
46
- adjustX: true,
47
- adjustY: true
48
- },
49
- targetOffset: [0, 0]
50
- };
51
-
52
- var FirstLevelTabs = function FirstLevelTabs(_ref) {
53
- var tabsInfo = _ref.tabsInfo,
54
- onTabsChange = _ref.onTabsChange,
55
- activeTab = _ref.activeTab;
56
-
57
- var _useState = (0, _react.useState)(false),
58
- _useState2 = _slicedToArray(_useState, 2),
59
- popupVisible = _useState2[0],
60
- setPopupVisible = _useState2[1];
61
-
62
- var _useGlobalValue = (0, _useGlobalValue3["default"])(),
63
- _useGlobalValue2 = _slicedToArray(_useGlobalValue, 1),
64
- feedNum = _useGlobalValue2[0];
65
-
66
- var handleTabsChange = function handleTabsChange(id) {
67
- setPopupVisible(false);
68
-
69
- if (onTabsChange) {
70
- onTabsChange(id);
71
- }
72
- };
73
-
74
- var handlePopupVisibleChange = function handlePopupVisibleChange(visible) {
75
- setPopupVisible(visible);
76
- };
77
-
78
- var renderFoldFirstLevelTab = (0, _react.useMemo)(function () {
79
- var foldTabs = tabsInfo.slice(3);
80
- var isActiveHideMeun = foldTabs.filter(function (item) {
81
- return item.CodeId === activeTab;
82
- }).length > 0;
83
-
84
- var popContent = /*#__PURE__*/_react["default"].createElement("div", {
85
- className: "".concat(prefix, "__hide-first-level-tabs")
86
- }, foldTabs.map(function (item) {
87
- return /*#__PURE__*/_react["default"].createElement("div", {
88
- key: item.CodeId + item.MenuName,
89
- className: (0, _classnames["default"])("".concat(prefix, "__hide-first-level-tab"), _defineProperty({}, "".concat(prefix, "__hide-first-level-tab--active"), item.CodeId === activeTab)),
90
- onClick: function onClick() {
91
- handleTabsChange(item.CodeId);
92
- }
93
- }, item.MenuName);
94
- }));
95
-
96
- return /*#__PURE__*/_react["default"].createElement(_popup["default"], {
97
- popup: popContent,
98
- onPopupVisibleChange: handlePopupVisibleChange,
99
- popupVisible: popupVisible,
100
- popupPlacement: "bottomLeft",
101
- popupAlign: popupAlign // action="hover"
102
- ,
103
- destroyPopupOnHide: false
104
- }, /*#__PURE__*/_react["default"].createElement("span", {
105
- className: (0, _classnames["default"])("tu-icon-diot", "".concat(prefix, "__more-icon"), _defineProperty({}, "".concat(prefix, "__more-icon--active"), isActiveHideMeun))
106
- }));
107
- }, [tabsInfo, activeTab, popupVisible, onTabsChange]);
108
- return /*#__PURE__*/_react["default"].createElement("div", {
109
- className: prefix
110
- }, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
111
- condition: !!tabsInfo
112
- }, tabsInfo.map(function (item, index) {
113
- if (index >= 3) return null;
114
- return /*#__PURE__*/_react["default"].createElement("span", {
115
- key: item.CodeId + item.MenuName,
116
- className: (0, _classnames["default"])("".concat(prefix, "__tab"), _defineProperty({}, "".concat(prefix, "__tab--active"), item.CodeId === activeTab)),
117
- onClick: function onClick() {
118
- if (onTabsChange) {
119
- onTabsChange(item.CodeId);
120
- }
121
- }
122
- }, item.MenuName, item.CodeId === 1001 && feedNum > 0 && /*#__PURE__*/_react["default"].createElement("span", {
123
- className: "".concat(prefix, "__tab--point")
124
- }));
125
- })), /*#__PURE__*/_react["default"].createElement("span", {
126
- className: "".concat(prefix, "__fold-tab")
127
- }, renderFoldFirstLevelTab));
128
- };
129
-
130
- var _default = FirstLevelTabs;
131
- exports["default"] = _default;
@@ -1,23 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <title>点赞排行榜</title>
4
- <defs>
5
- <linearGradient x1="25.6749834%" y1="84.5410483%" x2="73.6493792%" y2="24.52131%" id="linearGradient-1">
6
- <stop stop-color="#FFFFFF" offset="0%"></stop>
7
- <stop stop-color="#FFA5A5" offset="100%"></stop>
8
- </linearGradient>
9
- </defs>
10
- <g id="页面-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
11
- <g id="公告/分享" transform="translate(-1082.000000, -727.000000)">
12
- <g id="置顶分享" transform="translate(1066.000000, 713.000000)">
13
- <g id="点赞排行榜" transform="translate(16.000000, 14.000000)">
14
- <circle id="椭圆形" fill="#F05E5E" cx="10" cy="10" r="10"></circle>
15
- <path d="M4.58285466,13.3531698 L6.82522274,10 L6.82522274,10 L10,11.9877624 L7.90149916,15.2903228 C7.78302165,15.4767793 7.53582378,15.5318872 7.34936727,15.4134097 C7.29756512,15.3804938 7.25403227,15.3360987 7.22213851,15.283661 L6.42650106,13.9755248 L6.42650106,13.9755248 L4.91535766,13.9755248 C4.69444376,13.9755248 4.51535766,13.7964387 4.51535766,13.5755248 C4.51535766,13.4963603 4.53884808,13.4189759 4.58285466,13.3531698 Z" id="路径-3" fill="url(#linearGradient-1)"></path>
16
- <path d="M10.416188,13.3531698 L12.6585561,10 L12.6585561,10 L15.8333333,11.9877624 L13.7348325,15.2903228 C13.616355,15.4767793 13.3691571,15.5318872 13.1827006,15.4134097 C13.1308985,15.3804938 13.0873656,15.3360987 13.0554718,15.283661 L12.2598344,13.9755248 L12.2598344,13.9755248 L10.748691,13.9755248 C10.5277771,13.9755248 10.348691,13.7964387 10.348691,13.5755248 C10.348691,13.4963603 10.3721814,13.4189759 10.416188,13.3531698 Z" id="路径-3" fill="url(#linearGradient-1)" transform="translate(12.916667, 12.916667) scale(-1, 1) translate(-12.916667, -12.916667) "></path>
17
- <circle id="椭圆形" fill="#FFFFFF" cx="10" cy="9.16666667" r="4.16666667"></circle>
18
- <path d="M10,10.4166667 L9.24792573,10.8120555 C9.0523879,10.9148558 8.81053703,10.8396772 8.70773671,10.6441394 C8.66680108,10.5662752 8.65267521,10.477088 8.66754595,10.3903849 L8.81117935,9.55293791 L8.81117935,9.55293791 L8.20273849,8.95985465 C8.04454506,8.80565416 8.04130814,8.55240886 8.19550862,8.39421542 C8.25691206,8.33122197 8.33736903,8.2902271 8.42442384,8.2775773 L9.26526843,8.15539542 L9.26526843,8.15539542 L9.64130557,7.39346097 C9.73907449,7.1953595 9.97892482,7.1140239 10.1770263,7.21179282 C10.2559113,7.25072492 10.3197623,7.31457592 10.3586944,7.39346097 L10.7347316,8.15539542 L10.7347316,8.15539542 L11.5755762,8.2775773 C11.7941941,8.30934434 11.9456667,8.51232148 11.9138996,8.73093943 C11.9012498,8.81799424 11.860255,8.8984512 11.7972615,8.95985465 L11.1888206,9.55293791 L11.1888206,9.55293791 L11.332454,10.3903849 C11.3697985,10.6081195 11.2235633,10.8149019 11.0058287,10.8522463 C10.9191257,10.867117 10.8299385,10.8529911 10.7520743,10.8120555 L10,10.4166667 L10,10.4166667 Z" id="星形" fill="#F05E5E"></path>
19
- </g>
20
- </g>
21
- </g>
22
- </g>
23
- </svg>
@@ -1,146 +0,0 @@
1
- .danamic-like-ranking {
2
- margin-top: 10px;
3
- width: 278px;
4
- background: #ffffff;
5
- box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
6
- border-radius: 12px;
7
- padding: 12px 16px;
8
- padding-top: 16px;
9
- padding-bottom: 20px;
10
- box-sizing: border-box;
11
- }
12
-
13
- .danamic-like-ranking__header {
14
- height: 24px;
15
- font-size: 16px;
16
- font-weight: 600;
17
- color: #3f4755;
18
- line-height: 24px;
19
- margin-bottom: 10px;
20
- display: flex;
21
- align-items: center;
22
- justify-content: space-between;
23
- }
24
-
25
- .danamic-like-ranking__header-text {
26
- margin-left: 4px;
27
- }
28
-
29
- .danamic-like-ranking__header-image {
30
- width: 20px;
31
- height: 20px;
32
- position: relative;
33
- top: -2px;
34
- }
35
-
36
- .danamic-like-ranking__header-right {
37
- font-size: 14px;
38
- cursor: pointer;
39
- color: #2879ff;
40
- }
41
-
42
- .danamic-like-ranking__header-right:hover {
43
- color: #5c8eff;
44
- }
45
-
46
- .danamic-like-ranking__content {
47
- border-top: 1px solid #e9ecf0;
48
- padding: 16px 0 0 0;
49
- }
50
-
51
- .danamic-like-ranking__content-table-empty {
52
- margin: 50px auto 40px;
53
- width: 160px;
54
- height: 116px;
55
- background: url("./image/ranking-empty.png") no-repeat;
56
- background-size: 160px 116px;
57
- position: relative;
58
- }
59
-
60
- .danamic-like-ranking__content-table-empty-text {
61
- color: #6f7886;
62
- width: 58px;
63
- position: absolute;
64
- bottom: 10px;
65
- left: 0;
66
- right: 0;
67
- margin: auto;
68
- }
69
-
70
- .danamic-like-ranking__content-table-items {
71
- display: grid;
72
- grid-template-columns: auto 28px auto auto;
73
- grid-row-gap: 16px;
74
- margin-left: -8px;
75
- }
76
-
77
- .danamic-like-ranking__item:last-of-type {
78
- margin-bottom: unset;
79
- }
80
-
81
- .danamic-like-ranking__item-pre {
82
- display: flex;
83
- align-items: center;
84
- justify-content: center;
85
- }
86
-
87
- .danamic-like-ranking__item-medal {
88
- min-width: 21px;
89
- height: 24px;
90
- }
91
-
92
- .danamic-like-ranking__item-num {
93
- font-size: 14px;
94
- }
95
-
96
- .danamic-like-ranking__item-avatar .titaui-pc-avator-container {
97
- display: inline-flex !important;
98
- }
99
-
100
- .danamic-like-ranking__item-name {
101
- margin-left: 8px;
102
- display: inline-flex;
103
- align-items: center;
104
- }
105
-
106
- .danamic-like-ranking__item-like-text {
107
- font-size: 13px;
108
- font-weight: 400;
109
- color: #89919f;
110
- line-height: 22px;
111
- display: inline-flex;
112
- align-items: center;
113
- justify-content: flex-end;
114
- }
115
-
116
- .danamic-like-ranking__item-like-num {
117
- font-size: 16px;
118
- font-weight: 600;
119
- color: #3f4755;
120
- line-height: 22px;
121
- margin-right: 4px;
122
- }
123
-
124
- .danamic-like-ranking__tab-bar {
125
- margin-bottom: 16px;
126
- display: flex;
127
- }
128
-
129
- .danamic-like-ranking__tab-bar-item {
130
- text-align: center;
131
- width: 60px;
132
- height: 28px;
133
- line-height: 28px;
134
- font-size: 14px;
135
- font-weight: 400;
136
- color: #3f4755;
137
- cursor: pointer;
138
- margin-right: 6px;
139
- }
140
-
141
- .danamic-like-ranking__tab-bar-item--selected {
142
- border-radius: 18px;
143
- background: rgba(40, 121, 255, 0.1);
144
- border-radius: 15px;
145
- color: #2879ff;
146
- }
@@ -1,180 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _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 _requestApi = require("../request-api");
15
-
16
- var _formatTime = require("../../../utils/format-time");
17
-
18
- var _auth = require("../../../utils/auth");
19
-
20
- var _item = _interopRequireDefault(require("./item"));
21
-
22
- var _bsGlobal = require("../../../utils/bs-global");
23
-
24
- var _getLocale = require("../../../utils/getLocale");
25
-
26
- require("./index.css");
27
-
28
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29
-
30
- 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); }
31
-
32
- 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; }
33
-
34
- 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; }
35
-
36
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
37
-
38
- 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."); }
39
-
40
- 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); }
41
-
42
- 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; }
43
-
44
- 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; }
45
-
46
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
47
-
48
- var preCls = "danamic-like-ranking";
49
- var Auth = new _auth.DynamicManagerAuth();
50
-
51
- var DynamicLikeRanking = function DynamicLikeRanking() {
52
- var _useState = (0, _react.useState)([]),
53
- _useState2 = _slicedToArray(_useState, 2),
54
- rankingData = _useState2[0],
55
- setRankingData = _useState2[1];
56
-
57
- var _useState3 = (0, _react.useState)((0, _getLocale.getLocale)("Mod_all")),
58
- _useState4 = _slicedToArray(_useState3, 2),
59
- type = _useState4[0],
60
- setType = _useState4[1];
61
-
62
- var _useState5 = (0, _react.useState)({
63
- createDate: "",
64
- endDate: ""
65
- }),
66
- _useState6 = _slicedToArray(_useState5, 2),
67
- date = _useState6[0],
68
- setDate = _useState6[1];
69
-
70
- (0, _react.useEffect)(function () {
71
- var createDate = date.createDate,
72
- endDate = date.endDate;
73
- (0, _requestApi.getRanking)({
74
- ToUserIds: "",
75
- ToDepIds: "",
76
- ToGroupIds: "",
77
- CreateDate: createDate,
78
- EndDate: endDate,
79
- ObjectType: 0,
80
- ObjectTypeAction: 0,
81
- PageNum: 1,
82
- PageSize: 8,
83
- ShowMySelf: true
84
- }).then(function (res) {
85
- if (res.Code === 1) {
86
- var _res$Data = res.Data,
87
- userPariseinfos = _res$Data.userPariseinfos,
88
- currentUserPariseInfo = _res$Data.currentUserPariseInfo;
89
- var data = userPariseinfos || [];
90
- var currentUserIsInEighth = data.findIndex(function (item) {
91
- return item.user.userId === (0, _bsGlobal.getUserInfo)().Id;
92
- }) !== -1;
93
-
94
- if (!currentUserIsInEighth) {
95
- data = data.slice(0, 7);
96
-
97
- if (currentUserPariseInfo && currentUserPariseInfo.user) {
98
- data.push(currentUserPariseInfo);
99
- }
100
- }
101
-
102
- setRankingData(data);
103
- }
104
- });
105
- }, [date]);
106
-
107
- var handleLinkToPraiseRaking = function handleLinkToPraiseRaking() {
108
- var href = window.location.href;
109
- var url = "".concat(href.split("#")[0], "#praise-raking");
110
- window.open(url, "self");
111
- };
112
-
113
- var handleChangeDate = function handleChangeDate(item) {
114
- setType(item);
115
- var createDate = "";
116
- var endDate = "";
117
-
118
- if (item == (0, _getLocale.getLocale)("Feed_Tab_Title_Thismonth")) {
119
- createDate = (0, _formatTime.showMonthFirstDay)();
120
- endDate = (0, _formatTime.showNextMonthFirstDay)();
121
- } else if (item == (0, _getLocale.getLocale)("Feed_Tab_Title_Thisweek")) {
122
- createDate = (0, _formatTime.showWeekFirstDay)();
123
- endDate = (0, _formatTime.showNextWeekFirstDay)();
124
- }
125
-
126
- setDate({
127
- createDate: createDate,
128
- endDate: endDate
129
- });
130
- };
131
-
132
- function TabBar() {
133
- var typeData = [(0, _getLocale.getLocale)("Mod_all"), (0, _getLocale.getLocale)("Feed_Tab_Title_Thisweek"), (0, _getLocale.getLocale)("Feed_Tab_Title_Thismonth")];
134
- return /*#__PURE__*/_react["default"].createElement("div", {
135
- className: "".concat(preCls, "__tab-bar")
136
- }, typeData.map(function (item, key) {
137
- return /*#__PURE__*/_react["default"].createElement("div", {
138
- key: key,
139
- className: (0, _classnames["default"])("".concat(preCls, "__tab-bar-item"), _defineProperty({}, "".concat(preCls, "__tab-bar-item--selected"), type === item)),
140
- onClick: function onClick() {
141
- return handleChangeDate(item);
142
- }
143
- }, item);
144
- }));
145
- }
146
-
147
- return /*#__PURE__*/_react["default"].createElement("div", {
148
- className: (0, _classnames["default"])("".concat(preCls))
149
- }, /*#__PURE__*/_react["default"].createElement("div", {
150
- className: (0, _classnames["default"])("".concat(preCls, "__header"))
151
- }, /*#__PURE__*/_react["default"].createElement("div", {
152
- className: (0, _classnames["default"])("".concat(preCls, "__header-left"))
153
- }, /*#__PURE__*/_react["default"].createElement("img", {
154
- className: (0, _classnames["default"])("".concat(preCls, "__header-image")),
155
- src: require("./image/like-ranking.svg")
156
- }), /*#__PURE__*/_react["default"].createElement("span", {
157
- className: (0, _classnames["default"])("".concat(preCls, "__header-text"))
158
- }, (0, _getLocale.getLocale)("Feed_Title_Likeranking"))), Auth.hasPraiseAuth() && /*#__PURE__*/_react["default"].createElement("div", {
159
- className: (0, _classnames["default"])("".concat(preCls, "__header-right")),
160
- onClick: handleLinkToPraiseRaking
161
- }, (0, _getLocale.getLocale)("Feed_Set_Pop_Butt_More"))), /*#__PURE__*/_react["default"].createElement("div", {
162
- className: (0, _classnames["default"])("".concat(preCls, "__content"))
163
- }, TabBar(), /*#__PURE__*/_react["default"].createElement("div", {
164
- className: (0, _classnames["default"])("".concat(preCls, "__content-table"))
165
- }, !rankingData || rankingData.length === 0 && /*#__PURE__*/_react["default"].createElement("div", {
166
- className: "".concat(preCls, "__content-table-empty")
167
- }, /*#__PURE__*/_react["default"].createElement("span", {
168
- className: "".concat(preCls, "__content-table-empty-text")
169
- }, "\u6682\u65E0\u6392\u884C")), rankingData && rankingData.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
170
- className: (0, _classnames["default"])("".concat(preCls, "__content-table-items"))
171
- }, rankingData.map(function (item, index) {
172
- return /*#__PURE__*/_react["default"].createElement(_item["default"], {
173
- userInfo: item,
174
- key: index
175
- });
176
- })))));
177
- };
178
-
179
- var _default = DynamicLikeRanking;
180
- exports["default"] = _default;
@@ -1,105 +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 _avatar = _interopRequireDefault(require("../../avatar"));
11
-
12
- var _bsGlobal = require("../../../utils/bs-global");
13
-
14
- var _openData = require("../../../utils/open-data");
15
-
16
- var _tooltip = _interopRequireDefault(require("../../tooltip"));
17
-
18
- var _getLocale = require("../../../utils/getLocale");
19
-
20
- require("./index.css");
21
-
22
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
-
24
- var preCls = "danamic-like-ranking__item";
25
-
26
- var Item = function Item(_ref) {
27
- var userInfo = _ref.userInfo;
28
-
29
- var formatRaking = function formatRaking(num) {
30
- if (num === 1) {
31
- return /*#__PURE__*/_react["default"].createElement("img", {
32
- className: "".concat(preCls, "-medal"),
33
- src: require("./image/ranking-1.png"),
34
- alt: "\u91D1\u724C"
35
- });
36
- }
37
-
38
- if (num === 2) {
39
- return /*#__PURE__*/_react["default"].createElement("img", {
40
- className: "".concat(preCls, "-medal"),
41
- src: require("./image/ranking-2.png"),
42
- alt: "\u94F6\u724C"
43
- });
44
- }
45
-
46
- if (num === 3) {
47
- return /*#__PURE__*/_react["default"].createElement("img", {
48
- className: "".concat(preCls, "-medal"),
49
- src: require("./image/ranking-3.png"),
50
- alt: "\u94DC\u724C"
51
- });
52
- }
53
-
54
- return /*#__PURE__*/_react["default"].createElement("span", {
55
- className: "".concat(preCls, "-num")
56
- }, num);
57
- };
58
-
59
- if (!userInfo || Object.keys(userInfo).length === 0) return null;
60
- var rankNum = userInfo.rankNum,
61
- user = userInfo.user,
62
- pariseNums = userInfo.pariseNums;
63
- var avatar = user.avatar,
64
- name = user.name,
65
- userId = user.userId,
66
- userType = user.userType; // 之后要用
67
- // const url = getUrlForUserPage({
68
- // userId: userId,
69
- // userType: userType || 2,
70
- // });
71
- // const handleOpenUserPage = () => {
72
- // window.open(url, "_blank");
73
- // };
74
-
75
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
76
- className: "".concat(preCls, "-pre")
77
- }, formatRaking(rankNum)), /*#__PURE__*/_react["default"].createElement("div", {
78
- className: "".concat(preCls, "-avatar")
79
- }, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
80
- name: name,
81
- src: avatar.original,
82
- color: avatar.color,
83
- userId: userId,
84
- size: {
85
- width: 28,
86
- textNum: 1,
87
- fontSize: 14
88
- }
89
- })), /*#__PURE__*/_react["default"].createElement("div", {
90
- className: "".concat(preCls, "-name")
91
- }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
92
- text: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
93
- id: userId,
94
- name: name
95
- }),
96
- maxWidth: 120
97
- })), /*#__PURE__*/_react["default"].createElement("div", {
98
- className: "".concat(preCls, "-like-text")
99
- }, /*#__PURE__*/_react["default"].createElement("span", {
100
- className: "".concat(preCls, "-like-num")
101
- }, (0, _bsGlobal.formatNum)(pariseNums)), (0, _getLocale.getLocale)("Mod_Kudos")));
102
- };
103
-
104
- var _default = Item;
105
- exports["default"] = _default;