@titaui/pc 1.12.13-beta.1 → 1.12.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/communication/index.js +6 -0
- package/lib/components/dialog-confirm/index.css +0 -1
- package/lib/components/dialog-confirm/index.js +3 -5
- package/lib/components/drawer/index.css +9 -0
- package/lib/components/drawer/index.js +11 -8
- package/lib/components/dynamic/dynamic-item/components/header/index.js +5 -1
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/index.css +0 -1
- package/lib/components/dynamic/dynamic-item/index.js +14 -19
- package/lib/components/dynamic/dynamic-list/index.js +19 -2
- package/lib/components/form/form-fields/date/index.js +13 -13
- package/lib/components/menus/components/menu-tree/tree-node/index.css +0 -120
- package/lib/components/menus/components/menu-tree/tree-node/index.js +2 -22
- package/lib/components/menus/export-modules/appraisal-menus/index.js +30 -12
- package/lib/components/menus/export-modules/appraisal-menus/menu-highlight.js +22 -6
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +104 -9
- package/lib/components/menus/export-modules/okr-menus/menus.js +6 -3
- package/lib/components/menus/i18n.js +0 -8
- package/lib/components/menus/index.js +0 -6
- package/lib/components/menus/request-apis.js +2 -8
- package/lib/components/nav-top/components/app-center/images/chart.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/file.svg +20 -0
- package/lib/components/nav-top/components/app-center/images/interview.svg +20 -0
- package/lib/components/nav-top/components/app-center/images/learning.svg +23 -0
- package/lib/components/nav-top/components/app-center/images/okr.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/performance.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/plan.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/project.svg +23 -0
- package/lib/components/nav-top/components/app-center/images/summary.svg +23 -0
- package/lib/components/nav-top/components/app-center/index.css +154 -0
- package/lib/components/{import-modal/import-okr-modal → nav-top/components/app-center}/index.js +104 -84
- package/lib/components/nav-top/components/menu/index.js +3 -7
- package/lib/components/nav-top/index.css +48 -7
- package/lib/components/nav-top/index.js +54 -33
- package/lib/components/nav-top/utils.js +464 -1
- package/lib/components/okr-detail/components/header/o-avatar.js +6 -0
- package/lib/components/okr-flow/export-modal/color.png +0 -0
- package/lib/components/okr-flow/export-modal/index.css +28 -13
- package/lib/components/okr-flow/export-modal/index.js +81 -44
- package/lib/components/okr-flow/export-modal/trans1.png +0 -0
- package/lib/components/period-selector/components/button/style.js +1 -1
- package/lib/components/period-selector/index.css +1 -0
- package/lib/components/period-selector/index.js +7 -2
- package/lib/components/picker/components/panels/date-panel/date-body.js +19 -31
- package/lib/components/picker/components/panels/date-panel/date-head.js +8 -8
- package/lib/components/picker/components/panels/date-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/index.css +0 -5
- package/lib/components/picker/components/panels/month-panel/index.js +4 -34
- package/lib/components/picker/components/panels/month-panel/month-body.js +5 -4
- package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
- package/lib/components/picker/components/panels/year-panel/index.css +0 -5
- package/lib/components/picker/components/panels/year-panel/index.js +3 -34
- package/lib/components/picker/components/panels/year-panel/year-body.js +3 -10
- package/lib/components/picker/components/picker-trigger/index.css +1 -6
- package/lib/components/picker/components/picker-trigger/index.js +11 -16
- package/lib/components/picker/context.js +2 -17
- package/lib/components/picker/index.css +1 -29
- package/lib/components/picker/index.js +0 -3
- package/lib/components/picker/picker-panels.js +61 -98
- package/lib/components/picker/picker.js +30 -44
- package/lib/components/picker/utils.js +11 -168
- package/lib/components/rich-editor/schemas/list.js +1 -0
- package/lib/components/search-input/index.js +0 -5
- package/lib/components/select-layer/index.js +22 -8
- package/lib/components/select-tags/index.js +1 -7
- package/lib/components/task-relation-modal/helper.js +1 -56
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +1 -4
- package/lib/components/task-relation-modal/okr-relation/request-api.js +2 -6
- package/lib/components/task-relation-modal/request-api.js +5 -2
- package/lib/components/task-relation-modal/tree/work-tree/index.js +27 -31
- package/lib/components/task-relation-modal/tree/work-tree/search-form.js +22 -3
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +11 -11
- package/lib/components/textarea/index.js +5 -7
- package/lib/components/tooltip/tooltip.js +9 -4
- package/lib/components/user-selector/category-selector-panel/depart-tree.js +3 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.css +11 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +21 -3
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.css +1 -1
- package/lib/components/user-selector/request-apis.js +39 -9
- package/lib/components/user-selector/searched-panel/index.js +7 -1
- package/lib/index.js +0 -56
- package/lib/pages/aha2021/index.js +5 -5
- package/lib/pages/aha2021/new-menu-switcher/index.css +40 -0
- package/lib/{components/import-modal/radio.js → pages/aha2021/new-menu-switcher/index.js} +42 -23
- package/lib/pages/aha2021/new-menu-switcher/new-menu-bg.png +0 -0
- package/lib/pages/aha2021/request-api.js +15 -0
- package/lib/pages/okr-map/level2-search/user.js +1 -0
- package/lib/utils/bs-global.js +1 -1
- package/lib/utils/constant.js +2 -14
- package/lib/utils/helpers.js +11 -56
- package/package.json +1 -2
- package/lib/components/attachments-preview/index.css +0 -11
- package/lib/components/attachments-preview/index.js +0 -112
- package/lib/components/auto-save/img/failed.svg +0 -17
- package/lib/components/auto-save/img/success.svg +0 -16
- package/lib/components/auto-save/index.css +0 -39
- package/lib/components/auto-save/index.js +0 -78
- package/lib/components/auto-save/interface.js +0 -5
- package/lib/components/color-date-picker/index.css +0 -72
- package/lib/components/color-date-picker/index.js +0 -129
- package/lib/components/color-date-picker/interface.js +0 -14
- package/lib/components/dialog-upload/img/doc.svg +0 -1
- package/lib/components/dialog-upload/img/other.svg +0 -1
- package/lib/components/dialog-upload/img/pdf.svg +0 -1
- package/lib/components/dialog-upload/img/ppt.svg +0 -1
- package/lib/components/dialog-upload/img/radio.svg +0 -1
- package/lib/components/dialog-upload/img/video.svg +0 -1
- package/lib/components/dialog-upload/img/xls.svg +0 -1
- package/lib/components/dialog-upload/index.css +0 -77
- package/lib/components/dialog-upload/index.js +0 -330
- package/lib/components/dialog-upload/type.js +0 -35
- package/lib/components/dialog-upload/uploaded-preview.css +0 -77
- package/lib/components/dialog-upload/uploaded-preview.js +0 -132
- package/lib/components/dialog-upload/util.js +0 -131
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/api.js +0 -27
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/encourage.js +0 -119
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/APP-shoucang-m.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/ascore.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curEfforts.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curGood.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curGreat.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/efforts.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/good.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/great.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/halfscore.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/loading.gif +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/score.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/top.svg +0 -14
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.css +0 -75
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.js +0 -195
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/rate.js +0 -143
- package/lib/components/dynamic/dynamic-item/components/header/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/constant.js +0 -31
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.css +0 -170
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +0 -151
- package/lib/components/dynamic/dynamic-item/components/okr-progress/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/okr-progress/request-api.js +0 -10
- package/lib/components/dynamic/dynamic-item/components/okr-progress/utils.js +0 -10
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.css +0 -8
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.js +0 -26
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.css +0 -8
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.js +0 -26
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.css +0 -197
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.js +0 -220
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/request-api.js +0 -20
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/util.js +0 -134
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.css +0 -10
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.js +0 -60
- package/lib/components/dynamic/dynamic-item/components/progress/index.css +0 -25
- package/lib/components/dynamic/dynamic-item/components/progress/index.js +0 -71
- package/lib/components/dynamic/dynamic-item/components/progress/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/schedule/index.css +0 -31
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +0 -59
- package/lib/components/dynamic/dynamic-item/components/schedule/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/summary-header/constant.js +0 -45
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.css +0 -166
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +0 -360
- package/lib/components/dynamic/dynamic-item/components/summary-header/operate-record.js +0 -49
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.css +0 -24
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.js +0 -52
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.css +0 -50
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +0 -65
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/task-progress/constant.js +0 -16
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +0 -201
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +0 -169
- package/lib/components/dynamic/dynamic-item/components/task-progress/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +0 -27
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/come-on-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/come-on-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/evaluate-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/nice-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/nice-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/very-good-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/very-good-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.css +0 -68
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +0 -50
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +0 -43
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +0 -87
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +0 -45
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +0 -171
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +0 -231
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +0 -30
- package/lib/components/import-modal/helper.js +0 -179
- package/lib/components/import-modal/image/loading.gif +0 -0
- package/lib/components/import-modal/import-okr-modal/index.css +0 -18
- package/lib/components/import-modal/import-task-modal/index.css +0 -18
- package/lib/components/import-modal/import-task-modal/index.js +0 -241
- package/lib/components/import-modal/import-task-modal/search-form.js +0 -135
- package/lib/components/import-modal/index.css +0 -30
- package/lib/components/import-modal/index.js +0 -20
- package/lib/components/import-modal/request-api.js +0 -204
- package/lib/components/import-modal/search/category-select.js +0 -74
- package/lib/components/import-modal/search/okr-classify-select.js +0 -74
- package/lib/components/import-modal/search/okr-status-select.js +0 -74
- package/lib/components/import-modal/search/okr-type-select.js +0 -87
- package/lib/components/import-modal/search/principal.js +0 -135
- package/lib/components/import-modal/search/relation.js +0 -80
- package/lib/components/import-modal/search/search-dropdown/index.css +0 -50
- package/lib/components/import-modal/search/search-dropdown/index.js +0 -32
- package/lib/components/import-modal/search/task-relation.js +0 -83
- package/lib/components/import-modal/search/task-status-select.js +0 -87
- package/lib/components/import-modal/search/work-relation.js +0 -83
- package/lib/components/import-modal/search/work-status-select.js +0 -74
- package/lib/components/import-modal/tree/okr-tree/index.css +0 -61
- package/lib/components/import-modal/tree/okr-tree/index.js +0 -267
- package/lib/components/import-modal/tree/okr-tree/search-form.js +0 -169
- package/lib/components/import-modal/tree/task-work-tree/index.css +0 -123
- package/lib/components/import-modal/tree/task-work-tree/index.js +0 -187
- package/lib/components/import-modal/tree-node/index.css +0 -0
- package/lib/components/import-modal/tree-node/index.js +0 -51
- package/lib/components/import-modal/tree-node/kr-node/index.css +0 -58
- package/lib/components/import-modal/tree-node/kr-node/index.js +0 -108
- package/lib/components/import-modal/tree-node/milestone-node/index.css +0 -61
- package/lib/components/import-modal/tree-node/milestone-node/index.js +0 -118
- package/lib/components/import-modal/tree-node/o-node/index.css +0 -46
- package/lib/components/import-modal/tree-node/o-node/index.js +0 -138
- package/lib/components/import-modal/tree-node/work-node/index.css +0 -51
- package/lib/components/import-modal/tree-node/work-node/index.js +0 -108
- package/lib/components/menus/components/menu-tree/images/summary-menu/caidan-enjoy.svg +0 -14
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-setup.svg +0 -18
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-zongjie.svg +0 -15
- package/lib/components/menus/components/menu-tree/images/summary-menu/zongjie-s.svg +0 -15
- package/lib/components/menus/components/menu-tree/tree-node/subordinates.js +0 -78
- package/lib/components/menus/components/menu-tree/tree-node/summary-share.js +0 -78
- package/lib/components/menus/export-modules/summary-menus/depart-menus/helper.js +0 -56
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.css +0 -32
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +0 -231
- package/lib/components/menus/export-modules/summary-menus/index.css +0 -9
- package/lib/components/menus/export-modules/summary-menus/index.js +0 -134
- package/lib/components/menus/export-modules/summary-menus/menu-highlight.js +0 -76
- package/lib/components/menus/export-modules/summary-menus/menus.js +0 -190
- package/lib/components/menus/export-modules/summary-menus/request-api.js +0 -17
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +0 -242
- package/lib/components/new-confidence/constant.js +0 -53
- package/lib/components/new-confidence/img/1.svg +0 -40
- package/lib/components/new-confidence/img/10.svg +0 -33
- package/lib/components/new-confidence/img/2.svg +0 -40
- package/lib/components/new-confidence/img/3.svg +0 -40
- package/lib/components/new-confidence/img/4.svg +0 -40
- package/lib/components/new-confidence/img/5.svg +0 -40
- package/lib/components/new-confidence/img/6.svg +0 -40
- package/lib/components/new-confidence/img/7.svg +0 -40
- package/lib/components/new-confidence/img/8.svg +0 -40
- package/lib/components/new-confidence/img/9.svg +0 -40
- package/lib/components/new-confidence/index.css +0 -62
- package/lib/components/new-confidence/index.js +0 -115
- package/lib/components/new-confidence/interface.js +0 -5
- package/lib/components/picker/components/cross.svg +0 -17
- package/lib/components/picker/components/panels/week-panel/index.css +0 -42
- package/lib/components/picker/components/panels/week-panel/index.js +0 -49
- package/lib/components/picker/components/panels/week-panel/utils.js +0 -124
- package/lib/components/picker/components/panels/week-panel/week-body.js +0 -71
- package/lib/components/picker/components/panels/week-panel/week-head.js +0 -80
- package/lib/components/picker/range-picker/components/picker-trigger/index.css +0 -97
- package/lib/components/picker/range-picker/components/picker-trigger/index.js +0 -109
- package/lib/components/picker/range-picker/components/placeholder/index.js +0 -91
- package/lib/components/picker/range-picker/components/select-input/index.js +0 -72
- package/lib/components/picker/range-picker/components/shortcuts/index.js +0 -45
- package/lib/components/picker/range-picker/index.css +0 -158
- package/lib/components/picker/range-picker/index.js +0 -263
- package/lib/components/promise-confirm/index.css +0 -0
- package/lib/components/promise-confirm/index.js +0 -117
- package/lib/components/promise-confirm/interface.js +0 -5
- package/lib/components/rate/index.css +0 -111
- package/lib/components/rate/index.js +0 -52
- package/lib/components/regulation-setting-item/index.css +0 -33
- package/lib/components/regulation-setting-item/index.js +0 -37
- package/lib/components/rich-editor-at/components/index.css +0 -66
- package/lib/components/rich-editor-at/components/index.js +0 -188
- package/lib/components/rich-editor-at/index.css +0 -40
- package/lib/components/rich-editor-at/index.js +0 -113
- package/lib/components/rich-editor-upload/index.css +0 -11
- package/lib/components/rich-editor-upload/index.js +0 -87
- package/lib/components/write-summary-modal/index.css +0 -79
- package/lib/components/write-summary-modal/index.js +0 -167
- package/lib/components/write-summary-modal/interface.js +0 -19
- package/lib/components/write-summary-modal/request-api.js +0 -18
- package/lib/components/write-summary-modal/utils.js +0 -31
- package/lib/utils/planDataJson.js +0 -11115
|
@@ -21,6 +21,10 @@ var _toast = _interopRequireDefault(require("../../toast"));
|
|
|
21
21
|
|
|
22
22
|
var _dialog = _interopRequireDefault(require("../../dialog"));
|
|
23
23
|
|
|
24
|
+
var _tooltip = _interopRequireDefault(require("../../tooltip"));
|
|
25
|
+
|
|
26
|
+
var _selectLayer = _interopRequireDefault(require("../../select-layer"));
|
|
27
|
+
|
|
24
28
|
var _utils = require("../utils");
|
|
25
29
|
|
|
26
30
|
var _context2 = require("../context");
|
|
@@ -99,8 +103,25 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
99
103
|
isExport = _useState6[0],
|
|
100
104
|
setIsExport = _useState6[1];
|
|
101
105
|
|
|
106
|
+
var _useState7 = (0, _react.useState)({
|
|
107
|
+
label: (0, _getLocale.getLocale)('Rep_NewS_HDmode'),
|
|
108
|
+
value: 20
|
|
109
|
+
}),
|
|
110
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
111
|
+
model = _useState8[0],
|
|
112
|
+
setModel = _useState8[1];
|
|
113
|
+
|
|
102
114
|
var modalRef = (0, _react.useRef)();
|
|
103
115
|
var virtualElements = (0, _react.useRef)([]);
|
|
116
|
+
var models = [{
|
|
117
|
+
label: (0, _getLocale.getLocale)('Rep_NewS_Standardmode'),
|
|
118
|
+
value: 10,
|
|
119
|
+
toolText: (0, _getLocale.getLocale)('Rep_NewS_SmallFileSuita')
|
|
120
|
+
}, {
|
|
121
|
+
label: (0, _getLocale.getLocale)('Rep_NewS_HDmode'),
|
|
122
|
+
value: 20,
|
|
123
|
+
toolText: (0, _getLocale.getLocale)('Rep_NewS_LargeileSize')
|
|
124
|
+
}];
|
|
104
125
|
(0, _react.useEffect)(function () {
|
|
105
126
|
if ((0, _bsGlobal.isWx)() && window.WWOpenData) {
|
|
106
127
|
if (window.WWOpenData.enableCanvasSharing) {
|
|
@@ -132,7 +153,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
132
153
|
|
|
133
154
|
canvas = document.createElement('canvas'); // 创建一个canvas节点
|
|
134
155
|
|
|
135
|
-
scale =
|
|
156
|
+
scale = model.value; // 定义任意放大倍数 支持小数
|
|
136
157
|
|
|
137
158
|
canvas.width = width * scale; // 定义canvas 宽度 * 缩放
|
|
138
159
|
|
|
@@ -219,13 +240,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
219
240
|
scope.setExtra('userMessage', userId + '租户:' + telentId + '我得到了图片大小为:' + size + ',路径为' + imgUrl);
|
|
220
241
|
});
|
|
221
242
|
(0, _requestApis.getBase64DownloadUrl)(imgUrl.split(',')[1]).then(function (url) {
|
|
222
|
-
|
|
223
|
-
// window.titaTracker && window.titaTracker("action").record({
|
|
224
|
-
// actionName: userId+'租户:'+telentId+'我获得了地址'+url.Data.obj,
|
|
225
|
-
// actionGroup: 'okr地图接口',
|
|
226
|
-
// productName: 'okr地图导出',
|
|
227
|
-
// });
|
|
228
|
-
|
|
243
|
+
// const image = new Image()
|
|
229
244
|
// @ts-ignore
|
|
230
245
|
// window.titaTracker && window.titaTracker("action").record({
|
|
231
246
|
// actionName: userId+'租户:'+telentId+'我获得了地址'+url.Data.obj,
|
|
@@ -237,35 +252,18 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
237
252
|
scope.setTag('error-type', '地图导出-图片地址');
|
|
238
253
|
scope.setExtra('userMessage', userId + '租户:' + telentId + '我得到了图片大小为:' + size + ',路径为' + imgUrl);
|
|
239
254
|
});
|
|
255
|
+
var newUrl = url.Data.obj;
|
|
256
|
+
var x = new XMLHttpRequest();
|
|
257
|
+
x.open("GET", newUrl, true);
|
|
258
|
+
x.responseType = 'blob';
|
|
259
|
+
|
|
260
|
+
x.onload = function (e) {
|
|
261
|
+
var url = window.URL.createObjectURL(x.response);
|
|
262
|
+
var a = document.createElement('a');
|
|
263
|
+
a.href = url;
|
|
264
|
+
a.download = model.value === 20 ? '高清图片' : '标清图片';
|
|
265
|
+
a.click();
|
|
240
266
|
|
|
241
|
-
_toast["default"].Warning('图片上传成功,准备本地下载', {
|
|
242
|
-
canClose: true
|
|
243
|
-
});
|
|
244
|
-
|
|
245
|
-
image.setAttribute('crossOrigin', 'anonymous');
|
|
246
|
-
|
|
247
|
-
image.onload = function () {
|
|
248
|
-
if (!url.Data.obj) {
|
|
249
|
-
_toast["default"].Error('导出失败,请稍后重试', {
|
|
250
|
-
canClose: false
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
var a = document.createElement('a'); // 生成一个a元素
|
|
255
|
-
|
|
256
|
-
// 生成一个a元素
|
|
257
|
-
var event = new MouseEvent('click'); // 创建一个单击事件
|
|
258
|
-
|
|
259
|
-
// 创建一个单击事件
|
|
260
|
-
a.download = 'okr地图'; // 设置图片名称
|
|
261
|
-
|
|
262
|
-
// 设置图片名称
|
|
263
|
-
a.href = url.Data.obj; // 将生成的URL设置为a
|
|
264
|
-
|
|
265
|
-
// 将生成的URL设置为a
|
|
266
|
-
a.dispatchEvent(event); // 触发a的单击事件
|
|
267
|
-
|
|
268
|
-
// 触发a的单击事件
|
|
269
267
|
_toast["default"].Success('导出成功');
|
|
270
268
|
|
|
271
269
|
setIsExport(false);
|
|
@@ -275,7 +273,24 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
275
273
|
}
|
|
276
274
|
};
|
|
277
275
|
|
|
278
|
-
image.
|
|
276
|
+
x.send(); // image.setAttribute('crossOrigin', 'anonymous')
|
|
277
|
+
// image.onload = async() => {
|
|
278
|
+
// if (!url.Data.obj) {
|
|
279
|
+
// Toast.Error('导出失败,请稍后重试', { canClose: false })
|
|
280
|
+
// }
|
|
281
|
+
// await downloadFile(url.Data.obj,model.value===20?'高清分享图片':'标准分享图片')
|
|
282
|
+
// // const a = document.createElement('a') // 生成一个a元素
|
|
283
|
+
// // const event = new MouseEvent('click') // 创建一个单击事件
|
|
284
|
+
// // a.download = '123' // 设置图片名称
|
|
285
|
+
// // a.href = url.Data.obj // 将生成的URL设置为a
|
|
286
|
+
// // a.dispatchEvent(event) // 触发a的单击事件
|
|
287
|
+
// Toast.Success('导出成功')
|
|
288
|
+
// setIsExport(false)
|
|
289
|
+
// if (onCloseHandler) {
|
|
290
|
+
// onCloseHandler()
|
|
291
|
+
// }
|
|
292
|
+
// }
|
|
293
|
+
// image.src = imgUrl
|
|
279
294
|
});
|
|
280
295
|
})["catch"](function (err) {
|
|
281
296
|
setIsExport(false);
|
|
@@ -315,6 +330,10 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
315
330
|
setMapInstance(instance);
|
|
316
331
|
};
|
|
317
332
|
|
|
333
|
+
var onChangeHandler = function onChangeHandler(data) {
|
|
334
|
+
setModel(data);
|
|
335
|
+
};
|
|
336
|
+
|
|
318
337
|
var colorChangeHandler = function colorChangeHandler(colors) {
|
|
319
338
|
setBgColor(colors ? colors.color : 'none');
|
|
320
339
|
};
|
|
@@ -336,7 +355,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
336
355
|
title: (0, _getLocale.getLocale)('OKR_Ali_Exportmap'),
|
|
337
356
|
noFooterLine: true,
|
|
338
357
|
visible: visible,
|
|
339
|
-
width: "
|
|
358
|
+
width: "840px",
|
|
340
359
|
onClose: onCloseHandler,
|
|
341
360
|
onOk: confirmHandler,
|
|
342
361
|
onCancel: onCloseHandler,
|
|
@@ -346,9 +365,11 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
346
365
|
forceRender: true
|
|
347
366
|
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
348
367
|
className: "export-map-modal__setting"
|
|
368
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
369
|
+
className: "export-map-modal__setting-color"
|
|
349
370
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
350
371
|
style: {
|
|
351
|
-
marginRight:
|
|
372
|
+
marginRight: 16
|
|
352
373
|
}
|
|
353
374
|
}, (0, _getLocale.getLocale)('OKR_Ali_Selectbackground')), /*#__PURE__*/_react["default"].createElement(_rcColorPicker["default"], {
|
|
354
375
|
animation: "slide-up",
|
|
@@ -356,12 +377,28 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
356
377
|
onChange: colorChangeHandler,
|
|
357
378
|
className: "titaui-color-picker",
|
|
358
379
|
mode: "HSB"
|
|
380
|
+
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
381
|
+
overlay: (0, _getLocale.getLocale)('Mod_Customization'),
|
|
382
|
+
placement: "top"
|
|
359
383
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
360
|
-
className: "export-map-
|
|
361
|
-
})), /*#__PURE__*/_react["default"].createElement("
|
|
362
|
-
|
|
384
|
+
className: "export-map-modal__setting-color-trigger"
|
|
385
|
+
}))), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
386
|
+
overlay: (0, _getLocale.getLocale)('OKR_Ali_Butt_Transparent'),
|
|
387
|
+
placement: "top"
|
|
388
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
389
|
+
className: "export-map-modal__setting-color-trans",
|
|
363
390
|
onClick: colorChangeHandler
|
|
364
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
391
|
+
}))), /*#__PURE__*/_react["default"].createElement(_selectLayer["default"], {
|
|
392
|
+
onChangeSelect: onChangeHandler,
|
|
393
|
+
items: models,
|
|
394
|
+
initValue: model.value
|
|
395
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
396
|
+
className: "titaui-search-dropdown"
|
|
397
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
398
|
+
className: "titaui-search-dropdown__text"
|
|
399
|
+
}, model.label), /*#__PURE__*/_react["default"].createElement("span", {
|
|
400
|
+
className: "tu-icon-sort-down"
|
|
401
|
+
})))), /*#__PURE__*/_react["default"].createElement("div", null, visible && /*#__PURE__*/_react["default"].createElement(_context2.CommonContext.Provider, {
|
|
365
402
|
value: {
|
|
366
403
|
direction: direction,
|
|
367
404
|
showkr: showkr,
|
|
@@ -380,7 +417,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
380
417
|
zoomOnDoubleClick: false,
|
|
381
418
|
paneMoveable: false,
|
|
382
419
|
style: {
|
|
383
|
-
height:
|
|
420
|
+
height: 446,
|
|
384
421
|
width: '100%',
|
|
385
422
|
background: bgColor
|
|
386
423
|
}
|
|
Binary file
|
|
@@ -13,7 +13,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
13
13
|
|
|
14
14
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
15
|
|
|
16
|
-
var DefaultWrapper = _styledComponents["default"].button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: inline-flex;\n\n align-items: center;\n justify-content: center;\n color: #6f7886;\n cursor: pointer;\n outline: none;\n transition: color 0.3s ease, border 0.3s ease;\n background: transparent;\n border-radius: 3px;\n border: 1px solid #e9ecf0;\n &.btn-size-m {\n min-width: 90px;\n height: 36px;\n padding: 0 18px;\n font-size: 14px;\n font-weight: 400;\n }\n &.btn-size-s {\n min-width: 68px;\n height: 26px;\n padding: 0 20px;\n font-size: 13px;\n font-weight: 400;\n }\n :hover {\n color: #2879ff;\n border-color: #2879ff;\n }\n :disabled {\n cursor: not-allowed;\n background-color: #f0f2f5;\n color: #a4acb9;\n border: none;\n :hover {\n border: none;\n color: #bfc7d5;\n opacity: 1;\n background-color: #f0f2f5;\n }\n }\n"])));
|
|
16
|
+
var DefaultWrapper = _styledComponents["default"].button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: inline-flex;\n\n align-items: center;\n justify-content: center;\n color: #6f7886;\n cursor: pointer;\n outline: none;\n transition: color 0.3s ease, border 0.3s ease;\n background: transparent;\n border-radius: 3px;\n border: 1px solid #e9ecf0;\n &.btn-size-m {\n min-width: 90px;\n height: 36px;\n border-radius: 18px;\n padding: 0 18px;\n font-size: 14px;\n font-weight: 400;\n }\n &.btn-size-s {\n min-width: 68px;\n height: 26px;\n padding: 0 20px;\n font-size: 13px;\n font-weight: 400;\n }\n :hover {\n color: #2879ff;\n border-color: #2879ff;\n }\n :disabled {\n cursor: not-allowed;\n background-color: #f0f2f5;\n color: #a4acb9;\n border: none;\n :hover {\n border: none;\n color: #bfc7d5;\n opacity: 1;\n background-color: #f0f2f5;\n }\n }\n"])));
|
|
17
17
|
|
|
18
18
|
exports.DefaultWrapper = DefaultWrapper;
|
|
19
19
|
var PrimaryWrapper = (0, _styledComponents["default"])(DefaultWrapper)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: #ffffff;\n background: #2879ff;\n border: none;\n :hover {\n color: #ffffff;\n background-color: #5c8eff;\n border: none;\n }\n"])));
|
|
@@ -52,9 +52,12 @@ function PeriodSelector(_ref) {
|
|
|
52
52
|
onChange = _ref.onChange,
|
|
53
53
|
getPopupContainer = _ref.getPopupContainer,
|
|
54
54
|
selected = _ref.selected,
|
|
55
|
+
lastSelected = _ref.lastSelected,
|
|
55
56
|
selectorClass = _ref.selectorClass,
|
|
56
57
|
_ref$showCustom = _ref.showCustom,
|
|
57
58
|
showCustom = _ref$showCustom === void 0 ? true : _ref$showCustom,
|
|
59
|
+
_ref$isShowCustom = _ref.isShowCustom,
|
|
60
|
+
isShowCustom = _ref$isShowCustom === void 0 ? true : _ref$isShowCustom,
|
|
58
61
|
_ref$showFullCycle = _ref.showFullCycle,
|
|
59
62
|
showFullCycle = _ref$showFullCycle === void 0 ? true : _ref$showFullCycle,
|
|
60
63
|
_ref$showMonth = _ref.showMonth,
|
|
@@ -110,6 +113,8 @@ function PeriodSelector(_ref) {
|
|
|
110
113
|
(0, _react.useEffect)(function () {
|
|
111
114
|
if (selected) {
|
|
112
115
|
setSelectedPeriod(selected);
|
|
116
|
+
} else if (lastSelected) {
|
|
117
|
+
setSelectedPeriod(lastSelected);
|
|
113
118
|
}
|
|
114
119
|
}, []);
|
|
115
120
|
(0, _react.useEffect)(function () {
|
|
@@ -124,7 +129,7 @@ function PeriodSelector(_ref) {
|
|
|
124
129
|
|
|
125
130
|
if (selected) {
|
|
126
131
|
setSelectedPeriod(selected);
|
|
127
|
-
} else {
|
|
132
|
+
} else if (lastSelected) {} else {
|
|
128
133
|
setSelectedPeriod((0, _common.getDefalutCycle)(res.Data));
|
|
129
134
|
onChange && onChange((0, _common.getDefalutCycle)(res.Data));
|
|
130
135
|
}
|
|
@@ -143,7 +148,7 @@ function PeriodSelector(_ref) {
|
|
|
143
148
|
var popup = /*#__PURE__*/_react["default"].createElement(_selector["default"], {
|
|
144
149
|
className: selectorClass,
|
|
145
150
|
selected: selectedPeriod,
|
|
146
|
-
showCustom: isFetch ? cycleSetting.isOpenCustom : showCustom,
|
|
151
|
+
showCustom: isShowCustom ? isFetch ? cycleSetting.isOpenCustom : showCustom : isShowCustom,
|
|
147
152
|
showFullCycle: showFullCycle,
|
|
148
153
|
showMonth: isFetch ? cycleSetting.isOpenMonth : showMonth,
|
|
149
154
|
showQuarter: isFetch ? cycleSetting.isOpenQuarter : showQuarter,
|
|
@@ -35,14 +35,13 @@ var DATE_ROW_NUM = 6;
|
|
|
35
35
|
var DatePanelBody = function DatePanelBody(props) {
|
|
36
36
|
var viewDate = props.viewDate,
|
|
37
37
|
_props$weekStartDay = props.weekStartDay,
|
|
38
|
-
weekStartDay = _props$weekStartDay === void 0 ?
|
|
38
|
+
weekStartDay = _props$weekStartDay === void 0 ? "SUNDAY" : _props$weekStartDay,
|
|
39
39
|
onSelect = props.onSelect;
|
|
40
40
|
|
|
41
41
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
42
|
-
format = _useContext.format,
|
|
43
42
|
value = _useContext.value;
|
|
44
43
|
|
|
45
|
-
var weekStartDaySun = weekStartDay ===
|
|
44
|
+
var weekStartDaySun = weekStartDay === "SUNDAY";
|
|
46
45
|
|
|
47
46
|
var getCells = function getCells(sunday, currentMonth) {
|
|
48
47
|
var dates = [];
|
|
@@ -50,27 +49,16 @@ var DatePanelBody = function DatePanelBody(props) {
|
|
|
50
49
|
var _loop = function _loop(day) {
|
|
51
50
|
var _classNames;
|
|
52
51
|
|
|
53
|
-
var date = (0, _moment["default"])(sunday).add(day,
|
|
54
|
-
|
|
55
|
-
var _isCurrentDateInRange = (0, _utils.isCurrentDateInRanges)({
|
|
56
|
-
nowDate: date,
|
|
57
|
-
values: value
|
|
58
|
-
}),
|
|
59
|
-
inRanges = _isCurrentDateInRange.inRanges,
|
|
60
|
-
rangeStart = _isCurrentDateInRange.rangeStart,
|
|
61
|
-
rangeEnd = _isCurrentDateInRange.rangeEnd;
|
|
62
|
-
|
|
63
|
-
var classes = (0, _classnames["default"])(_utils.PickerCellClass, (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--today"), date.isSame((0, _moment["default"])(), 'date')), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-view"), date.format('YYYY/MM') === currentMonth), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-ranges"), inRanges), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-ranges--start"), rangeStart), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-ranges--end"), rangeEnd), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), value === null || value === void 0 ? void 0 : value.some(function (v) {
|
|
64
|
-
return date.isSame((0, _moment["default"])(v).format('YYYY/MM/DD'), 'date');
|
|
65
|
-
})), _classNames));
|
|
52
|
+
var date = (0, _moment["default"])(sunday).add(day, "d");
|
|
53
|
+
var classes = (0, _classnames["default"])(_utils.PickerCellClass, (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--tody"), date.isSame((0, _moment["default"])(), "date")), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-view"), date.format("YYYYMM") === currentMonth), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), date.isSame(value)), _classNames));
|
|
66
54
|
dates.push( /*#__PURE__*/_react["default"].createElement("td", {
|
|
67
55
|
className: classes,
|
|
68
|
-
key: date.format(
|
|
56
|
+
key: date.format("YYYY/MM/DD")
|
|
69
57
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
70
58
|
className: (0, _classnames["default"])("".concat(_utils.PickerCellClass, "__inner")),
|
|
71
|
-
title: date.format(
|
|
59
|
+
title: date.format("YYYY-MM-DD"),
|
|
72
60
|
onClick: function onClick() {
|
|
73
|
-
return onSelect && onSelect(date,
|
|
61
|
+
return onSelect && onSelect(date, "date");
|
|
74
62
|
}
|
|
75
63
|
}, date.date())));
|
|
76
64
|
};
|
|
@@ -85,16 +73,16 @@ var DatePanelBody = function DatePanelBody(props) {
|
|
|
85
73
|
var getRows = function getRows(date) {
|
|
86
74
|
var currentDate = (0, _moment["default"])(date);
|
|
87
75
|
var monthFirstDay = currentDate.date(1);
|
|
88
|
-
var currentMonth = monthFirstDay.format(
|
|
76
|
+
var currentMonth = monthFirstDay.format("YYYYMM");
|
|
89
77
|
var daysDiff = weekStartDaySun ? 0 : 1;
|
|
90
|
-
var weekStartDay = monthFirstDay.subtract(monthFirstDay.day() - daysDiff,
|
|
78
|
+
var weekStartDay = monthFirstDay.subtract(monthFirstDay.day() - daysDiff, "days");
|
|
91
79
|
var rows = [];
|
|
92
80
|
|
|
93
81
|
for (var row = 0; row < DATE_ROW_NUM; row += 1) {
|
|
94
82
|
rows.push( /*#__PURE__*/_react["default"].createElement("tr", {
|
|
95
83
|
key: row
|
|
96
84
|
}, getCells(weekStartDay, currentMonth)));
|
|
97
|
-
weekStartDay = weekStartDay.add(1,
|
|
85
|
+
weekStartDay = weekStartDay.add(1, "w");
|
|
98
86
|
}
|
|
99
87
|
|
|
100
88
|
return rows;
|
|
@@ -106,25 +94,25 @@ var DatePanelBody = function DatePanelBody(props) {
|
|
|
106
94
|
className: (0, _classnames["default"])("".concat(_utils.PickerClass, "-content"))
|
|
107
95
|
}, /*#__PURE__*/_react["default"].createElement("thead", null, /*#__PURE__*/_react["default"].createElement("tr", null, weekStartDaySun && /*#__PURE__*/_react["default"].createElement("th", {
|
|
108
96
|
className: _utils.PickerCellClass
|
|
109
|
-
}, (0, _getLocale.getLocale)(
|
|
97
|
+
}, (0, _getLocale.getLocale)("Mod_Sun")), /*#__PURE__*/_react["default"].createElement("th", {
|
|
110
98
|
className: _utils.PickerCellClass
|
|
111
|
-
}, (0, _getLocale.getLocale)(
|
|
99
|
+
}, (0, _getLocale.getLocale)("Mod_Mon")), /*#__PURE__*/_react["default"].createElement("th", {
|
|
112
100
|
className: _utils.PickerCellClass
|
|
113
|
-
}, (0, _getLocale.getLocale)(
|
|
101
|
+
}, (0, _getLocale.getLocale)("Mod_Tues")), /*#__PURE__*/_react["default"].createElement("th", {
|
|
114
102
|
className: _utils.PickerCellClass
|
|
115
|
-
}, (0, _getLocale.getLocale)(
|
|
103
|
+
}, (0, _getLocale.getLocale)("Mod_Wed")), /*#__PURE__*/_react["default"].createElement("th", {
|
|
116
104
|
className: _utils.PickerCellClass
|
|
117
|
-
}, (0, _getLocale.getLocale)(
|
|
105
|
+
}, (0, _getLocale.getLocale)("Mod_Thur")), /*#__PURE__*/_react["default"].createElement("th", {
|
|
118
106
|
className: _utils.PickerCellClass
|
|
119
|
-
}, (0, _getLocale.getLocale)(
|
|
107
|
+
}, (0, _getLocale.getLocale)("Mod_Fri")), /*#__PURE__*/_react["default"].createElement("th", {
|
|
120
108
|
className: _utils.PickerCellClass
|
|
121
|
-
}, (0, _getLocale.getLocale)(
|
|
109
|
+
}, (0, _getLocale.getLocale)("Mod_Sat")), weekStartDay !== "SUNDAY" && /*#__PURE__*/_react["default"].createElement("th", {
|
|
122
110
|
className: _utils.PickerCellClass
|
|
123
|
-
}, (0, _getLocale.getLocale)(
|
|
111
|
+
}, (0, _getLocale.getLocale)("Mod_Sun")))), /*#__PURE__*/_react["default"].createElement("tbody", null, getRows((0, _moment["default"])(viewDate)))));
|
|
124
112
|
};
|
|
125
113
|
|
|
126
114
|
DatePanelBody.defaultProps = {
|
|
127
|
-
weekStartDay:
|
|
115
|
+
weekStartDay: "SUNDAY"
|
|
128
116
|
};
|
|
129
117
|
var _default = DatePanelBody;
|
|
130
118
|
exports["default"] = _default;
|
|
@@ -25,8 +25,8 @@ function DatePanelHead(props) {
|
|
|
25
25
|
onPrev = props.onPrev,
|
|
26
26
|
onNext = props.onNext,
|
|
27
27
|
onPanelChange = props.onPanelChange;
|
|
28
|
-
var yearText = (0, _moment["default"])(viewDate).format(
|
|
29
|
-
var monthText = (0, _moment["default"])(viewDate).format(
|
|
28
|
+
var yearText = (0, _moment["default"])(viewDate).format("YYYY");
|
|
29
|
+
var monthText = (0, _moment["default"])(viewDate).format("MM");
|
|
30
30
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
31
31
|
className: (0, _classnames["default"])(_utils.PickerHeadClass)
|
|
32
32
|
}, !_getLocale.isEn && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -34,7 +34,7 @@ function DatePanelHead(props) {
|
|
|
34
34
|
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
35
35
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__year")),
|
|
36
36
|
onClick: function onClick() {
|
|
37
|
-
return onPanelChange && onPanelChange(viewDate,
|
|
37
|
+
return onPanelChange && onPanelChange(viewDate, "year");
|
|
38
38
|
},
|
|
39
39
|
type: "button"
|
|
40
40
|
}, yearText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -42,7 +42,7 @@ function DatePanelHead(props) {
|
|
|
42
42
|
}, "\xA0\u5E74"), /*#__PURE__*/_react["default"].createElement("button", {
|
|
43
43
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__month")),
|
|
44
44
|
onClick: function onClick() {
|
|
45
|
-
return onPanelChange && onPanelChange(viewDate,
|
|
45
|
+
return onPanelChange && onPanelChange(viewDate, "month");
|
|
46
46
|
},
|
|
47
47
|
type: "button"
|
|
48
48
|
}, monthText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -52,7 +52,7 @@ function DatePanelHead(props) {
|
|
|
52
52
|
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
53
53
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__month")),
|
|
54
54
|
onClick: function onClick() {
|
|
55
|
-
return onPanelChange && onPanelChange(viewDate,
|
|
55
|
+
return onPanelChange && onPanelChange(viewDate, "month");
|
|
56
56
|
},
|
|
57
57
|
style: {
|
|
58
58
|
marginRight: 4
|
|
@@ -61,7 +61,7 @@ function DatePanelHead(props) {
|
|
|
61
61
|
}, _utils.MONTHDATAMAPEN[Number(monthText) - 1]), /*#__PURE__*/_react["default"].createElement("button", {
|
|
62
62
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__year")),
|
|
63
63
|
onClick: function onClick() {
|
|
64
|
-
return onPanelChange && onPanelChange(viewDate,
|
|
64
|
+
return onPanelChange && onPanelChange(viewDate, "year");
|
|
65
65
|
},
|
|
66
66
|
type: "button"
|
|
67
67
|
}, yearText)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -70,14 +70,14 @@ function DatePanelHead(props) {
|
|
|
70
70
|
/*#__PURE__*/
|
|
71
71
|
// eslint-disable-next-line jsx-a11y/control-has-associated-label
|
|
72
72
|
_react["default"].createElement("button", {
|
|
73
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__prev"),
|
|
73
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__prev"), "tu-icon-arrow-up1"),
|
|
74
74
|
onClick: onPrev,
|
|
75
75
|
type: "button"
|
|
76
76
|
}),
|
|
77
77
|
/*#__PURE__*/
|
|
78
78
|
// eslint-disable-next-line jsx-a11y/control-has-associated-label
|
|
79
79
|
_react["default"].createElement("button", {
|
|
80
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__next"),
|
|
80
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__next"), "tu-icon-arrow-down1"),
|
|
81
81
|
onClick: onNext,
|
|
82
82
|
type: "button"
|
|
83
83
|
})));
|
|
@@ -29,7 +29,7 @@ var DatePanel = function DatePanel(props) {
|
|
|
29
29
|
|
|
30
30
|
var onMonthChange = function onMonthChange(diff) {
|
|
31
31
|
if (onViewDateChange) {
|
|
32
|
-
onViewDateChange((0, _moment["default"])(viewDate).add(diff,
|
|
32
|
+
onViewDateChange((0, _moment["default"])(viewDate).add(diff, "M"));
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports["default"] = void 0;
|
|
9
7
|
|
|
10
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
12
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
11
|
|
|
@@ -25,24 +23,8 @@ var _excluded = ["viewDate", "onPanelChange", "onViewDateChange"];
|
|
|
25
23
|
|
|
26
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
25
|
|
|
28
|
-
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); }
|
|
29
|
-
|
|
30
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
-
|
|
32
26
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
33
27
|
|
|
34
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
35
|
-
|
|
36
|
-
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."); }
|
|
37
|
-
|
|
38
|
-
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); }
|
|
39
|
-
|
|
40
|
-
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; }
|
|
41
|
-
|
|
42
|
-
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; }
|
|
43
|
-
|
|
44
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
|
-
|
|
46
28
|
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; }
|
|
47
29
|
|
|
48
30
|
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; }
|
|
@@ -53,28 +35,16 @@ var MonthPanel = function MonthPanel(props) {
|
|
|
53
35
|
onViewDateChange = props.onViewDateChange,
|
|
54
36
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
55
37
|
|
|
56
|
-
var _useState = (0, _react.useState)(viewDate),
|
|
57
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
58
|
-
newViewDate = _useState2[0],
|
|
59
|
-
setNewViewDate = _useState2[1];
|
|
60
|
-
|
|
61
38
|
var onYearChange = function onYearChange(diff) {
|
|
62
39
|
if (onViewDateChange) {
|
|
63
|
-
onViewDateChange((0, _moment["default"])(
|
|
40
|
+
onViewDateChange((0, _moment["default"])(viewDate).add(diff, "y"));
|
|
64
41
|
}
|
|
65
42
|
};
|
|
66
43
|
|
|
67
|
-
(0, _react.useEffect)(function () {
|
|
68
|
-
if (typeof viewDate === 'string') {
|
|
69
|
-
setNewViewDate(viewDate.split('~')[0]);
|
|
70
|
-
} else {
|
|
71
|
-
setNewViewDate(viewDate);
|
|
72
|
-
}
|
|
73
|
-
}, []);
|
|
74
44
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
45
|
className: (0, _classnames["default"])("".concat(_utils.PickerPanelClass, "__month"))
|
|
76
46
|
}, /*#__PURE__*/_react["default"].createElement(_monthHead["default"], _extends({}, restProps, {
|
|
77
|
-
viewDate:
|
|
47
|
+
viewDate: viewDate,
|
|
78
48
|
onPrevYear: function onPrevYear() {
|
|
79
49
|
onYearChange(-1);
|
|
80
50
|
},
|
|
@@ -82,7 +52,7 @@ var MonthPanel = function MonthPanel(props) {
|
|
|
82
52
|
onYearChange(1);
|
|
83
53
|
},
|
|
84
54
|
onYearClick: function onYearClick() {
|
|
85
|
-
onPanelChange === null || onPanelChange === void 0 ? void 0 : onPanelChange(
|
|
55
|
+
onPanelChange === null || onPanelChange === void 0 ? void 0 : onPanelChange(viewDate, "year");
|
|
86
56
|
}
|
|
87
57
|
})), /*#__PURE__*/_react["default"].createElement(_monthBody["default"], _extends({
|
|
88
58
|
viewDate: viewDate
|
|
@@ -35,7 +35,8 @@ var MonthPanelBody = function MonthPanelBody(props) {
|
|
|
35
35
|
onSelect = props.onSelect;
|
|
36
36
|
|
|
37
37
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
38
|
-
value = _useContext.value
|
|
38
|
+
value = _useContext.value,
|
|
39
|
+
mode = _useContext.mode;
|
|
39
40
|
|
|
40
41
|
var getCells = function getCells(baseMonth) {
|
|
41
42
|
var cols = [];
|
|
@@ -45,14 +46,14 @@ var MonthPanelBody = function MonthPanelBody(props) {
|
|
|
45
46
|
|
|
46
47
|
var month = col + baseMonth;
|
|
47
48
|
cols.push( /*#__PURE__*/_react["default"].createElement("td", {
|
|
48
|
-
className: (0, _classnames["default"])(_utils.PickerCellClass, "".concat(_utils.PickerCellClass, "--in-view"), (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--this-month"), month === (0, _moment["default"])().month()), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), month === (0, _moment["default"])(
|
|
49
|
+
className: (0, _classnames["default"])(_utils.PickerCellClass, "".concat(_utils.PickerCellClass, "--in-view"), (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--this-month"), month === (0, _moment["default"])().month()), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), month === (0, _moment["default"])(value).month() && mode === "month"), _classNames)),
|
|
49
50
|
key: month
|
|
50
51
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
51
52
|
onClick: function onClick() {
|
|
52
|
-
return onSelect && onSelect((0, _moment["default"])(viewDate).month(month),
|
|
53
|
+
return onSelect && onSelect((0, _moment["default"])(viewDate).month(month), "month");
|
|
53
54
|
},
|
|
54
55
|
className: (0, _classnames["default"])("".concat(_utils.PickerCellClass, "__inner")),
|
|
55
|
-
title: (0, _moment["default"])(viewDate).month(month).format(
|
|
56
|
+
title: (0, _moment["default"])(viewDate).month(month).format("YYYY-MM")
|
|
56
57
|
}, _getLocale.isEn ? _utils.MONTHDATAMAPEN[month] : _utils.MONTHDATAMAP[month])));
|
|
57
58
|
};
|
|
58
59
|
|
|
@@ -40,7 +40,7 @@ var MonthPanelHead = function MonthPanelHead(props) {
|
|
|
40
40
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__year")),
|
|
41
41
|
onClick: onYearClick,
|
|
42
42
|
type: "button"
|
|
43
|
-
},
|
|
43
|
+
}, viewDate.year()));
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
var _default = MonthPanelHead;
|