@titaui/pc 1.5.82 → 1.5.83
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/icon-avatar/index.css +15 -0
- package/lib/components/avatar/icon-avatar/index.js +50 -0
- package/lib/components/avatar/index.js +9 -1
- package/lib/components/avatar/num-avatar/index.css +12 -0
- package/lib/components/avatar/num-avatar/index.js +34 -0
- package/lib/components/button/admin-button/default.js +35 -0
- package/lib/components/button/admin-button/drop-down-arrow.js +93 -0
- package/lib/components/button/admin-button/index.css +86 -0
- package/lib/components/button/admin-button/index.js +40 -0
- package/lib/components/button/admin-button/primary.js +33 -0
- package/lib/components/button/admin-button/secondary.js +35 -0
- package/lib/components/button/default-button/index.css +49 -0
- package/lib/components/button/default-button/index.js +51 -0
- package/lib/components/button/export-button/index.css +51 -0
- package/lib/components/button/export-button/index.js +81 -0
- package/lib/components/button/images/daoru.svg +18 -0
- package/lib/components/button/index.js +23 -0
- package/lib/components/button/interface.js +5 -0
- package/lib/components/change-okr/Filter.js +133 -65
- package/lib/components/change-okr/Item.js +6 -0
- package/lib/components/change-okr/filterTab.js +2 -0
- package/lib/components/change-okr/index.js +2 -2
- package/lib/components/checkbox/index.js +4 -3
- package/lib/components/communication/CommunicationRecord.js +116 -161
- package/lib/components/communication/ConvertUserName.js +1 -1
- package/lib/components/communication/index.css +63 -0
- package/lib/components/communication/index.js +53 -28
- package/lib/components/communication/style.js +21 -25
- package/lib/components/create-okr/animation/check-animation.js +2746 -0
- package/lib/components/create-okr/constant.js +27 -0
- package/lib/components/create-okr/createCycle.js +193 -0
- package/lib/components/create-okr/createSuccessCmp.js +233 -0
- package/lib/components/create-okr/createSuccessCmpWrapper.js +20 -0
- package/lib/components/create-okr/fields/date-cycle.js +98 -0
- package/lib/components/create-okr/fields/index.css +346 -0
- package/lib/components/create-okr/fields/index.js +17 -0
- package/lib/components/create-okr/fields/input-with-err-popup.js +57 -0
- package/lib/components/create-okr/fields/o-new-name.js +197 -0
- package/lib/components/create-okr/fields/okr-case.js +98 -0
- package/lib/components/create-okr/fields/okr-classify.js +51 -0
- package/lib/components/create-okr/fields/okr-create-suggest.js +147 -0
- package/lib/components/create-okr/fields/okr-new-user-selector.js +106 -0
- package/lib/components/create-okr/fields/okr-parent.js +157 -0
- package/lib/components/create-okr/fields/okr-type-detail.js +196 -0
- package/lib/components/create-okr/fields/okr-type.js +131 -0
- package/lib/components/create-okr/fields/okr-visibility-detail.js +224 -0
- package/lib/components/create-okr/fields/okr-visibility.js +169 -0
- package/lib/components/create-okr/img/check-normal.svg +29 -0
- package/lib/components/create-okr/img/check-right.svg +16 -0
- package/lib/components/create-okr/img/check-wrong.svg +29 -0
- package/lib/components/create-okr/img/create-success-head.png +0 -0
- package/lib/components/create-okr/img/create-success-left-quotation.svg +14 -0
- package/lib/components/create-okr/img/create-success-message.svg +1 -0
- package/lib/components/create-okr/img/create-success-right-quotation.svg +14 -0
- package/lib/components/create-okr/img/create-success-shadow.svg +23 -0
- package/lib/components/create-okr/img/example.svg +11 -0
- package/lib/components/create-okr/img/hand.svg +12 -0
- package/lib/components/create-okr/img/kr-add.svg +12 -0
- package/lib/components/create-okr/img/left-quotation.svg +12 -0
- package/lib/components/create-okr/img/light.svg +1 -0
- package/lib/components/create-okr/img/pack-up.js +28 -0
- package/lib/components/create-okr/img/qr-code.png +0 -0
- package/lib/components/create-okr/img/right-quotation.svg +12 -0
- package/lib/components/create-okr/img/shower.png +0 -0
- package/lib/components/create-okr/img/target.svg +19 -0
- package/lib/components/create-okr/img/teach-okr.svg +17 -0
- package/lib/components/create-okr/img/wave.png +0 -0
- package/lib/components/create-okr/img/weight.svg +12 -0
- package/lib/components/create-okr/index.css +446 -0
- package/lib/components/create-okr/index.js +911 -0
- package/lib/components/create-okr/interface.js +5 -0
- package/lib/components/create-okr/kr-items/index.css +180 -0
- package/lib/components/create-okr/kr-items/kr-item-weight.js +194 -0
- package/lib/components/create-okr/kr-items/krDatas.js +299 -0
- package/lib/components/create-okr/kr-items/krItem.js +167 -0
- package/lib/components/create-okr/objectType.js +273 -0
- package/lib/components/create-okr/request-api.js +220 -0
- package/lib/components/create-okr/style.js +100 -0
- package/lib/components/create-okr/utils/getCreateOkrSurpassPercent.js +124 -0
- package/lib/components/create-okr/utils/helper.js +99 -0
- package/lib/components/create-okr/utils/index.js +23 -0
- package/lib/components/dropdown-layer/icon-item.js +5 -3
- package/lib/components/dropdown-layer/index.css +16 -0
- package/lib/components/dropdown-layer/index.js +21 -14
- package/lib/components/dynamic/components/condition-render/index.js +20 -0
- package/lib/components/dynamic/components/dangerous-html/index.js +22 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.css +78 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.js +192 -0
- package/lib/components/dynamic/components/obj-status/index.css +22 -0
- package/lib/components/dynamic/components/obj-status/index.js +38 -0
- package/lib/components/dynamic/components/percent/index.css +21 -0
- package/lib/components/dynamic/components/percent/index.js +38 -0
- package/lib/components/dynamic/components/title/index.css +35 -0
- package/lib/components/dynamic/components/title/index.js +59 -0
- package/lib/components/dynamic/constant.js +97 -0
- package/lib/components/dynamic/context/index.js +13 -0
- package/lib/components/dynamic/dynamic-item/components/header/index.css +101 -0
- package/lib/components/dynamic/dynamic-item/components/header/index.js +299 -0
- package/lib/components/dynamic/dynamic-item/components/icon/index.css +10 -0
- package/lib/components/dynamic/dynamic-item/components/icon/index.js +35 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.svg +22 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-relative.svg +22 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +95 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +173 -0
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +59 -0
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +107 -0
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +48 -0
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +89 -0
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +96 -0
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +171 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +67 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +110 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/constant.js +16 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +111 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +158 -0
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +95 -0
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +215 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/constant.js +16 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/img/project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +91 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +125 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-relative.svg +22 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +95 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +192 -0
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +138 -0
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +183 -0
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +153 -0
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +138 -0
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +97 -0
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +207 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +59 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +107 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +50 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-cancel.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-delay.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-done.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-pause.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-progress.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unaccept.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unstart.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +111 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +164 -0
- package/lib/components/dynamic/dynamic-item/index.css +128 -0
- package/lib/components/dynamic/dynamic-item/index.js +352 -0
- 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/index.css +126 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.js +157 -0
- package/lib/components/dynamic/dynamic-like-ranking/item.js +107 -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/components/dynamic/dynamic-liking/index.js +76 -0
- package/lib/components/dynamic/dynamic-liking/item.js +91 -0
- package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
- package/lib/components/dynamic/dynamic-list/index.css +36 -0
- package/lib/components/dynamic/dynamic-list/index.js +61 -0
- package/lib/components/dynamic/dynamic-topping/image/quotationMark.svg +16 -0
- package/lib/components/dynamic/dynamic-topping/image/topIcon.svg +30 -0
- package/lib/components/dynamic/dynamic-topping/index.css +148 -0
- package/lib/components/dynamic/dynamic-topping/index.js +80 -0
- package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
- package/lib/components/dynamic/dynamic-topping/item.js +140 -0
- package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
- package/lib/components/dynamic/dynamic.css +204 -0
- package/lib/components/dynamic/dynamic.js +391 -0
- package/lib/components/dynamic/export-module/index.js +33 -0
- package/lib/components/dynamic/img/dynamic-P1.svg +15 -0
- package/lib/components/dynamic/img/dynamic-P2.svg +15 -0
- package/lib/components/dynamic/img/dynamic-P3.svg +15 -0
- package/lib/components/dynamic/img/dynamic-P4.svg +15 -0
- package/lib/components/dynamic/img/dynamic-P5.svg +15 -0
- package/lib/components/dynamic/img/dynamic-delay.svg +17 -0
- package/lib/components/dynamic/img/dynamic-desire.svg +61 -0
- package/lib/components/dynamic/img/dynamic-empty.png +0 -0
- package/lib/components/dynamic/img/dynamic-end.svg +17 -0
- package/lib/components/dynamic/img/dynamic-left-quoto.svg +13 -0
- package/lib/components/dynamic/img/dynamic-loading.gif +0 -0
- package/lib/components/dynamic/img/dynamic-normal.svg +17 -0
- package/lib/components/dynamic/img/dynamic-promise.svg +61 -0
- package/lib/components/dynamic/img/dynamic-reword.svg +24 -0
- package/lib/components/dynamic/img/dynamic-right-quoto.svg +13 -0
- package/lib/components/dynamic/img/dynamic-risk.svg +17 -0
- package/lib/components/dynamic/img/dynamic-submit-delay.svg +16 -0
- package/lib/components/dynamic/img/dynamic-submit-normal.svg +18 -0
- package/lib/components/dynamic/img/dynamic-top.svg +14 -0
- package/lib/components/dynamic/index.js +27 -0
- package/lib/components/dynamic/interface.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 +37 -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 +37 -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 +37 -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 +42 -0
- package/lib/components/dynamic/quick-operation/img/create-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +51 -0
- package/lib/components/dynamic/quick-operation/index.js +112 -0
- package/lib/components/dynamic/request-api.js +92 -0
- package/lib/components/dynamic/util.js +140 -0
- package/lib/components/emotionsSelector/style.js +1 -1
- package/lib/components/file-list/components/single-file/index.css +84 -0
- package/lib/components/file-list/components/single-file/index.js +115 -0
- package/lib/components/file-list/img/new-file-list-doc.svg +1 -0
- package/lib/components/file-list/img/new-file-list-other.svg +1 -0
- package/lib/components/file-list/img/new-file-list-pdf.svg +1 -0
- package/lib/components/file-list/img/new-file-list-ppt.svg +1 -0
- package/lib/components/file-list/img/new-file-list-radio.svg +1 -0
- package/lib/components/file-list/img/new-file-list-video.svg +1 -0
- package/lib/components/file-list/img/new-file-list-xls.svg +1 -0
- package/lib/components/file-list/index.css +5 -0
- package/lib/components/file-list/index.js +61 -0
- package/lib/components/file-list/interface.js +5 -0
- package/lib/components/file-list/util.js +78 -0
- package/lib/components/form/form-fields/input/index.css +11 -0
- package/lib/components/form/form-fields/input/index.js +3 -1
- package/lib/components/grid-page/image/{Assistant.svg → assistant.svg} +0 -0
- package/lib/components/grid-page/image/{Boss.svg → boss.svg} +0 -0
- package/lib/components/grid-page/image/{Default-background.png → default-background.png} +0 -0
- package/lib/components/grid-page/image/{UserManager.svg → userManager.svg} +0 -0
- package/lib/components/grid-page/personal-info/index.js +5 -5
- package/lib/components/img-viewer/icon/enlarge.js +30 -0
- package/lib/components/img-viewer/icon/left-rotate.js +46 -0
- package/lib/components/img-viewer/icon/right-rotate.js +44 -0
- package/lib/components/img-viewer/icon/shrink.js +37 -0
- package/lib/components/img-viewer/image/loading.gif +0 -0
- package/lib/components/img-viewer/index.css +155 -0
- package/lib/components/img-viewer/index.js +228 -0
- package/lib/components/img-viewer/interface.js +5 -0
- package/lib/components/img-viewer/util.js +16 -0
- package/lib/components/mblog/components/MblogAction.js +10 -6
- package/lib/components/mblog/index.js +24 -11
- package/lib/components/mblog/style.js +8 -8
- package/lib/components/okr-detail/components/header/index.css +4 -0
- package/lib/components/okr-detail/components/header/o-cycle.js +2 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +15 -8
- package/lib/components/okr-flow/child-node/work-node.js +7 -1
- package/lib/components/okr-period-selector/select-cycle.js +139 -151
- package/lib/components/okr-progress-detail/index.css +1 -0
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +5 -5
- package/lib/components/okr-review/ReviewPop/index.js +4 -4
- package/lib/components/period-selector/common.js +168 -17
- package/lib/components/period-selector/components/selector/index.js +103 -38
- package/lib/components/period-selector/components/selector/style.js +23 -9
- package/lib/components/period-selector/index.js +29 -28
- package/lib/components/popup/index.js +3 -1
- package/lib/components/publish-dynamic-modal/index.js +13 -0
- package/lib/components/publish-dynamic-modal/interface.js +5 -0
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.css +3 -0
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +191 -0
- package/lib/components/publish-dynamic-modal/requist-api.js +48 -0
- package/lib/components/radio/index.css +5 -0
- package/lib/components/radio/radio.js +12 -4
- package/lib/components/search-key-handle/index.js +39 -0
- package/lib/components/table/index.css +0 -1
- package/lib/components/upload/components/uploadedPreview.js +62 -54
- package/lib/components/upload/img/doc.svg +1 -0
- package/lib/components/upload/img/other.svg +1 -0
- package/lib/components/upload/img/pdf.svg +1 -0
- package/lib/components/upload/img/ppt.svg +1 -0
- package/lib/components/upload/img/radio.svg +1 -0
- package/lib/components/upload/img/video.svg +1 -0
- package/lib/components/upload/img/xls.svg +1 -0
- package/lib/components/upload/index.css +26 -0
- package/lib/components/upload/index.js +89 -57
- package/lib/components/upload/style.js +7 -7
- package/lib/components/upload/type.js +15 -15
- package/lib/components/upload/util.js +102 -0
- package/lib/components/upvote/index.js +37 -14
- package/lib/components/user-selector/export-modules/field-tree-selector/index.css +4 -0
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +50 -24
- package/lib/components/user-selector/export-modules/field-tree-selector/single-selector/index.js +11 -2
- package/lib/components/user-selector/layout/index.css +1 -1
- package/lib/components-v1/buttonv2/ButtonLinked.js +35 -0
- package/lib/components-v1/buttonv2/ButtonOutlined.js +64 -0
- package/lib/components-v1/buttonv2/ButtonRounded.js +101 -0
- package/lib/components-v1/buttonv2/DefaultButton.js +86 -0
- package/lib/components-v1/buttonv2/index.js +37 -0
- package/lib/components-v1/buttonv2/style/style.js +53 -0
- package/lib/components-v1/buttonv2/style/theme.css +3 -0
- package/lib/components-v1/confirm/index.js +158 -0
- package/lib/index.js +49 -5
- package/lib/pages/dynamic/index.css +5 -0
- package/lib/pages/dynamic/index.js +25 -0
- package/lib/pages/home-page/components/data-list/nav-selector/index.js +18 -0
- package/lib/pages/home-page/components/data-list/table/utils-function.js +6 -3
- package/lib/pages/like-ranking/column.js +141 -0
- package/lib/pages/like-ranking/filter-buttons/department.js +44 -0
- package/lib/pages/like-ranking/filter-buttons/group.js +34 -0
- package/lib/pages/like-ranking/filter-buttons/index.css +19 -0
- package/lib/pages/like-ranking/filter-buttons/index.js +40 -0
- package/lib/pages/like-ranking/filter-buttons/modular.js +110 -0
- package/lib/pages/like-ranking/filter-buttons/name.js +73 -0
- package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.css +27 -0
- package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.js +38 -0
- package/lib/pages/like-ranking/filter-buttons/timer.js +56 -0
- package/lib/pages/like-ranking/image/dynamic-empty.png +0 -0
- package/lib/pages/like-ranking/image/loading.gif +0 -0
- package/lib/pages/like-ranking/image/ranking-1.png +0 -0
- package/lib/pages/like-ranking/image/ranking-2.png +0 -0
- package/lib/pages/like-ranking/image/ranking-3.png +0 -0
- package/lib/pages/like-ranking/index.css +185 -0
- package/lib/pages/like-ranking/index.js +252 -0
- package/lib/pages/like-ranking/mock.js +366 -0
- package/lib/pages/like-ranking/request-api.js +15 -0
- package/lib/utils/auth.js +46 -5
- package/lib/utils/bs-global.js +26 -2
- package/lib/utils/format-time.js +161 -0
- package/lib/utils/helpers.js +41 -0
- package/lib/utils/roundWeight.js +105 -0
- package/lib/utils/tools.js +140 -20
- package/package.json +2 -2
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
13
|
+
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
16
|
+
var _enlarge = _interopRequireDefault(require("./icon/enlarge"));
|
|
17
|
+
|
|
18
|
+
var _shrink = _interopRequireDefault(require("./icon/shrink"));
|
|
19
|
+
|
|
20
|
+
var _leftRotate = _interopRequireDefault(require("./icon/left-rotate"));
|
|
21
|
+
|
|
22
|
+
var _rightRotate = _interopRequireDefault(require("./icon/right-rotate"));
|
|
23
|
+
|
|
24
|
+
var _tooltip = _interopRequireWildcard(require("../tooltip"));
|
|
25
|
+
|
|
26
|
+
var _loading = _interopRequireDefault(require("./image/loading.gif"));
|
|
27
|
+
|
|
28
|
+
require("./index.css");
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
|
+
|
|
32
|
+
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); }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
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 prefix = "titaui-img-viewer";
|
|
51
|
+
var ImgViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
52
|
+
var data = _ref.data,
|
|
53
|
+
_ref$showDownload = _ref.showDownload,
|
|
54
|
+
showDownload = _ref$showDownload === void 0 ? true : _ref$showDownload;
|
|
55
|
+
|
|
56
|
+
var _useState = (0, _react.useState)(false),
|
|
57
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
58
|
+
visible = _useState2[0],
|
|
59
|
+
setVisible = _useState2[1];
|
|
60
|
+
|
|
61
|
+
var _useState3 = (0, _react.useState)(0),
|
|
62
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
63
|
+
currentIndex = _useState4[0],
|
|
64
|
+
setCurrnetIndex = _useState4[1];
|
|
65
|
+
|
|
66
|
+
var _useState5 = (0, _react.useState)(data[0]),
|
|
67
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
68
|
+
currentImgData = _useState6[0],
|
|
69
|
+
setCurrentImgData = _useState6[1];
|
|
70
|
+
|
|
71
|
+
var _useState7 = (0, _react.useState)(0),
|
|
72
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
73
|
+
currentRotateDeg = _useState8[0],
|
|
74
|
+
setCurrentRotateDeg = _useState8[1];
|
|
75
|
+
|
|
76
|
+
var _useState9 = (0, _react.useState)(1),
|
|
77
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
78
|
+
currentScale = _useState10[0],
|
|
79
|
+
setCurrentScale = _useState10[1];
|
|
80
|
+
|
|
81
|
+
var _useState11 = (0, _react.useState)(true),
|
|
82
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
83
|
+
isLoading = _useState12[0],
|
|
84
|
+
setIsLoading = _useState12[1];
|
|
85
|
+
|
|
86
|
+
var imgRef = (0, _react.useRef)(document.createElement("img"));
|
|
87
|
+
|
|
88
|
+
var showPreview = function showPreview() {
|
|
89
|
+
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
90
|
+
setCurrnetIndex(index);
|
|
91
|
+
setCurrentImgData(data[index]);
|
|
92
|
+
setVisible(true);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
var hidePreview = function hidePreview() {
|
|
96
|
+
setVisible(false);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
var handlePreImgClick = function handlePreImgClick() {
|
|
100
|
+
if (currentIndex === 0) return;
|
|
101
|
+
setIsLoading(true);
|
|
102
|
+
setCurrentImgData(data[currentIndex - 1]);
|
|
103
|
+
setCurrnetIndex(currentIndex - 1);
|
|
104
|
+
setCurrentScale(1);
|
|
105
|
+
setCurrentRotateDeg(0);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
var handleNextImgClick = function handleNextImgClick() {
|
|
109
|
+
if (currentIndex === data.length - 1) return;
|
|
110
|
+
setIsLoading(true);
|
|
111
|
+
setCurrentImgData(data[currentIndex + 1]);
|
|
112
|
+
setCurrnetIndex(currentIndex + 1);
|
|
113
|
+
setCurrentScale(1);
|
|
114
|
+
setCurrentRotateDeg(0);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
var handleLeftRotate = function handleLeftRotate() {
|
|
118
|
+
setCurrentRotateDeg(currentRotateDeg - 90);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
var handleRightRotate = function handleRightRotate() {
|
|
122
|
+
setCurrentRotateDeg(currentRotateDeg + 90);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
var handleEnlarge = function handleEnlarge() {
|
|
126
|
+
if (currentScale === 5) return;
|
|
127
|
+
setCurrentScale(Number((currentScale + 0.1).toFixed(1)));
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
var handleShrink = function handleShrink() {
|
|
131
|
+
if (currentScale === 0.1) return;
|
|
132
|
+
setCurrentScale(Number((currentScale - 0.1).toFixed(1)));
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
136
|
+
return {
|
|
137
|
+
show: showPreview,
|
|
138
|
+
hide: hidePreview
|
|
139
|
+
};
|
|
140
|
+
});
|
|
141
|
+
(0, _react.useEffect)(function () {
|
|
142
|
+
var timer = setInterval(function () {
|
|
143
|
+
if (imgRef.current.complete) {
|
|
144
|
+
setIsLoading(false);
|
|
145
|
+
clearInterval(timer);
|
|
146
|
+
}
|
|
147
|
+
}, 500);
|
|
148
|
+
}, [currentIndex]);
|
|
149
|
+
|
|
150
|
+
var renderPreviewer = function renderPreviewer() {
|
|
151
|
+
if (!visible) return null;
|
|
152
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
153
|
+
className: prefix
|
|
154
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
155
|
+
className: prefix + "__header"
|
|
156
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
157
|
+
className: prefix + "__header-file-name"
|
|
158
|
+
}, /*#__PURE__*/_react["default"].createElement(_tooltip.TooltipText, {
|
|
159
|
+
text: currentImgData.fileName,
|
|
160
|
+
isPercent: true,
|
|
161
|
+
minusWidth: 60
|
|
162
|
+
})), /*#__PURE__*/_react["default"].createElement("span", null, showDownload && /*#__PURE__*/_react["default"].createElement("a", {
|
|
163
|
+
className: prefix + "__header-download",
|
|
164
|
+
href: currentImgData.downloadUrl
|
|
165
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
166
|
+
className: (0, _classnames["default"])("tu-icon-APP-xiazai", prefix + "__header-download-icon")
|
|
167
|
+
}), "\u4E0B\u8F7D"), /*#__PURE__*/_react["default"].createElement("span", {
|
|
168
|
+
className: (0, _classnames["default"])("tu-icon-close", prefix + "__header-close"),
|
|
169
|
+
onClick: hidePreview
|
|
170
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
171
|
+
className: prefix + "__body"
|
|
172
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
173
|
+
className: (0, _classnames["default"])(prefix + "__body-operate-btn", prefix + "__body-operate-btn--left", _defineProperty({}, prefix + "__body-operate-btn--disable", currentIndex === 0)),
|
|
174
|
+
onClick: handlePreImgClick
|
|
175
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
176
|
+
className: "tu-icon-left"
|
|
177
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
178
|
+
className: (0, _classnames["default"])(prefix + "__body-operate-btn", prefix + "__body-operate-btn--right", _defineProperty({}, prefix + "__body-operate-btn--disable", currentIndex === data.length - 1)),
|
|
179
|
+
onClick: handleNextImgClick
|
|
180
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
181
|
+
className: "tu-icon-APP-xi"
|
|
182
|
+
})), isLoading && /*#__PURE__*/_react["default"].createElement("div", {
|
|
183
|
+
className: prefix + '__body--loading'
|
|
184
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
185
|
+
src: _loading["default"]
|
|
186
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
187
|
+
style: {
|
|
188
|
+
transform: "rotate(".concat(currentRotateDeg, "deg)")
|
|
189
|
+
}
|
|
190
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
191
|
+
ref: imgRef,
|
|
192
|
+
src: currentImgData.bigImageUrl,
|
|
193
|
+
style: {
|
|
194
|
+
transform: "scale(".concat(currentScale, ")")
|
|
195
|
+
}
|
|
196
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
197
|
+
className: prefix + "__footer"
|
|
198
|
+
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
199
|
+
overlay: "缩小",
|
|
200
|
+
placement: "top"
|
|
201
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
202
|
+
className: prefix + "__footer-btn",
|
|
203
|
+
onClick: handleShrink
|
|
204
|
+
}, /*#__PURE__*/_react["default"].createElement(_shrink["default"], null))), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
205
|
+
overlay: "放大",
|
|
206
|
+
placement: "top"
|
|
207
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
208
|
+
className: prefix + "__footer-btn",
|
|
209
|
+
onClick: handleEnlarge
|
|
210
|
+
}, /*#__PURE__*/_react["default"].createElement(_enlarge["default"], null))), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
211
|
+
overlay: "顺时针旋转",
|
|
212
|
+
placement: "top"
|
|
213
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
214
|
+
className: prefix + "__footer-btn",
|
|
215
|
+
onClick: handleRightRotate
|
|
216
|
+
}, /*#__PURE__*/_react["default"].createElement(_rightRotate["default"], null))), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
217
|
+
overlay: "逆时针旋转",
|
|
218
|
+
placement: "top"
|
|
219
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
220
|
+
className: prefix + "__footer-btn",
|
|
221
|
+
onClick: handleLeftRotate
|
|
222
|
+
}, /*#__PURE__*/_react["default"].createElement(_leftRotate["default"], null)))));
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
return /*#__PURE__*/_reactDom["default"].createPortal(renderPreviewer(), document.body);
|
|
226
|
+
});
|
|
227
|
+
var _default = ImgViewer;
|
|
228
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isImg = void 0;
|
|
7
|
+
|
|
8
|
+
var isImg = function isImg(fileType) {
|
|
9
|
+
if (/^(jpg|png|gif|jpeg|image|JPG|PNG|GIF|JPEG)$/.test(fileType)) {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return false;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.isImg = isImg;
|
|
@@ -159,7 +159,9 @@ var MblogAction = /*#__PURE__*/function (_PureComponent) {
|
|
|
159
159
|
emotionsSelectorPopAlign = _this$props.emotionsSelectorPopAlign,
|
|
160
160
|
visibility = _this$props.visibility,
|
|
161
161
|
onActionsSelectedUserChange = _this$props.onActionsSelectedUserChange,
|
|
162
|
-
dragFilesList = _this$props.dragFilesList
|
|
162
|
+
dragFilesList = _this$props.dragFilesList,
|
|
163
|
+
_this$props$disableRa = _this$props.disableRangeSelect,
|
|
164
|
+
disableRangeSelect = _this$props$disableRa === void 0 ? true : _this$props$disableRa;
|
|
163
165
|
return /*#__PURE__*/_react["default"].createElement(_style.MblogActionWrapper, {
|
|
164
166
|
className: className
|
|
165
167
|
}, /*#__PURE__*/_react["default"].createElement(_style.LeftBtnGroupWrapper, {
|
|
@@ -240,21 +242,23 @@ var MblogAction = /*#__PURE__*/function (_PureComponent) {
|
|
|
240
242
|
}), /*#__PURE__*/_react["default"].createElement("span", null, "\u77ED\u4FE1\u901A\u77E5"))), this.props.isShowRange && /*#__PURE__*/_react["default"].createElement(_style.BtnPrivate, {
|
|
241
243
|
id: "1",
|
|
242
244
|
"data-name": "range",
|
|
243
|
-
className:
|
|
244
|
-
disabled:
|
|
245
|
+
className: disableRangeSelect ? 'disabled' : '',
|
|
246
|
+
disabled: disableRangeSelect
|
|
245
247
|
}, /*#__PURE__*/_react["default"].createElement(_RangeSelectorPop["default"], {
|
|
246
248
|
align: "bottom left",
|
|
247
|
-
isDisabled:
|
|
249
|
+
isDisabled: disableRangeSelect,
|
|
248
250
|
container: this.context.popContainer,
|
|
249
251
|
onSubmit: function onSubmit(visibility) {
|
|
250
252
|
return onActionsTextChange(visibility);
|
|
251
253
|
}
|
|
254
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
255
|
+
className: 'mblog-visiblity-range'
|
|
252
256
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
253
257
|
"data-name": "range-cont"
|
|
254
258
|
}, visibilityMap[visibility || 1]), this.props.isShowRangeDropDown && /*#__PURE__*/_react["default"].createElement("i", {
|
|
255
|
-
className: "tu-icon-
|
|
259
|
+
className: "tu-icon-caret-down range-cont-icon",
|
|
256
260
|
"data-name": "range-caret"
|
|
257
|
-
}))), this.props.isShowBtnCancel && /*#__PURE__*/_react["default"].createElement(_style.BtnCancel, {
|
|
261
|
+
})))), this.props.isShowBtnCancel && /*#__PURE__*/_react["default"].createElement(_style.BtnCancel, {
|
|
258
262
|
onMouseDown: function onMouseDown() {
|
|
259
263
|
return onActionSubmit('cancel');
|
|
260
264
|
}
|
|
@@ -72,10 +72,13 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
|
|
|
72
72
|
|
|
73
73
|
var textareaValue = (0, _index.htmlDecodeByRegExp)(localStorage.getItem(localStroageKey) || defaultContent); // 获取本地缓存内容
|
|
74
74
|
|
|
75
|
+
var atAll = textareaValue.match(/@\[所有同事:all_members\]/g) ? true : false;
|
|
76
|
+
|
|
75
77
|
_this.setState({
|
|
78
|
+
isAtAll: atAll,
|
|
76
79
|
localStroageKey: localStroageKey,
|
|
77
80
|
textareaValue: textareaValue.trim(),
|
|
78
|
-
visibility: privateValue || 1,
|
|
81
|
+
visibility: atAll ? 1 : privateValue || 1,
|
|
79
82
|
isAllowSubmit: _this.allowSubmit(textareaValue) // 根据内容判断是否可以提交
|
|
80
83
|
|
|
81
84
|
});
|
|
@@ -85,12 +88,15 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
|
|
|
85
88
|
// @ts-ignore
|
|
86
89
|
var textareaInput = _this.refs.textEditor.refs.textareaInput;
|
|
87
90
|
var start = textareaInput.selectionStart;
|
|
91
|
+
var atAll = contentValue.match(/@\[所有同事:all_members\]/g) ? true : false;
|
|
88
92
|
|
|
89
93
|
_this.setState({
|
|
90
94
|
isInputAt: contentValue.charAt(start - 1) == '@',
|
|
91
95
|
// isInputEnterSubmit: contentValue === 'isInputEnterSubmit',
|
|
92
96
|
textareaValue: contentValue,
|
|
93
|
-
isAllowSubmit: _this.allowSubmit(contentValue)
|
|
97
|
+
isAllowSubmit: _this.allowSubmit(contentValue),
|
|
98
|
+
isAtAll: atAll,
|
|
99
|
+
visibility: atAll ? 1 : _this.state.visibility
|
|
94
100
|
});
|
|
95
101
|
|
|
96
102
|
localStorage.setItem(_this.state.localStroageKey, contentValue);
|
|
@@ -127,9 +133,13 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
|
|
|
127
133
|
textareaValue = (0, _index.insertTextAtPointer)(textareaInput, actionValue);
|
|
128
134
|
localStorage.setItem(_this.state.localStroageKey, textareaValue); // 输入内容进行本地缓存
|
|
129
135
|
|
|
136
|
+
var atAll = textareaValue.match(/@\[所有同事:all_members\]/g) ? true : false;
|
|
137
|
+
|
|
130
138
|
_this.setState({
|
|
131
139
|
textareaValue: textareaValue,
|
|
132
|
-
isAllowSubmit: _this.allowSubmit(textareaValue)
|
|
140
|
+
isAllowSubmit: _this.allowSubmit(textareaValue),
|
|
141
|
+
isAtAll: atAll,
|
|
142
|
+
visibility: atAll ? 1 : _this.state.visibility
|
|
133
143
|
}, function () {
|
|
134
144
|
_this.focus();
|
|
135
145
|
});
|
|
@@ -157,8 +167,7 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
|
|
|
157
167
|
var successFilesPathLen = successFilesPath.length; // @ts-ignore
|
|
158
168
|
|
|
159
169
|
var textareaInput = _this.refs.textEditor.refs.textareaInput;
|
|
160
|
-
var textareaValue = _this.state.textareaValue;
|
|
161
|
-
textareaValue = (0, _index.dealWithLoadedFileTips)(textareaValue, successFilesPathLen); // 更新输入框内容
|
|
170
|
+
var textareaValue = _this.state.textareaValue; // textareaValue = dealWithLoadedFileTips(textareaValue, successFilesPathLen); // 更新输入框内容
|
|
162
171
|
|
|
163
172
|
localStorage.setItem(_this.state.localStroageKey, textareaValue); // 将输入框内容进行本地缓存
|
|
164
173
|
|
|
@@ -166,7 +175,7 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
|
|
|
166
175
|
|
|
167
176
|
_this.setState({
|
|
168
177
|
textareaValue: textareaValue,
|
|
169
|
-
isAllowSubmit: textareaValue.trim().length > 0 && textareaValue.trim().length <= (_this.props.maxLength || 2000),
|
|
178
|
+
isAllowSubmit: textareaValue.trim().length > 0 && textareaValue.trim().length <= (_this.props.maxLength || 2000) || successFilesPath.length > 0,
|
|
170
179
|
uploadSuccessFilesPath: successFilesPath,
|
|
171
180
|
dragFilesList: []
|
|
172
181
|
});
|
|
@@ -181,7 +190,7 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
|
|
|
181
190
|
};
|
|
182
191
|
|
|
183
192
|
_this.allowSubmit = function (content) {
|
|
184
|
-
return content.trim().length > 0 && content.trim().length <= _this.props.maxLength;
|
|
193
|
+
return content.trim().length > 0 && content.trim().length <= _this.props.maxLength || _this.state.uploadSuccessFilesPath.length > 0;
|
|
185
194
|
};
|
|
186
195
|
|
|
187
196
|
_this.onActionSubmit = function (submitType) {
|
|
@@ -300,7 +309,8 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
|
|
|
300
309
|
isInputAt: false,
|
|
301
310
|
isInputEnterSubmit: false,
|
|
302
311
|
dragFilesList: [],
|
|
303
|
-
isShowDragMask: false
|
|
312
|
+
isShowDragMask: false,
|
|
313
|
+
isAtAll: false
|
|
304
314
|
};
|
|
305
315
|
return _this;
|
|
306
316
|
} // @ts-ignore @所有同事权限设置,有权限的:超管、老板、助理、目标负责人、目标管理员
|
|
@@ -375,7 +385,8 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
|
|
|
375
385
|
isShowRangeDropDown = _this$props3.isShowRangeDropDown,
|
|
376
386
|
isShowBtnCancel = _this$props3.isShowBtnCancel,
|
|
377
387
|
submitText = _this$props3.submitText,
|
|
378
|
-
setTextareaRef = _this$props3.setTextareaRef
|
|
388
|
+
setTextareaRef = _this$props3.setTextareaRef,
|
|
389
|
+
disableRangeSelect = _this$props3.disableRangeSelect;
|
|
379
390
|
var _this$state2 = this.state,
|
|
380
391
|
localStroageKey = _this$state2.localStroageKey,
|
|
381
392
|
visibility = _this$state2.visibility,
|
|
@@ -384,7 +395,8 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
|
|
|
384
395
|
isAllowSubmit = _this$state2.isAllowSubmit,
|
|
385
396
|
textareaValue = _this$state2.textareaValue,
|
|
386
397
|
dragFilesList = _this$state2.dragFilesList,
|
|
387
|
-
isShowDragMask = _this$state2.isShowDragMask
|
|
398
|
+
isShowDragMask = _this$state2.isShowDragMask,
|
|
399
|
+
isAtAll = _this$state2.isAtAll;
|
|
388
400
|
var fSize = (0, _bsGlobal.getUploadMaxSize)();
|
|
389
401
|
var fTip = attachmentTipText || '<p>支持拖拽上传</p><p>单次最多支持上传20个,总数不可超过50个</p><p>每个不超过' + fSize + 'MB</p>';
|
|
390
402
|
return /*#__PURE__*/_react["default"].createElement(_style.MBlogBox, {
|
|
@@ -441,7 +453,7 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
|
|
|
441
453
|
sendSmsTipText: sendSmsTipText,
|
|
442
454
|
isShowRange: isShowRange,
|
|
443
455
|
isShowRangeDropDown: isShowRangeDropDown,
|
|
444
|
-
visibility: visibility,
|
|
456
|
+
visibility: isAtAll ? 1 : visibility,
|
|
445
457
|
dragFilesList: dragFilesList,
|
|
446
458
|
isShowBtnCancel: isShowBtnCancel,
|
|
447
459
|
isInputEnterSubmit: isInputEnterSubmit,
|
|
@@ -449,6 +461,7 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
|
|
|
449
461
|
submitText: submitText,
|
|
450
462
|
submitStatus: submitStatus,
|
|
451
463
|
localStroageKey: localStroageKey,
|
|
464
|
+
disableRangeSelect: disableRangeSelect || isAtAll,
|
|
452
465
|
onActionsTextChange: function onActionsTextChange(actionValue) {
|
|
453
466
|
_this2.onActionsTextChange(actionValue);
|
|
454
467
|
},
|
|
@@ -13,12 +13,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
13
13
|
|
|
14
14
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
15
|
|
|
16
|
-
var MBlogBox = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n .uploadFile__preview__list {\n padding-bottom: 10px;\n background: #ffffff;\n display: flex;\n flex-wrap: wrap;\n\n .preview__content {\n margin-top: 10px;\n margin-right: 10px;\n }\n }\n"]))); // MblogContent
|
|
16
|
+
var MBlogBox = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n .uploadFile__preview__list {\n padding-bottom: 10px;\n background: #ffffff;\n display: flex;\n flex-wrap: wrap;\n max-height: 300px;\n overflow-y: auto;\n\n .preview__content {\n margin-top: 10px;\n margin-right: 10px;\n border-radius: 8px;\n }\n }\n"]))); // MblogContent
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
exports.MBlogBox = MBlogBox;
|
|
20
20
|
|
|
21
|
-
var DivMblogContent = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 8px 10px 6px;\n border: 1px solid #E9ECF0;\n border-radius:
|
|
21
|
+
var DivMblogContent = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 8px 10px 6px;\n border: 1px solid #E9ECF0;\n border-radius: 4px;\n background-color: #fff;\n position: relative;\n transition: all .2s ease-in-out;\n height: 124px;\n box-sizing: border-box;\n\n &.input_default-active {\n box-shadow: inset 0px 0px 4px 0px rgba(40, 121, 255, 0.3);\n border-color: #2879ff;\n }\n"])));
|
|
22
22
|
|
|
23
23
|
exports.DivMblogContent = DivMblogContent;
|
|
24
24
|
|
|
@@ -28,7 +28,7 @@ var LabelWrapper = _styledComponents["default"].div(_templateObject3 || (_templa
|
|
|
28
28
|
|
|
29
29
|
exports.LabelWrapper = LabelWrapper;
|
|
30
30
|
|
|
31
|
-
var Label = _styledComponents["default"].label(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n top:
|
|
31
|
+
var Label = _styledComponents["default"].label(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n top: 8px;\n left: 10px;\n color: #BFC7D5;\n font-size: 14px;\n cursor: text;\n"])));
|
|
32
32
|
|
|
33
33
|
exports.Label = Label;
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@ var TextareaWrapper = _styledComponents["default"].div(_templateObject5 || (_tem
|
|
|
36
36
|
|
|
37
37
|
exports.TextareaWrapper = TextareaWrapper;
|
|
38
38
|
|
|
39
|
-
var Textarea = _styledComponents["default"].textarea(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100%;\n padding: 0;\n border: 0 none;\n background-color: transparent;\n color: #
|
|
39
|
+
var Textarea = _styledComponents["default"].textarea(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100%;\n padding: 0;\n border: 0 none;\n background-color: transparent;\n color: #3F4755;\n resize: none;\n word-break: break-all;\n word-wrap: break-word;\n height: 86px;\n\n &.textarea-setheight {\n visibility: hidden;\n position: absolute;\n }\n/* \n &.private__bg {\n background: url(", ") no-repeat right top;\n } */\n"])), require("./assets/lock-radius.png"));
|
|
40
40
|
|
|
41
41
|
exports.Textarea = Textarea;
|
|
42
42
|
|
|
@@ -47,7 +47,7 @@ var Tips = _styledComponents["default"].div(_templateObject7 || (_templateObject
|
|
|
47
47
|
|
|
48
48
|
exports.Tips = Tips;
|
|
49
49
|
|
|
50
|
-
var MblogActionWrapper = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n height: 30px;\n padding: 9px 0;\n font-size: 13px;\n line-height: 20px;\n color: #565E66;\n background-color: #ffffff;\n display: flex;\n align-items: center;\n justify-content: space-between;\n"]))); // 左侧按钮
|
|
50
|
+
var MblogActionWrapper = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n height: 30px;\n padding: 9px 0 8px 0;\n font-size: 13px;\n line-height: 20px;\n color: #565E66;\n background-color: #ffffff;\n display: flex;\n align-items: center;\n justify-content: space-between;\n"]))); // 左侧按钮
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
exports.MblogActionWrapper = MblogActionWrapper;
|
|
@@ -56,13 +56,13 @@ var LeftBtnGroupWrapper = _styledComponents["default"].div(_templateObject9 || (
|
|
|
56
56
|
|
|
57
57
|
exports.LeftBtnGroupWrapper = LeftBtnGroupWrapper;
|
|
58
58
|
|
|
59
|
-
var LeftBtn = _styledComponents["default"].div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n height: 100%;\n margin-right: 12px;\n
|
|
59
|
+
var LeftBtn = _styledComponents["default"].div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n height: 100%;\n margin-right: 12px;\n display: flex;\n align-items: center;\n white-space: nowrap;\n cursor: pointer;\n position: relative;\n\n &:last-child {\n margin-right: 0;\n }\n\n &:hover {\n color: #2879FF;\n cursor: pointer;\n }\n\n &.action__tips {\n position: relative;\n &:hover {\n &::before,\n &::after {\n opacity: 1;\n visibility: visible;\n }\n }\n\n &::before,\n &::after {\n opacity: 0;\n visibility: hidden;\n transition: all .3 ease-in-out;\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n }\n\n &::before {\n content: '';\n border: 6px solid;\n border-color: #3e4e59 transparent transparent;\n top: -9px;\n }\n\n &::after {\n content: '", "';\n white-space: nowrap;\n color: #fff;\n background: #3e4e59;\n padding: 4px 10px;\n border-radius: 4px;\n top: -37px;\n }\n }\n"])), function (p) {
|
|
60
60
|
return p.tips;
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
exports.LeftBtn = LeftBtn;
|
|
64
64
|
|
|
65
|
-
var IconSpan = _styledComponents["default"].span(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-right:
|
|
65
|
+
var IconSpan = _styledComponents["default"].span(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-right: 4px;\n position: relative;\n line-height: 20px;\n vertical-align: middle;\n"])));
|
|
66
66
|
|
|
67
67
|
exports.IconSpan = IconSpan;
|
|
68
68
|
|
|
@@ -82,7 +82,7 @@ var BtnConfirm = _styledComponents["default"].button(_templateObject15 || (_temp
|
|
|
82
82
|
|
|
83
83
|
exports.BtnConfirm = BtnConfirm;
|
|
84
84
|
|
|
85
|
-
var BtnPrivate = _styledComponents["default"].button(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n \n color: #565E66;\n background: #ffffff;\n\n &.disabled {\n cursor:
|
|
85
|
+
var BtnPrivate = _styledComponents["default"].button(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n \n color: #565E66;\n background: #ffffff;\n cursor: pointer;\n\n &.disabled {\n cursor: not-allowed;\n .mblog-visiblity-range {\n color: #A4ACB9;\n }\n }\n .mblog-visiblity-range {\n display: flex;\n align-items: center;\n color: #3F4755;\n }\n .range-cont-icon {\n font-size: 16px;\n display: inline-block;\n transform: scale(0.5);\n }\n"])));
|
|
86
86
|
|
|
87
87
|
exports.BtnPrivate = BtnPrivate;
|
|
88
88
|
|
|
@@ -52,7 +52,7 @@ var OCycle = function OCycle(props) {
|
|
|
52
52
|
refreshKrs();
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
return /*#__PURE__*/_react["default"].createElement(_okrPeriodSelector["default"], {
|
|
55
|
+
return /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_okrPeriodSelector["default"], {
|
|
56
56
|
renderInnerContent: renderInnerContent,
|
|
57
57
|
okrId: okrId,
|
|
58
58
|
cycle: generalCycle,
|
|
@@ -62,7 +62,7 @@ var OCycle = function OCycle(props) {
|
|
|
62
62
|
popupAlign: {
|
|
63
63
|
offset: [0, 8]
|
|
64
64
|
}
|
|
65
|
-
});
|
|
65
|
+
}));
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
var _default = OCycle;
|
|
@@ -70,20 +70,27 @@ var _default = function _default(props) {
|
|
|
70
70
|
|
|
71
71
|
var openCreate = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
72
72
|
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(name) {
|
|
73
|
+
var params;
|
|
73
74
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
74
75
|
while (1) {
|
|
75
76
|
switch (_context.prev = _context.next) {
|
|
76
77
|
case 0:
|
|
77
78
|
if (name == "addTask") {
|
|
79
|
+
params = {
|
|
80
|
+
'objId': data.workId,
|
|
81
|
+
'objType': 4,
|
|
82
|
+
'AppId': 1,
|
|
83
|
+
'AppType': 1,
|
|
84
|
+
'TaskType': 0,
|
|
85
|
+
'WorkMileStoneId': data.mileStoneId
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
if (data.mileStoneId > 0) {
|
|
89
|
+
params.WorkMileStoneName = data.mileStoneName;
|
|
90
|
+
}
|
|
91
|
+
|
|
78
92
|
window.openCreateTaskPop(btnRef.current, {
|
|
79
|
-
"createParams":
|
|
80
|
-
"objId": data.workId,
|
|
81
|
-
"objType": 4,
|
|
82
|
-
"AppId": 1,
|
|
83
|
-
"AppType": 1,
|
|
84
|
-
"TaskType": 0,
|
|
85
|
-
"WorkMileStoneId": data.mileStoneId
|
|
86
|
-
},
|
|
93
|
+
"createParams": params,
|
|
87
94
|
"createTaskOption": {
|
|
88
95
|
"allowObjectOptions": false
|
|
89
96
|
}
|
|
@@ -179,7 +179,7 @@ var WorkNode = function WorkNode(_ref) {
|
|
|
179
179
|
modelType = data.modelType,
|
|
180
180
|
KrIndex = data.KrIndex; // modelType = 2 是KR
|
|
181
181
|
|
|
182
|
-
var cycleTypeCopy = modelType ? modelType === 2 ?
|
|
182
|
+
var cycleTypeCopy = modelType ? modelType === 2 ? -1 : cycleType : cycleType;
|
|
183
183
|
|
|
184
184
|
switch (cycleTypeCopy) {
|
|
185
185
|
case 0:
|
|
@@ -195,6 +195,12 @@ var WorkNode = function WorkNode(_ref) {
|
|
|
195
195
|
return yqmnum + '月';
|
|
196
196
|
|
|
197
197
|
case 4:
|
|
198
|
+
return "".concat(yqmnum, "-").concat((yqmnum + 1) % 12 || 12, "\u6708");
|
|
199
|
+
|
|
200
|
+
case 5:
|
|
201
|
+
return "".concat(yqmnum == 1 ? '上' : '下', "\u534A\u5E74");
|
|
202
|
+
|
|
203
|
+
case -1:
|
|
198
204
|
return KrIndex ? 'KR' + KrIndex : 'KR';
|
|
199
205
|
}
|
|
200
206
|
}; // 1:正常 2:有风险 3:过期 4:完成 5:过期完成 ,
|