@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
|
@@ -198,14 +198,15 @@ var Item = /*#__PURE__*/function (_PureComponent) {
|
|
|
198
198
|
isShowKr: isShowKr
|
|
199
199
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
200
200
|
placement: "top",
|
|
201
|
-
overlay: htmlToText(item.mileStoneName)
|
|
201
|
+
overlay: (0, _openData.parseString)(htmlToText(item.mileStoneName))
|
|
202
202
|
}, /*#__PURE__*/_react["default"].createElement(_styledComponents.OkrName, {
|
|
203
|
+
className: "okr-relate-modal__milestonename",
|
|
203
204
|
isKr: true,
|
|
204
|
-
isShowKr: isShowKr
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}))));
|
|
205
|
+
isShowKr: isShowKr // dangerouslySetInnerHTML={{
|
|
206
|
+
// __html: `KR${index + 1}:${parseString(item.mileStoneName)}`,
|
|
207
|
+
// }}
|
|
208
|
+
|
|
209
|
+
}, "KR".concat(index + 1, "\uFF1A"), (0, _openData.parseString)(item.mileStoneName)))));
|
|
209
210
|
}
|
|
210
211
|
|
|
211
212
|
if (active && item.mileStoneId === (active.workId || active.mileStoneId)) {
|
|
@@ -220,14 +221,15 @@ var Item = /*#__PURE__*/function (_PureComponent) {
|
|
|
220
221
|
isShowKr: isShowKr
|
|
221
222
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
222
223
|
placement: "top",
|
|
223
|
-
overlay: htmlToText(item.mileStoneName)
|
|
224
|
+
overlay: (0, _openData.parseString)(htmlToText(item.mileStoneName))
|
|
224
225
|
}, /*#__PURE__*/_react["default"].createElement(_styledComponents.OkrName, {
|
|
226
|
+
className: "okr-relate-modal__milestonename",
|
|
225
227
|
isKr: true,
|
|
226
|
-
isShowKr: isShowKr
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}))));
|
|
228
|
+
isShowKr: isShowKr // dangerouslySetInnerHTML={{
|
|
229
|
+
// __html: KR${index + 1}:${parseString(item.mileStoneName)}`,
|
|
230
|
+
// }}
|
|
231
|
+
|
|
232
|
+
}, "KR".concat(index + 1, "\uFF1A"), (0, _openData.parseString)(item.mileStoneName)))));
|
|
231
233
|
}
|
|
232
234
|
|
|
233
235
|
return '';
|
|
@@ -282,14 +284,13 @@ var Item = /*#__PURE__*/function (_PureComponent) {
|
|
|
282
284
|
isShowKr: isShowKr
|
|
283
285
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
284
286
|
placement: "top",
|
|
285
|
-
overlay: htmlToText(okrData.workName)
|
|
287
|
+
overlay: (0, _openData.parseString)(htmlToText(okrData.workName))
|
|
286
288
|
}, /*#__PURE__*/_react["default"].createElement(_styledComponents.OkrName, {
|
|
289
|
+
className: "okr-relate-modal__workname",
|
|
287
290
|
isKr: false,
|
|
288
|
-
isShowKr: isShowKr
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
-
}))), this.isObjectiveRelevanceKr && isShowKr && data.Krs.length > 0 && /*#__PURE__*/_react["default"].createElement("span", {
|
|
291
|
+
isShowKr: isShowKr // dangerouslySetInnerHTML={{ __html: parseString(okrData.workName) }}
|
|
292
|
+
|
|
293
|
+
}, (0, _openData.parseString)(okrData.workName)))), this.isObjectiveRelevanceKr && isShowKr && data.Krs.length > 0 && /*#__PURE__*/_react["default"].createElement("span", {
|
|
293
294
|
className: "".concat(isExpand ? 'tu-icon-arrow-up' : 'tu-icon-arrow-down')
|
|
294
295
|
})), /*#__PURE__*/_react["default"].createElement(_styledComponents.ItemBottom, null, !isShowKr && [/*#__PURE__*/_react["default"].createElement("span", null, (0, _constant.getTypeMap)()[data.okrType]), /*#__PURE__*/_react["default"].createElement(_styledComponents.Separator, null)], /*#__PURE__*/_react["default"].createElement(_styledComponents.PricipleName, null, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
295
296
|
name: data.principalUser.name,
|
|
@@ -14,7 +14,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
14
14
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
15
|
|
|
16
16
|
var Wrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 589px;\n height: 488px;\n margin-top: ", ";\n background: #ffffff;\n box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n"])), function (p) {
|
|
17
|
-
return p.okrPopType === 1 ? 0 :
|
|
17
|
+
return p.okrPopType === 1 ? 0 : '32px';
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
exports.Wrapper = Wrapper;
|
|
@@ -59,7 +59,7 @@ var OptionItem = _styledComponents["default"].span(_templateObject11 || (_templa
|
|
|
59
59
|
|
|
60
60
|
exports.OptionItem = OptionItem;
|
|
61
61
|
|
|
62
|
-
var List = _styledComponents["default"].ul(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n /* overflow: auto; */\n flex: 1;\n max-height:
|
|
62
|
+
var List = _styledComponents["default"].ul(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n /* overflow: auto; */\n flex: 1;\n max-height: 358px;\n overflow-y: scroll;\n &:empty::after {\n content: '\\6682\\65e0\\6570\\636e';\n display: block;\n color: #c5c5c5;\n border: dashed 1px #c5c5c5;\n padding: 30px 25px;\n border-radius: 3px;\n text-align: center;\n font-size: 22px;\n line-height: 30px;\n margin-top: 100px;\n }\n"], ["\n /* overflow: auto; */\n flex: 1;\n max-height: 358px;\n overflow-y: scroll;\n &:empty::after {\n content: '\\\\6682\\\\65e0\\\\6570\\\\636e';\n display: block;\n color: #c5c5c5;\n border: dashed 1px #c5c5c5;\n padding: 30px 25px;\n border-radius: 3px;\n text-align: center;\n font-size: 22px;\n line-height: 30px;\n margin-top: 100px;\n }\n"])));
|
|
63
63
|
|
|
64
64
|
exports.List = List;
|
|
65
65
|
|
|
@@ -80,15 +80,15 @@ var ItemTop = _styledComponents["default"].div(_templateObject16 || (_templateOb
|
|
|
80
80
|
exports.ItemTop = ItemTop;
|
|
81
81
|
|
|
82
82
|
var WorkNameWrapper = _styledComponents["default"].div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n flex: 1px;\n white-space: nowrap;\n overflow: hidden;\n cursor: ", ";\n"])), function (p) {
|
|
83
|
-
return p.isKr ?
|
|
83
|
+
return p.isKr ? 'default' : 'pointer';
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
exports.WorkNameWrapper = WorkNameWrapper;
|
|
87
87
|
|
|
88
88
|
var Radio = _styledComponents["default"].a(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 15px;\n width: 15px;\n border: 1px solid ", ";\n border-radius: 50%;\n &::after {\n content: '';\n display: ", ";\n width: 9px;\n height: 9px;\n border-radius: 50%;\n background-color: #2879ff;\n }\n"])), function (p) {
|
|
89
|
-
return p.active ?
|
|
89
|
+
return p.active ? '#2879ff' : '#BFC3C7';
|
|
90
90
|
}, function (p) {
|
|
91
|
-
return p.active ?
|
|
91
|
+
return p.active ? 'block' : 'none';
|
|
92
92
|
});
|
|
93
93
|
|
|
94
94
|
exports.Radio = Radio;
|
|
@@ -102,7 +102,7 @@ var Tag = _styledComponents["default"].div(_templateObject19 || (_templateObject
|
|
|
102
102
|
exports.Tag = Tag;
|
|
103
103
|
|
|
104
104
|
var OkrName = _styledComponents["default"].span(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n display: inline-block\n flex: 1;\n max-width: 400px;\n font-size: 13px;\n font-weight: ", ";\n color: #33383d;\n white-space: nowrap;\n overflow: hidden;\n word-break: keep-all;\n text-overflow: ellipsis;\n line-height: 1;\n"])), function (p) {
|
|
105
|
-
return p.isShowKr ?
|
|
105
|
+
return p.isShowKr ? 'normal' : '600';
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
exports.OkrName = OkrName;
|
|
@@ -128,11 +128,11 @@ var ButtonGroup = _styledComponents["default"].div(_templateObject25 || (_templa
|
|
|
128
128
|
exports.ButtonGroup = ButtonGroup;
|
|
129
129
|
|
|
130
130
|
var Button = _styledComponents["default"].a(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n display: block;\n min-width: 28px;\n height: 27px;\n padding: 0 15px;\n box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.21);\n border-radius: 2px;\n background-color: ", ";\n color: ", ";\n cursor: pointer;\n text-align: center;\n white-space: nowrap;\n line-height: 27px;\n &:hover {\n color: ", ";\n }\n"])), function (p) {
|
|
131
|
-
return p.type !==
|
|
131
|
+
return p.type !== 'confirm' ? '#FAFBFC' : p.disabled ? '#E7EEF3' : '#2879FF';
|
|
132
132
|
}, function (p) {
|
|
133
|
-
return p.type !==
|
|
133
|
+
return p.type !== 'confirm' ? '#565E66' : '#FFF';
|
|
134
134
|
}, function (p) {
|
|
135
|
-
return p.type !==
|
|
135
|
+
return p.type !== 'confirm' ? '#565E66' : '#FFF';
|
|
136
136
|
});
|
|
137
137
|
|
|
138
138
|
exports.Button = Button;
|
|
@@ -35,6 +35,8 @@ var _createSuccessShadow = _interopRequireDefault(require("./img/create-success-
|
|
|
35
35
|
|
|
36
36
|
var _getLocale = require("../../utils/getLocale");
|
|
37
37
|
|
|
38
|
+
var _openData = require("../../utils/open-data");
|
|
39
|
+
|
|
38
40
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
39
41
|
|
|
40
42
|
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); }
|
|
@@ -66,6 +68,16 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
66
68
|
dontShowValue = _useState2[0],
|
|
67
69
|
setDontShowValue = _useState2[1];
|
|
68
70
|
|
|
71
|
+
var _useState3 = (0, _react.useState)(null),
|
|
72
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
+
okrName = _useState4[0],
|
|
74
|
+
setOkrName = _useState4[1];
|
|
75
|
+
|
|
76
|
+
var _useState5 = (0, _react.useState)([]),
|
|
77
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
78
|
+
krNames = _useState6[0],
|
|
79
|
+
setKrNames = _useState6[1];
|
|
80
|
+
|
|
69
81
|
var handleCloseModel = (0, _react.useCallback)(function () {
|
|
70
82
|
onCloseModel && onCloseModel(dontShowValue);
|
|
71
83
|
}, [dontShowValue, onCloseModel]);
|
|
@@ -87,7 +99,7 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
87
99
|
|
|
88
100
|
var height = shareContent.clientHeight; // 获取dom 高度
|
|
89
101
|
|
|
90
|
-
var canvas = document.createElement(
|
|
102
|
+
var canvas = document.createElement('canvas'); // 创建一个canvas节点
|
|
91
103
|
|
|
92
104
|
var scale = 2; // 定义任意放大倍数 支持小数
|
|
93
105
|
|
|
@@ -116,17 +128,17 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
116
128
|
|
|
117
129
|
};
|
|
118
130
|
(0, _html2canvas["default"])(downLoadRef.current, opts).then(function (canvas) {
|
|
119
|
-
var imgUrl = canvas.toDataURL(
|
|
131
|
+
var imgUrl = canvas.toDataURL('image/png'); // 得到图片的base64编码数据
|
|
120
132
|
|
|
121
133
|
var image = new Image();
|
|
122
|
-
image.setAttribute(
|
|
134
|
+
image.setAttribute('crossOrigin', 'anonymous');
|
|
123
135
|
|
|
124
136
|
image.onload = function () {
|
|
125
|
-
var a = document.createElement(
|
|
137
|
+
var a = document.createElement('a'); // 生成一个a元素
|
|
126
138
|
|
|
127
|
-
var event = new MouseEvent(
|
|
139
|
+
var event = new MouseEvent('click'); // 创建一个单击事件
|
|
128
140
|
|
|
129
|
-
a.download = (0, _getLocale.getLocale)(
|
|
141
|
+
a.download = (0, _getLocale.getLocale)('OKR_MyO_Share'); // 设置图片名称
|
|
130
142
|
|
|
131
143
|
a.href = imgUrl; // 将生成的URL设置为a.href属性
|
|
132
144
|
|
|
@@ -135,6 +147,22 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
135
147
|
|
|
136
148
|
image.src = imgUrl;
|
|
137
149
|
});
|
|
150
|
+
}, []);
|
|
151
|
+
(0, _react.useEffect)(function () {
|
|
152
|
+
(0, _openData.parseOpenDataStringToImg)(createdSuccessInfo.workName, {
|
|
153
|
+
fontSize: 14,
|
|
154
|
+
fontWeight: '600',
|
|
155
|
+
color: '141c28',
|
|
156
|
+
lineHeight: 22
|
|
157
|
+
}).then(setOkrName);
|
|
158
|
+
Promise.all(createdSuccessInfo.Krs.map(function (kr) {
|
|
159
|
+
return (0, _openData.parseOpenDataStringToImg)(kr.mileStoneName, {
|
|
160
|
+
fontSize: 12,
|
|
161
|
+
fontWeight: 'normal',
|
|
162
|
+
color: '3f4755',
|
|
163
|
+
lineHeight: 18
|
|
164
|
+
});
|
|
165
|
+
})).then(setKrNames);
|
|
138
166
|
}, []); // console.log(createdSuccessInfo)
|
|
139
167
|
|
|
140
168
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -149,10 +177,10 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
149
177
|
className: "create-success-model__top-block"
|
|
150
178
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
151
179
|
src: _light["default"],
|
|
152
|
-
className: "create-success-model__light ".concat(isDownload ?
|
|
180
|
+
className: "create-success-model__light ".concat(isDownload ? 'create-success-model--animation-unset' : '')
|
|
153
181
|
}), isDownload ? null : /*#__PURE__*/_react["default"].createElement("img", {
|
|
154
182
|
src: _shower["default"],
|
|
155
|
-
className: "create-success-model__shower ".concat(isDownload ?
|
|
183
|
+
className: "create-success-model__shower ".concat(isDownload ? 'create-success-model--animation-unset' : '')
|
|
156
184
|
}), /*#__PURE__*/_react["default"].createElement("img", {
|
|
157
185
|
src: _createSuccessHead["default"],
|
|
158
186
|
className: "create-success-model__create-head"
|
|
@@ -163,7 +191,7 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
163
191
|
className: "create-success-model__avatar"
|
|
164
192
|
}, createdSuccessInfo.principalUser.avatar.hasAvatar ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
165
193
|
className: "create-success-model__img",
|
|
166
|
-
src: "".concat(createdSuccessInfo.userAvatarBase64Url ? "data:image/png;base64,".concat(createdSuccessInfo.userAvatarBase64Url) :
|
|
194
|
+
src: "".concat(createdSuccessInfo.userAvatarBase64Url ? "data:image/png;base64,".concat(createdSuccessInfo.userAvatarBase64Url) : '')
|
|
167
195
|
}) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
168
196
|
className: "create-success-model__text-avatar",
|
|
169
197
|
style: {
|
|
@@ -182,10 +210,10 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
182
210
|
src: _createSuccessRightQuotation["default"]
|
|
183
211
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
184
212
|
className: "create-success-model__congratulation"
|
|
185
|
-
}, (0, _getLocale.getLocale)(
|
|
213
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_OKRscreated'), "\xA0\xA0", /*#__PURE__*/_react["default"].createElement("span", {
|
|
186
214
|
className: "create-success-model__percent"
|
|
187
|
-
}, createdSuccessInfo.countSurpassPercentage, "%"), "\xA0\xA0", (0, _getLocale.getLocale)(
|
|
188
|
-
className: "create-success-model__okr-info ".concat(isDownload ?
|
|
215
|
+
}, createdSuccessInfo.countSurpassPercentage, "%"), "\xA0\xA0", (0, _getLocale.getLocale)('OKR_MyO_Pop_ofpeople')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
216
|
+
className: "create-success-model__okr-info ".concat(isDownload ? '' : 'create-success-model--fix-height')
|
|
189
217
|
}, isDownload ? null : /*#__PURE__*/_react["default"].createElement("img", {
|
|
190
218
|
className: "create-success-model__shadow-img",
|
|
191
219
|
src: _createSuccessShadow["default"]
|
|
@@ -196,7 +224,7 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
196
224
|
className: "create-success-model__o-name-icon"
|
|
197
225
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
198
226
|
className: "create-success-model__o-name-text"
|
|
199
|
-
},
|
|
227
|
+
}, okrName)), krNames.map(function (kr, index) {
|
|
200
228
|
return (
|
|
201
229
|
/*#__PURE__*/
|
|
202
230
|
// if(!isDownload && index > 2) {
|
|
@@ -207,11 +235,11 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
207
235
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
208
236
|
className: "create-success-model__dot"
|
|
209
237
|
}), /*#__PURE__*/_react["default"].createElement("li", {
|
|
210
|
-
className: "create-success-model__kr ".concat(isDownload ?
|
|
211
|
-
}, kr
|
|
238
|
+
className: "create-success-model__kr ".concat(isDownload ? 'create-success-model__kr--no-wrap' : '')
|
|
239
|
+
}, kr))
|
|
212
240
|
);
|
|
213
241
|
})), isDownload ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
214
|
-
className: "create-success-model__qrcode ".concat(isDownload ?
|
|
242
|
+
className: "create-success-model__qrcode ".concat(isDownload ? 'create-success-model--hidden-box-shadow' : '')
|
|
215
243
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
216
244
|
src: _qrCode["default"],
|
|
217
245
|
width: "275"
|
|
@@ -222,10 +250,10 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
222
250
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
223
251
|
className: "create-success-model__common-btn-style create-success-model__return-list",
|
|
224
252
|
onClick: handleShowDetail
|
|
225
|
-
}, (0, _getLocale.getLocale)(
|
|
253
|
+
}, (0, _getLocale.getLocale)('Mod_Checkdetails')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
226
254
|
className: "create-success-model__common-btn-style create-success-model__download-img",
|
|
227
255
|
onClick: handleDownloadPic
|
|
228
|
-
}, (0, _getLocale.getLocale)(
|
|
256
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Popup_Download'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
229
257
|
className: "create-success-model__checkbox-wrapper"
|
|
230
258
|
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
231
259
|
id: "dontShowCreateSucess",
|
|
@@ -236,7 +264,7 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
236
264
|
}), /*#__PURE__*/_react["default"].createElement("label", {
|
|
237
265
|
htmlFor: "dontShowCreateSucess",
|
|
238
266
|
className: "create-success-model__label"
|
|
239
|
-
}, (0, _getLocale.getLocale)(
|
|
267
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_Nomore'))))));
|
|
240
268
|
};
|
|
241
269
|
|
|
242
270
|
var _default = CreateSuccessCmp;
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
.okr-o-new-name .okr-o-new-name__left-block {
|
|
98
98
|
flex: 1;
|
|
99
99
|
display: flex;
|
|
100
|
+
align-items: center;
|
|
100
101
|
position: relative;
|
|
101
102
|
}
|
|
102
103
|
|
|
@@ -133,6 +134,16 @@
|
|
|
133
134
|
right: 8px;
|
|
134
135
|
}
|
|
135
136
|
|
|
137
|
+
.okr-o-new-name .okr-o-new-name__left-block .tita-rich-editor__inline-editor {
|
|
138
|
+
flex: 1;
|
|
139
|
+
width: 0;
|
|
140
|
+
margin-right: 8px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.okr-o-new-name .okr-o-new-name__left-block .tita-rich-editor .ProseMirror > p {
|
|
144
|
+
font-weight: 600;
|
|
145
|
+
}
|
|
146
|
+
|
|
136
147
|
.user-info {
|
|
137
148
|
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
138
149
|
display: flex;
|
|
@@ -177,7 +188,7 @@
|
|
|
177
188
|
}
|
|
178
189
|
|
|
179
190
|
.error-popup-text-wrapper::after {
|
|
180
|
-
content:
|
|
191
|
+
content: '';
|
|
181
192
|
display: block;
|
|
182
193
|
border: 6px solid transparent;
|
|
183
194
|
position: absolute;
|
|
@@ -223,7 +234,7 @@
|
|
|
223
234
|
}
|
|
224
235
|
|
|
225
236
|
.okr-create-suggest .okr-create-suggest__triangle::after {
|
|
226
|
-
content:
|
|
237
|
+
content: '';
|
|
227
238
|
display: block;
|
|
228
239
|
border: 8px solid #fffffd;
|
|
229
240
|
border-top: 8px solid transparent;
|
|
@@ -235,7 +246,7 @@
|
|
|
235
246
|
}
|
|
236
247
|
|
|
237
248
|
.okr-create-suggest .okr-create-suggest__triangle::before {
|
|
238
|
-
content:
|
|
249
|
+
content: '';
|
|
239
250
|
display: block;
|
|
240
251
|
border: 8px solid #f6bd16;
|
|
241
252
|
border-top: 8px solid transparent;
|
|
@@ -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 _toast = _interopRequireDefault(require("../../toast"));
|
|
13
15
|
|
|
14
16
|
var _constant = require("../constant");
|
|
@@ -53,8 +55,8 @@ var initOCheckResult = function initOCheckResult() {
|
|
|
53
55
|
};
|
|
54
56
|
|
|
55
57
|
function ONewName(_ref) {
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
+
var okrNameData = _ref.okrNameData,
|
|
59
|
+
setOkrNameData = _ref.setOkrNameData,
|
|
58
60
|
container = _ref.container,
|
|
59
61
|
user = _ref.user,
|
|
60
62
|
setUser = _ref.setUser,
|
|
@@ -63,9 +65,10 @@ function ONewName(_ref) {
|
|
|
63
65
|
_ref$setIsInputConten = _ref.setIsInputContent,
|
|
64
66
|
setIsInputContent = _ref$setIsInputConten === void 0 ? function () {} : _ref$setIsInputConten;
|
|
65
67
|
var oCheckId = 0;
|
|
68
|
+
var mentionInputRef = (0, _react.useRef)();
|
|
66
69
|
var timerRef = (0, _react.useRef)();
|
|
67
|
-
var okrNameIsEmpty = (0, _react.useRef)(!
|
|
68
|
-
var oldONameRef = (0, _react.useRef)(
|
|
70
|
+
var okrNameIsEmpty = (0, _react.useRef)(!okrNameData.pureText);
|
|
71
|
+
var oldONameRef = (0, _react.useRef)('');
|
|
69
72
|
var formatUser = (0, _react.useMemo)(function () {
|
|
70
73
|
var medium = user.avatar && (user.avatar.Medium || user.avatar.medium);
|
|
71
74
|
var color = user.avatar && (user.avatar.Color || user.avatar.color);
|
|
@@ -99,7 +102,7 @@ function ONewName(_ref) {
|
|
|
99
102
|
var tempCheckId = oCheckId; // @ts-ignore
|
|
100
103
|
|
|
101
104
|
return (0, _requestApi.getOAnalysisInfos)({
|
|
102
|
-
text:
|
|
105
|
+
text: okrNameData.pureTextExcludeAt
|
|
103
106
|
}) // @ts-ignore
|
|
104
107
|
.then(function (data) {
|
|
105
108
|
if (tempCheckId !== oCheckId) {
|
|
@@ -132,12 +135,18 @@ function ONewName(_ref) {
|
|
|
132
135
|
})["finally"](function () {
|
|
133
136
|
setIsInputContent(false);
|
|
134
137
|
});
|
|
135
|
-
}, [
|
|
138
|
+
}, [okrNameData, setIsInputContent]);
|
|
139
|
+
|
|
140
|
+
var onChangeHandler = function onChangeHandler(data) {
|
|
141
|
+
setOkrNameData(data);
|
|
142
|
+
setIsInputContent(true);
|
|
143
|
+
};
|
|
144
|
+
|
|
136
145
|
(0, _react.useEffect)(function () {
|
|
137
146
|
// 防抖
|
|
138
|
-
okrNameIsEmpty.current = !
|
|
147
|
+
okrNameIsEmpty.current = !okrNameData.pureText;
|
|
139
148
|
|
|
140
|
-
if (!
|
|
149
|
+
if (!okrNameData.pureText) {
|
|
141
150
|
setONameCheckResult(initOCheckResult());
|
|
142
151
|
setIsInputContent(false);
|
|
143
152
|
} else if (timerRef.current) {
|
|
@@ -150,7 +159,7 @@ function ONewName(_ref) {
|
|
|
150
159
|
return function () {
|
|
151
160
|
clearTimeout(timerRef.current);
|
|
152
161
|
};
|
|
153
|
-
}, [
|
|
162
|
+
}, [okrNameData]);
|
|
154
163
|
var handleInputFocus = (0, _react.useCallback)(function () {
|
|
155
164
|
if (onOInputFocusStateChange) {
|
|
156
165
|
onOInputFocusStateChange(true);
|
|
@@ -180,21 +189,18 @@ function ONewName(_ref) {
|
|
|
180
189
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
181
190
|
className: "left-block__title"
|
|
182
191
|
}, "O"), /*#__PURE__*/_react["default"].createElement(_inputWithErrPopup["default"], {
|
|
183
|
-
strLength:
|
|
192
|
+
strLength: okrNameData.pureText.length,
|
|
184
193
|
maxLength: 500,
|
|
185
194
|
position: "top"
|
|
186
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
195
|
+
}, /*#__PURE__*/_react["default"].createElement(_richEditor.TitaInlineRichEditor, {
|
|
196
|
+
initialState: okrNameData.richText,
|
|
197
|
+
onChange: onChangeHandler,
|
|
187
198
|
onFocus: handleInputFocus,
|
|
188
199
|
onBlur: handleInputBlur,
|
|
189
|
-
className: "left-block__input",
|
|
190
|
-
placeholder: (0, _getLocale.getLocale)("OKR_MyO_Pop_PleInspObjective"),
|
|
191
|
-
type: "text",
|
|
192
|
-
value: okrName,
|
|
193
|
-
onChange: function onChange(e) {
|
|
194
|
-
return setOkrName(e.target.value);
|
|
195
|
-
},
|
|
196
200
|
onKeyDown: handleOnKeyDown,
|
|
197
|
-
onKeyUp: handleOnKeyUp
|
|
201
|
+
onKeyUp: handleOnKeyUp,
|
|
202
|
+
placeholder: (0, _getLocale.getLocale)('OKR_MyO_Pop_PleInspObjective'),
|
|
203
|
+
ref: mentionInputRef
|
|
198
204
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
199
205
|
className: "left-block__right-text-mask"
|
|
200
206
|
})), /*#__PURE__*/_react["default"].createElement(_okrNewUserSelector["default"], {
|