@titaui/pc 1.16.6 → 1.16.7
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/button/index.js +5 -4
- package/lib/components/change-okr-modal/Filter.js +69 -65
- package/lib/components/create-okr-modal/createCycle.js +6 -1
- package/lib/components/edit-kr-wight/EditKrWightModal.js +28 -21
- package/lib/components/okr-excel-create/components/kr-confidence/index.css +18 -0
- package/lib/components/okr-excel-create/components/kr-confidence/index.js +61 -0
- package/lib/components/okr-excel-create/components/kr-weight/index.css +10 -0
- package/lib/components/okr-excel-create/components/kr-weight/index.js +114 -0
- package/lib/components/okr-excel-create/components/okr-align/index.css +49 -0
- package/lib/components/okr-excel-create/components/okr-align/index.js +139 -0
- package/lib/components/okr-excel-create/components/okr-classify/index.css +74 -0
- package/lib/components/okr-excel-create/components/okr-classify/index.js +117 -0
- package/lib/components/okr-excel-create/components/okr-cycle/index.css +40 -0
- package/lib/components/okr-excel-create/components/okr-cycle/index.js +85 -0
- package/lib/components/okr-excel-create/components/okr-name/index.css +48 -0
- package/lib/components/okr-excel-create/components/okr-name/index.js +116 -0
- package/lib/components/okr-excel-create/components/okr-principal/index.css +17 -0
- package/lib/components/okr-excel-create/components/okr-principal/index.js +107 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/kr-progress/index.css +13 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/kr-progress/index.js +46 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/o-progress/index.css +13 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/o-progress/index.js +47 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/okr-progress/index.css +196 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/okr-progress/index.js +319 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/okr-progress/request-api.js +20 -0
- package/lib/components/okr-excel-create/components/okr-progress/components/okr-progress/util.js +134 -0
- package/lib/components/okr-excel-create/components/okr-progress/index.css +25 -0
- package/lib/components/okr-excel-create/components/okr-progress/index.js +90 -0
- package/lib/components/okr-excel-create/components/okr-progress/interface.js +5 -0
- package/lib/components/okr-excel-create/components/okr-type/base-okr-type/confirm/buttonv2.js +108 -0
- package/lib/components/okr-excel-create/components/okr-type/base-okr-type/confirm/confirm.js +166 -0
- package/lib/components/okr-excel-create/components/okr-type/base-okr-type/index.css +20 -0
- package/lib/components/okr-excel-create/components/okr-type/base-okr-type/index.js +76 -0
- package/lib/components/okr-excel-create/components/okr-type/base-okr-type/object-type.js +275 -0
- package/lib/components/okr-excel-create/components/okr-type/index.css +30 -0
- package/lib/components/okr-excel-create/components/okr-type/index.js +196 -0
- package/lib/components/okr-excel-create/components/okr-visibility/index.css +53 -0
- package/lib/components/okr-excel-create/components/okr-visibility/index.js +236 -0
- package/lib/components/okr-excel-create/components-new/kr-confidence/index.css +17 -0
- package/lib/components/okr-excel-create/components-new/kr-confidence/index.js +75 -0
- package/lib/components/okr-excel-create/components-new/kr-weight/index.css +25 -0
- package/lib/components/okr-excel-create/components-new/kr-weight/index.js +233 -0
- package/lib/components/okr-excel-create/components-new/okr-align/index.css +52 -0
- package/lib/components/okr-excel-create/components-new/okr-align/index.js +170 -0
- package/lib/components/okr-excel-create/components-new/okr-classify/index.css +74 -0
- package/lib/components/okr-excel-create/components-new/okr-classify/index.js +126 -0
- package/lib/components/okr-excel-create/components-new/okr-cycle/index.css +48 -0
- package/lib/components/okr-excel-create/components-new/okr-cycle/index.js +80 -0
- package/lib/components/okr-excel-create/components-new/okr-name/index.css +93 -0
- package/lib/components/okr-excel-create/components-new/okr-name/index.js +222 -0
- package/lib/components/okr-excel-create/components-new/okr-principal/index.css +17 -0
- package/lib/components/okr-excel-create/components-new/okr-principal/index.js +116 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/kr-progress/index.css +13 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/kr-progress/index.js +46 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/o-progress/index.css +13 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/o-progress/index.js +47 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/okr-progress/index.css +196 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/okr-progress/index.js +319 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/okr-progress/request-api.js +20 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/components/okr-progress/util.js +134 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/index.css +25 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/index.js +90 -0
- package/lib/components/okr-excel-create/components-new/okr-progress/interface.js +5 -0
- package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/confirm/buttonv2.js +108 -0
- package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/confirm/confirm.js +166 -0
- package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/index.css +20 -0
- package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/index.js +76 -0
- package/lib/components/okr-excel-create/components-new/okr-type/base-okr-type/object-type.js +275 -0
- package/lib/components/okr-excel-create/components-new/okr-type/index.css +30 -0
- package/lib/components/okr-excel-create/components-new/okr-type/index.js +205 -0
- package/lib/components/okr-excel-create/components-new/okr-visibility/index.css +53 -0
- package/lib/components/okr-excel-create/components-new/okr-visibility/index.js +252 -0
- package/lib/components/okr-excel-create/constant.js +14 -0
- package/lib/components/okr-excel-create/hooks.js +314 -0
- package/lib/components/okr-excel-create/img/base-info-add.svg +19 -0
- package/lib/components/okr-excel-create/img/desire.svg +61 -0
- package/lib/components/okr-excel-create/img/promise.svg +61 -0
- package/lib/components/okr-excel-create/index-old.js +258 -0
- package/lib/components/okr-excel-create/index.css +73 -0
- package/lib/components/okr-excel-create/index.js +357 -0
- package/lib/components/okr-excel-create/mock.js +169 -0
- package/lib/components/okr-excel-create/setting.js +24 -0
- package/lib/components/okr-excel-create/type.js +5 -0
- package/lib/components/okr-excel-create/utils.js +190 -0
- package/lib/components/okr-guide/index.css +15 -17
- package/lib/components/okr-guide/index.js +3 -1
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +10 -6
- package/lib/components/operation-records/OperationRecordItem.js +7 -3
- package/lib/components/popup-select/index.css +10 -0
- package/lib/components/popup-select/index.js +8 -2
- package/lib/components/table-excel-v2/index.css +93 -0
- package/lib/components/table-excel-v2/index.js +505 -0
- package/lib/components/table-excel-v2/utils.js +22 -0
- package/lib/index.js +8 -0
- package/lib/pages/new-okr-list/header/index.js +100 -14
- package/lib/pages/new-okr-list/header/operate-record.js +7 -49
- package/lib/utils/array.js +26 -0
- package/package.json +1 -1
|
@@ -0,0 +1,116 @@
|
|
|
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 _richEditor = require("@titaui/rich-editor");
|
|
13
|
+
|
|
14
|
+
var _getLocale = require("../../../../utils/getLocale");
|
|
15
|
+
|
|
16
|
+
var _i18nFrontTranslate = require("../../../../utils/i18n-front-translate");
|
|
17
|
+
|
|
18
|
+
require("./index.css");
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
|
+
|
|
32
|
+
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."); }
|
|
33
|
+
|
|
34
|
+
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); }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
+
|
|
42
|
+
var preCls = 'tita-okr-excel-create-okr-name';
|
|
43
|
+
|
|
44
|
+
var OkrNameRenderer = function OkrNameRenderer(update, isO) {
|
|
45
|
+
return function (_ref) {
|
|
46
|
+
var data = _ref.data;
|
|
47
|
+
|
|
48
|
+
var handleAddKR = function handleAddKR() {
|
|
49
|
+
update({
|
|
50
|
+
type: 'AddKR',
|
|
51
|
+
itemData: data
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
if (data.kr.isAddKR && !isO) {
|
|
56
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
57
|
+
className: "".concat(preCls, "__add-kr"),
|
|
58
|
+
onClick: handleAddKR
|
|
59
|
+
}, " ", /*#__PURE__*/_react["default"].createElement("i", {
|
|
60
|
+
className: "".concat(preCls, "__add-kr-icon tu-icon-add1")
|
|
61
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_Pop_Butt_AddKR'));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
var _useState = (0, _react.useState)({
|
|
65
|
+
editorState: 'normal'
|
|
66
|
+
}),
|
|
67
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
68
|
+
okrNameData = _useState2[0],
|
|
69
|
+
setOkrNameData = _useState2[1];
|
|
70
|
+
|
|
71
|
+
var _useState3 = (0, _react.useState)(''),
|
|
72
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
+
errorTip = _useState4[0],
|
|
74
|
+
setErrorTip = _useState4[1];
|
|
75
|
+
|
|
76
|
+
var mentionInputRef = (0, _react.useRef)();
|
|
77
|
+
|
|
78
|
+
var checkError = function checkError(val) {
|
|
79
|
+
if (val.length == 0) {
|
|
80
|
+
setErrorTip((0, _getLocale.getLocale)('OKR_MyO_Pop_Targetname'));
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (val.length > 500) {
|
|
85
|
+
setErrorTip((0, _i18nFrontTranslate.inputWordTrans)(val.length, 500));
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
setErrorTip('');
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
var onChangeHandler = function onChangeHandler(data) {
|
|
93
|
+
setOkrNameData(function (prevData) {
|
|
94
|
+
return _objectSpread(_objectSpread({}, prevData), data);
|
|
95
|
+
});
|
|
96
|
+
checkError(data.pureTextExcludeAt);
|
|
97
|
+
update(data);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
101
|
+
className: "".concat(preCls)
|
|
102
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
103
|
+
className: "".concat(preCls, "__icon")
|
|
104
|
+
}, isO ? 'O:' : 'KR:'), /*#__PURE__*/_react["default"].createElement(_richEditor.TitaInlineRichEditor, {
|
|
105
|
+
key: okrNameData.editorState,
|
|
106
|
+
editable: true,
|
|
107
|
+
initialState: '',
|
|
108
|
+
onDocChange: onChangeHandler,
|
|
109
|
+
ref: mentionInputRef,
|
|
110
|
+
placeholder: isO ? (0, _getLocale.getLocale)('OKR_MyO_Enteobjname') : (0, _getLocale.getLocale)('OKR_MyO_Pop_FillKeyR')
|
|
111
|
+
}));
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
var _default = OkrNameRenderer;
|
|
116
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.tita-okr-excel-create-okr-principal {
|
|
2
|
+
position: absolute;
|
|
3
|
+
left: 0;
|
|
4
|
+
top: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
padding: 0 12px;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.tita-okr-excel-create-okr-principal .titaui-pc-avator-container {
|
|
15
|
+
height: 24px;
|
|
16
|
+
margin-right: 7px;
|
|
17
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
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 _bsGlobal = require("../../../../utils/bs-global");
|
|
13
|
+
|
|
14
|
+
var _userSelector = _interopRequireDefault(require("../../../user-selector"));
|
|
15
|
+
|
|
16
|
+
var _nameAvatar = _interopRequireDefault(require("../../../avatar/name-avatar"));
|
|
17
|
+
|
|
18
|
+
require("./index.css");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
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
|
+
|
|
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
|
+
|
|
32
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
33
|
+
|
|
34
|
+
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."); }
|
|
35
|
+
|
|
36
|
+
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); }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
|
+
|
|
44
|
+
var preCls = 'tita-okr-excel-create-okr-principal';
|
|
45
|
+
var loginUser = (0, _bsGlobal.getUserInfo)();
|
|
46
|
+
|
|
47
|
+
var principalRenderer = function principalRenderer(update) {
|
|
48
|
+
return function (_ref) {
|
|
49
|
+
var data = _ref.data;
|
|
50
|
+
if (data.kr.isAddKR) return null;
|
|
51
|
+
|
|
52
|
+
var _useState = (0, _react.useState)(_objectSpread(_objectSpread({}, loginUser), {}, {
|
|
53
|
+
avatar: loginUser.UserAvatar,
|
|
54
|
+
name: loginUser.Name,
|
|
55
|
+
userId: loginUser.Id
|
|
56
|
+
})),
|
|
57
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
58
|
+
user = _useState2[0],
|
|
59
|
+
setUser = _useState2[1];
|
|
60
|
+
|
|
61
|
+
var handleSelected = function handleSelected(_ref2) {
|
|
62
|
+
var _ref3 = _slicedToArray(_ref2, 1),
|
|
63
|
+
user = _ref3[0];
|
|
64
|
+
|
|
65
|
+
setUser(user.data);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
return /*#__PURE__*/_react["default"].createElement(_userSelector["default"] // @ts-ignore
|
|
69
|
+
, {
|
|
70
|
+
position: "bottom",
|
|
71
|
+
selectNodes: {},
|
|
72
|
+
onSelect: handleSelected,
|
|
73
|
+
destroyPopupOnHide: true,
|
|
74
|
+
disabledDepartSelect: true,
|
|
75
|
+
panes: {
|
|
76
|
+
depart: true,
|
|
77
|
+
group: false,
|
|
78
|
+
subordinate: false
|
|
79
|
+
},
|
|
80
|
+
popupAlign: {
|
|
81
|
+
offset: [0, 40],
|
|
82
|
+
overflow: {
|
|
83
|
+
adjustX: true,
|
|
84
|
+
adjustY: true
|
|
85
|
+
},
|
|
86
|
+
targetOffset: [0, 0]
|
|
87
|
+
},
|
|
88
|
+
trigger: /*#__PURE__*/_react["default"].createElement("div", {
|
|
89
|
+
className: "".concat(preCls)
|
|
90
|
+
}, /*#__PURE__*/_react["default"].createElement(_nameAvatar["default"], {
|
|
91
|
+
src: user.avatar.small,
|
|
92
|
+
name: user.name,
|
|
93
|
+
userId: user.userId,
|
|
94
|
+
showNameTips: true,
|
|
95
|
+
color: user.avatar.color,
|
|
96
|
+
size: {
|
|
97
|
+
width: 20,
|
|
98
|
+
textNum: 1,
|
|
99
|
+
fontSize: 12
|
|
100
|
+
}
|
|
101
|
+
}))
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
var _default = principalRenderer;
|
|
107
|
+
exports["default"] = _default;
|
package/lib/components/okr-excel-create/components/okr-progress/components/kr-progress/index.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _okrProgress = _interopRequireDefault(require("../okr-progress"));
|
|
13
|
+
|
|
14
|
+
require("./index.css");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
var prefix = 'tita-okr-excel-progress-kr';
|
|
21
|
+
|
|
22
|
+
var KRProgress = function KRProgress(_ref) {
|
|
23
|
+
var id = _ref.id,
|
|
24
|
+
value = _ref.value,
|
|
25
|
+
onChange = _ref.onChange,
|
|
26
|
+
autoUpdate = _ref.autoUpdate,
|
|
27
|
+
autoUpdateItem = _ref.autoUpdateItem,
|
|
28
|
+
editable = _ref.editable,
|
|
29
|
+
riskLevel = _ref.riskLevel,
|
|
30
|
+
getPopupContainer = _ref.getPopupContainer;
|
|
31
|
+
return /*#__PURE__*/_react["default"].createElement(_okrProgress["default"], {
|
|
32
|
+
id: Number(id),
|
|
33
|
+
value: value,
|
|
34
|
+
onChange: onChange,
|
|
35
|
+
autoUpdate: autoUpdate,
|
|
36
|
+
autoUpdateItem: autoUpdateItem,
|
|
37
|
+
editable: editable,
|
|
38
|
+
riskLevel: riskLevel,
|
|
39
|
+
getPopupContainer: getPopupContainer
|
|
40
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
41
|
+
className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--editable"), editable))
|
|
42
|
+
}, value, "%"));
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var _default = KRProgress;
|
|
46
|
+
exports["default"] = _default;
|
package/lib/components/okr-excel-create/components/okr-progress/components/o-progress/index.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _okrProgress = _interopRequireDefault(require("../okr-progress"));
|
|
13
|
+
|
|
14
|
+
require("./index.css");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
var prefix = 'tita-okr-excel-progress-o';
|
|
21
|
+
|
|
22
|
+
var OProgress = function OProgress(_ref) {
|
|
23
|
+
var id = _ref.id,
|
|
24
|
+
value = _ref.value,
|
|
25
|
+
onChange = _ref.onChange,
|
|
26
|
+
autoUpdate = _ref.autoUpdate,
|
|
27
|
+
autoUpdateItem = _ref.autoUpdateItem,
|
|
28
|
+
editable = _ref.editable,
|
|
29
|
+
riskLevel = _ref.riskLevel,
|
|
30
|
+
getPopupContainer = _ref.getPopupContainer;
|
|
31
|
+
return /*#__PURE__*/_react["default"].createElement(_okrProgress["default"], {
|
|
32
|
+
id: Number(id),
|
|
33
|
+
value: value,
|
|
34
|
+
onChange: onChange,
|
|
35
|
+
autoUpdate: autoUpdate,
|
|
36
|
+
autoUpdateItem: autoUpdateItem,
|
|
37
|
+
editable: editable,
|
|
38
|
+
isO: true,
|
|
39
|
+
riskLevel: riskLevel,
|
|
40
|
+
getPopupContainer: getPopupContainer
|
|
41
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
42
|
+
className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--editable"), editable))
|
|
43
|
+
}, value, "%"));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var _default = OProgress;
|
|
47
|
+
exports["default"] = _default;
|
package/lib/components/okr-excel-create/components/okr-progress/components/okr-progress/index.css
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
.tita-okr-excel-progress-okr {
|
|
2
|
+
position: relative;
|
|
3
|
+
height: 34px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.tita-okr-excel-progress-okr__content {
|
|
7
|
+
width: 248px;
|
|
8
|
+
background: #ffffff;
|
|
9
|
+
box-shadow: 0px 8px 24px 0px rgba(127, 145, 180, 0.2);
|
|
10
|
+
border-radius: 12px;
|
|
11
|
+
padding: 16px 24px 20px 24px;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.tita-okr-excel-progress-okr__content-title {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
height: 36px;
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
font-weight: 600;
|
|
21
|
+
color: #141c28;
|
|
22
|
+
line-height: 22px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.tita-okr-excel-progress-okr__content-title-icon {
|
|
26
|
+
font-size: 16px;
|
|
27
|
+
margin-left: 4px;
|
|
28
|
+
font-weight: 400;
|
|
29
|
+
color: #BFC7D5;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.tita-okr-excel-progress-okr__content-input {
|
|
33
|
+
height: 32px;
|
|
34
|
+
background: #ffffff;
|
|
35
|
+
border-radius: 8px;
|
|
36
|
+
border: 1px solid #dfe3ea;
|
|
37
|
+
padding: 0 12px;
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-content: space-between;
|
|
41
|
+
align-items: center;
|
|
42
|
+
font-size: 14px;
|
|
43
|
+
color: #89919f;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.tita-okr-excel-progress-okr__content-input--disable {
|
|
47
|
+
background: #f7f8fa;
|
|
48
|
+
opacity: 0.78;
|
|
49
|
+
border: 1px solid #dfe3ea;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.tita-okr-excel-progress-okr__content-input--error {
|
|
53
|
+
border: 1px solid #f05e5e;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.tita-okr-excel-progress-okr__content-input-el {
|
|
57
|
+
border-radius: 8px;
|
|
58
|
+
background: #ffffff;
|
|
59
|
+
outline: none;
|
|
60
|
+
border: none;
|
|
61
|
+
flex: 1;
|
|
62
|
+
padding: 0;
|
|
63
|
+
height: 22px;
|
|
64
|
+
color: #3f4755;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.tita-okr-excel-progress-okr__content-input-el--disable {
|
|
68
|
+
background: #f7f8fa;
|
|
69
|
+
opacity: 0.78;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.tita-okr-excel-progress-okr__content-input-el ::-webkit-input-placeholder {
|
|
73
|
+
color: #8f959e;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.tita-okr-excel-progress-okr__content-input-el :-ms-input-placeholder {
|
|
77
|
+
color: #8f959e;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.tita-okr-excel-progress-okr__content-input-el :-moz-input-placeholder {
|
|
81
|
+
color: #8f959e;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.tita-okr-excel-progress-okr__content-input-error-text {
|
|
85
|
+
font-size: 12px;
|
|
86
|
+
color: #f05e5e;
|
|
87
|
+
line-height: 18px;
|
|
88
|
+
margin-top: 2px;
|
|
89
|
+
margin-left: 12px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.tita-okr-excel-progress-okr__content-status-title {
|
|
93
|
+
height: 36px;
|
|
94
|
+
background: #ffffff;
|
|
95
|
+
border-radius: 8px;
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
font-size: 14px;
|
|
99
|
+
font-weight: 600;
|
|
100
|
+
color: #141c28;
|
|
101
|
+
line-height: 22px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.tita-okr-excel-progress-okr__content-status-item {
|
|
105
|
+
height: 32px;
|
|
106
|
+
background: #ffffff;
|
|
107
|
+
border-radius: 8px;
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.tita-okr-excel-progress-okr__content-status-item i {
|
|
114
|
+
font-size: 16px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.tita-okr-excel-progress-okr__content-status-item-text {
|
|
118
|
+
font-size: 14px;
|
|
119
|
+
color: #3f4755;
|
|
120
|
+
line-height: 22px;
|
|
121
|
+
margin-left: 12px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.tita-okr-excel-progress-okr__content-switch {
|
|
125
|
+
font-size: 14px;
|
|
126
|
+
font-weight: 600;
|
|
127
|
+
color: #141c28;
|
|
128
|
+
line-height: 22px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.tita-okr-excel-progress-okr__content .titaui-switch {
|
|
132
|
+
margin-top: 4px;
|
|
133
|
+
width: 264px;
|
|
134
|
+
height: 36px;
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.tita-okr-excel-progress-okr__content-auto-update-option {
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
cursor: pointer;
|
|
143
|
+
min-height: 32px;
|
|
144
|
+
background: #ffffff;
|
|
145
|
+
border-radius: 8px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.tita-okr-excel-progress-okr__content-auto-update-option-radio {
|
|
149
|
+
display: inline-flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
justify-content: center;
|
|
152
|
+
width: 14px;
|
|
153
|
+
height: 14px;
|
|
154
|
+
border-radius: 50%;
|
|
155
|
+
border: 1px solid #bfc7d5;
|
|
156
|
+
margin-right: 12px;
|
|
157
|
+
vertical-align: text-top;
|
|
158
|
+
text-align: center;
|
|
159
|
+
font-size: 14px;
|
|
160
|
+
color: #3f4755;
|
|
161
|
+
line-height: 22px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.tita-okr-excel-progress-okr__content-auto-update-option-radio--selected {
|
|
165
|
+
border-color: #2879ff;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.tita-okr-excel-progress-okr__content-auto-update-option-radio--selected:before {
|
|
169
|
+
display: inline-block;
|
|
170
|
+
content: "";
|
|
171
|
+
width: 10px;
|
|
172
|
+
height: 10px;
|
|
173
|
+
border-radius: 50%;
|
|
174
|
+
background: #2879ff;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.tita-okr-excel-progress-okr__content-auto-update-option-icon {
|
|
178
|
+
font-size: 14px;
|
|
179
|
+
margin-left: 4px;
|
|
180
|
+
color: #89919f;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.tita-okr-excel-progress-okr__content-auto-update-option-label {
|
|
184
|
+
display: inline-flex;
|
|
185
|
+
align-items: center;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.tita-okr-excel-progress-okr__content-bottom {
|
|
189
|
+
display: flex;
|
|
190
|
+
justify-content: flex-end;
|
|
191
|
+
margin-top: 12px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.tita-okr-excel-progress-okr__content-bottom .titaui-rect-btn:first-child {
|
|
195
|
+
margin-right: 12px;
|
|
196
|
+
}
|