@titaui/pc 1.11.27-beta.8 → 1.11.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/avatar/name-avatar/index.css +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/avatar/text-avatar/index.css +7 -0
- package/lib/components/avatar/text-avatar/index.js +32 -7
- package/lib/components/button/icon-btn/index.js +17 -8
- package/lib/components/button/rect-btn/index.css +11 -45
- package/lib/components/button/rect-btn/index.js +13 -19
- package/lib/components/change-okr-modal/Item.js +14 -14
- package/lib/components/change-okr-modal/index.js +1 -2
- package/lib/components/create-okr-modal/index.js +1 -3
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/dialog-confirm/index.css +2 -2
- package/lib/components/drawer/headerAction.js +1 -5
- package/lib/components/drawer/headerDrop.js +4 -42
- package/lib/components/drawer/index.css +0 -33
- package/lib/components/drawer/index.js +3 -26
- package/lib/components/drop-selector/index.js +25 -10
- package/lib/components/dynamic/advertise/components/next-btn/index.css +27 -0
- package/lib/components/dynamic/advertise/components/next-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.css +26 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/index.css +21 -0
- package/lib/components/dynamic/advertise/index.js +126 -0
- package/lib/components/dynamic/advertise/interface.js +5 -0
- package/lib/components/dynamic/advertise/util.js +28 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.css +81 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.js +203 -0
- package/lib/components/dynamic/components/first-level-tabs/index.css +101 -0
- package/lib/components/dynamic/components/first-level-tabs/index.js +131 -0
- package/lib/components/dynamic/constant.js +33 -32
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +9 -9
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -5
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +6 -6
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +10 -10
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +13 -13
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +9 -9
- package/lib/components/dynamic/dynamic-item/index.js +50 -32
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.css +146 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.js +180 -0
- package/lib/components/dynamic/dynamic-like-ranking/item.js +105 -0
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
- package/lib/components/dynamic/dynamic-liking/index.css +81 -0
- package/lib/{pages/new-okr-list/header/operate-record.js → components/dynamic/dynamic-liking/index.js} +39 -91
- package/lib/components/dynamic/dynamic-liking/item.js +75 -0
- package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
- package/lib/components/dynamic/dynamic-list/index.js +7 -15
- package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +16 -0
- package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +30 -0
- package/lib/components/dynamic/dynamic-topping/index.css +141 -0
- package/lib/components/dynamic/dynamic-topping/index.js +82 -0
- package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
- package/lib/components/dynamic/dynamic-topping/item.js +153 -0
- package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
- package/lib/components/dynamic/dynamic.css +173 -0
- package/lib/components/dynamic/dynamic.js +428 -0
- package/lib/components/dynamic/export-module/index.js +37 -0
- package/lib/components/dynamic/img/dynamic-top.svg +14 -0
- package/lib/components/dynamic/index.js +12 -9
- package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
- package/lib/components/dynamic/my-team/img/line.png +0 -0
- package/lib/components/dynamic/my-team/img/team.png +0 -0
- package/lib/components/dynamic/my-team/index.css +184 -0
- package/lib/components/dynamic/my-team/index.js +263 -0
- package/lib/components/dynamic/my-team/request-api.js +52 -0
- package/lib/components/dynamic/my-team/util.js +20 -0
- package/lib/components/dynamic/new-ui.css +192 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +58 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +68 -0
- package/lib/components/dynamic/online-broadcast/data.js +77 -0
- package/lib/components/dynamic/online-broadcast/img/broadcast.svg +14 -0
- package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
- package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
- package/lib/components/dynamic/online-broadcast/index.css +46 -0
- package/lib/components/dynamic/online-broadcast/index.js +61 -0
- package/lib/components/dynamic/online-broadcast/interfact.js +5 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +44 -0
- package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +51 -0
- package/lib/components/dynamic/quick-operation/index.js +120 -0
- package/lib/components/dynamic/request-api.js +68 -7
- package/lib/components/e-priority/index.js +8 -8
- package/lib/components/eReport/eReportShare/index.js +11 -11
- package/lib/components/form/form-fields/date/index.css +24 -0
- package/lib/components/form/form-fields/date/index.js +102 -0
- package/lib/components/form/form-fields/input/index.js +10 -10
- package/lib/components/form/form-fields/user/index.css +23 -3
- package/lib/components/form/form-fields/user/index.js +18 -8
- package/lib/components/form/form-fields/user/user-input.js +15 -6
- package/lib/components/form/index.js +10 -3
- package/lib/components/grid-layout/sub-employee-okr/person-okr.js +5 -5
- package/lib/components/icon-button-list/index.js +3 -3
- package/lib/components/img-viewer/index.css +3 -3
- package/lib/components/img-viewer/index.js +11 -11
- package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
- package/lib/components/menus/components/menu-tree/index.css +4 -2
- package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
- package/lib/components/menus/export-modules/interview-menus/constant.js +30 -0
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
- package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +128 -0
- package/lib/components/menus/index.js +11 -5
- package/lib/components/nav-top/components/menu/index.js +14 -14
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
- package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
- package/lib/components/nav-top/components/user-message/constant.js +1 -0
- package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
- package/lib/components/nav-top/components/user-message/index.js +23 -20
- package/lib/components/nav-top/index.js +4 -8
- package/lib/components/nav-top/request.apis.js +3 -1
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -10
- package/lib/components/okr-detail/components/header/o-name.js +3 -10
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +10 -14
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
- package/lib/components/okr-detail/detail-header/actions.js +23 -23
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +43 -98
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
- package/lib/components/okr-detail/detail-header/index.css +0 -11
- package/lib/components/okr-detail/detail-header/index.js +234 -228
- package/lib/components/okr-detail/index.js +21 -40
- package/lib/components/okr-detail/okr-list/index.js +8 -11
- package/lib/components/okr-detail/request-apis.js +4 -10
- package/lib/components/okr-flow/child-node/index.css +6 -6
- package/lib/components/okr-flow/child-node/work-node.js +21 -21
- package/lib/components/okr-flow/export-modal/index.js +33 -19
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +14 -14
- package/lib/components/okr-flow/okr-map/index.js +5 -5
- package/lib/components/okr-flow/request-apis.js +4 -4
- package/lib/components/okr-flow/root-node/index.js +25 -24
- package/lib/components/okr-flow/utils/index.js +5 -5
- package/lib/components/okr-flow/utils/tree-handler.js +17 -17
- package/lib/components/okr-period-selector/index.js +5 -9
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +30 -30
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/pagination/index.css +3 -3
- package/lib/components/pagination/select.css +58 -23
- package/lib/components/period-selector/index.css +3 -3
- package/lib/components/period-selector/index.js +11 -11
- package/lib/components/picker/components/panels/date-panel/date-body.js +118 -0
- package/lib/components/picker/components/panels/date-panel/date-head.js +87 -0
- package/lib/components/picker/components/panels/date-panel/index.css +14 -0
- package/lib/components/picker/components/panels/date-panel/index.js +49 -0
- package/lib/components/picker/components/panels/month-panel/index.css +27 -0
- package/lib/components/picker/components/panels/month-panel/index.js +63 -0
- package/lib/components/picker/components/panels/month-panel/month-body.js +89 -0
- package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
- package/lib/components/picker/components/panels/panel-body/index.js +53 -0
- package/lib/components/picker/components/panels/panel-head/index.js +48 -0
- package/lib/components/picker/components/panels/year-panel/index.css +23 -0
- package/lib/components/picker/components/panels/year-panel/index.js +65 -0
- package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
- package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
- package/lib/components/picker/components/picker-trigger/index.css +57 -0
- package/lib/components/picker/components/picker-trigger/index.js +94 -0
- package/lib/components/picker/context.js +15 -0
- package/lib/components/picker/index.css +121 -0
- package/lib/components/picker/index.js +13 -0
- package/lib/components/picker/picker-panels.js +182 -0
- package/lib/components/picker/picker.js +132 -0
- package/lib/components/picker/type.js +5 -0
- package/lib/components/picker/utils.js +28 -0
- package/lib/components/popup/index.js +4 -4
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +10 -16
- package/lib/components/radio/index.css +9 -9
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/superset-charts/utils/axios.js +5 -5
- package/lib/components/survey-model/index.css +18 -18
- package/lib/components/survey-model/instance.js +1 -1
- package/lib/components/task-relation-modal/request-api.js +1 -2
- package/lib/components/task-tree/helper.js +61 -0
- package/lib/components/task-tree/images/P1.svg +15 -0
- package/lib/components/task-tree/images/P2.svg +15 -0
- package/lib/components/task-tree/images/P3.svg +15 -0
- package/lib/components/task-tree/images/P4.svg +15 -0
- package/lib/components/task-tree/images/P5.svg +15 -0
- package/lib/components/task-tree/images/arrow.svg +9 -0
- package/lib/components/task-tree/images/empty-131.png +0 -0
- package/lib/components/task-tree/images/followed.svg +33 -0
- package/lib/components/task-tree/images/nice.svg +108 -0
- package/lib/components/task-tree/images/struc12.png +0 -0
- package/lib/components/task-tree/images/struc2.png +0 -0
- package/lib/components/task-tree/images/xialat-s.svg +13 -0
- package/lib/components/task-tree/index.js +22 -0
- package/lib/components/task-tree/mock.js +944 -0
- package/lib/components/task-tree/precls.js +8 -0
- package/lib/components/task-tree/request-apis.js +88 -0
- package/lib/components/task-tree/task-item-node/constant.js +45 -0
- package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
- package/lib/components/task-tree/task-item-node/e-project.js +212 -0
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
- package/lib/components/task-tree/task-item-node/e-task.js +426 -0
- package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
- package/lib/components/task-tree/task-item-node/index.css +289 -0
- package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
- package/lib/components/task-tree/task-tree.css +16 -0
- package/lib/components/task-tree/task-tree.js +49 -0
- package/lib/components/time-picker/index.css +123 -0
- package/lib/components/time-picker/index.js +13 -0
- package/lib/components/time-picker/time-picker-selector.js +138 -0
- package/lib/components/time-picker/time-picker.js +336 -0
- package/lib/components/time-picker/timer-picker-input.js +96 -0
- package/lib/components/time-picker/utils.js +52 -0
- package/lib/components/toast/index.js +3 -5
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
- package/lib/components-v1/radio/radio.js +3 -3
- package/lib/components-v1/radio/style/index.css +8 -8
- package/lib/index.js +0 -40
- package/lib/pages/aha2021/index.js +5 -1
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -38
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/new-okr-list/request-api.js +2 -8
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +24 -24
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +31 -31
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +2 -2
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +11 -11
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +8 -8
- package/lib/pages/okr-map/number-select/index.js +2 -2
- package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
- package/lib/utils/auth.js +6 -6
- package/lib/utils/bs-global.js +12 -12
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/hooks.js +72 -0
- package/lib/utils/open-data.js +27 -31
- package/package.json +6 -3
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -223
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -31
- package/.prettierrc.js +0 -90
- package/.vscode/settings.json +0 -5
- package/lib/components/okr-detail/detail-header/constant.js +0 -53
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -55
- package/lib/components/okr-detail/helper.js +0 -108
- package/lib/components/textarea/index.css +0 -142
- package/lib/components/textarea/index.js +0 -259
- package/lib/pages/new-okr-list/header/common.js +0 -52
|
@@ -57,23 +57,23 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
57
57
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
58
58
|
|
|
59
59
|
var Fields = _form["default"].Fields;
|
|
60
|
-
var precls =
|
|
60
|
+
var precls = 'okr-cases-library__pay-window';
|
|
61
61
|
|
|
62
62
|
function SubmitDialog(props) {
|
|
63
63
|
var handleShowSubmitOkrWindow = props.handleShowSubmitOkrWindow,
|
|
64
64
|
isShowSubmitOkrWindow = props.isShowSubmitOkrWindow;
|
|
65
65
|
|
|
66
|
-
var _useState = (0, _react.useState)(
|
|
66
|
+
var _useState = (0, _react.useState)(''),
|
|
67
67
|
_useState2 = _slicedToArray(_useState, 2),
|
|
68
68
|
type = _useState2[0],
|
|
69
69
|
setType = _useState2[1];
|
|
70
70
|
|
|
71
|
-
var _useState3 = (0, _react.useState)(
|
|
71
|
+
var _useState3 = (0, _react.useState)(''),
|
|
72
72
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
73
|
job = _useState4[0],
|
|
74
74
|
setJob = _useState4[1];
|
|
75
75
|
|
|
76
|
-
var _useState5 = (0, _react.useState)(
|
|
76
|
+
var _useState5 = (0, _react.useState)(''),
|
|
77
77
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
78
78
|
scene = _useState6[0],
|
|
79
79
|
setScene = _useState6[1];
|
|
@@ -93,11 +93,11 @@ function SubmitDialog(props) {
|
|
|
93
93
|
|
|
94
94
|
if (!err.length) {
|
|
95
95
|
(0, _network.postSurvey)(body).then(function () {
|
|
96
|
-
_toast["default"].Success(
|
|
96
|
+
_toast["default"].Success('发送成功');
|
|
97
97
|
|
|
98
98
|
handleShowSubmitOkrWindow(false);
|
|
99
99
|
})["catch"](function () {
|
|
100
|
-
_toast["default"].Warning(
|
|
100
|
+
_toast["default"].Warning('发送失败');
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
};
|
|
@@ -130,7 +130,7 @@ function SubmitDialog(props) {
|
|
|
130
130
|
placeholder: "\u5982\u9500\u552E\u56E2\u961F",
|
|
131
131
|
require: true,
|
|
132
132
|
verifies: [{
|
|
133
|
-
tip:
|
|
133
|
+
tip: 'OKR类型不能为空',
|
|
134
134
|
test: /\S/
|
|
135
135
|
}],
|
|
136
136
|
onChange: setType
|
|
@@ -140,7 +140,7 @@ function SubmitDialog(props) {
|
|
|
140
140
|
placeholder: "\u5982\u9500\u552EVP",
|
|
141
141
|
require: true,
|
|
142
142
|
verifies: [{
|
|
143
|
-
tip:
|
|
143
|
+
tip: 'OKR岗位不能为空',
|
|
144
144
|
test: /\S/
|
|
145
145
|
}],
|
|
146
146
|
onChange: setJob
|
|
@@ -155,7 +155,7 @@ function SubmitDialog(props) {
|
|
|
155
155
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
156
156
|
className: "okr-cases-library__submitWindow-submitButton",
|
|
157
157
|
onClick: onSubmitButtonClick
|
|
158
|
-
}, (0, _getLocale.getLocale)(
|
|
158
|
+
}, (0, _getLocale.getLocale)('Pro_detail_Submission'))));
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
function PayDialog(props) {
|
|
@@ -176,38 +176,38 @@ function PayDialog(props) {
|
|
|
176
176
|
var tenantType = window.BSGlobal.tenantInfo.tenantType; // 外部注冊賬號使用的產品ID不同
|
|
177
177
|
|
|
178
178
|
// 外部注冊賬號使用的產品ID不同
|
|
179
|
-
if (Version === 1 && tenantType === 3) return
|
|
180
|
-
return
|
|
179
|
+
if (Version === 1 && tenantType === 3) return 'D9E059E4-4303-4EE2-9275-AE2FA74BBAA6';
|
|
180
|
+
return '60AFAD35-5273-4A06-B2F4-9A3193096BE7';
|
|
181
181
|
}),
|
|
182
182
|
_useState10 = _slicedToArray(_useState9, 1),
|
|
183
183
|
packageId = _useState10[0];
|
|
184
184
|
|
|
185
|
-
var _useState11 = (0, _react.useState)(
|
|
185
|
+
var _useState11 = (0, _react.useState)(''),
|
|
186
186
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
187
187
|
orderId = _useState12[0],
|
|
188
188
|
setOrderId = _useState12[1];
|
|
189
189
|
|
|
190
|
-
var _useState13 = (0, _react.useState)(
|
|
190
|
+
var _useState13 = (0, _react.useState)('wxPay'),
|
|
191
191
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
192
192
|
payCode = _useState14[0],
|
|
193
193
|
setPayCode = _useState14[1];
|
|
194
194
|
|
|
195
|
-
var _useState15 = (0, _react.useState)(
|
|
195
|
+
var _useState15 = (0, _react.useState)('微信'),
|
|
196
196
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
197
197
|
payName = _useState16[0],
|
|
198
198
|
setPayName = _useState16[1];
|
|
199
199
|
|
|
200
200
|
var _useState17 = (0, _react.useState)({
|
|
201
|
-
PayCode:
|
|
202
|
-
PayName:
|
|
201
|
+
PayCode: 'directPay',
|
|
202
|
+
PayName: '支付宝'
|
|
203
203
|
}),
|
|
204
204
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
205
205
|
wxModel = _useState18[0],
|
|
206
206
|
setWxModel = _useState18[1];
|
|
207
207
|
|
|
208
208
|
var _useState19 = (0, _react.useState)({
|
|
209
|
-
PayCode:
|
|
210
|
-
PayName:
|
|
209
|
+
PayCode: 'wxPay',
|
|
210
|
+
PayName: '微信'
|
|
211
211
|
}),
|
|
212
212
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
213
213
|
aliModel = _useState20[0],
|
|
@@ -259,9 +259,9 @@ function PayDialog(props) {
|
|
|
259
259
|
} else {
|
|
260
260
|
// 订单已支付
|
|
261
261
|
_titaUi.Modal.success({
|
|
262
|
-
title:
|
|
263
|
-
content:
|
|
264
|
-
okText:
|
|
262
|
+
title: '支付成功',
|
|
263
|
+
content: 'OKR案例库已开通',
|
|
264
|
+
okText: '立即使用',
|
|
265
265
|
onOk: function () {
|
|
266
266
|
var _onOk = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
267
267
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -300,16 +300,16 @@ function PayDialog(props) {
|
|
|
300
300
|
};
|
|
301
301
|
|
|
302
302
|
var clickPayNowHandler = function clickPayNowHandler(e) {
|
|
303
|
-
if (payCode ===
|
|
303
|
+
if (payCode === 'wxPay') {
|
|
304
304
|
e.preventDefault();
|
|
305
|
-
var path = window.location.href.split(
|
|
306
|
-
path = path.replace(/eLearningHome/,
|
|
305
|
+
var path = window.location.href.split('#')[0];
|
|
306
|
+
path = path.replace(/eLearningHome/, 'Home');
|
|
307
307
|
var encode = encodeURIComponent("orderId=".concat(orderId, "&payCode=").concat(payCode, "&payName=").concat(payName)); // if(isDingDing()){
|
|
308
308
|
// window.open(`${path}#/pay?${encode}`, "_self");
|
|
309
309
|
// window.location.reload();
|
|
310
310
|
// }else{
|
|
311
311
|
|
|
312
|
-
window.open("".concat(path, "#/pay?").concat(encode),
|
|
312
|
+
window.open("".concat(path, "#/pay?").concat(encode), '_blank'); // }
|
|
313
313
|
// postWxPayOrder({
|
|
314
314
|
// order_id: orderId,
|
|
315
315
|
// default_bank: payCode,
|
|
@@ -343,22 +343,22 @@ function PayDialog(props) {
|
|
|
343
343
|
return handleShowPayWindow(false);
|
|
344
344
|
},
|
|
345
345
|
style: {
|
|
346
|
-
width:
|
|
347
|
-
height:
|
|
346
|
+
width: '18px',
|
|
347
|
+
height: '18px'
|
|
348
348
|
}
|
|
349
349
|
}), /*#__PURE__*/_react["default"].createElement("p", {
|
|
350
350
|
className: "".concat(precls, "__head")
|
|
351
|
-
}, price, "
|
|
351
|
+
}, price, " \u8D2D\u4E70\u5343\u4EFD OKR \u6848\u4F8B\u5E93"), /*#__PURE__*/_react["default"].createElement("p", {
|
|
352
352
|
className: "".concat(precls, "__detail")
|
|
353
353
|
}, "\u53EF\u67E5\u770B \u4F7F\u7528\u6848\u4F8B\u5E93\u6240\u6709\u884C\u4E1A\u7684\u6848\u4F8B", /*#__PURE__*/_react["default"].createElement("a", {
|
|
354
354
|
href: "https://club.tita.com/okr-examples",
|
|
355
355
|
target: "_blank",
|
|
356
356
|
rel: "noreferrer"
|
|
357
|
-
}, (0, _getLocale.getLocale)(
|
|
357
|
+
}, (0, _getLocale.getLocale)('Mod_Checkdetails'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
358
358
|
className: "".concat(precls, "__amount")
|
|
359
359
|
}, "\u5E94\u4ED8\u91D1\u989D\uFF1A", /*#__PURE__*/_react["default"].createElement("b", null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
360
360
|
style: {
|
|
361
|
-
fontSize:
|
|
361
|
+
fontSize: '32px'
|
|
362
362
|
}
|
|
363
363
|
}, "29.8"), "\u5143/\u5E74")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
364
364
|
className: "".concat(precls, "__type")
|
|
@@ -80,7 +80,7 @@ var OperationRecord = /*#__PURE__*/function (_PureComponent) {
|
|
|
80
80
|
|
|
81
81
|
_this.setState({
|
|
82
82
|
operationTrackList: newOperationTrackList,
|
|
83
|
-
operationTrackTotal:
|
|
83
|
+
operationTrackTotal: _mockData.OperationData.length
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
});
|
|
@@ -17,7 +17,7 @@ var OperationRecordWrapper = _styledComponents["default"].div(_templateObject ||
|
|
|
17
17
|
|
|
18
18
|
exports.OperationRecordWrapper = OperationRecordWrapper;
|
|
19
19
|
|
|
20
|
-
var OperationRecordTotal = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-bottom:
|
|
20
|
+
var OperationRecordTotal = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-bottom: 8px;\n font-size: 12px;\n color: #8f9ca6;\n display: inline-block;\n cursor: pointer;\n\n &:hover {\n color: #2879ff;\n }\n\n p {\n line-height: 17px;\n\n &::before {\n float: right;\n margin-left: 4px;\n }\n }\n"])));
|
|
21
21
|
|
|
22
22
|
exports.OperationRecordTotal = OperationRecordTotal;
|
|
23
23
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
.titaui-pagination-prev_text, .titaui-pagination-next_text, .titaui-pagination-jump-prev_text, .titaui-pagination-jump-next_text, .titaui-pagination-item_text {
|
|
20
20
|
font-size: 14px;
|
|
21
21
|
font-weight: 400;
|
|
22
|
-
line-height:
|
|
22
|
+
line-height: 28px;
|
|
23
23
|
transition: all 0.3s ease;
|
|
24
24
|
color: #3f4755;
|
|
25
25
|
}
|
|
@@ -226,8 +226,8 @@
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
.titaui-pagination__select-selector::after {
|
|
229
|
-
content:
|
|
230
|
-
font-family:
|
|
229
|
+
content: '\ea64';
|
|
230
|
+
font-family: 'tu-icon' !important;
|
|
231
231
|
font-size: 12px;
|
|
232
232
|
color: #3f4755;
|
|
233
233
|
speak: never;
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
opacity: 0.3;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.titaui-pagination__select-show-arrow.titaui-pagination__select-loading
|
|
17
|
+
.titaui-pagination__select-show-arrow.titaui-pagination__select-loading
|
|
18
|
+
.titaui-pagination__select-arrow-icon::after {
|
|
18
19
|
box-sizing: border-box;
|
|
19
20
|
width: 12px;
|
|
20
21
|
height: 12px;
|
|
@@ -36,7 +37,8 @@
|
|
|
36
37
|
appearance: none;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
.titaui-pagination__select
|
|
40
|
+
.titaui-pagination__select
|
|
41
|
+
.titaui-pagination__select-selection-search-input::-webkit-search-cancel-button {
|
|
40
42
|
display: none;
|
|
41
43
|
appearance: none;
|
|
42
44
|
}
|
|
@@ -46,28 +48,39 @@
|
|
|
46
48
|
position: relative;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
.titaui-pagination__select-single
|
|
51
|
+
.titaui-pagination__select-single
|
|
52
|
+
.titaui-pagination__select-selector
|
|
53
|
+
.titaui-pagination__select-selection-search {
|
|
50
54
|
width: 100%;
|
|
51
55
|
}
|
|
52
56
|
|
|
53
|
-
.titaui-pagination__select-single
|
|
57
|
+
.titaui-pagination__select-single
|
|
58
|
+
.titaui-pagination__select-selector
|
|
59
|
+
.titaui-pagination__select-selection-search-input {
|
|
54
60
|
width: 100%;
|
|
55
61
|
}
|
|
56
62
|
|
|
57
|
-
.titaui-pagination__select-single
|
|
58
|
-
.titaui-pagination__select-
|
|
63
|
+
.titaui-pagination__select-single
|
|
64
|
+
.titaui-pagination__select-selector
|
|
65
|
+
.titaui-pagination__select-selection-item,
|
|
66
|
+
.titaui-pagination__select-single
|
|
67
|
+
.titaui-pagination__select-selector
|
|
68
|
+
.titaui-pagination__select-selection-placeholder {
|
|
59
69
|
position: absolute;
|
|
60
70
|
top: 1px;
|
|
61
71
|
left: 3px;
|
|
62
72
|
pointer-events: none;
|
|
63
73
|
}
|
|
64
74
|
|
|
65
|
-
.titaui-pagination__select-single:not(.titaui-pagination__select-customize-input)
|
|
75
|
+
.titaui-pagination__select-single:not(.titaui-pagination__select-customize-input)
|
|
76
|
+
.titaui-pagination__select-selector {
|
|
66
77
|
padding: 1px;
|
|
67
78
|
border: 1px solid #000;
|
|
68
79
|
}
|
|
69
80
|
|
|
70
|
-
.titaui-pagination__select-single:not(.titaui-pagination__select-customize-input)
|
|
81
|
+
.titaui-pagination__select-single:not(.titaui-pagination__select-customize-input)
|
|
82
|
+
.titaui-pagination__select-selector
|
|
83
|
+
.titaui-pagination__select-selection-search-input {
|
|
71
84
|
border: none;
|
|
72
85
|
outline: none;
|
|
73
86
|
background: rgba(255, 0, 0, 0.2);
|
|
@@ -81,7 +94,9 @@
|
|
|
81
94
|
border: 1px solid #000;
|
|
82
95
|
}
|
|
83
96
|
|
|
84
|
-
.titaui-pagination__select-multiple
|
|
97
|
+
.titaui-pagination__select-multiple
|
|
98
|
+
.titaui-pagination__select-selector
|
|
99
|
+
.titaui-pagination__select-selection-item {
|
|
85
100
|
flex: none;
|
|
86
101
|
background: #bbb;
|
|
87
102
|
border-radius: 4px;
|
|
@@ -89,34 +104,48 @@
|
|
|
89
104
|
padding: 0 8px;
|
|
90
105
|
}
|
|
91
106
|
|
|
92
|
-
.titaui-pagination__select-multiple
|
|
107
|
+
.titaui-pagination__select-multiple
|
|
108
|
+
.titaui-pagination__select-selector
|
|
109
|
+
.titaui-pagination__select-selection-item-disabled {
|
|
93
110
|
cursor: not-allowed;
|
|
94
111
|
opacity: 0.5;
|
|
95
112
|
}
|
|
96
113
|
|
|
97
|
-
.titaui-pagination__select-multiple
|
|
114
|
+
.titaui-pagination__select-multiple
|
|
115
|
+
.titaui-pagination__select-selector
|
|
116
|
+
.titaui-pagination__select-selection-overflow {
|
|
98
117
|
display: flex;
|
|
99
118
|
flex-wrap: wrap;
|
|
100
119
|
width: 100%;
|
|
101
120
|
}
|
|
102
121
|
|
|
103
|
-
.titaui-pagination__select-multiple
|
|
122
|
+
.titaui-pagination__select-multiple
|
|
123
|
+
.titaui-pagination__select-selector
|
|
124
|
+
.titaui-pagination__select-selection-overflow-item {
|
|
104
125
|
flex: none;
|
|
105
126
|
max-width: 100%;
|
|
106
127
|
}
|
|
107
128
|
|
|
108
|
-
.titaui-pagination__select-multiple
|
|
129
|
+
.titaui-pagination__select-multiple
|
|
130
|
+
.titaui-pagination__select-selector
|
|
131
|
+
.titaui-pagination__select-selection-search {
|
|
109
132
|
position: relative;
|
|
110
133
|
max-width: 100%;
|
|
111
134
|
}
|
|
112
135
|
|
|
113
|
-
.titaui-pagination__select-multiple
|
|
114
|
-
.titaui-pagination__select-
|
|
136
|
+
.titaui-pagination__select-multiple
|
|
137
|
+
.titaui-pagination__select-selector
|
|
138
|
+
.titaui-pagination__select-selection-search-input,
|
|
139
|
+
.titaui-pagination__select-multiple
|
|
140
|
+
.titaui-pagination__select-selector
|
|
141
|
+
.titaui-pagination__select-selection-search-mirror {
|
|
115
142
|
padding: 1px;
|
|
116
143
|
font-family: system-ui;
|
|
117
144
|
}
|
|
118
145
|
|
|
119
|
-
.titaui-pagination__select-multiple
|
|
146
|
+
.titaui-pagination__select-multiple
|
|
147
|
+
.titaui-pagination__select-selector
|
|
148
|
+
.titaui-pagination__select-selection-search-mirror {
|
|
120
149
|
position: absolute;
|
|
121
150
|
z-index: 999;
|
|
122
151
|
white-space: nowrap;
|
|
@@ -126,14 +155,17 @@
|
|
|
126
155
|
visibility: hidden;
|
|
127
156
|
}
|
|
128
157
|
|
|
129
|
-
.titaui-pagination__select-multiple
|
|
158
|
+
.titaui-pagination__select-multiple
|
|
159
|
+
.titaui-pagination__select-selector
|
|
160
|
+
.titaui-pagination__select-selection-search-input {
|
|
130
161
|
border: none;
|
|
131
162
|
outline: none;
|
|
132
163
|
background: rgba(255, 0, 0, 0.2);
|
|
133
164
|
width: 100%;
|
|
134
165
|
}
|
|
135
166
|
|
|
136
|
-
.titaui-pagination__select-allow-clear.titaui-pagination__select-multiple
|
|
167
|
+
.titaui-pagination__select-allow-clear.titaui-pagination__select-multiple
|
|
168
|
+
.titaui-pagination__select-selector {
|
|
137
169
|
padding-right: 20px;
|
|
138
170
|
}
|
|
139
171
|
|
|
@@ -143,7 +175,8 @@
|
|
|
143
175
|
top: 0;
|
|
144
176
|
}
|
|
145
177
|
|
|
146
|
-
.titaui-pagination__select-show-arrow.titaui-pagination__select-multiple
|
|
178
|
+
.titaui-pagination__select-show-arrow.titaui-pagination__select-multiple
|
|
179
|
+
.titaui-pagination__select-selector {
|
|
147
180
|
padding-right: 20px;
|
|
148
181
|
}
|
|
149
182
|
|
|
@@ -154,7 +187,8 @@
|
|
|
154
187
|
top: 0;
|
|
155
188
|
}
|
|
156
189
|
|
|
157
|
-
.titaui-pagination__select-show-arrow
|
|
190
|
+
.titaui-pagination__select-show-arrow
|
|
191
|
+
.titaui-pagination__select-arrow-icon::after {
|
|
158
192
|
content: '';
|
|
159
193
|
border: 5px solid transparent;
|
|
160
194
|
width: 0;
|
|
@@ -199,7 +233,8 @@
|
|
|
199
233
|
padding-left: 24px;
|
|
200
234
|
}
|
|
201
235
|
|
|
202
|
-
.titaui-pagination__select-item-option
|
|
236
|
+
.titaui-pagination__select-item-option
|
|
237
|
+
.titaui-pagination__select-item-option-state {
|
|
203
238
|
position: absolute;
|
|
204
239
|
right: 0;
|
|
205
240
|
top: 4px;
|
|
@@ -308,7 +343,7 @@
|
|
|
308
343
|
.titaui-pagination__select-selector:before {
|
|
309
344
|
position: absolute;
|
|
310
345
|
display: inline-block;
|
|
311
|
-
content:
|
|
346
|
+
content: '';
|
|
312
347
|
width: 8px;
|
|
313
348
|
height: 8px;
|
|
314
349
|
right: 0;
|
|
@@ -324,7 +359,7 @@
|
|
|
324
359
|
height: 22px;
|
|
325
360
|
font-size: 16px;
|
|
326
361
|
font-weight: 600;
|
|
327
|
-
line-height:
|
|
362
|
+
line-height: 23px;
|
|
328
363
|
color: #3f4755;
|
|
329
364
|
}
|
|
330
365
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
height: 8px;
|
|
16
16
|
margin-left: 12px;
|
|
17
17
|
background: url(./images/down-arrow.svg) transparent no-repeat 50% 50%;
|
|
18
|
-
transition: all .2s;
|
|
18
|
+
transition: all 0.2s;
|
|
19
19
|
cursor: pointer;
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
width: 8px;
|
|
26
26
|
height: 8px;
|
|
27
27
|
background: url(./images/left-arrow.svg) transparent no-repeat 50% 50%;
|
|
28
|
-
transition: all .2s;
|
|
28
|
+
transition: all 0.2s;
|
|
29
29
|
cursor: pointer;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
width: 8px;
|
|
40
40
|
height: 8px;
|
|
41
41
|
background: url(./images/right-arrow.svg) transparent no-repeat 50% 50%;
|
|
42
|
-
transition: all .2s;
|
|
42
|
+
transition: all 0.2s;
|
|
43
43
|
cursor: pointer;
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -74,7 +74,7 @@ function PeriodSelector(_ref) {
|
|
|
74
74
|
popClass = _ref.popClass,
|
|
75
75
|
style = _ref.style,
|
|
76
76
|
_ref$buttonClass = _ref.buttonClass,
|
|
77
|
-
buttonClass = _ref$buttonClass === void 0 ?
|
|
77
|
+
buttonClass = _ref$buttonClass === void 0 ? '' : _ref$buttonClass,
|
|
78
78
|
_ref$noBorder = _ref.noBorder,
|
|
79
79
|
noBorder = _ref$noBorder === void 0 ? false : _ref$noBorder;
|
|
80
80
|
|
|
@@ -94,7 +94,7 @@ function PeriodSelector(_ref) {
|
|
|
94
94
|
|
|
95
95
|
var _useState3 = (0, _react.useState)({
|
|
96
96
|
annualNum: "".concat(new Date().getFullYear()),
|
|
97
|
-
cycleType:
|
|
97
|
+
cycleType: '2',
|
|
98
98
|
yqmNum: "".concat((0, _moment["default"])().quarter())
|
|
99
99
|
}),
|
|
100
100
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -114,10 +114,10 @@ function PeriodSelector(_ref) {
|
|
|
114
114
|
}, []);
|
|
115
115
|
(0, _react.useEffect)(function () {
|
|
116
116
|
if (!visible && (!isFetch || fetchRef.current)) return;
|
|
117
|
-
var url = (0, _helper.getApiUrl)(
|
|
117
|
+
var url = (0, _helper.getApiUrl)('okr/cycleSetting');
|
|
118
118
|
|
|
119
119
|
if (isFetch) {
|
|
120
|
-
(0, _helper.taker)(url,
|
|
120
|
+
(0, _helper.taker)(url, 'GET').then(function (res) {
|
|
121
121
|
if (res.Code == 1) {
|
|
122
122
|
fetchRef.current = true;
|
|
123
123
|
setCycleSetting(res.Data);
|
|
@@ -161,7 +161,7 @@ function PeriodSelector(_ref) {
|
|
|
161
161
|
});
|
|
162
162
|
|
|
163
163
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
164
|
-
className: (0, _classnames["default"])(
|
|
164
|
+
className: (0, _classnames["default"])('titaui-period-selector'),
|
|
165
165
|
style: style
|
|
166
166
|
}, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
167
167
|
getPopupContainer: getPopupContainer,
|
|
@@ -178,15 +178,15 @@ function PeriodSelector(_ref) {
|
|
|
178
178
|
type: "default",
|
|
179
179
|
className: buttonClass,
|
|
180
180
|
style: noBorder ? {
|
|
181
|
-
padding:
|
|
182
|
-
border:
|
|
181
|
+
padding: '0',
|
|
182
|
+
border: 'none'
|
|
183
183
|
} : {
|
|
184
|
-
padding:
|
|
184
|
+
padding: '6px 12px'
|
|
185
185
|
}
|
|
186
186
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
187
187
|
style: {
|
|
188
|
-
lineHeight:
|
|
189
|
-
whiteSpace:
|
|
188
|
+
lineHeight: '18px',
|
|
189
|
+
whiteSpace: 'nowrap'
|
|
190
190
|
}
|
|
191
191
|
}, (0, _common.formatPeriod)(selectedPeriod)), /*#__PURE__*/_react["default"].createElement("span", {
|
|
192
192
|
className: "tu-icon-caret-down titaui-period-selector__down-icon"
|
|
@@ -194,7 +194,7 @@ function PeriodSelector(_ref) {
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
PeriodSelector.defaultProps = {
|
|
197
|
-
align:
|
|
197
|
+
align: 'bottomLeft',
|
|
198
198
|
// selected: {
|
|
199
199
|
// annualNum: '2020',
|
|
200
200
|
// cycleType: '1',
|
|
@@ -0,0 +1,118 @@
|
|
|
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 _moment = _interopRequireDefault(require("moment"));
|
|
15
|
+
|
|
16
|
+
var _getLocale = require("../../../../../utils/getLocale");
|
|
17
|
+
|
|
18
|
+
var _utils = require("../../../utils");
|
|
19
|
+
|
|
20
|
+
var _context = _interopRequireDefault(require("../../../context"));
|
|
21
|
+
|
|
22
|
+
require("./index.css");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
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
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
|
+
|
|
32
|
+
// const ROWS_HEIGHT = 32;
|
|
33
|
+
var DATE_ROW_NUM = 6;
|
|
34
|
+
|
|
35
|
+
var DatePanelBody = function DatePanelBody(props) {
|
|
36
|
+
var viewDate = props.viewDate,
|
|
37
|
+
_props$weekStartDay = props.weekStartDay,
|
|
38
|
+
weekStartDay = _props$weekStartDay === void 0 ? 'SUNDAY' : _props$weekStartDay,
|
|
39
|
+
onSelect = props.onSelect;
|
|
40
|
+
|
|
41
|
+
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
42
|
+
value = _useContext.value;
|
|
43
|
+
|
|
44
|
+
var weekStartDaySun = weekStartDay === 'SUNDAY';
|
|
45
|
+
|
|
46
|
+
var getCells = function getCells(sunday, currentMonth) {
|
|
47
|
+
var dates = [];
|
|
48
|
+
|
|
49
|
+
var _loop = function _loop(day) {
|
|
50
|
+
var _classNames;
|
|
51
|
+
|
|
52
|
+
var date = (0, _moment["default"])(sunday).add(day, 'd');
|
|
53
|
+
var classes = (0, _classnames["default"])(_utils.PickerCellClass, (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--tody"), date.isSame((0, _moment["default"])(), 'date')), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-view"), date.format('YYYYMM') === currentMonth), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), date.isSame(value)), _classNames));
|
|
54
|
+
dates.push( /*#__PURE__*/_react["default"].createElement("td", {
|
|
55
|
+
className: classes,
|
|
56
|
+
key: date.format('YYYY/MM/DD')
|
|
57
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
58
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerCellClass, "__inner")),
|
|
59
|
+
title: date.format('YYYY-MM-DD'),
|
|
60
|
+
onClick: function onClick() {
|
|
61
|
+
return onSelect && onSelect(date, 'date');
|
|
62
|
+
}
|
|
63
|
+
}, date.date())));
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
for (var day = 0; day < _utils.WEEK_DAYS_COUNT; day += 1) {
|
|
67
|
+
_loop(day);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return dates;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
var getRows = function getRows(date) {
|
|
74
|
+
var currentDate = (0, _moment["default"])(date);
|
|
75
|
+
var monthFirstDay = currentDate.date(1);
|
|
76
|
+
var currentMonth = monthFirstDay.format('YYYYMM');
|
|
77
|
+
var daysDiff = weekStartDaySun ? 0 : 1;
|
|
78
|
+
var weekStartDay = monthFirstDay.subtract(monthFirstDay.day() - daysDiff, 'days');
|
|
79
|
+
var rows = [];
|
|
80
|
+
|
|
81
|
+
for (var row = 0; row < DATE_ROW_NUM; row += 1) {
|
|
82
|
+
rows.push( /*#__PURE__*/_react["default"].createElement("tr", {
|
|
83
|
+
key: row
|
|
84
|
+
}, getCells(weekStartDay, currentMonth)));
|
|
85
|
+
weekStartDay = weekStartDay.add(1, 'w');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return rows;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
92
|
+
className: (0, _classnames["default"])(_utils.PickerBodyClass)
|
|
93
|
+
}, /*#__PURE__*/_react["default"].createElement("table", {
|
|
94
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerClass, "-content"))
|
|
95
|
+
}, /*#__PURE__*/_react["default"].createElement("thead", null, /*#__PURE__*/_react["default"].createElement("tr", null, weekStartDaySun && /*#__PURE__*/_react["default"].createElement("th", {
|
|
96
|
+
className: _utils.PickerCellClass
|
|
97
|
+
}, (0, _getLocale.getLocale)('Mod_Sun')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
98
|
+
className: _utils.PickerCellClass
|
|
99
|
+
}, (0, _getLocale.getLocale)('Mod_Mon')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
100
|
+
className: _utils.PickerCellClass
|
|
101
|
+
}, (0, _getLocale.getLocale)('Mod_Tues')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
102
|
+
className: _utils.PickerCellClass
|
|
103
|
+
}, (0, _getLocale.getLocale)('Mod_Wed')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
104
|
+
className: _utils.PickerCellClass
|
|
105
|
+
}, (0, _getLocale.getLocale)('Mod_Thur')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
106
|
+
className: _utils.PickerCellClass
|
|
107
|
+
}, (0, _getLocale.getLocale)('Mod_Fri')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
108
|
+
className: _utils.PickerCellClass
|
|
109
|
+
}, (0, _getLocale.getLocale)('Mod_Sat')), weekStartDay !== 'SUNDAY' && /*#__PURE__*/_react["default"].createElement("th", {
|
|
110
|
+
className: _utils.PickerCellClass
|
|
111
|
+
}, (0, _getLocale.getLocale)('Mod_Sun')))), /*#__PURE__*/_react["default"].createElement("tbody", null, getRows((0, _moment["default"])(viewDate)))));
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
DatePanelBody.defaultProps = {
|
|
115
|
+
weekStartDay: 'SUNDAY'
|
|
116
|
+
};
|
|
117
|
+
var _default = DatePanelBody;
|
|
118
|
+
exports["default"] = _default;
|