@titaui/pc 1.10.82-beta.2 → 1.10.82-beta.20
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/.husky/pre-commit +1 -1
- package/lib/components/avatar/name-avatar/index.css +1 -0
- package/lib/components/avatar/name-avatar/index.js +22 -13
- package/lib/components/button/rect-btn/index.css +25 -11
- package/lib/components/button/rect-btn/index.js +8 -4
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/drawer/index.css +11 -0
- package/lib/components/drawer/index.js +31 -6
- package/lib/components/drawer-manager/index.js +25 -27
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +12 -3
- package/lib/components/dynamic/online-broadcast/data.js +7 -7
- package/lib/components/e-priority/index.js +11 -5
- package/lib/components/file-list/components/single-file/index.js +11 -11
- package/lib/components/icon-button-list/index.css +1 -1
- package/lib/components/img-viewer/index.css +7 -0
- package/lib/components/img-viewer/index.js +47 -8
- package/lib/components/menus/export-modules/demo-menus/menus.js +1 -23
- package/lib/components/menus/export-modules/okr-menus/menu-highlight.js +10 -0
- package/lib/components/nav-top/index.js +6 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.css +4 -3
- package/lib/components/okr-detail/detail-header/constant.js +53 -0
- package/lib/components/okr-detail/detail-header/index.js +11 -2
- package/lib/components/okr-flow/child-node/index.css +54 -15
- package/lib/components/okr-flow/child-node/work-node.js +19 -3
- package/lib/components/okr-flow/empty/index.css +8 -1
- package/lib/components/okr-flow/export-modal/index.js +26 -2
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.css +3 -1
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +14 -9
- package/lib/components/okr-flow/images/loading-light.gif +0 -0
- package/lib/components/okr-flow/okr-map/index.js +32 -14
- package/lib/components/okr-flow/request-apis.js +11 -4
- package/lib/components/okr-flow/root-node/index.css +2 -2
- package/lib/components/okr-flow/utils/index.js +43 -26
- package/lib/components/okr-flow/utils/tree-handler.js +14 -3
- package/lib/components/okr-progress-modal/index.css +16 -15
- package/lib/components/okrcase-library/okrcases-components/caseLibrary-main.js +14 -8
- package/lib/components/period-selector/index.js +3 -0
- package/lib/components/superset-charts/components/chart/index.js +8 -36
- package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +8 -0
- package/lib/components/survey-model/contact.js +93 -0
- package/lib/components/survey-model/index.css +141 -0
- package/lib/components/survey-model/index.js +259 -0
- package/lib/components/survey-model/instance.js +86 -0
- package/lib/components/survey-model/request-api.js +80 -0
- package/lib/components/task-relation-modal/index.css +2 -2
- package/lib/components/task-relation-modal/tree-node/category-node/index.css +4 -0
- package/lib/components/task-relation-modal/tree-node/kr-node/index.css +4 -0
- package/lib/components/task-relation-modal/tree-node/milestone-node/index.css +4 -0
- package/lib/components/task-relation-modal/tree-node/o-node/index.css +4 -0
- package/lib/components/task-relation-modal/tree-node/work-node/index.css +4 -0
- package/lib/components/textarea/index.css +120 -0
- package/lib/components/textarea/index.js +257 -0
- package/lib/components/wechat-btn/index.css +4 -0
- package/lib/components/wechat-btn/index.js +134 -38
- package/lib/index.js +125 -77
- package/lib/pages/new-okr-list/header/common.js +52 -0
- package/lib/pages/new-okr-list/header/index.css +45 -0
- package/lib/pages/new-okr-list/header/index.js +28 -16
- package/lib/pages/new-okr-list/header/operate-record.js +88 -0
- package/lib/pages/new-okr-list/index.js +28 -15
- package/lib/pages/new-okr-list/list/index.js +19 -2
- package/lib/pages/okr-map/export-modules/okr-map/header/index.css +6 -1
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +47 -13
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +27 -17
- package/lib/pages/okr-map/number-select/index.css +4 -1
- package/lib/pages/okr-map/number-select/index.js +1 -1
- package/lib/utils/auth.js +60 -3
- package/lib/utils/bs-global.js +14 -2
- package/lib/utils/format-time.js +8 -1
- package/lib/utils/open-data.js +5 -1
- package/package.json +1 -1
package/.husky/pre-commit
CHANGED
|
@@ -58,7 +58,10 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
58
58
|
onDelUser = props.onDelUser,
|
|
59
59
|
_props$textWidth = props.textWidth,
|
|
60
60
|
textWidth = _props$textWidth === void 0 ? 42 : _props$textWidth,
|
|
61
|
-
textClass = props.textClass
|
|
61
|
+
textClass = props.textClass,
|
|
62
|
+
renderRightTopCmp = props.renderRightTopCmp,
|
|
63
|
+
_props$avatarTips = props.avatarTips,
|
|
64
|
+
avatarTips = _props$avatarTips === void 0 ? '' : _props$avatarTips;
|
|
62
65
|
var hasAvatar = src && !src.match(/default\w*.jpg$/);
|
|
63
66
|
|
|
64
67
|
var _useState = (0, _react.useState)(false),
|
|
@@ -103,7 +106,7 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
103
106
|
style: {
|
|
104
107
|
width: size.width,
|
|
105
108
|
height: size.width,
|
|
106
|
-
verticalAlign:
|
|
109
|
+
verticalAlign: 'top'
|
|
107
110
|
},
|
|
108
111
|
src: src
|
|
109
112
|
});
|
|
@@ -120,11 +123,11 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
120
123
|
}
|
|
121
124
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
125
|
style: {
|
|
123
|
-
display:
|
|
126
|
+
display: 'inline-block',
|
|
124
127
|
width: "".concat(size.fontSize, "px"),
|
|
125
|
-
margin:
|
|
126
|
-
overflow:
|
|
127
|
-
whiteSpace:
|
|
128
|
+
margin: '0 auto',
|
|
129
|
+
overflow: 'hidden',
|
|
130
|
+
whiteSpace: 'nowrap',
|
|
128
131
|
fontSize: "".concat(size.fontSize, "px"),
|
|
129
132
|
lineHeight: "".concat(size.width, "px")
|
|
130
133
|
}
|
|
@@ -134,7 +137,7 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
134
137
|
})));
|
|
135
138
|
}
|
|
136
139
|
|
|
137
|
-
var cuttedName =
|
|
140
|
+
var cuttedName = '';
|
|
138
141
|
var cuttedNameLen = 0;
|
|
139
142
|
|
|
140
143
|
for (var i = 0, lent = name.length; i < lent; i++) {
|
|
@@ -167,11 +170,11 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
167
170
|
className: "titaui-pc-avator__name-avatar-container",
|
|
168
171
|
onMouseEnter: handleMouseEnter,
|
|
169
172
|
onMouseLeave: handleMouseLeave
|
|
170
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
|
+
}, renderRightTopCmp, /*#__PURE__*/_react["default"].createElement("div", {
|
|
171
174
|
onClick: handleDelUser,
|
|
172
175
|
onMouseLeave: handleCloseIconMouseLeave,
|
|
173
176
|
onMouseEnter: handleCloseIconMouseEnter,
|
|
174
|
-
className: "titaui-pc-avator__delete-wrapper ".concat(canDelUser && mouseIsEnterUser ?
|
|
177
|
+
className: "titaui-pc-avator__delete-wrapper ".concat(canDelUser && mouseIsEnterUser ? 'titaui-pc-avator--enter' : ''),
|
|
175
178
|
style: {
|
|
176
179
|
left: "".concat(size.width - 14, "px")
|
|
177
180
|
}
|
|
@@ -185,7 +188,10 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
185
188
|
onClick: onClick,
|
|
186
189
|
onMouseEnter: onMouseEnter,
|
|
187
190
|
onMouseLeave: onMouseLeave
|
|
188
|
-
},
|
|
191
|
+
}, avatarTips && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
192
|
+
overlay: avatarTips,
|
|
193
|
+
placement: "top"
|
|
194
|
+
}, hasAvatar ? renderImgAvatar() : renderTextAvatar()), !avatarTips && (hasAvatar ? renderImgAvatar() : renderTextAvatar())), showNameTips && isNameOverflow ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
189
195
|
overlay: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
190
196
|
name: name,
|
|
191
197
|
id: userId
|
|
@@ -194,14 +200,17 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
194
200
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
195
201
|
className: "titaui-pc-avator__name ".concat(textClass),
|
|
196
202
|
style: {
|
|
197
|
-
|
|
203
|
+
maxWidth: textWidth
|
|
198
204
|
}
|
|
199
205
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
200
206
|
ref: textRef
|
|
201
|
-
},
|
|
207
|
+
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
208
|
+
name: name,
|
|
209
|
+
id: userId
|
|
210
|
+
})))) : /*#__PURE__*/_react["default"].createElement("span", {
|
|
202
211
|
className: "titaui-pc-avator__name ".concat(textClass),
|
|
203
212
|
style: {
|
|
204
|
-
|
|
213
|
+
maxWidth: textWidth
|
|
205
214
|
}
|
|
206
215
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
207
216
|
ref: textRef
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
align-items: center;
|
|
14
14
|
justify-content: center;
|
|
15
15
|
min-width: 64px;
|
|
16
|
-
font-size:
|
|
16
|
+
font-size: 14px;
|
|
17
17
|
padding: 0 12px;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -60,21 +60,35 @@
|
|
|
60
60
|
background: #5c8eff;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
.titaui-rect-btn--secondary {
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
font-weight: normal;
|
|
66
|
+
color: #2879ff;
|
|
67
|
+
line-height: 28px;
|
|
68
|
+
background: rgba(40, 121, 255, 0.2);
|
|
69
|
+
margin-right: 16px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.titaui-rect-btn--secondary:hover {
|
|
73
|
+
color: #fff;
|
|
74
|
+
background-color: #2879ff;
|
|
75
|
+
}
|
|
76
|
+
|
|
63
77
|
.titaui-rect-btn--cancel {
|
|
64
|
-
color: #
|
|
65
|
-
border: 1px solid #
|
|
66
|
-
background: #
|
|
78
|
+
color: #6f7886;
|
|
79
|
+
border: 1px solid #dfe3ea;
|
|
80
|
+
background: #ffffff;
|
|
67
81
|
}
|
|
68
82
|
|
|
69
83
|
.titaui-rect-btn--cancel:hover {
|
|
70
|
-
color: #
|
|
71
|
-
border: 1px solid #
|
|
84
|
+
color: #2879ff;
|
|
85
|
+
border: 1px solid #2879ff;
|
|
72
86
|
}
|
|
73
87
|
|
|
74
88
|
.titaui-rect-btn--delete {
|
|
75
|
-
background: #
|
|
76
|
-
color: #
|
|
77
|
-
border: 1px solid #
|
|
89
|
+
background: #ffffff;
|
|
90
|
+
color: #f05e5e;
|
|
91
|
+
border: 1px solid #f05e5e;
|
|
78
92
|
}
|
|
79
93
|
|
|
80
94
|
.titaui-rect-btn--delete:hover {
|
|
@@ -93,10 +107,10 @@
|
|
|
93
107
|
}
|
|
94
108
|
|
|
95
109
|
.titaui-rect-btn--primary.titaui-rect-btn--disabled {
|
|
96
|
-
background: #
|
|
110
|
+
background: #93bcff;
|
|
97
111
|
opacity: 1;
|
|
98
112
|
}
|
|
99
113
|
|
|
100
114
|
.titaui-rect-btn--primary.titaui-rect-btn--disabled:hover {
|
|
101
|
-
background: #
|
|
115
|
+
background: #93bcff;
|
|
102
116
|
}
|
|
@@ -34,7 +34,8 @@ 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
|
-
style = props.style
|
|
37
|
+
style = props.style,
|
|
38
|
+
children = props.children;
|
|
38
39
|
|
|
39
40
|
var renderIcon = function renderIcon() {
|
|
40
41
|
if (typeof icon === "string") {
|
|
@@ -50,16 +51,19 @@ function RectBtn(props) {
|
|
|
50
51
|
}, icon);
|
|
51
52
|
};
|
|
52
53
|
|
|
53
|
-
var onClickHandler = function onClickHandler() {
|
|
54
|
+
var onClickHandler = function onClickHandler(e) {
|
|
54
55
|
if (disabled) return;
|
|
55
|
-
|
|
56
|
+
|
|
57
|
+
if (onClick) {
|
|
58
|
+
onClick(e);
|
|
59
|
+
}
|
|
56
60
|
};
|
|
57
61
|
|
|
58
62
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
59
63
|
className: (0, _classnames["default"])(precls, "".concat(precls, "--").concat(type), "".concat(precls, "--").concat(size), _defineProperty({}, "".concat(precls, "--disabled"), disabled), className),
|
|
60
64
|
style: style,
|
|
61
65
|
onClick: onClickHandler
|
|
62
|
-
}, icon && renderIcon(),
|
|
66
|
+
}, icon && renderIcon(), children || text);
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
var _default = RectBtn;
|
|
@@ -46,7 +46,7 @@ var createWidthKr = /*#__PURE__*/function () {
|
|
|
46
46
|
while (1) {
|
|
47
47
|
switch (_context.prev = _context.next) {
|
|
48
48
|
case 0:
|
|
49
|
-
url = "".concat(requestDomain(), "/api/
|
|
49
|
+
url = "".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/createWithKr");
|
|
50
50
|
_context.next = 3;
|
|
51
51
|
return _axios["default"].post(url, _objectSpread({
|
|
52
52
|
workType: 6
|
|
@@ -48,6 +48,17 @@
|
|
|
48
48
|
background: linear-gradient(180deg, rgba(191, 199, 213, 0) 0%, #BFC7D5 50%, rgba(240, 242, 245, 0) 100%);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
.titaui-drawer-header-status {
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
border-radius: 16px;
|
|
56
|
+
width: 68px;
|
|
57
|
+
height: 28px;
|
|
58
|
+
margin-right: 18px;
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
}
|
|
61
|
+
|
|
51
62
|
.titaui-drawer-header-action {
|
|
52
63
|
font-size: 18px;
|
|
53
64
|
color: #a4acb9;
|
|
@@ -25,7 +25,9 @@ require("./index.css");
|
|
|
25
25
|
|
|
26
26
|
var _context = _interopRequireDefault(require("../drawer-manager/context"));
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _dom = require("./utils/dom");
|
|
29
|
+
|
|
30
|
+
var _excluded = ["visible", "placement", "children", "mask", "width", "className", "contentWrapperStyle", "onClose", "style", "afterVisibleChange", "destroyOnClose", "bodyStyle", "zIndex", "autoClosable"];
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
33
|
|
|
@@ -54,7 +56,7 @@ var Drawer = function Drawer(props) {
|
|
|
54
56
|
|
|
55
57
|
var visible = props.visible,
|
|
56
58
|
_props$placement = props.placement,
|
|
57
|
-
placement = _props$placement === void 0 ?
|
|
59
|
+
placement = _props$placement === void 0 ? 'right' : _props$placement,
|
|
58
60
|
children = props.children,
|
|
59
61
|
_props$mask = props.mask,
|
|
60
62
|
mask = _props$mask === void 0 ? false : _props$mask,
|
|
@@ -70,6 +72,8 @@ var Drawer = function Drawer(props) {
|
|
|
70
72
|
bodyStyle = props.bodyStyle,
|
|
71
73
|
_props$zIndex = props.zIndex,
|
|
72
74
|
zIndex = _props$zIndex === void 0 ? 1200 : _props$zIndex,
|
|
75
|
+
_props$autoClosable = props.autoClosable,
|
|
76
|
+
autoClosable = _props$autoClosable === void 0 ? false : _props$autoClosable,
|
|
73
77
|
rest = _objectWithoutProperties(props, _excluded);
|
|
74
78
|
|
|
75
79
|
var handleAfterVisibleChange = (0, _react.useCallback)(function (opened) {
|
|
@@ -89,6 +93,20 @@ var Drawer = function Drawer(props) {
|
|
|
89
93
|
return children;
|
|
90
94
|
}
|
|
91
95
|
|
|
96
|
+
var autoClose = function autoClose(e) {
|
|
97
|
+
if ((0, _dom.hasAncestorElement)(e.target, 'document-mouse-event-ignore,rc-tooltip,titaui-popup,rc-dialog-root,common-modal,in-modal,task-hot-add')) return;
|
|
98
|
+
onClose();
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
(0, _react.useEffect)(function () {
|
|
102
|
+
if (autoClosable) {
|
|
103
|
+
document.addEventListener('mousedown', autoClose);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return function () {
|
|
107
|
+
document.removeEventListener('mousedown', autoClose);
|
|
108
|
+
};
|
|
109
|
+
}, []);
|
|
92
110
|
return /*#__PURE__*/_react["default"].createElement(DrawerContext.Provider, {
|
|
93
111
|
value: {
|
|
94
112
|
close: function close() {
|
|
@@ -96,7 +114,7 @@ var Drawer = function Drawer(props) {
|
|
|
96
114
|
}
|
|
97
115
|
}
|
|
98
116
|
}, /*#__PURE__*/_react["default"].createElement(_rcDrawer["default"], _extends({
|
|
99
|
-
className: (0, _classnames["default"])(
|
|
117
|
+
className: (0, _classnames["default"])('titaui-drawer', 'document-mouse-event-ignore', className),
|
|
100
118
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
101
119
|
zIndex: zIndex
|
|
102
120
|
})
|
|
@@ -123,6 +141,7 @@ function DrawerHeader(_ref) {
|
|
|
123
141
|
content = _ref.content,
|
|
124
142
|
style = _ref.style,
|
|
125
143
|
onClose = _ref.onClose,
|
|
144
|
+
status = _ref.status,
|
|
126
145
|
actionComponent = _ref.actionComponent;
|
|
127
146
|
var drawer = (0, _react.useContext)(DrawerContext);
|
|
128
147
|
var manager = (0, _react.useContext)(_context["default"]);
|
|
@@ -146,16 +165,22 @@ function DrawerHeader(_ref) {
|
|
|
146
165
|
onClick: manager && manager.goBack
|
|
147
166
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
148
167
|
className: "tu-icon-fanhui"
|
|
149
|
-
}), (0, _getLocale.getLocale)(
|
|
168
|
+
}), (0, _getLocale.getLocale)('Mod_Back')), showBackBtn && hasContent && /*#__PURE__*/_react["default"].createElement("div", {
|
|
150
169
|
className: "titaui-drawer-header-divider"
|
|
151
170
|
}), hasContent && content, /*#__PURE__*/_react["default"].createElement("div", {
|
|
152
171
|
style: {
|
|
153
172
|
flex: 1
|
|
154
173
|
}
|
|
155
|
-
}), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent),
|
|
174
|
+
}), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent), status && status.color && /*#__PURE__*/_react["default"].createElement("div", {
|
|
175
|
+
className: "titaui-drawer-header-status",
|
|
176
|
+
style: {
|
|
177
|
+
color: status.color.color,
|
|
178
|
+
backgroundColor: status.color.bgColor
|
|
179
|
+
}
|
|
180
|
+
}, status.title), displayActions.map(function (action) {
|
|
156
181
|
return /*#__PURE__*/_react["default"].createElement(_headerAction["default"], action);
|
|
157
182
|
}), !!collapsedActions.length && /*#__PURE__*/_react["default"].createElement(_headerAction["default"], {
|
|
158
|
-
title: (0, _getLocale.getLocale)(
|
|
183
|
+
title: (0, _getLocale.getLocale)('Mod_MoreOperate'),
|
|
159
184
|
icon: "tu-icon-10",
|
|
160
185
|
children: collapsedActions
|
|
161
186
|
}), showClose && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -25,45 +25,42 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
-
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
|
|
29
|
-
|
|
30
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
31
29
|
|
|
32
30
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
33
31
|
|
|
34
32
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
35
33
|
|
|
36
|
-
var typeMap = {};
|
|
37
|
-
|
|
38
34
|
var DrawerManager = /*#__PURE__*/function () {
|
|
39
35
|
function DrawerManager() {
|
|
40
36
|
var _this = this;
|
|
41
37
|
|
|
42
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
43
|
-
|
|
44
|
-
_objectDestructuringEmpty(_ref);
|
|
45
|
-
|
|
46
38
|
_classCallCheck(this, DrawerManager);
|
|
47
39
|
|
|
48
40
|
this.history = [];
|
|
49
41
|
this.uid = 0;
|
|
42
|
+
this.typeMap = {};
|
|
50
43
|
|
|
51
44
|
this.open = function (type) {
|
|
52
45
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
53
46
|
var drawerProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
54
|
-
if (!type) throw "need provide drawer type";
|
|
55
|
-
var Component = typeMap[type];
|
|
56
|
-
if (!Component) throw "the type is not regisited";
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
47
|
+
if (!type) throw new Error("need provide drawer type");
|
|
48
|
+
var Component = typeof type === "string" ? _this.typeMap[type] : type;
|
|
49
|
+
if (!Component) throw new Error("the type is not regisited");
|
|
50
|
+
|
|
51
|
+
if (window.titaTracker) {
|
|
52
|
+
window.titaTracker("action").record({
|
|
53
|
+
actionName: type,
|
|
54
|
+
actionGroup: "打开推屏",
|
|
55
|
+
productName: "OKR"
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
62
59
|
return new Promise(function (resolve) {
|
|
63
60
|
clearTimeout(_this.timer);
|
|
64
61
|
_this.timer = setTimeout(function () {
|
|
65
62
|
var uid = _this.uid;
|
|
66
|
-
_this.uid
|
|
63
|
+
_this.uid += 1;
|
|
67
64
|
var extendedDrawerProps = drawerProps;
|
|
68
65
|
|
|
69
66
|
if (_this.history.length > 0) {
|
|
@@ -82,7 +79,7 @@ var DrawerManager = /*#__PURE__*/function () {
|
|
|
82
79
|
key: uid
|
|
83
80
|
}, props)), extendedDrawerProps);
|
|
84
81
|
|
|
85
|
-
if (_this.history.length
|
|
82
|
+
if (_this.history.length === 1) {
|
|
86
83
|
document.addEventListener("mousedown", _this.autoClose);
|
|
87
84
|
}
|
|
88
85
|
}, 200);
|
|
@@ -109,14 +106,16 @@ var DrawerManager = /*#__PURE__*/function () {
|
|
|
109
106
|
};
|
|
110
107
|
|
|
111
108
|
this.close = function () {
|
|
112
|
-
_this.history.reverse().forEach(function (
|
|
113
|
-
var resolve =
|
|
109
|
+
_this.history.reverse().forEach(function (_ref) {
|
|
110
|
+
var resolve = _ref.resolve;
|
|
114
111
|
return resolve();
|
|
115
112
|
});
|
|
116
113
|
|
|
117
114
|
_this.history = [];
|
|
118
115
|
|
|
119
116
|
_this.drawer.close();
|
|
117
|
+
|
|
118
|
+
document.removeEventListener("mousedown", _this.autoClose);
|
|
120
119
|
};
|
|
121
120
|
|
|
122
121
|
this.autoClose = function (e) {
|
|
@@ -125,20 +124,19 @@ var DrawerManager = /*#__PURE__*/function () {
|
|
|
125
124
|
return;
|
|
126
125
|
}
|
|
127
126
|
|
|
128
|
-
if ((0, _dom.hasAncestorElement)(e.target, "document-mouse-event-ignore,rc-tooltip,titaui-popup,rc-dialog-root,common-modal,in-modal,task-hot-add"))
|
|
127
|
+
if ((0, _dom.hasAncestorElement)(e.target, "document-mouse-event-ignore,rc-tooltip,titaui-popup,rc-dialog-root,common-modal,in-modal,task-hot-add")) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
129
130
|
|
|
130
131
|
_this.close();
|
|
132
|
+
};
|
|
131
133
|
|
|
132
|
-
|
|
134
|
+
this.regist = function (type, component) {
|
|
135
|
+
_this.typeMap[type] = component;
|
|
133
136
|
};
|
|
134
137
|
}
|
|
135
138
|
|
|
136
139
|
_createClass(DrawerManager, [{
|
|
137
|
-
key: "regist",
|
|
138
|
-
value: function regist(type, component) {
|
|
139
|
-
typeMap[type] = component;
|
|
140
|
-
}
|
|
141
|
-
}, {
|
|
142
140
|
key: "drawer",
|
|
143
141
|
get: function get() {
|
|
144
142
|
var _this2 = this;
|
|
@@ -13,15 +13,24 @@ var _utils = require("../dynamic-chart/utils");
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
|
|
16
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
+
|
|
16
18
|
var prefixCls = "titaui-dynamic-item";
|
|
17
19
|
|
|
18
20
|
var DynamicAIDialy = function DynamicAIDialy(_ref) {
|
|
19
21
|
var data = _ref.data;
|
|
20
|
-
|
|
22
|
+
|
|
23
|
+
var chartQuery = _react["default"].useMemo(function () {
|
|
24
|
+
return (0, _utils.getChartProps)(data.biId);
|
|
25
|
+
}, [data.biId]);
|
|
26
|
+
|
|
21
27
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
22
28
|
className: prefixCls
|
|
23
|
-
}, /*#__PURE__*/_react["default"].createElement(_supersetCharts["default"],
|
|
29
|
+
}, /*#__PURE__*/_react["default"].createElement(_supersetCharts["default"], _extends({
|
|
30
|
+
feedData: data
|
|
31
|
+
}, chartQuery)));
|
|
24
32
|
};
|
|
25
33
|
|
|
26
|
-
var _default = DynamicAIDialy;
|
|
34
|
+
var _default = /*#__PURE__*/_react["default"].memo(DynamicAIDialy);
|
|
35
|
+
|
|
27
36
|
exports["default"] = _default;
|
|
@@ -19,16 +19,16 @@ exports.onlineBroadcastData = exports["default"] = void 0;
|
|
|
19
19
|
// }
|
|
20
20
|
var onlineBroadcastData = [{
|
|
21
21
|
hasOnline: true,
|
|
22
|
-
preContent: "
|
|
23
|
-
preHref: "https://wiki.tita.com/x/
|
|
22
|
+
preContent: "「考核」OKR 维度支持按 KR 评分啦",
|
|
23
|
+
preHref: "https://wiki.tita.com/x/JYOeAQ",
|
|
24
24
|
isNew: true,
|
|
25
|
-
date: "
|
|
25
|
+
date: "4/11"
|
|
26
26
|
}, {
|
|
27
27
|
hasOnline: true,
|
|
28
|
-
preContent: "
|
|
29
|
-
preHref: "https://wiki.tita.com/x/
|
|
30
|
-
isNew:
|
|
31
|
-
date: "3/
|
|
28
|
+
preContent: "「OKR 工作法」体验优化 ",
|
|
29
|
+
preHref: "https://wiki.tita.com/x/jIOeAQ",
|
|
30
|
+
isNew: false,
|
|
31
|
+
date: "3/29"
|
|
32
32
|
}, {
|
|
33
33
|
hasOnline: true,
|
|
34
34
|
preContent: "「考核」支持建立企业指标库",
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -37,7 +37,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
37
37
|
|
|
38
38
|
var preCls = "tita-okrdt-tree";
|
|
39
39
|
|
|
40
|
-
function
|
|
40
|
+
var EPriority = function EPriority(props) {
|
|
41
41
|
var onChange = props.onChange,
|
|
42
42
|
checked = props.checked,
|
|
43
43
|
hasAuth = props.hasAuth,
|
|
@@ -50,7 +50,10 @@ function _default(props) {
|
|
|
50
50
|
|
|
51
51
|
var onMenuClickHandler = function onMenuClickHandler(name) {
|
|
52
52
|
setLevel(name);
|
|
53
|
-
|
|
53
|
+
|
|
54
|
+
if (onChange) {
|
|
55
|
+
onChange(name);
|
|
56
|
+
}
|
|
54
57
|
};
|
|
55
58
|
|
|
56
59
|
(0, _react.useEffect)(function () {
|
|
@@ -72,7 +75,7 @@ function _default(props) {
|
|
|
72
75
|
name: "2"
|
|
73
76
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
74
77
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p2 ").concat(preCls, "__e-task-node-select-priority"))
|
|
75
|
-
}), (0, _getLocale.getLocale)("
|
|
78
|
+
}), (0, _getLocale.getLocale)("OKR_MyO_E_Butt_High")), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"].IconItem, {
|
|
76
79
|
name: "3"
|
|
77
80
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
78
81
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p3 ").concat(preCls, "__e-task-node-select-priority"))
|
|
@@ -85,4 +88,7 @@ function _default(props) {
|
|
|
85
88
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
86
89
|
className: (0, _classnames["default"])("".concat(preCls, "__e-task-node-priority-p5 ").concat(preCls, "__e-task-node-select-priority"))
|
|
87
90
|
}), (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Verylow")));
|
|
88
|
-
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var _default = EPriority;
|
|
94
|
+
exports["default"] = _default;
|
|
@@ -39,7 +39,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
39
39
|
|
|
40
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
41
|
|
|
42
|
-
var prefix =
|
|
42
|
+
var prefix = 'titaui-new-file-list-single-file';
|
|
43
43
|
|
|
44
44
|
var SingleFile = function SingleFile(_ref) {
|
|
45
45
|
var data = _ref.data,
|
|
@@ -75,24 +75,24 @@ var SingleFile = function SingleFile(_ref) {
|
|
|
75
75
|
}, isMouseEnter && /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
76
|
className: "".concat(prefix, "__operate"),
|
|
77
77
|
onMouseLeave: handleMouseLeave
|
|
78
|
-
},
|
|
78
|
+
}, showDownload && /*#__PURE__*/_react["default"].createElement("a", {
|
|
79
|
+
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__not-preview"), !canPreview || !data.previewUrl)),
|
|
80
|
+
href: data.downloadUrl
|
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
82
|
+
className: (0, _classnames["default"])('tu-icon-APP-xiazai', "".concat(prefix, "__operate-item-icon"))
|
|
83
|
+
}), (0, _getLocale.getLocale)('Mod_Download')), !isImg && canPreview && data.previewUrl && /*#__PURE__*/_react["default"].createElement("a", {
|
|
79
84
|
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__operate-item--only"), !showDownload)),
|
|
80
85
|
href: data.previewUrl,
|
|
81
86
|
target: "_blank",
|
|
82
87
|
rel: "noreferrer"
|
|
83
88
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
84
|
-
className: (0, _classnames["default"])(
|
|
85
|
-
}), (0, _getLocale.getLocale)(
|
|
89
|
+
className: (0, _classnames["default"])('tu-icon-yulan', "".concat(prefix, "__operate-item-icon"))
|
|
90
|
+
}), (0, _getLocale.getLocale)('Mod_Preview')), isImg && data.previewUrl && /*#__PURE__*/_react["default"].createElement("a", {
|
|
86
91
|
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__operate-item--only"), !showDownload)),
|
|
87
92
|
onClick: handlePreviewImg
|
|
88
93
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
89
|
-
className: (0, _classnames["default"])(
|
|
90
|
-
}), (0, _getLocale.getLocale)(
|
|
91
|
-
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__not-preview"), !canPreview || !data.previewUrl)),
|
|
92
|
-
href: data.downloadUrl
|
|
93
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
94
|
-
className: (0, _classnames["default"])("tu-icon-APP-xiazai", "".concat(prefix, "__operate-item-icon"))
|
|
95
|
-
}), (0, _getLocale.getLocale)("Mod_Download"))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
94
|
+
className: (0, _classnames["default"])('tu-icon-yulan', "".concat(prefix, "__operate-item-icon"))
|
|
95
|
+
}), (0, _getLocale.getLocale)('Mod_Preview'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
96
|
className: (0, _classnames["default"])("".concat(prefix, "__file-preview")),
|
|
97
97
|
onMouseEnter: handleMouseEnter,
|
|
98
98
|
style: {
|