@titaui/pc 1.11.52-beta.2 → 1.11.52-beta.5
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/change-okr-modal/Item.js +19 -18
- package/lib/components/change-okr-modal/styledComponents.js +9 -9
- package/lib/components/create-okr-modal/createSuccessCmp.js +47 -19
- package/lib/components/create-okr-modal/fields/index.css +14 -3
- package/lib/components/create-okr-modal/fields/o-new-name.js +25 -19
- package/lib/components/create-okr-modal/index.js +75 -35
- package/lib/components/create-okr-modal/kr-items/index.css +12 -1
- package/lib/components/create-okr-modal/kr-items/krDatas.js +6 -5
- package/lib/components/create-okr-modal/kr-items/krItem.js +22 -12
- package/lib/components/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
- 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/dynamic-item/components/feed-operate/index.js +8 -8
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +18 -18
- 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/components/{contact-kefu → dynamic/dynamic-liking}/index.js +35 -58
- 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 -14
- 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 +95 -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/eReport/eReportLists/reportList.js +3 -3
- package/lib/components/emotions-selector/selector-pop.js +3 -3
- package/lib/components/ereport-list/index.js +3 -3
- package/lib/components/mblog/components/MblogAction.js +3 -3
- package/lib/components/nav-top/components/menu/index.js +4 -3
- package/lib/components/nav-top/index.js +2 -2
- package/lib/components/okr-detail/components/base-okr-type/index.css +0 -4
- package/lib/components/okr-detail/components/base-okr-type/object-type.js +0 -1
- package/lib/components/okr-detail/components/header/edit-name.js +86 -40
- package/lib/components/okr-detail/components/header/index.css +120 -41
- package/lib/components/okr-detail/components/header/index.js +36 -46
- package/lib/components/okr-detail/components/header/o-classify.js +152 -0
- package/lib/components/okr-detail/components/header/o-name.js +7 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +54 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +106 -56
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +9 -9
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +5 -9
- package/lib/components/okr-detail/detail-header/index.js +8 -4
- package/lib/components/okr-detail/okr-list/create-kr-item/index.css +17 -0
- package/lib/components/okr-detail/okr-list/create-kr-item/index.js +63 -39
- package/lib/components/okr-detail/request-apis.js +73 -69
- package/lib/components/okr-detail/schedule/components/kr-progress/index.js +3 -1
- package/lib/components/okr-detail/schedule/components/o-progress/index.js +3 -1
- package/lib/components/okr-detail/schedule/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-flow/child-node/kr-node.js +3 -1
- package/lib/components/okr-flow/child-node/work-node.js +3 -1
- package/lib/components/okr-progress/components/kr-progress/index.js +5 -3
- package/lib/components/okr-progress/components/o-progress/index.js +3 -1
- package/lib/components/okr-progress/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +3 -3
- package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/okr-share/common-painter/openDataPainter.js +9 -6
- package/lib/components/okr-share/common-painter/utils.js +183 -36
- package/lib/components/okr-share/index.css +5 -4
- package/lib/components/okr-share/pink-card/card.js +3 -3
- package/lib/components/okr-share/pink-card/drawKrs.js +93 -18
- package/lib/components/okr-share/pink-card/index.js +20 -12
- package/lib/components/open-data-painter/index.js +6 -5
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +10 -16
- package/lib/components/radio/index.css +3 -3
- package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
- package/lib/components/rich-editor/models/schema.js +6 -6
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
- package/lib/components/rich-editor/plugins/core/index.js +4 -4
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
- package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
- package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
- package/lib/components/rich-editor/react/uiProvider.js +3 -3
- package/lib/components/rich-editor/ui/Popup/index.js +3 -3
- package/lib/components/search-key-handle/index.js +9 -7
- package/lib/components/select/Option.js +3 -3
- package/lib/components/task-relation-modal/tree-node/category-node/index.css +11 -0
- package/lib/components/task-relation-modal/tree-node/category-node/index.js +3 -1
- package/lib/components/task-relation-modal/tree-node/kr-node/index.css +16 -0
- package/lib/components/task-relation-modal/tree-node/kr-node/index.js +10 -4
- package/lib/components/task-relation-modal/tree-node/milestone-node/index.css +16 -0
- package/lib/components/task-relation-modal/tree-node/milestone-node/index.js +4 -0
- package/lib/components/task-relation-modal/tree-node/o-node/index.js +8 -8
- package/lib/components/textarea/index.js +35 -38
- package/lib/components/tita-chart/errorBoundary/index.js +3 -3
- package/lib/components/wechat-btn/index.css +4 -1
- package/lib/components-v1/animate/AnimateChild.js +3 -3
- package/lib/components-v1/avatar/index.js +3 -3
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
- package/lib/components-v1/progress/CircleProgress.js +3 -3
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
- package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
- package/lib/components-v1/userSelector/components/SingleMode.js +7 -5
- package/lib/components-v1/userSelector/components/UserItem.js +3 -3
- package/lib/index.js +0 -8
- package/lib/{components/contact-kefu → pages/aha2021}/img/canceled.svg +0 -0
- package/lib/{components/contact-kefu → pages/aha2021}/img/kefu.svg +0 -0
- package/lib/{components/contact-kefu → pages/aha2021}/img/not-try.png +0 -0
- package/lib/{components/contact-kefu → pages/aha2021}/img/try.png +0 -0
- package/lib/pages/aha2021/index.css +26 -1
- package/lib/pages/aha2021/index.js +82 -3
- package/lib/pages/home/components/data-list/table/columns/krName.js +3 -1
- package/lib/pages/home/components/data-list/table/columns/okrName.js +4 -2
- package/lib/pages/new-okr-list/header/index.css +1 -1
- package/lib/utils/open-data.js +213 -65
- package/package.json +3 -2
- package/lib/components/contact-kefu/img/notice.png +0 -0
- package/lib/components/contact-kefu/index.css +0 -85
|
@@ -9,6 +9,8 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _richEditor = require("@titaui/rich-editor");
|
|
13
|
+
|
|
12
14
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
13
15
|
|
|
14
16
|
var _titaUi = require("tita-ui");
|
|
@@ -106,6 +108,13 @@ var initOCheckResult = function initOCheckResult() {
|
|
|
106
108
|
});
|
|
107
109
|
};
|
|
108
110
|
|
|
111
|
+
var DefaultOkrNameData = {
|
|
112
|
+
mentionUsers: [],
|
|
113
|
+
pureText: '',
|
|
114
|
+
pureTextExcludeAt: '',
|
|
115
|
+
richText: undefined
|
|
116
|
+
};
|
|
117
|
+
|
|
109
118
|
function CreateOkrModal(_ref, ref) {
|
|
110
119
|
var initCycle = _ref.initCycle,
|
|
111
120
|
userInfo = _ref.userInfo,
|
|
@@ -138,10 +147,10 @@ function CreateOkrModal(_ref, ref) {
|
|
|
138
147
|
Id = _ref2.Id,
|
|
139
148
|
UserAvatar = _ref2.UserAvatar;
|
|
140
149
|
|
|
141
|
-
var _useState3 = (0, _react.useState)(
|
|
150
|
+
var _useState3 = (0, _react.useState)(DefaultOkrNameData),
|
|
142
151
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
143
|
-
|
|
144
|
-
|
|
152
|
+
okrNameData = _useState4[0],
|
|
153
|
+
setOkrNameData = _useState4[1]; // 目标名称
|
|
145
154
|
|
|
146
155
|
|
|
147
156
|
var _useState5 = (0, _react.useState)({
|
|
@@ -219,6 +228,9 @@ function CreateOkrModal(_ref, ref) {
|
|
|
219
228
|
userAvatar: UserAvatar,
|
|
220
229
|
krWeight: 100,
|
|
221
230
|
mileStoneName: '',
|
|
231
|
+
mileStoneNamePureTextExcludeAt: '',
|
|
232
|
+
mileStoneNameRichText: undefined,
|
|
233
|
+
aiteUsers: [],
|
|
222
234
|
confidenceIndex: 5
|
|
223
235
|
}]),
|
|
224
236
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
@@ -336,7 +348,12 @@ function CreateOkrModal(_ref, ref) {
|
|
|
336
348
|
setCase: function setCase(data) {
|
|
337
349
|
var name = data.name,
|
|
338
350
|
subelements = data.subelements;
|
|
339
|
-
|
|
351
|
+
setOkrNameData({
|
|
352
|
+
mentionUsers: [],
|
|
353
|
+
pureText: name,
|
|
354
|
+
pureTextExcludeAt: '',
|
|
355
|
+
richText: (0, _richEditor.TitaRichEditorInitTextState)(name)
|
|
356
|
+
});
|
|
340
357
|
setKrDatas(subelements.map(function (s) {
|
|
341
358
|
return {
|
|
342
359
|
uuid: _uuid["default"].v1(),
|
|
@@ -345,17 +362,23 @@ function CreateOkrModal(_ref, ref) {
|
|
|
345
362
|
userAvatar: UserAvatar,
|
|
346
363
|
krWeight: (0, _roundWeight.RoundWeight)(100 / subelements.length),
|
|
347
364
|
mileStoneName: s.name,
|
|
365
|
+
mileStoneNamePureTextExcludeAt: '',
|
|
366
|
+
mileStoneNameRichText: (0, _richEditor.TitaRichEditorInitTextState)(s.name),
|
|
367
|
+
aiteUsers: [],
|
|
348
368
|
confidenceIndex: 5
|
|
349
369
|
};
|
|
350
370
|
}));
|
|
351
371
|
setIsCustomWeight(false);
|
|
352
372
|
},
|
|
353
373
|
setData: function setData(data) {
|
|
354
|
-
|
|
374
|
+
setOkrNameData({
|
|
375
|
+
mentionUsers: [],
|
|
376
|
+
pureText: data.okrName,
|
|
377
|
+
pureTextExcludeAt: '',
|
|
378
|
+
richText: (0, _richEditor.TitaRichEditorInitTextState)(data.okrName)
|
|
379
|
+
});
|
|
355
380
|
setUser(data.user);
|
|
356
|
-
}
|
|
357
|
-
show: showCreateOkrModal,
|
|
358
|
-
hide: hideCreateOkrModal
|
|
381
|
+
}
|
|
359
382
|
};
|
|
360
383
|
});
|
|
361
384
|
var handleOnSuccess = (0, _react.useCallback)(function () {
|
|
@@ -401,13 +424,15 @@ function CreateOkrModal(_ref, ref) {
|
|
|
401
424
|
|
|
402
425
|
var onModalOkHandler = /*#__PURE__*/function () {
|
|
403
426
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
404
|
-
var orkNameLengthValidate, visibilityArea, data, krNum, krTotalLength, krAvarageLength, krMeasurableLength, oHasVtWords, callData, workId;
|
|
427
|
+
var mentionUsers, pureText, pureTextExcludeAt, richText, orkNameLengthValidate, visibilityArea, data, krNum, krTotalLength, krAvarageLength, krMeasurableLength, oHasVtWords, callData, workId;
|
|
405
428
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
406
429
|
while (1) {
|
|
407
430
|
switch (_context.prev = _context.next) {
|
|
408
431
|
case 0:
|
|
409
|
-
|
|
410
|
-
|
|
432
|
+
mentionUsers = okrNameData.mentionUsers, pureText = okrNameData.pureText, pureTextExcludeAt = okrNameData.pureTextExcludeAt, richText = okrNameData.richText;
|
|
433
|
+
|
|
434
|
+
if (pureText) {
|
|
435
|
+
_context.next = 4;
|
|
411
436
|
break;
|
|
412
437
|
}
|
|
413
438
|
|
|
@@ -417,9 +442,9 @@ function CreateOkrModal(_ref, ref) {
|
|
|
417
442
|
|
|
418
443
|
return _context.abrupt("return");
|
|
419
444
|
|
|
420
|
-
case
|
|
421
|
-
if (!(
|
|
422
|
-
_context.next =
|
|
445
|
+
case 4:
|
|
446
|
+
if (!(pureTextExcludeAt.length > 500)) {
|
|
447
|
+
_context.next = 7;
|
|
423
448
|
break;
|
|
424
449
|
}
|
|
425
450
|
|
|
@@ -429,9 +454,9 @@ function CreateOkrModal(_ref, ref) {
|
|
|
429
454
|
|
|
430
455
|
return _context.abrupt("return");
|
|
431
456
|
|
|
432
|
-
case
|
|
457
|
+
case 7:
|
|
433
458
|
if (allKrHasName) {
|
|
434
|
-
_context.next =
|
|
459
|
+
_context.next = 11;
|
|
435
460
|
break;
|
|
436
461
|
}
|
|
437
462
|
|
|
@@ -442,13 +467,15 @@ function CreateOkrModal(_ref, ref) {
|
|
|
442
467
|
setKrIsValidate(true);
|
|
443
468
|
return _context.abrupt("return");
|
|
444
469
|
|
|
445
|
-
case
|
|
470
|
+
case 11:
|
|
446
471
|
orkNameLengthValidate = krDatas.filter(function (kr) {
|
|
447
|
-
|
|
472
|
+
var _trim;
|
|
473
|
+
|
|
474
|
+
return ((_trim = ((kr === null || kr === void 0 ? void 0 : kr.mileStoneNamePureTextExcludeAt) || '').trim()) === null || _trim === void 0 ? void 0 : _trim.length) > 500;
|
|
448
475
|
}).length == 0;
|
|
449
476
|
|
|
450
477
|
if (orkNameLengthValidate) {
|
|
451
|
-
_context.next =
|
|
478
|
+
_context.next = 15;
|
|
452
479
|
break;
|
|
453
480
|
}
|
|
454
481
|
|
|
@@ -458,11 +485,11 @@ function CreateOkrModal(_ref, ref) {
|
|
|
458
485
|
|
|
459
486
|
return _context.abrupt("return");
|
|
460
487
|
|
|
461
|
-
case
|
|
488
|
+
case 15:
|
|
462
489
|
setKrIsValidate(false);
|
|
463
490
|
|
|
464
491
|
if (krWeightValid) {
|
|
465
|
-
_context.next =
|
|
492
|
+
_context.next = 19;
|
|
466
493
|
break;
|
|
467
494
|
}
|
|
468
495
|
|
|
@@ -472,27 +499,32 @@ function CreateOkrModal(_ref, ref) {
|
|
|
472
499
|
|
|
473
500
|
return _context.abrupt("return");
|
|
474
501
|
|
|
475
|
-
case
|
|
502
|
+
case 19:
|
|
476
503
|
if (cycle) {
|
|
477
|
-
_context.next =
|
|
504
|
+
_context.next = 21;
|
|
478
505
|
break;
|
|
479
506
|
}
|
|
480
507
|
|
|
481
508
|
return _context.abrupt("return");
|
|
482
509
|
|
|
483
|
-
case
|
|
510
|
+
case 21:
|
|
484
511
|
handleCreatedClose();
|
|
485
512
|
visibilityArea = formatVisiableLimit();
|
|
486
|
-
_context.next =
|
|
513
|
+
_context.next = 25;
|
|
487
514
|
return (0, _requestApi.createWidthKr)(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
488
515
|
krInfos: krDatas.map(function (kr) {
|
|
516
|
+
delete kr.mileStoneNamePureTextExcludeAt;
|
|
489
517
|
return _objectSpread(_objectSpread({}, kr), {}, {
|
|
490
518
|
startDate: cycle.startDate,
|
|
491
519
|
endDate: cycle.endDate
|
|
492
520
|
});
|
|
493
521
|
})
|
|
494
522
|
}, cycle), {}, {
|
|
495
|
-
workName:
|
|
523
|
+
workName: pureText,
|
|
524
|
+
workNameRichText: richText,
|
|
525
|
+
aiteUsers: mentionUsers === null || mentionUsers === void 0 ? void 0 : mentionUsers.map(function (user) {
|
|
526
|
+
return user.mentionId;
|
|
527
|
+
})
|
|
496
528
|
}, parent), {}, {
|
|
497
529
|
workType: 6,
|
|
498
530
|
visibility: visibility,
|
|
@@ -507,11 +539,11 @@ function CreateOkrModal(_ref, ref) {
|
|
|
507
539
|
CreateFromAssess: isFromAssess
|
|
508
540
|
}));
|
|
509
541
|
|
|
510
|
-
case
|
|
542
|
+
case 25:
|
|
511
543
|
data = _context.sent;
|
|
512
544
|
|
|
513
545
|
if (!(data.Code === 0)) {
|
|
514
|
-
_context.next =
|
|
546
|
+
_context.next = 29;
|
|
515
547
|
break;
|
|
516
548
|
}
|
|
517
549
|
|
|
@@ -521,7 +553,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
521
553
|
|
|
522
554
|
return _context.abrupt("return");
|
|
523
555
|
|
|
524
|
-
case
|
|
556
|
+
case 29:
|
|
525
557
|
hideCreateOkrModal();
|
|
526
558
|
|
|
527
559
|
if (onSuccess || !isHiddenCreatedCard) {
|
|
@@ -538,7 +570,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
538
570
|
}).length;
|
|
539
571
|
oHasVtWords = oNameCheckResult[0].result === _okrCreateSuggest.EOkrCreateSuggestResultType.correct;
|
|
540
572
|
callData = data;
|
|
541
|
-
callData.countSurpassPercentage = (0, _getCreateOkrSurpassPercent["default"])(
|
|
573
|
+
callData.countSurpassPercentage = (0, _getCreateOkrSurpassPercent["default"])(okrNameData.pureText.replace(/(%|\d)/g, '').length, oHasVtWords, krNum, krMeasurableLength, Number.parseInt(krAvarageLength.toString()));
|
|
542
574
|
newOkrDataRef.current = callData;
|
|
543
575
|
handleOnSuccess();
|
|
544
576
|
} else {
|
|
@@ -551,7 +583,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
551
583
|
|
|
552
584
|
setIsApplyTpl(false);
|
|
553
585
|
|
|
554
|
-
case
|
|
586
|
+
case 32:
|
|
555
587
|
case "end":
|
|
556
588
|
return _context.stop();
|
|
557
589
|
}
|
|
@@ -568,7 +600,12 @@ function CreateOkrModal(_ref, ref) {
|
|
|
568
600
|
var OnOkRApplyTplHandler = function OnOkRApplyTplHandler(data) {
|
|
569
601
|
var name = data.name,
|
|
570
602
|
subelements = data.subelements;
|
|
571
|
-
|
|
603
|
+
setOkrNameData({
|
|
604
|
+
mentionUsers: [],
|
|
605
|
+
pureText: name,
|
|
606
|
+
pureTextExcludeAt: '',
|
|
607
|
+
richText: (0, _richEditor.TitaRichEditorInitTextState)(name)
|
|
608
|
+
});
|
|
572
609
|
setKrDatas(subelements.map(function (s) {
|
|
573
610
|
return {
|
|
574
611
|
uuid: _uuid["default"].v1(),
|
|
@@ -593,9 +630,12 @@ function CreateOkrModal(_ref, ref) {
|
|
|
593
630
|
userAvatar: UserAvatar,
|
|
594
631
|
krWeight: 100,
|
|
595
632
|
mileStoneName: '',
|
|
633
|
+
mileStoneNamePureTextExcludeAt: '',
|
|
634
|
+
mileStoneNameRichText: undefined,
|
|
635
|
+
aiteUsers: [],
|
|
596
636
|
confidenceIndex: 5
|
|
597
637
|
}]);
|
|
598
|
-
|
|
638
|
+
setOkrNameData(DefaultOkrNameData);
|
|
599
639
|
setUser({
|
|
600
640
|
name: Name,
|
|
601
641
|
id: Id,
|
|
@@ -843,8 +883,8 @@ function CreateOkrModal(_ref, ref) {
|
|
|
843
883
|
container: modalRef,
|
|
844
884
|
user: user,
|
|
845
885
|
setUser: setUser,
|
|
846
|
-
|
|
847
|
-
|
|
886
|
+
okrNameData: okrNameData,
|
|
887
|
+
setOkrNameData: setOkrNameData,
|
|
848
888
|
onOInputFocusStateChange: handleOInputFocusStateChange,
|
|
849
889
|
setONameCheckResult: setONameCheckResult,
|
|
850
890
|
setIsInputContent: setIsInputContent
|
|
@@ -51,6 +51,17 @@
|
|
|
51
51
|
color: #bfc7d5;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
.create-kr-item-wrapper .kr-item__right-block .kr-item__input-wrapper .tita-rich-editor__inline-editor {
|
|
55
|
+
flex: 1;
|
|
56
|
+
width: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.create-kr-item-wrapper .kr-item__right-block .kr-item__input-wrapper .tita-rich-editor__inline-editor .ProseMirror > p {
|
|
60
|
+
font-size: 14px;
|
|
61
|
+
line-height: 22px;
|
|
62
|
+
color: #6f7886;
|
|
63
|
+
}
|
|
64
|
+
|
|
54
65
|
.create-kr-item-wrapper .kr-item__right-block .kr-item-right-block__text-mask {
|
|
55
66
|
width: 20px;
|
|
56
67
|
height: 24px;
|
|
@@ -136,7 +147,7 @@
|
|
|
136
147
|
}
|
|
137
148
|
|
|
138
149
|
.kr-weight__error-popup-text-wrapper::after {
|
|
139
|
-
content:
|
|
150
|
+
content: '';
|
|
140
151
|
display: block;
|
|
141
152
|
border: 6px solid transparent;
|
|
142
153
|
position: absolute;
|
|
@@ -88,7 +88,7 @@ function KrDatas(props) {
|
|
|
88
88
|
|
|
89
89
|
var timerRef = (0, _react.useRef)();
|
|
90
90
|
var krNameIsEmpty = (0, _react.useRef)(!inputKrInfo || !inputKrInfo.mileStoneName);
|
|
91
|
-
var setting = (0, _bsGlobal.getBSGlobal)(
|
|
91
|
+
var setting = (0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting;
|
|
92
92
|
|
|
93
93
|
var _getUserInfo = (0, _bsGlobal.getUserInfo)(),
|
|
94
94
|
Name = _getUserInfo.Name,
|
|
@@ -127,7 +127,7 @@ function KrDatas(props) {
|
|
|
127
127
|
principalName: Name,
|
|
128
128
|
userAvatar: UserAvatar,
|
|
129
129
|
krWeight: (0, _roundWeight.RoundWeight)(100 / (krDatas.length + 1)),
|
|
130
|
-
mileStoneName:
|
|
130
|
+
mileStoneName: '',
|
|
131
131
|
confidenceIndex: 5
|
|
132
132
|
}]));
|
|
133
133
|
return;
|
|
@@ -139,7 +139,7 @@ function KrDatas(props) {
|
|
|
139
139
|
principalName: Name,
|
|
140
140
|
userAvatar: UserAvatar,
|
|
141
141
|
krWeight: 0,
|
|
142
|
-
mileStoneName:
|
|
142
|
+
mileStoneName: '',
|
|
143
143
|
confidenceIndex: 5
|
|
144
144
|
}]));
|
|
145
145
|
}
|
|
@@ -273,6 +273,7 @@ function KrDatas(props) {
|
|
|
273
273
|
}, []);
|
|
274
274
|
return /*#__PURE__*/_react["default"].createElement("div", null, krs.map(function (kr, index) {
|
|
275
275
|
return /*#__PURE__*/_react["default"].createElement(_krItem["default"], {
|
|
276
|
+
key: kr === null || kr === void 0 ? void 0 : kr.uuid,
|
|
276
277
|
krData: kr,
|
|
277
278
|
changeKr: changeKr,
|
|
278
279
|
deleteKr: deleteKr,
|
|
@@ -291,9 +292,9 @@ function KrDatas(props) {
|
|
|
291
292
|
className: "add-kr-btn__icon",
|
|
292
293
|
src: _krAdd["default"],
|
|
293
294
|
alt: ""
|
|
294
|
-
}), (0, _getLocale.getLocale)(
|
|
295
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_Pop_Butt_AddKR')), krs.length > 0 && openKrWeight && /*#__PURE__*/_react["default"].createElement("span", {
|
|
295
296
|
className: "krs-info__total-weight"
|
|
296
|
-
}, (0, _getLocale.getLocale)(
|
|
297
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_Text_Total'), total, "%")));
|
|
297
298
|
}
|
|
298
299
|
|
|
299
300
|
var _default = KrDatas;
|
|
@@ -9,6 +9,8 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _richEditor = require("@titaui/rich-editor");
|
|
13
|
+
|
|
12
14
|
var _bsGlobal = require("../../../utils/bs-global");
|
|
13
15
|
|
|
14
16
|
var _krItemWeight = _interopRequireDefault(require("./kr-item-weight"));
|
|
@@ -56,7 +58,7 @@ function KrItem(_ref) {
|
|
|
56
58
|
setIsInputContent = _ref.setIsInputContent,
|
|
57
59
|
domRef = _ref.domRef,
|
|
58
60
|
krIsValidate = _ref.krIsValidate;
|
|
59
|
-
var setting = (0, _bsGlobal.getBSGlobal)(
|
|
61
|
+
var setting = (0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting;
|
|
60
62
|
var openKrWeight = setting.KrWeight;
|
|
61
63
|
|
|
62
64
|
var _useState = (0, _react.useState)(false),
|
|
@@ -64,7 +66,8 @@ function KrItem(_ref) {
|
|
|
64
66
|
showDelIcon = _useState2[0],
|
|
65
67
|
setShowDelIcon = _useState2[1];
|
|
66
68
|
|
|
67
|
-
var
|
|
69
|
+
var mentionInputRef = (0, _react.useRef)();
|
|
70
|
+
var oldKrNameRef = (0, _react.useRef)('');
|
|
68
71
|
|
|
69
72
|
var onUserSelectorSubmitHandler = function onUserSelectorSubmitHandler(users) {
|
|
70
73
|
changeKr(_objectSpread(_objectSpread({}, krData), {}, {
|
|
@@ -74,9 +77,18 @@ function KrItem(_ref) {
|
|
|
74
77
|
}));
|
|
75
78
|
};
|
|
76
79
|
|
|
77
|
-
var onKrNameInputChangeHandler = function onKrNameInputChangeHandler(
|
|
80
|
+
var onKrNameInputChangeHandler = function onKrNameInputChangeHandler(_ref2) {
|
|
81
|
+
var mentionUsers = _ref2.mentionUsers,
|
|
82
|
+
pureText = _ref2.pureText,
|
|
83
|
+
pureTextExcludeAt = _ref2.pureTextExcludeAt,
|
|
84
|
+
richText = _ref2.richText;
|
|
78
85
|
changeKr(_objectSpread(_objectSpread({}, krData), {}, {
|
|
79
|
-
mileStoneName:
|
|
86
|
+
mileStoneName: pureText,
|
|
87
|
+
mileStoneNameRichText: richText,
|
|
88
|
+
mileStoneNamePureTextExcludeAt: pureTextExcludeAt,
|
|
89
|
+
aiteUsers: mentionUsers === null || mentionUsers === void 0 ? void 0 : mentionUsers.map(function (user) {
|
|
90
|
+
return user.mentionId;
|
|
91
|
+
})
|
|
80
92
|
}));
|
|
81
93
|
};
|
|
82
94
|
|
|
@@ -128,10 +140,10 @@ function KrItem(_ref) {
|
|
|
128
140
|
onMouseEnter: handleMouseEnter,
|
|
129
141
|
onMouseLeave: handleMouseLeave
|
|
130
142
|
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
131
|
-
className: "kr-item__delete-icon tu-icon-del ".concat(showDelIcon ?
|
|
143
|
+
className: "kr-item__delete-icon tu-icon-del ".concat(showDelIcon ? 'kr-item__delete-icon--show' : ''),
|
|
132
144
|
onClick: onDeleteKrClickHandler
|
|
133
145
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
134
|
-
className: "kr-item__right-block ".concat(krIsValidate ? krData.mileStoneName && krData.mileStoneName.length <= 500 ?
|
|
146
|
+
className: "kr-item__right-block ".concat(krIsValidate ? krData.mileStoneName && krData.mileStoneName.length <= 500 ? '' : 'kr-item__right-block--error' : '')
|
|
135
147
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
136
148
|
className: "kr-item__order"
|
|
137
149
|
}, "KR", index), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -140,17 +152,15 @@ function KrItem(_ref) {
|
|
|
140
152
|
strLength: krData.mileStoneName ? krData.mileStoneName.length : 0,
|
|
141
153
|
maxLength: 500,
|
|
142
154
|
position: "top"
|
|
143
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
144
|
-
|
|
145
|
-
type: "text",
|
|
146
|
-
placeholder: (0, _getLocale.getLocale)("OKR_MyO_Pop_Keyresults"),
|
|
147
|
-
value: krData.mileStoneName,
|
|
155
|
+
}, /*#__PURE__*/_react["default"].createElement(_richEditor.TitaInlineRichEditor, {
|
|
156
|
+
initialState: krData.mileStoneName,
|
|
148
157
|
onChange: onKrNameInputChangeHandler,
|
|
149
158
|
onFocus: handleInputFocus,
|
|
150
159
|
onBlur: handleInputBlur,
|
|
151
160
|
onKeyDown: handleOnKeyDown,
|
|
152
161
|
onKeyUp: handleOnKeyUp,
|
|
153
|
-
|
|
162
|
+
placeholder: (0, _getLocale.getLocale)('OKR_MyO_Pop_Keyresults'),
|
|
163
|
+
ref: mentionInputRef
|
|
154
164
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
155
165
|
className: "kr-item-right-block__white-block"
|
|
156
166
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -47,7 +47,7 @@ var BodyItem = /*#__PURE__*/function (_Component) {
|
|
|
47
47
|
var _super = _createSuper(BodyItem);
|
|
48
48
|
|
|
49
49
|
function BodyItem() {
|
|
50
|
-
var _this;
|
|
50
|
+
var _temp, _this;
|
|
51
51
|
|
|
52
52
|
_classCallCheck(this, BodyItem);
|
|
53
53
|
|
|
@@ -55,7 +55,7 @@ var BodyItem = /*#__PURE__*/function (_Component) {
|
|
|
55
55
|
args[_key] = arguments[_key];
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.getClass = function () {
|
|
58
|
+
return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.getClass = function () {
|
|
59
59
|
var _this$props = _this.props,
|
|
60
60
|
isAllowSelect = _this$props.isAllowSelect,
|
|
61
61
|
date = _this$props.date,
|
|
@@ -86,7 +86,7 @@ var BodyItem = /*#__PURE__*/function (_Component) {
|
|
|
86
86
|
if (_this.disabled) return;
|
|
87
87
|
|
|
88
88
|
_this.props.onSelectDate((0, _moment["default"])(date.format("YYYY/MM/DD")));
|
|
89
|
-
},
|
|
89
|
+
}, _temp));
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
_createClass(BodyItem, [{
|
|
@@ -87,7 +87,7 @@ var CalendarHeader = /*#__PURE__*/function (_Component) {
|
|
|
87
87
|
var _super = _createSuper(CalendarHeader);
|
|
88
88
|
|
|
89
89
|
function CalendarHeader() {
|
|
90
|
-
var _this;
|
|
90
|
+
var _temp, _this;
|
|
91
91
|
|
|
92
92
|
_classCallCheck(this, CalendarHeader);
|
|
93
93
|
|
|
@@ -95,7 +95,7 @@ var CalendarHeader = /*#__PURE__*/function (_Component) {
|
|
|
95
95
|
args[_key] = arguments[_key];
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.setDate = function (func) {
|
|
98
|
+
return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.setDate = function (func) {
|
|
99
99
|
var date = (0, _moment["default"])(_this.props.date);
|
|
100
100
|
|
|
101
101
|
for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
@@ -113,7 +113,7 @@ var CalendarHeader = /*#__PURE__*/function (_Component) {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
return years;
|
|
116
|
-
},
|
|
116
|
+
}, _temp));
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
_createClass(CalendarHeader, [{
|
|
@@ -49,7 +49,7 @@ var ConfirmPop = /*#__PURE__*/function (_PureComponent) {
|
|
|
49
49
|
var _super = _createSuper(ConfirmPop);
|
|
50
50
|
|
|
51
51
|
function ConfirmPop() {
|
|
52
|
-
var _this;
|
|
52
|
+
var _temp, _this;
|
|
53
53
|
|
|
54
54
|
_classCallCheck(this, ConfirmPop);
|
|
55
55
|
|
|
@@ -57,13 +57,13 @@ var ConfirmPop = /*#__PURE__*/function (_PureComponent) {
|
|
|
57
57
|
args[_key] = arguments[_key];
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.handleShowPop = function () {
|
|
60
|
+
return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.handleShowPop = function () {
|
|
61
61
|
// @ts-ignore
|
|
62
62
|
_this.refs.pop.show(_this.refs.trigger);
|
|
63
63
|
}, _this.handleHide = function () {
|
|
64
64
|
// @ts-ignore
|
|
65
65
|
_this.refs.pop.hide();
|
|
66
|
-
},
|
|
66
|
+
}, _temp));
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
_createClass(ConfirmPop, [{
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.titaui-dynamic-advertise-next-btn {
|
|
2
|
+
width: 24px;
|
|
3
|
+
height: 24px;
|
|
4
|
+
background: rgba(0, 0, 0, 0.4);
|
|
5
|
+
border-radius: 50%;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 50%;
|
|
12
|
+
transform: translateY(-50%);
|
|
13
|
+
z-index: 1;
|
|
14
|
+
right: 16px;
|
|
15
|
+
opacity: 1;
|
|
16
|
+
transition: all 0.3s linear;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.titaui-dynamic-advertise-next-btn__icon {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
transform: rotate(180deg);
|
|
22
|
+
color: #ffffff;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.titaui-dynamic-advertise-next-btn--hidden {
|
|
26
|
+
opacity: 0;
|
|
27
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
require("./index.css");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
var prefix = "titaui-dynamic-advertise-next-btn";
|
|
19
|
+
|
|
20
|
+
var NextBtn = function NextBtn(_ref) {
|
|
21
|
+
var onClick = _ref.onClick,
|
|
22
|
+
isShow = _ref.isShow;
|
|
23
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
|
+
className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--hidden"), !isShow)),
|
|
25
|
+
onClick: onClick
|
|
26
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
27
|
+
className: (0, _classnames["default"])("tu-icon-left", "".concat(prefix, "__icon"))
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var _default = NextBtn;
|
|
32
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.titaui-dynamic-advertise-pre-btn {
|
|
2
|
+
width: 24px;
|
|
3
|
+
height: 24px;
|
|
4
|
+
background: rgba(0, 0, 0, 0.4);
|
|
5
|
+
border-radius: 50%;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 50%;
|
|
12
|
+
left: 16px;
|
|
13
|
+
transform: translateY(-50%);
|
|
14
|
+
z-index: 1;
|
|
15
|
+
opacity: 1;
|
|
16
|
+
transition: all 0.3s linear;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.titaui-dynamic-advertise-pre-btn__icon {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
color: #ffffff;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.titaui-dynamic-advertise-pre-btn--hidden {
|
|
25
|
+
opacity: 0;
|
|
26
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
require("./index.css");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
var prefix = "titaui-dynamic-advertise-pre-btn";
|
|
19
|
+
|
|
20
|
+
var PreBtn = function PreBtn(_ref) {
|
|
21
|
+
var onClick = _ref.onClick,
|
|
22
|
+
isShow = _ref.isShow;
|
|
23
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
|
+
className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--hidden"), !isShow)),
|
|
25
|
+
onClick: onClick
|
|
26
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
27
|
+
className: (0, _classnames["default"])("tu-icon-left", "".concat(prefix, "__icon"))
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var _default = PreBtn;
|
|
32
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.tutaui-dynamic-advertise {
|
|
2
|
+
width: 278px;
|
|
3
|
+
border-radius: 12px;
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.tutaui-dynamic-advertise--not-empty {
|
|
8
|
+
box-shadow: 0px 2px 12px 0px rgba(127, 145, 180, 0.2);
|
|
9
|
+
margin-top: 10px;
|
|
10
|
+
height: 136px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tutaui-dynamic-advertise *:focus {
|
|
14
|
+
outline: none !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.tutaui-dynamic-advertise__img {
|
|
18
|
+
border-radius: 12px;
|
|
19
|
+
width: 278px;
|
|
20
|
+
height: 136px;
|
|
21
|
+
}
|