@titaui/pc 1.11.52-beta.3 → 1.11.52-beta.4

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.
Files changed (170) hide show
  1. package/lib/components/change-okr-modal/Item.js +19 -18
  2. package/lib/components/change-okr-modal/styledComponents.js +9 -9
  3. package/lib/components/create-okr-modal/createSuccessCmp.js +47 -19
  4. package/lib/components/create-okr-modal/fields/index.css +14 -3
  5. package/lib/components/create-okr-modal/fields/o-new-name.js +25 -19
  6. package/lib/components/create-okr-modal/index.js +75 -35
  7. package/lib/components/create-okr-modal/kr-items/index.css +12 -1
  8. package/lib/components/create-okr-modal/kr-items/krDatas.js +6 -5
  9. package/lib/components/create-okr-modal/kr-items/krItem.js +22 -12
  10. package/lib/components/date-picker/BodyItem.js +3 -3
  11. package/lib/components/date-picker/CalendarHeader.js +3 -3
  12. package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
  13. package/lib/components/dynamic/advertise/components/next-btn/index.css +27 -0
  14. package/lib/components/dynamic/advertise/components/next-btn/index.js +32 -0
  15. package/lib/components/dynamic/advertise/components/pre-btn/index.css +26 -0
  16. package/lib/components/dynamic/advertise/components/pre-btn/index.js +32 -0
  17. package/lib/components/dynamic/advertise/index.css +21 -0
  18. package/lib/components/dynamic/advertise/index.js +126 -0
  19. package/lib/components/dynamic/advertise/interface.js +5 -0
  20. package/lib/components/dynamic/advertise/util.js +28 -0
  21. package/lib/components/dynamic/components/dynamic-search-input/index.css +81 -0
  22. package/lib/components/dynamic/components/dynamic-search-input/index.js +203 -0
  23. package/lib/components/dynamic/components/first-level-tabs/index.css +101 -0
  24. package/lib/components/dynamic/components/first-level-tabs/index.js +131 -0
  25. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
  26. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  27. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  28. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  29. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
  30. package/lib/components/dynamic/dynamic-like-ranking/index.css +146 -0
  31. package/lib/components/dynamic/dynamic-like-ranking/index.js +180 -0
  32. package/lib/components/dynamic/dynamic-like-ranking/item.js +105 -0
  33. package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
  34. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
  35. package/lib/components/dynamic/dynamic-liking/index.css +81 -0
  36. package/lib/components/{contact-kefu → dynamic/dynamic-liking}/index.js +35 -58
  37. package/lib/components/dynamic/dynamic-liking/item.js +75 -0
  38. package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
  39. package/lib/components/dynamic/dynamic-list/index.js +7 -14
  40. package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +16 -0
  41. package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +30 -0
  42. package/lib/components/dynamic/dynamic-topping/index.css +141 -0
  43. package/lib/components/dynamic/dynamic-topping/index.js +82 -0
  44. package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
  45. package/lib/components/dynamic/dynamic-topping/item.js +153 -0
  46. package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
  47. package/lib/components/dynamic/dynamic.css +173 -0
  48. package/lib/components/dynamic/dynamic.js +428 -0
  49. package/lib/components/dynamic/export-module/index.js +37 -0
  50. package/lib/components/dynamic/img/dynamic-top.svg +14 -0
  51. package/lib/components/dynamic/index.js +12 -9
  52. package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
  53. package/lib/components/dynamic/my-team/img/line.png +0 -0
  54. package/lib/components/dynamic/my-team/img/team.png +0 -0
  55. package/lib/components/dynamic/my-team/index.css +184 -0
  56. package/lib/components/dynamic/my-team/index.js +263 -0
  57. package/lib/components/dynamic/my-team/request-api.js +52 -0
  58. package/lib/components/dynamic/my-team/util.js +20 -0
  59. package/lib/components/dynamic/new-ui.css +192 -0
  60. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +58 -0
  61. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +68 -0
  62. package/lib/components/dynamic/online-broadcast/data.js +95 -0
  63. package/lib/components/dynamic/online-broadcast/img/broadcast.svg +14 -0
  64. package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
  65. package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
  66. package/lib/components/dynamic/online-broadcast/index.css +46 -0
  67. package/lib/components/dynamic/online-broadcast/index.js +61 -0
  68. package/lib/components/dynamic/online-broadcast/interfact.js +5 -0
  69. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
  70. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +39 -0
  71. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
  72. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +39 -0
  73. package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
  74. package/lib/components/dynamic/quick-operation/components/create-share/index.js +39 -0
  75. package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
  76. package/lib/components/dynamic/quick-operation/components/create-task/index.js +44 -0
  77. package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
  78. package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
  79. package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
  80. package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
  81. package/lib/components/dynamic/quick-operation/index.css +51 -0
  82. package/lib/components/dynamic/quick-operation/index.js +120 -0
  83. package/lib/components/dynamic/request-api.js +68 -7
  84. package/lib/components/eReport/eReportLists/reportList.js +3 -3
  85. package/lib/components/emotions-selector/selector-pop.js +3 -3
  86. package/lib/components/ereport-list/index.js +3 -3
  87. package/lib/components/mblog/components/MblogAction.js +3 -3
  88. package/lib/components/nav-top/index.js +2 -2
  89. package/lib/components/okr-detail/components/base-okr-type/index.css +0 -4
  90. package/lib/components/okr-detail/components/base-okr-type/object-type.js +0 -1
  91. package/lib/components/okr-detail/components/header/edit-name.js +86 -40
  92. package/lib/components/okr-detail/components/header/index.css +118 -40
  93. package/lib/components/okr-detail/components/header/index.js +36 -46
  94. package/lib/components/okr-detail/components/header/o-classify.js +151 -0
  95. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +3 -1
  96. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +54 -4
  97. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +105 -57
  98. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
  99. package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +9 -9
  100. package/lib/components/okr-detail/detail-header/delete-confirm/index.css +5 -9
  101. package/lib/components/okr-detail/detail-header/index.js +6 -4
  102. package/lib/components/okr-detail/okr-list/create-kr-item/index.css +17 -0
  103. package/lib/components/okr-detail/okr-list/create-kr-item/index.js +63 -39
  104. package/lib/components/okr-detail/request-apis.js +73 -69
  105. package/lib/components/okr-flow/child-node/kr-node.js +3 -1
  106. package/lib/components/okr-flow/child-node/work-node.js +3 -1
  107. package/lib/components/okr-progress-detail/index.js +3 -1
  108. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +3 -3
  109. package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
  110. package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
  111. package/lib/components/okr-share/common-painter/openDataPainter.js +9 -6
  112. package/lib/components/okr-share/common-painter/utils.js +183 -36
  113. package/lib/components/okr-share/index.css +5 -4
  114. package/lib/components/okr-share/pink-card/card.js +3 -3
  115. package/lib/components/okr-share/pink-card/drawKrs.js +93 -18
  116. package/lib/components/okr-share/pink-card/index.js +20 -12
  117. package/lib/components/open-data-painter/index.js +6 -5
  118. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +10 -16
  119. package/lib/components/radio/index.css +3 -3
  120. package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
  121. package/lib/components/rich-editor/models/schema.js +6 -6
  122. package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
  123. package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
  124. package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
  125. package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
  126. package/lib/components/rich-editor/plugins/core/index.js +4 -4
  127. package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
  128. package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
  129. package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
  130. package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
  131. package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
  132. package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
  133. package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
  134. package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
  135. package/lib/components/rich-editor/react/uiProvider.js +3 -3
  136. package/lib/components/rich-editor/ui/Popup/index.js +3 -3
  137. package/lib/components/select/Option.js +3 -3
  138. package/lib/components/task-relation-modal/tree/okr-tree/index.css +1 -1
  139. package/lib/components/task-relation-modal/tree-node/category-node/index.css +11 -0
  140. package/lib/components/task-relation-modal/tree-node/category-node/index.js +3 -1
  141. package/lib/components/task-relation-modal/tree-node/kr-node/index.css +16 -0
  142. package/lib/components/task-relation-modal/tree-node/kr-node/index.js +10 -4
  143. package/lib/components/task-relation-modal/tree-node/milestone-node/index.css +16 -0
  144. package/lib/components/task-relation-modal/tree-node/milestone-node/index.js +4 -0
  145. package/lib/components/task-relation-modal/tree-node/o-node/index.js +8 -8
  146. package/lib/components/textarea/index.js +35 -38
  147. package/lib/components/tita-chart/errorBoundary/index.js +3 -3
  148. package/lib/components/wechat-btn/index.css +4 -1
  149. package/lib/components-v1/animate/AnimateChild.js +3 -3
  150. package/lib/components-v1/avatar/index.js +3 -3
  151. package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
  152. package/lib/components-v1/progress/CircleProgress.js +3 -3
  153. package/lib/components-v1/select/Option.js +3 -3
  154. package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
  155. package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
  156. package/lib/components-v1/userSelector/components/UserItem.js +3 -3
  157. package/lib/index.js +0 -8
  158. package/lib/{components/contact-kefu → pages/aha2021}/img/canceled.svg +0 -0
  159. package/lib/{components/contact-kefu → pages/aha2021}/img/kefu.svg +0 -0
  160. package/lib/{components/contact-kefu → pages/aha2021}/img/not-try.png +0 -0
  161. package/lib/{components/contact-kefu → pages/aha2021}/img/try.png +0 -0
  162. package/lib/pages/aha2021/index.css +26 -1
  163. package/lib/pages/aha2021/index.js +82 -3
  164. package/lib/pages/home/components/data-list/table/columns/krName.js +3 -1
  165. package/lib/pages/home/components/data-list/table/columns/okrName.js +4 -2
  166. package/lib/pages/new-okr-list/header/index.css +1 -1
  167. package/lib/utils/open-data.js +213 -65
  168. package/package.json +3 -2
  169. package/lib/components/contact-kefu/img/notice.png +0 -0
  170. package/lib/components/contact-kefu/index.css +0 -85
@@ -9,10 +9,12 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _titaUi = require("tita-ui");
13
-
14
12
  var _classnames = _interopRequireDefault(require("classnames"));
15
13
 
14
+ var _richEditor = require("@titaui/rich-editor");
15
+
16
+ var _titaUi = require("tita-ui");
17
+
16
18
  var _userSelector = _interopRequireDefault(require("../../../user-selector"));
17
19
 
18
20
  var _confidence = _interopRequireDefault(require("../../../confidence"));
@@ -51,7 +53,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
51
53
 
52
54
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
53
55
 
54
- var preCls = "okr-list-create-kr";
56
+ var preCls = 'okr-list-create-kr';
55
57
 
56
58
  function CreateKr(_ref) {
57
59
  var startDate = _ref.startDate,
@@ -62,17 +64,22 @@ function CreateKr(_ref) {
62
64
  onHide = _ref.onHide;
63
65
  var dataRef = (0, _react.useRef)();
64
66
 
65
- var _useState = (0, _react.useState)(""),
67
+ var _useState = (0, _react.useState)({
68
+ pureText: '',
69
+ pureTextExcludeAt: '',
70
+ mentionUsers: [],
71
+ richText: undefined
72
+ }),
66
73
  _useState2 = _slicedToArray(_useState, 2),
67
- krName = _useState2[0],
68
- setKrName = _useState2[1];
74
+ krNameData = _useState2[0],
75
+ setKrNameData = _useState2[1];
69
76
 
70
77
  var _useState3 = (0, _react.useState)(false),
71
78
  _useState4 = _slicedToArray(_useState3, 2),
72
79
  showTip = _useState4[0],
73
80
  setShowTip = _useState4[1];
74
81
 
75
- var tipsEnable = localStorage.getItem("list_create_kr_tips_".concat((0, _bsGlobal.getUserInfo)().Id)) != "false";
82
+ var tipsEnable = localStorage.getItem("list_create_kr_tips_".concat((0, _bsGlobal.getUserInfo)().Id)) != 'false';
76
83
 
77
84
  var _useState5 = (0, _react.useState)(5),
78
85
  _useState6 = _slicedToArray(_useState5, 2),
@@ -97,11 +104,13 @@ function CreateKr(_ref) {
97
104
  }),
98
105
  _useState8 = _slicedToArray(_useState7, 2),
99
106
  user = _useState8[0],
100
- setUser = _useState8[1];
107
+ setUser = _useState8[1]; // const inputRef =
108
+ // useRef<HTMLInputElement>() as React.RefObject<HTMLInputElement>
101
109
 
102
- var inputRef = (0, _react.useRef)();
110
+
111
+ var mentionInputRef = (0, _react.useRef)();
103
112
  dataRef.current = _objectSpread(_objectSpread({}, dataRef.current), {}, {
104
- krName: krName,
113
+ krNameData: krNameData,
105
114
  user: user,
106
115
  startDate: startDate,
107
116
  endDate: endDate,
@@ -112,16 +121,25 @@ function CreateKr(_ref) {
112
121
  });
113
122
  var create = (0, _react.useCallback)(function (e) {
114
123
  // 选中了选人组件中的item
115
- if ((0, _dom.hasAncestorElement)(e.target, "titaui-popup")) return;
124
+ if ((0, _dom.hasAncestorElement)(e.target, 'titaui-popup')) return;
116
125
 
117
126
  if (dataRef.current.getWrapperRef().current && dataRef.current.getWrapperRef().current.contains(e.target)) {
118
127
  return;
119
128
  }
120
129
 
121
- if (dataRef.current.krName.trim()) {
130
+ var _dataRef$current$krNa = dataRef.current.krNameData,
131
+ mentionUsers = _dataRef$current$krNa.mentionUsers,
132
+ pureText = _dataRef$current$krNa.pureText,
133
+ richText = _dataRef$current$krNa.richText;
134
+
135
+ if (pureText.trim()) {
122
136
  (0, _requestApis.createNewKr)({
123
137
  PrincipalId: dataRef.current.user.id,
124
- mileStoneName: dataRef.current.krName,
138
+ mileStoneName: pureText,
139
+ mileStoneNameRichText: richText,
140
+ aiteUsers: mentionUsers === null || mentionUsers === void 0 ? void 0 : mentionUsers.map(function (user) {
141
+ return user.mentionId;
142
+ }),
125
143
  startDate: dataRef.current.startDate,
126
144
  endDate: dataRef.current.endDate,
127
145
  workId: dataRef.current.workId,
@@ -137,26 +155,34 @@ function CreateKr(_ref) {
137
155
 
138
156
  var focus = function focus() {
139
157
  setTimeout(function () {
140
- inputRef.current && inputRef.current.focus();
158
+ var _mentionInputRef$curr, _mentionInputRef$curr2;
159
+
160
+ (_mentionInputRef$curr = mentionInputRef.current) === null || _mentionInputRef$curr === void 0 ? void 0 : (_mentionInputRef$curr2 = _mentionInputRef$curr.methods()) === null || _mentionInputRef$curr2 === void 0 ? void 0 : _mentionInputRef$curr2.focus();
141
161
  }, 0);
142
- };
162
+ }; // useEffect(() => {
163
+ // document.addEventListener('click', create, false)
164
+ // return () => document.removeEventListener('click', create)
165
+ // }, [])
166
+
143
167
 
144
- (0, _react.useEffect)(function () {
145
- document.addEventListener("click", create, false);
146
- return function () {
147
- return document.removeEventListener("click", create);
148
- };
149
- }, []);
150
168
  (0, _react.useEffect)(function () {
151
169
  focus();
152
170
  }, []);
153
171
 
154
172
  var onInputKeyDown = function onInputKeyDown(e) {
155
- if (e.key.toLocaleLowerCase() == "enter") {
156
- if (krName.trim()) {
173
+ if (e.key.toLocaleLowerCase() == 'enter') {
174
+ var mentionUsers = krNameData.mentionUsers,
175
+ pureText = krNameData.pureText,
176
+ richText = krNameData.richText;
177
+
178
+ if (pureText.trim()) {
157
179
  (0, _requestApis.createNewKr)({
158
180
  PrincipalId: user.id,
159
- mileStoneName: krName,
181
+ mileStoneName: pureText,
182
+ mileStoneNameRichText: richText,
183
+ aiteUsers: mentionUsers === null || mentionUsers === void 0 ? void 0 : mentionUsers.map(function (user) {
184
+ return user.mentionId;
185
+ }),
160
186
  startDate: startDate,
161
187
  endDate: endDate,
162
188
  workId: workId,
@@ -193,7 +219,7 @@ function CreateKr(_ref) {
193
219
 
194
220
  var onNoMoreShow = function onNoMoreShow() {
195
221
  setShowTip(false);
196
- localStorage.setItem("list_create_kr_tips_".concat((0, _bsGlobal.getUserInfo)().Id), "false");
222
+ localStorage.setItem("list_create_kr_tips_".concat((0, _bsGlobal.getUserInfo)().Id), 'false');
197
223
  };
198
224
 
199
225
  var onUserSubmit = function onUserSubmit(_ref2) {
@@ -216,33 +242,31 @@ function CreateKr(_ref) {
216
242
  className: preCls
217
243
  }, /*#__PURE__*/_react["default"].createElement("div", {
218
244
  className: (0, _classnames["default"])("".concat(preCls, "__input"))
219
- }, /*#__PURE__*/_react["default"].createElement(_titaUi.Input, {
220
- placeholder: (0, _getLocale.getLocale)("OKR_MyO_Text_Createkeyr"),
221
- inputRef: inputRef,
222
- value: krName,
223
- onChange: function onChange(e) {
224
- return setKrName(e.target.value);
225
- },
245
+ }, /*#__PURE__*/_react["default"].createElement(_richEditor.TitaInlineRichEditor, {
246
+ initialState: undefined,
247
+ onChange: setKrNameData // onBlur={onBlur}
248
+ ,
226
249
  onFocus: onFocus,
227
- onBlur: onBlur,
228
- onKeyDown: onInputKeyDown
250
+ onKeyDown: onInputKeyDown,
251
+ placeholder: (0, _getLocale.getLocale)('OKR_MyO_Text_Createkeyr'),
252
+ ref: mentionInputRef
229
253
  }), /*#__PURE__*/_react["default"].createElement("p", {
230
254
  style: {
231
- display: showTip ? "block" : "none",
255
+ display: showTip ? 'block' : 'none',
232
256
  zIndex: 1
233
257
  },
234
258
  onClick: stopPropagation
235
- }, (0, _getLocale.getLocale)("OKR_MyO_Text_Recommendation"), /*#__PURE__*/_react["default"].createElement("br", null), /*#__PURE__*/_react["default"].createElement("p", null, (0, _getLocale.getLocale)("OKR_MyO_Text_ExampleC")), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("a", {
259
+ }, (0, _getLocale.getLocale)('OKR_MyO_Text_Recommendation'), /*#__PURE__*/_react["default"].createElement("br", null), /*#__PURE__*/_react["default"].createElement("p", null, (0, _getLocale.getLocale)('OKR_MyO_Text_ExampleC')), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("a", {
236
260
  onClick: onNextTalk
237
- }, (0, _getLocale.getLocale)("OKR_MyO_Butt_Nexttime")), /*#__PURE__*/_react["default"].createElement("a", {
261
+ }, (0, _getLocale.getLocale)('OKR_MyO_Butt_Nexttime')), /*#__PURE__*/_react["default"].createElement("a", {
238
262
  onClick: onNoMoreShow
239
- }, (0, _getLocale.getLocale)("OKR_MyO_Butt_Nomor")))), /*#__PURE__*/_react["default"].createElement("span", {
263
+ }, (0, _getLocale.getLocale)('OKR_MyO_Butt_Nomor')))), /*#__PURE__*/_react["default"].createElement("span", {
240
264
  className: (0, _classnames["default"])("".concat(preCls, "__heart"))
241
265
  }, /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
242
266
  content: "\u4FEE\u65391"
243
267
  }, /*#__PURE__*/_react["default"].createElement("span", {
244
268
  style: {
245
- display: "inline-flex"
269
+ display: 'inline-flex'
246
270
  }
247
271
  }, /*#__PURE__*/_react["default"].createElement(_confidence["default"], {
248
272
  editable: true,