@titaui/pc 1.12.7 → 1.12.9-beta.10
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.js +1 -1
- package/lib/components/avatar/num-avatar/index.js +1 -1
- package/lib/components/book-demo/components/pc/components/content/index.js +1 -1
- package/lib/components/button/default-button/index.js +1 -1
- package/lib/components/button/icon-btn/index.js +1 -1
- package/lib/components/cascader/index.js +1 -1
- package/lib/components/cascader/time.js +1 -1
- package/lib/components/change-okr-modal/Filter.js +2 -2
- package/lib/components/change-okr-modal/Item.js +21 -20
- package/lib/components/change-okr-modal/filterTab.js +2 -2
- package/lib/components/change-okr-modal/index.js +2 -2
- package/lib/components/change-okr-modal/styledComponents.js +9 -9
- package/lib/components/communication/CommunicationAttachments.js +2 -2
- package/lib/components/communication/ConvertUserName.js +2 -2
- package/lib/components/communication/index.js +8 -2
- package/lib/components/create-okr-modal/createSuccessCmp.js +47 -19
- package/lib/components/create-okr-modal/fields/index.css +14 -3
- package/lib/components/create-okr-modal/fields/o-new-name.js +31 -20
- package/lib/components/create-okr-modal/fields/okr-case.js +7 -5
- package/lib/components/create-okr-modal/fields/okr-parent.js +7 -5
- package/lib/components/create-okr-modal/index.js +215 -142
- package/lib/components/create-okr-modal/kr-items/index.css +23 -13
- package/lib/components/create-okr-modal/kr-items/krDatas.js +96 -76
- package/lib/components/create-okr-modal/kr-items/krItem.js +54 -57
- package/lib/components/create-okr-modal/objectType.js +2 -2
- package/lib/components/create-okr-modal/style.js +5 -5
- package/lib/components/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarBody.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/date-picker/index.js +2 -2
- package/lib/components/date-range-picker/index.js +2 -2
- package/lib/components/delete-confirm-pop/ConfirmPop.js +2 -2
- package/lib/components/dialog/index.js +1 -1
- package/lib/components/dialog-confirm/index.js +1 -1
- package/lib/components/drawer/headerDrop.js +1 -1
- package/lib/components/drawer/index.css +9 -0
- package/lib/components/drawer/index.js +12 -9
- package/lib/components/drawer-manager/drawerWrapper.js +1 -1
- package/lib/components/drawer-manager/index.js +1 -1
- package/lib/components/drop-selector/index.js +1 -1
- package/lib/components/dynamic/components/title/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +7 -7
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +8 -8
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-chart/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +18 -18
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-learning/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +10 -10
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +4 -2
- package/lib/components/dynamic/dynamic-item/index.js +9 -1
- package/lib/components/dynamic/dynamic-list/index.js +19 -2
- package/lib/components/eReport/eReportListEmpty.js +2 -2
- package/lib/components/eReport/eReportLists/reportList.js +31 -32
- package/lib/components/eReport/eReportShare/index.js +2 -2
- package/lib/components/eReport/eReportShare/style.js +1 -1
- package/lib/components/eReport/eReportShare/toast/index.js +2 -2
- package/lib/components/edit-kr-wight/EditKrWightModal.js +13 -11
- package/lib/components/edit-kr-wight/FormItemV2.js +2 -2
- package/lib/components/emotions-selector/selector-content.js +2 -2
- package/lib/components/emotions-selector/selector-pop.js +2 -2
- package/lib/components/ereport-list/index.js +2 -2
- package/lib/components/error-boundary/index.js +2 -2
- package/lib/components/form/form-fields/date/index.js +1 -1
- package/lib/components/form/form-fields/dropdown/index.js +1 -1
- package/lib/components/form/form-fields/input/index.js +1 -1
- package/lib/components/form/form-fields/user/index.js +1 -1
- package/lib/components/help-card/index.js +1 -1
- package/lib/components/mblog/components/ConfirmPop.js +2 -2
- package/lib/components/mblog/components/MblogAction.js +2 -2
- package/lib/components/mblog/components/MblogContent.js +2 -2
- package/lib/components/mblog/index.js +2 -2
- package/lib/components/menus/components/menu-tree/index.js +1 -1
- package/lib/components/menus/components/menu-tree/tree-node/index.js +1 -1
- package/lib/components/menus/export-modules/appraisal-menus/index.js +30 -12
- package/lib/components/menus/export-modules/appraisal-menus/menu-highlight.js +22 -6
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +104 -9
- package/lib/components/menus/export-modules/demo-menus/menu-highlight.js +19 -1
- package/lib/components/menus/export-modules/demo-menus/menus.js +34 -1
- package/lib/components/menus/export-modules/okr-menus/menus.js +6 -3
- package/lib/components/nav-top/components/app-center/images/chart.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/file.svg +20 -0
- package/lib/components/nav-top/components/app-center/images/interview.svg +20 -0
- package/lib/components/nav-top/components/app-center/images/learning.svg +23 -0
- package/lib/components/nav-top/components/app-center/images/okr.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/performance.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/plan.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/project.svg +23 -0
- package/lib/components/nav-top/components/app-center/images/summary.svg +23 -0
- package/lib/components/nav-top/components/app-center/index.css +154 -0
- package/lib/components/nav-top/components/app-center/index.js +157 -0
- package/lib/components/nav-top/components/menu/index.js +5 -9
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +1 -1
- package/lib/components/nav-top/components/user-message/components/todos/todo-item.js +3 -3
- package/lib/components/nav-top/index.css +48 -7
- package/lib/components/nav-top/index.js +54 -33
- package/lib/components/nav-top/utils.js +464 -1
- package/lib/components/okr-detail/auth.js +2 -2
- package/lib/components/okr-detail/components/ao-nice/index.css +0 -1
- package/lib/components/okr-detail/components/base-okr-type/confirm/buttonv2.js +2 -2
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +2 -2
- package/lib/components/okr-detail/components/base-okr-type/object-type.js +2 -2
- package/lib/components/okr-detail/components/header/edit-name.js +76 -39
- package/lib/components/okr-detail/components/header/index.css +122 -41
- package/lib/components/okr-detail/components/header/index.js +45 -48
- package/lib/components/okr-detail/components/header/o-avatar.js +6 -0
- package/lib/components/okr-detail/components/header/o-classify.js +154 -0
- package/lib/components/okr-detail/components/header/o-name.js +7 -5
- package/lib/components/okr-detail/components/header/o-score.js +1 -1
- package/lib/components/okr-detail/components/icon-text/index.js +1 -1
- package/lib/components/okr-detail/components/o-progress-update/index.js +2 -2
- package/lib/components/okr-detail/components/okr-tree/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +66 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +174 -64
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +2 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +3 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +9 -9
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +15 -13
- package/lib/components/okr-detail/components/tab-panel-content/index.css +1 -0
- package/lib/components/okr-detail/detail-header/index.js +11 -5
- package/lib/components/okr-detail/okr-list/create-kr-item/index.css +17 -0
- package/lib/components/okr-detail/okr-list/create-kr-item/index.js +75 -53
- package/lib/components/okr-detail/okr-list/index.css +9 -0
- package/lib/components/okr-detail/okr-list/index.js +25 -25
- package/lib/components/okr-detail/request-apis.js +73 -69
- package/lib/components/okr-detail/schedule/components/kr-progress/index.js +3 -1
- package/lib/components/okr-detail/schedule/components/o-progress/index.js +34 -32
- package/lib/components/okr-detail/schedule/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-flow/child-node/kr-node.js +3 -1
- package/lib/components/okr-flow/child-node/work-node.js +3 -1
- package/lib/components/okr-flow/export-modal/color.png +0 -0
- package/lib/components/okr-flow/export-modal/index.css +28 -13
- package/lib/components/okr-flow/export-modal/index.js +88 -40
- package/lib/components/okr-flow/export-modal/trans1.png +0 -0
- package/lib/components/okr-progress/components/kr-progress/index.js +5 -3
- package/lib/components/okr-progress/components/o-progress/index.js +3 -1
- package/lib/components/okr-progress/components/o-progress-update/index.js +2 -2
- package/lib/components/okr-progress/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +5 -5
- package/lib/components/okr-review/ReviewPop/components/Toast/index.js +2 -2
- package/lib/components/okr-review/ReviewPop/index.js +2 -2
- package/lib/components/okr-review/components/ReviewItem/index.js +2 -2
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +2 -2
- package/lib/components/okr-review/index.js +2 -2
- package/lib/components/okr-share/common-painter/openDataPainter.js +9 -6
- package/lib/components/okr-share/common-painter/utils.js +187 -36
- package/lib/components/okr-share/index.css +5 -4
- package/lib/components/okr-share/pink-card/card.js +3 -3
- package/lib/components/okr-share/pink-card/drawKrs.js +97 -18
- package/lib/components/okr-share/pink-card/index.js +20 -12
- package/lib/components/open-data-painter/index.js +6 -5
- package/lib/components/operation-records/OperationRecordItem.js +2 -2
- package/lib/components/operation-records/index.js +2 -2
- package/lib/components/pagination/pagination.js +1 -1
- package/lib/components/period-selector/components/button/index.js +1 -1
- package/lib/components/period-selector/components/button/style.js +1 -1
- package/lib/components/period-selector/index.css +1 -0
- package/lib/components/period-selector/index.js +7 -2
- package/lib/components/picker/components/panels/date-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
- package/lib/components/picker/components/panels/year-panel/index.js +1 -1
- package/lib/components/picker/components/panels/year-panel/year-head.js +1 -1
- package/lib/components/picker/picker.js +1 -1
- package/lib/components/point-demo/drop-down-box/index.js +1 -1
- package/lib/components/point-demo/input/index.js +3 -3
- package/lib/components/point-demo/popup/index.js +1 -1
- package/lib/components/popup/index.js +1 -1
- package/lib/components/praise-record/PraiseRecordItem.js +2 -2
- package/lib/components/praise-record/index.js +2 -2
- package/lib/components/range-picker-pop/index.js +3 -3
- package/lib/components/range-selector-pop/RangeList.js +2 -2
- package/lib/components/range-selector-pop/RangeSelectorPop.js +2 -2
- package/lib/components/rich-editor/models/schema.js +2 -2
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/heading/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/lists/index.js +2 -2
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +2 -2
- package/lib/components/rich-editor/plugins/core/index.js +2 -2
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +2 -2
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/color/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/em/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/link/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/strong/index.js +2 -2
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +2 -2
- package/lib/components/rich-editor/react/reactNodeView.js +4 -4
- package/lib/components/rich-editor/react/uiProvider.js +2 -2
- package/lib/components/rich-editor/ui/Popup/index.js +2 -2
- package/lib/components/scroll-container/index.js +2 -2
- package/lib/components/scrollbar/index.js +1 -1
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/scrollbar/simplebar-react.js +1 -1
- package/lib/components/search-dropdown/index.js +1 -1
- package/lib/components/search-key-handle/index.js +12 -10
- package/lib/components/select/Option.js +3 -3
- package/lib/components/select/index.js +3 -3
- package/lib/components/select-layer/index.js +23 -9
- package/lib/components/select-tags/index.js +1 -1
- package/lib/components/switch/index.js +1 -1
- package/lib/components/table/index.js +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/task-relation-modal/helper.js +1 -56
- package/lib/components/task-relation-modal/index.js +1 -1
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +1 -1
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +1 -4
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +1 -1
- package/lib/components/task-relation-modal/okr-relation/request-api.js +2 -6
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +2 -2
- package/lib/components/task-relation-modal/request-api.js +5 -2
- package/lib/components/task-relation-modal/tree/work-tree/index.js +27 -31
- package/lib/components/task-relation-modal/tree/work-tree/search-form.js +22 -3
- package/lib/components/task-relation-modal/tree-node/index.js +1 -1
- package/lib/components/task-relation-modal/tree-node/kr-node/index.js +4 -4
- package/lib/components/task-relation-modal/tree-node/o-node/index.js +8 -8
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +11 -11
- package/lib/components/task-relation-modal/work-relation/index.js +1 -1
- package/lib/components/task-tree/task-item-node/task-node-render.js +1 -1
- package/lib/components/task-tree/task-tree.js +1 -1
- package/lib/components/textarea/index.js +1 -1
- package/lib/components/time-picker/time-picker-selector.js +1 -1
- package/lib/components/time-picker/time-picker.js +1 -1
- package/lib/components/time-picker/timer-picker-input.js +1 -1
- package/lib/components/tita-chart/charts/liquid-ball.js +1 -1
- package/lib/components/tita-chart/charts/pie.js +1 -1
- package/lib/components/tita-chart/errorBoundary/index.js +2 -2
- package/lib/components/tooltip/error-tip.js +1 -1
- package/lib/components/tooltip/tooltip.js +10 -5
- package/lib/components/tree/index.js +1 -1
- package/lib/components/upload/components/uploadedPreview.js +19 -19
- package/lib/components/upload/index.js +25 -25
- package/lib/components/upvote/index.js +1 -1
- package/lib/components/user-selector/category-selector-panel/depart-tree.js +3 -1
- package/lib/components/user-selector/category-selector-panel/index.js +1 -0
- package/lib/components/user-selector/export-modules/field-tree-selector/index.css +11 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +35 -17
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.css +1 -1
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.js +1 -1
- package/lib/components/user-selector/request-apis.js +43 -9
- package/lib/components/user-selector/searched-panel/index.js +11 -5
- package/lib/components/user-selector/select-tree/choose-tree/index.js +1 -1
- package/lib/components/user-selector/select-tree/selected-tree/index.js +1 -1
- package/lib/components/viewer/ImageListRender.js +2 -2
- package/lib/components/viewer/index.js +2 -2
- package/lib/components/wechat-btn/index.css +5 -1
- package/lib/components-v1/animate/AnimateChild.js +2 -2
- package/lib/components-v1/animate/animate.js +2 -2
- package/lib/components-v1/avatar/index.js +2 -2
- package/lib/components-v1/buttonv2/ButtonOutlined.js +2 -2
- package/lib/components-v1/buttonv2/ButtonRounded.js +2 -2
- package/lib/components-v1/buttonv2/DefaultButton.js +2 -2
- package/lib/components-v1/confirm/index.js +2 -2
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +2 -2
- package/lib/components-v1/dropDownSelector/dropDownSelector.js +2 -2
- package/lib/components-v1/input/Input.js +3 -3
- package/lib/components-v1/input/InputNumber.js +2 -2
- package/lib/components-v1/placement/placement.js +2 -2
- package/lib/components-v1/placement/placementInner.js +2 -2
- package/lib/components-v1/pop/Pop.js +2 -2
- package/lib/components-v1/pop/PopInner.js +2 -2
- package/lib/components-v1/portals/Portals.js +2 -2
- package/lib/components-v1/progress/CircleProgress.js +2 -2
- package/lib/components-v1/progress/LineProgress.js +2 -2
- package/lib/components-v1/progress/index.js +2 -2
- package/lib/components-v1/radio/radio.js +2 -2
- package/lib/components-v1/radio/radioGroup.js +2 -2
- package/lib/components-v1/search/index.js +2 -2
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/select/index.js +3 -3
- package/lib/components-v1/tabs/index.js +2 -2
- package/lib/components-v1/textarea/index.js +2 -2
- package/lib/components-v1/transition/index.js +2 -2
- package/lib/components-v1/userSelector/UserSelectorPop.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentTree.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +2 -2
- package/lib/components-v1/userSelector/components/MultiMode/index.js +2 -2
- package/lib/components-v1/userSelector/components/SearchBar.js +2 -2
- package/lib/components-v1/userSelector/components/SingleMode.js +9 -7
- package/lib/components-v1/userSelector/components/UserItem.js +2 -2
- package/lib/components-v1/userSelector/index.js +2 -2
- package/lib/pages/aha2021/index.js +5 -5
- package/lib/pages/aha2021/new-menu-switcher/index.css +40 -0
- package/lib/pages/aha2021/new-menu-switcher/index.js +81 -0
- package/lib/pages/aha2021/new-menu-switcher/new-menu-bg.png +0 -0
- package/lib/pages/aha2021/request-api.js +15 -0
- package/lib/pages/appointment-demo/drop-down-box/index.js +1 -1
- package/lib/pages/appointment-demo/input/index.js +3 -3
- package/lib/pages/appointment-demo/popup/index.js +1 -1
- package/lib/pages/group-management/components/input-form/index.js +3 -3
- package/lib/pages/group-management/components/radio/index.js +1 -1
- package/lib/pages/group-management/page-view/importGroupStaff/index.js +1 -1
- package/lib/pages/group-management/tree/index.js +1 -1
- package/lib/pages/home/components/data-list/table/columns/krName.js +3 -1
- package/lib/pages/home/components/data-list/table/columns/okrName.js +4 -2
- package/lib/pages/new-okr-list/header/index.js +15 -15
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +1 -1
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +1 -1
- package/lib/pages/okr-map/level2-search/user.js +1 -0
- package/lib/pages/okr-map/share-dialog/index.js +1 -1
- package/lib/utils/auth.js +2 -2
- package/lib/utils/hooks.js +5 -5
- package/lib/utils/open-data.js +216 -66
- package/lib/utils/tita-okr-cycle.js +3 -3
- package/package.json +2 -1
- package/lib/utils/planDataJson.js +0 -11115
|
@@ -47,7 +47,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
47
47
|
|
|
48
48
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
49
|
|
|
50
|
-
var precls =
|
|
50
|
+
var precls = 'rel-okr-node';
|
|
51
51
|
|
|
52
52
|
function ONode(props) {
|
|
53
53
|
var data = props.data,
|
|
@@ -68,14 +68,14 @@ function ONode(props) {
|
|
|
68
68
|
removeSelected = _useContext.removeSelected;
|
|
69
69
|
|
|
70
70
|
var okrTypeIcon = {
|
|
71
|
-
1:
|
|
72
|
-
2:
|
|
73
|
-
3:
|
|
74
|
-
4:
|
|
71
|
+
1: 'tu-icon-liebiao-geren',
|
|
72
|
+
2: 'tu-icon-liebiao-xiashu',
|
|
73
|
+
3: 'tu-icon-gong_si',
|
|
74
|
+
4: 'tu-icon-liebiao-tuandui'
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
var openOkrDrawer = function openOkrDrawer() {
|
|
78
|
-
_drawerManager["default"].open(
|
|
78
|
+
_drawerManager["default"].open('okrDetail', {
|
|
79
79
|
okrId: data.workId
|
|
80
80
|
}, {
|
|
81
81
|
zIndex: 1350
|
|
@@ -85,7 +85,7 @@ function ONode(props) {
|
|
|
85
85
|
var onCheckHandler = function onCheckHandler(checked) {
|
|
86
86
|
if (checked) {
|
|
87
87
|
addSelected({
|
|
88
|
-
type:
|
|
88
|
+
type: 'okr',
|
|
89
89
|
workId: data.workId,
|
|
90
90
|
krId: 0,
|
|
91
91
|
id: data.feedId,
|
|
@@ -119,7 +119,7 @@ function ONode(props) {
|
|
|
119
119
|
className: (0, _classnames["default"])(okrTypeIcon[data.okrType], "".concat(precls, "__okr-type-icon"))
|
|
120
120
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
121
121
|
onClick: openOkrDrawer
|
|
122
|
-
}, (0, _tools.htmlDecodeByHtmlRegExp)(data.workName))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
122
|
+
}, (0, _openData.parseString)((0, _tools.htmlDecodeByHtmlRegExp)(data.workName)))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
123
123
|
className: "".concat(precls, "__principle")
|
|
124
124
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
125
125
|
text: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
@@ -43,7 +43,7 @@ function WorkNode(props) {
|
|
|
43
43
|
checked = _props$checked === void 0 ? false : _props$checked,
|
|
44
44
|
_props$disabled = props.disabled,
|
|
45
45
|
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
|
46
|
-
var
|
|
46
|
+
var principalUser = data.principalUser;
|
|
47
47
|
|
|
48
48
|
var _useContext = (0, _react.useContext)(_context.Context),
|
|
49
49
|
multiple = _useContext.multiple,
|
|
@@ -58,13 +58,13 @@ function WorkNode(props) {
|
|
|
58
58
|
if (checked) {
|
|
59
59
|
addSelected({
|
|
60
60
|
type: "work",
|
|
61
|
-
workId: data.
|
|
61
|
+
workId: data.workId,
|
|
62
62
|
krId: 0,
|
|
63
|
-
id: data.
|
|
64
|
-
name: data.
|
|
63
|
+
id: data.workId,
|
|
64
|
+
name: data.workName
|
|
65
65
|
});
|
|
66
66
|
} else {
|
|
67
|
-
removeSelected(data.
|
|
67
|
+
removeSelected(data.workId);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
|
|
@@ -87,7 +87,7 @@ function WorkNode(props) {
|
|
|
87
87
|
className: "".concat(precls, "__checkbox")
|
|
88
88
|
}, /*#__PURE__*/_react["default"].createElement(_radio["default"], {
|
|
89
89
|
onChange: onCheckHandler,
|
|
90
|
-
id: data.
|
|
90
|
+
id: data.workId,
|
|
91
91
|
checked: checked
|
|
92
92
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
93
93
|
className: "".concat(precls, "__name")
|
|
@@ -95,16 +95,16 @@ function WorkNode(props) {
|
|
|
95
95
|
className: (0, _classnames["default"])("tu-icon-project-s", "".concat(precls, "__name-icon"))
|
|
96
96
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
97
97
|
onClick: gotoWorkDetail
|
|
98
|
-
}, (0, _tools.htmlDecodeByHtmlRegExp)(data.
|
|
98
|
+
}, (0, _tools.htmlDecodeByHtmlRegExp)(data.workName))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
99
99
|
className: "".concat(precls, "__status")
|
|
100
|
-
}, statusMap[data.
|
|
100
|
+
}, statusMap[data.status]), /*#__PURE__*/_react["default"].createElement("span", {
|
|
101
101
|
className: "".concat(precls, "__principle")
|
|
102
102
|
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
103
|
-
name:
|
|
104
|
-
id:
|
|
103
|
+
name: principalUser.name,
|
|
104
|
+
id: principalUser.userId
|
|
105
105
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
106
106
|
className: "".concat(precls, "__time")
|
|
107
|
-
}, (0, _helper.formatDateStr)(data.startDate), "-", (0, _helper.formatDateStr)(data.
|
|
107
|
+
}, (0, _helper.formatDateStr)(data.startDate), "-", (0, _helper.formatDateStr)(data.endDate)));
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
WorkNode.defaultProps = {
|
|
@@ -33,7 +33,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
33
33
|
|
|
34
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
35
|
|
|
36
|
-
function _extends() { _extends = Object.assign
|
|
36
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
37
37
|
|
|
38
38
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
39
39
|
|
|
@@ -17,7 +17,7 @@ require("./index.css");
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
19
|
|
|
20
|
-
function _extends() { _extends = Object.assign
|
|
20
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
21
|
|
|
22
22
|
var _default = function _default(node, level) {
|
|
23
23
|
switch (node.nodeType) {
|
|
@@ -19,7 +19,7 @@ var _excluded = ["dataSource", "defaultExpandedKeys", "draggable"];
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
21
|
|
|
22
|
-
function _extends() { _extends = Object.assign
|
|
22
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
23
|
|
|
24
24
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
25
25
|
|
|
@@ -21,7 +21,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
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; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign
|
|
24
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
25
|
|
|
26
26
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
27
|
|
|
@@ -25,7 +25,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
-
function _extends() { _extends = Object.assign
|
|
28
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
29
|
|
|
30
30
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31
31
|
|
|
@@ -29,7 +29,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
29
29
|
|
|
30
30
|
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; }
|
|
31
31
|
|
|
32
|
-
function _extends() { _extends = Object.assign
|
|
32
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
33
33
|
|
|
34
34
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
35
|
|
|
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
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; }
|
|
17
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
20
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
21
21
|
|
|
@@ -21,7 +21,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
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; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign
|
|
24
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
25
|
|
|
26
26
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
27
|
|
|
@@ -13,7 +13,7 @@ var _getLocale = require("../../../utils/getLocale");
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
|
|
16
|
-
function _extends() { _extends = Object.assign
|
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
17
|
|
|
18
18
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
19
|
|
|
@@ -19,7 +19,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
19
19
|
|
|
20
20
|
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); }
|
|
21
21
|
|
|
22
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
22
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
23
|
|
|
24
24
|
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); }; }
|
|
25
25
|
|
|
@@ -29,7 +29,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
29
29
|
|
|
30
30
|
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; } }
|
|
31
31
|
|
|
32
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
32
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
33
33
|
|
|
34
34
|
var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
35
35
|
_inherits(ErrorBoundary, _React$Component);
|
|
@@ -15,7 +15,7 @@ require("./index.css");
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
20
|
function _default(props) {
|
|
21
21
|
return /*#__PURE__*/_react["default"].createElement(_rcTooltip["default"], _extends({}, props, {
|
|
@@ -15,13 +15,18 @@ require("./index.css");
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
20
|
function _default(props) {
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
var align = props.align,
|
|
22
|
+
placement = props.placement;
|
|
23
|
+
|
|
24
|
+
if (placement === "top" && !align) {
|
|
25
|
+
align = {
|
|
26
|
+
offset: [0, 5]
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
return /*#__PURE__*/_react["default"].createElement(_rcTooltip["default"], _extends({}, props, {
|
|
26
31
|
align: align,
|
|
27
32
|
transitionName: props.transitionName || "tita-common-fade"
|
|
@@ -20,7 +20,7 @@ var _precls = _interopRequireDefault(require("./precls"));
|
|
|
20
20
|
|
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
22
22
|
|
|
23
|
-
function _extends() { _extends = Object.assign
|
|
23
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
24
24
|
|
|
25
25
|
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; }
|
|
26
26
|
|
|
@@ -31,7 +31,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
31
31
|
|
|
32
32
|
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); }
|
|
33
33
|
|
|
34
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
34
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
35
|
|
|
36
36
|
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); }; }
|
|
37
37
|
|
|
@@ -41,7 +41,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
41
41
|
|
|
42
42
|
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; } }
|
|
43
43
|
|
|
44
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
44
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
45
45
|
|
|
46
46
|
var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
47
47
|
_inherits(UploadedPreview, _PureComponent);
|
|
@@ -84,7 +84,7 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
84
84
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
85
85
|
className: "tu-icon-canceled action-icon action-icon-delete",
|
|
86
86
|
onMouseDown: function onMouseDown() {
|
|
87
|
-
return onSubmit(index,
|
|
87
|
+
return onSubmit(index, 'cancel');
|
|
88
88
|
}
|
|
89
89
|
})));
|
|
90
90
|
}
|
|
@@ -94,24 +94,24 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
94
94
|
if (smallImageUrl && deleteable) {
|
|
95
95
|
// 是图片且能删除
|
|
96
96
|
return [/*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
97
|
-
content: (0, _getLocale.getLocale)(
|
|
97
|
+
content: (0, _getLocale.getLocale)('Mod_Preview'),
|
|
98
98
|
container: document.body
|
|
99
99
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
100
100
|
className: "upload-file-action-wrapper"
|
|
101
101
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
102
102
|
className: "tu-icon-yulan action-icon",
|
|
103
103
|
onMouseDown: function onMouseDown() {
|
|
104
|
-
return onSubmit(index,
|
|
104
|
+
return onSubmit(index, 'preview');
|
|
105
105
|
}
|
|
106
106
|
}))), /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
107
|
-
content: (0, _getLocale.getLocale)(
|
|
107
|
+
content: (0, _getLocale.getLocale)('Mod_Delete'),
|
|
108
108
|
container: document.body
|
|
109
109
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
110
110
|
className: "upload-file-action-wrapper"
|
|
111
111
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
112
112
|
className: "tu-icon-canceled action-icon delete",
|
|
113
113
|
onMouseDown: function onMouseDown() {
|
|
114
|
-
return onSubmit(index,
|
|
114
|
+
return onSubmit(index, 'delete');
|
|
115
115
|
}
|
|
116
116
|
})))];
|
|
117
117
|
}
|
|
@@ -119,14 +119,14 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
119
119
|
if (!smallImageUrl && deleteable) {
|
|
120
120
|
// 不是图片但能删除
|
|
121
121
|
return /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
122
|
-
content: (0, _getLocale.getLocale)(
|
|
122
|
+
content: (0, _getLocale.getLocale)('Mod_Delete'),
|
|
123
123
|
container: document.body
|
|
124
124
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
125
125
|
className: "upload-file-action-wrapper"
|
|
126
126
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
127
127
|
className: "tu-icon-canceled action-icon delete",
|
|
128
128
|
onMouseDown: function onMouseDown() {
|
|
129
|
-
return onSubmit(index,
|
|
129
|
+
return onSubmit(index, 'delete');
|
|
130
130
|
}
|
|
131
131
|
})));
|
|
132
132
|
}
|
|
@@ -134,14 +134,14 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
134
134
|
if (smallImageUrl && !deleteable) {
|
|
135
135
|
// 是图片不能删除
|
|
136
136
|
return /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
137
|
-
content: (0, _getLocale.getLocale)(
|
|
137
|
+
content: (0, _getLocale.getLocale)('Mod_Preview'),
|
|
138
138
|
container: document.body
|
|
139
139
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
140
140
|
className: "upload-file-action-wrapper"
|
|
141
141
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
142
142
|
className: "tu-icon-magnifier-circle action-icon",
|
|
143
143
|
onMouseDown: function onMouseDown() {
|
|
144
|
-
return onSubmit(index,
|
|
144
|
+
return onSubmit(index, 'preview');
|
|
145
145
|
}
|
|
146
146
|
})));
|
|
147
147
|
} // 不是图片也不能删除
|
|
@@ -152,14 +152,14 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
152
152
|
|
|
153
153
|
if (uploadStatus === 5) {
|
|
154
154
|
return /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
155
|
-
content: (0, _getLocale.getLocale)(
|
|
155
|
+
content: (0, _getLocale.getLocale)('Mod_Delete'),
|
|
156
156
|
container: document.body
|
|
157
157
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
158
158
|
className: "upload-file-action-wrapper"
|
|
159
159
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
160
160
|
className: "tu-icon-canceled action-icon delete",
|
|
161
161
|
onMouseDown: function onMouseDown() {
|
|
162
|
-
return onSubmit(index,
|
|
162
|
+
return onSubmit(index, 'delete');
|
|
163
163
|
}
|
|
164
164
|
})));
|
|
165
165
|
} // 4:上传失败
|
|
@@ -173,17 +173,17 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
173
173
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
174
174
|
className: "tu-icon-gengxin1 action-icon",
|
|
175
175
|
onMouseDown: function onMouseDown() {
|
|
176
|
-
return onSubmit(index,
|
|
176
|
+
return onSubmit(index, 'reupload');
|
|
177
177
|
}
|
|
178
178
|
}))), /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
179
|
-
content: (0, _getLocale.getLocale)(
|
|
179
|
+
content: (0, _getLocale.getLocale)('Mod_Delete'),
|
|
180
180
|
container: document.body
|
|
181
181
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
182
182
|
className: "upload-file-action-wrapper"
|
|
183
183
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
184
184
|
className: "tu-icon-canceled action-icon delete",
|
|
185
185
|
onMouseDown: function onMouseDown() {
|
|
186
|
-
return onSubmit(index,
|
|
186
|
+
return onSubmit(index, 'delete');
|
|
187
187
|
}
|
|
188
188
|
}))));
|
|
189
189
|
};
|
|
@@ -205,7 +205,7 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
205
205
|
uploadResultItem = _this$props.uploadResultItem,
|
|
206
206
|
index = _this$props.index;
|
|
207
207
|
return /*#__PURE__*/_react["default"].createElement(_style.PreviewContent, {
|
|
208
|
-
className: [
|
|
208
|
+
className: ['preview__content document-mouse-event-ignore', className].join(' ')
|
|
209
209
|
}, /*#__PURE__*/_react["default"].createElement(_style.PreviewImageWrapper, null, this.renderPreviewThumbnail()), /*#__PURE__*/_react["default"].createElement(_style.PreviewMessageWrapper, null, /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
210
210
|
content: uploadResultItem.FileName,
|
|
211
211
|
container: document.body
|
|
@@ -218,8 +218,8 @@ var UploadedPreview = /*#__PURE__*/function (_PureComponent) {
|
|
|
218
218
|
},
|
|
219
219
|
className: "upload-file--progress"
|
|
220
220
|
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
221
|
-
className: uploadResultItem.uploadStatus === 3 || uploadResultItem.uploadStatus === 2 ?
|
|
222
|
-
}, uploadResultItem.uploadStatus === 3 || uploadResultItem.uploadStatus === 2 ? (0, _util.getFileSize)(uploadResultItem.FileSize) : uploadResultItem.Msg)))), /*#__PURE__*/_react["default"].createElement(_style.PreviewOptionsWrapper, null, this.dealPreviewOptions(uploadResultItem.uploadStatus, index, uploadResultItem.Deleteable, uploadResultItem.SmallImageUrl),
|
|
221
|
+
className: uploadResultItem.uploadStatus === 3 || uploadResultItem.uploadStatus === 2 ? 'upload-file-size' : 'upload-file-size upload-file-size--error'
|
|
222
|
+
}, uploadResultItem.uploadStatus === 3 || uploadResultItem.uploadStatus === 2 ? (0, _util.getFileSize)(uploadResultItem.FileSize) : uploadResultItem.Msg)))), /*#__PURE__*/_react["default"].createElement(_style.PreviewOptionsWrapper, null, this.dealPreviewOptions(uploadResultItem.uploadStatus, index, uploadResultItem.Deleteable, uploadResultItem.SmallImageUrl), ' '));
|
|
223
223
|
}
|
|
224
224
|
}]);
|
|
225
225
|
|
|
@@ -63,7 +63,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
63
63
|
|
|
64
64
|
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); }
|
|
65
65
|
|
|
66
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
66
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
67
67
|
|
|
68
68
|
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); }; }
|
|
69
69
|
|
|
@@ -73,7 +73,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
73
73
|
|
|
74
74
|
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; } }
|
|
75
75
|
|
|
76
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
76
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
77
77
|
|
|
78
78
|
var Upload = /*#__PURE__*/function (_PureComponent) {
|
|
79
79
|
_inherits(Upload, _PureComponent);
|
|
@@ -99,7 +99,7 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
|
|
|
99
99
|
|
|
100
100
|
if (fileInput) {
|
|
101
101
|
// @ts-ignore
|
|
102
|
-
fileInput.value =
|
|
102
|
+
fileInput.value = '';
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
|
|
@@ -161,7 +161,7 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
|
|
|
161
161
|
var uploadStartFile = null;
|
|
162
162
|
var timestamp = new Date().getTime(); // 给每个文件加一个时间戳
|
|
163
163
|
|
|
164
|
-
var uploadFileType = element.name.substring(element.name.lastIndexOf(
|
|
164
|
+
var uploadFileType = element.name.substring(element.name.lastIndexOf('.') + 1);
|
|
165
165
|
uploadStartFile = {
|
|
166
166
|
FileName: element.name,
|
|
167
167
|
FileType: (0, _type._dealAttachmentType)(uploadFileType).FileType,
|
|
@@ -173,17 +173,17 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
|
|
|
173
173
|
// 开始上传
|
|
174
174
|
IsSuccess: false,
|
|
175
175
|
uid: (0, _uuid["default"])(),
|
|
176
|
-
_smallImageUrl:
|
|
177
|
-
_bigImageUrl:
|
|
178
|
-
MediaType:
|
|
176
|
+
_smallImageUrl: '',
|
|
177
|
+
_bigImageUrl: '',
|
|
178
|
+
MediaType: '',
|
|
179
179
|
UserId: 0,
|
|
180
180
|
MaxDocCount: 0,
|
|
181
|
-
DfsPath:
|
|
182
|
-
ClientUrl:
|
|
183
|
-
SmallImageUrl:
|
|
184
|
-
BigImageUrl:
|
|
185
|
-
DownloadUrl:
|
|
186
|
-
Msg:
|
|
181
|
+
DfsPath: '',
|
|
182
|
+
ClientUrl: '',
|
|
183
|
+
SmallImageUrl: '',
|
|
184
|
+
BigImageUrl: '',
|
|
185
|
+
DownloadUrl: '',
|
|
186
|
+
Msg: '',
|
|
187
187
|
AllowUploadAttachmentSize: 50,
|
|
188
188
|
Deleteable: true,
|
|
189
189
|
requestXHR: new XMLHttpRequest() // 在这创建是为了取消用
|
|
@@ -202,7 +202,7 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
|
|
|
202
202
|
_this._dealUploadStart(uploadStartFiles); // 处理开始上传的文件
|
|
203
203
|
|
|
204
204
|
|
|
205
|
-
formData.append(
|
|
205
|
+
formData.append('file', element);
|
|
206
206
|
var url = action || (0, _requestV.getApiUrl)("Upload/PostFiles?format=json×tamp=".concat(timestamp));
|
|
207
207
|
|
|
208
208
|
_this._dealUploadXHRRequest(formData, url, uploadStartFile);
|
|
@@ -213,7 +213,7 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
|
|
|
213
213
|
if (uploadStartFile.FileSize > _this.props.fileSizeLimit * 1024 * 1024) {
|
|
214
214
|
setTimeout(function () {
|
|
215
215
|
_this._dealUploadSuccess(_objectSpread(_objectSpread({}, uploadStartFile), {
|
|
216
|
-
Msg:
|
|
216
|
+
Msg: '上传失败,文件过大',
|
|
217
217
|
IsImage: false,
|
|
218
218
|
uploadStatus: 5
|
|
219
219
|
}));
|
|
@@ -283,7 +283,7 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
|
|
|
283
283
|
item.uploadStatus = 4; // 上传失败
|
|
284
284
|
|
|
285
285
|
item.percentComplete = Math.round(evt.loaded * 100 / evt.total);
|
|
286
|
-
item.Msg =
|
|
286
|
+
item.Msg = '网络异常,请重新上传';
|
|
287
287
|
}
|
|
288
288
|
});
|
|
289
289
|
|
|
@@ -292,7 +292,7 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
|
|
|
292
292
|
});
|
|
293
293
|
};
|
|
294
294
|
|
|
295
|
-
xhr.open(
|
|
295
|
+
xhr.open('POST', url, true);
|
|
296
296
|
xhr.send(formData); // 开始上传,发送form数据
|
|
297
297
|
};
|
|
298
298
|
|
|
@@ -377,12 +377,12 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
|
|
|
377
377
|
onSubmit = _this$props2.onSubmit,
|
|
378
378
|
onDelete = _this$props2.onDelete;
|
|
379
379
|
|
|
380
|
-
if (options ===
|
|
380
|
+
if (options === 'cancel') {
|
|
381
381
|
var reUploadFileInfo = _this.state.uploadSuccessFiles[index];
|
|
382
382
|
reUploadFileInfo.requestXHR.abort();
|
|
383
383
|
}
|
|
384
384
|
|
|
385
|
-
if (options ===
|
|
385
|
+
if (options === 'delete' || options === 'cancel') {
|
|
386
386
|
var uploadResultFiles = _toConsumableArray(_this.state.uploadSuccessFiles);
|
|
387
387
|
|
|
388
388
|
var deleteFiles = uploadResultFiles[index];
|
|
@@ -398,11 +398,11 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
|
|
|
398
398
|
_this.setState({
|
|
399
399
|
uploadSuccessFiles: uploadResultFiles
|
|
400
400
|
});
|
|
401
|
-
} else if (options ===
|
|
401
|
+
} else if (options === 'preview') {
|
|
402
402
|
var imgIndex = _this.getImgIndex(index);
|
|
403
403
|
|
|
404
404
|
_this.refs.imgViewerRef.show(imgIndex);
|
|
405
|
-
} else if (options ===
|
|
405
|
+
} else if (options === 'reupload') {
|
|
406
406
|
var _reUploadFileInfo = _this.state.uploadSuccessFiles[index];
|
|
407
407
|
var reUploadFile = _this.state.selectFiles[_reUploadFileInfo.FileName];
|
|
408
408
|
|
|
@@ -493,7 +493,7 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
|
|
|
493
493
|
className = _this$props3.className,
|
|
494
494
|
style = _this$props3.style,
|
|
495
495
|
_this$props3$attachme = _this$props3.attachmentTipText,
|
|
496
|
-
attachmentTipText = _this$props3$attachme === void 0 ? (0, _getLocale.getLocale)(
|
|
496
|
+
attachmentTipText = _this$props3$attachme === void 0 ? (0, _getLocale.getLocale)('OKR_MyO_KRP_Draganddropu') : _this$props3$attachme;
|
|
497
497
|
var uploadSuccessFiles = this.state.uploadSuccessFiles;
|
|
498
498
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
499
499
|
container: document.body,
|
|
@@ -511,7 +511,7 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
|
|
|
511
511
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
512
512
|
ref: "uploader-trigger",
|
|
513
513
|
style: {
|
|
514
|
-
cursor:
|
|
514
|
+
cursor: 'pointer'
|
|
515
515
|
}
|
|
516
516
|
}, children), /*#__PURE__*/_react["default"].createElement("input", {
|
|
517
517
|
type: "file",
|
|
@@ -519,7 +519,7 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
|
|
|
519
519
|
className: "upload_file_input",
|
|
520
520
|
multiple: this.props.multiple,
|
|
521
521
|
style: {
|
|
522
|
-
display:
|
|
522
|
+
display: 'none'
|
|
523
523
|
},
|
|
524
524
|
onChange: this.onFileInputChange
|
|
525
525
|
}))), this.renderUploadList(uploadSuccessFiles));
|
|
@@ -535,7 +535,7 @@ Upload.defaultProps = {
|
|
|
535
535
|
fileSizeLimit: 50,
|
|
536
536
|
filesTotal: 50,
|
|
537
537
|
multiple: true,
|
|
538
|
-
attachmentPreviewBox:
|
|
538
|
+
attachmentPreviewBox: 'MBlog__attachmentViewBox'
|
|
539
539
|
};
|
|
540
540
|
var _default = Upload;
|
|
541
541
|
exports["default"] = _default;
|