@titaui/pc 1.12.62 → 1.12.64
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/default.js +2 -5
- package/lib/components/avatar/index.css +0 -2
- package/lib/components/dialog-confirm/index.css +0 -1
- package/lib/components/dialog-confirm/index.js +4 -8
- package/lib/components/drawer/index.css +5 -5
- package/lib/components/drawer/index.js +7 -7
- package/lib/components/drop-selector/index.js +4 -7
- package/lib/components/dynamic/constant.js +1 -5
- package/lib/components/dynamic/dynamic-item/components/header/index.js +47 -49
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +21 -4
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +5 -3
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/index.css +2 -3
- package/lib/components/dynamic/dynamic-item/index.js +33 -52
- package/lib/components/dynamic/dynamic-list/index.js +8 -8
- package/lib/components/dynamic/img/dynamic-submit-delay.svg +16 -0
- package/lib/components/dynamic/img/dynamic-submit-normal.svg +18 -0
- package/lib/components/form/form-fields/date/index.js +8 -9
- 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/components/menu-tree/tree-node/menu-item.js +1 -5
- package/lib/components/menus/components/search-colleague/index.js +1 -3
- package/lib/components/menus/export-modules/appraisal-menus/index.js +6 -6
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +69 -69
- package/lib/components/menus/export-modules/demo-menus/menus.js +4 -5
- package/lib/components/menus/export-modules/interview-menus/constant.js +12 -12
- package/lib/components/menus/export-modules/okr-menus/index.js +6 -6
- package/lib/components/menus/export-modules/okr-menus/menus.js +60 -60
- package/lib/components/menus/export-modules/okr-menus/okr-front-menus.js +2 -2
- package/lib/components/menus/i18n.js +0 -8
- package/lib/components/menus/index.js +0 -6
- package/lib/components/menus/request-apis.js +2 -22
- package/lib/components/nav-top/components/app-center/index.css +1 -24
- package/lib/components/nav-top/components/app-center/index.js +10 -18
- package/lib/components/nav-top/components/menu/index.css +0 -11
- package/lib/components/nav-top/components/menu/index.js +53 -49
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +17 -28
- package/lib/components/nav-top/components/user-message/index.js +19 -19
- package/lib/components/nav-top/index.css +0 -5
- package/lib/components/nav-top/index.js +2 -39
- package/lib/components/okr-detail/components/header/index.js +1 -1
- package/lib/components/okr-detail/components/header/o-avatar.js +6 -6
- package/lib/components/okr-flow/export-modal/index.css +3 -3
- package/lib/components/okr-flow/export-modal/index.js +1 -1
- package/lib/components/okr-flow/okr-map/index.js +1 -3
- package/lib/components/order-have-award/index.js +6 -6
- package/lib/components/period-selector/components/button/style.js +5 -5
- 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 -35
- 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 +1 -1
- 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 +60 -106
- 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/rich-editor/ui/editor/index.css +32 -32
- package/lib/components/rich-editor/ui/editor/index.js +1 -1
- package/lib/components/search-input/index.js +0 -5
- package/lib/components/select-tags/index.js +2 -12
- package/lib/components/task-relation-modal/helper.js +6 -6
- package/lib/components/task-relation-modal/request-api.js +9 -9
- package/lib/components/task-relation-modal/tree/work-tree/search-form.js +4 -4
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +5 -5
- package/lib/components/textarea/index.css +66 -61
- package/lib/components/textarea/index.js +18 -23
- package/lib/components/toast/index.js +1 -1
- package/lib/components/tooltip/tooltip.js +2 -2
- package/lib/components/upvote/index.js +4 -10
- package/lib/components/upvote/selector.js +3 -2
- package/lib/components/user-selector/category-selector-panel/depart-tree.js +1 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +1 -1
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.css +3 -3
- package/lib/components/user-selector/request-apis.js +13 -13
- package/lib/components-v1/radio/style/index.css +1 -1
- package/lib/index.js +0 -64
- package/lib/pages/aha2021/index.css +17 -0
- package/lib/pages/aha2021/index.js +28 -3
- package/lib/pages/aha2021/new-menu-switcher/index.js +4 -4
- package/lib/pages/aha2021/request-api.js +1 -1
- package/lib/utils/auth.js +0 -10
- package/lib/utils/bs-global.js +1 -1
- package/lib/utils/constant.js +2 -14
- package/lib/utils/helpers.js +12 -112
- package/lib/utils/open-data.js +42 -41
- package/package.json +2 -3
- package/lib/components/attachments-preview/index.css +0 -9
- package/lib/components/attachments-preview/index.js +0 -116
- 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 -69
- 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 -332
- package/lib/components/dialog-upload/type.js +0 -35
- package/lib/components/dialog-upload/uploaded-preview.css +0 -80
- package/lib/components/dialog-upload/uploaded-preview.js +0 -134
- package/lib/components/dialog-upload/util.js +0 -131
- package/lib/components/dynamic/components/comments-dialog/api.js +0 -27
- package/lib/components/dynamic/components/comments-dialog/encourage.js +0 -127
- package/lib/components/dynamic/components/comments-dialog/img/APP-shoucang-m.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/ascore.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/curEfforts.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/curGood.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/curGreat.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/efforts.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/good.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/great.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/halfscore.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/loading.gif +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/score.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/top.svg +0 -14
- package/lib/components/dynamic/components/comments-dialog/index.css +0 -116
- package/lib/components/dynamic/components/comments-dialog/index.js +0 -208
- package/lib/components/dynamic/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 -217
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +0 -176
- 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 -27
- 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 -222
- 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 -36
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +0 -31
- 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/guide-img.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 -187
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +0 -426
- package/lib/components/dynamic/dynamic-item/components/summary-header/operate-record.js +0 -49
- package/lib/components/dynamic/dynamic-item/components/summary-header/request-api.js +0 -23
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.css +0 -30
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.js +0 -57
- 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 -67
- 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 -29
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +0 -310
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +0 -193
- package/lib/components/dynamic/dynamic-item/components/task-progress/interface.js +0 -22
- package/lib/components/dynamic/dynamic-item/components/task-progress/render-row.js +0 -80
- package/lib/components/dynamic/dynamic-item/components/task-progress/request-api.js +0 -16
- package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +0 -158
- 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/come-on-write.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/nice-write.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/img/very-good-write.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.css +0 -115
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +0 -212
- 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 -49
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +0 -61
- 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 -152
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +0 -254
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +0 -67
- package/lib/components/guide-tip/index.css +0 -68
- package/lib/components/guide-tip/index.js +0 -115
- package/lib/components/import-modal/helper.js +0 -170
- 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-okr-modal/index.js +0 -146
- package/lib/components/import-modal/import-task-modal/index.css +0 -18
- package/lib/components/import-modal/import-task-modal/index.js +0 -251
- package/lib/components/import-modal/import-task-modal/search-form.js +0 -142
- package/lib/components/import-modal/index.css +0 -30
- package/lib/components/import-modal/index.js +0 -20
- package/lib/components/import-modal/radio.js +0 -62
- package/lib/components/import-modal/request-api.js +0 -206
- 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 -89
- 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 -84
- 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 -269
- 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 -124
- package/lib/components/import-modal/tree/task-work-tree/index.js +0 -190
- 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 -65
- package/lib/components/import-modal/tree-node/kr-node/index.js +0 -112
- 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 -53
- package/lib/components/import-modal/tree-node/o-node/index.js +0 -142
- 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 -243
- package/lib/components/menus/export-modules/summary-menus/index.css +0 -9
- package/lib/components/menus/export-modules/summary-menus/index.js +0 -136
- package/lib/components/menus/export-modules/summary-menus/menu-highlight.js +0 -76
- package/lib/components/menus/export-modules/summary-menus/menus.js +0 -251
- package/lib/components/menus/export-modules/summary-menus/request-api.js +0 -17
- package/lib/components/menus/export-modules/summary-menus/subordinate-menus/helper.js +0 -28
- package/lib/components/menus/export-modules/summary-menus/subordinate-menus/index.css +0 -14
- package/lib/components/menus/export-modules/summary-menus/subordinate-menus/index.js +0 -201
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +0 -250
- package/lib/components/nav-top/components/app-center/images/demo.png +0 -0
- package/lib/components/nav-top/components/app-center/images/new.svg +0 -30
- 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 -120
- 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 -51
- package/lib/components/picker/components/panels/week-panel/index.js +0 -63
- package/lib/components/picker/components/panels/week-panel/utils.js +0 -153
- package/lib/components/picker/components/panels/week-panel/week-body.js +0 -79
- 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 -79
- 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 -79
- 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 -67
- package/lib/components/rich-editor-at/components/index.js +0 -189
- 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/constants.js +0 -21
- package/lib/components/write-summary-modal/index.css +0 -80
- 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 -32
- package/lib/utils/planDataJson.js +0 -1
|
@@ -118,6 +118,23 @@
|
|
|
118
118
|
margin-top: 24px;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
.titaui-aha-2021__update-tip {
|
|
122
|
+
background-color: #fdf2d0;
|
|
123
|
+
height: 32px;
|
|
124
|
+
display: flex;
|
|
125
|
+
align-items: center;
|
|
126
|
+
justify-content: center;
|
|
127
|
+
font-size: 14px;
|
|
128
|
+
color: #6f7886;
|
|
129
|
+
line-height: 18px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.titaui-aha-2021__update-tip .update-tip-icon {
|
|
133
|
+
color: #f5bd15;
|
|
134
|
+
margin-right: 4px;
|
|
135
|
+
font-size: 18px;
|
|
136
|
+
}
|
|
137
|
+
|
|
121
138
|
@keyframes contentOpacity {
|
|
122
139
|
from {
|
|
123
140
|
opacity: 0;
|
|
@@ -11,6 +11,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
15
|
+
|
|
14
16
|
var _navTop = _interopRequireDefault(require("../../components/nav-top"));
|
|
15
17
|
|
|
16
18
|
var _followerVisitor = _interopRequireDefault(require("../../components/follower-visitor"));
|
|
@@ -49,7 +51,19 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
49
51
|
|
|
50
52
|
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; }
|
|
51
53
|
|
|
52
|
-
|
|
54
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
55
|
+
|
|
56
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
57
|
+
|
|
58
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
59
|
+
|
|
60
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
61
|
+
|
|
62
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
63
|
+
|
|
64
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
65
|
+
|
|
66
|
+
var preCls = "titaui-aha-2021";
|
|
53
67
|
|
|
54
68
|
function ContentTemplate(props) {
|
|
55
69
|
var children = props.children,
|
|
@@ -74,7 +88,14 @@ function ContentTemplate(props) {
|
|
|
74
88
|
|
|
75
89
|
function PageLayout(props) {
|
|
76
90
|
var children = props.children;
|
|
77
|
-
var hideNavTop = (0, _hooks["default"])(
|
|
91
|
+
var hideNavTop = (0, _hooks["default"])("hideNavTop");
|
|
92
|
+
|
|
93
|
+
var _useState = (0, _react.useState)(function () {
|
|
94
|
+
return (0, _moment["default"])().unix() < (0, _moment["default"])("2022-06-18").unix();
|
|
95
|
+
}),
|
|
96
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
97
|
+
isShowUpdateTip = _useState2[0];
|
|
98
|
+
|
|
78
99
|
var isTrial = window.BSGlobal.tenantAuthentication.Version === 1 && (0, _platform.isOfficialSite)();
|
|
79
100
|
var isTencentHr = window.BSGlobal.tenantInfo.Source === 964;
|
|
80
101
|
|
|
@@ -94,7 +115,11 @@ function PageLayout(props) {
|
|
|
94
115
|
|
|
95
116
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
117
|
className: (0, _classnames["default"])(preCls)
|
|
97
|
-
},
|
|
118
|
+
}, isShowUpdateTip && /*#__PURE__*/_react["default"].createElement("div", {
|
|
119
|
+
className: "".concat(preCls, "__update-tip")
|
|
120
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
121
|
+
className: "tu-icon-tishi update-tip-icon"
|
|
122
|
+
}), "\u4EB2\u7231\u7684\u7528\u6237\u60A8\u597D\uFF0C\u4ECA\u665A\u300C\u603B\u7ED3\u300D\u5C06\u8FDB\u884C\u5168\u65B0\u5347\u7EA7\uFF0C\u5982\u6709\u8349\u7A3F\u8BF7\u53CA\u65F6\u590D\u5236\u8FC1\u79FB\uFF0C\u5982\u9700\u63D0\u4EA4\u8BF7\u5728 22:00 \u524D\u64CD\u4F5C\uFF0C23:00-\u6B21\u65E5 8:00 \u8BF7\u6682\u505C\u4F7F\u7528\u603B\u7ED3\uFF0C\u611F\u8C22\u60A8\u7684\u914D\u5408\u4E0E\u7406\u89E3~"), hideNavTop !== "true" && /*#__PURE__*/_react["default"].createElement("div", {
|
|
98
123
|
className: (0, _classnames["default"])("".concat(preCls, "__header"))
|
|
99
124
|
}, (0, _helpers.getTenantInfo)().Source === 964 ? /*#__PURE__*/_react["default"].createElement(_hrHeader["default"], null) : /*#__PURE__*/_react["default"].createElement(_navTop["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
125
|
className: (0, _classnames["default"])("".concat(preCls, "__message"))
|
|
@@ -37,7 +37,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
37
37
|
|
|
38
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
39
|
|
|
40
|
-
var precls =
|
|
40
|
+
var precls = "new-menu-switcher"; // eslint-disable-next-line react/prop-types
|
|
41
41
|
|
|
42
42
|
var NewMenuSwitcher = function NewMenuSwitcher(_ref) {
|
|
43
43
|
var isTrial = _ref.isTrial;
|
|
@@ -59,7 +59,7 @@ var NewMenuSwitcher = function NewMenuSwitcher(_ref) {
|
|
|
59
59
|
|
|
60
60
|
var changeMenuVersion = function changeMenuVersion() {
|
|
61
61
|
(0, _requestApi.setMenuVersion)(window.BSGlobal.isUseNewMenu ? 0 : 1).then(function () {
|
|
62
|
-
window.location.href =
|
|
62
|
+
window.location.href = "/";
|
|
63
63
|
});
|
|
64
64
|
}; // 当租户开启新菜单时,不允许员工切换菜单版本
|
|
65
65
|
|
|
@@ -76,9 +76,9 @@ var NewMenuSwitcher = function NewMenuSwitcher(_ref) {
|
|
|
76
76
|
}
|
|
77
77
|
}, isNewMenu && /*#__PURE__*/_react["default"].createElement("span", {
|
|
78
78
|
className: (0, _classnames["default"])("".concat(precls, "__old-version"), _defineProperty({}, "".concat(precls, "__old-version--full"), showFullTip))
|
|
79
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, showFullTip ? (0, _getLocale.getLocale)(
|
|
79
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, showFullTip ? (0, _getLocale.getLocale)("Rep_NewS_Backold") : (0, _getLocale.getLocale)("Rep_NewS_OldMenu"))), !isNewMenu && /*#__PURE__*/_react["default"].createElement("span", {
|
|
80
80
|
className: (0, _classnames["default"])("".concat(precls, "__new-version"), _defineProperty({}, "".concat(precls, "__new-version--full"), showFullTip))
|
|
81
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, showFullTip ? (0, _getLocale.getLocale)(
|
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, showFullTip ? (0, _getLocale.getLocale)("Rep_NewS_TryNewMenu") : (0, _getLocale.getLocale)("Rep_NewS_NewMenu"))));
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
var _default = NewMenuSwitcher;
|
|
@@ -9,7 +9,7 @@ var _request = require("../../utils/request");
|
|
|
9
9
|
|
|
10
10
|
// eslint-disable-next-line import/prefer-default-export
|
|
11
11
|
var setMenuVersion = function setMenuVersion(version) {
|
|
12
|
-
return (0, _request.rpost)(
|
|
12
|
+
return (0, _request.rpost)("v3")("menu/set/menuVersion?version=".concat(version));
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
exports.setMenuVersion = setMenuVersion;
|
package/lib/utils/auth.js
CHANGED
|
@@ -67,16 +67,6 @@ var BaseAuth = /*#__PURE__*/function () {
|
|
|
67
67
|
value: function isDepartmentLeader() {
|
|
68
68
|
return !this.loginUserInfor.IsBoss && this.loginUserInfor.IsLeader;
|
|
69
69
|
}
|
|
70
|
-
}, {
|
|
71
|
-
key: "isHrbp",
|
|
72
|
-
value: function isHrbp() {
|
|
73
|
-
return !this.loginUserInfor.IsBoss && this.loginUserInfor.IsHrbp;
|
|
74
|
-
}
|
|
75
|
-
}, {
|
|
76
|
-
key: "isPlanDailyManager",
|
|
77
|
-
value: function isPlanDailyManager() {
|
|
78
|
-
return this.loginUserInfor.IsPlanDailyManager;
|
|
79
|
-
}
|
|
80
70
|
}]);
|
|
81
71
|
|
|
82
72
|
return BaseAuth;
|
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,20 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.cssSupport = cssSupport;
|
|
7
7
|
exports.escapeHtml = escapeHtml;
|
|
8
|
-
exports.
|
|
9
|
-
exports.getPreAndNextMonthDate = exports.getPointYearMonthWeeksRange = exports.getLoginUserInfo = void 0;
|
|
8
|
+
exports.getLoginUserInfo = void 0;
|
|
10
9
|
exports.getTenantInfo = getTenantInfo;
|
|
11
10
|
exports.getUploadMaxSize = getUploadMaxSize;
|
|
12
|
-
exports.
|
|
11
|
+
exports.isTencentHr = exports.isLocal = exports.isFeishu = exports.isDingDing = void 0;
|
|
13
12
|
|
|
14
13
|
var _bsGlobal = require("./bs-global");
|
|
15
14
|
|
|
16
|
-
var _cloneDeep = _interopRequireDefault(require("clone-deep"));
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
-
|
|
20
15
|
function cssSupport(attr, value) {
|
|
21
|
-
var element = document.createElement(
|
|
16
|
+
var element = document.createElement("div");
|
|
22
17
|
|
|
23
18
|
if (attr in element.style) {
|
|
24
19
|
element.style[attr] = value;
|
|
@@ -29,7 +24,7 @@ function cssSupport(attr, value) {
|
|
|
29
24
|
}
|
|
30
25
|
|
|
31
26
|
function getUploadMaxSize() {
|
|
32
|
-
var info = (0, _bsGlobal.getBSGlobal)(
|
|
27
|
+
var info = (0, _bsGlobal.getBSGlobal)("tenantInfo");
|
|
33
28
|
if (info.Id === 352728) return 150;
|
|
34
29
|
var isDingDing = info.Source === 861;
|
|
35
30
|
var isDingZhi = window.dingZhiSize && window.dingZhiSize.indexOf(info.Id) !== -1;
|
|
@@ -38,15 +33,8 @@ function getUploadMaxSize() {
|
|
|
38
33
|
return 50;
|
|
39
34
|
}
|
|
40
35
|
|
|
41
|
-
function getApiUrl(url) {
|
|
42
|
-
var uid = (0, _bsGlobal.getUserInfo)().Id;
|
|
43
|
-
var tid = getTenantInfo().Id;
|
|
44
|
-
var apiServer = (0, _bsGlobal.getBSGlobal)('apiPath');
|
|
45
|
-
return apiServer + '/api/v1/' + tid + '/' + uid + '/' + url;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
36
|
function getTenantInfo() {
|
|
49
|
-
return (0, _bsGlobal.getBSGlobal)(
|
|
37
|
+
return (0, _bsGlobal.getBSGlobal)("tenantInfo");
|
|
50
38
|
}
|
|
51
39
|
|
|
52
40
|
var isDingDing = function isDingDing() {
|
|
@@ -75,11 +63,11 @@ exports.isTencentHr = isTencentHr;
|
|
|
75
63
|
|
|
76
64
|
function escapeHtml(str) {
|
|
77
65
|
var htmlEscapes = {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
66
|
+
"&": "&",
|
|
67
|
+
"<": "<",
|
|
68
|
+
">": ">",
|
|
69
|
+
""": "\"",
|
|
70
|
+
"'": "'"
|
|
83
71
|
};
|
|
84
72
|
return str.replace(/(&|<|>|"|')/g, function (s) {
|
|
85
73
|
return htmlEscapes[s];
|
|
@@ -87,95 +75,7 @@ function escapeHtml(str) {
|
|
|
87
75
|
}
|
|
88
76
|
|
|
89
77
|
var getLoginUserInfo = function getLoginUserInfo() {
|
|
90
|
-
return (0, _bsGlobal.getBSGlobal)(
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
exports.getLoginUserInfo = getLoginUserInfo;
|
|
94
|
-
|
|
95
|
-
var getPreAndNextMonthDate = function getPreAndNextMonthDate() {
|
|
96
|
-
var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();
|
|
97
|
-
var culPreDate = new Date(date);
|
|
98
|
-
var culNextDate = new Date(date);
|
|
99
|
-
var preDate = [];
|
|
100
|
-
var nextDate = []; // 获取前置天数
|
|
101
|
-
|
|
102
|
-
culPreDate.setDate(1);
|
|
103
|
-
var preRemainDays = culPreDate.getDay() === 0 ? 6 : culPreDate.getDay() - 1;
|
|
104
|
-
culPreDate.setDate(0);
|
|
105
|
-
|
|
106
|
-
while (preRemainDays > 0) {
|
|
107
|
-
// +1是因为上个月有5天到这个月,月末30号 则为 30-4, 30-3, 30-2, 30-1, 30-0五天
|
|
108
|
-
preDate.push(culPreDate.getDate() - preRemainDays + 1);
|
|
109
|
-
preRemainDays--;
|
|
110
|
-
} // 获取后置天数
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
culNextDate.setMonth(culNextDate.getMonth() + 1);
|
|
114
|
-
culNextDate.setDate(0);
|
|
115
|
-
var lastDateDay = Math.abs(culNextDate.getDay() - 7);
|
|
116
|
-
|
|
117
|
-
if (lastDateDay !== 7) {
|
|
118
|
-
while (lastDateDay >= 1) {
|
|
119
|
-
nextDate.unshift(lastDateDay);
|
|
120
|
-
lastDateDay--;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
return {
|
|
125
|
-
preDate: preDate,
|
|
126
|
-
nextDate: nextDate
|
|
127
|
-
};
|
|
128
|
-
}; //根据年月,计算这个月周的范围
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
exports.getPreAndNextMonthDate = getPreAndNextMonthDate;
|
|
132
|
-
|
|
133
|
-
var getPointYearMonthWeeksRange = function getPointYearMonthWeeksRange(year, month) {
|
|
134
|
-
var startDate = new Date("".concat(year, "/").concat(month, "/1"));
|
|
135
|
-
var calDays = new Date(startDate.valueOf());
|
|
136
|
-
calDays.setMonth(calDays.getMonth() + 1);
|
|
137
|
-
calDays.setDate(0);
|
|
138
|
-
var days = calDays.getDate();
|
|
139
|
-
var dayNum = 1 * 24 * 60 * 60 * 1000;
|
|
140
|
-
var result = [];
|
|
141
|
-
|
|
142
|
-
for (var i = 0; i < days; i++) {
|
|
143
|
-
var date = new Date(startDate.valueOf() + i * dayNum);
|
|
144
|
-
|
|
145
|
-
if (date.getDay() === 1) {
|
|
146
|
-
var endDate = new Date(date.valueOf() + 6 * dayNum);
|
|
147
|
-
result.push({
|
|
148
|
-
startTime: "".concat(date.getMonth() + 1 >= 10 ? date.getMonth() + 1 : "0" + (date.getMonth() + 1), "/").concat(date.getDate() >= 10 ? date.getDate() : "0" + date.getDate()),
|
|
149
|
-
endTime: "".concat(endDate.getMonth() + 1 >= 10 ? endDate.getMonth() + 1 : "0" + (endDate.getMonth() + 1), "/").concat(endDate.getDate() >= 10 ? endDate.getDate() : "0" + endDate.getDate())
|
|
150
|
-
});
|
|
151
|
-
i += 6;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return result;
|
|
156
|
-
}; // 扁平数据转换为树
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
exports.getPointYearMonthWeeksRange = getPointYearMonthWeeksRange;
|
|
160
|
-
|
|
161
|
-
var toTree = function toTree(data) {
|
|
162
|
-
var cloneData = (0, _cloneDeep["default"])(data);
|
|
163
|
-
var map = {};
|
|
164
|
-
var res = [];
|
|
165
|
-
cloneData.forEach(function (item) {
|
|
166
|
-
return map[item.id] = item;
|
|
167
|
-
});
|
|
168
|
-
cloneData.forEach(function (item) {
|
|
169
|
-
var parent = map[item.parentId];
|
|
170
|
-
|
|
171
|
-
if (parent) {
|
|
172
|
-
if (!parent.children) parent.children = [];
|
|
173
|
-
parent.children.push(item);
|
|
174
|
-
} else {
|
|
175
|
-
res.push(item);
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
return res;
|
|
78
|
+
return (0, _bsGlobal.getBSGlobal)("loginUserInfo");
|
|
179
79
|
};
|
|
180
80
|
|
|
181
|
-
exports.
|
|
81
|
+
exports.getLoginUserInfo = getLoginUserInfo;
|
package/lib/utils/open-data.js
CHANGED
|
@@ -73,7 +73,6 @@ var getOpenId = function getOpenId(id, type) {
|
|
|
73
73
|
exports.getOpenId = getOpenId;
|
|
74
74
|
|
|
75
75
|
function openData(p) {
|
|
76
|
-
//@ts-ignore
|
|
77
76
|
if (getSource() == WX_SOURCE || getUA().includes(WX_UA_STR)) {
|
|
78
77
|
return function (p) {
|
|
79
78
|
if (p.id === undefined && p.corpId === undefined) {
|
|
@@ -89,7 +88,7 @@ function openData(p) {
|
|
|
89
88
|
Sentry.captureException(new Error("企业微信openData调用失败"), scope);
|
|
90
89
|
});
|
|
91
90
|
return p.name || null;
|
|
92
|
-
}
|
|
91
|
+
} // @ts-ignore
|
|
93
92
|
|
|
94
93
|
|
|
95
94
|
var openId = p.corpId || getOpenId(p.id, p.type);
|
|
@@ -108,35 +107,31 @@ function openData(p) {
|
|
|
108
107
|
Sentry.captureException(new Error("企业微信openData调用失败"), scope);
|
|
109
108
|
});
|
|
110
109
|
return p.name || p.id || null;
|
|
111
|
-
}
|
|
112
|
-
|
|
110
|
+
}
|
|
113
111
|
|
|
114
112
|
var ref = (0, _react.useRef)(null);
|
|
115
113
|
(0, _react.useEffect)(function () {
|
|
116
|
-
|
|
117
|
-
(
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
var wWOpenData = window.top.WWOpenData; // // 如果当前页面中没有 WWOpenData 则去 top 上尝试获取
|
|
115
|
+
// if (!wWOpenData && window.top.WWOpenData) {
|
|
116
|
+
// wWOpenData = window.top.WWOpenData;
|
|
117
|
+
// }
|
|
120
118
|
|
|
121
|
-
|
|
122
|
-
}
|
|
119
|
+
wWOpenData && wWOpenData.bind(ref.current);
|
|
120
|
+
});
|
|
123
121
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
124
122
|
style: {
|
|
125
|
-
display:
|
|
126
|
-
position:
|
|
127
|
-
overflow:
|
|
128
|
-
textOverflow:
|
|
123
|
+
display: "inline",
|
|
124
|
+
position: "relative",
|
|
125
|
+
overflow: "hidden",
|
|
126
|
+
textOverflow: "ellipsis"
|
|
129
127
|
}
|
|
130
|
-
},
|
|
131
|
-
/*#__PURE__*/
|
|
132
|
-
//@ts-ignore
|
|
133
|
-
_react["default"].createElement("ww-open-data", {
|
|
128
|
+
}, /*#__PURE__*/_react["default"].createElement("ww-open-data", {
|
|
134
129
|
ref: ref,
|
|
135
130
|
type: p.type,
|
|
136
131
|
openid: openId
|
|
137
132
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
138
133
|
style: {
|
|
139
|
-
position:
|
|
134
|
+
position: "absolute",
|
|
140
135
|
top: 0,
|
|
141
136
|
left: 0,
|
|
142
137
|
right: 0,
|
|
@@ -145,11 +140,11 @@ function openData(p) {
|
|
|
145
140
|
}
|
|
146
141
|
}));
|
|
147
142
|
};
|
|
148
|
-
} else {
|
|
149
|
-
return function (p) {
|
|
150
|
-
return p.name || p.id || null;
|
|
151
|
-
};
|
|
152
143
|
}
|
|
144
|
+
|
|
145
|
+
return function (p) {
|
|
146
|
+
return p.name || p.id || null;
|
|
147
|
+
};
|
|
153
148
|
}
|
|
154
149
|
|
|
155
150
|
var getOpenData = openData();
|
|
@@ -256,14 +251,18 @@ var parseTag = function parseTag(str) {
|
|
|
256
251
|
exports.parseTag = parseTag;
|
|
257
252
|
|
|
258
253
|
var parseString = function parseString(str) {
|
|
259
|
-
|
|
260
|
-
var source = window.BSGlobal.tenantInfo.Source
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
254
|
+
// @ts-ignore
|
|
255
|
+
var source = window.BSGlobal.tenantInfo.Source;
|
|
256
|
+
var ua = navigator.userAgent.toLowerCase();
|
|
257
|
+
|
|
258
|
+
if (source != 860 && ua.indexOf("micromessenger") == -1) {
|
|
259
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
260
|
+
dangerouslySetInnerHTML: {
|
|
261
|
+
__html: str
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
|
|
267
266
|
var reg = /\[(\w+?)\:(\w+?)\]/g;
|
|
268
267
|
var strReg = /\[\w+?\:\w+?\]/;
|
|
269
268
|
var openDatas = [];
|
|
@@ -278,16 +277,14 @@ var parseString = function parseString(str) {
|
|
|
278
277
|
openDatas.push( /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, v2Paresed));
|
|
279
278
|
} else {
|
|
280
279
|
openDatas.push( /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(OpenDataCompoent, {
|
|
281
|
-
id: matchStr[1]
|
|
282
|
-
callFunc: "parseString",
|
|
283
|
-
extra: str
|
|
280
|
+
id: matchStr[1]
|
|
284
281
|
})));
|
|
285
282
|
}
|
|
286
283
|
|
|
287
284
|
matchStr = reg.exec(str);
|
|
288
285
|
}
|
|
289
286
|
|
|
290
|
-
var commonStrs = str.split(strReg);
|
|
287
|
+
var commonStrs = str === null || str === void 0 ? void 0 : str.split(strReg);
|
|
291
288
|
var renderData = [];
|
|
292
289
|
|
|
293
290
|
for (var i = 0; i < commonStrs.length; i++) {
|
|
@@ -313,11 +310,15 @@ var parseStringV2 = function parseStringV2(str) {
|
|
|
313
310
|
// @ts-ignore
|
|
314
311
|
var source = window.BSGlobal.tenantInfo.Source;
|
|
315
312
|
var ua = navigator.userAgent.toLowerCase();
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
313
|
+
|
|
314
|
+
if (source != 860 && ua.indexOf("micromessenger") == -1) {
|
|
315
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
316
|
+
dangerouslySetInnerHTML: {
|
|
317
|
+
__html: str
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
|
|
321
322
|
var reg = /\$(userName|departmentName)\=(.+?)\$/g;
|
|
322
323
|
var strReg = /\$(?:userName|departmentName)\=.+?\$/;
|
|
323
324
|
var openDatas = [];
|
|
@@ -337,7 +338,7 @@ var parseStringV2 = function parseStringV2(str) {
|
|
|
337
338
|
matchStr = reg.exec(str);
|
|
338
339
|
}
|
|
339
340
|
|
|
340
|
-
var commonStrs = str.split(strReg);
|
|
341
|
+
var commonStrs = (str === null || str === void 0 ? void 0 : str.split(strReg)) || [];
|
|
341
342
|
var renderData = [];
|
|
342
343
|
|
|
343
344
|
for (var i = 0; i < commonStrs.length; i++) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titaui/pc",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.64",
|
|
4
4
|
"nameCN": "",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@titaui/rc-trigger": "5.2.5",
|
|
79
79
|
"@titaui/react-flow-renderer": "9.5.4",
|
|
80
80
|
"@titaui/request": "^1.0.1",
|
|
81
|
-
"@titaui/rich-editor": "0.1.
|
|
81
|
+
"@titaui/rich-editor": "^0.1.46",
|
|
82
82
|
"@titaui/toast": "1.0.0",
|
|
83
83
|
"@types/color": "3.0.3",
|
|
84
84
|
"@types/prosemirror-commands": "1.0.4",
|
|
@@ -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,116 +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
|
-
var _attachments$index;
|
|
53
|
-
|
|
54
|
-
return f.Id !== attachments[index].Id || (f === null || f === void 0 ? void 0 : f.DocumentId) !== ((_attachments$index = attachments[index]) === null || _attachments$index === void 0 ? void 0 : _attachments$index.DocumentId);
|
|
55
|
-
}));
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
case 'preview':
|
|
60
|
-
{
|
|
61
|
-
if ((0, _util.isImg)(attachments[index].MediaType || attachments[index].FileType)) {
|
|
62
|
-
var i = attachments.filter(function (f) {
|
|
63
|
-
return (0, _util.isImg)(f.MediaType || attachments[index].FileType);
|
|
64
|
-
}).findIndex(function (f) {
|
|
65
|
-
return f.Id == attachments[index].Id;
|
|
66
|
-
});
|
|
67
|
-
previewRef.current.show(i);
|
|
68
|
-
} else {
|
|
69
|
-
var _attachments$index2, _attachments$index3;
|
|
70
|
-
|
|
71
|
-
window.open(((_attachments$index2 = attachments[index]) === null || _attachments$index2 === void 0 ? void 0 : _attachments$index2.ClientUrl) || ((_attachments$index3 = attachments[index]) === null || _attachments$index3 === void 0 ? void 0 : _attachments$index3.PreviewUrl));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
case 'download':
|
|
78
|
-
{
|
|
79
|
-
window.open(attachments[index].DownloadUrl);
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
if (!attachments.length && !enableUploadFile) return null;
|
|
86
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_imgViewer["default"], {
|
|
87
|
-
data: attachments.filter(function (f) {
|
|
88
|
-
return (0, _util.isImg)(f.MediaType || f.FileType);
|
|
89
|
-
}).map(function (f) {
|
|
90
|
-
return _objectSpread(_objectSpread({}, f), {}, {
|
|
91
|
-
previewUrl: f.ClientUrl || f.PreviewUrl
|
|
92
|
-
});
|
|
93
|
-
}),
|
|
94
|
-
ref: previewRef,
|
|
95
|
-
showDownload: true
|
|
96
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
97
|
-
className: prefix
|
|
98
|
-
}, attachments.map(function (item, index) {
|
|
99
|
-
return /*#__PURE__*/_react["default"].createElement(_uploadedPreview["default"], {
|
|
100
|
-
className: "".concat(prefix, "__item"),
|
|
101
|
-
key: index,
|
|
102
|
-
index: index,
|
|
103
|
-
uploadResultItem: _objectSpread(_objectSpread({}, item), {}, {
|
|
104
|
-
uploadStatus: 3,
|
|
105
|
-
percentComplete: 100,
|
|
106
|
-
Deleteable: enableDelete
|
|
107
|
-
}),
|
|
108
|
-
onSubmit: onSubmithandler
|
|
109
|
-
});
|
|
110
|
-
}), enableUploadFile && /*#__PURE__*/_react["default"].createElement(_dialogUpload["default"], {
|
|
111
|
-
onSubmit: onUploadFile
|
|
112
|
-
})));
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
var _default = AttachmentsPreview;
|
|
116
|
-
exports["default"] = _default;
|