@titaui/pc 1.13.2-beta.19 → 1.13.2-beta.21
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 +501 -0
- package/lib/components/dialog-qq-docs/request-apis.js +16 -0
- package/lib/components/dialog-qq-docs/utils.js +83 -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 +2 -3
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +1 -5
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.css +0 -12
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +2 -13
- 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 +1 -16
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +9 -51
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +10 -27
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +4 -6
- package/lib/components/dynamic/dynamic-item/index.js +3 -23
- package/lib/components/dynamic/request-api.js +2 -9
- 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 +6 -1
- package/lib/components/nav-top/components/menu/index.js +44 -14
- 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-detail/schedule/components/kr-progress/index.js +4 -1
- 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/okr-review/ReviewPop/components/ReviewBody/index.js +1 -1
- package/lib/components/rich-editor/plugins/inline/color/commond.js +3 -3
- package/lib/components/rich-editor-at/index.js +13 -85
- 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 +381 -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/open-data.js +77 -68
- package/lib/utils/tools.js +11 -1
- package/package.json +2 -3
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/utils.js +0 -56
- package/lib/utils/mock-bsglobal.js +0 -1837
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.titaui-base-loading {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 0px;
|
|
5
|
+
transition: height .3s;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.titaui-base-loading--show {
|
|
9
|
+
height: 60px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.titaui-base-loading::before {
|
|
13
|
+
content: '';
|
|
14
|
+
position: absolute;
|
|
15
|
+
background-image: url(./assets/loading.gif);
|
|
16
|
+
background-size: contain;
|
|
17
|
+
width: 40px;
|
|
18
|
+
height: 40px;
|
|
19
|
+
margin-left: 50%;
|
|
20
|
+
transform: translateX(-50%) translateY(50px) scale(0);
|
|
21
|
+
transition: height .3s, transform .5s, opacity .1s;
|
|
22
|
+
opacity: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.titaui-base-loading.titaui-base-loading--show::before {
|
|
26
|
+
transform: translateX(-50%) translateY(10px) scale(1);
|
|
27
|
+
opacity: 1;
|
|
28
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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 _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
14
|
+
require("./index.css");
|
|
15
|
+
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
|
+
|
|
26
|
+
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."); }
|
|
27
|
+
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
|
+
|
|
36
|
+
var preCls = 'titaui-base-loading';
|
|
37
|
+
|
|
38
|
+
var Loading = function Loading(_ref) {
|
|
39
|
+
var className = _ref.className,
|
|
40
|
+
_ref$visible = _ref.visible,
|
|
41
|
+
visible = _ref$visible === void 0 ? false : _ref$visible;
|
|
42
|
+
|
|
43
|
+
var _useState = (0, _react.useState)(visible),
|
|
44
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
+
_visible = _useState2[0],
|
|
46
|
+
setVisible = _useState2[1];
|
|
47
|
+
|
|
48
|
+
(0, _react.useEffect)(function () {
|
|
49
|
+
// 延迟隐藏,避免闪烁
|
|
50
|
+
if (!visible) {
|
|
51
|
+
setTimeout(function () {
|
|
52
|
+
setVisible(visible);
|
|
53
|
+
}, 600);
|
|
54
|
+
} else {
|
|
55
|
+
setVisible(visible);
|
|
56
|
+
}
|
|
57
|
+
}, [visible]);
|
|
58
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
59
|
+
className: (0, _classnames["default"])("".concat(preCls, " ").concat(className, " ").concat(_visible), _defineProperty({}, "".concat(preCls, "--show"), _visible))
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var _default = Loading;
|
|
64
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.titaui-nav {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.titaui-nav_item {
|
|
7
|
+
position: relative;
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
font-weight: 400;
|
|
10
|
+
color: #89919F;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
transition: color .3s;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.titaui-nav_item:hover {
|
|
17
|
+
color: #2879ff;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.titaui-nav_item:hover::before {
|
|
21
|
+
color: #89919F;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.titaui-nav_item + .titaui-nav_item {
|
|
25
|
+
margin-left: 15px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.titaui-nav_item + .titaui-nav_item::before {
|
|
29
|
+
content: '/';
|
|
30
|
+
position: absolute;
|
|
31
|
+
left: -10px;
|
|
32
|
+
cursor: default;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.titaui-nav_item:last-child {
|
|
36
|
+
color: #3f4755;
|
|
37
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
require("./index.css");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var preCls = 'titaui-nav';
|
|
15
|
+
|
|
16
|
+
var Nav = function Nav(_ref) {
|
|
17
|
+
var dataList = _ref.dataList,
|
|
18
|
+
className = _ref.className,
|
|
19
|
+
onSelect = _ref.onSelect;
|
|
20
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
21
|
+
className: "".concat(preCls, " ").concat(className)
|
|
22
|
+
}, dataList.map(function (nav, i) {
|
|
23
|
+
return /*#__PURE__*/_react["default"].createElement("p", {
|
|
24
|
+
className: "".concat(preCls, "_item"),
|
|
25
|
+
onClick: onSelect === null || onSelect === void 0 ? void 0 : onSelect.bind(null, i, nav)
|
|
26
|
+
}, nav.label);
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var _default = Nav;
|
|
31
|
+
exports["default"] = _default;
|
|
@@ -27,6 +27,8 @@ require("./index.css");
|
|
|
27
27
|
|
|
28
28
|
var _interface = require("./interface");
|
|
29
29
|
|
|
30
|
+
var _new = _interopRequireDefault(require("./images/new.svg"));
|
|
31
|
+
|
|
30
32
|
var _yuyueAward = _interopRequireDefault(require("./images/yuyue-award.png"));
|
|
31
33
|
|
|
32
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -188,7 +190,10 @@ var AppCenter = function AppCenter(props) {
|
|
|
188
190
|
className: "".concat(precls, "__app-item-name")
|
|
189
191
|
}, app.title), isTrial && /*#__PURE__*/_react["default"].createElement("span", {
|
|
190
192
|
className: "".concat(precls, "__app-item-sub-title")
|
|
191
|
-
}, app.subTitle))
|
|
193
|
+
}, app.subTitle)), app.code === 'summary' && /*#__PURE__*/_react["default"].createElement("img", {
|
|
194
|
+
src: _new["default"],
|
|
195
|
+
className: "".concat(precls, "__app-item-new")
|
|
196
|
+
}));
|
|
192
197
|
}), new Array(20).fill(1).map(function () {
|
|
193
198
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
194
199
|
className: "".concat(precls, "__app-item-placeholder")
|
|
@@ -21,6 +21,8 @@ var _conditionRender = _interopRequireDefault(require("../../../../components/co
|
|
|
21
21
|
|
|
22
22
|
var _useGlobalValue3 = _interopRequireDefault(require("../../useGlobalValue"));
|
|
23
23
|
|
|
24
|
+
var _new = _interopRequireDefault(require("./img/new.svg"));
|
|
25
|
+
|
|
24
26
|
require("./index.css");
|
|
25
27
|
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -43,7 +45,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
43
45
|
|
|
44
46
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
47
|
|
|
46
|
-
var prefix =
|
|
48
|
+
var prefix = "titaui-nav-top-menu";
|
|
47
49
|
var popupAlign = {
|
|
48
50
|
offset: [0, 5],
|
|
49
51
|
overflow: {
|
|
@@ -52,7 +54,7 @@ var popupAlign = {
|
|
|
52
54
|
},
|
|
53
55
|
targetOffset: [0, 0]
|
|
54
56
|
};
|
|
55
|
-
var NEWMENUS =
|
|
57
|
+
var NEWMENUS = "#summary/my";
|
|
56
58
|
|
|
57
59
|
var Menu = function Menu(_ref) {
|
|
58
60
|
var menus = _ref.menus,
|
|
@@ -73,7 +75,7 @@ var Menu = function Menu(_ref) {
|
|
|
73
75
|
feedNum = _useGlobalValue2[0];
|
|
74
76
|
|
|
75
77
|
var containerRef = (0, _react.useRef)();
|
|
76
|
-
var apiPath = (0, _bsGlobal.getBSGlobal)(
|
|
78
|
+
var apiPath = (0, _bsGlobal.getBSGlobal)("apiPath");
|
|
77
79
|
var userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
78
80
|
|
|
79
81
|
var handlePopupVisibleChange = function handlePopupVisibleChange(visible) {
|
|
@@ -82,14 +84,14 @@ var Menu = function Menu(_ref) {
|
|
|
82
84
|
|
|
83
85
|
var handleTracker = function handleTracker(menu) {
|
|
84
86
|
if (window.titaTracker) {
|
|
85
|
-
window.titaTracker(
|
|
87
|
+
window.titaTracker("action").record({
|
|
86
88
|
actionName: "\u5BFC\u822A\u83DC\u5355__".concat(menu.title),
|
|
87
|
-
actionGroup:
|
|
88
|
-
productName:
|
|
89
|
+
actionGroup: "导航菜单",
|
|
90
|
+
productName: "导航菜单"
|
|
89
91
|
});
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
if (menu.code ===
|
|
94
|
+
if (menu.code === "dynamic" && feedNum > 0) {
|
|
93
95
|
window.location.reload();
|
|
94
96
|
}
|
|
95
97
|
};
|
|
@@ -112,7 +114,7 @@ var Menu = function Menu(_ref) {
|
|
|
112
114
|
var renderRawItem = function renderRawItem(menu) {
|
|
113
115
|
var href = menu.href;
|
|
114
116
|
|
|
115
|
-
if (menu.title ===
|
|
117
|
+
if (menu.title === "Learning" || menu.code === "learning") {
|
|
116
118
|
href = "".concat(apiPath, "/").concat(href);
|
|
117
119
|
}
|
|
118
120
|
|
|
@@ -120,16 +122,44 @@ var Menu = function Menu(_ref) {
|
|
|
120
122
|
component: "span"
|
|
121
123
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
122
124
|
condition: menu.id
|
|
123
|
-
},
|
|
125
|
+
}, menu.href === NEWMENUS &&
|
|
126
|
+
/*#__PURE__*/
|
|
127
|
+
// <GuideTip
|
|
128
|
+
// visible={guideVisible}
|
|
129
|
+
// classnames={`${prefix}__guide`}
|
|
130
|
+
// type="button"
|
|
131
|
+
// content={
|
|
132
|
+
// <span className={`${prefix}__guide-content`}>
|
|
133
|
+
// {getLocale('Rep_NewS_SuyUgraOKR')}
|
|
134
|
+
// </span>
|
|
135
|
+
// }
|
|
136
|
+
// popupAlign={{
|
|
137
|
+
// offset: [0, 140],
|
|
138
|
+
// }}
|
|
139
|
+
// onClickClose={handleClickClose}
|
|
140
|
+
// >
|
|
141
|
+
_react["default"].createElement("a", {
|
|
142
|
+
className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId === menu.id)),
|
|
143
|
+
href: href,
|
|
144
|
+
target: "_self",
|
|
145
|
+
onClick: function onClick() {
|
|
146
|
+
return handleTracker(menu);
|
|
147
|
+
}
|
|
148
|
+
}, menu.title, /*#__PURE__*/_react["default"].createElement("img", {
|
|
149
|
+
src: _new["default"],
|
|
150
|
+
alt: "",
|
|
151
|
+
className: "".concat(prefix, "__tips-new")
|
|
152
|
+
})) // </GuideTip>
|
|
153
|
+
, menu.href !== NEWMENUS && /*#__PURE__*/_react["default"].createElement("a", {
|
|
124
154
|
className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId === menu.id)),
|
|
125
155
|
href: href,
|
|
126
156
|
target: "_self",
|
|
127
157
|
onClick: function onClick() {
|
|
128
158
|
return handleTracker(menu);
|
|
129
159
|
}
|
|
130
|
-
}, menu.title, menu.href ===
|
|
131
|
-
className: (0, _classnames["default"])("".concat(prefix, "__menu--hasNum"), _defineProperty({}, "".concat(prefix, "__menu--hasNum-active"), activeMenuId === menu.id && menu.href ===
|
|
132
|
-
}, feedNum > 100 ?
|
|
160
|
+
}, menu.title, menu.href === "#dynamic" && feedNum > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
161
|
+
className: (0, _classnames["default"])("".concat(prefix, "__menu--hasNum"), _defineProperty({}, "".concat(prefix, "__menu--hasNum-active"), activeMenuId === menu.id && menu.href === "#dynamic"))
|
|
162
|
+
}, feedNum > 100 ? "99+" : feedNum))));
|
|
133
163
|
};
|
|
134
164
|
|
|
135
165
|
var renderRest = function renderRest(items) {
|
|
@@ -143,7 +173,7 @@ var Menu = function Menu(_ref) {
|
|
|
143
173
|
}, items.map(function (menu) {
|
|
144
174
|
var href = menu.href;
|
|
145
175
|
|
|
146
|
-
if (menu.title ===
|
|
176
|
+
if (menu.title === "Learning" || menu.code === "learning") {
|
|
147
177
|
href = "".concat(apiPath, "/").concat(href);
|
|
148
178
|
}
|
|
149
179
|
|
|
@@ -164,7 +194,7 @@ var Menu = function Menu(_ref) {
|
|
|
164
194
|
popupPlacement: "bottomLeft",
|
|
165
195
|
popupAlign: popupAlign
|
|
166
196
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
167
|
-
className: (0, _classnames["default"])(
|
|
197
|
+
className: (0, _classnames["default"])("tu-icon-diot", "".concat(prefix, "__more-icon"), _defineProperty({}, "".concat(prefix, "__more-icon--active"), isActiveHideMeun))
|
|
168
198
|
}));
|
|
169
199
|
};
|
|
170
200
|
|
|
@@ -35,8 +35,20 @@ var _home = _interopRequireDefault(require("./images/home.svg"));
|
|
|
35
35
|
|
|
36
36
|
var _utils = require("./utils");
|
|
37
37
|
|
|
38
|
+
var _okrGuide = _interopRequireDefault(require("../okr-guide"));
|
|
39
|
+
|
|
40
|
+
var _createOkrModal = _interopRequireDefault(require("../create-okr-modal"));
|
|
41
|
+
|
|
42
|
+
var _bookDemo = _interopRequireDefault(require("../book-demo"));
|
|
43
|
+
|
|
44
|
+
var _interface = require("../../components/help-card/interface");
|
|
45
|
+
|
|
46
|
+
var _request2 = require("./request.apis");
|
|
47
|
+
|
|
38
48
|
require("./index.css");
|
|
39
49
|
|
|
50
|
+
var _excluded = ["hasSetting"];
|
|
51
|
+
|
|
40
52
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
41
53
|
|
|
42
54
|
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); }
|
|
@@ -45,6 +57,10 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
45
57
|
|
|
46
58
|
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; }
|
|
47
59
|
|
|
60
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
61
|
+
|
|
62
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
63
|
+
|
|
48
64
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
49
65
|
|
|
50
66
|
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."); }
|
|
@@ -99,6 +115,31 @@ var NavTop = function NavTop() {
|
|
|
99
115
|
summaryGuideVisible = _useState10[0],
|
|
100
116
|
setSummaryGuideVisible = _useState10[1];
|
|
101
117
|
|
|
118
|
+
var _useState11 = (0, _react.useState)(false),
|
|
119
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
120
|
+
versionGuideVisible = _useState12[0],
|
|
121
|
+
setVersionGuideVisible = _useState12[1];
|
|
122
|
+
|
|
123
|
+
var _useState13 = (0, _react.useState)(false),
|
|
124
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
125
|
+
okrGuideVisible = _useState14[0],
|
|
126
|
+
setOkrGuideVisible = _useState14[1];
|
|
127
|
+
|
|
128
|
+
var _useState15 = (0, _react.useState)(false),
|
|
129
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
130
|
+
createOkrModalVisible = _useState16[0],
|
|
131
|
+
setCreateokrModalVisible = _useState16[1];
|
|
132
|
+
|
|
133
|
+
var _useState17 = (0, _react.useState)(20220602),
|
|
134
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
135
|
+
bookDemoSource = _useState18[0],
|
|
136
|
+
setBookDemoSource = _useState18[1];
|
|
137
|
+
|
|
138
|
+
var _useState19 = (0, _react.useState)(false),
|
|
139
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
140
|
+
bookDemoVisible = _useState20[0],
|
|
141
|
+
setBookDemoVisible = _useState20[1];
|
|
142
|
+
|
|
102
143
|
var ua = navigator.userAgent.toLowerCase();
|
|
103
144
|
var showWxInvite = (0, _bsGlobal.getTenantInfo)().mainCorpId && ua.indexOf("micromessenger") !== -1;
|
|
104
145
|
var openWxInvite = (0, _react.useCallback)(function () {
|
|
@@ -186,9 +227,94 @@ var NavTop = function NavTop() {
|
|
|
186
227
|
}
|
|
187
228
|
};
|
|
188
229
|
|
|
230
|
+
var handleCloseVersionGuide = function handleCloseVersionGuide() {
|
|
231
|
+
setVersionGuideVisible(false);
|
|
232
|
+
var loginUserId = BSGlobal.loginUserInfo.Id;
|
|
233
|
+
var cacheIsKonw = localStorage.getItem("VersionGuide_".concat(loginUserId));
|
|
234
|
+
|
|
235
|
+
if (!cacheIsKonw) {
|
|
236
|
+
localStorage.setItem("VersionGuide_".concat(loginUserId), "".concat(loginUserId));
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
var handlerOnclickCreatOkr = function handlerOnclickCreatOkr() {
|
|
241
|
+
setOkrGuideVisible(false);
|
|
242
|
+
var newNavigation = (0, _bsGlobal.getBSGlobal)('newNavigation');
|
|
243
|
+
var okrMenuCode;
|
|
244
|
+
newNavigation.forEach(function (item) {
|
|
245
|
+
if (item.code === 'okr') {
|
|
246
|
+
okrMenuCode = item.children[0].id;
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
window.open('#/okr/manage?relation=1', '_self');
|
|
250
|
+
setActiveMenuId(okrMenuCode);
|
|
251
|
+
setCreateokrModalVisible(true);
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
var getBookDemoVersion = function getBookDemoVersion() {
|
|
255
|
+
var menuVersion = window.BSGlobal.tenantAuthentication.MenuVersion;
|
|
256
|
+
|
|
257
|
+
if (menuVersion === _interface.ETrialVersion.OKR) {
|
|
258
|
+
return _bookDemo["default"].DemoType.TryOKR;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
if (menuVersion === _interface.ETrialVersion.Performance) {
|
|
262
|
+
return _bookDemo["default"].DemoType.TryPerformance;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
return _bookDemo["default"].DemoType.UniversalBookDemo;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
var asyncOpenBookDemoFun = function asyncOpenBookDemoFun() {
|
|
269
|
+
setTimeout(function () {
|
|
270
|
+
setBookDemoVisible(true);
|
|
271
|
+
}, 1000 * 30);
|
|
272
|
+
var cacheIsKonw = localStorage.getItem("VersionGuide_".concat(window.BSGlobal.loginUserInfo.Id));
|
|
273
|
+
|
|
274
|
+
if (cacheIsKonw) {
|
|
275
|
+
setVersionGuideVisible(false);
|
|
276
|
+
} else {
|
|
277
|
+
setVersionGuideVisible(true);
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
var isHasOkr = function isHasOkr() {
|
|
282
|
+
//判断是否安装了OKR
|
|
283
|
+
var okrIndex = window.BSGlobal.WebHead.AppHead.findIndex(function (item) {
|
|
284
|
+
return item.AppId === '113';
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
if (okrIndex !== -1) {
|
|
288
|
+
return true;
|
|
289
|
+
} else {
|
|
290
|
+
return false;
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
(0, _react.useEffect)(function () {
|
|
295
|
+
(0, _request2.getCycleSetting)().then(function (res) {
|
|
296
|
+
var hasSetting = res.hasSetting,
|
|
297
|
+
onthers = _objectWithoutProperties(res, _excluded);
|
|
298
|
+
|
|
299
|
+
if (isHasOkr() && !hasSetting) {
|
|
300
|
+
console.log(hasSetting, '66666666633');
|
|
301
|
+
setOkrGuideVisible(true);
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
}, []);
|
|
189
305
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
190
306
|
className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "--position"), appCenterPosition), _defineProperty({}, "".concat(preCls, "-no-shadow"), appCenterVisible))
|
|
191
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
307
|
+
}, /*#__PURE__*/_react["default"].createElement(_okrGuide["default"], {
|
|
308
|
+
visible: okrGuideVisible,
|
|
309
|
+
handlerOnclickCreatOkr: handlerOnclickCreatOkr
|
|
310
|
+
}), /*#__PURE__*/_react["default"].createElement(_createOkrModal["default"], {
|
|
311
|
+
visible: createOkrModalVisible,
|
|
312
|
+
asyncOpenBookDemoFun: asyncOpenBookDemoFun
|
|
313
|
+
}), /*#__PURE__*/_react["default"].createElement(_bookDemo["default"].BookDemoPC, {
|
|
314
|
+
visible: bookDemoVisible,
|
|
315
|
+
source: bookDemoSource,
|
|
316
|
+
type: getBookDemoVersion()
|
|
317
|
+
}), /*#__PURE__*/_react["default"].createElement("a", {
|
|
192
318
|
className: "".concat(preCls, "__left"),
|
|
193
319
|
href: "#dynamic"
|
|
194
320
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
@@ -234,7 +360,17 @@ var NavTop = function NavTop() {
|
|
|
234
360
|
className: "".concat(preCls, "__msg")
|
|
235
361
|
}, /*#__PURE__*/_react["default"].createElement(_userMessage["default"], null)), versionInfo.Version === 1 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
236
362
|
className: "".concat(preCls, "__version")
|
|
237
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
363
|
+
}, /*#__PURE__*/_react["default"].createElement(_guideTip["default"], {
|
|
364
|
+
visible: versionGuideVisible,
|
|
365
|
+
content: /*#__PURE__*/_react["default"].createElement("span", {
|
|
366
|
+
className: "".concat(preCls, "__app-guide-version-content")
|
|
367
|
+
}, "\uD83D\uDC46\u70B9\u51FB\u8FD9\u91CC\u5207\u6362\u7248\u672C"),
|
|
368
|
+
type: "button",
|
|
369
|
+
popupPlacement: "bottom",
|
|
370
|
+
classnames: "".concat(preCls, "__app-guide"),
|
|
371
|
+
onClickClose: handleCloseVersionGuide,
|
|
372
|
+
width: 180
|
|
373
|
+
}, /*#__PURE__*/_react["default"].createElement(_version["default"], null))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
238
374
|
className: "".concat(preCls, "__photo")
|
|
239
375
|
}, /*#__PURE__*/_react["default"].createElement(_userOwnMenu["default"], null)), isUseNewMenu && /*#__PURE__*/_react["default"].createElement(_appCenter["default"], {
|
|
240
376
|
appCenterVisible: appCenterVisible,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getTodos = exports.getReplys = exports.getReminds = exports.getMessages = exports.getInforms = exports.getData = exports.deleteReply = exports.clearReplys = exports.clearInforms = exports.changeLang = void 0;
|
|
6
|
+
exports.getTodos = exports.getReplys = exports.getReminds = exports.getMessages = exports.getInforms = exports.getData = exports.getCycleSetting = exports.deleteReply = exports.clearReplys = exports.clearInforms = exports.changeLang = void 0;
|
|
7
7
|
|
|
8
8
|
var _axios = _interopRequireDefault(require("axios"));
|
|
9
9
|
|
|
@@ -104,4 +104,12 @@ var changeLang = function changeLang(lang) {
|
|
|
104
104
|
return (0, _request.rget)("v1")("multiLange/change?lang=".concat(lang));
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
exports.changeLang = changeLang;
|
|
107
|
+
exports.changeLang = changeLang;
|
|
108
|
+
|
|
109
|
+
var getCycleSetting = function getCycleSetting() {
|
|
110
|
+
return (0, _request.rget)('v1')('okr/cycleSetting').then(function (res) {
|
|
111
|
+
return res.Data;
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
exports.getCycleSetting = getCycleSetting;
|
|
@@ -31,7 +31,10 @@ var renderTitle = function renderTitle(index, title, id) {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
34
|
-
onClick: handleTitleClick
|
|
34
|
+
onClick: handleTitleClick,
|
|
35
|
+
style: {
|
|
36
|
+
whiteSpace: "nowrap"
|
|
37
|
+
}
|
|
35
38
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
36
39
|
className: "kr-progress__order"
|
|
37
40
|
}, "KR", index + 1), /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.cycleList = void 0;
|
|
7
|
+
var cycleList = [{
|
|
8
|
+
id: 1,
|
|
9
|
+
name: '年度'
|
|
10
|
+
}, {
|
|
11
|
+
id: 2,
|
|
12
|
+
name: '季度'
|
|
13
|
+
}, {
|
|
14
|
+
id: 3,
|
|
15
|
+
name: '月度'
|
|
16
|
+
}, {
|
|
17
|
+
id: 4,
|
|
18
|
+
name: '半年度'
|
|
19
|
+
}, {
|
|
20
|
+
id: 5,
|
|
21
|
+
name: '双月'
|
|
22
|
+
}];
|
|
23
|
+
exports.cycleList = cycleList;
|
|
Binary file
|