@titaui/pc 1.12.24 → 1.12.26-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/attachments-preview/index.css +11 -0
- package/lib/components/attachments-preview/index.js +116 -0
- package/lib/components/auto-save/img/failed.svg +17 -0
- package/lib/components/auto-save/img/success.svg +16 -0
- package/lib/components/auto-save/index.css +39 -0
- package/lib/components/auto-save/index.js +78 -0
- package/lib/components/auto-save/interface.js +5 -0
- package/lib/components/avatar/default.js +5 -2
- package/lib/components/avatar/index.css +2 -0
- package/lib/components/book-demo/components/pc/components/content/index.css +6 -12
- package/lib/components/book-demo/components/pc/components/content/index.js +5 -3
- package/lib/components/book-demo/constant.js +4 -4
- package/lib/components/color-date-picker/index.css +69 -0
- package/lib/components/color-date-picker/index.js +129 -0
- package/lib/components/color-date-picker/interface.js +14 -0
- package/lib/components/dialog-confirm/index.css +1 -0
- package/lib/components/dialog-confirm/index.js +5 -3
- package/lib/components/dialog-upload/img/doc.svg +1 -0
- package/lib/components/dialog-upload/img/other.svg +1 -0
- package/lib/components/dialog-upload/img/pdf.svg +1 -0
- package/lib/components/dialog-upload/img/ppt.svg +1 -0
- package/lib/components/dialog-upload/img/radio.svg +1 -0
- package/lib/components/dialog-upload/img/video.svg +1 -0
- package/lib/components/dialog-upload/img/xls.svg +1 -0
- package/lib/components/dialog-upload/index.css +77 -0
- package/lib/components/dialog-upload/index.js +332 -0
- package/lib/components/dialog-upload/type.js +35 -0
- package/lib/components/dialog-upload/uploaded-preview.css +77 -0
- package/lib/components/dialog-upload/uploaded-preview.js +132 -0
- package/lib/components/dialog-upload/util.js +131 -0
- package/lib/components/drawer/index.css +5 -5
- package/lib/components/drawer/index.js +7 -7
- package/lib/components/drop-selector/index.js +7 -4
- package/lib/components/dynamic/components/comments-dialog/api.js +27 -0
- package/lib/components/dynamic/components/comments-dialog/encourage.js +119 -0
- 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 +14 -0
- package/lib/components/dynamic/components/comments-dialog/index.css +105 -0
- package/lib/components/dynamic/components/comments-dialog/index.js +202 -0
- package/lib/components/dynamic/components/comments-dialog/rate.js +143 -0
- 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/header/index.js +49 -47
- package/lib/components/dynamic/dynamic-item/components/okr-progress/constant.js +31 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.css +175 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +145 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/request-api.js +10 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/utils.js +10 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.css +8 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.js +26 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.css +8 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.js +26 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.css +197 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.js +222 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/request-api.js +20 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/util.js +134 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.css +10 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.js +60 -0
- package/lib/components/dynamic/dynamic-item/components/progress/index.css +25 -0
- package/lib/components/dynamic/dynamic-item/components/progress/index.js +71 -0
- package/lib/components/dynamic/dynamic-item/components/progress/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/index.css +35 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +31 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/constant.js +45 -0
- 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 +177 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +428 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/operate-record.js +49 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/request-api.js +17 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.css +30 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.js +55 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.css +50 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +65 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/constant.js +29 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +264 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +166 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/interface.js +22 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/render-row.js +78 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/request-api.js +16 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +158 -0
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +3 -2
- 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 +101 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +209 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +43 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +87 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +61 -0
- 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 +132 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +234 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +30 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/index.css +2 -1
- package/lib/components/dynamic/dynamic-item/index.js +54 -35
- package/lib/components/dynamic/dynamic-list/index.js +4 -6
- package/lib/components/form/form-fields/date/index.js +8 -7
- package/lib/components/guide-tip/index.css +68 -0
- package/lib/components/guide-tip/index.js +127 -0
- package/lib/components/import-modal/helper.js +170 -0
- package/lib/components/import-modal/image/loading.gif +0 -0
- package/lib/components/import-modal/import-okr-modal/index.css +18 -0
- package/lib/components/import-modal/import-okr-modal/index.js +146 -0
- package/lib/components/import-modal/import-task-modal/index.css +18 -0
- package/lib/components/import-modal/import-task-modal/index.js +251 -0
- package/lib/components/import-modal/import-task-modal/search-form.js +142 -0
- package/lib/components/import-modal/index.css +30 -0
- package/lib/components/import-modal/index.js +20 -0
- package/lib/components/import-modal/radio.js +62 -0
- package/lib/components/import-modal/request-api.js +204 -0
- package/lib/components/import-modal/search/category-select.js +74 -0
- package/lib/components/import-modal/search/okr-classify-select.js +74 -0
- package/lib/components/import-modal/search/okr-status-select.js +74 -0
- package/lib/components/import-modal/search/okr-type-select.js +87 -0
- package/lib/components/import-modal/search/principal.js +135 -0
- package/lib/components/import-modal/search/relation.js +89 -0
- package/lib/components/import-modal/search/search-dropdown/index.css +50 -0
- package/lib/components/import-modal/search/search-dropdown/index.js +32 -0
- package/lib/components/import-modal/search/task-relation.js +84 -0
- package/lib/components/import-modal/search/task-status-select.js +87 -0
- package/lib/components/import-modal/search/work-relation.js +83 -0
- package/lib/components/import-modal/search/work-status-select.js +74 -0
- package/lib/components/import-modal/tree/okr-tree/index.css +61 -0
- package/lib/components/import-modal/tree/okr-tree/index.js +269 -0
- package/lib/components/import-modal/tree/okr-tree/search-form.js +169 -0
- package/lib/components/import-modal/tree/task-work-tree/index.css +124 -0
- package/lib/components/import-modal/tree/task-work-tree/index.js +190 -0
- package/lib/components/import-modal/tree-node/index.css +0 -0
- package/lib/components/import-modal/tree-node/index.js +51 -0
- package/lib/components/import-modal/tree-node/kr-node/index.css +65 -0
- package/lib/components/import-modal/tree-node/kr-node/index.js +112 -0
- package/lib/components/import-modal/tree-node/milestone-node/index.css +61 -0
- package/lib/components/import-modal/tree-node/milestone-node/index.js +118 -0
- package/lib/components/import-modal/tree-node/o-node/index.css +53 -0
- package/lib/components/import-modal/tree-node/o-node/index.js +142 -0
- package/lib/components/import-modal/tree-node/work-node/index.css +51 -0
- package/lib/components/import-modal/tree-node/work-node/index.js +108 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/caidan-enjoy.svg +14 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-setup.svg +18 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-zongjie.svg +15 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/zongjie-s.svg +15 -0
- package/lib/components/menus/components/menu-tree/tree-node/index.css +120 -0
- package/lib/components/menus/components/menu-tree/tree-node/index.js +22 -2
- package/lib/components/menus/components/menu-tree/tree-node/subordinates.js +78 -0
- package/lib/components/menus/components/menu-tree/tree-node/summary-share.js +78 -0
- package/lib/components/menus/components/search-colleague/index.js +3 -1
- 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/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/export-modules/summary-menus/depart-menus/helper.js +56 -0
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.css +32 -0
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +233 -0
- package/lib/components/menus/export-modules/summary-menus/index.css +9 -0
- package/lib/components/menus/export-modules/summary-menus/index.js +136 -0
- package/lib/components/menus/export-modules/summary-menus/menu-highlight.js +76 -0
- package/lib/components/menus/export-modules/summary-menus/menus.js +201 -0
- package/lib/components/menus/export-modules/summary-menus/request-api.js +17 -0
- package/lib/components/menus/export-modules/summary-menus/subordinate-menus/helper.js +28 -0
- package/lib/components/menus/export-modules/summary-menus/subordinate-menus/index.css +14 -0
- package/lib/components/menus/export-modules/summary-menus/subordinate-menus/index.js +201 -0
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +243 -0
- package/lib/components/menus/i18n.js +8 -0
- package/lib/components/menus/index.js +6 -0
- package/lib/components/menus/request-apis.js +8 -2
- package/lib/components/nav-top/components/app-center/index.js +10 -9
- package/lib/components/nav-top/components/menu/index.js +11 -11
- package/lib/components/nav-top/components/user-message/index.js +19 -19
- package/lib/components/nav-top/index.js +18 -18
- package/lib/components/new-confidence/constant.js +53 -0
- package/lib/components/new-confidence/img/1.svg +40 -0
- package/lib/components/new-confidence/img/10.svg +33 -0
- package/lib/components/new-confidence/img/2.svg +40 -0
- package/lib/components/new-confidence/img/3.svg +40 -0
- package/lib/components/new-confidence/img/4.svg +40 -0
- package/lib/components/new-confidence/img/5.svg +40 -0
- package/lib/components/new-confidence/img/6.svg +40 -0
- package/lib/components/new-confidence/img/7.svg +40 -0
- package/lib/components/new-confidence/img/8.svg +40 -0
- package/lib/components/new-confidence/img/9.svg +40 -0
- package/lib/components/new-confidence/index.css +62 -0
- package/lib/components/new-confidence/index.js +115 -0
- package/lib/components/new-confidence/interface.js +5 -0
- 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/order-have-award/index.js +6 -6
- package/lib/components/period-selector/components/button/style.js +5 -5
- package/lib/components/picker/components/cross.svg +17 -0
- package/lib/components/picker/components/panels/date-panel/date-body.js +31 -19
- 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 +5 -0
- package/lib/components/picker/components/panels/month-panel/index.js +35 -4
- package/lib/components/picker/components/panels/month-panel/month-body.js +4 -5
- package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
- package/lib/components/picker/components/panels/week-panel/index.css +51 -0
- package/lib/components/picker/components/panels/week-panel/index.js +63 -0
- package/lib/components/picker/components/panels/week-panel/utils.js +146 -0
- package/lib/components/picker/components/panels/week-panel/week-body.js +79 -0
- package/lib/components/picker/components/panels/week-panel/week-head.js +80 -0
- package/lib/components/picker/components/panels/year-panel/index.css +5 -0
- package/lib/components/picker/components/panels/year-panel/index.js +34 -3
- package/lib/components/picker/components/panels/year-panel/year-body.js +10 -3
- package/lib/components/picker/components/picker-trigger/index.css +6 -1
- package/lib/components/picker/components/picker-trigger/index.js +16 -11
- package/lib/components/picker/context.js +17 -2
- package/lib/components/picker/index.css +29 -1
- package/lib/components/picker/index.js +3 -0
- package/lib/components/picker/picker-panels.js +106 -60
- package/lib/components/picker/picker.js +44 -30
- package/lib/components/picker/range-picker/components/picker-trigger/index.css +97 -0
- package/lib/components/picker/range-picker/components/picker-trigger/index.js +109 -0
- package/lib/components/picker/range-picker/components/placeholder/index.js +91 -0
- package/lib/components/picker/range-picker/components/select-input/index.js +79 -0
- package/lib/components/picker/range-picker/components/shortcuts/index.js +45 -0
- package/lib/components/picker/range-picker/index.css +158 -0
- package/lib/components/picker/range-picker/index.js +263 -0
- package/lib/components/picker/utils.js +168 -11
- package/lib/components/promise-confirm/index.css +0 -0
- package/lib/components/promise-confirm/index.js +117 -0
- package/lib/components/promise-confirm/interface.js +5 -0
- package/lib/components/rate/index.css +111 -0
- package/lib/components/rate/index.js +52 -0
- package/lib/components/regulation-setting-item/index.css +33 -0
- package/lib/components/regulation-setting-item/index.js +37 -0
- package/lib/components/rich-editor/schemas/list.js +0 -1
- 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/rich-editor-at/components/index.css +67 -0
- package/lib/components/rich-editor-at/components/index.js +189 -0
- package/lib/components/rich-editor-at/index.css +40 -0
- package/lib/components/rich-editor-at/index.js +113 -0
- package/lib/components/rich-editor-upload/index.css +11 -0
- package/lib/components/rich-editor-upload/index.js +87 -0
- package/lib/components/search-input/index.js +5 -0
- package/lib/components/select-tags/index.js +7 -1
- 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 +2 -2
- package/lib/components/textarea/index.js +8 -6
- package/lib/components/tooltip/tooltip.js +2 -2
- package/lib/components/upvote/index.js +10 -4
- package/lib/components/upvote/selector.js +2 -3
- 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/version-change-modal/constant.js +7 -7
- package/lib/components/version-change-modal/images/header-g1.png +0 -0
- package/lib/components/version-change-modal/images/header-p.png +0 -0
- package/lib/components/version-change-modal/images/okr-purple.png +0 -0
- package/lib/components/version-change-modal/images/performance-exam.png +0 -0
- package/lib/components/version-change-modal/index.css +36 -3
- package/lib/components/version-change-modal/index.js +63 -9
- package/lib/components/write-summary-modal/constants.js +21 -0
- package/lib/components/write-summary-modal/index.css +80 -0
- package/lib/components/write-summary-modal/index.js +167 -0
- package/lib/components/write-summary-modal/interface.js +19 -0
- package/lib/components/write-summary-modal/request-api.js +18 -0
- package/lib/components/write-summary-modal/utils.js +31 -0
- package/lib/index.js +64 -0
- package/lib/pages/aha2021/index.js +3 -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 +5 -0
- package/lib/utils/bs-global.js +1 -1
- package/lib/utils/constant.js +14 -2
- package/lib/utils/helpers.js +112 -12
- package/lib/utils/planDataJson.js +1 -0
- package/package.json +3 -2
|
@@ -75,6 +75,10 @@ var _dynamicInterview = _interopRequireDefault(require("./dynamic-interview"));
|
|
|
75
75
|
|
|
76
76
|
var _dynamicInterviewShare = _interopRequireDefault(require("./dynamic-interview-share"));
|
|
77
77
|
|
|
78
|
+
var _dynamicNewReport = _interopRequireDefault(require("./dynamic-new-report"));
|
|
79
|
+
|
|
80
|
+
var _excluded = ["data", "onDeleteFeed", "dynamicShareIsShowToping"];
|
|
81
|
+
|
|
78
82
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
79
83
|
|
|
80
84
|
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); }
|
|
@@ -87,6 +91,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
87
91
|
|
|
88
92
|
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; }
|
|
89
93
|
|
|
94
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
95
|
+
|
|
90
96
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
91
97
|
|
|
92
98
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -107,14 +113,20 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
107
113
|
|
|
108
114
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
109
115
|
|
|
110
|
-
var
|
|
116
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
117
|
+
|
|
118
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
119
|
+
|
|
120
|
+
var prefix = "titaui-dynamic-item";
|
|
111
121
|
|
|
112
122
|
var DynamicItem = function DynamicItem(_ref) {
|
|
113
123
|
var _getBSGlobal, _JSON$parse;
|
|
114
124
|
|
|
115
125
|
var data = _ref.data,
|
|
116
126
|
onDeleteFeed = _ref.onDeleteFeed,
|
|
117
|
-
dynamicShareIsShowToping = _ref.dynamicShareIsShowToping
|
|
127
|
+
dynamicShareIsShowToping = _ref.dynamicShareIsShowToping,
|
|
128
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
129
|
+
|
|
118
130
|
var feedId = data.feedId,
|
|
119
131
|
feedComments = data.feedComments,
|
|
120
132
|
praiseType = data.praiseType,
|
|
@@ -161,8 +173,8 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
161
173
|
isShowAtAll = _useContext.isShowAtAll;
|
|
162
174
|
|
|
163
175
|
var hasDynamicOpereateAuth = new _auth.DynamicManagerAuth().hasAuth();
|
|
164
|
-
var hasRewardBtn = !!((_getBSGlobal = (0, _bsGlobal.getBSGlobal)(
|
|
165
|
-
return item.AppId ===
|
|
176
|
+
var hasRewardBtn = !!((_getBSGlobal = (0, _bsGlobal.getBSGlobal)("WebHead")) !== null && _getBSGlobal !== void 0 && _getBSGlobal.AppHead.find(function (item) {
|
|
177
|
+
return item.AppId === "950";
|
|
166
178
|
}));
|
|
167
179
|
var isBiShare = data.shareType === _constant.EShareType.BiShare && data.biId;
|
|
168
180
|
|
|
@@ -182,10 +194,10 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
182
194
|
|
|
183
195
|
var handleShowMore = function handleShowMore() {
|
|
184
196
|
if (data.feedType === _constant.EFeedType.Report && window.titaTracker) {
|
|
185
|
-
window.titaTracker(
|
|
186
|
-
actionName:
|
|
187
|
-
actionGroup:
|
|
188
|
-
productName:
|
|
197
|
+
window.titaTracker("planAction").record({
|
|
198
|
+
actionName: "查看日报",
|
|
199
|
+
actionGroup: "动态-查看更多",
|
|
200
|
+
productName: "动态",
|
|
189
201
|
feedId: feedId
|
|
190
202
|
});
|
|
191
203
|
}
|
|
@@ -194,18 +206,18 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
194
206
|
};
|
|
195
207
|
|
|
196
208
|
var onChangeParse = function onChangeParse(type) {
|
|
197
|
-
var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)(
|
|
209
|
+
var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)("loginUserInfo"),
|
|
198
210
|
Id = _getBSGlobal2.Id;
|
|
199
211
|
|
|
200
212
|
var data = _toConsumableArray(praiseData).filter(function (item) {
|
|
201
213
|
return Number("".concat(item.userId)) !== Number("".concat(Id));
|
|
202
214
|
});
|
|
203
215
|
|
|
204
|
-
var actionName =
|
|
216
|
+
var actionName = "";
|
|
205
217
|
|
|
206
218
|
if (type) {
|
|
207
|
-
var avatar = (0, _bsGlobal.getBSGlobal)(
|
|
208
|
-
var name = (0, _bsGlobal.getBSGlobal)(
|
|
219
|
+
var avatar = (0, _bsGlobal.getBSGlobal)("loginUserInfo").UserAvatar;
|
|
220
|
+
var name = (0, _bsGlobal.getBSGlobal)("loginUserInfo").Name;
|
|
209
221
|
avatar.color = avatar.Color;
|
|
210
222
|
avatar.medium = avatar.Medium;
|
|
211
223
|
var parseUser = {
|
|
@@ -215,17 +227,17 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
215
227
|
praiseType: type
|
|
216
228
|
};
|
|
217
229
|
setPraiseData([parseUser].concat(_toConsumableArray(data)));
|
|
218
|
-
actionName =
|
|
230
|
+
actionName = "点赞日报";
|
|
219
231
|
} else {
|
|
220
232
|
setPraiseData(data);
|
|
221
|
-
actionName =
|
|
233
|
+
actionName = "取消日报点赞";
|
|
222
234
|
}
|
|
223
235
|
|
|
224
236
|
if (feedType === _constant.EFeedType.Report && window.titaTracker) {
|
|
225
|
-
window.titaTracker(
|
|
237
|
+
window.titaTracker("planAction").record({
|
|
226
238
|
actionName: actionName,
|
|
227
|
-
actionGroup:
|
|
228
|
-
productName:
|
|
239
|
+
actionGroup: "动态-日报",
|
|
240
|
+
productName: "动态",
|
|
229
241
|
feedId: feedId
|
|
230
242
|
});
|
|
231
243
|
}
|
|
@@ -276,10 +288,17 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
276
288
|
});
|
|
277
289
|
|
|
278
290
|
case _constant.EFeedType.Report:
|
|
279
|
-
|
|
291
|
+
if (data.newSummary) {
|
|
292
|
+
return /*#__PURE__*/_react["default"].createElement(_dynamicNewReport["default"], _extends({
|
|
293
|
+
data: data,
|
|
294
|
+
onDeleteFeed: onDeleteFeed
|
|
295
|
+
}, restProps));
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
return /*#__PURE__*/_react["default"].createElement(_dynamicReport["default"], _extends({
|
|
280
299
|
data: data,
|
|
281
300
|
onDeleteFeed: onDeleteFeed
|
|
282
|
-
});
|
|
301
|
+
}, restProps));
|
|
283
302
|
|
|
284
303
|
case _constant.EFeedType.Reply:
|
|
285
304
|
return /*#__PURE__*/_react["default"].createElement(_dynamicReply["default"], {
|
|
@@ -362,7 +381,7 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
362
381
|
|
|
363
382
|
var renderUpvoteCount = function renderUpvoteCount(type, count) {
|
|
364
383
|
if (count === 0) {
|
|
365
|
-
return
|
|
384
|
+
return "";
|
|
366
385
|
}
|
|
367
386
|
|
|
368
387
|
return count || type;
|
|
@@ -380,10 +399,10 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
380
399
|
|
|
381
400
|
if (window.util) {
|
|
382
401
|
if (feedType === _constant.EFeedType.Report && window.titaTracker) {
|
|
383
|
-
window.titaTracker(
|
|
384
|
-
actionName:
|
|
385
|
-
actionGroup:
|
|
386
|
-
productName:
|
|
402
|
+
window.titaTracker("planAction").record({
|
|
403
|
+
actionName: "打开打赏弹层",
|
|
404
|
+
actionGroup: "动态-日报",
|
|
405
|
+
productName: "动态",
|
|
387
406
|
feedId: feedId
|
|
388
407
|
});
|
|
389
408
|
}
|
|
@@ -397,13 +416,13 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
397
416
|
var handleReply = function handleReply(_ref2) {
|
|
398
417
|
var submitType = _ref2.submitType;
|
|
399
418
|
if (feedType !== _constant.EFeedType.Report) return;
|
|
400
|
-
var actionName = submitType ===
|
|
419
|
+
var actionName = submitType === "delete" ? "删除日报评论" : "评论日报";
|
|
401
420
|
|
|
402
421
|
if (window.titaTracker) {
|
|
403
|
-
window.titaTracker(
|
|
422
|
+
window.titaTracker("planAction").record({
|
|
404
423
|
actionName: actionName,
|
|
405
|
-
actionGroup:
|
|
406
|
-
productName:
|
|
424
|
+
actionGroup: "动态-日报",
|
|
425
|
+
productName: "动态",
|
|
407
426
|
feedId: feedId
|
|
408
427
|
});
|
|
409
428
|
}
|
|
@@ -431,15 +450,15 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
431
450
|
className: "".concat(prefix, "__content"),
|
|
432
451
|
ref: dynamicContentRef,
|
|
433
452
|
style: {
|
|
434
|
-
height: contentIsOverflow && isFold ?
|
|
453
|
+
height: contentIsOverflow && isFold ? "288px" : "auto"
|
|
435
454
|
}
|
|
436
455
|
}, renderContent, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
437
456
|
condition: contentIsOverflow && isFold
|
|
438
457
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
439
458
|
className: "".concat(prefix, "__content-show-more"),
|
|
440
459
|
onClick: handleShowMore
|
|
441
|
-
}, (0, _getLocale.getLocale)(
|
|
442
|
-
className: (0, _classnames["default"])(
|
|
460
|
+
}, (0, _getLocale.getLocale)("Tasks_Tab_MyS_Butt_Seemoral"), /*#__PURE__*/_react["default"].createElement("i", {
|
|
461
|
+
className: (0, _classnames["default"])("tu-icon-arrow-down", "".concat(prefix, "__icon"))
|
|
443
462
|
})))), feedOperations.total > 0 && /*#__PURE__*/_react["default"].createElement(_feedOperate["default"], {
|
|
444
463
|
feedOperations: feedOperations,
|
|
445
464
|
data: data
|
|
@@ -477,12 +496,12 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
477
496
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
478
497
|
className: "".concat(prefix, "__footer-fold"),
|
|
479
498
|
onClick: handleFold
|
|
480
|
-
}, (0, _getLocale.getLocale)(
|
|
481
|
-
className: (0, _classnames["default"])(
|
|
499
|
+
}, (0, _getLocale.getLocale)("Mod_Fold"), /*#__PURE__*/_react["default"].createElement("i", {
|
|
500
|
+
className: (0, _classnames["default"])("tu-icon-arrow-down", "".concat(prefix, "__icon"), "".concat(prefix, "__icon-up"))
|
|
482
501
|
}))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
483
502
|
condition: hasRewardBtn
|
|
484
503
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
485
|
-
overlay: (0, _getLocale.getLocale)(
|
|
504
|
+
overlay: (0, _getLocale.getLocale)("Feed_Approval"),
|
|
486
505
|
align: {
|
|
487
506
|
offset: [0, 0]
|
|
488
507
|
},
|
|
@@ -492,7 +511,7 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
492
511
|
className: (0, _classnames["default"])("".concat(prefix, "__footer-icon"), "".concat(prefix, "__footer-icon-redenvelopes"))
|
|
493
512
|
}))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
494
513
|
onClick: handleCommentClick,
|
|
495
|
-
className: (0, _classnames["default"])(
|
|
514
|
+
className: (0, _classnames["default"])("tu-icon-pinglun-m", "".concat(prefix, "__footer-icon"))
|
|
496
515
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
497
516
|
condition: feedComments.total > 0
|
|
498
517
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -38,15 +38,13 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
38
38
|
_ref$height = _ref.height,
|
|
39
39
|
height = _ref$height === void 0 ? -1 : _ref$height,
|
|
40
40
|
_ref$searchKeyWord = _ref.searchKeyWord,
|
|
41
|
-
searchKeyWord = _ref$searchKeyWord === void 0 ?
|
|
41
|
+
searchKeyWord = _ref$searchKeyWord === void 0 ? '' : _ref$searchKeyWord,
|
|
42
42
|
atAllText = _ref.atAllText,
|
|
43
43
|
atAllTipText = _ref.atAllTipText,
|
|
44
44
|
atAllValue = _ref.atAllValue,
|
|
45
45
|
isShowAtAll = _ref.isShowAtAll,
|
|
46
46
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
47
47
|
|
|
48
|
-
console.log(123, restProps);
|
|
49
|
-
|
|
50
48
|
var handleDeleteFeed = function handleDeleteFeed(feedId) {
|
|
51
49
|
if (onDeleteFeed) {
|
|
52
50
|
onDeleteFeed(feedId);
|
|
@@ -64,7 +62,7 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
64
62
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
63
|
className: prefix,
|
|
66
64
|
style: {
|
|
67
|
-
minHeight: height === -1 ?
|
|
65
|
+
minHeight: height === -1 ? 'auto' : height
|
|
68
66
|
}
|
|
69
67
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
70
68
|
condition: data.length === 0
|
|
@@ -76,7 +74,7 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
76
74
|
alt: ""
|
|
77
75
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
78
76
|
className: "".concat(prefix, "__empty-text")
|
|
79
|
-
}, (0, _getLocale.getLocale)(
|
|
77
|
+
}, (0, _getLocale.getLocale)('OKR_Noinformation')))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
80
78
|
condition: data.length !== 0
|
|
81
79
|
}, /*#__PURE__*/_react["default"].createElement(_rcQueueAnim["default"], {
|
|
82
80
|
type: "bottom",
|
|
@@ -85,7 +83,7 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
85
83
|
animConfig: [{
|
|
86
84
|
opacity: [1, 0]
|
|
87
85
|
}, {
|
|
88
|
-
display:
|
|
86
|
+
display: 'none'
|
|
89
87
|
}]
|
|
90
88
|
}, data.map(function (item) {
|
|
91
89
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -48,16 +48,16 @@ var Date = function Date(props) {
|
|
|
48
48
|
switch (type) {
|
|
49
49
|
case "date":
|
|
50
50
|
newDate = (0, _moment["default"])(value || (0, _moment["default"])()).set({
|
|
51
|
-
year: (0, _moment["default"])(date).year(),
|
|
52
|
-
month: (0, _moment["default"])(date).month(),
|
|
53
|
-
date: (0, _moment["default"])(date).date()
|
|
51
|
+
year: (0, _moment["default"])(date[0]).year(),
|
|
52
|
+
month: (0, _moment["default"])(date[0]).month(),
|
|
53
|
+
date: (0, _moment["default"])(date[0]).date()
|
|
54
54
|
});
|
|
55
55
|
break;
|
|
56
56
|
|
|
57
57
|
case "time":
|
|
58
58
|
newDate = (0, _moment["default"])(value || (0, _moment["default"])()).set({
|
|
59
|
-
hour: (0, _moment["default"])(date, "HH:mm").hour(),
|
|
60
|
-
minute: (0, _moment["default"])(date, "HH:mm").minute()
|
|
59
|
+
hour: (0, _moment["default"])(date[0], "HH:mm").hour(),
|
|
60
|
+
minute: (0, _moment["default"])(date[0], "HH:mm").minute()
|
|
61
61
|
});
|
|
62
62
|
break;
|
|
63
63
|
|
|
@@ -66,6 +66,7 @@ var Date = function Date(props) {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
onChange(newDate);
|
|
69
|
+
return true;
|
|
69
70
|
};
|
|
70
71
|
|
|
71
72
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -81,14 +82,14 @@ var Date = function Date(props) {
|
|
|
81
82
|
}, /*#__PURE__*/_react["default"].createElement(_picker["default"], _extends({
|
|
82
83
|
value: value,
|
|
83
84
|
onChange: function onChange(date) {
|
|
84
|
-
return onDateChange(date,
|
|
85
|
+
return onDateChange(date, 'date');
|
|
85
86
|
},
|
|
86
87
|
popupAlign: datePopupAlign
|
|
87
88
|
}, restProps)), /*#__PURE__*/_react["default"].createElement(_timePicker["default"], _extends({
|
|
88
89
|
value: value,
|
|
89
90
|
popupAlign: timePopupAlign,
|
|
90
91
|
onChange: function onChange(time) {
|
|
91
|
-
return onDateChange(time, "time");
|
|
92
|
+
return onDateChange([time], "time");
|
|
92
93
|
}
|
|
93
94
|
}, restProps))));
|
|
94
95
|
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
.titaui-pc__guide-tip__popup {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: flex-start;
|
|
5
|
+
background: #5c8eff;
|
|
6
|
+
box-shadow: 0px -4px 12px 0px rgba(127, 145, 180, 0.2);
|
|
7
|
+
border: 1px solid #ffffff;
|
|
8
|
+
padding: 16px;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
border-radius: 24px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.titaui-pc__guide-tip__popup--button {
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
align-items: flex-end;
|
|
16
|
+
margin-top: 8px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.titaui-pc__guide-tip__popup-close-icon {
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
color: #fff;
|
|
22
|
+
margin-left: 10px;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.titaui-pc__guide-tip__popup-triangle {
|
|
27
|
+
position: absolute;
|
|
28
|
+
bottom: -4px;
|
|
29
|
+
left: 50%;
|
|
30
|
+
margin-left: -4px;
|
|
31
|
+
width: 0;
|
|
32
|
+
height: 0;
|
|
33
|
+
border-left: 5px solid transparent;
|
|
34
|
+
border-right: 5px solid transparent;
|
|
35
|
+
border-top: 5px solid #fff;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.titaui-pc__guide-tip__popup-triangle::after {
|
|
39
|
+
content: '';
|
|
40
|
+
width: 0;
|
|
41
|
+
height: 0;
|
|
42
|
+
position: absolute;
|
|
43
|
+
left: -4px;
|
|
44
|
+
bottom: 1px;
|
|
45
|
+
border-left: solid 4px transparent;
|
|
46
|
+
border-right: solid 4px transparent;
|
|
47
|
+
border-top: solid 4px #5c8eff;
|
|
48
|
+
z-index: 99;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.titaui-pc__guide-tip__popup-triangle--bottom {
|
|
52
|
+
top: -4px;
|
|
53
|
+
transform: rotate(180deg);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.titaui-pc__guide-tip__popup-triangle--left {
|
|
57
|
+
top: 50%;
|
|
58
|
+
margin-top: -4px;
|
|
59
|
+
left: 100.5%;
|
|
60
|
+
transform: rotate(-90deg);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.titaui-pc__guide-tip__popup-triangle--right {
|
|
64
|
+
left: -4px;
|
|
65
|
+
top: 50%;
|
|
66
|
+
margin-top: -4px;
|
|
67
|
+
transform: rotate(90deg);
|
|
68
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
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 _popup = _interopRequireDefault(require("../popup"));
|
|
15
|
+
|
|
16
|
+
var _button = _interopRequireDefault(require("../button"));
|
|
17
|
+
|
|
18
|
+
require("./index.css");
|
|
19
|
+
|
|
20
|
+
var _excluded = ["type", "width", "time", "children", "popupPlacement", "classnames", "content", "onClickClose", "buttonTitle"];
|
|
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 _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
+
|
|
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
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
33
|
+
|
|
34
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
35
|
+
|
|
36
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
+
|
|
38
|
+
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."); }
|
|
39
|
+
|
|
40
|
+
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); }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
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; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
var preCls = 'titaui-pc__guide-tip';
|
|
49
|
+
var GuideTip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
50
|
+
var _useState = (0, _react.useState)(false),
|
|
51
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
52
|
+
popupVisible = _useState2[0],
|
|
53
|
+
setPopupVisible = _useState2[1];
|
|
54
|
+
|
|
55
|
+
var popupRef = (0, _react.useRef)({
|
|
56
|
+
open: function open() {},
|
|
57
|
+
close: function close() {}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
var _props$type = props.type,
|
|
61
|
+
type = _props$type === void 0 ? 'default' : _props$type,
|
|
62
|
+
_props$width = props.width,
|
|
63
|
+
width = _props$width === void 0 ? 304 : _props$width,
|
|
64
|
+
_props$time = props.time,
|
|
65
|
+
time = _props$time === void 0 ? 3000 : _props$time,
|
|
66
|
+
children = props.children,
|
|
67
|
+
_props$popupPlacement = props.popupPlacement,
|
|
68
|
+
popupPlacement = _props$popupPlacement === void 0 ? 'top' : _props$popupPlacement,
|
|
69
|
+
_props$classnames = props.classnames,
|
|
70
|
+
classnames = _props$classnames === void 0 ? "".concat(preCls, "__popup") : _props$classnames,
|
|
71
|
+
content = props.content,
|
|
72
|
+
onClickClose = props.onClickClose,
|
|
73
|
+
_props$buttonTitle = props.buttonTitle,
|
|
74
|
+
buttonTitle = _props$buttonTitle === void 0 ? '好哒' : _props$buttonTitle,
|
|
75
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
76
|
+
|
|
77
|
+
var handleCloseGuidePopup = function handleCloseGuidePopup() {
|
|
78
|
+
onClickClose();
|
|
79
|
+
popupRef.current.close();
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var renderPopupContent = function renderPopupContent() {
|
|
83
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
|
+
className: (0, _classnames["default"])("".concat(preCls, "__popup"), _defineProperty({}, classnames, classnames), _defineProperty({}, "".concat(preCls, "__popup--button"), type === 'button')),
|
|
85
|
+
style: {
|
|
86
|
+
width: "".concat(width, "px")
|
|
87
|
+
}
|
|
88
|
+
}, content, type === 'default' && /*#__PURE__*/_react["default"].createElement("div", {
|
|
89
|
+
className: "".concat(preCls, "__popup-close")
|
|
90
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
91
|
+
className: (0, _classnames["default"])('tu-icon-close', "".concat(preCls, "__popup-close-icon")),
|
|
92
|
+
onClick: handleCloseGuidePopup
|
|
93
|
+
})), type === 'button' && /*#__PURE__*/_react["default"].createElement(_button["default"].Rect, {
|
|
94
|
+
text: buttonTitle,
|
|
95
|
+
size: "small"
|
|
96
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
97
|
+
className: (0, _classnames["default"])("".concat(preCls, "__popup-triangle"), "".concat(preCls, "__popup-triangle--").concat(popupPlacement))
|
|
98
|
+
}));
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
102
|
+
return {
|
|
103
|
+
showGuideTip: function showGuideTip() {
|
|
104
|
+
return setPopupVisible(true);
|
|
105
|
+
},
|
|
106
|
+
hideGuideTip: function hideGuideTip() {
|
|
107
|
+
return setPopupVisible(false);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
});
|
|
111
|
+
(0, _react.useEffect)(function () {
|
|
112
|
+
if (type === 'time') {
|
|
113
|
+
setTimeout(function () {
|
|
114
|
+
setPopupVisible(false);
|
|
115
|
+
}, time);
|
|
116
|
+
}
|
|
117
|
+
}, []);
|
|
118
|
+
return /*#__PURE__*/_react["default"].createElement(_popup["default"], _extends({
|
|
119
|
+
ref: popupRef,
|
|
120
|
+
action: ['focus'],
|
|
121
|
+
popupPlacement: popupPlacement,
|
|
122
|
+
popup: renderPopupContent(),
|
|
123
|
+
popupVisible: popupVisible
|
|
124
|
+
}, restProps), children);
|
|
125
|
+
});
|
|
126
|
+
var _default = GuideTip;
|
|
127
|
+
exports["default"] = _default;
|