@titaui/pc 1.11.48-beta.1 → 1.11.49
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/rect-btn/index.js +3 -3
- package/lib/components/form/form-fields/radios/index.css +4 -0
- package/lib/components/form/form-fields/radios/index.js +4 -3
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/index.css +4 -0
- package/lib/components/okr-detail/components/base-okr-type/object-type.js +1 -0
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +9 -5
- package/lib/components/okr-detail/e-list/index.js +2 -2
- package/lib/components/radio/index.css +3 -3
- package/lib/components/search-input/index.css +1 -1
- package/lib/components/task-relation-modal/helper.js +2 -69
- package/lib/components/task-relation-modal/index.js +0 -9
- package/lib/components/task-relation-modal/request-api.js +2 -28
- package/lib/components/task-relation-modal/search/okr-status-select.js +3 -3
- package/lib/components/task-relation-modal/search/principal.js +2 -1
- package/lib/components/task-relation-modal/search/search-dropdown/index.css +1 -1
- package/lib/components/textarea/index.js +38 -35
- package/lib/components/tooltip/index.js +0 -3
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +3 -5
- package/lib/components-v1/radio/radio.js +1 -1
- package/lib/pages/new-okr-list/header/index.css +1 -1
- package/package.json +1 -1
- package/lib/components/button/images/blue.svg +0 -21
- package/lib/components/button/images/red.svg +0 -21
- package/lib/components/button/images/white.svg +0 -19
- package/lib/components/period-selector/interface.js +0 -7
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +0 -7
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +0 -241
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +0 -123
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.css +0 -0
- package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +0 -129
- package/lib/components/task-relation-modal/okr-relation/request-api.js +0 -93
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +0 -119
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +0 -183
- package/lib/components/task-relation-modal/search/task-status-select.js +0 -90
- package/lib/components/task-relation-modal/search/work-relation.js +0 -83
- package/lib/components/task-relation-modal/search/work-status-select.js +0 -72
- package/lib/components/task-relation-modal/tree/task-list/index.css +0 -0
- package/lib/components/task-relation-modal/tree/task-list/index.js +0 -1
- package/lib/components/task-relation-modal/tree/work-list/index.css +0 -0
- package/lib/components/task-relation-modal/tree/work-list/index.js +0 -166
- package/lib/components/task-relation-modal/tree/work-list/search-form.js +0 -117
- package/lib/components/task-relation-modal/work-relation/index.css +0 -0
- package/lib/components/task-relation-modal/work-relation/index.js +0 -256
- package/lib/components/tooltip/tooltip-rows/index.css +0 -26
- package/lib/components/tooltip/tooltip-rows/index.js +0 -106
|
@@ -34,10 +34,10 @@ function RectBtn(props) {
|
|
|
34
34
|
className = _props$className === void 0 ? '' : _props$className,
|
|
35
35
|
_props$disabled = props.disabled,
|
|
36
36
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
37
|
-
_props$loading = props.loading,
|
|
38
|
-
loading = _props$loading === void 0 ? false : _props$loading,
|
|
39
37
|
style = props.style,
|
|
40
|
-
children = props.children
|
|
38
|
+
children = props.children,
|
|
39
|
+
_props$loading = props.loading,
|
|
40
|
+
loading = _props$loading === void 0 ? false : _props$loading;
|
|
41
41
|
|
|
42
42
|
var renderIcon = function renderIcon() {
|
|
43
43
|
if (typeof icon === 'string') {
|
|
@@ -33,17 +33,18 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
33
33
|
|
|
34
34
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
35
|
|
|
36
|
-
var prefixCls =
|
|
36
|
+
var prefixCls = 'form-field-radio';
|
|
37
37
|
|
|
38
38
|
var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
39
39
|
var _props$className = props.className,
|
|
40
|
-
className = _props$className === void 0 ?
|
|
40
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
41
41
|
label = props.label,
|
|
42
42
|
onChange = props.onChange,
|
|
43
43
|
radios = props.radios,
|
|
44
44
|
require = props.require,
|
|
45
45
|
value = props.value,
|
|
46
|
-
radioClass = props.radioClass
|
|
46
|
+
_props$radioClass = props.radioClass,
|
|
47
|
+
radioClass = _props$radioClass === void 0 ? '' : _props$radioClass;
|
|
47
48
|
|
|
48
49
|
var _useState = (0, _react.useState)(value),
|
|
49
50
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -47,7 +47,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
47
47
|
|
|
48
48
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
49
49
|
|
|
50
|
-
var ConfirmWrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* TODO padding \u53EF\u52A8\u6001\u8C03\u6574 */\n width: 300px;\n
|
|
50
|
+
var ConfirmWrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* TODO padding \u53EF\u52A8\u6001\u8C03\u6574 */\n width: 300px;\n max-height: 100px;\n border-radius: 5px;\n box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.15);\n padding: 15px 12px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n background-color: #fff;\n"])));
|
|
51
51
|
|
|
52
52
|
var FooterWrapper = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-top: 5px;\n button {\n padding: 2px 12px;\n font-size: 12px;\n }\n"])));
|
|
53
53
|
|
|
@@ -248,6 +248,7 @@ var ObjectType = /*#__PURE__*/function (_Component) {
|
|
|
248
248
|
|
|
249
249
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_radio.RadioGroup, {
|
|
250
250
|
name: "okrType",
|
|
251
|
+
className: "confim-radio",
|
|
251
252
|
labelText: (0, _getLocale.getLocale)("Mod_Type"),
|
|
252
253
|
style: {
|
|
253
254
|
marginBottom: 8
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
.okr-detail-delete-confirm__option-text {
|
|
8
8
|
font-size: 14px;
|
|
9
|
-
color: #
|
|
9
|
+
color: #3f4755;
|
|
10
10
|
line-height: 22px;
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.okr-detail-delete-confirm__icon.tu-icon-singlebox-have {
|
|
26
|
-
color: #
|
|
26
|
+
color: #bfc7d5;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.okr-detail-delete-confirm__icon.tu-icon-wiki {
|
|
@@ -38,13 +38,17 @@
|
|
|
38
38
|
margin-top: 10px;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
.okr-detail-delete-confirm .tita-radio:hover .tita-radio-inner {
|
|
42
|
+
color: #2879ff;
|
|
43
|
+
}
|
|
44
|
+
|
|
41
45
|
.isApprovalDisabled {
|
|
42
46
|
margin-bottom: 0;
|
|
43
47
|
padding: 5px 24px;
|
|
44
48
|
font-size: 14px;
|
|
45
49
|
line-height: 22px;
|
|
46
|
-
transition: all .3s ease-in;
|
|
47
|
-
color: #
|
|
50
|
+
transition: all 0.3s ease-in;
|
|
51
|
+
color: #bfc7d5;
|
|
48
52
|
cursor: pointer;
|
|
49
53
|
display: flex;
|
|
50
54
|
align-items: center;
|
|
@@ -54,6 +58,6 @@
|
|
|
54
58
|
.isApprovalDisabled .options-icon {
|
|
55
59
|
margin-right: 12px;
|
|
56
60
|
font-size: 14px;
|
|
57
|
-
transition: all .3s ease-in;
|
|
61
|
+
transition: all 0.3s ease-in;
|
|
58
62
|
color: #89919f;
|
|
59
63
|
}
|
|
@@ -84,12 +84,12 @@ function Elist(props, ref) {
|
|
|
84
84
|
krList = _useState2[0],
|
|
85
85
|
setKrList = _useState2[1];
|
|
86
86
|
|
|
87
|
-
var _useState3 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerECheckedStatus".concat(loginUser))
|
|
87
|
+
var _useState3 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerECheckedStatus".concat(loginUser))) : []),
|
|
88
88
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
89
89
|
checkedStatus = _useState4[0],
|
|
90
90
|
setCheckedStatus = _useState4[1];
|
|
91
91
|
|
|
92
|
-
var _useState5 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerESelectUsers".concat(loginUser))
|
|
92
|
+
var _useState5 = (0, _react.useState)(hasCondition ? JSON.parse(localStorage.getItem("okrDrawerESelectUsers".concat(loginUser))) : []),
|
|
93
93
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
94
94
|
selectUsers = _useState6[0],
|
|
95
95
|
setSelectUsers = _useState6[1];
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.titaui-radio-wrapper .titaui-radio:hover > .titaui-radio-inner {
|
|
33
|
-
border: 1px solid #
|
|
33
|
+
border: 1px solid #2879ff;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.titaui-radio-wrapper .titaui-radio .titaui-radio-input {
|
|
@@ -59,14 +59,14 @@
|
|
|
59
59
|
height: 10px;
|
|
60
60
|
min-height: 10px;
|
|
61
61
|
border-radius: 50%;
|
|
62
|
-
background-color: #
|
|
62
|
+
background-color: #2879ff;
|
|
63
63
|
transform: scale(0);
|
|
64
64
|
opacity: 0;
|
|
65
65
|
transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.titaui-radio-wrapper .titaui-radio .titaui-radio-input:checked + .titaui-radio-inner {
|
|
69
|
-
border-color: #
|
|
69
|
+
border-color: #2879ff;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
.titaui-radio-wrapper .titaui-radio .titaui-radio-input:checked + .titaui-radio-inner:after {
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.preCls = exports.lableTypeMap = exports.isOpenWorkManage = exports.isOpenOkrManage = exports.isOpenLabel = exports.formatDateStr = void 0;
|
|
7
7
|
|
|
8
8
|
var _bsGlobal = require("../../utils/bs-global");
|
|
9
9
|
|
|
10
|
-
var _getLocale = require("../../utils/getLocale");
|
|
11
|
-
|
|
12
10
|
var preCls = "titaui-task-relation";
|
|
13
11
|
exports.preCls = preCls;
|
|
14
12
|
var isOpenOkrManage = (0, _bsGlobal.getAppHead)("113"); // 开通OKR
|
|
@@ -31,21 +29,7 @@ var lableTypeMap = {
|
|
|
31
29
|
};
|
|
32
30
|
exports.lableTypeMap = lableTypeMap;
|
|
33
31
|
|
|
34
|
-
var timeFormat = function timeFormat(NowDate) {
|
|
35
|
-
var date = new Date(NowDate);
|
|
36
|
-
var y = date.getFullYear(); // 年
|
|
37
|
-
|
|
38
|
-
var m = date.getMonth() + 1; // 月
|
|
39
|
-
|
|
40
|
-
var d = date.getDate(); // 日
|
|
41
|
-
|
|
42
|
-
return "".concat(y, "/").concat(m, "/").concat(d);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
exports.timeFormat = timeFormat;
|
|
46
|
-
|
|
47
32
|
var formatDateStr = function formatDateStr(str) {
|
|
48
|
-
str = timeFormat(str);
|
|
49
33
|
var currentYear = new Date().getFullYear();
|
|
50
34
|
|
|
51
35
|
if (str.indexOf(currentYear) !== -1) {
|
|
@@ -55,55 +39,4 @@ var formatDateStr = function formatDateStr(str) {
|
|
|
55
39
|
return str;
|
|
56
40
|
};
|
|
57
41
|
|
|
58
|
-
exports.formatDateStr = formatDateStr;
|
|
59
|
-
|
|
60
|
-
var okrStatus = function okrStatus(key) {
|
|
61
|
-
// 分类的类型(4:项目 17:普通分类 62:目标
|
|
62
|
-
var label = (0, _getLocale.getLocale)('OKR_MyO_E_From_AllStates');
|
|
63
|
-
|
|
64
|
-
switch (Number(key)) {
|
|
65
|
-
case 1:
|
|
66
|
-
label = (0, _getLocale.getLocale)('Per_MyRe_text_Inprogress');
|
|
67
|
-
break;
|
|
68
|
-
|
|
69
|
-
case 2:
|
|
70
|
-
label = (0, _getLocale.getLocale)('Pro_page_Sta_Completed');
|
|
71
|
-
break;
|
|
72
|
-
|
|
73
|
-
case 3:
|
|
74
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_Delayed');
|
|
75
|
-
break;
|
|
76
|
-
|
|
77
|
-
case 4:
|
|
78
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_Cancelled');
|
|
79
|
-
break;
|
|
80
|
-
|
|
81
|
-
case 5:
|
|
82
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_Notaccepted');
|
|
83
|
-
break;
|
|
84
|
-
|
|
85
|
-
case 6:
|
|
86
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_Suspended');
|
|
87
|
-
break;
|
|
88
|
-
|
|
89
|
-
case 0:
|
|
90
|
-
label = (0, _getLocale.getLocale)('OKR_MyO_E_From_NotStarted');
|
|
91
|
-
break;
|
|
92
|
-
|
|
93
|
-
default:
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return label;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
exports.okrStatus = okrStatus;
|
|
101
|
-
|
|
102
|
-
var workStatus = function workStatus() {
|
|
103
|
-
return {
|
|
104
|
-
1: (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress"),
|
|
105
|
-
2: (0, _getLocale.getLocale)("OKR_MyO_E_From_Completed")
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
exports.workStatus = workStatus;
|
|
42
|
+
exports.formatDateStr = formatDateStr;
|
|
@@ -29,12 +29,6 @@ var _requestApi = require("./request-api");
|
|
|
29
29
|
|
|
30
30
|
var _getLocale = require("../../utils/getLocale");
|
|
31
31
|
|
|
32
|
-
var _relationTaskModel = _interopRequireDefault(require("./okr-relation/relation-task-model"));
|
|
33
|
-
|
|
34
|
-
var _relationWorkModel = _interopRequireDefault(require("./okr-relation/relation-work-model"));
|
|
35
|
-
|
|
36
|
-
var _workRelation = _interopRequireDefault(require("./work-relation"));
|
|
37
|
-
|
|
38
32
|
require("./index.css");
|
|
39
33
|
|
|
40
34
|
var _excluded = ["defaultVisible", "multiple", "onOk", "onCancel", "taskId", "isRelationOther", "lastSelected"];
|
|
@@ -312,8 +306,5 @@ function TaskRelationModal(props) {
|
|
|
312
306
|
}, selected.length), "\u9879"))));
|
|
313
307
|
}
|
|
314
308
|
|
|
315
|
-
TaskRelationModal.RelationTaskModel = _relationTaskModel["default"];
|
|
316
|
-
TaskRelationModal.RelationWorkModel = _relationWorkModel["default"];
|
|
317
|
-
TaskRelationModal.WorkRelationModal = _workRelation["default"];
|
|
318
309
|
var _default = TaskRelationModal;
|
|
319
310
|
exports["default"] = _default;
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.updateLable = exports.relationWorks = exports.okrSearch = exports.getWorks = exports.getUserById = exports.getCategory = void 0;
|
|
7
7
|
|
|
8
8
|
var _request = require("../../utils/request");
|
|
9
9
|
|
|
10
|
-
var _helpers = require("../../utils/helpers");
|
|
11
|
-
|
|
12
10
|
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; }
|
|
13
11
|
|
|
14
12
|
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; }
|
|
@@ -81,28 +79,4 @@ var getUserById = function getUserById(userId) {
|
|
|
81
79
|
});
|
|
82
80
|
};
|
|
83
81
|
|
|
84
|
-
exports.getUserById = getUserById;
|
|
85
|
-
|
|
86
|
-
var workData = function workData(params, pageNum, pageSize) {
|
|
87
|
-
var url = "work/list?toUserId=".concat((0, _helpers.getLoginUserInfo)().Id);
|
|
88
|
-
var _params$keyWords2 = params.keyWords,
|
|
89
|
-
keyWords = _params$keyWords2 === void 0 ? "" : _params$keyWords2,
|
|
90
|
-
_params$status = params.status,
|
|
91
|
-
status = _params$status === void 0 ? 0 : _params$status,
|
|
92
|
-
_params$relation = params.relation,
|
|
93
|
-
relation = _params$relation === void 0 ? 0 : _params$relation,
|
|
94
|
-
userIds = params.userIds;
|
|
95
|
-
return (0, _request.rpost)("v1")(url, {
|
|
96
|
-
keyWords: keyWords,
|
|
97
|
-
orderType: 1,
|
|
98
|
-
pageNum: pageNum,
|
|
99
|
-
pageSize: pageSize,
|
|
100
|
-
relation: relation,
|
|
101
|
-
status: status,
|
|
102
|
-
userIds: userIds
|
|
103
|
-
}).then(function (res) {
|
|
104
|
-
return res;
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
exports.workData = workData;
|
|
82
|
+
exports.getUserById = getUserById;
|
|
@@ -37,7 +37,7 @@ function OkrStatusSelect(props) {
|
|
|
37
37
|
var onChange = props.onChange,
|
|
38
38
|
initValue = props.initValue;
|
|
39
39
|
|
|
40
|
-
var _useState = (0, _react.useState)((0, _getLocale.getLocale)("
|
|
40
|
+
var _useState = (0, _react.useState)((0, _getLocale.getLocale)("OKR_MyO_Butt_AllStates")),
|
|
41
41
|
_useState2 = _slicedToArray(_useState, 2),
|
|
42
42
|
selectText = _useState2[0],
|
|
43
43
|
setSelectText = _useState2[1];
|
|
@@ -48,13 +48,13 @@ function OkrStatusSelect(props) {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
var selectOptions = [{
|
|
51
|
-
label: (0, _getLocale.getLocale)("
|
|
51
|
+
label: (0, _getLocale.getLocale)("OKR_MyO_Butt_AllStates"),
|
|
52
52
|
value: 0
|
|
53
53
|
}, {
|
|
54
54
|
label: (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress"),
|
|
55
55
|
value: 1
|
|
56
56
|
}, {
|
|
57
|
-
label: (0, _getLocale.getLocale)("
|
|
57
|
+
label: (0, _getLocale.getLocale)("OKR_MyO_Butt_Hasended"),
|
|
58
58
|
value: 2
|
|
59
59
|
}];
|
|
60
60
|
return /*#__PURE__*/_react["default"].createElement(_selectLayer["default"], {
|
|
@@ -13,7 +13,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
require("./index.css");
|
|
15
15
|
|
|
16
|
-
var _excluded = ["disabled", "onFocus", "onBlur", "inputRef", "onChange", "className", "value", "placeholder", "maxLine", "maxLength", "initValue", "onErrorChange", "validator", "onKeyDown"];
|
|
16
|
+
var _excluded = ["disabled", "onFocus", "onBlur", "inputRef", "onChange", "className", "value", "placeholder", "maxLine", "isShowApproval", "maxLength", "initValue", "onErrorChange", "validator", "onKeyDown"];
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
19
|
|
|
@@ -50,6 +50,7 @@ var Textarea = function Textarea(p) {
|
|
|
50
50
|
placeholder = p.placeholder,
|
|
51
51
|
_p$maxLine = p.maxLine,
|
|
52
52
|
maxLine = _p$maxLine === void 0 ? 4 : _p$maxLine,
|
|
53
|
+
isShowApproval = p.isShowApproval,
|
|
53
54
|
maxLength = p.maxLength,
|
|
54
55
|
initValue = p.initValue,
|
|
55
56
|
onErrorChange = p.onErrorChange,
|
|
@@ -111,40 +112,6 @@ var Textarea = function Textarea(p) {
|
|
|
111
112
|
showBottomShadow = _useState18[0],
|
|
112
113
|
setShowBottomShadow = _useState18[1];
|
|
113
114
|
|
|
114
|
-
(0, _react.useEffect)(function () {
|
|
115
|
-
if (!validateEnable) return;
|
|
116
|
-
var hasError = false;
|
|
117
|
-
var eText = "";
|
|
118
|
-
|
|
119
|
-
if (maxLength !== undefined) {
|
|
120
|
-
if (realValue.length > maxLength) {
|
|
121
|
-
hasError = true;
|
|
122
|
-
eText = "\u5DF2\u8F93\u5165 ".concat(realValue.length, " \u4E2A\u5B57\uFF0C\u6700\u591A\u53EF\u8F93\u5165 ").concat(maxLength, " \u4E2A\u5B57");
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (!hasError && validator) {
|
|
127
|
-
var _validator = validator(realValue),
|
|
128
|
-
isValid = _validator.isValid,
|
|
129
|
-
_errorText = _validator.errorText;
|
|
130
|
-
|
|
131
|
-
if (!isValid) {
|
|
132
|
-
hasError = true;
|
|
133
|
-
eText = _errorText || "";
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
setErrorText(eText);
|
|
138
|
-
|
|
139
|
-
if (hasError !== error) {
|
|
140
|
-
if (onErrorChange) {
|
|
141
|
-
onErrorChange(hasError);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
setError(hasError);
|
|
145
|
-
}
|
|
146
|
-
}, [realValue]);
|
|
147
|
-
|
|
148
115
|
var handleShadowVisible = function handleShadowVisible() {
|
|
149
116
|
setTimeout(function () {
|
|
150
117
|
if (realInputRef.current) {
|
|
@@ -190,6 +157,42 @@ var Textarea = function Textarea(p) {
|
|
|
190
157
|
var areaNormal = isTrue ? "area-focus" : "area-normal";
|
|
191
158
|
var areaFocus = active ? "area-focus" : areaNormal;
|
|
192
159
|
var areaError = error ? "area-error" : areaFocus;
|
|
160
|
+
(0, _react.useEffect)(function () {
|
|
161
|
+
if (!validateEnable) return;
|
|
162
|
+
var hasError = false;
|
|
163
|
+
var eText = "";
|
|
164
|
+
|
|
165
|
+
if (maxLength !== undefined) {
|
|
166
|
+
if (realValue.length > maxLength) {
|
|
167
|
+
hasError = true;
|
|
168
|
+
eText = "\u5DF2\u8F93\u5165 ".concat(realValue.length, " \u4E2A\u5B57\uFF0C\u6700\u591A\u53EF\u8F93\u5165 ").concat(maxLength, " \u4E2A\u5B57");
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (!hasError && validator) {
|
|
173
|
+
var _validator = validator(realValue),
|
|
174
|
+
isValid = _validator.isValid,
|
|
175
|
+
_errorText = _validator.errorText;
|
|
176
|
+
|
|
177
|
+
if (!isValid) {
|
|
178
|
+
hasError = true;
|
|
179
|
+
eText = _errorText || "";
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
setErrorText(eText);
|
|
184
|
+
|
|
185
|
+
if (hasError !== error) {
|
|
186
|
+
if (onErrorChange) {
|
|
187
|
+
onErrorChange(hasError);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
setError(hasError);
|
|
191
|
+
}
|
|
192
|
+
}, [realValue]);
|
|
193
|
+
(0, _react.useEffect)(function () {
|
|
194
|
+
resetTextareaHeight();
|
|
195
|
+
}, [isShowApproval]);
|
|
193
196
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
194
197
|
className: "\n ".concat(prefixCls, "\n ").concat(areaError, "\n ").concat(disabled ? " disabled" : "", "\n "),
|
|
195
198
|
onFocus: function onFocus() {},
|
|
@@ -11,14 +11,11 @@ var _tooltip = _interopRequireDefault(require("./tooltip"));
|
|
|
11
11
|
|
|
12
12
|
var _tooltipText = _interopRequireDefault(require("./tooltip-text"));
|
|
13
13
|
|
|
14
|
-
var _tooltipRows = _interopRequireDefault(require("./tooltip-rows"));
|
|
15
|
-
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
15
|
|
|
18
16
|
// export const TooltipText = _TooltipText;
|
|
19
17
|
// export const ErrorToolTip = _ErrorTip;
|
|
20
18
|
_tooltip["default"].Text = _tooltipText["default"];
|
|
21
19
|
_tooltip["default"].Error = _errorTip["default"];
|
|
22
|
-
_tooltip["default"].Rows = _tooltipRows["default"];
|
|
23
20
|
var _default = _tooltip["default"];
|
|
24
21
|
exports["default"] = _default;
|
|
@@ -41,14 +41,12 @@ function _default(props) {
|
|
|
41
41
|
})
|
|
42
42
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
43
43
|
className: "perspm-person__avatar"
|
|
44
|
-
}, data.avatar.
|
|
44
|
+
}, data.avatar.small ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
45
45
|
key: data.userId,
|
|
46
|
-
src: data.avatar.
|
|
46
|
+
src: data.avatar.small,
|
|
47
47
|
style: {
|
|
48
48
|
width: "100%",
|
|
49
|
-
height: "100%"
|
|
50
|
-
position: 'relative',
|
|
51
|
-
top: '-1px'
|
|
49
|
+
height: "100%"
|
|
52
50
|
}
|
|
53
51
|
}) : /*#__PURE__*/_react["default"].createElement("span", {
|
|
54
52
|
style: {
|
|
@@ -43,7 +43,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
43
43
|
|
|
44
44
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
45
45
|
|
|
46
|
-
var RadioWrapper = _styledComponents["default"].label(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n color: #36434d;\n margin-right: 15px;\n box-sizing: border-box;\n display: flex;\n\n .label {\n position: relative;\n user-select: none;\n top: -2px;\n }\n"])));
|
|
46
|
+
var RadioWrapper = _styledComponents["default"].label(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n color: #36434d;\n margin-right: 15px;\n box-sizing: border-box;\n display: inline-flex;\n\n .label {\n position: relative;\n user-select: none;\n top: -2px;\n }\n"])));
|
|
47
47
|
|
|
48
48
|
var Radio = /*#__PURE__*/function (_Component) {
|
|
49
49
|
_inherits(Radio, _Component);
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<title>椭圆形</title>
|
|
4
|
-
<defs>
|
|
5
|
-
<pattern id="pattern-1" width="100%" height="100%" patternUnits="objectBoundingBox">
|
|
6
|
-
<use xlink:href="#image-2"></use>
|
|
7
|
-
</pattern>
|
|
8
|
-
<image id="image-2" width="14" height="14" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAADqADAAQAAAABAAAADgAAAAC98Dn6AAABo0lEQVQoFTWSwU7kMBBEq912WAYhJEba6+6BAwjxhfwcH8MVBJdhiGOb145IlHTHruqqbscense/WtW2oW3p2vq11vOn6uur1vs7nSWtY6jKtJoETJsNtVRX5VLkyyJvprSe5f0G2O81NMzUAkyBGdnaspsyZJVFsqThVd26XI+QzxoDkiAApq42YkW1Zb5yctnaZEuRTisKDcAHxCM5oADPB7tTNYhULwDdXD660uEKFL3+/+B7V8EPBOmbIlEAiSCaFpIed5fyoAg9y//OwVRsfgE+EaPAJJGPDGlR9IZ7euz4+kPPl9EzRd4BvwGMqTZUodA3i1MRgDEOg2UMKymrYPuJ/RdAt+wWbDokm3cQeTgIpSSlaXUHHfB9TKY3CCFxCDKTco7FibZbhYRq5OHgArUDsaBQAZ3I6QOBwdqu7JkKAXA2Mz1GfoHZwno46MSYKB3MK841XLbcIUKiQ82cxcyEM0CLYUHcz5FCoYzt+JNQ3AfkYRXgTmJA0QcF4g/gPcnx19gksxxgp4pHRD0sJaxxQBCNd9jlIY/jwEC0K/0AOvvST1WxS68AAAAASUVORK5CYII="></image>
|
|
9
|
-
</defs>
|
|
10
|
-
<g id="2、按钮" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
11
|
-
<g id="线性按钮Bottun" transform="translate(-881.000000, -339.000000)" fill="url(#pattern-1)" fill-rule="nonzero">
|
|
12
|
-
<g id="6" transform="translate(30.000000, 248.000000)">
|
|
13
|
-
<g id="编组-7" transform="translate(287.000000, 40.000000)">
|
|
14
|
-
<g id="编组-8" transform="translate(548.000000, 40.000000)">
|
|
15
|
-
<path d="M23,11 C26.8659932,11 30,14.1340068 30,18 C30,21.8659932 26.8659932,25 23,25 C19.1340068,25 16,21.8659932 16,18 C16,14.1340068 19.1340068,11 23,11 Z M23,12.2 C19.7967485,12.2 17.2,14.7967485 17.2,18 C17.2,21.2032515 19.7967485,23.8 23,23.8 C26.2032515,23.8 28.8,21.2032515 28.8,18 C28.8,14.7967485 26.2032515,12.2 23,12.2 Z" id="椭圆形"></path>
|
|
16
|
-
</g>
|
|
17
|
-
</g>
|
|
18
|
-
</g>
|
|
19
|
-
</g>
|
|
20
|
-
</g>
|
|
21
|
-
</svg>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<title>椭圆形</title>
|
|
4
|
-
<defs>
|
|
5
|
-
<pattern id="pattern-1" width="100%" height="100%" patternUnits="objectBoundingBox">
|
|
6
|
-
<use xlink:href="#image-2"></use>
|
|
7
|
-
</pattern>
|
|
8
|
-
<image id="image-2" width="14" height="14" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAADqADAAQAAAABAAAADgAAAAC98Dn6AAABx0lEQVQoFT2SQW7bQAxFSQ4l2YabhbtJgQA5Qc/RE3ST03bXO2TVRXdpArSL2JrRDPsoFDUwHor8n5/8kl6fnh7fVftS6/bHfftkVn/W2r6L1C+Hwy1Ua4g043lEbKq6iUi3tXc/RRQ7HssHd/tN/HC76VeqECT4KcAE/z80sDZNvnJ029xac4P4S7XIy4uKKoK6E1DrqUaTlrcfUIzetZaiMy3fzcIvl03u71Wu1xRNQqNJg1QZoJPsxtATQ89b70tzX85jzE7ux/Nz2UkJ5jDzCqmSq7mv8zeH+6Aw+hiupRRfVznf3d1SBdIVAv5pklO98xyu7rP2HmmVlzLY5bCaHc/ns6wib4Bfc9R/BgXPkfM7wFxNMUXHGGDU+E3N7LNGfEP1Qn2KMQoxfLBJpDgLyCTkqAmieiL+SO6Veoqc9jxuD5FCTh3QTMVQc/j4ogvxifwEuEHK/QjxIiKb7mRc2QEFU7LJxOgLwIk9jIY5e76CkmRy+TE4dvdUmACUTKA0sWHezp06A3AnTmXL3Wgcw6x47oWbhYSzfJqVyqmmTCPsM8h3zoZBureDvJOo58tO1bKPiFHEcHDGbH/HfHs9HeTOgvwFtVIeevLXjdUAAAAASUVORK5CYII="></image>
|
|
9
|
-
</defs>
|
|
10
|
-
<g id="2、按钮" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
11
|
-
<g id="线性按钮Bottun" transform="translate(-881.000000, -547.000000)" fill="url(#pattern-1)" fill-rule="nonzero">
|
|
12
|
-
<g id="6" transform="translate(30.000000, 248.000000)">
|
|
13
|
-
<g id="编组-7" transform="translate(287.000000, 40.000000)">
|
|
14
|
-
<g id="编组-8" transform="translate(548.000000, 248.000000)">
|
|
15
|
-
<path d="M23,11 C26.8659932,11 30,14.1340068 30,18 C30,21.8659932 26.8659932,25 23,25 C19.1340068,25 16,21.8659932 16,18 C16,14.1340068 19.1340068,11 23,11 Z M23,12.2 C19.7967485,12.2 17.2,14.7967485 17.2,18 C17.2,21.2032515 19.7967485,23.8 23,23.8 C26.2032515,23.8 28.8,21.2032515 28.8,18 C28.8,14.7967485 26.2032515,12.2 23,12.2 Z" id="椭圆形"></path>
|
|
16
|
-
</g>
|
|
17
|
-
</g>
|
|
18
|
-
</g>
|
|
19
|
-
</g>
|
|
20
|
-
</g>
|
|
21
|
-
</svg>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<title>椭圆形</title>
|
|
4
|
-
<defs>
|
|
5
|
-
<pattern id="pattern-1" width="100%" height="100%" patternUnits="objectBoundingBox">
|
|
6
|
-
<use xlink:href="#image-2"></use>
|
|
7
|
-
</pattern>
|
|
8
|
-
<image id="image-2" width="14" height="14" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAADqADAAQAAAABAAAADgAAAAC98Dn6AAAA+UlEQVQoFVXSSVLDQBBEUQkzL+EAnID7b7kQLBltRL4OpaOpiB+tkjNraGvdtu1pWZZTOO585/wJzs/9bF7N6TI/QGzhNxwCQcN7hWeOs5FwNq97/s+Qd7qfOxJBMOs4G4k77iik41UwHi6CYJQT2RVfYXTLOTpe58FuUIhBuBjCj/AemDv2RshoPMF8G+4kibfwGtqJbmhr7I5O4xr/ObyEh9B1qhuj6UiM7nyf58egm5DXbJW1HWuS30xCI9pPaHA2t4MqfWYkUMzOLqUXZj+6cautUqMT9mF0kzorJJgPFbVjcyJGUXM/Cu/G38E0w1Sj6ow1t9jyBy9lWT02rrfMAAAAAElFTkSuQmCC"></image>
|
|
9
|
-
</defs>
|
|
10
|
-
<g id="2、按钮" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
11
|
-
<g id="面性按钮Bottun" transform="translate(-909.000000, -339.000000)" fill="url(#pattern-1)" fill-rule="nonzero">
|
|
12
|
-
<g id="6" transform="translate(30.000000, 248.000000)">
|
|
13
|
-
<g id="编组-7" transform="translate(209.000000, 40.000000)">
|
|
14
|
-
<path d="M677,51 C680.865993,51 684,54.1340068 684,58 C684,61.8659932 680.865993,65 677,65 C673.134007,65 670,61.8659932 670,58 C670,54.1340068 673.134007,51 677,51 Z M677,52.2 C673.796748,52.2 671.2,54.7967485 671.2,58 C671.2,61.2032515 673.796748,63.8 677,63.8 C680.203252,63.8 682.8,61.2032515 682.8,58 C682.8,54.7967485 680.203252,52.2 677,52.2 Z" id="椭圆形"></path>
|
|
15
|
-
</g>
|
|
16
|
-
</g>
|
|
17
|
-
</g>
|
|
18
|
-
</g>
|
|
19
|
-
</svg>
|