@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
|
@@ -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
|
|
|
@@ -23,10 +21,6 @@ require("./index.css");
|
|
|
23
21
|
|
|
24
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
23
|
|
|
26
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
-
|
|
28
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
-
|
|
30
24
|
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); }
|
|
31
25
|
|
|
32
26
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -35,28 +29,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
35
29
|
|
|
36
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; }
|
|
37
31
|
|
|
38
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
39
|
-
|
|
40
|
-
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."); }
|
|
41
|
-
|
|
42
|
-
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); }
|
|
43
|
-
|
|
44
|
-
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; }
|
|
45
|
-
|
|
46
|
-
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; }
|
|
47
|
-
|
|
48
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
|
-
|
|
50
32
|
var YearPanel = function YearPanel(props) {
|
|
51
33
|
var onViewDateChange = props.onViewDateChange,
|
|
52
34
|
viewDate = props.viewDate;
|
|
53
|
-
|
|
54
|
-
var _useState = (0, _react.useState)(),
|
|
55
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
56
|
-
newViewDate = _useState2[0],
|
|
57
|
-
setNewViewDate = _useState2[1];
|
|
58
|
-
|
|
59
|
-
var yearNumber = (0, _moment["default"])(newViewDate).year();
|
|
35
|
+
var yearNumber = (0, _moment["default"])(viewDate).year();
|
|
60
36
|
|
|
61
37
|
var startYear = Math.floor(yearNumber / _utils.YEAR_DECADE_COUNT) * _utils.YEAR_DECADE_COUNT;
|
|
62
38
|
|
|
@@ -64,7 +40,7 @@ var YearPanel = function YearPanel(props) {
|
|
|
64
40
|
|
|
65
41
|
var onDecadeYearChange = function onDecadeYearChange(diff) {
|
|
66
42
|
if (onViewDateChange) {
|
|
67
|
-
onViewDateChange((0, _moment["default"])(
|
|
43
|
+
onViewDateChange((0, _moment["default"])(viewDate).add(diff, "y"));
|
|
68
44
|
}
|
|
69
45
|
};
|
|
70
46
|
|
|
@@ -73,13 +49,6 @@ var YearPanel = function YearPanel(props) {
|
|
|
73
49
|
endYear: endYear
|
|
74
50
|
}));
|
|
75
51
|
|
|
76
|
-
(0, _react.useEffect)(function () {
|
|
77
|
-
if (typeof viewDate === 'string') {
|
|
78
|
-
setNewViewDate(viewDate.split('~')[0]);
|
|
79
|
-
} else {
|
|
80
|
-
setNewViewDate(viewDate);
|
|
81
|
-
}
|
|
82
|
-
}, []);
|
|
83
52
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
53
|
className: (0, _classnames["default"])("".concat(_utils.PickerPanelClass, "__year"))
|
|
85
54
|
}, /*#__PURE__*/_react["default"].createElement(_yearHead["default"], _extends({}, extendProps, {
|
|
@@ -36,15 +36,8 @@ var YearPanelBody = function YearPanelBody(props) {
|
|
|
36
36
|
endYear = props.endYear;
|
|
37
37
|
|
|
38
38
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
39
|
-
format = _useContext.format,
|
|
40
39
|
value = _useContext.value,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var date = (0, _utils.getPickerDateBySettingType)({
|
|
44
|
-
format: format,
|
|
45
|
-
settingType: settingType,
|
|
46
|
-
values: value
|
|
47
|
-
});
|
|
40
|
+
mode = _useContext.mode;
|
|
48
41
|
|
|
49
42
|
var getCells = function getCells(baseYear) {
|
|
50
43
|
var cols = [];
|
|
@@ -54,14 +47,14 @@ var YearPanelBody = function YearPanelBody(props) {
|
|
|
54
47
|
|
|
55
48
|
var year = baseYear + col;
|
|
56
49
|
cols.push( /*#__PURE__*/_react["default"].createElement("td", {
|
|
57
|
-
className: (0, _classnames["default"])(_utils.PickerCellClass, (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--this-year"), year === (0, _moment["default"])().year()), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-view"), year >= startYear && year <= endYear), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), year === (0, _moment["default"])(
|
|
50
|
+
className: (0, _classnames["default"])(_utils.PickerCellClass, (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--this-year"), year === (0, _moment["default"])().year()), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-view"), year >= startYear && year <= endYear), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), year === (0, _moment["default"])(value).year() && mode === "year"), _classNames)),
|
|
58
51
|
key: year
|
|
59
52
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
60
53
|
className: (0, _classnames["default"])("".concat(_utils.PickerCellClass, "__inner")),
|
|
61
54
|
title: year,
|
|
62
55
|
onClick: function onClick() {
|
|
63
56
|
if (onSelect) {
|
|
64
|
-
onSelect((0, _moment["default"])(viewDate).year(year),
|
|
57
|
+
onSelect((0, _moment["default"])(viewDate).year(year), "year");
|
|
65
58
|
}
|
|
66
59
|
}
|
|
67
60
|
}, year)));
|
|
@@ -12,14 +12,10 @@
|
|
|
12
12
|
align-items: center;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.tita-ui__picker-trigger:hover
|
|
15
|
+
.tita-ui__picker-trigger:hover {
|
|
16
16
|
border-color: #2879ff;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.tita-ui__picker-trigger--focused .tita-ui__picker-trigger__operation .tu-icon-caret-down::before {
|
|
20
|
-
transform: scale(0.5) rotate(-180deg);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
19
|
.tita-ui__picker-trigger__input {
|
|
24
20
|
flex: 1;
|
|
25
21
|
margin-right: 12px;
|
|
@@ -45,7 +41,6 @@
|
|
|
45
41
|
|
|
46
42
|
.tita-ui__picker-trigger__operation .tu-icon-caret-down::before {
|
|
47
43
|
transform: scale(0.5);
|
|
48
|
-
transition: all 0.3s ease;
|
|
49
44
|
display: inline-block;
|
|
50
45
|
}
|
|
51
46
|
|
|
@@ -11,8 +11,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
15
|
-
|
|
16
14
|
var _utils = require("../../utils");
|
|
17
15
|
|
|
18
16
|
var _context = _interopRequireDefault(require("../../context"));
|
|
@@ -28,10 +26,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
28
26
|
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; }
|
|
29
27
|
|
|
30
28
|
var PickerTrigger = function PickerTrigger(props) {
|
|
31
|
-
var _classNames;
|
|
32
|
-
|
|
33
29
|
var children = props.children,
|
|
34
|
-
focused = props.focused,
|
|
35
30
|
viewDate = props.viewDate,
|
|
36
31
|
_props$disabled = props.disabled,
|
|
37
32
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
@@ -41,23 +36,23 @@ var PickerTrigger = function PickerTrigger(props) {
|
|
|
41
36
|
_onClick = props.onClick;
|
|
42
37
|
|
|
43
38
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
44
|
-
|
|
39
|
+
mode = _useContext.mode,
|
|
45
40
|
format = _useContext.format,
|
|
46
41
|
value = _useContext.value;
|
|
47
42
|
|
|
48
43
|
var currFormat = format;
|
|
49
44
|
|
|
50
|
-
switch (
|
|
51
|
-
case
|
|
52
|
-
currFormat =
|
|
45
|
+
switch (mode) {
|
|
46
|
+
case "date":
|
|
47
|
+
currFormat = "YYYY/MM/DD";
|
|
53
48
|
break;
|
|
54
49
|
|
|
55
|
-
case
|
|
56
|
-
currFormat =
|
|
50
|
+
case "month":
|
|
51
|
+
currFormat = "YYYY/MM";
|
|
57
52
|
break;
|
|
58
53
|
|
|
59
|
-
case
|
|
60
|
-
currFormat =
|
|
54
|
+
case "year":
|
|
55
|
+
currFormat = "YYYY";
|
|
61
56
|
break;
|
|
62
57
|
|
|
63
58
|
default:
|
|
@@ -73,13 +68,13 @@ var PickerTrigger = function PickerTrigger(props) {
|
|
|
73
68
|
return !disabled && _onClick();
|
|
74
69
|
}
|
|
75
70
|
}, children) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
|
-
className: (0, _classnames["default"])(_utils.PickerTriggerClass, (
|
|
71
|
+
className: (0, _classnames["default"])(_utils.PickerTriggerClass, _defineProperty({}, "".concat(_utils.PickerTriggerClass, "--disabled"), disabled)),
|
|
77
72
|
onClick: function onClick() {
|
|
78
73
|
return !disabled && _onClick();
|
|
79
74
|
}
|
|
80
75
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
81
76
|
className: (0, _classnames["default"])("".concat(_utils.PickerTriggerClass, "__input"), _defineProperty({}, "".concat(_utils.PickerTriggerClass, "__input--placeholder"), !value && placeholder))
|
|
82
|
-
}, value ?
|
|
77
|
+
}, value ? viewDate.format(currFormat) : placeholder), /*#__PURE__*/_react["default"].createElement("div", {
|
|
83
78
|
className: (0, _classnames["default"])("".concat(_utils.PickerTriggerClass, "__operation"))
|
|
84
79
|
}, !disabled && /*#__PURE__*/_react["default"].createElement("span", {
|
|
85
80
|
className: "tu-icon-caret-down"
|
|
@@ -93,7 +88,7 @@ PickerTrigger.defaultProps = {
|
|
|
93
88
|
children: null,
|
|
94
89
|
disabled: false,
|
|
95
90
|
allowClear: false,
|
|
96
|
-
placeholder:
|
|
91
|
+
placeholder: "请选择"
|
|
97
92
|
};
|
|
98
93
|
var _default = PickerTrigger;
|
|
99
94
|
exports["default"] = _default;
|
|
@@ -3,28 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] =
|
|
6
|
+
exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
11
|
-
|
|
12
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
11
|
|
|
14
|
-
var PickerContext = /*#__PURE__*/_react["default"].createContext({
|
|
15
|
-
format: 'YYYY/MM/DD',
|
|
16
|
-
picker: 'date',
|
|
17
|
-
settingType: 'startDate',
|
|
18
|
-
value: [(0, _moment["default"])()]
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
var RangePickerContext = /*#__PURE__*/_react["default"].createContext({
|
|
22
|
-
format: 'YYYY/MM/DD',
|
|
23
|
-
picker: 'date',
|
|
24
|
-
settingType: 'startDate',
|
|
25
|
-
values: [(0, _moment["default"])(), (0, _moment["default"])()]
|
|
26
|
-
});
|
|
12
|
+
var PickerContext = /*#__PURE__*/_react["default"].createContext({});
|
|
27
13
|
|
|
28
|
-
exports.RangePickerContext = RangePickerContext;
|
|
29
14
|
var _default = PickerContext;
|
|
30
15
|
exports["default"] = _default;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
color: #141c28;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.tita-ui__picker-cell--
|
|
30
|
+
.tita-ui__picker-cell--tody .tita-ui__picker-cell__inner, .tita-ui__picker-cell:hover .tita-ui__picker-cell__inner {
|
|
31
31
|
background-color: #f0f4fa;
|
|
32
32
|
color: #2879ff;
|
|
33
33
|
}
|
|
@@ -37,34 +37,6 @@
|
|
|
37
37
|
color: #ffffff;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.tita-ui__picker-cell--selected:hover .tita-ui__picker-cell__inner {
|
|
41
|
-
background-color: #5c8eff;
|
|
42
|
-
color: #ffffff;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.tita-ui__picker-cell--in-ranges {
|
|
46
|
-
position: relative;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.tita-ui__picker-cell--in-ranges::after {
|
|
50
|
-
content: '';
|
|
51
|
-
background-color: rgba(40, 121, 255, 0.1);
|
|
52
|
-
pointer-events: none;
|
|
53
|
-
position: absolute;
|
|
54
|
-
top: 4px;
|
|
55
|
-
right: 0;
|
|
56
|
-
bottom: 4px;
|
|
57
|
-
left: 0;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.tita-ui__picker-cell--in-ranges--start.tita-ui__picker-cell--selected::after {
|
|
61
|
-
left: 10px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.tita-ui__picker-cell--in-ranges--end.tita-ui__picker-cell--selected::after {
|
|
65
|
-
right: 10px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
40
|
.tita-ui__picker-cell__inner {
|
|
69
41
|
width: 100%;
|
|
70
42
|
height: 100%;
|
|
@@ -7,10 +7,7 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _picker = _interopRequireDefault(require("./picker"));
|
|
9
9
|
|
|
10
|
-
var _rangePicker = _interopRequireDefault(require("./range-picker"));
|
|
11
|
-
|
|
12
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
11
|
|
|
14
|
-
_picker["default"]['Range'] = _rangePicker["default"];
|
|
15
12
|
var _default = _picker["default"];
|
|
16
13
|
exports["default"] = _default;
|
|
@@ -17,10 +17,6 @@ var _monthPanel = _interopRequireDefault(require("./components/panels/month-pane
|
|
|
17
17
|
|
|
18
18
|
var _yearPanel = _interopRequireDefault(require("./components/panels/year-panel"));
|
|
19
19
|
|
|
20
|
-
var _weekPanel = _interopRequireDefault(require("./components/panels/week-panel"));
|
|
21
|
-
|
|
22
|
-
var _context = _interopRequireDefault(require("./context"));
|
|
23
|
-
|
|
24
20
|
var _utils = require("./utils");
|
|
25
21
|
|
|
26
22
|
require("./index.css");
|
|
@@ -44,30 +40,26 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
44
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
41
|
|
|
46
42
|
var PickerPanels = function PickerPanels(props) {
|
|
47
|
-
var _props$
|
|
48
|
-
|
|
43
|
+
var _props$mode = props.mode,
|
|
44
|
+
mode = _props$mode === void 0 ? "date" : _props$mode,
|
|
49
45
|
onChange = props.onChange,
|
|
50
46
|
onClose = props.onClose,
|
|
51
|
-
settingType = props.settingType,
|
|
52
47
|
_props$value = props.value,
|
|
53
|
-
value = _props$value === void 0 ?
|
|
48
|
+
value = _props$value === void 0 ? (0, _moment["default"])() : _props$value;
|
|
54
49
|
|
|
55
|
-
var
|
|
56
|
-
format = _useContext.format;
|
|
57
|
-
|
|
58
|
-
var _useState = (0, _react.useState)(picker),
|
|
50
|
+
var _useState = (0, _react.useState)(mode),
|
|
59
51
|
_useState2 = _slicedToArray(_useState, 2),
|
|
60
52
|
pickerMode = _useState2[0],
|
|
61
53
|
setPickerMode = _useState2[1];
|
|
62
54
|
|
|
63
|
-
var _useState3 = (0, _react.useState)(value),
|
|
55
|
+
var _useState3 = (0, _react.useState)(value ? (0, _moment["default"])(value) : (0, _moment["default"])()),
|
|
64
56
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
65
57
|
viewDate = _useState4[0],
|
|
66
58
|
setViewDate = _useState4[1];
|
|
67
59
|
|
|
68
60
|
var onViewDateChange = function onViewDateChange(date) {
|
|
69
61
|
setViewDate(function () {
|
|
70
|
-
return
|
|
62
|
+
return date;
|
|
71
63
|
});
|
|
72
64
|
};
|
|
73
65
|
|
|
@@ -78,14 +70,16 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
78
70
|
};
|
|
79
71
|
|
|
80
72
|
var onCloseHandler = function onCloseHandler() {
|
|
81
|
-
if (pickerMode ===
|
|
82
|
-
onClose
|
|
73
|
+
if (pickerMode === mode) {
|
|
74
|
+
if (onClose) {
|
|
75
|
+
onClose();
|
|
76
|
+
}
|
|
83
77
|
}
|
|
84
78
|
};
|
|
85
79
|
|
|
86
80
|
var onDateSelect = function onDateSelect(date) {
|
|
87
81
|
if (onChange) {
|
|
88
|
-
onChange(
|
|
82
|
+
onChange(date);
|
|
89
83
|
}
|
|
90
84
|
|
|
91
85
|
onCloseHandler();
|
|
@@ -93,15 +87,15 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
93
87
|
|
|
94
88
|
var onMonthSelect = function onMonthSelect(date) {
|
|
95
89
|
setViewDate(function () {
|
|
96
|
-
return
|
|
90
|
+
return date;
|
|
97
91
|
});
|
|
98
92
|
|
|
99
|
-
if (
|
|
100
|
-
onPanelChange(date,
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
onChange(
|
|
93
|
+
if (mode !== "month") {
|
|
94
|
+
onPanelChange(date, "date");
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (onChange) {
|
|
98
|
+
onChange(date);
|
|
105
99
|
}
|
|
106
100
|
|
|
107
101
|
onCloseHandler();
|
|
@@ -109,111 +103,80 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
109
103
|
|
|
110
104
|
var onYearSelect = function onYearSelect(date) {
|
|
111
105
|
setViewDate(function () {
|
|
112
|
-
return
|
|
106
|
+
return date;
|
|
113
107
|
});
|
|
114
108
|
|
|
115
|
-
if (
|
|
116
|
-
onPanelChange(date,
|
|
117
|
-
} else if (onChange) {
|
|
118
|
-
onChange([date]);
|
|
109
|
+
if (mode !== "year") {
|
|
110
|
+
onPanelChange(date, "month");
|
|
119
111
|
}
|
|
120
112
|
|
|
121
|
-
onCloseHandler();
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
var onWeekSelect = function onWeekSelect(date, year) {
|
|
125
|
-
setViewDate(function () {
|
|
126
|
-
return [date];
|
|
127
|
-
});
|
|
128
|
-
|
|
129
113
|
if (onChange) {
|
|
130
|
-
onChange(
|
|
114
|
+
onChange(date);
|
|
131
115
|
}
|
|
132
116
|
|
|
133
117
|
onCloseHandler();
|
|
134
118
|
};
|
|
135
119
|
|
|
136
|
-
var onSelectChange = function onSelectChange(date, type
|
|
120
|
+
var onSelectChange = function onSelectChange(date, type) {
|
|
137
121
|
switch (type) {
|
|
138
|
-
case
|
|
122
|
+
case "date":
|
|
139
123
|
onDateSelect(date);
|
|
140
124
|
break;
|
|
141
125
|
|
|
142
|
-
case
|
|
126
|
+
case "month":
|
|
143
127
|
onMonthSelect(date);
|
|
144
128
|
break;
|
|
145
129
|
|
|
146
|
-
case
|
|
130
|
+
case "year":
|
|
147
131
|
onYearSelect(date);
|
|
148
132
|
break;
|
|
149
133
|
|
|
150
|
-
case 'week':
|
|
151
|
-
onWeekSelect(date, year);
|
|
152
|
-
break;
|
|
153
|
-
|
|
154
134
|
default:
|
|
155
135
|
break;
|
|
156
136
|
}
|
|
157
137
|
};
|
|
158
138
|
|
|
159
|
-
var
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
});
|
|
192
|
-
break;
|
|
193
|
-
|
|
194
|
-
case 'week':
|
|
195
|
-
panel = /*#__PURE__*/_react["default"].createElement(_weekPanel["default"], {
|
|
196
|
-
viewDate: date,
|
|
197
|
-
onSelect: onSelectChange,
|
|
198
|
-
onViewDateChange: onViewDateChange,
|
|
199
|
-
onPanelChange: onPanelChange,
|
|
200
|
-
valueTypeIsRange: true
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
default:
|
|
204
|
-
break;
|
|
205
|
-
}
|
|
139
|
+
var panel;
|
|
140
|
+
|
|
141
|
+
switch (pickerMode) {
|
|
142
|
+
case "date":
|
|
143
|
+
panel = /*#__PURE__*/_react["default"].createElement(_datePanel["default"], {
|
|
144
|
+
viewDate: viewDate,
|
|
145
|
+
onSelect: onSelectChange,
|
|
146
|
+
onViewDateChange: onViewDateChange,
|
|
147
|
+
onPanelChange: onPanelChange
|
|
148
|
+
});
|
|
149
|
+
break;
|
|
150
|
+
|
|
151
|
+
case "month":
|
|
152
|
+
panel = /*#__PURE__*/_react["default"].createElement(_monthPanel["default"], {
|
|
153
|
+
viewDate: viewDate,
|
|
154
|
+
onSelect: onSelectChange,
|
|
155
|
+
onViewDateChange: onViewDateChange,
|
|
156
|
+
onPanelChange: onPanelChange
|
|
157
|
+
});
|
|
158
|
+
break;
|
|
159
|
+
|
|
160
|
+
case "year":
|
|
161
|
+
panel = /*#__PURE__*/_react["default"].createElement(_yearPanel["default"], {
|
|
162
|
+
viewDate: viewDate,
|
|
163
|
+
onSelect: onSelectChange,
|
|
164
|
+
onViewDateChange: onViewDateChange
|
|
165
|
+
});
|
|
166
|
+
break;
|
|
167
|
+
|
|
168
|
+
default:
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
206
171
|
|
|
207
|
-
return panel;
|
|
208
|
-
}, [pickerMode, viewDate]);
|
|
209
172
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
210
173
|
className: _utils.PickerClass
|
|
211
|
-
},
|
|
174
|
+
}, panel);
|
|
212
175
|
};
|
|
213
176
|
|
|
214
177
|
PickerPanels.defaultProps = {
|
|
215
|
-
|
|
216
|
-
value:
|
|
178
|
+
mode: "date",
|
|
179
|
+
value: (0, _moment["default"])()
|
|
217
180
|
};
|
|
218
181
|
var _default = PickerPanels;
|
|
219
182
|
exports["default"] = _default;
|