@titaui/pc 1.11.27-beta.8 → 1.11.29
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/lib/components/avatar/name-avatar/index.css +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/avatar/text-avatar/index.css +7 -0
- package/lib/components/avatar/text-avatar/index.js +32 -7
- package/lib/components/button/icon-btn/index.js +17 -8
- package/lib/components/button/rect-btn/index.css +11 -45
- package/lib/components/button/rect-btn/index.js +13 -19
- package/lib/components/change-okr-modal/Item.js +14 -14
- package/lib/components/change-okr-modal/index.js +1 -2
- package/lib/components/create-okr-modal/index.js +1 -3
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/dialog-confirm/index.css +2 -2
- package/lib/components/drawer/headerAction.js +1 -5
- package/lib/components/drawer/headerDrop.js +4 -42
- package/lib/components/drawer/index.css +0 -33
- package/lib/components/drawer/index.js +3 -26
- package/lib/components/drop-selector/index.js +25 -10
- package/lib/components/dynamic/advertise/components/next-btn/index.css +27 -0
- package/lib/components/dynamic/advertise/components/next-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.css +26 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/index.css +21 -0
- package/lib/components/dynamic/advertise/index.js +126 -0
- package/lib/components/dynamic/advertise/interface.js +5 -0
- package/lib/components/dynamic/advertise/util.js +28 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.css +81 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.js +203 -0
- package/lib/components/dynamic/components/first-level-tabs/index.css +101 -0
- package/lib/components/dynamic/components/first-level-tabs/index.js +131 -0
- package/lib/components/dynamic/constant.js +33 -32
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +9 -9
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -5
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +6 -6
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +10 -10
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +13 -13
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +9 -9
- package/lib/components/dynamic/dynamic-item/index.js +50 -32
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.css +146 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.js +180 -0
- package/lib/components/dynamic/dynamic-like-ranking/item.js +105 -0
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
- package/lib/components/dynamic/dynamic-liking/index.css +81 -0
- package/lib/{pages/new-okr-list/header/operate-record.js → components/dynamic/dynamic-liking/index.js} +39 -91
- package/lib/components/dynamic/dynamic-liking/item.js +75 -0
- package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
- package/lib/components/dynamic/dynamic-list/index.js +7 -15
- package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +16 -0
- package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +30 -0
- package/lib/components/dynamic/dynamic-topping/index.css +141 -0
- package/lib/components/dynamic/dynamic-topping/index.js +82 -0
- package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
- package/lib/components/dynamic/dynamic-topping/item.js +153 -0
- package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
- package/lib/components/dynamic/dynamic.css +173 -0
- package/lib/components/dynamic/dynamic.js +428 -0
- package/lib/components/dynamic/export-module/index.js +37 -0
- package/lib/components/dynamic/img/dynamic-top.svg +14 -0
- package/lib/components/dynamic/index.js +12 -9
- package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
- package/lib/components/dynamic/my-team/img/line.png +0 -0
- package/lib/components/dynamic/my-team/img/team.png +0 -0
- package/lib/components/dynamic/my-team/index.css +184 -0
- package/lib/components/dynamic/my-team/index.js +263 -0
- package/lib/components/dynamic/my-team/request-api.js +52 -0
- package/lib/components/dynamic/my-team/util.js +20 -0
- package/lib/components/dynamic/new-ui.css +192 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +58 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +68 -0
- package/lib/components/dynamic/online-broadcast/data.js +77 -0
- package/lib/components/dynamic/online-broadcast/img/broadcast.svg +14 -0
- package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
- package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
- package/lib/components/dynamic/online-broadcast/index.css +46 -0
- package/lib/components/dynamic/online-broadcast/index.js +61 -0
- package/lib/components/dynamic/online-broadcast/interfact.js +5 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +44 -0
- package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +51 -0
- package/lib/components/dynamic/quick-operation/index.js +120 -0
- package/lib/components/dynamic/request-api.js +68 -7
- package/lib/components/e-priority/index.js +8 -8
- package/lib/components/eReport/eReportShare/index.js +11 -11
- package/lib/components/form/form-fields/date/index.css +24 -0
- package/lib/components/form/form-fields/date/index.js +102 -0
- package/lib/components/form/form-fields/input/index.js +10 -10
- package/lib/components/form/form-fields/user/index.css +23 -3
- package/lib/components/form/form-fields/user/index.js +18 -8
- package/lib/components/form/form-fields/user/user-input.js +15 -6
- package/lib/components/form/index.js +10 -3
- package/lib/components/grid-layout/sub-employee-okr/person-okr.js +5 -5
- package/lib/components/icon-button-list/index.js +3 -3
- package/lib/components/img-viewer/index.css +3 -3
- package/lib/components/img-viewer/index.js +11 -11
- package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
- package/lib/components/menus/components/menu-tree/index.css +4 -2
- package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
- package/lib/components/menus/export-modules/interview-menus/constant.js +30 -0
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
- package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +128 -0
- package/lib/components/menus/index.js +11 -5
- package/lib/components/nav-top/components/menu/index.js +14 -14
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
- package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
- package/lib/components/nav-top/components/user-message/constant.js +1 -0
- package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
- package/lib/components/nav-top/components/user-message/index.js +23 -20
- package/lib/components/nav-top/index.js +4 -8
- package/lib/components/nav-top/request.apis.js +3 -1
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -10
- package/lib/components/okr-detail/components/header/o-name.js +3 -10
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +10 -14
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
- package/lib/components/okr-detail/detail-header/actions.js +23 -23
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +43 -98
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
- package/lib/components/okr-detail/detail-header/index.css +0 -11
- package/lib/components/okr-detail/detail-header/index.js +234 -228
- package/lib/components/okr-detail/index.js +21 -40
- package/lib/components/okr-detail/okr-list/index.js +8 -11
- package/lib/components/okr-detail/request-apis.js +4 -10
- package/lib/components/okr-flow/child-node/index.css +6 -6
- package/lib/components/okr-flow/child-node/work-node.js +21 -21
- package/lib/components/okr-flow/export-modal/index.js +33 -19
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +14 -14
- package/lib/components/okr-flow/okr-map/index.js +5 -5
- package/lib/components/okr-flow/request-apis.js +4 -4
- package/lib/components/okr-flow/root-node/index.js +25 -24
- package/lib/components/okr-flow/utils/index.js +5 -5
- package/lib/components/okr-flow/utils/tree-handler.js +17 -17
- package/lib/components/okr-period-selector/index.js +5 -9
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +30 -30
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/pagination/index.css +3 -3
- package/lib/components/pagination/select.css +58 -23
- package/lib/components/period-selector/index.css +3 -3
- package/lib/components/period-selector/index.js +11 -11
- package/lib/components/picker/components/panels/date-panel/date-body.js +118 -0
- package/lib/components/picker/components/panels/date-panel/date-head.js +87 -0
- package/lib/components/picker/components/panels/date-panel/index.css +14 -0
- package/lib/components/picker/components/panels/date-panel/index.js +49 -0
- package/lib/components/picker/components/panels/month-panel/index.css +27 -0
- package/lib/components/picker/components/panels/month-panel/index.js +63 -0
- package/lib/components/picker/components/panels/month-panel/month-body.js +89 -0
- package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
- package/lib/components/picker/components/panels/panel-body/index.js +53 -0
- package/lib/components/picker/components/panels/panel-head/index.js +48 -0
- package/lib/components/picker/components/panels/year-panel/index.css +23 -0
- package/lib/components/picker/components/panels/year-panel/index.js +65 -0
- package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
- package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
- package/lib/components/picker/components/picker-trigger/index.css +57 -0
- package/lib/components/picker/components/picker-trigger/index.js +94 -0
- package/lib/components/picker/context.js +15 -0
- package/lib/components/picker/index.css +121 -0
- package/lib/components/picker/index.js +13 -0
- package/lib/components/picker/picker-panels.js +182 -0
- package/lib/components/picker/picker.js +132 -0
- package/lib/components/picker/type.js +5 -0
- package/lib/components/picker/utils.js +28 -0
- package/lib/components/popup/index.js +4 -4
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +10 -16
- package/lib/components/radio/index.css +9 -9
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/superset-charts/utils/axios.js +5 -5
- package/lib/components/survey-model/index.css +18 -18
- package/lib/components/survey-model/instance.js +1 -1
- package/lib/components/task-relation-modal/request-api.js +1 -2
- package/lib/components/task-tree/helper.js +61 -0
- package/lib/components/task-tree/images/P1.svg +15 -0
- package/lib/components/task-tree/images/P2.svg +15 -0
- package/lib/components/task-tree/images/P3.svg +15 -0
- package/lib/components/task-tree/images/P4.svg +15 -0
- package/lib/components/task-tree/images/P5.svg +15 -0
- package/lib/components/task-tree/images/arrow.svg +9 -0
- package/lib/components/task-tree/images/empty-131.png +0 -0
- package/lib/components/task-tree/images/followed.svg +33 -0
- package/lib/components/task-tree/images/nice.svg +108 -0
- package/lib/components/task-tree/images/struc12.png +0 -0
- package/lib/components/task-tree/images/struc2.png +0 -0
- package/lib/components/task-tree/images/xialat-s.svg +13 -0
- package/lib/components/task-tree/index.js +22 -0
- package/lib/components/task-tree/mock.js +944 -0
- package/lib/components/task-tree/precls.js +8 -0
- package/lib/components/task-tree/request-apis.js +88 -0
- package/lib/components/task-tree/task-item-node/constant.js +45 -0
- package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
- package/lib/components/task-tree/task-item-node/e-project.js +212 -0
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
- package/lib/components/task-tree/task-item-node/e-task.js +426 -0
- package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
- package/lib/components/task-tree/task-item-node/index.css +289 -0
- package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
- package/lib/components/task-tree/task-tree.css +16 -0
- package/lib/components/task-tree/task-tree.js +49 -0
- package/lib/components/time-picker/index.css +123 -0
- package/lib/components/time-picker/index.js +13 -0
- package/lib/components/time-picker/time-picker-selector.js +138 -0
- package/lib/components/time-picker/time-picker.js +336 -0
- package/lib/components/time-picker/timer-picker-input.js +96 -0
- package/lib/components/time-picker/utils.js +52 -0
- package/lib/components/toast/index.js +3 -5
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
- package/lib/components-v1/radio/radio.js +3 -3
- package/lib/components-v1/radio/style/index.css +8 -8
- package/lib/index.js +0 -40
- package/lib/pages/aha2021/index.js +5 -1
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -38
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/new-okr-list/request-api.js +2 -8
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +24 -24
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +31 -31
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +2 -2
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +11 -11
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +8 -8
- package/lib/pages/okr-map/number-select/index.js +2 -2
- package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
- package/lib/utils/auth.js +6 -6
- package/lib/utils/bs-global.js +12 -12
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/hooks.js +72 -0
- package/lib/utils/open-data.js +27 -31
- package/package.json +6 -3
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -223
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -31
- package/.prettierrc.js +0 -90
- package/.vscode/settings.json +0 -5
- package/lib/components/okr-detail/detail-header/constant.js +0 -53
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -55
- package/lib/components/okr-detail/helper.js +0 -108
- package/lib/components/textarea/index.css +0 -142
- package/lib/components/textarea/index.js +0 -259
- package/lib/pages/new-okr-list/header/common.js +0 -52
|
@@ -0,0 +1,203 @@
|
|
|
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 _popup = _interopRequireDefault(require("../../../popup"));
|
|
15
|
+
|
|
16
|
+
var _userSelector = _interopRequireDefault(require("../../../user-selector"));
|
|
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
|
+
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-search-input";
|
|
43
|
+
|
|
44
|
+
var SearchType = function SearchType() {
|
|
45
|
+
return {
|
|
46
|
+
dynamic: (0, _getLocale.getLocale)("Menu_Title_Feed"),
|
|
47
|
+
person: (0, _getLocale.getLocale)("Mod_UserName")
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var DynamicSearchInput = function DynamicSearchInput(_ref) {
|
|
52
|
+
var _SearchType;
|
|
53
|
+
|
|
54
|
+
var setSearchKey = _ref.setSearchKey,
|
|
55
|
+
setSearchKeyType = _ref.setSearchKeyType,
|
|
56
|
+
setSearchUser = _ref.setSearchUser;
|
|
57
|
+
|
|
58
|
+
var _useState = (0, _react.useState)("dynamic"),
|
|
59
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
60
|
+
searchDynamicType = _useState2[0],
|
|
61
|
+
setSearchDynamicType = _useState2[1];
|
|
62
|
+
|
|
63
|
+
var _useState3 = (0, _react.useState)(""),
|
|
64
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
65
|
+
searchInputValue = _useState4[0],
|
|
66
|
+
setSearchInputValue = _useState4[1];
|
|
67
|
+
|
|
68
|
+
var _useState5 = (0, _react.useState)(false),
|
|
69
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
70
|
+
isMouseEnter = _useState6[0],
|
|
71
|
+
setIsMouseEnter = _useState6[1];
|
|
72
|
+
|
|
73
|
+
var popupRef = (0, _react.useRef)();
|
|
74
|
+
var selectorRef = (0, _react.useRef)();
|
|
75
|
+
var inputRef = (0, _react.useRef)();
|
|
76
|
+
|
|
77
|
+
var handleInputChange = function handleInputChange(e) {
|
|
78
|
+
setSearchInputValue(e.target.value);
|
|
79
|
+
|
|
80
|
+
if (searchDynamicType === "person") {
|
|
81
|
+
// @ts-ignore
|
|
82
|
+
selectorRef.current && selectorRef.current.open();
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
var handleKeyUp = function handleKeyUp(e) {
|
|
87
|
+
// 按回车
|
|
88
|
+
if (e.keyCode === 13 && searchDynamicType !== "person") {
|
|
89
|
+
setSearchKey(searchInputValue);
|
|
90
|
+
setSearchKeyType(searchDynamicType);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
var handleChangeSearchDynamicType = function handleChangeSearchDynamicType(type) {
|
|
95
|
+
setSearchDynamicType(type);
|
|
96
|
+
setSearchKeyType; // @ts-ignore
|
|
97
|
+
|
|
98
|
+
popupRef.current && popupRef.current.close();
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
var handleSelected = function handleSelected(_ref2) {
|
|
102
|
+
var _ref3 = _slicedToArray(_ref2, 1),
|
|
103
|
+
user = _ref3[0];
|
|
104
|
+
|
|
105
|
+
setSearchInputValue(user.data.name);
|
|
106
|
+
setSearchUser(user.data);
|
|
107
|
+
setSearchKeyType(searchDynamicType);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
var handleMouseEnter = function handleMouseEnter() {
|
|
111
|
+
setIsMouseEnter(true);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var handleMouseLeave = function handleMouseLeave() {
|
|
115
|
+
setIsMouseEnter(false);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
var handleClearSearchValue = function handleClearSearchValue() {
|
|
119
|
+
setSearchInputValue("");
|
|
120
|
+
setSearchKey("");
|
|
121
|
+
setSearchUser(null);
|
|
122
|
+
setSearchKeyType(searchDynamicType);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
function PopupContent() {
|
|
126
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
127
|
+
className: "".concat(prefix, "__popup")
|
|
128
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
129
|
+
className: (0, _classnames["default"])("".concat(prefix, "__popup-item"), _defineProperty({}, "".concat(prefix, "__popup-item--active"), searchDynamicType === "dynamic")),
|
|
130
|
+
onClick: function onClick() {
|
|
131
|
+
handleChangeSearchDynamicType("dynamic");
|
|
132
|
+
}
|
|
133
|
+
}, (0, _getLocale.getLocale)("Menu_Title_Feed")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
134
|
+
className: (0, _classnames["default"])("".concat(prefix, "__popup-item"), _defineProperty({}, "".concat(prefix, "__popup-item--active"), searchDynamicType === "person")),
|
|
135
|
+
onClick: function onClick() {
|
|
136
|
+
handleChangeSearchDynamicType("person");
|
|
137
|
+
}
|
|
138
|
+
}, (0, _getLocale.getLocale)("Mod_UserName")));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
142
|
+
className: prefix,
|
|
143
|
+
ref: inputRef,
|
|
144
|
+
onMouseEnter: handleMouseEnter,
|
|
145
|
+
onMouseLeave: handleMouseLeave
|
|
146
|
+
}, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
147
|
+
popup: PopupContent,
|
|
148
|
+
popupPlacement: "bottom",
|
|
149
|
+
ref: popupRef,
|
|
150
|
+
popupAlign: {
|
|
151
|
+
offset: [-10, 2],
|
|
152
|
+
overflow: {
|
|
153
|
+
adjustX: true,
|
|
154
|
+
adjustY: true
|
|
155
|
+
},
|
|
156
|
+
targetOffset: [0, 0]
|
|
157
|
+
}
|
|
158
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
159
|
+
className: "".concat(prefix, "__select-type")
|
|
160
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, (_SearchType = SearchType()) === null || _SearchType === void 0 ? void 0 : _SearchType[searchDynamicType]), /*#__PURE__*/_react["default"].createElement("i", {
|
|
161
|
+
className: (0, _classnames["default"])("tu-icon-sort-down", "".concat(prefix, "__icon"))
|
|
162
|
+
}))), /*#__PURE__*/_react["default"].createElement("input", {
|
|
163
|
+
className: "".concat(prefix, "__input"),
|
|
164
|
+
value: searchInputValue,
|
|
165
|
+
onChange: handleInputChange,
|
|
166
|
+
onKeyUp: handleKeyUp,
|
|
167
|
+
placeholder: searchDynamicType === "dynamic" ? (0, _getLocale.getLocale)("Feed_Search_Searchbykeyword") : (0, _getLocale.getLocale)("Mod_SearchbyName")
|
|
168
|
+
}), isMouseEnter && searchInputValue && /*#__PURE__*/_react["default"].createElement("i", {
|
|
169
|
+
onClick: handleClearSearchValue,
|
|
170
|
+
className: (0, _classnames["default"])("tu-icon-circle", "".concat(prefix, "__input-clear"))
|
|
171
|
+
}), /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
|
|
172
|
+
ref: selectorRef,
|
|
173
|
+
multiple: false,
|
|
174
|
+
position: "bottomRight",
|
|
175
|
+
onSelect: handleSelected,
|
|
176
|
+
disabledDepartSelect: true,
|
|
177
|
+
showSearchInput: false,
|
|
178
|
+
searchedPanes: {
|
|
179
|
+
user: true,
|
|
180
|
+
depart: false,
|
|
181
|
+
group: false
|
|
182
|
+
},
|
|
183
|
+
searchWord: searchInputValue,
|
|
184
|
+
trigger: /*#__PURE__*/_react["default"].createElement("span", null),
|
|
185
|
+
getPopupContainer: function getPopupContainer() {
|
|
186
|
+
return inputRef.current;
|
|
187
|
+
},
|
|
188
|
+
panes: {
|
|
189
|
+
depart: true
|
|
190
|
+
},
|
|
191
|
+
popupAlign: {
|
|
192
|
+
offset: [17, 15],
|
|
193
|
+
overflow: {
|
|
194
|
+
adjustX: true,
|
|
195
|
+
adjustY: true
|
|
196
|
+
},
|
|
197
|
+
targetOffset: [0, 0]
|
|
198
|
+
}
|
|
199
|
+
}));
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
var _default = DynamicSearchInput;
|
|
203
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
.titaui-dynamic-first-level-tabs {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.titaui-dynamic-first-level-tabs__tab {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
height: 100%;
|
|
10
|
+
position: relative;
|
|
11
|
+
font-size: 16px;
|
|
12
|
+
color: #141c28;
|
|
13
|
+
line-height: 24px;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
margin-right: 36px;
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
word-break: keep-all;
|
|
18
|
+
text-overflow: ellipsis;
|
|
19
|
+
font-weight: 400;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.titaui-dynamic-first-level-tabs__tab--active {
|
|
23
|
+
color: #2879ff;
|
|
24
|
+
font-weight: 600;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.titaui-dynamic-first-level-tabs__tab--active::before {
|
|
28
|
+
content: '';
|
|
29
|
+
display: inline-block;
|
|
30
|
+
position: absolute;
|
|
31
|
+
bottom: 0;
|
|
32
|
+
left: 50%;
|
|
33
|
+
transform: translateX(-50%);
|
|
34
|
+
width: 24px;
|
|
35
|
+
height: 4px;
|
|
36
|
+
background: linear-gradient(90deg, #4e90ff 0%, #2879ff 100%);
|
|
37
|
+
border-radius: 2px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.titaui-dynamic-first-level-tabs__tab--point {
|
|
41
|
+
position: absolute;
|
|
42
|
+
width: 6px;
|
|
43
|
+
height: 6px;
|
|
44
|
+
background: #f05e5e;
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
right: -6px;
|
|
47
|
+
top: 22px;
|
|
48
|
+
border: 2px solid #ffffff;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.titaui-dynamic-first-level-tabs__hide-first-level-tabs {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
background: #ffffff;
|
|
55
|
+
box-shadow: 0px 4px 24px 0px rgba(127, 145, 180, 0.2);
|
|
56
|
+
border-radius: 12px;
|
|
57
|
+
padding: 16px 0;
|
|
58
|
+
color: #ffffff;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.titaui-dynamic-first-level-tabs__hide-first-level-tabs:hover {
|
|
62
|
+
color: #ffffff;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.titaui-dynamic-first-level-tabs__hide-first-level-tab {
|
|
66
|
+
padding: 5px 20px;
|
|
67
|
+
font-size: 14px;
|
|
68
|
+
font-weight: 400;
|
|
69
|
+
color: #3f4755;
|
|
70
|
+
line-height: 22px;
|
|
71
|
+
min-width: 104px;
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.titaui-dynamic-first-level-tabs__hide-first-level-tab--active {
|
|
76
|
+
color: #2879ff;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.titaui-dynamic-first-level-tabs__hide-first-level-tab:hover {
|
|
80
|
+
cursor: pointer;
|
|
81
|
+
background: #f7f8fa;
|
|
82
|
+
color: #2879ff;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.titaui-dynamic-first-level-tabs__more-icon {
|
|
86
|
+
display: inline-flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
margin: 8px 12px;
|
|
89
|
+
font-weight: 600;
|
|
90
|
+
padding: 6px;
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
border-radius: 4px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.titaui-dynamic-first-level-tabs__more-icon--active {
|
|
96
|
+
color: #2879ff;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.titaui-dynamic-first-level-tabs__more-icon:hover {
|
|
100
|
+
background: #f0f4fa;
|
|
101
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
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;
|
|
@@ -10,19 +10,19 @@ var _getLocale = require("../../utils/getLocale");
|
|
|
10
10
|
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; }
|
|
11
11
|
|
|
12
12
|
var OkrRiskMapping = {
|
|
13
|
-
0:
|
|
13
|
+
0: 'normal',
|
|
14
14
|
// 正常推进
|
|
15
|
-
1:
|
|
15
|
+
1: 'normal',
|
|
16
16
|
// 正常推进
|
|
17
|
-
2:
|
|
17
|
+
2: 'risk',
|
|
18
18
|
// 注意风险
|
|
19
|
-
3:
|
|
19
|
+
3: 'delay',
|
|
20
20
|
// 已有风险
|
|
21
|
-
4:
|
|
21
|
+
4: 'end',
|
|
22
22
|
// kr及o全都完成
|
|
23
|
-
5:
|
|
23
|
+
5: 'delay',
|
|
24
24
|
// 延期完成
|
|
25
|
-
6:
|
|
25
|
+
6: 'normal' // 正常推进
|
|
26
26
|
|
|
27
27
|
};
|
|
28
28
|
exports.OkrRiskMapping = OkrRiskMapping;
|
|
@@ -52,7 +52,7 @@ exports.EFeedType = EFeedType;
|
|
|
52
52
|
EFeedType[EFeedType["Signin"] = 80] = "Signin";
|
|
53
53
|
EFeedType[EFeedType["O"] = 101] = "O";
|
|
54
54
|
EFeedType[EFeedType["OKRsCommunication"] = 102] = "OKRsCommunication";
|
|
55
|
-
EFeedType[EFeedType["
|
|
55
|
+
EFeedType[EFeedType["Interview"] = 103] = "Interview";
|
|
56
56
|
})(EFeedType || (exports.EFeedType = EFeedType = {}));
|
|
57
57
|
|
|
58
58
|
var EShareType;
|
|
@@ -62,6 +62,7 @@ exports.EShareType = EShareType;
|
|
|
62
62
|
EShareType[EShareType["CommonShare"] = 0] = "CommonShare";
|
|
63
63
|
EShareType[EShareType["ShareToDynamic"] = 1] = "ShareToDynamic";
|
|
64
64
|
EShareType[EShareType["BiShare"] = 3] = "BiShare";
|
|
65
|
+
EShareType[EShareType["InterviewShare"] = 5] = "InterviewShare";
|
|
65
66
|
})(EShareType || (exports.EShareType = EShareType = {}));
|
|
66
67
|
|
|
67
68
|
var EObjType;
|
|
@@ -81,7 +82,7 @@ exports.EObjType = EObjType;
|
|
|
81
82
|
var getObjTypeMapText = function getObjTypeMapText(key) {
|
|
82
83
|
var _data;
|
|
83
84
|
|
|
84
|
-
var data = (_data = {}, _defineProperty(_data, EObjType.Project, (0, _getLocale.getLocale)(
|
|
85
|
+
var data = (_data = {}, _defineProperty(_data, EObjType.Project, (0, _getLocale.getLocale)('Menu_Title_Projects')), _defineProperty(_data, EObjType.Task, (0, _getLocale.getLocale)('Mod_Tasks')), _defineProperty(_data, EObjType.O, (0, _getLocale.getLocale)('Mod_Objective')), _defineProperty(_data, EObjType.Kr, (0, _getLocale.getLocale)('Mod_KeyResults')), _defineProperty(_data, EObjType.MileStone, (0, _getLocale.getLocale)('Pro_page_Plan_Milestone')), _defineProperty(_data, EObjType.KanBan, (0, _getLocale.getLocale)('Pro_page_V_Tab_Kanban')), _defineProperty(_data, EObjType.Report, '总结'), _data);
|
|
85
86
|
return data[key];
|
|
86
87
|
};
|
|
87
88
|
|
|
@@ -89,34 +90,34 @@ exports.getObjTypeMapText = getObjTypeMapText;
|
|
|
89
90
|
|
|
90
91
|
var ObjectType = function ObjectType() {
|
|
91
92
|
return {
|
|
92
|
-
1: (0, _getLocale.getLocale)(
|
|
93
|
-
4: (0, _getLocale.getLocale)(
|
|
94
|
-
5: (0, _getLocale.getLocale)(
|
|
95
|
-
6: (0, _getLocale.getLocale)(
|
|
96
|
-
7: (0, _getLocale.getLocale)(
|
|
97
|
-
8: (0, _getLocale.getLocale)(
|
|
98
|
-
10: (0, _getLocale.getLocale)(
|
|
99
|
-
11: (0, _getLocale.getLocale)(
|
|
100
|
-
12: (0, _getLocale.getLocale)(
|
|
101
|
-
62: (0, _getLocale.getLocale)(
|
|
102
|
-
65: (0, _getLocale.getLocale)(
|
|
103
|
-
70: (0, _getLocale.getLocale)(
|
|
104
|
-
79: (0, _getLocale.getLocale)(
|
|
105
|
-
80: (0, _getLocale.getLocale)(
|
|
106
|
-
42: (0, _getLocale.getLocale)(
|
|
93
|
+
1: (0, _getLocale.getLocale)('Mod_sannouncement'),
|
|
94
|
+
4: (0, _getLocale.getLocale)('Menu_Title_Projects'),
|
|
95
|
+
5: (0, _getLocale.getLocale)('Mod_sPerformanceForm'),
|
|
96
|
+
6: (0, _getLocale.getLocale)('Mod_sPerformanceGoals'),
|
|
97
|
+
7: (0, _getLocale.getLocale)('Mod_stasks'),
|
|
98
|
+
8: (0, _getLocale.getLocale)('Mod_sDailySummary'),
|
|
99
|
+
10: (0, _getLocale.getLocale)('Feed_sFeed'),
|
|
100
|
+
11: (0, _getLocale.getLocale)('Pro_page_Plan'),
|
|
101
|
+
12: (0, _getLocale.getLocale)('Feed_OperationTasks'),
|
|
102
|
+
62: (0, _getLocale.getLocale)('Mod_sobjective'),
|
|
103
|
+
65: (0, _getLocale.getLocale)('Feed_Keyresults'),
|
|
104
|
+
70: (0, _getLocale.getLocale)('OKR_MyO_KRP_Review'),
|
|
105
|
+
79: (0, _getLocale.getLocale)('Mod_skeyprogress'),
|
|
106
|
+
80: (0, _getLocale.getLocale)('Feed_sAnnouncement'),
|
|
107
|
+
42: (0, _getLocale.getLocale)('OKR_MyO_E_Reward')
|
|
107
108
|
};
|
|
108
109
|
};
|
|
109
110
|
|
|
110
111
|
exports.ObjectType = ObjectType;
|
|
111
112
|
var EStatusStatus2ClassType = {
|
|
112
|
-
2:
|
|
113
|
-
1:
|
|
114
|
-
4:
|
|
115
|
-
3:
|
|
116
|
-
6:
|
|
117
|
-
0:
|
|
118
|
-
5:
|
|
113
|
+
2: 'tu-icon-finished',
|
|
114
|
+
1: 'tu-icon-running',
|
|
115
|
+
4: 'tu-icon-canceled',
|
|
116
|
+
3: 'tu-icon-deferred',
|
|
117
|
+
6: 'tu-icon-paused',
|
|
118
|
+
0: 'tu-icon-notstart',
|
|
119
|
+
5: 'tu-icon-jiantou-right'
|
|
119
120
|
};
|
|
120
121
|
exports.EStatusStatus2ClassType = EStatusStatus2ClassType;
|
|
121
|
-
var PlanReportType = [
|
|
122
|
+
var PlanReportType = ['titaPlanReport', 'titaPlanManagerReport'];
|
|
122
123
|
exports.PlanReportType = PlanReportType;
|
|
@@ -61,7 +61,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
61
61
|
|
|
62
62
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
63
63
|
|
|
64
|
-
var prefix =
|
|
64
|
+
var prefix = 'titaui-dynamic-item';
|
|
65
65
|
|
|
66
66
|
var DynamicFooter = function DynamicFooter(_ref) {
|
|
67
67
|
var _getBSGlobal;
|
|
@@ -95,8 +95,8 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
95
95
|
setUpvoteModalVisible = _useState8[1];
|
|
96
96
|
|
|
97
97
|
var communicationRef = (0, _react.useRef)();
|
|
98
|
-
var hasRewardBtn = !!((_getBSGlobal = (0, _bsGlobal.getBSGlobal)(
|
|
99
|
-
return item.AppId ===
|
|
98
|
+
var hasRewardBtn = !!((_getBSGlobal = (0, _bsGlobal.getBSGlobal)('WebHead')) !== null && _getBSGlobal !== void 0 && _getBSGlobal.AppHead.find(function (item) {
|
|
99
|
+
return item.AppId === '950';
|
|
100
100
|
}));
|
|
101
101
|
|
|
102
102
|
var _useContext = (0, _react.useContext)(_context.SearchKeyContext),
|
|
@@ -108,7 +108,7 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
var onChangeParse = function onChangeParse(type) {
|
|
111
|
-
var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)(
|
|
111
|
+
var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)('loginUserInfo'),
|
|
112
112
|
Id = _getBSGlobal2.Id;
|
|
113
113
|
|
|
114
114
|
var data = _toConsumableArray(praiseData).filter(function (item) {
|
|
@@ -116,8 +116,8 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
116
116
|
});
|
|
117
117
|
|
|
118
118
|
if (type) {
|
|
119
|
-
var avatar = (0, _bsGlobal.getBSGlobal)(
|
|
120
|
-
var name = (0, _bsGlobal.getBSGlobal)(
|
|
119
|
+
var avatar = (0, _bsGlobal.getBSGlobal)('loginUserInfo').UserAvatar;
|
|
120
|
+
var name = (0, _bsGlobal.getBSGlobal)('loginUserInfo').Name;
|
|
121
121
|
avatar.color = avatar.Color;
|
|
122
122
|
avatar.medium = avatar.Medium;
|
|
123
123
|
var parseUser = {
|
|
@@ -151,7 +151,7 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
151
151
|
|
|
152
152
|
var renderUpvoteCount = function renderUpvoteCount(type, count) {
|
|
153
153
|
if (count === 0) {
|
|
154
|
-
return
|
|
154
|
+
return '';
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
return count || type;
|
|
@@ -189,7 +189,7 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
189
189
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
190
190
|
condition: hasRewardBtn
|
|
191
191
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
192
|
-
overlay: (0, _getLocale.getLocale)(
|
|
192
|
+
overlay: (0, _getLocale.getLocale)('Feed_Approval'),
|
|
193
193
|
align: {
|
|
194
194
|
offset: [0, 0]
|
|
195
195
|
},
|
|
@@ -199,7 +199,7 @@ var DynamicFooter = function DynamicFooter(_ref) {
|
|
|
199
199
|
className: (0, _classnames["default"])("".concat(prefix, "__footer-icon"), "".concat(prefix, "__footer-icon-redenvelopes"))
|
|
200
200
|
}))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
201
201
|
onClick: handleCommentClick,
|
|
202
|
-
className: (0, _classnames["default"])(
|
|
202
|
+
className: (0, _classnames["default"])('tu-icon-pinglun-m', "".concat(prefix, "__footer-icon"))
|
|
203
203
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
204
204
|
condition: feedComments.total > 0
|
|
205
205
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -17,7 +17,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
17
17
|
|
|
18
18
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
|
-
var prefixCls =
|
|
20
|
+
var prefixCls = 'titaui-dynamic-item';
|
|
21
21
|
|
|
22
22
|
var DynamicAIDialy = function DynamicAIDialy(_ref) {
|
|
23
23
|
var data = _ref.data;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="26px" height="21px" viewBox="0 0 26 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>wife</title>
|
|
4
|
+
<g id="面谈" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="5-面谈详情页" transform="translate(-106.000000, -17.000000)" fill="#2879FF" fill-rule="nonzero">
|
|
6
|
+
<g id="面谈人员" transform="translate(58.000000, 8.000000)">
|
|
7
|
+
<g id="wife" transform="translate(48.000000, 9.000000)">
|
|
8
|
+
<g id="编组-7">
|
|
9
|
+
<path d="M12.9658057,9.52816561 C12.2775701,9.52816561 11.7154472,10.0876457 11.7154472,10.7794706 C11.7154472,11.4687707 12.2775701,12.0281656 12.9658057,12.0281656 C13.6566846,12.0281656 14.2150114,11.4687707 14.2150114,10.7794706 C14.2150114,10.0876456 13.6567127,9.52816561 12.9658057,9.52816561 Z" id="路径" transform="translate(12.965229, 10.778166) scale(-1, 1) rotate(-270.000000) translate(-12.965229, -10.778166) "></path>
|
|
10
|
+
<path d="M9.13463077,9.00453638 C7.22941357,9.00453638 5.46172542,9.94655067 4.4067363,11.531305 C4.21117005,11.8188062 4.28841241,12.2143692 4.56884115,12.4134588 C4.67951673,12.488903 4.8030426,12.5227718 4.92136651,12.5227718 C5.12207849,12.5227718 5.31891006,12.4238384 5.44114247,12.2443421 C6.26193014,11.0108739 7.64371594,10.2770207 9.13463077,10.2770207 C10.6051595,10.2770207 11.975276,10.9978496 12.7974415,12.1987571 C12.9930077,12.488903 13.3866146,12.5578919 13.6696865,12.3562145 C13.9527303,12.1584046 14.019625,11.7576376 13.8202346,11.4714161 C12.766567,9.92573457 11.0116729,9.00453638 9.13463077,9.00453638 Z" id="路径" opacity="0.75" transform="translate(9.116567, 10.763654) scale(-1, 1) rotate(-270.000000) translate(-9.116567, -10.763654) "></path>
|
|
11
|
+
<path d="M6.05410015,8.5147913 C3.20198248,8.5147913 0.543996987,9.78992023 -1.2301585,12.0095944 C-1.45015998,12.2828485 -1.40899404,12.6836155 -1.13880053,12.9047724 C-0.873780866,13.1272944 -0.480089595,13.0869418 -0.261409722,12.8137162 C1.27472015,10.8919513 3.58023651,9.78733243 6.05410012,9.78733243 C8.52942591,9.78733243 10.8310057,10.8919513 12.3723094,12.8137162 C12.4932483,12.9711167 12.675908,13.0479259 12.8560371,13.0479259 C12.994972,13.0479259 13.1326135,13.0010612 13.2484349,12.9073887 C13.5198937,12.6861749 13.555942,12.2854647 13.3371778,12.0122106 C11.5643439,9.78992023 8.91150413,8.5147913 6.05410015,8.5147913 Z" id="路径" fill-opacity="0.5" transform="translate(6.053981, 10.781599) scale(-1, 1) rotate(-270.000000) translate(-6.053981, -10.781599) "></path>
|
|
12
|
+
<path d="M12.8458611,12.5083657 C10.3885313,9.64071899 6.80164139,8 2.99995194,8 C-0.796479272,8 -4.38722148,9.64069054 -6.84325778,12.5070575 C-7.07222913,12.7724914 -7.0477939,13.1745381 -6.78662652,13.4048234 C-6.52804606,13.6351656 -6.13050251,13.609117 -5.9053553,13.346271 C-3.68352045,10.757054 -0.438836284,9.26858839 2.99992386,9.26858839 C6.43882458,9.26858839 9.6860957,10.757054 11.9040782,13.346271 C12.0301629,13.4894244 12.202503,13.5635889 12.3749556,13.5635889 C12.5190645,13.5635889 12.6708497,13.5128283 12.7866429,13.4048234 C13.0465168,13.1745665 13.0722737,12.7737995 12.8458611,12.5083657 Z" id="路径" fill-opacity="0.25" transform="translate(3.000000, 10.781794) scale(-1, 1) rotate(-270.000000) translate(-3.000000, -10.781794) "></path>
|
|
13
|
+
</g>
|
|
14
|
+
<g id="编组-7" transform="translate(18.500000, 10.500000) scale(-1, 1) translate(-18.500000, -10.500000) translate(11.000000, 0.000000)">
|
|
15
|
+
<path d="M12.9658057,9.52816561 C12.2775701,9.52816561 11.7154472,10.0876457 11.7154472,10.7794706 C11.7154472,11.4687707 12.2775701,12.0281656 12.9658057,12.0281656 C13.6566846,12.0281656 14.2150114,11.4687707 14.2150114,10.7794706 C14.2150114,10.0876456 13.6567127,9.52816561 12.9658057,9.52816561 Z" id="路径" transform="translate(12.965229, 10.778166) scale(-1, 1) rotate(-270.000000) translate(-12.965229, -10.778166) "></path>
|
|
16
|
+
<path d="M9.13463077,9.00453638 C7.22941357,9.00453638 5.46172542,9.94655067 4.4067363,11.531305 C4.21117005,11.8188062 4.28841241,12.2143692 4.56884115,12.4134588 C4.67951673,12.488903 4.8030426,12.5227718 4.92136651,12.5227718 C5.12207849,12.5227718 5.31891006,12.4238384 5.44114247,12.2443421 C6.26193014,11.0108739 7.64371594,10.2770207 9.13463077,10.2770207 C10.6051595,10.2770207 11.975276,10.9978496 12.7974415,12.1987571 C12.9930077,12.488903 13.3866146,12.5578919 13.6696865,12.3562145 C13.9527303,12.1584046 14.019625,11.7576376 13.8202346,11.4714161 C12.766567,9.92573457 11.0116729,9.00453638 9.13463077,9.00453638 Z" id="路径" opacity="0.75" transform="translate(9.116567, 10.763654) scale(-1, 1) rotate(-270.000000) translate(-9.116567, -10.763654) "></path>
|
|
17
|
+
<path d="M6.05410015,8.5147913 C3.20198248,8.5147913 0.543996987,9.78992023 -1.2301585,12.0095944 C-1.45015998,12.2828485 -1.40899404,12.6836155 -1.13880053,12.9047724 C-0.873780866,13.1272944 -0.480089595,13.0869418 -0.261409722,12.8137162 C1.27472015,10.8919513 3.58023651,9.78733243 6.05410012,9.78733243 C8.52942591,9.78733243 10.8310057,10.8919513 12.3723094,12.8137162 C12.4932483,12.9711167 12.675908,13.0479259 12.8560371,13.0479259 C12.994972,13.0479259 13.1326135,13.0010612 13.2484349,12.9073887 C13.5198937,12.6861749 13.555942,12.2854647 13.3371778,12.0122106 C11.5643439,9.78992023 8.91150413,8.5147913 6.05410015,8.5147913 Z" id="路径" fill-opacity="0.5" transform="translate(6.053981, 10.781599) scale(-1, 1) rotate(-270.000000) translate(-6.053981, -10.781599) "></path>
|
|
18
|
+
<path d="M12.8458611,12.5083657 C10.3885313,9.64071899 6.80164139,8 2.99995194,8 C-0.796479272,8 -4.38722148,9.64069054 -6.84325778,12.5070575 C-7.07222913,12.7724914 -7.0477939,13.1745381 -6.78662652,13.4048234 C-6.52804606,13.6351656 -6.13050251,13.609117 -5.9053553,13.346271 C-3.68352045,10.757054 -0.438836284,9.26858839 2.99992386,9.26858839 C6.43882458,9.26858839 9.6860957,10.757054 11.9040782,13.346271 C12.0301629,13.4894244 12.202503,13.5635889 12.3749556,13.5635889 C12.5190645,13.5635889 12.6708497,13.5128283 12.7866429,13.4048234 C13.0465168,13.1745665 13.0722737,12.7737995 12.8458611,12.5083657 Z" id="路径" fill-opacity="0.25" transform="translate(3.000000, 10.781794) scale(-1, 1) rotate(-270.000000) translate(-3.000000, -10.781794) "></path>
|
|
19
|
+
</g>
|
|
20
|
+
</g>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
</g>
|
|
24
|
+
</svg>
|