@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,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;
@@ -132,7 +132,9 @@ function CreateOkrModal(_ref, ref) {
132
132
  _ref$onClose = _ref.onClose,
133
133
  onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
134
134
  _ref$isFromAssess = _ref.isFromAssess,
135
- isFromAssess = _ref$isFromAssess === void 0 ? false : _ref$isFromAssess;
135
+ isFromAssess = _ref$isFromAssess === void 0 ? false : _ref$isFromAssess,
136
+ _ref$asyncOpenBookDem = _ref.asyncOpenBookDemoFun,
137
+ asyncOpenBookDemoFun = _ref$asyncOpenBookDem === void 0 ? function () {} : _ref$asyncOpenBookDem;
136
138
 
137
139
  var _useState = (0, _react.useState)('initialization'),
138
140
  _useState2 = _slicedToArray(_useState, 2),
@@ -348,6 +350,7 @@ function CreateOkrModal(_ref, ref) {
348
350
  var hideCreateOkrModal = (0, _react.useCallback)(function () {
349
351
  onClose && onClose();
350
352
  setVisible(false);
353
+ asyncOpenBookDemoFun && asyncOpenBookDemoFun();
351
354
  }, []);
352
355
  (0, _react.useEffect)(function () {
353
356
  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
+ }