@titaui/pc 1.12.13-beta.1 → 1.12.15
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/communication/index.js +6 -0
- package/lib/components/dialog-confirm/index.css +0 -1
- package/lib/components/dialog-confirm/index.js +3 -5
- package/lib/components/drawer/index.css +9 -0
- package/lib/components/drawer/index.js +11 -8
- package/lib/components/dynamic/dynamic-item/components/header/index.js +5 -1
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/index.css +0 -1
- package/lib/components/dynamic/dynamic-item/index.js +14 -19
- package/lib/components/dynamic/dynamic-list/index.js +19 -2
- package/lib/components/form/form-fields/date/index.js +13 -13
- package/lib/components/menus/components/menu-tree/tree-node/index.css +0 -120
- package/lib/components/menus/components/menu-tree/tree-node/index.js +2 -22
- 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/okr-menus/menus.js +6 -3
- package/lib/components/menus/i18n.js +0 -8
- package/lib/components/menus/index.js +0 -6
- package/lib/components/menus/request-apis.js +2 -8
- 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/{import-modal/import-okr-modal → nav-top/components/app-center}/index.js +104 -84
- package/lib/components/nav-top/components/menu/index.js +3 -7
- 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/components/header/o-avatar.js +6 -0
- 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 +81 -44
- package/lib/components/okr-flow/export-modal/trans1.png +0 -0
- 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/date-body.js +19 -31
- package/lib/components/picker/components/panels/date-panel/date-head.js +8 -8
- package/lib/components/picker/components/panels/date-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/index.css +0 -5
- package/lib/components/picker/components/panels/month-panel/index.js +4 -34
- package/lib/components/picker/components/panels/month-panel/month-body.js +5 -4
- package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
- package/lib/components/picker/components/panels/year-panel/index.css +0 -5
- package/lib/components/picker/components/panels/year-panel/index.js +3 -34
- package/lib/components/picker/components/panels/year-panel/year-body.js +3 -10
- package/lib/components/picker/components/picker-trigger/index.css +1 -6
- package/lib/components/picker/components/picker-trigger/index.js +11 -16
- package/lib/components/picker/context.js +2 -17
- package/lib/components/picker/index.css +1 -29
- package/lib/components/picker/index.js +0 -3
- package/lib/components/picker/picker-panels.js +61 -98
- package/lib/components/picker/picker.js +30 -44
- package/lib/components/picker/utils.js +11 -168
- package/lib/components/rich-editor/schemas/list.js +1 -0
- package/lib/components/search-input/index.js +0 -5
- package/lib/components/select-layer/index.js +22 -8
- package/lib/components/select-tags/index.js +1 -7
- package/lib/components/task-relation-modal/helper.js +1 -56
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +1 -4
- package/lib/components/task-relation-modal/okr-relation/request-api.js +2 -6
- 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/work-node/index.js +11 -11
- package/lib/components/textarea/index.js +5 -7
- package/lib/components/tooltip/tooltip.js +9 -4
- package/lib/components/user-selector/category-selector-panel/depart-tree.js +3 -1
- 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 +21 -3
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.css +1 -1
- package/lib/components/user-selector/request-apis.js +39 -9
- package/lib/components/user-selector/searched-panel/index.js +7 -1
- package/lib/index.js +0 -56
- package/lib/pages/aha2021/index.js +5 -5
- package/lib/pages/aha2021/new-menu-switcher/index.css +40 -0
- package/lib/{components/import-modal/radio.js → pages/aha2021/new-menu-switcher/index.js} +42 -23
- 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/okr-map/level2-search/user.js +1 -0
- package/lib/utils/bs-global.js +1 -1
- package/lib/utils/constant.js +2 -14
- package/lib/utils/helpers.js +11 -56
- package/package.json +1 -2
- package/lib/components/attachments-preview/index.css +0 -11
- package/lib/components/attachments-preview/index.js +0 -112
- package/lib/components/auto-save/img/failed.svg +0 -17
- package/lib/components/auto-save/img/success.svg +0 -16
- package/lib/components/auto-save/index.css +0 -39
- package/lib/components/auto-save/index.js +0 -78
- package/lib/components/auto-save/interface.js +0 -5
- package/lib/components/color-date-picker/index.css +0 -72
- package/lib/components/color-date-picker/index.js +0 -129
- package/lib/components/color-date-picker/interface.js +0 -14
- package/lib/components/dialog-upload/img/doc.svg +0 -1
- package/lib/components/dialog-upload/img/other.svg +0 -1
- package/lib/components/dialog-upload/img/pdf.svg +0 -1
- package/lib/components/dialog-upload/img/ppt.svg +0 -1
- package/lib/components/dialog-upload/img/radio.svg +0 -1
- package/lib/components/dialog-upload/img/video.svg +0 -1
- package/lib/components/dialog-upload/img/xls.svg +0 -1
- package/lib/components/dialog-upload/index.css +0 -77
- package/lib/components/dialog-upload/index.js +0 -330
- package/lib/components/dialog-upload/type.js +0 -35
- package/lib/components/dialog-upload/uploaded-preview.css +0 -77
- package/lib/components/dialog-upload/uploaded-preview.js +0 -132
- package/lib/components/dialog-upload/util.js +0 -131
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/api.js +0 -27
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/encourage.js +0 -119
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/APP-shoucang-m.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/ascore.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curEfforts.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curGood.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curGreat.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/efforts.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/good.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/great.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/halfscore.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/loading.gif +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/score.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/top.svg +0 -14
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.css +0 -75
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.js +0 -195
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/rate.js +0 -143
- package/lib/components/dynamic/dynamic-item/components/header/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/constant.js +0 -31
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.css +0 -170
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +0 -151
- package/lib/components/dynamic/dynamic-item/components/okr-progress/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/okr-progress/request-api.js +0 -10
- package/lib/components/dynamic/dynamic-item/components/okr-progress/utils.js +0 -10
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.css +0 -8
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.js +0 -26
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.css +0 -8
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.js +0 -26
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.css +0 -197
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.js +0 -220
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/request-api.js +0 -20
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/util.js +0 -134
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.css +0 -10
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.js +0 -60
- package/lib/components/dynamic/dynamic-item/components/progress/index.css +0 -25
- package/lib/components/dynamic/dynamic-item/components/progress/index.js +0 -71
- package/lib/components/dynamic/dynamic-item/components/progress/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/schedule/index.css +0 -31
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +0 -59
- package/lib/components/dynamic/dynamic-item/components/schedule/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/summary-header/constant.js +0 -45
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.css +0 -166
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +0 -360
- package/lib/components/dynamic/dynamic-item/components/summary-header/operate-record.js +0 -49
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.css +0 -24
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.js +0 -52
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.css +0 -50
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +0 -65
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/task-progress/constant.js +0 -16
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +0 -201
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +0 -169
- package/lib/components/dynamic/dynamic-item/components/task-progress/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +0 -27
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/come-on-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/come-on-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/evaluate-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/nice-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/nice-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/very-good-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/very-good-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.css +0 -68
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +0 -50
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +0 -43
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +0 -87
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +0 -45
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +0 -171
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +0 -231
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +0 -30
- package/lib/components/import-modal/helper.js +0 -179
- package/lib/components/import-modal/image/loading.gif +0 -0
- package/lib/components/import-modal/import-okr-modal/index.css +0 -18
- package/lib/components/import-modal/import-task-modal/index.css +0 -18
- package/lib/components/import-modal/import-task-modal/index.js +0 -241
- package/lib/components/import-modal/import-task-modal/search-form.js +0 -135
- package/lib/components/import-modal/index.css +0 -30
- package/lib/components/import-modal/index.js +0 -20
- package/lib/components/import-modal/request-api.js +0 -204
- package/lib/components/import-modal/search/category-select.js +0 -74
- package/lib/components/import-modal/search/okr-classify-select.js +0 -74
- package/lib/components/import-modal/search/okr-status-select.js +0 -74
- package/lib/components/import-modal/search/okr-type-select.js +0 -87
- package/lib/components/import-modal/search/principal.js +0 -135
- package/lib/components/import-modal/search/relation.js +0 -80
- package/lib/components/import-modal/search/search-dropdown/index.css +0 -50
- package/lib/components/import-modal/search/search-dropdown/index.js +0 -32
- package/lib/components/import-modal/search/task-relation.js +0 -83
- package/lib/components/import-modal/search/task-status-select.js +0 -87
- package/lib/components/import-modal/search/work-relation.js +0 -83
- package/lib/components/import-modal/search/work-status-select.js +0 -74
- package/lib/components/import-modal/tree/okr-tree/index.css +0 -61
- package/lib/components/import-modal/tree/okr-tree/index.js +0 -267
- package/lib/components/import-modal/tree/okr-tree/search-form.js +0 -169
- package/lib/components/import-modal/tree/task-work-tree/index.css +0 -123
- package/lib/components/import-modal/tree/task-work-tree/index.js +0 -187
- package/lib/components/import-modal/tree-node/index.css +0 -0
- package/lib/components/import-modal/tree-node/index.js +0 -51
- package/lib/components/import-modal/tree-node/kr-node/index.css +0 -58
- package/lib/components/import-modal/tree-node/kr-node/index.js +0 -108
- package/lib/components/import-modal/tree-node/milestone-node/index.css +0 -61
- package/lib/components/import-modal/tree-node/milestone-node/index.js +0 -118
- package/lib/components/import-modal/tree-node/o-node/index.css +0 -46
- package/lib/components/import-modal/tree-node/o-node/index.js +0 -138
- package/lib/components/import-modal/tree-node/work-node/index.css +0 -51
- package/lib/components/import-modal/tree-node/work-node/index.js +0 -108
- package/lib/components/menus/components/menu-tree/images/summary-menu/caidan-enjoy.svg +0 -14
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-setup.svg +0 -18
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-zongjie.svg +0 -15
- package/lib/components/menus/components/menu-tree/images/summary-menu/zongjie-s.svg +0 -15
- package/lib/components/menus/components/menu-tree/tree-node/subordinates.js +0 -78
- package/lib/components/menus/components/menu-tree/tree-node/summary-share.js +0 -78
- package/lib/components/menus/export-modules/summary-menus/depart-menus/helper.js +0 -56
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.css +0 -32
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +0 -231
- package/lib/components/menus/export-modules/summary-menus/index.css +0 -9
- package/lib/components/menus/export-modules/summary-menus/index.js +0 -134
- package/lib/components/menus/export-modules/summary-menus/menu-highlight.js +0 -76
- package/lib/components/menus/export-modules/summary-menus/menus.js +0 -190
- package/lib/components/menus/export-modules/summary-menus/request-api.js +0 -17
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +0 -242
- package/lib/components/new-confidence/constant.js +0 -53
- package/lib/components/new-confidence/img/1.svg +0 -40
- package/lib/components/new-confidence/img/10.svg +0 -33
- package/lib/components/new-confidence/img/2.svg +0 -40
- package/lib/components/new-confidence/img/3.svg +0 -40
- package/lib/components/new-confidence/img/4.svg +0 -40
- package/lib/components/new-confidence/img/5.svg +0 -40
- package/lib/components/new-confidence/img/6.svg +0 -40
- package/lib/components/new-confidence/img/7.svg +0 -40
- package/lib/components/new-confidence/img/8.svg +0 -40
- package/lib/components/new-confidence/img/9.svg +0 -40
- package/lib/components/new-confidence/index.css +0 -62
- package/lib/components/new-confidence/index.js +0 -115
- package/lib/components/new-confidence/interface.js +0 -5
- package/lib/components/picker/components/cross.svg +0 -17
- package/lib/components/picker/components/panels/week-panel/index.css +0 -42
- package/lib/components/picker/components/panels/week-panel/index.js +0 -49
- package/lib/components/picker/components/panels/week-panel/utils.js +0 -124
- package/lib/components/picker/components/panels/week-panel/week-body.js +0 -71
- package/lib/components/picker/components/panels/week-panel/week-head.js +0 -80
- package/lib/components/picker/range-picker/components/picker-trigger/index.css +0 -97
- package/lib/components/picker/range-picker/components/picker-trigger/index.js +0 -109
- package/lib/components/picker/range-picker/components/placeholder/index.js +0 -91
- package/lib/components/picker/range-picker/components/select-input/index.js +0 -72
- package/lib/components/picker/range-picker/components/shortcuts/index.js +0 -45
- package/lib/components/picker/range-picker/index.css +0 -158
- package/lib/components/picker/range-picker/index.js +0 -263
- package/lib/components/promise-confirm/index.css +0 -0
- package/lib/components/promise-confirm/index.js +0 -117
- package/lib/components/promise-confirm/interface.js +0 -5
- package/lib/components/rate/index.css +0 -111
- package/lib/components/rate/index.js +0 -52
- package/lib/components/regulation-setting-item/index.css +0 -33
- package/lib/components/regulation-setting-item/index.js +0 -37
- package/lib/components/rich-editor-at/components/index.css +0 -66
- package/lib/components/rich-editor-at/components/index.js +0 -188
- package/lib/components/rich-editor-at/index.css +0 -40
- package/lib/components/rich-editor-at/index.js +0 -113
- package/lib/components/rich-editor-upload/index.css +0 -11
- package/lib/components/rich-editor-upload/index.js +0 -87
- package/lib/components/write-summary-modal/index.css +0 -79
- package/lib/components/write-summary-modal/index.js +0 -167
- package/lib/components/write-summary-modal/interface.js +0 -19
- package/lib/components/write-summary-modal/request-api.js +0 -18
- package/lib/components/write-summary-modal/utils.js +0 -31
- package/lib/utils/planDataJson.js +0 -11115
|
@@ -11,8 +11,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var _contactKefu = _interopRequireDefault(require("../../components/contact-kefu"));
|
|
15
|
-
|
|
16
14
|
var _navTop = _interopRequireDefault(require("../../components/nav-top"));
|
|
17
15
|
|
|
18
16
|
var _followerVisitor = _interopRequireDefault(require("../../components/follower-visitor"));
|
|
@@ -37,10 +35,12 @@ var _errorBoundary = _interopRequireDefault(require("../../components/error-boun
|
|
|
37
35
|
|
|
38
36
|
var _errorLevel = _interopRequireDefault(require("../../utils/error-level"));
|
|
39
37
|
|
|
40
|
-
require("./index.css");
|
|
41
|
-
|
|
42
38
|
var _hooks = _interopRequireDefault(require("../../utils/hooks"));
|
|
43
39
|
|
|
40
|
+
var _newMenuSwitcher = _interopRequireDefault(require("./new-menu-switcher"));
|
|
41
|
+
|
|
42
|
+
require("./index.css");
|
|
43
|
+
|
|
44
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
45
45
|
|
|
46
46
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -103,7 +103,7 @@ function PageLayout(props) {
|
|
|
103
103
|
}
|
|
104
104
|
}, children), !isTencentHr && /*#__PURE__*/_react["default"].createElement("div", {
|
|
105
105
|
className: (0, _classnames["default"])("".concat(preCls, "__help"))
|
|
106
|
-
}, /*#__PURE__*/_react["default"].createElement(_helpCard["default"], null)),
|
|
106
|
+
}, /*#__PURE__*/_react["default"].createElement(_helpCard["default"], null)), /*#__PURE__*/_react["default"].createElement(_newMenuSwitcher["default"], null), isTrial && !isTencentHr && /*#__PURE__*/_react["default"].createElement("div", {
|
|
107
107
|
className: "".concat(preCls, "__invite")
|
|
108
108
|
}, /*#__PURE__*/_react["default"].createElement(_invitePeople["default"], null)), isTencentHr && /*#__PURE__*/_react["default"].createElement(_hrMessage["default"], null), /*#__PURE__*/_react["default"].createElement(_errorBoundary["default"], {
|
|
109
109
|
errorLevel: _errorLevel["default"].P0,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.new-menu-switcher {
|
|
2
|
+
position: fixed;
|
|
3
|
+
bottom: 74px;
|
|
4
|
+
right: 24px;
|
|
5
|
+
z-index: 2;
|
|
6
|
+
font-size: 28px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.new-menu-switcher__new-version, .new-menu-switcher__old-version {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
width: 42px;
|
|
12
|
+
height: 42px;
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
line-height: 42px;
|
|
15
|
+
text-align: center;
|
|
16
|
+
border-radius: 100px;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
transition: width 0.3s;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.new-menu-switcher__new-version--full, .new-menu-switcher__old-version--full {
|
|
24
|
+
width: 108px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.new-menu-switcher__new-version {
|
|
28
|
+
color: #fff;
|
|
29
|
+
box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2), inset 0px 0px 6px 2px rgba(255, 255, 255, 0.5);
|
|
30
|
+
background: url(./new-menu-bg.png) no-repeat;
|
|
31
|
+
background-color: linear-gradient(135deg, #ffc726 0%, #f69300 100%);
|
|
32
|
+
background-position: right bottom;
|
|
33
|
+
background-size: cover;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.new-menu-switcher__old-version {
|
|
37
|
+
color: #141c28;
|
|
38
|
+
background: #fff;
|
|
39
|
+
box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2), inset 0px 0px 6px 2px rgba(255, 255, 255, 0.5);
|
|
40
|
+
}
|
|
@@ -5,13 +5,15 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _requestApi = require("../request-api");
|
|
15
|
+
|
|
16
|
+
require("./index.css");
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
19
|
|
|
@@ -33,30 +35,47 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
33
35
|
|
|
34
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
var precls = "new-menu-switcher";
|
|
39
|
+
|
|
40
|
+
var NewMenuSwitcher = function NewMenuSwitcher() {
|
|
41
|
+
var _useState = (0, _react.useState)(window.BSGlobal.isUseNewMenu),
|
|
42
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
43
|
+
isNewMenu = _useState2[0];
|
|
40
44
|
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
46
|
-
checked = _useState2[0],
|
|
47
|
-
setChecked = _useState2[1];
|
|
45
|
+
var _useState3 = (0, _react.useState)(!window.BSGlobal.isUseNewMenu),
|
|
46
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
47
|
+
showFullTip = _useState4[0],
|
|
48
|
+
setShowFullTip = _useState4[1];
|
|
48
49
|
|
|
49
50
|
(0, _react.useEffect)(function () {
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
setTimeout(function () {
|
|
52
|
+
setShowFullTip(false);
|
|
53
|
+
}, 3000);
|
|
54
|
+
}, []);
|
|
55
|
+
|
|
56
|
+
var changeMenuVersion = function changeMenuVersion() {
|
|
57
|
+
(0, _requestApi.setMenuVersion)(window.BSGlobal.isUseNewMenu ? 0 : 1).then(function () {
|
|
58
|
+
window.location.href = "/";
|
|
59
|
+
});
|
|
60
|
+
}; // 当租户开启新菜单时,不允许员工切换菜单版本
|
|
52
61
|
|
|
53
|
-
var onClickHandler = function onClickHandler() {
|
|
54
|
-
setChecked(!checked);
|
|
55
|
-
onChange && onChange(!checked, id);
|
|
56
|
-
};
|
|
57
62
|
|
|
63
|
+
if (!window.BSGlobal.isShowSwitchMenu) return null;
|
|
58
64
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
className: precls,
|
|
66
|
+
onClick: changeMenuVersion,
|
|
67
|
+
onMouseEnter: function onMouseEnter() {
|
|
68
|
+
return setShowFullTip(true);
|
|
69
|
+
},
|
|
70
|
+
onMouseLeave: function onMouseLeave() {
|
|
71
|
+
return setShowFullTip(false);
|
|
72
|
+
}
|
|
73
|
+
}, isNewMenu && /*#__PURE__*/_react["default"].createElement("span", {
|
|
74
|
+
className: (0, _classnames["default"])("".concat(precls, "__old-version"), _defineProperty({}, "".concat(precls, "__old-version--full"), showFullTip))
|
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, showFullTip ? "返回旧版导航" : "旧版")), !isNewMenu && /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
|
+
className: (0, _classnames["default"])("".concat(precls, "__new-version"), _defineProperty({}, "".concat(precls, "__new-version--full"), showFullTip))
|
|
77
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, showFullTip ? "体验新版导航" : "新版")));
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var _default = NewMenuSwitcher;
|
|
81
|
+
exports["default"] = _default;
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.setMenuVersion = void 0;
|
|
7
|
+
|
|
8
|
+
var _request = require("../../utils/request");
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
11
|
+
var setMenuVersion = function setMenuVersion(version) {
|
|
12
|
+
return (0, _request.rpost)("v3")("menu/set/menuVersion?version=".concat(version));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
exports.setMenuVersion = setMenuVersion;
|
package/lib/utils/bs-global.js
CHANGED
|
@@ -25,7 +25,7 @@ var getBSGlobal = function getBSGlobal(key) {
|
|
|
25
25
|
exports.getBSGlobal = getBSGlobal;
|
|
26
26
|
|
|
27
27
|
var getOkrAdvancedSetting = function getOkrAdvancedSetting() {
|
|
28
|
-
return window.BSGlobal
|
|
28
|
+
return window.BSGlobal.OkrAdvancedSetting;
|
|
29
29
|
}; // version 1 试用版
|
|
30
30
|
|
|
31
31
|
|
package/lib/utils/constant.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getMonth = void 0;
|
|
7
7
|
|
|
8
8
|
var _getLocale = require("./getLocale");
|
|
9
9
|
|
|
@@ -11,16 +11,4 @@ var getMonth = function getMonth() {
|
|
|
11
11
|
return [(0, _getLocale.getLocale)("Mod_Jan"), (0, _getLocale.getLocale)("Mod_Feb"), (0, _getLocale.getLocale)("Mod_Mar"), (0, _getLocale.getLocale)("Mod_Apr"), (0, _getLocale.getLocale)("Mod_May"), (0, _getLocale.getLocale)("Mod_Jun"), (0, _getLocale.getLocale)("Mod_Jul"), (0, _getLocale.getLocale)("Mod_Aug"), (0, _getLocale.getLocale)("Mod_Sept"), (0, _getLocale.getLocale)("Mod_Oct"), (0, _getLocale.getLocale)("Mod_Nov"), (0, _getLocale.getLocale)("Mod_Dec")];
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
exports.getMonth = getMonth;
|
|
15
|
-
|
|
16
|
-
var getWeek = function getWeek() {
|
|
17
|
-
return [(0, _getLocale.getLocale)("Mod_Sun"), (0, _getLocale.getLocale)("Mod_Mon"), (0, _getLocale.getLocale)("Mod_Tues"), (0, _getLocale.getLocale)("Mod_Wed"), (0, _getLocale.getLocale)("Mod_Thur"), (0, _getLocale.getLocale)("Mod_Fri"), (0, _getLocale.getLocale)("Mod_Sat")];
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
exports.getWeek = getWeek;
|
|
21
|
-
|
|
22
|
-
var getWeekly = function getWeekly() {
|
|
23
|
-
return [(0, _getLocale.getLocale)('Tasks_Tab_MyS_Week1s'), (0, _getLocale.getLocale)('Tasks_Tab_MyS_Week2s'), (0, _getLocale.getLocale)('Tasks_Tab_MyS_Week3s'), (0, _getLocale.getLocale)('Tasks_Tab_MyS_Week4s'), (0, _getLocale.getLocale)('Tasks_Tab_MyS_Week5s')];
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
exports.getWeekly = getWeekly;
|
|
14
|
+
exports.getMonth = getMonth;
|
package/lib/utils/helpers.js
CHANGED
|
@@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.cssSupport = cssSupport;
|
|
7
7
|
exports.escapeHtml = escapeHtml;
|
|
8
|
-
exports.
|
|
9
|
-
exports.getPreAndNextMonthDate = exports.getLoginUserInfo = void 0;
|
|
8
|
+
exports.getLoginUserInfo = void 0;
|
|
10
9
|
exports.getTenantInfo = getTenantInfo;
|
|
11
10
|
exports.getUploadMaxSize = getUploadMaxSize;
|
|
12
11
|
exports.isTencentHr = exports.isLocal = exports.isFeishu = exports.isDingDing = void 0;
|
|
@@ -14,7 +13,7 @@ exports.isTencentHr = exports.isLocal = exports.isFeishu = exports.isDingDing =
|
|
|
14
13
|
var _bsGlobal = require("./bs-global");
|
|
15
14
|
|
|
16
15
|
function cssSupport(attr, value) {
|
|
17
|
-
var element = document.createElement(
|
|
16
|
+
var element = document.createElement("div");
|
|
18
17
|
|
|
19
18
|
if (attr in element.style) {
|
|
20
19
|
element.style[attr] = value;
|
|
@@ -25,7 +24,7 @@ function cssSupport(attr, value) {
|
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
function getUploadMaxSize() {
|
|
28
|
-
var info = (0, _bsGlobal.getBSGlobal)(
|
|
27
|
+
var info = (0, _bsGlobal.getBSGlobal)("tenantInfo");
|
|
29
28
|
if (info.Id === 352728) return 150;
|
|
30
29
|
var isDingDing = info.Source === 861;
|
|
31
30
|
var isDingZhi = window.dingZhiSize && window.dingZhiSize.indexOf(info.Id) !== -1;
|
|
@@ -34,15 +33,8 @@ function getUploadMaxSize() {
|
|
|
34
33
|
return 50;
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
function getApiUrl(url) {
|
|
38
|
-
var uid = (0, _bsGlobal.getUserInfo)().Id;
|
|
39
|
-
var tid = getTenantInfo().Id;
|
|
40
|
-
var apiServer = (0, _bsGlobal.getBSGlobal)('apiPath');
|
|
41
|
-
return apiServer + '/api/v1/' + tid + '/' + uid + '/' + url;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
36
|
function getTenantInfo() {
|
|
45
|
-
return (0, _bsGlobal.getBSGlobal)(
|
|
37
|
+
return (0, _bsGlobal.getBSGlobal)("tenantInfo");
|
|
46
38
|
}
|
|
47
39
|
|
|
48
40
|
var isDingDing = function isDingDing() {
|
|
@@ -71,11 +63,11 @@ exports.isTencentHr = isTencentHr;
|
|
|
71
63
|
|
|
72
64
|
function escapeHtml(str) {
|
|
73
65
|
var htmlEscapes = {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
"&": "&",
|
|
67
|
+
"<": "<",
|
|
68
|
+
">": ">",
|
|
69
|
+
""": "\"",
|
|
70
|
+
"'": "'"
|
|
79
71
|
};
|
|
80
72
|
return str.replace(/(&|<|>|"|')/g, function (s) {
|
|
81
73
|
return htmlEscapes[s];
|
|
@@ -83,44 +75,7 @@ function escapeHtml(str) {
|
|
|
83
75
|
}
|
|
84
76
|
|
|
85
77
|
var getLoginUserInfo = function getLoginUserInfo() {
|
|
86
|
-
return (0, _bsGlobal.getBSGlobal)(
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
exports.getLoginUserInfo = getLoginUserInfo;
|
|
90
|
-
|
|
91
|
-
var getPreAndNextMonthDate = function getPreAndNextMonthDate() {
|
|
92
|
-
var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();
|
|
93
|
-
var culPreDate = new Date(date);
|
|
94
|
-
var culNextDate = new Date(date);
|
|
95
|
-
var preDate = [];
|
|
96
|
-
var nextDate = []; // 获取前置天数
|
|
97
|
-
|
|
98
|
-
culPreDate.setDate(1);
|
|
99
|
-
var preRemainDays = culPreDate.getDay() === 0 ? 6 : culPreDate.getDay() - 1;
|
|
100
|
-
culPreDate.setDate(0);
|
|
101
|
-
|
|
102
|
-
while (preRemainDays > 0) {
|
|
103
|
-
// +1是因为上个月有5天到这个月,月末30号 则为 30-4, 30-3, 30-2, 30-1, 30-0五天
|
|
104
|
-
preDate.push(culPreDate.getDate() - preRemainDays + 1);
|
|
105
|
-
preRemainDays--;
|
|
106
|
-
} // 获取后置天数
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
culNextDate.setMonth(culNextDate.getMonth() + 1);
|
|
110
|
-
culNextDate.setDate(0);
|
|
111
|
-
var lastDateDay = Math.abs(culNextDate.getDay() - 7);
|
|
112
|
-
|
|
113
|
-
if (lastDateDay !== 7) {
|
|
114
|
-
while (lastDateDay >= 1) {
|
|
115
|
-
nextDate.unshift(lastDateDay);
|
|
116
|
-
lastDateDay--;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return {
|
|
121
|
-
preDate: preDate,
|
|
122
|
-
nextDate: nextDate
|
|
123
|
-
};
|
|
78
|
+
return (0, _bsGlobal.getBSGlobal)("loginUserInfo");
|
|
124
79
|
};
|
|
125
80
|
|
|
126
|
-
exports.
|
|
81
|
+
exports.getLoginUserInfo = getLoginUserInfo;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titaui/pc",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.15",
|
|
4
4
|
"nameCN": "",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -125,7 +125,6 @@
|
|
|
125
125
|
"rc-overflow": "1.2.2",
|
|
126
126
|
"rc-pagination": "3.1.6",
|
|
127
127
|
"rc-queue-anim": "1.4.1",
|
|
128
|
-
"rc-rate": "^2.9.2",
|
|
129
128
|
"rc-select": "12.1.13",
|
|
130
129
|
"rc-switch": "3.2.2",
|
|
131
130
|
"rc-table": "7.13.2",
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _imgViewer = _interopRequireDefault(require("../img-viewer"));
|
|
13
|
-
|
|
14
|
-
var _dialogUpload = _interopRequireDefault(require("../dialog-upload"));
|
|
15
|
-
|
|
16
|
-
var _util = require("../dialog-upload/util");
|
|
17
|
-
|
|
18
|
-
var _uploadedPreview = _interopRequireDefault(require("../dialog-upload/uploaded-preview"));
|
|
19
|
-
|
|
20
|
-
require("./index.css");
|
|
21
|
-
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
-
|
|
24
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
28
|
-
function 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; }
|
|
29
|
-
|
|
30
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
-
|
|
32
|
-
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; }
|
|
33
|
-
|
|
34
|
-
var prefix = 'attachments-preview';
|
|
35
|
-
|
|
36
|
-
var AttachmentsPreview = function AttachmentsPreview(props) {
|
|
37
|
-
var attachments = props.attachments,
|
|
38
|
-
_props$enableDelete = props.enableDelete,
|
|
39
|
-
enableDelete = _props$enableDelete === void 0 ? true : _props$enableDelete,
|
|
40
|
-
onChange = props.onChange,
|
|
41
|
-
onUploadFile = props.onUploadFile,
|
|
42
|
-
_props$enableUploadFi = props.enableUploadFile,
|
|
43
|
-
enableUploadFile = _props$enableUploadFi === void 0 ? true : _props$enableUploadFi;
|
|
44
|
-
var previewRef = (0, _react.useRef)();
|
|
45
|
-
|
|
46
|
-
var onSubmithandler = function onSubmithandler(index, option) {
|
|
47
|
-
switch (option) {
|
|
48
|
-
case 'cancel':
|
|
49
|
-
case 'delete':
|
|
50
|
-
{
|
|
51
|
-
onChange(attachments.filter(function (f) {
|
|
52
|
-
return f.Id != attachments[index].Id;
|
|
53
|
-
}));
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
case 'preview':
|
|
58
|
-
{
|
|
59
|
-
if ((0, _util.isImg)(attachments[index].MediaType || attachments[index].FileType)) {
|
|
60
|
-
var i = attachments.filter(function (f) {
|
|
61
|
-
return (0, _util.isImg)(f.MediaType || attachments[index].FileType);
|
|
62
|
-
}).findIndex(function (f) {
|
|
63
|
-
return f.Id == attachments[index].Id;
|
|
64
|
-
});
|
|
65
|
-
previewRef.current.show(i);
|
|
66
|
-
} else {
|
|
67
|
-
window.open(attachments[index].ClientUrl);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
case 'download':
|
|
74
|
-
{
|
|
75
|
-
window.open(attachments[index].DownloadUrl);
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
if (!attachments.length && !enableUploadFile) return null;
|
|
82
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_imgViewer["default"], {
|
|
83
|
-
data: attachments.filter(function (f) {
|
|
84
|
-
return (0, _util.isImg)(f.MediaType || f.FileType);
|
|
85
|
-
}).map(function (f) {
|
|
86
|
-
return _objectSpread(_objectSpread({}, f), {}, {
|
|
87
|
-
previewUrl: f.ClientUrl || f.PreviewUrl
|
|
88
|
-
});
|
|
89
|
-
}),
|
|
90
|
-
ref: previewRef,
|
|
91
|
-
showDownload: true
|
|
92
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
|
-
className: prefix
|
|
94
|
-
}, attachments.map(function (item, index) {
|
|
95
|
-
return /*#__PURE__*/_react["default"].createElement(_uploadedPreview["default"], {
|
|
96
|
-
className: "".concat(prefix, "__item"),
|
|
97
|
-
key: index,
|
|
98
|
-
index: index,
|
|
99
|
-
uploadResultItem: _objectSpread(_objectSpread({}, item), {}, {
|
|
100
|
-
uploadStatus: 3,
|
|
101
|
-
percentComplete: 100,
|
|
102
|
-
Deleteable: enableDelete
|
|
103
|
-
}),
|
|
104
|
-
onSubmit: onSubmithandler
|
|
105
|
-
});
|
|
106
|
-
}), enableUploadFile && /*#__PURE__*/_react["default"].createElement(_dialogUpload["default"], {
|
|
107
|
-
onSubmit: onUploadFile
|
|
108
|
-
})));
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
var _default = AttachmentsPreview;
|
|
112
|
-
exports["default"] = _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="10px" height="10px" viewBox="0 0 10 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<title>切片</title>
|
|
4
|
-
<g id="3、写总结" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
-
<g id="2、写总结-默认" transform="translate(-1892.000000, -545.000000)" fill="#FFFFFF">
|
|
6
|
-
<g id="编组-8" transform="translate(1855.000000, 540.000000)">
|
|
7
|
-
<g id="编组-25" transform="translate(36.000000, 1.000000)">
|
|
8
|
-
<g id="编组-2" transform="translate(0.000000, 3.000000)">
|
|
9
|
-
<g id="canceled" transform="translate(1.500000, 1.500000)">
|
|
10
|
-
<path d="M2.10266504,1.57233496 L4.4885,3.9585 L6.87563582,1.57233496 C7.00116148,1.44680929 7.19353713,1.42887705 7.33816279,1.51853824 L7.4059659,1.57233496 C7.55241251,1.71878157 7.55241251,1.95621843 7.4059659,2.10266504 L7.4059659,2.10266504 L5.0195,4.4885 L7.4059659,6.87563582 C7.55241251,7.02208243 7.55241251,7.25951929 7.4059659,7.4059659 C7.25951929,7.55241251 7.02208243,7.55241251 6.87563582,7.4059659 L4.4885,5.0195 L2.10266504,7.4059659 C1.97713938,7.53149157 1.78476373,7.5494238 1.64013807,7.45976262 L1.57233496,7.4059659 C1.42588835,7.25951929 1.42588835,7.02208243 1.57233496,6.87563582 L1.57233496,6.87563582 L3.9585,4.4885 L1.57233496,2.10266504 C1.42588835,1.95621843 1.42588835,1.71878157 1.57233496,1.57233496 C1.71878157,1.42588835 1.95621843,1.42588835 2.10266504,1.57233496 Z" id="形状结合"></path>
|
|
11
|
-
</g>
|
|
12
|
-
</g>
|
|
13
|
-
</g>
|
|
14
|
-
</g>
|
|
15
|
-
</g>
|
|
16
|
-
</g>
|
|
17
|
-
</svg>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="10px" height="10px" viewBox="0 0 10 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<title>切片</title>
|
|
4
|
-
<g id="3、写总结" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
-
<g id="4、写总结-填写内容后" transform="translate(-57.000000, -23.000000)">
|
|
6
|
-
<g id="编组-25" transform="translate(56.000000, 19.000000)">
|
|
7
|
-
<g id="编组-2" transform="translate(0.000000, 3.000000)">
|
|
8
|
-
<g id="finished" transform="translate(1.500000, 1.006729)">
|
|
9
|
-
<rect id="矩形" x="0" y="0.493270771" width="9" height="9"></rect>
|
|
10
|
-
<path d="M1.6125,1.65577077 C1.8160965,1.65577077 1.98179744,1.81802093 1.98735593,2.02027434 L1.9875,2.03077077 L1.9875,4.82720422 C1.9875,5.11323548 2.21624071,5.34584148 2.50077581,5.35207589 L2.5125,5.35220422 L7.3875,5.35220422 C7.59460678,5.35220422 7.7625,5.52009744 7.7625,5.72720422 C7.7625,5.93080072 7.60024985,6.09650166 7.39799643,6.10206015 L7.3875,6.10220422 L2.5125,6.10220422 C1.81537857,6.10220422 1.24893007,5.54272693 1.23767081,4.84828868 L1.2375,4.82720422 L1.2375,2.03077077 C1.2375,1.82366399 1.40539322,1.65577077 1.6125,1.65577077 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(4.500000, 3.878987) rotate(-45.000000) translate(-4.500000, -3.878987) "></path>
|
|
11
|
-
</g>
|
|
12
|
-
</g>
|
|
13
|
-
</g>
|
|
14
|
-
</g>
|
|
15
|
-
</g>
|
|
16
|
-
</svg>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
.titaui-auto-save {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.titaui-auto-save__icon-wrapper {
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
width: 12px;
|
|
11
|
-
height: 12px;
|
|
12
|
-
min-width: 12px;
|
|
13
|
-
border-radius: 50%;
|
|
14
|
-
color: #ffffff;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.titaui-auto-save__icon-wrapper--success {
|
|
18
|
-
background: #5ad8a6;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.titaui-auto-save__icon-wrapper--failed {
|
|
22
|
-
background: #F05E5E;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.titaui-auto-save__icon {
|
|
26
|
-
width: 10px;
|
|
27
|
-
height: 10px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.titaui-auto-save__text {
|
|
31
|
-
margin-left: 4px;
|
|
32
|
-
font-size: 12px;
|
|
33
|
-
color: #a4acb9;
|
|
34
|
-
line-height: 18px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.titaui-auto-save__text--loading {
|
|
38
|
-
margin-left: 0;
|
|
39
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
|
-
var _getLocale = require("../../utils/getLocale");
|
|
15
|
-
|
|
16
|
-
var _success = _interopRequireDefault(require("./img/success.svg"));
|
|
17
|
-
|
|
18
|
-
var _failed = _interopRequireDefault(require("./img/failed.svg"));
|
|
19
|
-
|
|
20
|
-
var _toast = _interopRequireDefault(require("../toast"));
|
|
21
|
-
|
|
22
|
-
require("./index.css");
|
|
23
|
-
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
-
|
|
26
|
-
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); }
|
|
27
|
-
|
|
28
|
-
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; }
|
|
29
|
-
|
|
30
|
-
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; }
|
|
31
|
-
|
|
32
|
-
var prefix = 'titaui-auto-save';
|
|
33
|
-
|
|
34
|
-
var AutoSave = function AutoSave(_ref) {
|
|
35
|
-
var _classNames;
|
|
36
|
-
|
|
37
|
-
var _ref$isSuccess = _ref.isSuccess,
|
|
38
|
-
isSuccess = _ref$isSuccess === void 0 ? true : _ref$isSuccess,
|
|
39
|
-
_ref$loading = _ref.loading,
|
|
40
|
-
loading = _ref$loading === void 0 ? false : _ref$loading;
|
|
41
|
-
var renderSaveIcon = (0, _react.useMemo)(function () {
|
|
42
|
-
var imgSrc = _success["default"];
|
|
43
|
-
|
|
44
|
-
if (!isSuccess) {
|
|
45
|
-
imgSrc = _failed["default"];
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
49
|
-
className: "".concat(prefix, "__icon"),
|
|
50
|
-
src: imgSrc
|
|
51
|
-
});
|
|
52
|
-
}, [isSuccess, loading]);
|
|
53
|
-
var renderText = (0, _react.useMemo)(function () {
|
|
54
|
-
if (loading) {
|
|
55
|
-
return "".concat((0, _getLocale.getLocale)('Rtx_Saving'), "...");
|
|
56
|
-
} else if (isSuccess) {
|
|
57
|
-
return (0, _getLocale.getLocale)('Rep_NewS_SaveDraft');
|
|
58
|
-
} else {
|
|
59
|
-
_toast["default"].Error((0, _getLocale.getLocale)('Mod_Netexcfailed'));
|
|
60
|
-
|
|
61
|
-
return (0, _getLocale.getLocale)('Mod_SaveFailure');
|
|
62
|
-
}
|
|
63
|
-
}, [loading, isSuccess]);
|
|
64
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
65
|
-
className: prefix
|
|
66
|
-
}, !loading && /*#__PURE__*/_react["default"].createElement("span", {
|
|
67
|
-
className: (0, _classnames["default"])("".concat(prefix, "__icon-wrapper"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "__icon-wrapper--success"), isSuccess), _defineProperty(_classNames, "".concat(prefix, "__icon-wrapper--failed"), !isSuccess), _classNames))
|
|
68
|
-
}, renderSaveIcon), /*#__PURE__*/_react["default"].createElement("span", {
|
|
69
|
-
className: (0, _classnames["default"])("".concat(prefix, "__text"), _defineProperty({}, "".concat(prefix, "__text--loading"), loading))
|
|
70
|
-
}, renderText));
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
AutoSave.defaultProps = {
|
|
74
|
-
isSuccess: true,
|
|
75
|
-
loading: false
|
|
76
|
-
};
|
|
77
|
-
var _default = AutoSave;
|
|
78
|
-
exports["default"] = _default;
|