@titaui/pc 1.13.5-beta.1 → 1.13.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/checkbox-list/index.css +31 -0
- package/lib/components/checkbox-list/index.js +68 -0
- package/lib/components/create-okr-modal/index.js +4 -1
- package/lib/components/dialog-qq-docs/index.css +106 -0
- package/lib/components/dialog-qq-docs/index.js +505 -0
- package/lib/components/dialog-qq-docs/request-apis.js +16 -0
- package/lib/components/dialog-qq-docs/utils.js +79 -0
- package/lib/components/dialog-select/index.css +9 -0
- package/lib/components/dialog-select/index.js +48 -0
- package/lib/components/dialog-upload/img/folder.svg +40 -0
- package/lib/components/dialog-upload/img/form.svg +38 -0
- package/lib/components/dialog-upload/img/mind.svg +39 -0
- package/lib/components/dialog-upload/util.js +20 -2
- package/lib/components/dialog-upload-type/assets/folder.svg +20 -0
- package/lib/components/dialog-upload-type/assets/qq-docs.svg +20 -0
- package/lib/components/dialog-upload-type/components/upload-type-item/index.css +14 -0
- package/lib/components/dialog-upload-type/components/upload-type-item/index.js +36 -0
- package/lib/components/dialog-upload-type/index.css +7 -0
- package/lib/components/dialog-upload-type/index.js +68 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +5 -1
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.css +12 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +13 -2
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/utils.js +56 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/render-row.js +2 -2
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +16 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +51 -9
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +28 -11
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +6 -4
- package/lib/components/dynamic/dynamic-item/index.js +23 -3
- package/lib/components/dynamic/request-api.js +9 -2
- package/lib/components/file-list/components/single-file/index.css +29 -0
- package/lib/components/file-list/components/single-file/index.js +19 -28
- package/lib/components/file-list/img/folder.svg +40 -0
- package/lib/components/file-list/img/form.svg +38 -0
- package/lib/components/file-list/img/mind.svg +39 -0
- package/lib/components/file-list/index.js +2 -1
- package/lib/components/file-list/util.js +20 -2
- package/lib/components/file-preview/index.css +44 -0
- package/lib/components/file-preview/index.js +68 -0
- package/lib/components/loading/assets/loading.gif +0 -0
- package/lib/components/loading/index.css +28 -0
- package/lib/components/loading/index.js +64 -0
- package/lib/components/nav/index.css +37 -0
- package/lib/components/nav/index.js +31 -0
- package/lib/components/nav-top/components/app-center/index.js +1 -6
- package/lib/components/nav-top/components/menu/index.js +14 -44
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +2 -2
- package/lib/components/nav-top/index.css +6 -0
- package/lib/components/nav-top/index.js +138 -2
- package/lib/components/nav-top/request.apis.js +10 -2
- package/lib/components/okr-guide/constant.js +23 -0
- package/lib/components/okr-guide/img/left-img.jpg +0 -0
- package/lib/components/okr-guide/index.css +148 -0
- package/lib/components/okr-guide/index.js +242 -0
- package/lib/components/okr-guide/request-api.js +57 -0
- package/lib/components/rich-editor-at/index.js +85 -13
- package/lib/components/scroll-container/index.js +27 -6
- package/lib/components/search-input/index.css +2 -2
- package/lib/components/search-input/index.js +4 -0
- package/lib/components/upload/img/folder.svg +40 -0
- package/lib/components/upload/img/form.svg +38 -0
- package/lib/components/upload/img/mind.svg +39 -0
- package/lib/components/upload/index.js +193 -25
- package/lib/components/upload/index2.js +379 -0
- package/lib/components/upload/util.js +20 -2
- package/lib/components/user-selector/request-apis.js +3 -3
- package/lib/components/version-change-modal/index.js +1 -3
- package/lib/index.js +8 -0
- package/lib/utils/helpers.js +54 -17
- package/lib/utils/open-data.js +93 -54
- package/lib/utils/tools.js +11 -1
- package/package.json +3 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.titaui-checkbox-list {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.titaui-checkbox-list__item {
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
align-items: center;
|
|
10
|
+
padding: 0 6px 0 8px;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
height: 60px;
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.titaui-checkbox-list__item > * + * {
|
|
17
|
+
margin-left: 20px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.titaui-checkbox-list__item:hover {
|
|
21
|
+
background-color: #F0F4FA;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.titaui-checkbox-list__item__content {
|
|
25
|
+
width: 100%;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.titaui-checkbox-list__item__next {
|
|
30
|
+
color: #89919f;
|
|
31
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 _checkbox = _interopRequireDefault(require("../checkbox"));
|
|
13
|
+
|
|
14
|
+
require("./index.css");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
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); }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
23
|
+
|
|
24
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
29
|
+
|
|
30
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
var preCls = 'titaui-checkbox-list';
|
|
35
|
+
|
|
36
|
+
var CheckBoxList = function CheckBoxList(_ref) {
|
|
37
|
+
var dataList = _ref.dataList,
|
|
38
|
+
onChange = _ref.onChange,
|
|
39
|
+
disabled = _ref.disabled,
|
|
40
|
+
_ref$className = _ref.className,
|
|
41
|
+
className = _ref$className === void 0 ? '' : _ref$className;
|
|
42
|
+
var onClickItemHandler = (0, _react.useCallback)(function (idx) {
|
|
43
|
+
var newList = _toConsumableArray(dataList);
|
|
44
|
+
|
|
45
|
+
if (newList[idx].disabled || disabled && !newList[idx].checked) return;
|
|
46
|
+
if (!newList[idx].isFolder) newList[idx].checked = !newList[idx].checked;
|
|
47
|
+
if (onChange) onChange(newList, idx, newList[idx]);
|
|
48
|
+
}, [onChange, disabled]);
|
|
49
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
50
|
+
className: "".concat(preCls, " ").concat(className)
|
|
51
|
+
}, dataList.map(function (item, i) {
|
|
52
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
53
|
+
className: "".concat(preCls, "__item"),
|
|
54
|
+
onClick: onClickItemHandler.bind(null, i)
|
|
55
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
56
|
+
className: "".concat(preCls, "__item__content")
|
|
57
|
+
}, item.component), item.isFolder ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
58
|
+
className: "".concat(preCls, "__item__next tu-icon-APP-xi")
|
|
59
|
+
}) : /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
|
|
60
|
+
disabled: disabled || item.disabled,
|
|
61
|
+
checked: item.checked
|
|
62
|
+
}));
|
|
63
|
+
}));
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var _default = /*#__PURE__*/_react["default"].memo(CheckBoxList);
|
|
67
|
+
|
|
68
|
+
exports["default"] = _default;
|
|
@@ -130,7 +130,9 @@ function CreateOkrModal(_ref, ref) {
|
|
|
130
130
|
_ref$onClose = _ref.onClose,
|
|
131
131
|
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
132
132
|
_ref$isFromAssess = _ref.isFromAssess,
|
|
133
|
-
isFromAssess = _ref$isFromAssess === void 0 ? false : _ref$isFromAssess
|
|
133
|
+
isFromAssess = _ref$isFromAssess === void 0 ? false : _ref$isFromAssess,
|
|
134
|
+
_ref$asyncOpenBookDem = _ref.asyncOpenBookDemoFun,
|
|
135
|
+
asyncOpenBookDemoFun = _ref$asyncOpenBookDem === void 0 ? function () {} : _ref$asyncOpenBookDem;
|
|
134
136
|
|
|
135
137
|
var _useState = (0, _react.useState)('initialization'),
|
|
136
138
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -346,6 +348,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
346
348
|
var hideCreateOkrModal = (0, _react.useCallback)(function () {
|
|
347
349
|
onClose && onClose();
|
|
348
350
|
setVisible(false);
|
|
351
|
+
asyncOpenBookDemoFun && asyncOpenBookDemoFun();
|
|
349
352
|
}, []);
|
|
350
353
|
(0, _react.useEffect)(function () {
|
|
351
354
|
setVisible(visible);
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
.titaui-dialog-qq-docs {
|
|
2
|
+
width: 480px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.titaui-dialog-qq-docs .px-32 {
|
|
6
|
+
padding-left: 32px;
|
|
7
|
+
padding-right: 32px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.titaui-dialog-qq-docs .rc-dialog-body {
|
|
11
|
+
height: 441px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.titaui-dialog-qq-docs .rc-dialog-header, .titaui-dialog-qq-docs .rc-dialog-footer {
|
|
15
|
+
border: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.titaui-dialog-qq-docs__checked-num {
|
|
19
|
+
color: #2879FF;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.titaui-dialog-qq-docs__cancel-btn {
|
|
23
|
+
border-color: #DFE3EA;
|
|
24
|
+
color: #6F7886;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.titaui-dialog-qq-docs__search-null {
|
|
28
|
+
height: 100%;
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
color: #89919F;
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.titaui-dialog-qq-docs__content {
|
|
37
|
+
padding: 10px 0;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
height: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.titaui-dialog-qq-docs__search-result-text {
|
|
44
|
+
padding-left: 34px;
|
|
45
|
+
margin-top: 15px;
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
font-weight: 400;
|
|
48
|
+
color: #89919F;
|
|
49
|
+
line-height: 20px;
|
|
50
|
+
opacity: 1;
|
|
51
|
+
transition: all .3s;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.titaui-dialog-qq-docs__search-result-text--hide {
|
|
55
|
+
margin-top: 0;
|
|
56
|
+
opacity: 0;
|
|
57
|
+
line-height: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.titaui-dialog-qq-docs__nav {
|
|
61
|
+
margin-top: 15px;
|
|
62
|
+
padding-bottom: 8px;
|
|
63
|
+
height: max-content;
|
|
64
|
+
transition: all .3s;
|
|
65
|
+
box-shadow: 0px 4px 8px 0px rgba(127, 145, 180, 0.1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.titaui-dialog-qq-docs__nav--hide {
|
|
69
|
+
margin-top: 0;
|
|
70
|
+
opacity: 0;
|
|
71
|
+
height: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.titaui-dialog-qq-docs__checkbox-list {
|
|
75
|
+
padding-top: 8px;
|
|
76
|
+
padding-left: 24px;
|
|
77
|
+
padding-right: 26px;
|
|
78
|
+
flex: 1;
|
|
79
|
+
height: 100%;
|
|
80
|
+
overflow-y: auto;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.titaui-dialog-qq-docs__footer {
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-content: space-between;
|
|
86
|
+
align-items: center;
|
|
87
|
+
width: 100%;
|
|
88
|
+
color: #6f7886;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.titaui-dialog-qq-docs__footer__actions {
|
|
92
|
+
display: flex;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.titaui-dialog-qq-docs__footer__actions > * + * {
|
|
96
|
+
margin-left: 12px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.titaui-dialog-qq-docs__end-text {
|
|
100
|
+
margin: 12px 0 20px 0;
|
|
101
|
+
text-align: center;
|
|
102
|
+
font-size: 12px;
|
|
103
|
+
font-weight: 400;
|
|
104
|
+
color: #89919F;
|
|
105
|
+
line-height: 18px;
|
|
106
|
+
}
|