@titaui/pc 1.13.3 → 1.13.6

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 (59) hide show
  1. package/lib/components/checkbox-list/index.css +31 -0
  2. package/lib/components/checkbox-list/index.js +68 -0
  3. package/lib/components/create-okr-modal/index.js +4 -1
  4. package/lib/components/dialog-qq-docs/index.css +106 -0
  5. package/lib/components/dialog-qq-docs/index.js +507 -0
  6. package/lib/components/dialog-qq-docs/request-apis.js +16 -0
  7. package/lib/components/dialog-qq-docs/utils.js +83 -0
  8. package/lib/components/dialog-select/index.css +9 -0
  9. package/lib/components/dialog-select/index.js +48 -0
  10. package/lib/components/dialog-upload/img/folder.svg +40 -0
  11. package/lib/components/dialog-upload/img/form.svg +38 -0
  12. package/lib/components/dialog-upload/img/mind.svg +39 -0
  13. package/lib/components/dialog-upload/util.js +20 -2
  14. package/lib/components/dialog-upload-type/assets/folder.svg +20 -0
  15. package/lib/components/dialog-upload-type/assets/qq-docs.svg +20 -0
  16. package/lib/components/dialog-upload-type/components/upload-type-item/index.css +14 -0
  17. package/lib/components/dialog-upload-type/components/upload-type-item/index.js +36 -0
  18. package/lib/components/dialog-upload-type/index.css +7 -0
  19. package/lib/components/dialog-upload-type/index.js +68 -0
  20. package/lib/components/file-list/components/single-file/index.css +29 -0
  21. package/lib/components/file-list/components/single-file/index.js +19 -28
  22. package/lib/components/file-list/img/folder.svg +40 -0
  23. package/lib/components/file-list/img/form.svg +38 -0
  24. package/lib/components/file-list/img/mind.svg +39 -0
  25. package/lib/components/file-list/index.js +2 -1
  26. package/lib/components/file-list/util.js +20 -2
  27. package/lib/components/file-preview/index.css +44 -0
  28. package/lib/components/file-preview/index.js +68 -0
  29. package/lib/components/loading/assets/loading.gif +0 -0
  30. package/lib/components/loading/index.css +28 -0
  31. package/lib/components/loading/index.js +64 -0
  32. package/lib/components/nav/index.css +37 -0
  33. package/lib/components/nav/index.js +31 -0
  34. package/lib/components/nav-top/index.css +6 -0
  35. package/lib/components/nav-top/index.js +138 -2
  36. package/lib/components/nav-top/request.apis.js +10 -2
  37. package/lib/components/okr-guide/constant.js +23 -0
  38. package/lib/components/okr-guide/img/left-img.jpg +0 -0
  39. package/lib/components/okr-guide/index.css +148 -0
  40. package/lib/components/okr-guide/index.js +242 -0
  41. package/lib/components/okr-guide/request-api.js +57 -0
  42. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +1 -1
  43. package/lib/components/rich-editor/plugins/inline/color/commond.js +3 -3
  44. package/lib/components/scroll-container/index.js +27 -6
  45. package/lib/components/search-input/index.css +2 -2
  46. package/lib/components/search-input/index.js +4 -0
  47. package/lib/components/upload/img/folder.svg +40 -0
  48. package/lib/components/upload/img/form.svg +38 -0
  49. package/lib/components/upload/img/mind.svg +39 -0
  50. package/lib/components/upload/index.js +195 -25
  51. package/lib/components/upload/index2.js +381 -0
  52. package/lib/components/upload/util.js +20 -2
  53. package/lib/components/user-selector/request-apis.js +3 -3
  54. package/lib/components/version-change-modal/index.js +1 -3
  55. package/lib/index.js +8 -0
  56. package/lib/utils/open-data.js +77 -68
  57. package/lib/utils/tools.js +11 -1
  58. package/package.json +1 -1
  59. package/lib/utils/mock-bsglobal.js +0 -1837
@@ -0,0 +1,148 @@
1
+ .titaui-ork-guide__wrap .rc-dialog {
2
+ width: 100%;
3
+ height: 100%;
4
+ }
5
+
6
+ .titaui-ork-guide__wrap .rc-dialog-content {
7
+ border-radius: 0;
8
+ height: 100%;
9
+ }
10
+
11
+ .titaui-ork-guide__wrap .rc-dialog-body {
12
+ height: 100%;
13
+ }
14
+
15
+ .titaui-ork-guide__bg {
16
+ position: relative;
17
+ height: 100%;
18
+ box-sizing: border-box;
19
+ background: linear-gradient(135deg, #9FBFFF 0%, #FEF7E5 65%, #FFFFFF 100%);
20
+ }
21
+
22
+ .titaui-ork-guide__bg::before {
23
+ content: '';
24
+ position: absolute;
25
+ top: 0px;
26
+ right: 172px;
27
+ width: 283px;
28
+ height: 128px;
29
+ background: rgba(240, 94, 94, 0.2);
30
+ filter: blur(50px);
31
+ }
32
+
33
+ .titaui-ork-guide__container {
34
+ position: relative;
35
+ height: 100%;
36
+ overflow: hidden;
37
+ overflow-y: scroll;
38
+ padding-top: 91px;
39
+ padding-bottom: 104px;
40
+ box-sizing: border-box;
41
+ }
42
+
43
+ .titaui-ork-guide__container::before {
44
+ content: '';
45
+ position: absolute;
46
+ bottom: 72px;
47
+ right: -237px;
48
+ width: 339px;
49
+ height: 359px;
50
+ background: rgba(0, 214, 133, 0.1);
51
+ filter: blur(48px);
52
+ z-index: 0;
53
+ }
54
+
55
+ .titaui-ork-guide__container__top {
56
+ font-size: 28px;
57
+ font-weight: normal;
58
+ color: #141C28;
59
+ line-height: 44px;
60
+ letter-spacing: 1px;
61
+ margin-bottom: 60px;
62
+ text-align: center;
63
+ font-weight: 600;
64
+ }
65
+
66
+ .titaui-ork-guide__container__card {
67
+ width: 874px;
68
+ height: 501px;
69
+ background: linear-gradient(270deg, #FFFFFF 0%, #FFFFFF 100%);
70
+ box-shadow: 0px 12px 24px 0px rgba(127, 145, 180, 0.08);
71
+ border-radius: 24px;
72
+ margin: 0 auto;
73
+ display: flex;
74
+ flex-direction: row;
75
+ }
76
+
77
+ .titaui-ork-guide__container__card__left {
78
+ width: 50%;
79
+ position: relative;
80
+ padding: 32px;
81
+ box-sizing: border-box;
82
+ }
83
+
84
+ .titaui-ork-guide__container__card__left img {
85
+ width: 370px;
86
+ height: 437px;
87
+ }
88
+
89
+ .titaui-ork-guide__container__card__left::before {
90
+ position: absolute;
91
+ content: '';
92
+ right: 0;
93
+ width: 1px;
94
+ height: 501px;
95
+ background: linear-gradient(20deg, rgba(233, 236, 240, 0) 0%, #D1D8E1 51%, rgba(233, 236, 240, 0) 100%);
96
+ border-radius: 24px;
97
+ }
98
+
99
+ .titaui-ork-guide__container__card__right {
100
+ width: 50%;
101
+ padding: 52px 52px 52px 38px;
102
+ box-sizing: border-box;
103
+ }
104
+
105
+ .titaui-ork-guide__container__card__right__title {
106
+ font-size: 20px;
107
+ color: #141C28;
108
+ line-height: 30px;
109
+ font-weight: 600;
110
+ }
111
+
112
+ .titaui-ork-guide__container__card__right__desc {
113
+ font-size: 14px;
114
+ font-weight: normal;
115
+ color: #6F7886;
116
+ line-height: 22px;
117
+ margin-top: 8px;
118
+ }
119
+
120
+ .titaui-ork-guide__container__card__right__checkbox {
121
+ padding-top: 28px;
122
+ }
123
+
124
+ .titaui-ork-guide__container__card__right__checkbox .titaui-switch {
125
+ margin-bottom: 20px;
126
+ }
127
+
128
+ .titaui-ork-guide__container__card__right__checkbox .titaui-switch-label {
129
+ display: inline-block;
130
+ width: 48px;
131
+ font-size: 16px;
132
+ font-weight: normal;
133
+ color: #141C28;
134
+ line-height: 24px;
135
+ margin-right: 20px;
136
+ }
137
+
138
+ .titaui-ork-guide__container__card__right__btn {
139
+ text-align: center;
140
+ margin-top: 48px;
141
+ }
142
+
143
+ .titaui-ork-guide__container__card__right__btn .tita-button-primary {
144
+ width: 190px;
145
+ height: 40px;
146
+ background: #2879FF;
147
+ border-radius: 20px;
148
+ }
@@ -0,0 +1,242 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _dialog = _interopRequireDefault(require("../dialog"));
13
+
14
+ var _switch = _interopRequireDefault(require("../switch"));
15
+
16
+ var _button = _interopRequireDefault(require("../button"));
17
+
18
+ var _toast = _interopRequireDefault(require("../toast"));
19
+
20
+ var _constant = require("./constant");
21
+
22
+ var _requestApi = require("./request-api");
23
+
24
+ var _leftImg = _interopRequireDefault(require("./img/left-img.jpg"));
25
+
26
+ require("./index.css");
27
+
28
+ var _excluded = ["hasSetting"],
29
+ _excluded2 = ["isOpenCustom"];
30
+
31
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
32
+
33
+ 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); }
34
+
35
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
36
+
37
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
38
+
39
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
40
+
41
+ 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; }
42
+
43
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
44
+
45
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
46
+
47
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
48
+
49
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
50
+
51
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
52
+
53
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
54
+
55
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
56
+
57
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
58
+
59
+ var preCls = 'titaui-ork-guide';
60
+
61
+ var OkrGuide = function OkrGuide(props) {
62
+ var visible = props.visible,
63
+ handlerOnclickCreatOkr = props.handlerOnclickCreatOkr;
64
+
65
+ var _useState = (0, _react.useState)(_constant.cycleList),
66
+ _useState2 = _slicedToArray(_useState, 2),
67
+ cycleListData = _useState2[0],
68
+ setCycleListData = _useState2[1];
69
+
70
+ var _useState3 = (0, _react.useState)(0),
71
+ _useState4 = _slicedToArray(_useState3, 2),
72
+ isOpenCount = _useState4[0],
73
+ setIsOpenCount = _useState4[1];
74
+
75
+ var _useState5 = (0, _react.useState)({
76
+ isOpenCustom: false,
77
+ isOpenMonth: false,
78
+ isOpenQuarter: true,
79
+ isOpenYear: true,
80
+ isOpenBimonthly: false,
81
+ isOpenHalfYear: false
82
+ }),
83
+ _useState6 = _slicedToArray(_useState5, 2),
84
+ setting = _useState6[0],
85
+ changeSetting = _useState6[1];
86
+
87
+ var getIsOpenById = {
88
+ 1: {
89
+ isOpen: setting.isOpenYear
90
+ },
91
+ 2: {
92
+ isOpen: setting.isOpenQuarter
93
+ },
94
+ 3: {
95
+ isOpen: setting.isOpenMonth
96
+ },
97
+ 4: {
98
+ isOpen: setting.isOpenHalfYear
99
+ },
100
+ 5: {
101
+ isOpen: setting.isOpenBimonthly
102
+ }
103
+ };
104
+ (0, _react.useEffect)(function () {
105
+ var keys = ['isOpenMonth', 'isOpenQuarter', 'isOpenYear', 'isOpenBimonthly', 'isOpenHalfYear'];
106
+ var count = 0;
107
+ keys.forEach(function (k) {
108
+ if (setting[k]) count++;
109
+ });
110
+ setIsOpenCount(count);
111
+ }, [setting]);
112
+ (0, _react.useEffect)(function () {
113
+ (0, _requestApi.getCycleSetting)().then(function (res) {
114
+ var hasSetting = res.hasSetting,
115
+ onthers = _objectWithoutProperties(res, _excluded);
116
+
117
+ changeSetting(onthers);
118
+ console.log(hasSetting, 'hasSetting');
119
+ });
120
+ }, []);
121
+
122
+ var handlerOnchangeSwitch = function handlerOnchangeSwitch(e, id) {
123
+ var isOpen = e;
124
+
125
+ if (isOpen) {
126
+ if (isOpenCount > 2) {
127
+ _toast["default"].Warning('周期最多选择 3 项');
128
+
129
+ return;
130
+ }
131
+ } else {
132
+ if (isOpenCount < 2) {
133
+ _toast["default"].Warning('周期至少选择 1 项');
134
+
135
+ return;
136
+ }
137
+ }
138
+
139
+ switch (id) {
140
+ case 1:
141
+ changeSetting(_objectSpread(_objectSpread({}, setting), {}, {
142
+ isOpenYear: isOpen
143
+ }));
144
+ break;
145
+
146
+ case 2:
147
+ changeSetting(_objectSpread(_objectSpread({}, setting), {}, {
148
+ isOpenQuarter: isOpen
149
+ }));
150
+ break;
151
+
152
+ case 3:
153
+ changeSetting(_objectSpread(_objectSpread({}, setting), {}, {
154
+ isOpenMonth: isOpen
155
+ }));
156
+ break;
157
+
158
+ case 4:
159
+ changeSetting(_objectSpread(_objectSpread({}, setting), {}, {
160
+ isOpenHalfYear: isOpen
161
+ }));
162
+ break;
163
+
164
+ case 5:
165
+ changeSetting(_objectSpread(_objectSpread({}, setting), {}, {
166
+ isOpenBimonthly: isOpen
167
+ }));
168
+ break;
169
+
170
+ default:
171
+ break;
172
+ }
173
+ };
174
+
175
+ var handleSubmit = function handleSubmit() {
176
+ console.log(isOpenCount, 'count');
177
+
178
+ if (isOpenCount > 3) {
179
+ _toast["default"].Warning('周期最多选择 3 项');
180
+
181
+ return;
182
+ }
183
+
184
+ var isOpenCustom = setting.isOpenCustom,
185
+ others = _objectWithoutProperties(setting, _excluded2);
186
+
187
+ (0, _requestApi.addCycleSetting)(_objectSpread({}, others)).then(function () {
188
+ console.log('then');
189
+ handlerOnclickCreatOkr();
190
+ });
191
+ };
192
+
193
+ return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
194
+ extraClass: preCls,
195
+ wrapClassName: "".concat(preCls, "__wrap"),
196
+ visible: visible,
197
+ mask: false,
198
+ noHeadLine: true,
199
+ noFooterLine: true,
200
+ noCloseIcon: true,
201
+ noFooter: true,
202
+ zIndex: 2001
203
+ }, /*#__PURE__*/_react["default"].createElement("div", {
204
+ className: "".concat(preCls, "__bg")
205
+ }, /*#__PURE__*/_react["default"].createElement("div", {
206
+ className: "".concat(preCls, "__container")
207
+ }, /*#__PURE__*/_react["default"].createElement("div", {
208
+ className: "".concat(preCls, "__container__top")
209
+ }, "\u2728\u6B22\u8FCE\u4F7F\u7528 Tita OKR"), /*#__PURE__*/_react["default"].createElement("div", {
210
+ className: "".concat(preCls, "__container__card")
211
+ }, /*#__PURE__*/_react["default"].createElement("div", {
212
+ className: "".concat(preCls, "__container__card__left")
213
+ }, /*#__PURE__*/_react["default"].createElement("img", {
214
+ src: _leftImg["default"]
215
+ })), /*#__PURE__*/_react["default"].createElement("div", {
216
+ className: "".concat(preCls, "__container__card__right")
217
+ }, /*#__PURE__*/_react["default"].createElement("div", {
218
+ className: "".concat(preCls, "__container__card__right__title")
219
+ }, "\uD83D\uDC4B Hi\uFF5E \u8BF7\u5148\u8BBE\u7F6E\u4E00\u4E0B\u76EE\u6807\u5468\u671F"), /*#__PURE__*/_react["default"].createElement("div", {
220
+ className: "".concat(preCls, "__container__card__right__desc")
221
+ }, "\u4F01\u4E1A\u6B65\u8C03\u4E00\u81F4\uFF0C\u7EDF\u4E00\u884C\u52A8\u63A8\u8FDB OKR\uFF0C\u6210\u529F\u7387\u5C06\u63D0\u5347 80%"), /*#__PURE__*/_react["default"].createElement("div", {
222
+ className: "".concat(preCls, "__container__card__right__checkbox")
223
+ }, cycleListData.map(function (item) {
224
+ return /*#__PURE__*/_react["default"].createElement(_react.Fragment, {
225
+ key: item.id
226
+ }, /*#__PURE__*/_react["default"].createElement(_switch["default"], {
227
+ onChange: function onChange(e) {
228
+ return handlerOnchangeSwitch(e, item.id);
229
+ },
230
+ label: item.name,
231
+ checked: getIsOpenById[item.id].isOpen
232
+ }));
233
+ })), /*#__PURE__*/_react["default"].createElement("div", {
234
+ className: "".concat(preCls, "__container__card__right__btn"),
235
+ onClick: handleSubmit
236
+ }, /*#__PURE__*/_react["default"].createElement(_button["default"], {
237
+ type: 'primary'
238
+ }, "\u5B8C\u6210\u8BBE\u7F6E\uFF0C\u521B\u5EFA OKR")))))));
239
+ };
240
+
241
+ var _default = OkrGuide;
242
+ exports["default"] = _default;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getCycleSetting = exports.addWorkManageSetting = exports.addListWorkManage = exports.addCycleSetting = void 0;
7
+
8
+ var _request = _interopRequireDefault(require("../../utils/request"));
9
+
10
+ var _toast = _interopRequireDefault(require("../toast"));
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+
14
+ ;
15
+ var rget = _request["default"].rget,
16
+ rpost = _request["default"].rpost;
17
+
18
+ var addWorkManageSetting = function addWorkManageSetting(data) {
19
+ var url = "WorkManageSetting/Add";
20
+ return rpost('v1')(url, data).then(function (res) {
21
+ if (!!res.Code) {
22
+ return res.Data;
23
+ } else {
24
+ _toast["default"].Error(res.Message || '操作失败,请联系客服');
25
+
26
+ return false;
27
+ }
28
+ })["catch"](function (err) {
29
+ _toast["default"].Error('操作失败,请联系客服');
30
+ });
31
+ };
32
+
33
+ exports.addWorkManageSetting = addWorkManageSetting;
34
+
35
+ var addListWorkManage = function addListWorkManage(data) {
36
+ return rpost('v1')('WorkManageSetting/AddList', data).then(function (res) {
37
+ return res.Data;
38
+ });
39
+ };
40
+
41
+ exports.addListWorkManage = addListWorkManage;
42
+
43
+ var addCycleSetting = function addCycleSetting(data) {
44
+ return rpost('v1')('okr/addCycleSetting', data).then(function (res) {
45
+ return res.Data;
46
+ });
47
+ };
48
+
49
+ exports.addCycleSetting = addCycleSetting;
50
+
51
+ var getCycleSetting = function getCycleSetting() {
52
+ return rget('v1')('okr/cycleSetting').then(function (res) {
53
+ return res.Data;
54
+ });
55
+ };
56
+
57
+ exports.getCycleSetting = getCycleSetting;
@@ -605,7 +605,7 @@ var ReviewBody = /*#__PURE__*/function (_PureComponent) {
605
605
  data = _this$state.data,
606
606
  popContainer = _this$state.popContainer;
607
607
  var maxHeight = 595;
608
- screenHeight <= 768 ? maxHeight = 300 : maxHeight = 595;
608
+ screenHeight <= 768 ? maxHeight = 300 : maxHeight = 500;
609
609
  return /*#__PURE__*/_react["default"].createElement(_style.ReviewBodyContainer, null, /*#__PURE__*/_react["default"].createElement(_style.ReviewBodyScroll, {
610
610
  maxHeight: maxHeight
611
611
  }, /*#__PURE__*/_react["default"].createElement(_style.ReviewTarget, null, /*#__PURE__*/_react["default"].createElement(_style.ReviewCatalog, null, (0, _getLocale.getLocale)("OKR_MyO_KRP_Pop_Reviewobject")), /*#__PURE__*/_react["default"].createElement(_style.ReviewContent, {
@@ -101,14 +101,14 @@ function toggleMark(markType, attrs) {
101
101
  if (has) {
102
102
  tr.removeMark(_$from.pos, _$to.pos, markType);
103
103
  } else {
104
- var _exec, _exec2;
104
+ var _$exec, _$exec2;
105
105
 
106
106
  var from = _$from.pos,
107
107
  to = _$to.pos,
108
108
  start = _$from.nodeAfter,
109
109
  end = _$to.nodeBefore;
110
- var spaceStart = start && start.isText ? ((_exec = /^\s*/.exec(start.text)) === null || _exec === void 0 ? void 0 : _exec[0].length) || 0 : 0;
111
- var spaceEnd = end && end.isText ? ((_exec2 = /\s*$/.exec(end.text)) === null || _exec2 === void 0 ? void 0 : _exec2[0].length) || 0 : 0;
110
+ var spaceStart = start && start.isText ? ((_$exec = /^\s*/.exec(start.text)) === null || _$exec === void 0 ? void 0 : _$exec[0].length) || 0 : 0;
111
+ var spaceEnd = end && end.isText ? ((_$exec2 = /\s*$/.exec(end.text)) === null || _$exec2 === void 0 ? void 0 : _$exec2[0].length) || 0 : 0;
112
112
 
113
113
  if (from + spaceStart < to) {
114
114
  from += spaceStart;
@@ -23,6 +23,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
23
23
 
24
24
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
25
 
26
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
27
+
28
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
29
+
30
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
31
+
26
32
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
27
33
 
28
34
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -59,15 +65,24 @@ var ScrollContainer = /*#__PURE__*/function (_PureComponent) {
59
65
 
60
66
  _this = _super.call(this, props);
61
67
 
62
- _this.onEndScroll = function () {
68
+ _this.onEndScroll = function (e) {
69
+ var _e$target = e.target,
70
+ clientHeight = _e$target.clientHeight,
71
+ scrollHeight = _e$target.scrollHeight,
72
+ scrollTop = _e$target.scrollTop;
73
+ if (clientHeight + scrollTop >= scrollHeight - 50) _this.props.onScrollBottom(e);
63
74
  _this.scrolling = false;
64
75
 
65
76
  if (!_this.pressed && _this.started) {
66
- _this.processEnd();
77
+ _this.processEnd(e);
67
78
  }
68
79
  };
69
80
 
70
81
  _this.onScroll = function (e) {
82
+ var _e$target2 = e.target,
83
+ clientHeight = _e$target2.clientHeight,
84
+ scrollHeight = _e$target2.scrollHeight,
85
+ scrollTop = _e$target2.scrollTop;
71
86
  var container = _this.container.current; // Ignore the internal scrolls
72
87
 
73
88
  if (container.scrollLeft !== _this.scrollLeft || container.scrollTop !== _this.scrollTop) {
@@ -75,7 +90,13 @@ var ScrollContainer = /*#__PURE__*/function (_PureComponent) {
75
90
 
76
91
  _this.processScroll(e);
77
92
 
78
- _this.onEndScroll();
93
+ _this.onEndScroll({
94
+ target: {
95
+ clientHeight: clientHeight,
96
+ scrollHeight: scrollHeight,
97
+ scrollTop: scrollTop
98
+ }
99
+ });
79
100
  }
80
101
  };
81
102
 
@@ -351,14 +372,14 @@ var ScrollContainer = /*#__PURE__*/function (_PureComponent) {
351
372
  }
352
373
  }, {
353
374
  key: "processEnd",
354
- value: function processEnd() {
375
+ value: function processEnd(e) {
355
376
  var onEndScroll = this.props.onEndScroll;
356
377
  var container = this.container.current;
357
378
 
358
379
  if (container && onEndScroll) {
359
- onEndScroll({
380
+ onEndScroll(_objectSpread(_objectSpread({}, e), {}, {
360
381
  external: !this.internal
361
- });
382
+ }));
362
383
  }
363
384
 
364
385
  this.pressed = false;
@@ -23,7 +23,7 @@
23
23
  .search-input-box .clear-input-icon {
24
24
  color: #c2cbd1;
25
25
  position: absolute;
26
- font-size: 14px;
26
+ font-size: 16px;
27
27
  right: 32px;
28
28
  top: 50%;
29
29
  transform: translate(0, -50%);
@@ -41,7 +41,7 @@
41
41
  .search-input-box > input {
42
42
  background: #ffffff;
43
43
  border: 1px solid #e9edf0;
44
- border-radius: 16px;
44
+ border-radius: 18px;
45
45
  width: 100%;
46
46
  height: 100%;
47
47
  padding: 0 44px 0 11px;
@@ -58,6 +58,10 @@ function _default(props) {
58
58
  height: 30
59
59
  }, props.style);
60
60
 
61
+ (0, _react.useEffect)(function () {
62
+ setValue(props.value);
63
+ if (!props.value) setClearIconState(false);
64
+ }, [props.value]);
61
65
  var inputClassName = focus ? "search-input-focus" : "";
62
66
  var iconClassName = focus ? "search-input-icon-focus" : "";
63
67
  var clearIconStyle = {
@@ -0,0 +1,40 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>文件夹-icon</title>
4
+ <defs>
5
+ <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
6
+ <stop stop-color="#FFC03F" offset="0%"></stop>
7
+ <stop stop-color="#E69F00" offset="100%"></stop>
8
+ </linearGradient>
9
+ <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-2">
10
+ <stop stop-color="#FFDCA4" offset="0%"></stop>
11
+ <stop stop-color="#FFB112" offset="100%"></stop>
12
+ </linearGradient>
13
+ <filter x="-34.5%" y="-70.4%" width="169.1%" height="240.7%" filterUnits="objectBoundingBox" id="filter-3">
14
+ <feOffset dx="0" dy="0.8" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
15
+ <feGaussianBlur stdDeviation="0.4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
16
+ <feColorMatrix values="0 0 0 0 0.839215686 0 0 0 0 0.521568627 0 0 0 0 0 0 0 0 0.8 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
17
+ <feMerge>
18
+ <feMergeNode in="shadowMatrixOuter1"></feMergeNode>
19
+ <feMergeNode in="SourceGraphic"></feMergeNode>
20
+ </feMerge>
21
+ </filter>
22
+ </defs>
23
+ <g id="老图标" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
24
+ <g id="附件图标" transform="translate(-121.000000, -2257.000000)">
25
+ <g id="caret-left" transform="translate(100.000000, 2236.000000)">
26
+ <g id="文件夹-icon" transform="translate(21.000000, 21.451613)">
27
+ <rect id="矩形" x="0" y="0" width="28" height="27.0967742"></rect>
28
+ <g id="编组-2" transform="translate(3.000000, 4.000000)">
29
+ <path d="M15.9650836,2 L6,2 L8.77205113,6.06216846 C9.14163521,6.6037576 9.75321174,6.92979558 10.408869,6.93477353 L19,7 L19,7 L19,5.05359586 C19,3.3506359 17.6240805,2 15.9650836,2 Z" id="路径" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
30
+ <path d="M6.04598201,0 L2.57236384,0 C1.15168652,0 0,1.16658056 0,2.60563061 L0,16.3943694 C0,17.8334194 1.15168652,19 2.57236384,19 L19.4259356,19 C20.1081689,19 20.7624597,18.725479 21.2448715,18.2368285 C21.7272833,17.7481779 21.9982995,17.0854256 21.9982995,16.3943694 L22,7.44078957 L21.9889926,7.20659221 C21.8694704,5.89527292 20.7924377,4.86679244 19.4711935,4.84814641 L10.8954901,4.77831357 L8.46091772,1.49939662 C7.94002451,0.624382478 7.06938277,0 6.04598201,0 Z" id="路径" fill="url(#linearGradient-2)" fill-rule="nonzero"></path>
31
+ <g id="编组-22" filter="url(#filter-3)" transform="translate(5.439785, 9.493548)">
32
+ <path d="M0.7,4 L6.3,4 C6.68659932,4 7,4.31340068 7,4.7 C7,5.08659932 6.68659932,5.4 6.3,5.4 L0.7,5.4 C0.313400675,5.4 4.73447626e-17,5.08659932 0,4.7 C-4.73447626e-17,4.31340068 0.313400675,4 0.7,4 Z" id="path-5" fill="#FFDA9E" transform="translate(3.500000, 4.700000) rotate(-180.000000) translate(-3.500000, -4.700000) "></path>
33
+ <path d="M0.7,0 L10.3,0 C10.6865993,-1.82039446e-16 11,0.313400675 11,0.7 C11,1.08659932 10.6865993,1.4 10.3,1.4 L0.7,1.4 C0.313400675,1.4 4.73447626e-17,1.08659932 0,0.7 C-4.73447626e-17,0.313400675 0.313400675,7.10171439e-17 0.7,0 Z" id="path-5" fill="#FFFFFF" transform="translate(5.500000, 0.700000) rotate(-180.000000) translate(-5.500000, -0.700000) "></path>
34
+ </g>
35
+ </g>
36
+ </g>
37
+ </g>
38
+ </g>
39
+ </g>
40
+ </svg>
@@ -0,0 +1,38 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>PPT-icon</title>
4
+ <defs>
5
+ <linearGradient x1="100%" y1="29.7818714%" x2="83.6208606%" y2="29.7818714%" id="linearGradient-1">
6
+ <stop stop-color="#F0A326" offset="0%"></stop>
7
+ <stop stop-color="#D68500" offset="100%"></stop>
8
+ </linearGradient>
9
+ <linearGradient x1="50%" y1="99.3480785%" x2="50%" y2="-1.36175793e-14%" id="linearGradient-2">
10
+ <stop stop-color="#F0A326" offset="0%"></stop>
11
+ <stop stop-color="#FFDA9E" offset="100%"></stop>
12
+ </linearGradient>
13
+ <filter x="-31.6%" y="-43.3%" width="163.2%" height="186.7%" filterUnits="objectBoundingBox" id="filter-3">
14
+ <feOffset dx="0" dy="0.8" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
15
+ <feGaussianBlur stdDeviation="0.4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
16
+ <feColorMatrix values="0 0 0 0 0.839215686 0 0 0 0 0.521568627 0 0 0 0 0 0 0 0 1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
17
+ <feMerge>
18
+ <feMergeNode in="shadowMatrixOuter1"></feMergeNode>
19
+ <feMergeNode in="SourceGraphic"></feMergeNode>
20
+ </feMerge>
21
+ </filter>
22
+ </defs>
23
+ <g id="老图标" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
24
+ <g id="附件图标" transform="translate(-121.000000, -2469.000000)">
25
+ <g id="caret-left" transform="translate(100.000000, 2448.000000)">
26
+ <g id="PPT-icon" transform="translate(21.000000, 21.000000)">
27
+ <rect id="矩形" x="0" y="0" width="28" height="27.0967742"></rect>
28
+ <path d="M8.08888889,7.67741935 L23.6444445,7.67741935 C24.503554,7.67741935 25.2,8.3455386 25.2,9.16970547 L25.2,23.3464236 C25.2,24.1705905 24.503554,24.8387097 23.6444445,24.8387097 L8.08888889,24.8387097 C7.22977928,24.8387097 6.53333333,24.1705905 6.53333333,23.3464236 L6.53333333,9.16970547 C6.53333333,8.3455386 7.22977928,7.67741935 8.08888889,7.67741935 Z" id="蒙版备份" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
29
+ <path d="M20.291358,2.25806452 C21.1313763,2.25806452 21.8123456,2.93204446 21.8123456,3.76344086 L21.8123456,23.3333334 C21.8123456,24.1647298 22.493315,24.8387097 23.3333333,24.8387097 L4.32098765,24.8387097 C3.48096937,24.8387097 2.8,24.1647298 2.8,23.3333334 L2.8,3.76344086 C2.8,2.93204446 3.48096937,2.25806452 4.32098765,2.25806452 L20.291358,2.25806452 Z" id="path-3" fill="url(#linearGradient-2)" fill-rule="nonzero"></path>
30
+ <g id="编组-22" filter="url(#filter-3)" transform="translate(6.747309, 8.548387)">
31
+ <path d="M0.31629509,5.451829 L4.91629509,5.451829 C5.30289442,5.451829 5.61629509,5.76522967 5.61629509,6.151829 C5.61629509,6.53842832 5.30289442,6.851829 4.91629509,6.851829 L0.31629509,6.851829 C-0.0703042345,6.851829 -0.38370491,6.53842832 -0.38370491,6.151829 C-0.38370491,5.76522967 -0.0703042345,5.451829 0.31629509,5.451829 Z" id="path-5" fill="#FFDA9E" transform="translate(2.616295, 6.151829) rotate(-135.000000) translate(-2.616295, -6.151829) "></path>
32
+ <path d="M2.83675324,3.68406204 L12.4367532,3.68406204 C12.8233526,3.68406204 13.1367532,3.99746272 13.1367532,4.38406204 C13.1367532,4.77066137 12.8233526,5.08406204 12.4367532,5.08406204 L2.83675324,5.08406204 C2.45015391,5.08406204 2.13675324,4.77066137 2.13675324,4.38406204 C2.13675324,3.99746272 2.45015391,3.68406204 2.83675324,3.68406204 Z" id="path-5" fill="#FFFFFF" transform="translate(7.636753, 4.384062) rotate(-225.000000) translate(-7.636753, -4.384062) "></path>
33
+ </g>
34
+ </g>
35
+ </g>
36
+ </g>
37
+ </g>
38
+ </svg>