@titaui/pc 1.11.4-1 → 1.11.4-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/dynamic/constant.js +31 -30
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +21 -6
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +4 -4
- package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +19 -7
- 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/{es/pages/group-management/page-view/loading → lib/components/dynamic/dynamic-item/dynamic-interview-share}/index.js +33 -11
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
- package/lib/components/dynamic/dynamic-item/index.js +41 -32
- package/lib/components/eReport/eReportLists/reportList.js +3 -3
- package/lib/components/emotions-selector/selector-pop.js +3 -3
- package/lib/components/ereport-list/index.js +3 -3
- package/lib/components/mblog/components/MblogAction.js +3 -3
- package/lib/components/menus/export-modules/interview-menus/constant.js +12 -12
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
- package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
- package/lib/components/rich-editor/models/schema.js +6 -6
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
- package/lib/components/rich-editor/plugins/core/index.js +4 -4
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
- package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
- package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
- package/lib/components/rich-editor/react/uiProvider.js +3 -3
- package/lib/components/rich-editor/ui/Popup/index.js +3 -3
- package/lib/components/select/Option.js +3 -3
- 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 +27 -0
- package/lib/components/task-tree/mock.js +944 -0
- package/{es/components/okr-detail/components/okr-tree → lib/components/task-tree}/precls.js +1 -1
- package/lib/components/task-tree/request-apis.js +88 -0
- package/lib/components/task-tree/task-item-node/constant.js +45 -0
- package/{es/components/okr-detail/components/okr-tree/tree-node/default-node.js → lib/components/task-tree/task-item-node/e-empty.js} +13 -6
- package/{es/components/okr-detail/components/okr-tree/tree-node/e-node → lib/components/task-tree/task-item-node}/e-project.js +29 -34
- package/{es/components/e-status-dropdown/index.js → lib/components/task-tree/task-item-node/e-status-dropdown.js} +3 -3
- package/{es/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js → lib/components/task-tree/task-item-node/e-task.js} +140 -121
- package/{es/components/okr-detail/components/okr-tree/tree-node → lib/components/task-tree/task-item-node}/get-process-color.js +3 -3
- package/lib/components/task-tree/task-item-node/index.css +290 -0
- package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
- package/lib/components/task-tree/task-tree.css +8 -0
- package/{es/components/okr-detail/components/okr-tree/index.js → lib/components/task-tree/task-tree.js} +17 -16
- package/lib/components/tita-chart/errorBoundary/index.js +3 -3
- package/lib/components-v1/animate/AnimateChild.js +3 -3
- package/lib/components-v1/avatar/index.js +3 -3
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
- package/lib/components-v1/progress/CircleProgress.js +3 -3
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
- package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
- package/lib/components-v1/userSelector/components/UserItem.js +3 -3
- package/lib/index.js +8 -0
- package/package.json +1 -1
- package/yarn-error.log +6356 -5424
- package/es/components/cascader/time.js +0 -31
- package/es/components/common-share/request-apis.js +0 -56
- package/es/components/confidence/heart.js +0 -66
- package/es/components/create-okr-modal/fields/index.js +0 -17
- package/es/components/create-okr-modal/utils/getCreateOkrSurpassPercent.js +0 -154
- package/es/components/date-picker/BodyItem.js +0 -121
- package/es/components/date-picker/CalendarBody.js +0 -157
- package/es/components/date-picker/CalendarHeader.js +0 -187
- package/es/components/date-picker/index.js +0 -157
- package/es/components/date-range-picker/index.js +0 -210
- package/es/components/dialog/index.js +0 -119
- package/es/components/dialog-confirm/index.js +0 -154
- package/es/components/drop-selector/icon-item.js +0 -40
- package/es/components/drop-selector/index.js +0 -179
- package/es/components/dynamic/dynamic-like-ranking/mock.js +0 -84
- package/es/components/dynamic/dynamic-liking/mock.js +0 -83
- package/es/components/dynamic/dynamic-topping/request-api.js +0 -36
- package/es/components/e-priority/index.js +0 -88
- package/es/components/grid-layout/commen-components/index.js +0 -73
- package/es/components/grid-layout/image/could.js +0 -8
- package/es/components/grid-layout/image/lv.js +0 -8
- package/es/components/grid-layout/image/tita-mask.js +0 -8
- package/es/components/help-card/request-api.js +0 -35
- package/es/components/icon-button-list/index.js +0 -65
- package/es/components/menus/context.js +0 -18
- package/es/components/menus/precls.js +0 -8
- package/es/components/okr-detail/auth.js +0 -197
- package/es/components/okr-detail/components/ao-nice/index.js +0 -245
- package/es/components/okr-detail/components/block-line/index.js +0 -20
- package/es/components/okr-detail/components/header/index.js +0 -211
- package/es/components/okr-detail/components/icon-text/index.js +0 -116
- package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +0 -88
- package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-status-dropdown.js +0 -98
- package/es/components/okr-detail/components/okr-tree/tree-node/index.js +0 -90
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/get-process-color.js +0 -46
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +0 -421
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/index.js +0 -54
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js +0 -62
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +0 -94
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +0 -273
- package/es/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +0 -207
- package/es/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +0 -236
- package/es/components/okr-detail/components/padding-layout.js +0 -22
- package/es/components/okr-detail/components/tab-panel-content/index.js +0 -27
- package/es/components/okr-detail/context.js +0 -30
- package/es/components/okr-detail/e-list/index.js +0 -243
- package/es/components/okr-detail/e-list/precls.js +0 -8
- package/es/components/okr-detail/e-list/search-form/fields/e-order.js +0 -172
- package/es/components/okr-detail/e-list/search-form/fields/e-status.js +0 -99
- package/es/components/okr-detail/e-list/search-form/fields/e-user.js +0 -49
- package/es/components/okr-detail/e-list/search-form/index.js +0 -143
- package/es/components/okr-detail/error-page/index.js +0 -33
- package/es/components/okr-detail/index.js +0 -428
- package/es/components/okr-detail/loading/index.js +0 -28
- package/es/components/okr-detail/okr-list/add-parent-okr.js +0 -37
- package/es/components/okr-detail/okr-list/create-kr-item/heart.js +0 -38
- package/es/components/okr-detail/okr-list/drag-order-kr.js +0 -62
- package/es/components/okr-detail/okr-list/empty/index.js +0 -48
- package/es/components/okr-detail/okr-list/index.js +0 -524
- package/es/components/okr-detail/okr-list/warp-parent-okr.js +0 -21
- package/es/components/okr-detail/store.js +0 -1
- package/es/components/okr-flow/child-node/fields/creator.js +0 -175
- package/es/components/okr-flow/child-node/fields/okrClassify.js +0 -31
- package/es/components/okr-flow/child-node/fields/okrType.js +0 -21
- package/es/components/okr-flow/child-node/helper.js +0 -35
- package/es/components/okr-flow/child-node/index.js +0 -110
- package/es/components/okr-flow/child-node/kr-node.js +0 -75
- package/es/components/okr-flow/child-node/work-node.js +0 -242
- package/es/components/okr-flow/context.js +0 -14
- package/es/components/okr-flow/empty/index.js +0 -29
- package/es/components/okr-flow/export-modules/okr-search-panel/index.js +0 -394
- package/es/components/okr-flow/index.js +0 -24
- package/es/components/okr-flow/mini-map/index.js +0 -112
- package/es/components/okr-flow/mini-map/map.js +0 -145
- package/es/components/okr-flow/mini-map/mini-node.js +0 -57
- package/es/components/okr-flow/mini-map/utils.js +0 -79
- package/es/components/okr-flow/okr-map/index.js +0 -192
- package/es/components/okr-flow/open-data/index.js +0 -115
- package/es/components/okr-flow/precls.js +0 -8
- package/es/components/okr-flow/request-apis.js +0 -118
- package/es/components/okr-flow/root-node/index.js +0 -229
- package/es/components/okr-flow/utils/config.js +0 -18
- package/es/components/okr-flow/utils/helper.js +0 -36
- package/es/components/okr-flow/utils/index.js +0 -66
- package/es/components/okr-flow/utils/tree-handler.js +0 -323
- package/es/components/okr-progress-modal/helper.js +0 -156
- package/es/components/okr-progress-modal/request-apis.js +0 -34
- package/es/components/okr-share/request-apis.js +0 -56
- package/es/components/okrcase-library/server/network.js +0 -407
- package/es/components/pagination/locale/en_US.js +0 -22
- package/es/components/pagination/locale/zh_CN.js +0 -22
- package/es/components/point-demo/drop-down-box/index.js +0 -159
- package/es/components/point-demo/index.js +0 -533
- package/es/components/point-demo/input/index.js +0 -176
- package/es/components/point-demo/point-demo.js +0 -75
- package/es/components/point-demo/popup/index.js +0 -113
- package/es/components/point-demo/popup/placement.js +0 -44
- package/es/components/range-picker-pop/index.js +0 -273
- package/es/components/scrollbar/simplebar/helpers.js +0 -59
- package/es/components/scrollbar/simplebar/index.js +0 -91
- package/es/components/scrollbar/simplebar/scrollbar-width.js +0 -47
- package/es/components/scrollbar/simplebar/simplebar.js +0 -852
- package/es/components/scrollbar/simplebar-react.js +0 -163
- package/es/components/search-dropdown/index.js +0 -40
- package/es/components/search-input/index.js +0 -126
- package/es/components/select/Option.js +0 -94
- package/es/components/select/index.js +0 -330
- package/es/components/selector-input/debounce.js +0 -36
- package/es/components/selector-input/index.js +0 -109
- package/es/components/slider-input/index.js +0 -119
- package/es/components/switch/index.js +0 -39
- package/es/components/table/index.js +0 -275
- package/es/components/tabs/index.js +0 -63
- package/es/components/task-relation-modal/tree-node/index.js +0 -58
- package/es/components/tita-chart/charts/img/could.js +0 -8
- package/es/components/tooltip/error-tip.js +0 -24
- package/es/components/tooltip/index.js +0 -21
- package/es/components/tree/index.js +0 -79
- package/es/components/tree/precls.js +0 -8
- package/es/components/upvote/request-apis.js +0 -45
- package/es/components/user-selector/action-btns/btn-cancel.js +0 -21
- package/es/components/user-selector/action-btns/btn-ok.js +0 -21
- package/es/components/user-selector/action-btns/index.js +0 -27
- package/es/components/user-selector/context.js +0 -18
- package/es/components/user-selector/empty/group.js +0 -55
- package/es/components/user-selector/empty/index.js +0 -28
- package/es/components/user-selector/export-modules/depart-search-selector/result-part.js +0 -41
- package/es/components/user-selector/export-modules/group-selector/index.js +0 -170
- package/es/components/user-selector/export-modules/group-selector/searched-panel.js +0 -68
- package/es/components/user-selector/export-modules/multiple-user-selector--bak/index.js +0 -246
- package/es/components/user-selector/index.js +0 -25
- package/es/components/user-selector/layout/index.js +0 -25
- package/es/components/user-selector/loading/index.js +0 -18
- package/es/components/user-selector/request-apis.js +0 -180
- package/es/components/user-selector/searched-panel/index.js +0 -139
- package/es/components/user-selector/searched-panel/result-part.js +0 -43
- package/es/components/user-selector/select-tree/selected-tree/index.js +0 -91
- package/es/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.js +0 -48
- package/es/components/user-selector/select-tree/tree-nodes/tree-duties-node/index.js +0 -27
- package/es/components/user-selector/select-tree/tree-nodes/tree-group-node/index.js +0 -57
- package/es/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +0 -93
- package/es/components/user-selector/utils.js +0 -139
- package/es/components/viewer/ImageListRender.js +0 -143
- package/es/components/viewer/index.js +0 -168
- package/es/components/word-cloud/index.js +0 -109
- package/es/components/word-cloud/request-apis.js +0 -26
- package/es/components-v1/animate/AnimateChild.js +0 -76
- package/es/components-v1/animate/animate.js +0 -148
- package/es/components-v1/animate/index.js +0 -13
- package/es/components-v1/dom/index.js +0 -30
- package/es/components-v1/placement/index.js +0 -13
- package/es/components-v1/placement/placement.js +0 -111
- package/es/components-v1/placement/placementInner.js +0 -139
- package/es/components-v1/pop/Pop.js +0 -246
- package/es/components-v1/pop/PopInner.js +0 -163
- package/es/components-v1/pop/index.js +0 -13
- package/es/components-v1/progress/CircleProgress.js +0 -152
- package/es/components-v1/progress/LineProgress.js +0 -83
- package/es/components-v1/progress/index.js +0 -80
- package/es/components-v1/select/Option.js +0 -94
- package/es/components-v1/select/index.js +0 -330
- package/es/components-v1/utils/animate/animate.js +0 -103
- package/es/components-v1/utils/animate/event.js +0 -79
- package/es/components-v1/utils/dom/index.js +0 -30
- package/es/components-v1/utils/placement/autoAdjustPlacement.js +0 -93
- package/es/components-v1/utils/placement/getContainerVisibleArea.js +0 -22
- package/es/components-v1/utils/placement/getExpectPlacement.js +0 -49
- package/es/components-v1/utils/placement/getPlacementInContainer.js +0 -26
- package/es/components-v1/utils/placement/placement.js +0 -76
- package/es/index.js +0 -777
- package/es/pages/appointment-demo/drop-down-box/index.js +0 -159
- package/es/pages/appointment-demo/index.js +0 -649
- package/es/pages/appointment-demo/input/index.js +0 -176
- package/es/pages/appointment-demo/popup/index.js +0 -113
- package/es/pages/appointment-demo/popup/placement.js +0 -44
- package/es/pages/group-management/components/checkbox/index.js +0 -28
- package/es/pages/group-management/components/input-form/index.js +0 -174
- package/es/pages/group-management/components/radio/index.js +0 -21
- package/es/pages/group-management/components/table/index.js +0 -174
- package/es/pages/group-management/groupInterface.js +0 -293
- package/es/pages/group-management/index.js +0 -13
- package/es/pages/group-management/page-view/empty.js +0 -111
- package/es/pages/group-management/page-view/group-empty.js +0 -66
- package/es/pages/group-management/page-view/importGroupStaff/index.js +0 -208
- package/es/pages/group-management/page-view/index.js +0 -412
- package/es/pages/group-management/table/index.js +0 -104
- package/es/pages/group-management/tree/add-group-dialog/index.js +0 -153
- package/es/pages/group-management/tree/delete-group-dialog/index.js +0 -82
- package/es/pages/group-management/tree/edit-group-dialog/index.js +0 -155
- package/es/pages/group-management/tree/group-form/index.js +0 -207
- package/es/pages/group-management/tree/index.js +0 -168
- package/es/pages/group-management/tree/operation-panel.js +0 -41
- package/es/pages/group-management/tree/trigger-render.js +0 -99
- package/es/pages/like-ranking/mock.js +0 -366
- package/es/pages/okr-map/export-modules/index.js +0 -1
- package/es/pages/okr-map/export-modules/okr-map/header/index.js +0 -182
- package/es/pages/okr-map/export-modules/okr-map/header/show-kr-confirm.js +0 -47
- package/es/pages/okr-map/export-modules/okr-map/okr-map.js +0 -497
- package/es/pages/okr-map/export-modules/share-okr-page/header/index.js +0 -69
- package/es/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +0 -168
- package/es/pages/okr-map/hooks/useStorage.js +0 -96
- package/es/pages/okr-map/index.js +0 -18
- package/es/pages/okr-map/level2-search/depart.js +0 -53
- package/es/pages/okr-map/level2-search/group.js +0 -69
- package/es/pages/okr-map/level2-search/index.js +0 -51
- package/es/pages/okr-map/level2-search/level2-input.js +0 -46
- package/es/pages/okr-map/level2-search/user.js +0 -54
- package/es/pages/okr-map/no-okr/index.js +0 -24
- package/es/pages/okr-map/number-select/index.js +0 -81
- package/es/pages/okr-map/open-data/index.js +0 -115
- package/es/pages/okr-map/precls.js +0 -8
- package/es/pages/okr-map/request-apis.js +0 -76
- package/es/pages/okr-map/share-dialog/index.js +0 -122
- package/es/pages/okr-map/unsupport-ie/index.js +0 -83
- package/es/pages/okr-map/utils.js +0 -51
- package/es/utils/auth.js +0 -294
- package/es/utils/bs-global.js +0 -114
- package/es/utils/local-storage.js +0 -42
- package/es/utils/mblog.js +0 -33
- package/es/utils/mock-bsglobal.js +0 -1837
- package/es/utils/open-data.js +0 -341
- package/es/utils/request-v1.js +0 -115
- package/es/utils/request.js +0 -183
- package/es/utils/tools.js +0 -286
|
@@ -1,197 +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.OAuth = exports.KRAuth = exports.EAuth = exports.BaseAuth = void 0;
|
|
9
|
-
|
|
10
|
-
var _bsGlobal = require("../../utils/bs-global");
|
|
11
|
-
|
|
12
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
13
|
-
|
|
14
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
15
|
-
|
|
16
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
17
|
-
|
|
18
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
19
|
-
|
|
20
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
21
|
-
|
|
22
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
|
-
|
|
24
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
25
|
-
|
|
26
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
|
-
|
|
28
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
29
|
-
|
|
30
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
31
|
-
|
|
32
|
-
var BaseAuth = /*#__PURE__*/function () {
|
|
33
|
-
function BaseAuth() {
|
|
34
|
-
_classCallCheck(this, BaseAuth);
|
|
35
|
-
|
|
36
|
-
this.loginUserInfor = (0, _bsGlobal.getBSGlobal)("loginUserInfo");
|
|
37
|
-
} // 老板
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
_createClass(BaseAuth, [{
|
|
41
|
-
key: "isBoss",
|
|
42
|
-
value: function isBoss() {
|
|
43
|
-
// console.log('isboss', this.loginUserInfor.IsBoss)
|
|
44
|
-
return this.loginUserInfor.IsBoss;
|
|
45
|
-
} // 超管、助理、目标管理员
|
|
46
|
-
|
|
47
|
-
}, {
|
|
48
|
-
key: "isManager",
|
|
49
|
-
value: function isManager() {
|
|
50
|
-
// console.log('ismanager', this.loginUserInfor.IsOkrManager)
|
|
51
|
-
return this.loginUserInfor.IsOkrManager;
|
|
52
|
-
}
|
|
53
|
-
}]);
|
|
54
|
-
|
|
55
|
-
return BaseAuth;
|
|
56
|
-
}();
|
|
57
|
-
|
|
58
|
-
exports.BaseAuth = BaseAuth;
|
|
59
|
-
|
|
60
|
-
var OAuth = /*#__PURE__*/function (_BaseAuth) {
|
|
61
|
-
_inherits(OAuth, _BaseAuth);
|
|
62
|
-
|
|
63
|
-
var _super = _createSuper(OAuth);
|
|
64
|
-
|
|
65
|
-
function OAuth(props) {
|
|
66
|
-
var _this;
|
|
67
|
-
|
|
68
|
-
_classCallCheck(this, OAuth);
|
|
69
|
-
|
|
70
|
-
_this = _super.call(this, props);
|
|
71
|
-
var principalUser = props.principalUser,
|
|
72
|
-
createUserId = props.createUserId;
|
|
73
|
-
_this.userId = _this.loginUserInfor.Id;
|
|
74
|
-
_this.principalUser = principalUser;
|
|
75
|
-
_this.createUserId = createUserId;
|
|
76
|
-
return _this;
|
|
77
|
-
} // 創建人、發起人
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
_createClass(OAuth, [{
|
|
81
|
-
key: "isCreater",
|
|
82
|
-
value: function isCreater() {
|
|
83
|
-
// console.log('o iscreater', this.userId, this.createUserId)
|
|
84
|
-
return this.userId == this.createUserId;
|
|
85
|
-
} // 負責人
|
|
86
|
-
|
|
87
|
-
}, {
|
|
88
|
-
key: "isPrincipalUser",
|
|
89
|
-
value: function isPrincipalUser() {
|
|
90
|
-
// console.log('o isp', this.userId, this.principalUser.userId)
|
|
91
|
-
return this.userId == this.principalUser.userId;
|
|
92
|
-
} // 有操作OKR的權限
|
|
93
|
-
|
|
94
|
-
}, {
|
|
95
|
-
key: "hasAuth",
|
|
96
|
-
value: function hasAuth() {
|
|
97
|
-
return this.isBoss() || this.isManager() || this.isCreater() || this.isPrincipalUser();
|
|
98
|
-
}
|
|
99
|
-
}]);
|
|
100
|
-
|
|
101
|
-
return OAuth;
|
|
102
|
-
}(BaseAuth);
|
|
103
|
-
|
|
104
|
-
exports.OAuth = OAuth;
|
|
105
|
-
|
|
106
|
-
var KRAuth = /*#__PURE__*/function (_BaseAuth2) {
|
|
107
|
-
_inherits(KRAuth, _BaseAuth2);
|
|
108
|
-
|
|
109
|
-
var _super2 = _createSuper(KRAuth);
|
|
110
|
-
|
|
111
|
-
function KRAuth(props) {
|
|
112
|
-
var _this2;
|
|
113
|
-
|
|
114
|
-
_classCallCheck(this, KRAuth);
|
|
115
|
-
|
|
116
|
-
_this2 = _super2.call(this, props);
|
|
117
|
-
var user = props.user,
|
|
118
|
-
createUserId = props.createUserId;
|
|
119
|
-
_this2.loginUserInfor = (0, _bsGlobal.getBSGlobal)("loginUserInfo");
|
|
120
|
-
_this2.userId = _this2.loginUserInfor.Id;
|
|
121
|
-
_this2.user = user;
|
|
122
|
-
_this2.createUserId = createUserId;
|
|
123
|
-
return _this2;
|
|
124
|
-
} // 創建人、發起人
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
_createClass(KRAuth, [{
|
|
128
|
-
key: "isCreater",
|
|
129
|
-
value: function isCreater() {
|
|
130
|
-
// console.log('kr iscreater', this.userId, this.createUserId)
|
|
131
|
-
return this.userId == this.createUserId;
|
|
132
|
-
} // 負責人
|
|
133
|
-
|
|
134
|
-
}, {
|
|
135
|
-
key: "isPrincipalUser",
|
|
136
|
-
value: function isPrincipalUser() {
|
|
137
|
-
// console.log('kr isp', this.userId, this.user.userId)
|
|
138
|
-
return this.userId == this.user.userId;
|
|
139
|
-
} // 有操作KR的權限
|
|
140
|
-
|
|
141
|
-
}, {
|
|
142
|
-
key: "hasAuth",
|
|
143
|
-
value: function hasAuth() {
|
|
144
|
-
return this.isBoss() || this.isManager() || this.isCreater() || this.isPrincipalUser();
|
|
145
|
-
}
|
|
146
|
-
}]);
|
|
147
|
-
|
|
148
|
-
return KRAuth;
|
|
149
|
-
}(BaseAuth);
|
|
150
|
-
|
|
151
|
-
exports.KRAuth = KRAuth;
|
|
152
|
-
|
|
153
|
-
var EAuth = /*#__PURE__*/function (_BaseAuth3) {
|
|
154
|
-
_inherits(EAuth, _BaseAuth3);
|
|
155
|
-
|
|
156
|
-
var _super3 = _createSuper(EAuth);
|
|
157
|
-
|
|
158
|
-
function EAuth(props) {
|
|
159
|
-
var _this3;
|
|
160
|
-
|
|
161
|
-
_classCallCheck(this, EAuth);
|
|
162
|
-
|
|
163
|
-
_this3 = _super3.call(this, props);
|
|
164
|
-
var principalUser = props.principalUser,
|
|
165
|
-
user = props.user;
|
|
166
|
-
_this3.userId = _this3.loginUserInfor.Id;
|
|
167
|
-
_this3.principalUser = principalUser;
|
|
168
|
-
_this3.user = user;
|
|
169
|
-
return _this3;
|
|
170
|
-
} // 創建人、發起人
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
_createClass(EAuth, [{
|
|
174
|
-
key: "isCreater",
|
|
175
|
-
value: function isCreater() {
|
|
176
|
-
// console.log('e iscreater', this.userId, this.user.userId)
|
|
177
|
-
return this.userId == this.user.userId;
|
|
178
|
-
} // 負責人
|
|
179
|
-
|
|
180
|
-
}, {
|
|
181
|
-
key: "isPrincipalUser",
|
|
182
|
-
value: function isPrincipalUser() {
|
|
183
|
-
// console.log('e isp', this.userId, this.principalUser.userId)
|
|
184
|
-
return this.userId == this.principalUser.userId;
|
|
185
|
-
} // 有操作KR的權限
|
|
186
|
-
|
|
187
|
-
}, {
|
|
188
|
-
key: "hasAuth",
|
|
189
|
-
value: function hasAuth() {
|
|
190
|
-
return this.isBoss() || this.isManager() || this.isCreater() || this.isPrincipalUser();
|
|
191
|
-
}
|
|
192
|
-
}]);
|
|
193
|
-
|
|
194
|
-
return EAuth;
|
|
195
|
-
}(BaseAuth);
|
|
196
|
-
|
|
197
|
-
exports.EAuth = EAuth;
|
|
@@ -1,245 +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"] = _default;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
|
-
var _requestApis = require("../../request-apis");
|
|
15
|
-
|
|
16
|
-
var _avatar = _interopRequireDefault(require("../../../avatar"));
|
|
17
|
-
|
|
18
|
-
var _selector = _interopRequireDefault(require("../../../upvote/selector"));
|
|
19
|
-
|
|
20
|
-
var _attitude = _interopRequireDefault(require("../../../upvote/attitude"));
|
|
21
|
-
|
|
22
|
-
var _upvoteListModal = _interopRequireDefault(require("../../../upvote/upvoteListModal"));
|
|
23
|
-
|
|
24
|
-
var _firework = _interopRequireDefault(require("../../../firework"));
|
|
25
|
-
|
|
26
|
-
require("./index.scss");
|
|
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 asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
35
|
-
|
|
36
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
37
|
-
|
|
38
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
39
|
-
|
|
40
|
-
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."); }
|
|
41
|
-
|
|
42
|
-
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); }
|
|
43
|
-
|
|
44
|
-
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; }
|
|
45
|
-
|
|
46
|
-
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; }
|
|
47
|
-
|
|
48
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
|
-
|
|
50
|
-
var preCls = "titaui-ao-nice";
|
|
51
|
-
|
|
52
|
-
function _default(props) {
|
|
53
|
-
var okrInfo = props.okrInfo,
|
|
54
|
-
activeTab = props.activeTab;
|
|
55
|
-
|
|
56
|
-
var _useState = (0, _react.useState)(false),
|
|
57
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
58
|
-
selectorVisible = _useState2[0],
|
|
59
|
-
setSelectorVisible = _useState2[1];
|
|
60
|
-
|
|
61
|
-
var _useState3 = (0, _react.useState)(false),
|
|
62
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
63
|
-
modalVisible = _useState4[0],
|
|
64
|
-
setModalVisible = _useState4[1];
|
|
65
|
-
|
|
66
|
-
var _useState5 = (0, _react.useState)(),
|
|
67
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
68
|
-
feedData = _useState6[0],
|
|
69
|
-
setFeedData = _useState6[1];
|
|
70
|
-
|
|
71
|
-
var btnRef = (0, _react.useRef)();
|
|
72
|
-
var pending = (0, _react.useRef)(true);
|
|
73
|
-
var praiseUsers = (feedData || {}).praiseUsers || [];
|
|
74
|
-
var isPraise = (feedData || {}).isPraise || false;
|
|
75
|
-
var getData = (0, _react.useCallback)(function () {
|
|
76
|
-
return (0, _requestApis.getFeedById)(okrInfo.feedId, 0).then(function (res) {
|
|
77
|
-
setFeedData(res.Data);
|
|
78
|
-
pending.current = false;
|
|
79
|
-
});
|
|
80
|
-
}, []);
|
|
81
|
-
(0, _react.useEffect)(function () {
|
|
82
|
-
getData();
|
|
83
|
-
}, []);
|
|
84
|
-
|
|
85
|
-
var onMakeNiceHander = /*#__PURE__*/function () {
|
|
86
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
87
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
88
|
-
while (1) {
|
|
89
|
-
switch (_context.prev = _context.next) {
|
|
90
|
-
case 0:
|
|
91
|
-
if (!pending.current) {
|
|
92
|
-
_context.next = 2;
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return _context.abrupt("return");
|
|
97
|
-
|
|
98
|
-
case 2:
|
|
99
|
-
pending.current = true;
|
|
100
|
-
|
|
101
|
-
if (isPraise) {
|
|
102
|
-
_context.next = 9;
|
|
103
|
-
break;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
setFirework();
|
|
107
|
-
_context.next = 7;
|
|
108
|
-
return (0, _requestApis.addPraise)(okrInfo.feedId, 1);
|
|
109
|
-
|
|
110
|
-
case 7:
|
|
111
|
-
_context.next = 11;
|
|
112
|
-
break;
|
|
113
|
-
|
|
114
|
-
case 9:
|
|
115
|
-
_context.next = 11;
|
|
116
|
-
return (0, _requestApis.cancelPraise)(okrInfo.feedId);
|
|
117
|
-
|
|
118
|
-
case 11:
|
|
119
|
-
getData();
|
|
120
|
-
|
|
121
|
-
case 12:
|
|
122
|
-
case "end":
|
|
123
|
-
return _context.stop();
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}, _callee);
|
|
127
|
-
}));
|
|
128
|
-
|
|
129
|
-
return function onMakeNiceHander() {
|
|
130
|
-
return _ref.apply(this, arguments);
|
|
131
|
-
};
|
|
132
|
-
}();
|
|
133
|
-
|
|
134
|
-
var setFirework = (0, _react.useCallback)(function () {
|
|
135
|
-
var _btnRef$current$getBo = btnRef.current.getBoundingClientRect(),
|
|
136
|
-
x = _btnRef$current$getBo.x,
|
|
137
|
-
y = _btnRef$current$getBo.y;
|
|
138
|
-
|
|
139
|
-
(0, _firework["default"])({
|
|
140
|
-
x: x,
|
|
141
|
-
y: y,
|
|
142
|
-
images: (0, _attitude["default"])().map(function (a) {
|
|
143
|
-
return a.img;
|
|
144
|
-
})
|
|
145
|
-
});
|
|
146
|
-
}, []); // const doPosition = () => {
|
|
147
|
-
// // 点赞粘底
|
|
148
|
-
// let totalOffsetHeight = tabsContnetRef.current.offsetHeight;
|
|
149
|
-
// let oNiceOffsetHeight = oniceRef.current.offsetHeight;
|
|
150
|
-
// let tabContentOffsetHeight = tabRef.current.offsetHeight;
|
|
151
|
-
// // 滚动
|
|
152
|
-
// if (totalOffsetHeight < tabContentOffsetHeight) { }
|
|
153
|
-
// // 黏底,内容区域高度小于总高度
|
|
154
|
-
// else if (totalOffsetHeight > (tabContentOffsetHeight + oNiceOffsetHeight)) {
|
|
155
|
-
// oniceRef.current.classList.add('okr-onice-fixed-top');
|
|
156
|
-
// }
|
|
157
|
-
// }
|
|
158
|
-
// 只出现在 okrs 和 协作 页签
|
|
159
|
-
|
|
160
|
-
if (!(!activeTab || activeTab == "okr" || activeTab == "cooperation")) {
|
|
161
|
-
return /*#__PURE__*/_react["default"].createElement("span", null);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
165
|
-
className: "titaui-okr-detail-ao-nice"
|
|
166
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
167
|
-
className: (0, _classnames["default"])(preCls)
|
|
168
|
-
}, /*#__PURE__*/_react["default"].createElement(_selector["default"], {
|
|
169
|
-
visible: selectorVisible,
|
|
170
|
-
align: "center",
|
|
171
|
-
onSelect: /*#__PURE__*/function () {
|
|
172
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(type) {
|
|
173
|
-
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
174
|
-
while (1) {
|
|
175
|
-
switch (_context2.prev = _context2.next) {
|
|
176
|
-
case 0:
|
|
177
|
-
if (!pending.current) {
|
|
178
|
-
_context2.next = 2;
|
|
179
|
-
break;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
return _context2.abrupt("return");
|
|
183
|
-
|
|
184
|
-
case 2:
|
|
185
|
-
pending.current = true;
|
|
186
|
-
setFirework();
|
|
187
|
-
_context2.next = 6;
|
|
188
|
-
return (0, _requestApis.addPraise)(okrInfo.feedId, type);
|
|
189
|
-
|
|
190
|
-
case 6:
|
|
191
|
-
getData();
|
|
192
|
-
|
|
193
|
-
case 7:
|
|
194
|
-
case "end":
|
|
195
|
-
return _context2.stop();
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}, _callee2);
|
|
199
|
-
}));
|
|
200
|
-
|
|
201
|
-
return function (_x) {
|
|
202
|
-
return _ref2.apply(this, arguments);
|
|
203
|
-
};
|
|
204
|
-
}()
|
|
205
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
206
|
-
className: (0, _classnames["default"])("".concat(preCls, "__bigfingler")),
|
|
207
|
-
onClick: onMakeNiceHander,
|
|
208
|
-
ref: btnRef
|
|
209
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
210
|
-
className: (0, _classnames["default"])("".concat(preCls, "__bigfingler-make-good"))
|
|
211
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
212
|
-
className: (0, _classnames["default"])({
|
|
213
|
-
"tu-icon-like--solid": isPraise,
|
|
214
|
-
"tu-icon-like": !isPraise
|
|
215
|
-
})
|
|
216
|
-
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
217
|
-
className: (0, _classnames["default"])("".concat(preCls, "__bigfingler-count")),
|
|
218
|
-
onClick: function onClick(e) {
|
|
219
|
-
if (!praiseUsers.length) return;
|
|
220
|
-
e.stopPropagation();
|
|
221
|
-
setModalVisible(true);
|
|
222
|
-
}
|
|
223
|
-
}, feedData && feedData.counter.praiseTotal))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
224
|
-
className: (0, _classnames["default"])("".concat(preCls, "__users"))
|
|
225
|
-
}, praiseUsers.map(function (publishUser) {
|
|
226
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
227
|
-
className: (0, _classnames["default"])("".concat(preCls, "__user-item"))
|
|
228
|
-
}, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
|
|
229
|
-
userId: publishUser.userId,
|
|
230
|
-
src: publishUser.avatar.medium,
|
|
231
|
-
color: publishUser.avatar.color,
|
|
232
|
-
name: publishUser.name
|
|
233
|
-
}), /*#__PURE__*/_react["default"].createElement("img", {
|
|
234
|
-
src: (0, _attitude["default"])().find(function (att) {
|
|
235
|
-
return att.type == feedData.praiseUserIds[publishUser.userId];
|
|
236
|
-
}).img
|
|
237
|
-
}));
|
|
238
|
-
})), /*#__PURE__*/_react["default"].createElement(_upvoteListModal["default"], {
|
|
239
|
-
visible: modalVisible,
|
|
240
|
-
onClose: function onClose() {
|
|
241
|
-
return setModalVisible(false);
|
|
242
|
-
},
|
|
243
|
-
feedId: okrInfo.feedId
|
|
244
|
-
})));
|
|
245
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = _default;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
require("./index.scss");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
|
-
function _default(_ref) {
|
|
15
|
-
var style = _ref.style;
|
|
16
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
17
|
-
className: "okr-detail__blockline",
|
|
18
|
-
style: style
|
|
19
|
-
});
|
|
20
|
-
}
|
|
@@ -1,211 +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 _oName = _interopRequireDefault(require("./o-name"));
|
|
15
|
-
|
|
16
|
-
var _oClassify = _interopRequireDefault(require("../o-classify"));
|
|
17
|
-
|
|
18
|
-
var _oProgressUpdate = _interopRequireDefault(require("../o-progress-update"));
|
|
19
|
-
|
|
20
|
-
var _oAvatar = _interopRequireDefault(require("./o-avatar"));
|
|
21
|
-
|
|
22
|
-
var _okrType = _interopRequireDefault(require("../okr-type"));
|
|
23
|
-
|
|
24
|
-
var _oCycle = _interopRequireDefault(require("./o-cycle"));
|
|
25
|
-
|
|
26
|
-
var _editName = _interopRequireDefault(require("./edit-name"));
|
|
27
|
-
|
|
28
|
-
var _oScore = _interopRequireDefault(require("./o-score"));
|
|
29
|
-
|
|
30
|
-
var _progress = _interopRequireDefault(require("../../../progress"));
|
|
31
|
-
|
|
32
|
-
var _utils = require("../../../progress/utils");
|
|
33
|
-
|
|
34
|
-
var _tooltip = _interopRequireDefault(require("../../../tooltip"));
|
|
35
|
-
|
|
36
|
-
var _auth = require("../../../../utils/auth");
|
|
37
|
-
|
|
38
|
-
var _context = require("../../context");
|
|
39
|
-
|
|
40
|
-
var _getLocale = require("../../../../utils/getLocale");
|
|
41
|
-
|
|
42
|
-
require("./index.scss");
|
|
43
|
-
|
|
44
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
45
|
-
|
|
46
|
-
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); }
|
|
47
|
-
|
|
48
|
-
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; }
|
|
49
|
-
|
|
50
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
51
|
-
|
|
52
|
-
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."); }
|
|
53
|
-
|
|
54
|
-
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); }
|
|
55
|
-
|
|
56
|
-
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; }
|
|
57
|
-
|
|
58
|
-
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; }
|
|
59
|
-
|
|
60
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
61
|
-
|
|
62
|
-
var precls = "okr-drawer-header";
|
|
63
|
-
|
|
64
|
-
function Header(props) {
|
|
65
|
-
var _window, _window$BSGlobal, _window$BSGlobal$OkrA, _window$BSGlobal$OkrA2;
|
|
66
|
-
|
|
67
|
-
// 外部取到的 headInfo
|
|
68
|
-
var okrInfo = props.okrInfo;
|
|
69
|
-
|
|
70
|
-
var _useState = (0, _react.useState)(false),
|
|
71
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
72
|
-
isEdit = _useState2[0],
|
|
73
|
-
setIsEdit = _useState2[1];
|
|
74
|
-
|
|
75
|
-
var _useState3 = (0, _react.useState)(okrInfo.workName),
|
|
76
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
77
|
-
okrName = _useState4[0],
|
|
78
|
-
setOkrName = _useState4[1];
|
|
79
|
-
|
|
80
|
-
var _useContext = (0, _react.useContext)(_context.GeneralDataContext),
|
|
81
|
-
generalPrincipalUser = _useContext.generalPrincipalUser,
|
|
82
|
-
generalOkrType = _useContext.generalOkrType,
|
|
83
|
-
setGeneralOkrType = _useContext.setGeneralOkrType,
|
|
84
|
-
generalOkrClassify = _useContext.generalOkrClassify,
|
|
85
|
-
setGeneralOkrClassify = _useContext.setGeneralOkrClassify,
|
|
86
|
-
showOkrEvalute = _useContext.showOkrEvalute;
|
|
87
|
-
|
|
88
|
-
var showOScore = (_window = window) === null || _window === void 0 ? void 0 : (_window$BSGlobal = _window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$OkrA = _window$BSGlobal.OkrAdvancedSetting) === null || _window$BSGlobal$OkrA === void 0 ? void 0 : (_window$BSGlobal$OkrA2 = _window$BSGlobal$OkrA.KRSetting) === null || _window$BSGlobal$OkrA2 === void 0 ? void 0 : _window$BSGlobal$OkrA2.OScore;
|
|
89
|
-
var _okrInfo$progressGrow = okrInfo.progressGrow,
|
|
90
|
-
progressGrow = _okrInfo$progressGrow === void 0 ? 0 : _okrInfo$progressGrow,
|
|
91
|
-
progress = okrInfo.progress;
|
|
92
|
-
|
|
93
|
-
var _useState5 = (0, _react.useState)(false),
|
|
94
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
95
|
-
auth = _useState6[0],
|
|
96
|
-
setAuth = _useState6[1];
|
|
97
|
-
|
|
98
|
-
(0, _react.useEffect)(function () {
|
|
99
|
-
setAuth(new _auth.OAuth({
|
|
100
|
-
principalUser: generalPrincipalUser,
|
|
101
|
-
createUserId: okrInfo.createUserId
|
|
102
|
-
}).hasAuth());
|
|
103
|
-
}, [generalPrincipalUser]);
|
|
104
|
-
var editable = auth && okrInfo.status == 1; // 有权限 && 进行中
|
|
105
|
-
|
|
106
|
-
var renderContent = function renderContent(_ref) {
|
|
107
|
-
var onOpenModal = _ref.onOpenModal;
|
|
108
|
-
|
|
109
|
-
var progressCmp = /*#__PURE__*/_react["default"].createElement(_progress["default"], {
|
|
110
|
-
percent: progress,
|
|
111
|
-
backgroundColor: "#F7F8FA",
|
|
112
|
-
textColor: okrInfo.status === 2 ? "#89919f" : _utils.OkrRiskMapping[okrInfo.manualRiskLevel].textColor,
|
|
113
|
-
color: okrInfo.status === 2 ? "linear-gradient(270deg, #BFC7D5, #E1E5EC)" : _utils.OkrRiskMapping[okrInfo.manualRiskLevel].line
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
if (!editable) {
|
|
117
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
118
|
-
className: "okr-drawer-header__action-progress"
|
|
119
|
-
}, progressCmp, progressGrow !== 0 && /*#__PURE__*/_react["default"].createElement("span", {
|
|
120
|
-
className: (0, _classnames["default"])("okr-drawer-header__action-progress-diff", {
|
|
121
|
-
"okr-drawer-header__action-progress-diff--up": progressGrow > 0,
|
|
122
|
-
"okr-drawer-header__action-progress-diff--down": progressGrow < 0
|
|
123
|
-
})
|
|
124
|
-
}, progressGrow > 0 ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
125
|
-
className: "tu-icon-simple-sort-up"
|
|
126
|
-
}) : /*#__PURE__*/_react["default"].createElement("span", {
|
|
127
|
-
className: "tu-icon-simple-sort-down"
|
|
128
|
-
}), progressGrow.toString().replace("-", ""), "%"));
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
132
|
-
className: "okr-drawer-header__action-progress"
|
|
133
|
-
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
134
|
-
overlay: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Upd"),
|
|
135
|
-
placement: "top"
|
|
136
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
137
|
-
onClick: onOpenModal,
|
|
138
|
-
style: {
|
|
139
|
-
cursor: "pointer"
|
|
140
|
-
}
|
|
141
|
-
}, progressCmp)), progressGrow !== 0 && /*#__PURE__*/_react["default"].createElement("span", {
|
|
142
|
-
className: (0, _classnames["default"])("okr-drawer-header__action-progress-diff", {
|
|
143
|
-
"okr-drawer-header__action-progress-diff--up": progressGrow > 0,
|
|
144
|
-
"okr-drawer-header__action-progress-diff--down": progressGrow < 0
|
|
145
|
-
})
|
|
146
|
-
}, progressGrow > 0 ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
147
|
-
className: "tu-icon-simple-sort-up"
|
|
148
|
-
}) : /*#__PURE__*/_react["default"].createElement("span", {
|
|
149
|
-
className: "tu-icon-simple-sort-down"
|
|
150
|
-
}), progressGrow.toString().replace("-", ""), "%"));
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
154
|
-
className: precls,
|
|
155
|
-
draggable: false
|
|
156
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
157
|
-
className: "".concat(precls, "__avatar")
|
|
158
|
-
}, /*#__PURE__*/_react["default"].createElement(_oAvatar["default"], {
|
|
159
|
-
editable: editable,
|
|
160
|
-
okrId: okrInfo.workId
|
|
161
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
162
|
-
className: "".concat(precls, "__content")
|
|
163
|
-
}, /*#__PURE__*/_react["default"].createElement(_oName["default"], {
|
|
164
|
-
editable: editable,
|
|
165
|
-
okrName: okrName,
|
|
166
|
-
setIsEdit: setIsEdit,
|
|
167
|
-
okrStatus: okrInfo.status
|
|
168
|
-
}, /*#__PURE__*/_react["default"].createElement(_oClassify["default"], {
|
|
169
|
-
editable: editable,
|
|
170
|
-
okrId: okrInfo.workId,
|
|
171
|
-
okrClassify: generalOkrClassify,
|
|
172
|
-
onOkrClassifyChange: setGeneralOkrClassify
|
|
173
|
-
})), /*#__PURE__*/_react["default"].createElement("section", {
|
|
174
|
-
className: "".concat(precls, "__action")
|
|
175
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
176
|
-
style: {
|
|
177
|
-
position: "relative",
|
|
178
|
-
left: -4
|
|
179
|
-
}
|
|
180
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
181
|
-
className: "".concat(precls, "__action-item")
|
|
182
|
-
}, /*#__PURE__*/_react["default"].createElement(_okrType["default"], {
|
|
183
|
-
editable: editable,
|
|
184
|
-
workId: okrInfo.workId,
|
|
185
|
-
type: generalOkrType,
|
|
186
|
-
onTypeChange: setGeneralOkrType
|
|
187
|
-
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
188
|
-
className: "".concat(precls, "__action-item")
|
|
189
|
-
}, /*#__PURE__*/_react["default"].createElement(_oCycle["default"], {
|
|
190
|
-
editable: editable,
|
|
191
|
-
okrId: okrInfo.workId
|
|
192
|
-
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
193
|
-
className: "".concat(precls, "__action-item")
|
|
194
|
-
}, (showOkrEvalute || showOScore || okrInfo.manualEvaluateValue) && /*#__PURE__*/_react["default"].createElement(_oScore["default"], {
|
|
195
|
-
editable: editable && showOScore,
|
|
196
|
-
okrId: okrInfo.workId,
|
|
197
|
-
score: showOkrEvalute || okrInfo.manualEvaluateValue ? okrInfo.evaluateValue : 0,
|
|
198
|
-
isEvaluate: okrInfo.manualEvaluateValue || showOkrEvalute && !!okrInfo.evaluateValue
|
|
199
|
-
}))), /*#__PURE__*/_react["default"].createElement(_oProgressUpdate["default"], {
|
|
200
|
-
okrInfo: okrInfo,
|
|
201
|
-
renderContent: renderContent
|
|
202
|
-
})), isEdit && /*#__PURE__*/_react["default"].createElement(_editName["default"], {
|
|
203
|
-
okrName: okrName,
|
|
204
|
-
okrId: okrInfo.workId,
|
|
205
|
-
setOkrName: setOkrName,
|
|
206
|
-
setIsEdit: setIsEdit
|
|
207
|
-
})));
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
var _default = Header;
|
|
211
|
-
exports["default"] = _default;
|