@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,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
|
-
var _popup = _interopRequireDefault(require("../popup"));
|
|
15
|
-
|
|
16
|
-
var _constant = require("./constant");
|
|
17
|
-
|
|
18
|
-
var _getLocale = require("../../utils/getLocale");
|
|
19
|
-
|
|
20
|
-
require("./index.css");
|
|
21
|
-
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
-
|
|
24
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
28
|
-
function _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
|
-
|
|
30
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
|
-
|
|
32
|
-
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."); }
|
|
33
|
-
|
|
34
|
-
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); }
|
|
35
|
-
|
|
36
|
-
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; }
|
|
37
|
-
|
|
38
|
-
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; }
|
|
39
|
-
|
|
40
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
-
|
|
42
|
-
var prefix = "tita-ui-new-confidence";
|
|
43
|
-
|
|
44
|
-
var NewConfidence = function NewConfidence(_ref) {
|
|
45
|
-
var value = _ref.value,
|
|
46
|
-
_ref$editable = _ref.editable,
|
|
47
|
-
editable = _ref$editable === void 0 ? true : _ref$editable,
|
|
48
|
-
onChange = _ref.onChange;
|
|
49
|
-
|
|
50
|
-
var _useState = (0, _react.useState)(value),
|
|
51
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
52
|
-
confidence = _useState2[0],
|
|
53
|
-
setConfidence = _useState2[1];
|
|
54
|
-
|
|
55
|
-
var popupRef = (0, _react.useRef)({
|
|
56
|
-
open: function open() {},
|
|
57
|
-
close: function close() {}
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
var handleChangeConfidence = function handleChangeConfidence(point) {
|
|
61
|
-
setConfidence(point);
|
|
62
|
-
popupRef.current.close();
|
|
63
|
-
|
|
64
|
-
if (onChange) {
|
|
65
|
-
onChange(point);
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
(0, _react.useEffect)(function () {
|
|
70
|
-
setConfidence(value);
|
|
71
|
-
}, [value]);
|
|
72
|
-
var renderPopContent = (0, _react.useMemo)(function () {
|
|
73
|
-
if (!editable) return null;
|
|
74
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
|
-
className: "".concat(prefix, "__pop-content")
|
|
76
|
-
}, _constant.ConfidencePointArr.map(function (point) {
|
|
77
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
78
|
-
onClick: function onClick() {
|
|
79
|
-
handleChangeConfidence(point);
|
|
80
|
-
},
|
|
81
|
-
className: "".concat(prefix, "__pop-content-item")
|
|
82
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
83
|
-
className: "".concat(prefix, "__pop-content-item-icon"),
|
|
84
|
-
alt: "",
|
|
85
|
-
src: _constant.ConfidenceMapIcon[point]
|
|
86
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
87
|
-
className: "".concat(prefix, "__pop-content-item-text")
|
|
88
|
-
}, point, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("Per_Set_Form_Quantifier_Points"))));
|
|
89
|
-
}));
|
|
90
|
-
}, [editable]);
|
|
91
|
-
return /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
92
|
-
popup: renderPopContent,
|
|
93
|
-
popupPlacement: "bottom",
|
|
94
|
-
ref: popupRef,
|
|
95
|
-
popupAlign: {
|
|
96
|
-
offset: [0, 5],
|
|
97
|
-
overflow: {
|
|
98
|
-
adjustX: true,
|
|
99
|
-
adjustY: true
|
|
100
|
-
},
|
|
101
|
-
targetOffset: [0, 0]
|
|
102
|
-
}
|
|
103
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
104
|
-
className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--editable"), editable))
|
|
105
|
-
}, confidence > 0 && /*#__PURE__*/_react["default"].createElement("img", {
|
|
106
|
-
className: "".concat(prefix, "__icon"),
|
|
107
|
-
alt: "",
|
|
108
|
-
src: _constant.ConfidenceMapIcon[confidence]
|
|
109
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
110
|
-
className: "".concat(prefix, "__value")
|
|
111
|
-
}, confidence)));
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
var _default = NewConfidence;
|
|
115
|
-
exports["default"] = _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<title>切片</title>
|
|
4
|
-
<g id="10、日期时间组件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
-
<g id="日期范围选择器-Date" transform="translate(-411.000000, -3250.000000)" fill="#BFC7D5">
|
|
6
|
-
<g id="编组-4" transform="translate(254.000000, 3190.000000)">
|
|
7
|
-
<g id="日期基础组件" transform="translate(0.000000, 36.000000)">
|
|
8
|
-
<g id="编组-6" transform="translate(20.000000, 16.000000)">
|
|
9
|
-
<g id="cross" transform="translate(137.000000, 8.000000)">
|
|
10
|
-
<path d="M8,1.33333333 C9.84066667,1.33333333 11.5073333,2.07966667 12.7143333,3.286 C13.9206667,4.49233333 14.6666667,6.159 14.6666667,8 C14.6666667,9.84066667 13.9206667,11.5073333 12.7143333,12.7143333 C11.5073333,13.9206667 9.84066667,14.6666667 8,14.6666667 C6.159,14.6666667 4.49233333,13.9206667 3.286,12.7143333 C2.07966667,11.5073333 1.33333333,9.84066667 1.33333333,8 C1.33333333,6.159 2.07966667,4.49233333 3.286,3.286 C4.49233333,2.07966667 6.159,1.33333333 8,1.33333333 Z M6.00687497,5.25130819 C5.79859535,5.04302857 5.46090736,5.04302857 5.25262774,5.25130819 C5.04434812,5.45958782 5.04434812,5.7972758 5.25262774,6.00555543 L5.25262774,6.00555543 L7.23241802,7.98509848 L5.25262774,9.9653534 L5.19091526,10.0392178 C5.04691947,10.2470772 5.0674903,10.5344632 5.25262774,10.7196006 L5.25262774,10.7196006 L5.32649215,10.7813131 C5.5343515,10.9253089 5.82173753,10.9047381 6.00687497,10.7196006 L6.00687497,10.7196006 L7.98641802,8.73909848 L9.96667295,10.7196006 C10.1749526,10.9278803 10.5126406,10.9278803 10.7209202,10.7196006 C10.9291998,10.511321 10.9291998,10.173633 10.7209202,9.9653534 L10.7209202,9.9653534 L8.74041802,7.98509848 L10.7209202,6.00555543 L10.7826327,5.93169101 C10.9266284,5.72383166 10.9060576,5.43644564 10.7209202,5.25130819 L10.7209202,5.25130819 L10.6470558,5.18959571 C10.4391964,5.04559992 10.1518104,5.06617075 9.96667295,5.25130819 L9.96667295,5.25130819 L7.98641802,7.23109848 Z" id="形状结合"></path>
|
|
11
|
-
</g>
|
|
12
|
-
</g>
|
|
13
|
-
</g>
|
|
14
|
-
</g>
|
|
15
|
-
</g>
|
|
16
|
-
</g>
|
|
17
|
-
</svg>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
.tita-ui__picker-panel__date {
|
|
2
|
-
max-height: 252px;
|
|
3
|
-
overflow: hidden;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.tita-ui__picker-panel__date .tita-ui__picker-head-btn__prev {
|
|
7
|
-
margin-right: 8px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.tita-ui__picker-panel__date .tita-ui__picker-content {
|
|
11
|
-
width: 100%;
|
|
12
|
-
margin-top: 15px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.tita-ui__picker-panel__date .tita-ui__picker-content thead {
|
|
16
|
-
background: #fff;
|
|
17
|
-
position: relative;
|
|
18
|
-
z-index: 1;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.titaui__picker__week {
|
|
22
|
-
height: 36px;
|
|
23
|
-
line-height: 36px;
|
|
24
|
-
color: #141C28;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.titaui__picker__week--select {
|
|
28
|
-
color: #2879ff;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.titaui__picker__week-box {
|
|
32
|
-
background: #F6F8FC;
|
|
33
|
-
border-radius: 8px;
|
|
34
|
-
height: 36px;
|
|
35
|
-
padding-left: 24px;
|
|
36
|
-
margin-bottom: 8px;
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.titaui__picker__week-index {
|
|
41
|
-
margin-right: 12px;
|
|
42
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
|
|
12
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
13
|
-
|
|
14
|
-
var _utils = require("../../../utils");
|
|
15
|
-
|
|
16
|
-
var _weekHead = _interopRequireDefault(require("./week-head"));
|
|
17
|
-
|
|
18
|
-
var _weekBody = _interopRequireDefault(require("./week-body"));
|
|
19
|
-
|
|
20
|
-
require("./index.css");
|
|
21
|
-
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
-
|
|
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); }
|
|
25
|
-
|
|
26
|
-
var DatePanel = function DatePanel(props) {
|
|
27
|
-
var viewDate = props.viewDate,
|
|
28
|
-
onViewDateChange = props.onViewDateChange;
|
|
29
|
-
|
|
30
|
-
var onMonthChange = function onMonthChange(diff) {
|
|
31
|
-
if (onViewDateChange) {
|
|
32
|
-
onViewDateChange((0, _moment["default"])(viewDate).add(diff, "M"));
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
37
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerPanelClass, "__date"))
|
|
38
|
-
}, /*#__PURE__*/_react["default"].createElement(_weekHead["default"], _extends({}, props, {
|
|
39
|
-
onPrev: function onPrev() {
|
|
40
|
-
return onMonthChange(-1);
|
|
41
|
-
},
|
|
42
|
-
onNext: function onNext() {
|
|
43
|
-
return onMonthChange(1);
|
|
44
|
-
}
|
|
45
|
-
})), /*#__PURE__*/_react["default"].createElement(_weekBody["default"], props));
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
var _default = DatePanel;
|
|
49
|
-
exports["default"] = _default;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.endTime = endTime;
|
|
7
|
-
exports.getWeeksNum = exports.getWeekNumber = exports.getPointYearMonthWeeksRange = exports.getPointYearMonthWeekStartTimeAndEndTime = exports.getDaysOfMonth = void 0;
|
|
8
|
-
exports.startTime = startTime;
|
|
9
|
-
|
|
10
|
-
//获取当前日期在这个月是第几周
|
|
11
|
-
var getWeekNumber = function getWeekNumber(date) {
|
|
12
|
-
var currentDate = new Date(date).getDate();
|
|
13
|
-
var day = new Date(date).getDay(); //今天是星期几 星期天返回0
|
|
14
|
-
|
|
15
|
-
var week = Math.ceil((currentDate + 6 - day) / 7);
|
|
16
|
-
return week;
|
|
17
|
-
}; //获取某年某月有多少天
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
exports.getWeekNumber = getWeekNumber;
|
|
21
|
-
|
|
22
|
-
var getDaysOfMonth = function getDaysOfMonth(year, month) {
|
|
23
|
-
switch (month) {
|
|
24
|
-
case 1:
|
|
25
|
-
case 3:
|
|
26
|
-
case 5:
|
|
27
|
-
case 7:
|
|
28
|
-
case 8:
|
|
29
|
-
case 10:
|
|
30
|
-
case 12:
|
|
31
|
-
return 31;
|
|
32
|
-
|
|
33
|
-
case 4:
|
|
34
|
-
case 6:
|
|
35
|
-
case 9:
|
|
36
|
-
case 11:
|
|
37
|
-
return 30;
|
|
38
|
-
|
|
39
|
-
case 2:
|
|
40
|
-
return year % 4 == 0 && year % 100 != 0 || year % 400 == 0 ? 29 : 28;
|
|
41
|
-
|
|
42
|
-
default:
|
|
43
|
-
return 0;
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
exports.getDaysOfMonth = getDaysOfMonth;
|
|
48
|
-
|
|
49
|
-
function startTime(time) {
|
|
50
|
-
var nowTimeDate = new Date(time);
|
|
51
|
-
return nowTimeDate.setHours(0, 0, 0, 0);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function endTime(time) {
|
|
55
|
-
var nowTimeDate = new Date(time);
|
|
56
|
-
return nowTimeDate.setHours(23, 59, 59, 999);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
var getWeeksNum = function getWeeksNum(year, month) {
|
|
60
|
-
var d = new Date(); // 该月第一天
|
|
61
|
-
|
|
62
|
-
d.setFullYear(year, month - 1, 1);
|
|
63
|
-
var w1 = d.getDay();
|
|
64
|
-
if (w1 == 0) w1 = 7; // 该月天数
|
|
65
|
-
|
|
66
|
-
d.setFullYear(year, month, 0);
|
|
67
|
-
var dd = d.getDate(); // 第一个周一
|
|
68
|
-
|
|
69
|
-
var d1;
|
|
70
|
-
if (w1 != 1) d1 = 7 - w1 + 2;else d1 = 1;
|
|
71
|
-
var week_count = Math.ceil((dd - d1 + 1) / 7);
|
|
72
|
-
return week_count;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
exports.getWeeksNum = getWeeksNum;
|
|
76
|
-
|
|
77
|
-
var getPointYearMonthWeekStartTimeAndEndTime = function getPointYearMonthWeekStartTimeAndEndTime(year, month, week) {
|
|
78
|
-
// 获取当月的周期
|
|
79
|
-
var date = new Date("".concat(year, "/").concat(month, "/1"));
|
|
80
|
-
var nowDayOfWeek = date.getDay();
|
|
81
|
-
if (nowDayOfWeek === 0) nowDayOfWeek = 7;
|
|
82
|
-
var dayNum = 1 * 24 * 60 * 60 * 1000;
|
|
83
|
-
var firstDate = new Date(date.valueOf() - (nowDayOfWeek - 1) * dayNum);
|
|
84
|
-
var lastDate = new Date(new Date(firstDate).valueOf() + 6 * dayNum * week);
|
|
85
|
-
var startDate = new Date(startTime(new Date(firstDate).valueOf() + 7 * dayNum * (week - 1)));
|
|
86
|
-
var endDate = new Date(endTime(lastDate));
|
|
87
|
-
var startMonth = startDate.getMonth() + 1 > 9 ? startDate.getMonth() + 1 : '0' + (startDate.getMonth() + 1);
|
|
88
|
-
var startDateValue = startDate.getDate() > 9 ? startDate.getDate() : '0' + startDate.getDate();
|
|
89
|
-
var endMonth = endDate.getMonth() + 1 > 9 ? endDate.getMonth() + 1 : '0' + (endDate.getMonth() + 1);
|
|
90
|
-
var endDateValue = endDate.getDate() > 9 ? endDate.getDate() : '0' + endDate.getDate();
|
|
91
|
-
return {
|
|
92
|
-
startTime: "".concat(startMonth, "/").concat(startDateValue),
|
|
93
|
-
endTime: "".concat(endMonth, "/").concat(endDateValue)
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
exports.getPointYearMonthWeekStartTimeAndEndTime = getPointYearMonthWeekStartTimeAndEndTime;
|
|
98
|
-
|
|
99
|
-
var getPointYearMonthWeeksRange = function getPointYearMonthWeeksRange(year, month) {
|
|
100
|
-
var startDate = new Date("".concat(year, "/").concat(month, "/1"));
|
|
101
|
-
var calDays = new Date(startDate.valueOf());
|
|
102
|
-
calDays.setMonth(calDays.getMonth() + 1);
|
|
103
|
-
calDays.setDate(0);
|
|
104
|
-
var days = calDays.getDate();
|
|
105
|
-
var dayNum = 1 * 24 * 60 * 60 * 1000;
|
|
106
|
-
var result = [];
|
|
107
|
-
|
|
108
|
-
for (var i = 0; i < days; i++) {
|
|
109
|
-
var date = new Date(startDate.valueOf() + i * dayNum);
|
|
110
|
-
|
|
111
|
-
if (date.getDay() === 1) {
|
|
112
|
-
var endDate = new Date(date.valueOf() + 6 * dayNum);
|
|
113
|
-
result.push({
|
|
114
|
-
startTime: "".concat(date.getMonth() + 1 >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1), "/").concat(date.getDate() >= 10 ? date.getDate() : '0' + date.getDate()),
|
|
115
|
-
endTime: "".concat(endDate.getMonth() + 1 >= 10 ? endDate.getMonth() + 1 : '0' + (endDate.getMonth() + 1), "/").concat(endDate.getDate() >= 10 ? endDate.getDate() : '0' + endDate.getDate())
|
|
116
|
-
});
|
|
117
|
-
i += 6;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
return result;
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
exports.getPointYearMonthWeeksRange = getPointYearMonthWeeksRange;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
|
|
12
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
13
|
-
|
|
14
|
-
var _utils = require("./utils");
|
|
15
|
-
|
|
16
|
-
var _utils2 = require("../../../utils");
|
|
17
|
-
|
|
18
|
-
var _constant = require("../../../../../utils/constant");
|
|
19
|
-
|
|
20
|
-
require("./index.css");
|
|
21
|
-
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
-
|
|
24
|
-
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; }
|
|
25
|
-
|
|
26
|
-
var preCls = 'titaui__picker';
|
|
27
|
-
|
|
28
|
-
var WeekPanelBody = function WeekPanelBody(props) {
|
|
29
|
-
var viewDate = props.viewDate,
|
|
30
|
-
onSelect = props.onSelect;
|
|
31
|
-
var currentYear = new Date().getFullYear();
|
|
32
|
-
var currentMonth = new Date().getMonth() + 1;
|
|
33
|
-
var currentWeek = (0, _utils.getWeekNumber)(new Date());
|
|
34
|
-
|
|
35
|
-
var getCells = function getCells(date) {
|
|
36
|
-
var year = (0, _moment["default"])(date).format('YYYY'); //获取年
|
|
37
|
-
|
|
38
|
-
var month = (0, _moment["default"])(date).format('MM'); //获取月
|
|
39
|
-
|
|
40
|
-
var range = (0, _utils.getPointYearMonthWeeksRange)(year, month);
|
|
41
|
-
|
|
42
|
-
if (range) {
|
|
43
|
-
return range.map(function (item, i) {
|
|
44
|
-
return /*#__PURE__*/_react["default"].createElement("tr", {
|
|
45
|
-
key: i,
|
|
46
|
-
className: (0, _classnames["default"])("".concat(preCls, "__week"), _defineProperty({}, "".concat(preCls, "__week--select"), currentWeek === i + 1 && parseInt(year) == currentYear && parseInt(month) == currentMonth))
|
|
47
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
48
|
-
onClick: function onClick() {
|
|
49
|
-
if (onSelect) {
|
|
50
|
-
onSelect("".concat(year, "/").concat(item.startTime, "~").concat(year, "/").concat(item.endTime), 'week', year);
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
className: "".concat(preCls, "__week-box")
|
|
54
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
55
|
-
className: "".concat(preCls, "__week-index")
|
|
56
|
-
}, (0, _constant.getWeekly)()[i]), "".concat(item.startTime, "~").concat(item.endTime)));
|
|
57
|
-
});
|
|
58
|
-
} else {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
64
|
-
className: (0, _classnames["default"])(_utils2.PickerBodyClass)
|
|
65
|
-
}, /*#__PURE__*/_react["default"].createElement("table", {
|
|
66
|
-
className: (0, _classnames["default"])("".concat(_utils2.PickerClass, "-content"))
|
|
67
|
-
}, /*#__PURE__*/_react["default"].createElement("tbody", null, getCells((0, _moment["default"])(viewDate)))));
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
var _default = WeekPanelBody;
|
|
71
|
-
exports["default"] = _default;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
|
|
12
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
13
|
-
|
|
14
|
-
var _getLocale = require("../../../../../utils/getLocale");
|
|
15
|
-
|
|
16
|
-
var _utils = require("../../../utils");
|
|
17
|
-
|
|
18
|
-
require("./index.css");
|
|
19
|
-
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
-
|
|
22
|
-
function DatePanelHead(props) {
|
|
23
|
-
var viewDate = props.viewDate,
|
|
24
|
-
onPrev = props.onPrev,
|
|
25
|
-
onNext = props.onNext,
|
|
26
|
-
onPanelChange = props.onPanelChange;
|
|
27
|
-
var yearText = parseInt((0, _moment["default"])(viewDate).format('YYYY'));
|
|
28
|
-
var monthText = parseInt((0, _moment["default"])(viewDate).format('MM'));
|
|
29
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
30
|
-
className: (0, _classnames["default"])(_utils.PickerHeadClass)
|
|
31
|
-
}, !_getLocale.isEn && /*#__PURE__*/_react["default"].createElement("div", {
|
|
32
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "__view"))
|
|
33
|
-
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
34
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__year")),
|
|
35
|
-
onClick: function onClick() {
|
|
36
|
-
return onPanelChange && onPanelChange(viewDate, 'year');
|
|
37
|
-
},
|
|
38
|
-
type: "button"
|
|
39
|
-
}, yearText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
40
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerClass, "-unit"))
|
|
41
|
-
}, "\xA0\u5E74"), /*#__PURE__*/_react["default"].createElement("button", {
|
|
42
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__month")),
|
|
43
|
-
onClick: function onClick() {
|
|
44
|
-
return onPanelChange && onPanelChange(viewDate, 'month');
|
|
45
|
-
},
|
|
46
|
-
type: "button"
|
|
47
|
-
}, monthText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
48
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerClass, "-unit"))
|
|
49
|
-
}, "\u6708")), _getLocale.isEn && /*#__PURE__*/_react["default"].createElement("div", {
|
|
50
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "__view"))
|
|
51
|
-
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
52
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__month")),
|
|
53
|
-
onClick: function onClick() {
|
|
54
|
-
return onPanelChange && onPanelChange(viewDate, 'month');
|
|
55
|
-
},
|
|
56
|
-
style: {
|
|
57
|
-
marginRight: 4
|
|
58
|
-
},
|
|
59
|
-
type: "button"
|
|
60
|
-
}, _utils.MONTHDATAMAPEN[Number(monthText) - 1]), /*#__PURE__*/_react["default"].createElement("button", {
|
|
61
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__year")),
|
|
62
|
-
onClick: function onClick() {
|
|
63
|
-
return onPanelChange && onPanelChange(viewDate, 'year');
|
|
64
|
-
},
|
|
65
|
-
type: "button"
|
|
66
|
-
}, yearText)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
67
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "__operation"))
|
|
68
|
-
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
69
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__prev"), 'tu-icon-arrow-up1'),
|
|
70
|
-
onClick: onPrev,
|
|
71
|
-
type: "button"
|
|
72
|
-
}), /*#__PURE__*/_react["default"].createElement("button", {
|
|
73
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__next"), 'tu-icon-arrow-down1'),
|
|
74
|
-
onClick: onNext,
|
|
75
|
-
type: "button"
|
|
76
|
-
})));
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
var _default = DatePanelHead;
|
|
80
|
-
exports["default"] = _default;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
.tita-ui__picker-ranges-trigger {
|
|
2
|
-
min-width: 114px;
|
|
3
|
-
max-width: 254px;
|
|
4
|
-
padding: 7px 16px;
|
|
5
|
-
border-radius: 18px;
|
|
6
|
-
transition: all 0.3s ease;
|
|
7
|
-
background-color: #ffffff;
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
display: inline-flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.tita-ui__picker-ranges-trigger:hover, .tita-ui__picker-ranges-trigger--focused {
|
|
15
|
-
border-color: #2879ff;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.tita-ui__picker-ranges-trigger--focused .tita-ui__picker-ranges-trigger__operation .tu-icon-caret-down::before {
|
|
19
|
-
transform: scale(0.5) rotate(-180deg);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.tita-ui__picker-ranges-trigger__input {
|
|
23
|
-
font-size: 14px;
|
|
24
|
-
line-height: 22px;
|
|
25
|
-
font-weight: normal;
|
|
26
|
-
color: #3f4755;
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.tita-ui__picker-ranges-trigger__date-divide {
|
|
32
|
-
width: 8px;
|
|
33
|
-
height: 1px;
|
|
34
|
-
margin: 0 8px;
|
|
35
|
-
border-radius: 2px;
|
|
36
|
-
background: #3f4755;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.tita-ui__picker-ranges-trigger__selected-date {
|
|
40
|
-
font-size: 13px;
|
|
41
|
-
line-height: 18px;
|
|
42
|
-
color: #3f4755;
|
|
43
|
-
display: flex;
|
|
44
|
-
align-items: center;
|
|
45
|
-
justify-content: space-between;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.tita-ui__picker-ranges-trigger__selected-date:last-child {
|
|
49
|
-
margin-right: 8px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.tita-ui__picker-ranges-trigger__selected-date__cancel {
|
|
53
|
-
opacity: 0;
|
|
54
|
-
transform: scale(0);
|
|
55
|
-
transition: all 0.3s ease;
|
|
56
|
-
color: #bfc7d5;
|
|
57
|
-
visibility: hidden;
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.tita-ui__picker-ranges-trigger__selected-date__cancel--visible {
|
|
62
|
-
opacity: 1;
|
|
63
|
-
transform: scale(1);
|
|
64
|
-
visibility: visible;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.tita-ui__picker-ranges-trigger__selected-date__cancel:hover {
|
|
68
|
-
color: #f05e5e;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.tita-ui__picker-ranges-trigger__operation {
|
|
72
|
-
display: flex;
|
|
73
|
-
align-items: center;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.tita-ui__picker-ranges-trigger__operation .tu-icon-caret-down {
|
|
77
|
-
font-size: 16px;
|
|
78
|
-
color: #3f4755;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.tita-ui__picker-ranges-trigger__operation .tu-icon-caret-down::before {
|
|
82
|
-
transform: scale(0.5);
|
|
83
|
-
transition: all 0.3s ease;
|
|
84
|
-
display: inline-block;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.tita-ui__picker-ranges-trigger--disabled {
|
|
88
|
-
cursor: not-allowed;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.tita-ui__picker-ranges-trigger--disabled:hover {
|
|
92
|
-
border-color: #e9ecf0;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.tita-ui__picker-ranges-trigger--disabled .tita-ui__picker-trigger__input {
|
|
96
|
-
cursor: not-allowed;
|
|
97
|
-
}
|