@titaui/pc 1.11.4-0 → 1.11.4-0.beta-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/avatar/text-avatar/index.css +9 -2
- package/lib/components/avatar/text-avatar/index.js +34 -9
- package/lib/components/button/rect-btn/index.js +7 -7
- package/lib/components/change-okr-modal/Item.js +15 -15
- package/lib/components/communication/index.js +30 -29
- package/lib/components/drawer/index.js +7 -6
- package/lib/components/dynamic/constant.js +43 -36
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +243 -0
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +6 -2
- 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 +6 -6
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +7 -7
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +11 -11
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +14 -14
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +10 -10
- package/lib/components/dynamic/dynamic-item/index.js +70 -41
- package/lib/components/dynamic/dynamic-list/index.js +5 -13
- package/lib/components/e-priority/index.js +18 -12
- package/lib/components/eReport/eReportShare/index.js +12 -12
- package/lib/components/file-list/components/single-file/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 +11 -5
- package/lib/components/icon-button-list/index.css +2 -57
- package/lib/components/icon-button-list/index.js +10 -7
- package/lib/components/img-viewer/index.css +10 -3
- package/lib/components/img-viewer/index.js +57 -18
- package/lib/components/mblog/components/MblogContent.js +5 -2
- package/lib/components/mblog/index.js +31 -30
- 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 +23 -17
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +5 -5
- package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +5 -4
- package/lib/components/nav-top/components/menu/img/new.svg +30 -0
- package/lib/components/nav-top/components/menu/img/wecome-temp.png +0 -0
- package/lib/components/nav-top/components/menu/index.css +91 -0
- package/lib/components/nav-top/components/menu/index.js +80 -32
- 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/request.apis.js +3 -1
- 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 +3 -2
- 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 +62 -66
- package/lib/components/okr-detail/detail-header/index.css +2 -2
- package/lib/components/okr-detail/detail-header/index.js +205 -194
- package/lib/components/okr-detail/index.js +21 -19
- package/lib/components/okr-detail/okr-list/index.js +5 -3
- package/lib/components/okr-flow/child-node/index.css +68 -22
- package/lib/components/okr-flow/child-node/work-node.js +61 -24
- package/lib/components/okr-flow/empty/index.css +8 -1
- package/lib/components/okr-flow/export-modal/index.js +108 -21
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.css +3 -1
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +30 -24
- package/lib/components/okr-flow/images/loading-light.gif +0 -0
- package/lib/components/okr-flow/okr-map/index.js +43 -22
- package/lib/components/okr-flow/request-apis.js +15 -8
- package/lib/components/okr-flow/root-node/index.css +2 -2
- package/lib/components/okr-flow/root-node/index.js +26 -25
- package/lib/components/okr-flow/utils/index.js +45 -29
- package/lib/components/okr-flow/utils/tree-handler.js +29 -18
- package/lib/components/okrcase-library/index.css +6 -4
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +36 -30
- package/lib/components/pagination/index.css +3 -3
- package/lib/components/pagination/select.css +58 -23
- package/lib/components/period-selector/index.css +9 -3
- package/lib/components/period-selector/index.js +14 -11
- package/lib/components/picker/components/panels/date-panel/date-body.js +21 -19
- package/lib/components/picker/components/panels/date-panel/date-head.js +29 -8
- package/lib/components/picker/components/panels/month-panel/month-body.js +6 -4
- package/lib/components/picker/components/picker-trigger/index.css +31 -0
- package/lib/components/picker/components/picker-trigger/index.js +24 -15
- package/lib/components/picker/picker-panels.js +1 -1
- package/lib/components/picker/picker.js +12 -13
- package/lib/components/popup/index.js +4 -4
- package/lib/components/radio/index.css +9 -9
- package/lib/components/scroll-container/index.js +423 -0
- package/lib/components/scroll-container/style.css +35 -0
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/superset-charts/components/chart/index.js +1 -1
- package/lib/components/superset-charts/utils/axios.js +5 -13
- package/lib/components/survey-model/contact.js +93 -0
- package/lib/components/survey-model/index.css +141 -0
- package/lib/components/survey-model/index.js +268 -0
- package/lib/components/survey-model/instance.js +86 -0
- package/lib/components/survey-model/request-api.js +80 -0
- package/lib/components/task-relation-modal/index.js +0 -1
- 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 +16 -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 +114 -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 +299 -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 +24 -0
- package/lib/components/time-picker/time-picker-selector.js +8 -12
- package/lib/components/time-picker/time-picker.js +94 -133
- package/lib/components/time-picker/timer-picker-input.js +3 -7
- package/lib/components/time-picker/utils.js +13 -2
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
- package/lib/components/wechat-btn/index.css +14 -0
- package/lib/components/wechat-btn/index.js +338 -0
- package/lib/components-v1/radio/radio.js +3 -3
- package/lib/components-v1/radio/style/index.css +8 -8
- package/lib/index.js +99 -91
- package/lib/pages/okr-map/export-modules/okr-map/header/index.css +7 -2
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +73 -34
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +65 -42
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +26 -14
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +58 -13
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +28 -20
- package/lib/pages/okr-map/number-select/index.css +12 -9
- package/lib/pages/okr-map/number-select/index.js +3 -3
- package/lib/utils/auth.js +65 -8
- package/lib/utils/bs-global.js +18 -6
- package/lib/utils/open-data.js +63 -43
- package/package.json +6 -2
- 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/yarn-error.log +0 -22184
|
@@ -39,6 +39,8 @@ var _dynamicProgress = _interopRequireDefault(require("./dynamic-progress"));
|
|
|
39
39
|
|
|
40
40
|
var _dynamicCreateO = _interopRequireDefault(require("./dynamic-create-o"));
|
|
41
41
|
|
|
42
|
+
var _dynamicAiDialy = _interopRequireDefault(require("./dynamic-ai-dialy"));
|
|
43
|
+
|
|
42
44
|
var _dynamicTask = _interopRequireDefault(require("./dynamic-task"));
|
|
43
45
|
|
|
44
46
|
var _dynamicProject = _interopRequireDefault(require("./dynamic-project"));
|
|
@@ -69,6 +71,10 @@ var _feedOperate = _interopRequireDefault(require("./components/feed-operate"));
|
|
|
69
71
|
|
|
70
72
|
require("./index.css");
|
|
71
73
|
|
|
74
|
+
var _dynamicInterview = _interopRequireDefault(require("./dynamic-interview"));
|
|
75
|
+
|
|
76
|
+
var _dynamicInterviewShare = _interopRequireDefault(require("./dynamic-interview-share"));
|
|
77
|
+
|
|
72
78
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
73
79
|
|
|
74
80
|
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); }
|
|
@@ -101,10 +107,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
101
107
|
|
|
102
108
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
103
109
|
|
|
104
|
-
var prefix =
|
|
110
|
+
var prefix = 'titaui-dynamic-item';
|
|
105
111
|
|
|
106
112
|
var DynamicItem = function DynamicItem(_ref) {
|
|
107
|
-
var _getBSGlobal;
|
|
113
|
+
var _getBSGlobal, _JSON$parse;
|
|
108
114
|
|
|
109
115
|
var data = _ref.data,
|
|
110
116
|
onDeleteFeed = _ref.onDeleteFeed,
|
|
@@ -151,9 +157,13 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
151
157
|
searchKeyWord = _useContext.searchKeyWord;
|
|
152
158
|
|
|
153
159
|
var hasDynamicOpereateAuth = new _auth.DynamicManagerAuth().hasAuth();
|
|
154
|
-
var hasRewardBtn = !!((_getBSGlobal = (0, _bsGlobal.getBSGlobal)(
|
|
155
|
-
return item.AppId ===
|
|
160
|
+
var hasRewardBtn = !!((_getBSGlobal = (0, _bsGlobal.getBSGlobal)('WebHead')) !== null && _getBSGlobal !== void 0 && _getBSGlobal.AppHead.find(function (item) {
|
|
161
|
+
return item.AppId === '950';
|
|
156
162
|
}));
|
|
163
|
+
var isBiShare = data.shareType === _constant.EShareType.BiShare && data.biId;
|
|
164
|
+
|
|
165
|
+
var isFeedReport = isBiShare && _constant.PlanReportType.includes((_JSON$parse = JSON.parse(data.biId)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse.type);
|
|
166
|
+
|
|
157
167
|
var dynamicContentRef = (0, _react.useRef)();
|
|
158
168
|
var communicationRef = (0, _react.useRef)();
|
|
159
169
|
|
|
@@ -167,33 +177,31 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
167
177
|
};
|
|
168
178
|
|
|
169
179
|
var handleShowMore = function handleShowMore() {
|
|
170
|
-
if (data.feedType === _constant.EFeedType.Report) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
});
|
|
178
|
-
}
|
|
180
|
+
if (data.feedType === _constant.EFeedType.Report && window.titaTracker) {
|
|
181
|
+
window.titaTracker('planAction').record({
|
|
182
|
+
actionName: '查看日报',
|
|
183
|
+
actionGroup: '动态-查看更多',
|
|
184
|
+
productName: '动态',
|
|
185
|
+
feedId: feedId
|
|
186
|
+
});
|
|
179
187
|
}
|
|
180
188
|
|
|
181
189
|
setIsFold(false);
|
|
182
190
|
};
|
|
183
191
|
|
|
184
192
|
var onChangeParse = function onChangeParse(type) {
|
|
185
|
-
var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)(
|
|
193
|
+
var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)('loginUserInfo'),
|
|
186
194
|
Id = _getBSGlobal2.Id;
|
|
187
195
|
|
|
188
196
|
var data = _toConsumableArray(praiseData).filter(function (item) {
|
|
189
197
|
return Number("".concat(item.userId)) !== Number("".concat(Id));
|
|
190
198
|
});
|
|
191
199
|
|
|
192
|
-
var actionName =
|
|
200
|
+
var actionName = '';
|
|
193
201
|
|
|
194
202
|
if (type) {
|
|
195
|
-
var avatar = (0, _bsGlobal.getBSGlobal)(
|
|
196
|
-
var name = (0, _bsGlobal.getBSGlobal)(
|
|
203
|
+
var avatar = (0, _bsGlobal.getBSGlobal)('loginUserInfo').UserAvatar;
|
|
204
|
+
var name = (0, _bsGlobal.getBSGlobal)('loginUserInfo').Name;
|
|
197
205
|
avatar.color = avatar.Color;
|
|
198
206
|
avatar.medium = avatar.Medium;
|
|
199
207
|
var parseUser = {
|
|
@@ -203,17 +211,17 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
203
211
|
praiseType: type
|
|
204
212
|
};
|
|
205
213
|
setPraiseData([parseUser].concat(_toConsumableArray(data)));
|
|
206
|
-
actionName =
|
|
214
|
+
actionName = '点赞日报';
|
|
207
215
|
} else {
|
|
208
216
|
setPraiseData(data);
|
|
209
|
-
actionName =
|
|
217
|
+
actionName = '取消日报点赞';
|
|
210
218
|
}
|
|
211
219
|
|
|
212
|
-
if (window.titaTracker) {
|
|
213
|
-
window.titaTracker(
|
|
220
|
+
if (feedType === _constant.EFeedType.Report && window.titaTracker) {
|
|
221
|
+
window.titaTracker('planAction').record({
|
|
214
222
|
actionName: actionName,
|
|
215
|
-
actionGroup:
|
|
216
|
-
productName:
|
|
223
|
+
actionGroup: '动态-日报',
|
|
224
|
+
productName: '动态',
|
|
217
225
|
feedId: feedId
|
|
218
226
|
});
|
|
219
227
|
}
|
|
@@ -300,6 +308,14 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
300
308
|
});
|
|
301
309
|
}
|
|
302
310
|
|
|
311
|
+
if (data.shareType === _constant.EShareType.InterviewShare) {
|
|
312
|
+
return /*#__PURE__*/_react["default"].createElement(_dynamicInterviewShare["default"], {
|
|
313
|
+
data: data,
|
|
314
|
+
onDeleteFeed: onDeleteFeed,
|
|
315
|
+
hasDynamicOpereateAuth: hasDynamicOpereateAuth
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
|
|
303
319
|
return /*#__PURE__*/_react["default"].createElement(_dynamicLearning["default"], {
|
|
304
320
|
data: data
|
|
305
321
|
});
|
|
@@ -329,6 +345,12 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
329
345
|
onDeleteFeed: onDeleteFeed
|
|
330
346
|
});
|
|
331
347
|
|
|
348
|
+
case _constant.EFeedType.Interview:
|
|
349
|
+
return /*#__PURE__*/_react["default"].createElement(_dynamicInterview["default"], {
|
|
350
|
+
data: data,
|
|
351
|
+
onDeleteFeed: onDeleteFeed
|
|
352
|
+
});
|
|
353
|
+
|
|
332
354
|
default:
|
|
333
355
|
return null;
|
|
334
356
|
}
|
|
@@ -336,7 +358,7 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
336
358
|
|
|
337
359
|
var renderUpvoteCount = function renderUpvoteCount(type, count) {
|
|
338
360
|
if (count === 0) {
|
|
339
|
-
return
|
|
361
|
+
return '';
|
|
340
362
|
}
|
|
341
363
|
|
|
342
364
|
return count || type;
|
|
@@ -353,11 +375,11 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
353
375
|
};
|
|
354
376
|
|
|
355
377
|
if (window.util) {
|
|
356
|
-
if (window.titaTracker) {
|
|
357
|
-
window.titaTracker(
|
|
358
|
-
actionName:
|
|
359
|
-
actionGroup:
|
|
360
|
-
productName:
|
|
378
|
+
if (feedType === _constant.EFeedType.Report && window.titaTracker) {
|
|
379
|
+
window.titaTracker('planAction').record({
|
|
380
|
+
actionName: '打开打赏弹层',
|
|
381
|
+
actionGroup: '动态-日报',
|
|
382
|
+
productName: '动态',
|
|
361
383
|
feedId: feedId
|
|
362
384
|
});
|
|
363
385
|
}
|
|
@@ -370,13 +392,14 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
370
392
|
|
|
371
393
|
var handleReply = function handleReply(_ref2) {
|
|
372
394
|
var submitType = _ref2.submitType;
|
|
373
|
-
|
|
395
|
+
if (feedType !== _constant.EFeedType.Report) return;
|
|
396
|
+
var actionName = submitType === 'delete' ? '删除日报评论' : '评论日报';
|
|
374
397
|
|
|
375
398
|
if (window.titaTracker) {
|
|
376
|
-
window.titaTracker(
|
|
399
|
+
window.titaTracker('planAction').record({
|
|
377
400
|
actionName: actionName,
|
|
378
|
-
actionGroup:
|
|
379
|
-
productName:
|
|
401
|
+
actionGroup: '动态-日报',
|
|
402
|
+
productName: '动态',
|
|
380
403
|
feedId: feedId
|
|
381
404
|
});
|
|
382
405
|
}
|
|
@@ -394,19 +417,25 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
394
417
|
}, [feedComments]);
|
|
395
418
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
396
419
|
className: prefix
|
|
420
|
+
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
421
|
+
condition: isFeedReport
|
|
422
|
+
}, /*#__PURE__*/_react["default"].createElement(_dynamicAiDialy["default"], {
|
|
423
|
+
data: data
|
|
424
|
+
})), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
425
|
+
condition: !isFeedReport
|
|
397
426
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
398
427
|
className: "".concat(prefix, "__content"),
|
|
399
428
|
ref: dynamicContentRef,
|
|
400
429
|
style: {
|
|
401
|
-
height: contentIsOverflow && isFold ?
|
|
430
|
+
height: contentIsOverflow && isFold ? '288px' : 'auto'
|
|
402
431
|
}
|
|
403
432
|
}, renderContent, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
404
433
|
condition: contentIsOverflow && isFold
|
|
405
434
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
406
435
|
className: "".concat(prefix, "__content-show-more"),
|
|
407
436
|
onClick: handleShowMore
|
|
408
|
-
}, (0, _getLocale.getLocale)(
|
|
409
|
-
className: (0, _classnames["default"])(
|
|
437
|
+
}, (0, _getLocale.getLocale)('Tasks_Tab_MyS_Butt_Seemoral'), /*#__PURE__*/_react["default"].createElement("i", {
|
|
438
|
+
className: (0, _classnames["default"])('tu-icon-arrow-down', "".concat(prefix, "__icon"))
|
|
410
439
|
})))), feedOperations.total > 0 && /*#__PURE__*/_react["default"].createElement(_feedOperate["default"], {
|
|
411
440
|
feedOperations: feedOperations,
|
|
412
441
|
data: data
|
|
@@ -444,12 +473,12 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
444
473
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
445
474
|
className: "".concat(prefix, "__footer-fold"),
|
|
446
475
|
onClick: handleFold
|
|
447
|
-
}, (0, _getLocale.getLocale)(
|
|
448
|
-
className: (0, _classnames["default"])(
|
|
476
|
+
}, (0, _getLocale.getLocale)('Mod_Fold'), /*#__PURE__*/_react["default"].createElement("i", {
|
|
477
|
+
className: (0, _classnames["default"])('tu-icon-arrow-down', "".concat(prefix, "__icon"), "".concat(prefix, "__icon-up"))
|
|
449
478
|
}))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
450
479
|
condition: hasRewardBtn
|
|
451
480
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
452
|
-
overlay: (0, _getLocale.getLocale)(
|
|
481
|
+
overlay: (0, _getLocale.getLocale)('Feed_Approval'),
|
|
453
482
|
align: {
|
|
454
483
|
offset: [0, 0]
|
|
455
484
|
},
|
|
@@ -459,7 +488,7 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
459
488
|
className: (0, _classnames["default"])("".concat(prefix, "__footer-icon"), "".concat(prefix, "__footer-icon-redenvelopes"))
|
|
460
489
|
}))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
461
490
|
onClick: handleCommentClick,
|
|
462
|
-
className: (0, _classnames["default"])(
|
|
491
|
+
className: (0, _classnames["default"])('tu-icon-pinglun-m', "".concat(prefix, "__footer-icon"))
|
|
463
492
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
464
493
|
condition: feedComments.total > 0
|
|
465
494
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -497,7 +526,7 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
497
526
|
onReplyChange: handleReply,
|
|
498
527
|
showUser: true,
|
|
499
528
|
showDefaultInput: true
|
|
500
|
-
}))));
|
|
529
|
+
})))));
|
|
501
530
|
};
|
|
502
531
|
|
|
503
532
|
var _default = DynamicItem;
|
|
@@ -11,8 +11,6 @@ var _rcQueueAnim = _interopRequireDefault(require("rc-queue-anim"));
|
|
|
11
11
|
|
|
12
12
|
var _dynamicItem = _interopRequireDefault(require("../dynamic-item"));
|
|
13
13
|
|
|
14
|
-
var _dynamicAiDialy = _interopRequireDefault(require("../dynamic-item/dynamic-ai-dialy"));
|
|
15
|
-
|
|
16
14
|
var _dynamicEmpty = _interopRequireDefault(require("../img/dynamic-empty.png"));
|
|
17
15
|
|
|
18
16
|
var _conditionRender = _interopRequireDefault(require("../../condition-render"));
|
|
@@ -21,12 +19,10 @@ var _getLocale = require("../../../utils/getLocale");
|
|
|
21
19
|
|
|
22
20
|
require("./index.css");
|
|
23
21
|
|
|
24
|
-
var _constant = require("../constant");
|
|
25
|
-
|
|
26
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
23
|
|
|
28
24
|
// @ts-ignore
|
|
29
|
-
var prefix =
|
|
25
|
+
var prefix = 'titaui-dynamic-list';
|
|
30
26
|
|
|
31
27
|
var DynamicList = function DynamicList(_ref) {
|
|
32
28
|
var data = _ref.data,
|
|
@@ -44,7 +40,7 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
44
40
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
45
41
|
className: prefix,
|
|
46
42
|
style: {
|
|
47
|
-
minHeight: height === -1 ?
|
|
43
|
+
minHeight: height === -1 ? 'auto' : height
|
|
48
44
|
}
|
|
49
45
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
50
46
|
condition: data.length === 0
|
|
@@ -56,7 +52,7 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
56
52
|
alt: ""
|
|
57
53
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
58
54
|
className: "".concat(prefix, "__empty-text")
|
|
59
|
-
}, (0, _getLocale.getLocale)(
|
|
55
|
+
}, (0, _getLocale.getLocale)('OKR_Noinformation')))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
60
56
|
condition: data.length !== 0
|
|
61
57
|
}, /*#__PURE__*/_react["default"].createElement(_rcQueueAnim["default"], {
|
|
62
58
|
type: "bottom",
|
|
@@ -65,17 +61,13 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
65
61
|
animConfig: [{
|
|
66
62
|
opacity: [1, 0]
|
|
67
63
|
}, {
|
|
68
|
-
display:
|
|
64
|
+
display: 'none'
|
|
69
65
|
}]
|
|
70
66
|
}, data.map(function (item) {
|
|
71
|
-
var _JSON$parse;
|
|
72
|
-
|
|
73
67
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
74
68
|
className: "".concat(prefix, "__item-wrapper"),
|
|
75
69
|
key: item.feedId
|
|
76
|
-
},
|
|
77
|
-
data: item
|
|
78
|
-
}) : /*#__PURE__*/_react["default"].createElement(_dynamicItem["default"], {
|
|
70
|
+
}, /*#__PURE__*/_react["default"].createElement(_dynamicItem["default"], {
|
|
79
71
|
data: item,
|
|
80
72
|
onDeleteFeed: handleDeleteFeed,
|
|
81
73
|
dynamicShareIsShowToping: dynamicShareIsShowToping
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -35,22 +35,25 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
35
35
|
|
|
36
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
37
|
|
|
38
|
-
var preCls =
|
|
38
|
+
var preCls = 'tita-okrdt-tree';
|
|
39
39
|
|
|
40
|
-
function
|
|
40
|
+
var EPriority = function EPriority(props) {
|
|
41
41
|
var onChange = props.onChange,
|
|
42
42
|
checked = props.checked,
|
|
43
43
|
hasAuth = props.hasAuth,
|
|
44
44
|
status = props.status;
|
|
45
45
|
|
|
46
|
-
var _useState = (0, _react.useState)(
|
|
46
|
+
var _useState = (0, _react.useState)('1'),
|
|
47
47
|
_useState2 = _slicedToArray(_useState, 2),
|
|
48
48
|
level = _useState2[0],
|
|
49
49
|
setLevel = _useState2[1];
|
|
50
50
|
|
|
51
51
|
var onMenuClickHandler = function onMenuClickHandler(name) {
|
|
52
52
|
setLevel(name);
|
|
53
|
-
|
|
53
|
+
|
|
54
|
+
if (onChange) {
|
|
55
|
+
onChange(name);
|
|
56
|
+
}
|
|
54
57
|
};
|
|
55
58
|
|
|
56
59
|
(0, _react.useEffect)(function () {
|
|
@@ -59,7 +62,7 @@ function _default(props) {
|
|
|
59
62
|
return /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
|
|
60
63
|
onChange: onMenuClickHandler,
|
|
61
64
|
checked: level,
|
|
62
|
-
canEdit: hasAuth && status !==
|
|
65
|
+
canEdit: hasAuth && status !== '5',
|
|
63
66
|
limitHeight: false,
|
|
64
67
|
trigger: /*#__PURE__*/_react["default"].createElement("span", {
|
|
65
68
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p").concat(level))
|
|
@@ -68,21 +71,24 @@ function _default(props) {
|
|
|
68
71
|
name: "1"
|
|
69
72
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
70
73
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p1 ").concat(preCls, "__e-task-node-select-priority"))
|
|
71
|
-
}), (0, _getLocale.getLocale)(
|
|
74
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Highest')), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"].IconItem, {
|
|
72
75
|
name: "2"
|
|
73
76
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
74
77
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p2 ").concat(preCls, "__e-task-node-select-priority"))
|
|
75
|
-
}), (0, _getLocale.getLocale)(
|
|
78
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_High')), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"].IconItem, {
|
|
76
79
|
name: "3"
|
|
77
80
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
78
81
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p3 ").concat(preCls, "__e-task-node-select-priority"))
|
|
79
|
-
}), (0, _getLocale.getLocale)(
|
|
82
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Middle')), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"].IconItem, {
|
|
80
83
|
name: "4"
|
|
81
84
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
82
85
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p4 ").concat(preCls, "__e-task-node-select-priority"))
|
|
83
|
-
}), (0, _getLocale.getLocale)(
|
|
86
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Low')), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"].IconItem, {
|
|
84
87
|
name: "5"
|
|
85
88
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
86
89
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p5 ").concat(preCls, "__e-task-node-select-priority"))
|
|
87
|
-
}), (0, _getLocale.getLocale)(
|
|
88
|
-
}
|
|
90
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Verylow')));
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var _default = EPriority;
|
|
94
|
+
exports["default"] = _default;
|
|
@@ -64,28 +64,28 @@ var EReportShare = /*#__PURE__*/function (_PureComponent) {
|
|
|
64
64
|
var _this$props = _this.props,
|
|
65
65
|
onSubmit = _this$props.onSubmit,
|
|
66
66
|
workId = _this$props.workId;
|
|
67
|
-
sentData.ObjType =
|
|
67
|
+
sentData.ObjType = 62;
|
|
68
68
|
sentData.ObjId = workId;
|
|
69
69
|
|
|
70
|
-
if (submitType ===
|
|
70
|
+
if (submitType === 'submit') {
|
|
71
71
|
_this.setState({
|
|
72
72
|
submitStatus: 2
|
|
73
73
|
});
|
|
74
74
|
|
|
75
|
-
var url = (0, _requestV.getApiUrl2)(
|
|
76
|
-
(0, _requestV.taker)(url,
|
|
75
|
+
var url = (0, _requestV.getApiUrl2)('user/feed/AddShare');
|
|
76
|
+
(0, _requestV.taker)(url, 'POST', sentData).then(function (res) {
|
|
77
77
|
if (res.Code == 1) {
|
|
78
78
|
_this.setState({
|
|
79
79
|
submitStatus: 1
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
onSubmit(
|
|
82
|
+
onSubmit('success');
|
|
83
83
|
} else {
|
|
84
84
|
_this.setState({
|
|
85
85
|
submitStatus: 0
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
onSubmit(
|
|
88
|
+
onSubmit('failed');
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
} else {
|
|
@@ -93,7 +93,7 @@ var EReportShare = /*#__PURE__*/function (_PureComponent) {
|
|
|
93
93
|
submitStatus: 0
|
|
94
94
|
});
|
|
95
95
|
|
|
96
|
-
onSubmit(
|
|
96
|
+
onSubmit('cancel');
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
99
|
|
|
@@ -122,12 +122,12 @@ var EReportShare = /*#__PURE__*/function (_PureComponent) {
|
|
|
122
122
|
submitStatus = _this$state.submitStatus,
|
|
123
123
|
popContainer = _this$state.popContainer; // let eReportURL = `${location.origin}${location.pathname}#okr/eReport?okrId=${eReportId}&back=#okr%2Fmanage%3Fwork_id%3D${workId}%26detail_type%3Detask`
|
|
124
124
|
|
|
125
|
-
var eReportURL = "".concat(location.origin).concat(location.pathname, "#okr/eReport?okrId=").concat(eReportId, "&
|
|
126
|
-
var defaultContent = this.isManager ? "@[\u6240\u6709\u540C\u4E8B:all_members] ".concat((0, _getLocale.getLocale)(
|
|
125
|
+
var eReportURL = "".concat(location.origin).concat(location.pathname, "#okr/eReport?okrId=").concat(eReportId, "&work_id=").concat(workId);
|
|
126
|
+
var defaultContent = this.isManager ? "@[\u6240\u6709\u540C\u4E8B:all_members] ".concat((0, _getLocale.getLocale)('Mod_Objective'), "\uFF1A").concat(workName, "\uFF08").concat(eReportDate, "\uFF09E\u5468\u62A5").concat(eReportURL, "\uFF0C\u70B9\u51FB\u94FE\u63A5\u5373\u53EF\u67E5\u770B\uFF5E") : "".concat((0, _getLocale.getLocale)('Mod_Objective'), "\uFF1A").concat(workName, "\uFF08").concat(eReportDate, "\uFF09E\u5468\u62A5").concat(eReportURL, "\uFF0C\u70B9\u51FB\u94FE\u63A5\u5373\u53EF\u67E5\u770B\uFF5E");
|
|
127
127
|
return /*#__PURE__*/_react["default"].createElement(_style.ModalWrapper, {
|
|
128
128
|
className: "".concat(className, " document-mouse-event-ignore"),
|
|
129
129
|
onClick: function onClick() {
|
|
130
|
-
return onSubmit(
|
|
130
|
+
return onSubmit('cancel');
|
|
131
131
|
}
|
|
132
132
|
}, /*#__PURE__*/_react["default"].createElement(_style.ModalContainer, {
|
|
133
133
|
width: "800px",
|
|
@@ -140,7 +140,7 @@ var EReportShare = /*#__PURE__*/function (_PureComponent) {
|
|
|
140
140
|
}, /*#__PURE__*/_react["default"].createElement("span", null, "\u53D1\u5206\u4EAB\uFF08@Ta\uFF09"), /*#__PURE__*/_react["default"].createElement(_style.PraiseRecordClose, {
|
|
141
141
|
className: "tu-icon-close",
|
|
142
142
|
onMouseDown: function onMouseDown() {
|
|
143
|
-
return onSubmit(
|
|
143
|
+
return onSubmit('cancel');
|
|
144
144
|
}
|
|
145
145
|
})), /*#__PURE__*/_react["default"].createElement(_context["default"].Provider, {
|
|
146
146
|
value: {
|
|
@@ -152,7 +152,7 @@ var EReportShare = /*#__PURE__*/function (_PureComponent) {
|
|
|
152
152
|
isShowRangeDropDown: false,
|
|
153
153
|
isShowSendSms: false,
|
|
154
154
|
isShowBtnCancel: false,
|
|
155
|
-
submitText: (0, _getLocale.getLocale)(
|
|
155
|
+
submitText: (0, _getLocale.getLocale)('OKR_MyO_KRP_Butt_Release'),
|
|
156
156
|
initialTextHeight: 96,
|
|
157
157
|
autoResizing: false,
|
|
158
158
|
privateValue: isVisible,
|
|
@@ -39,7 +39,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
39
39
|
|
|
40
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
41
|
|
|
42
|
-
var prefix =
|
|
42
|
+
var prefix = 'titaui-new-file-list-single-file';
|
|
43
43
|
|
|
44
44
|
var SingleFile = function SingleFile(_ref) {
|
|
45
45
|
var data = _ref.data,
|
|
@@ -75,24 +75,24 @@ var SingleFile = function SingleFile(_ref) {
|
|
|
75
75
|
}, isMouseEnter && /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
76
|
className: "".concat(prefix, "__operate"),
|
|
77
77
|
onMouseLeave: handleMouseLeave
|
|
78
|
-
},
|
|
78
|
+
}, showDownload && /*#__PURE__*/_react["default"].createElement("a", {
|
|
79
|
+
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__not-preview"), !canPreview || !data.previewUrl)),
|
|
80
|
+
href: data.downloadUrl
|
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
82
|
+
className: (0, _classnames["default"])('tu-icon-APP-xiazai', "".concat(prefix, "__operate-item-icon"))
|
|
83
|
+
}), (0, _getLocale.getLocale)('Mod_Download')), !isImg && canPreview && data.previewUrl && /*#__PURE__*/_react["default"].createElement("a", {
|
|
79
84
|
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__operate-item--only"), !showDownload)),
|
|
80
85
|
href: data.previewUrl,
|
|
81
86
|
target: "_blank",
|
|
82
87
|
rel: "noreferrer"
|
|
83
88
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
84
|
-
className: (0, _classnames["default"])(
|
|
85
|
-
}), (0, _getLocale.getLocale)(
|
|
89
|
+
className: (0, _classnames["default"])('tu-icon-yulan', "".concat(prefix, "__operate-item-icon"))
|
|
90
|
+
}), (0, _getLocale.getLocale)('Mod_Preview')), isImg && data.previewUrl && /*#__PURE__*/_react["default"].createElement("a", {
|
|
86
91
|
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__operate-item--only"), !showDownload)),
|
|
87
92
|
onClick: handlePreviewImg
|
|
88
93
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
89
|
-
className: (0, _classnames["default"])(
|
|
90
|
-
}), (0, _getLocale.getLocale)(
|
|
91
|
-
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__not-preview"), !canPreview || !data.previewUrl)),
|
|
92
|
-
href: data.downloadUrl
|
|
93
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
94
|
-
className: (0, _classnames["default"])("tu-icon-APP-xiazai", "".concat(prefix, "__operate-item-icon"))
|
|
95
|
-
}), (0, _getLocale.getLocale)("Mod_Download"))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
94
|
+
className: (0, _classnames["default"])('tu-icon-yulan', "".concat(prefix, "__operate-item-icon"))
|
|
95
|
+
}), (0, _getLocale.getLocale)('Mod_Preview'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
96
|
className: (0, _classnames["default"])("".concat(prefix, "__file-preview")),
|
|
97
97
|
onMouseEnter: handleMouseEnter,
|
|
98
98
|
style: {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.form-field-date__label {
|
|
2
|
+
height: 22px;
|
|
3
|
+
margin-bottom: 5px;
|
|
4
|
+
font-size: 14px;
|
|
5
|
+
font-weight: 400;
|
|
6
|
+
line-height: 22px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.form-field-date__label-text {
|
|
10
|
+
color: #3f4755;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.form-field-date__label-symbol {
|
|
14
|
+
color: red;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.form-field-date__pickers {
|
|
18
|
+
display: flex;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.form-field-date__pickers .tita-ui__picker-trigger {
|
|
22
|
+
flex: 1;
|
|
23
|
+
margin-right: 10px;
|
|
24
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
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 _picker = _interopRequireDefault(require("../../../picker"));
|
|
15
|
+
|
|
16
|
+
var _timePicker = _interopRequireDefault(require("../../../time-picker"));
|
|
17
|
+
|
|
18
|
+
require("./index.css");
|
|
19
|
+
|
|
20
|
+
var _excluded = ["label", "layout", "require", "value", "onChange", "datePopupAlign", "timePopupAlign"];
|
|
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
|
+
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; }
|
|
27
|
+
|
|
28
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
|
+
|
|
30
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
|
+
|
|
32
|
+
var prefixCls = 'form-field-date';
|
|
33
|
+
|
|
34
|
+
var Date = function Date(props) {
|
|
35
|
+
var label = props.label,
|
|
36
|
+
layout = props.layout,
|
|
37
|
+
require = props.require,
|
|
38
|
+
_props$value = props.value,
|
|
39
|
+
value = _props$value === void 0 ? (0, _moment["default"])() : _props$value,
|
|
40
|
+
onChange = props.onChange,
|
|
41
|
+
datePopupAlign = props.datePopupAlign,
|
|
42
|
+
timePopupAlign = props.timePopupAlign,
|
|
43
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
44
|
+
|
|
45
|
+
var onDateChange = function onDateChange(date, type) {
|
|
46
|
+
var newDate;
|
|
47
|
+
|
|
48
|
+
switch (type) {
|
|
49
|
+
case 'date':
|
|
50
|
+
newDate = (0, _moment["default"])(value || (0, _moment["default"])()).set({
|
|
51
|
+
year: (0, _moment["default"])(date).year(),
|
|
52
|
+
month: (0, _moment["default"])(date).month(),
|
|
53
|
+
date: (0, _moment["default"])(date).date()
|
|
54
|
+
});
|
|
55
|
+
break;
|
|
56
|
+
|
|
57
|
+
case 'time':
|
|
58
|
+
newDate = (0, _moment["default"])(value || (0, _moment["default"])()).set({
|
|
59
|
+
hour: (0, _moment["default"])(date, 'HH:mm').hour(),
|
|
60
|
+
minute: (0, _moment["default"])(date, 'HH:mm').minute()
|
|
61
|
+
});
|
|
62
|
+
break;
|
|
63
|
+
|
|
64
|
+
default:
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
onChange(newDate);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
72
|
+
className: (0, _classnames["default"])(prefixCls, _defineProperty({}, "".concat(prefixCls, "-row"), layout === 'row'))
|
|
73
|
+
}, !!label && /*#__PURE__*/_react["default"].createElement("div", {
|
|
74
|
+
className: "".concat(prefixCls, "__label")
|
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
|
+
className: "".concat(prefixCls, "__label-text")
|
|
77
|
+
}, label), require && /*#__PURE__*/_react["default"].createElement("span", {
|
|
78
|
+
className: "".concat(prefixCls, "__label-symbol")
|
|
79
|
+
}, "*")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
|
+
className: (0, _classnames["default"])("".concat(prefixCls, "__pickers"))
|
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement(_picker["default"], _extends({
|
|
82
|
+
value: value,
|
|
83
|
+
onChange: function onChange(date) {
|
|
84
|
+
return onDateChange(date, 'date');
|
|
85
|
+
},
|
|
86
|
+
popupAlign: datePopupAlign
|
|
87
|
+
}, restProps)), /*#__PURE__*/_react["default"].createElement(_timePicker["default"], _extends({
|
|
88
|
+
value: value,
|
|
89
|
+
popupAlign: timePopupAlign,
|
|
90
|
+
onChange: function onChange(time) {
|
|
91
|
+
return onDateChange(time, 'time');
|
|
92
|
+
}
|
|
93
|
+
}, restProps))));
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
Date.defaultProps = {
|
|
97
|
+
disabled: false,
|
|
98
|
+
layout: 'column',
|
|
99
|
+
require: false
|
|
100
|
+
};
|
|
101
|
+
var _default = Date;
|
|
102
|
+
exports["default"] = _default;
|