@titaui/pc 1.7.65 → 1.7.69
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.css +3 -3
- package/lib/components/button/rect-btn/index.js +3 -1
- package/lib/components/dynamic/constant.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/img/okrs-icon.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +86 -0
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +107 -0
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/img/plan-icon.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +86 -0
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +107 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/jiantou-right@3x.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/user-photo.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.css +77 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.js +110 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +3 -1
- package/lib/components/dynamic/quick-operation/index.js +2 -1
- package/lib/components/dynamic/util.js +10 -0
- package/lib/components/nav-top/index.js +2 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/weight-input.js +3 -2
- package/lib/components/tooltip/index.css +1 -1
- package/lib/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.css +0 -1
- package/lib/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.js +8 -3
- package/lib/components/version-change-modal/index.js +1 -1
- package/lib/components/weekly-report/common-painter/openDataPainter.js +3 -3
- package/lib/index.js +8 -0
- package/lib/pages/new-okr-list/header/comments.js +1 -1
- package/lib/utils/mblog.js +2 -1
- package/package.json +1 -1
- package/src/components/button/rect-btn/index.scss +3 -3
- package/src/components/button/rect-btn/index.tsx +3 -1
- package/src/components/button/types.ts +1 -0
- package/src/components/dynamic/constant.ts +3 -1
- package/src/components/dynamic/dynamic-item/dynamic-okrs-communication/img/okrs-icon.png +0 -0
- package/src/components/dynamic/dynamic-item/dynamic-okrs-communication/index.scss +77 -0
- package/src/components/dynamic/dynamic-item/dynamic-okrs-communication/index.tsx +81 -0
- package/src/components/dynamic/dynamic-item/dynamic-plan-communication/img/plan-icon.png +0 -0
- package/src/components/dynamic/dynamic-item/dynamic-plan-communication/index.scss +77 -0
- package/src/components/dynamic/dynamic-item/dynamic-plan-communication/index.tsx +81 -0
- package/src/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/jiantou-right@3x.png +0 -0
- package/src/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/user-photo.png +0 -0
- package/src/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.scss +72 -0
- package/src/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.tsx +82 -0
- package/src/components/dynamic/dynamic-item/dynamic-task/index.tsx +2 -1
- package/src/components/dynamic/quick-operation/index.tsx +3 -1
- package/src/components/dynamic/util.ts +8 -0
- package/src/components/nav-top/index.tsx +2 -1
- package/src/components/okr-detail/components/okr-tree/tree-node/o-child-node/weight-input.tsx +3 -2
- package/src/components/tooltip/index.scss +1 -1
- package/src/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.js +2 -1
- package/src/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.scss +0 -1
- package/src/components/version-change-modal/index.tsx +1 -1
- package/src/components/weekly-report/common-painter/openDataPainter.ts +2 -2
- package/src/index.js +1 -0
- package/src/pages/new-okr-list/header/comments.tsx +1 -2
- package/src/utils/mblog.js +2 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React, { FC, useContext, useMemo, Fragment, useEffect, useRef } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { IDynamicItemContentProps } from "../../interface";
|
|
4
|
+
import LeftQuotoSvg from "../../img/dynamic-left-quoto.svg";
|
|
5
|
+
import { SearchKeyContext } from "../../context";
|
|
6
|
+
import DynamicItemHeader from "../components/header";
|
|
7
|
+
import DangerousHtml from "../../components/dangerous-html";
|
|
8
|
+
import { getFeedTypeAndTypeColor } from "../../util";
|
|
9
|
+
import { highLightWord } from '../../../../utils/tools';
|
|
10
|
+
import Photo from './img/user-photo.png'
|
|
11
|
+
import "./index.scss";
|
|
12
|
+
|
|
13
|
+
const prefix = "titaui-dynamic-share-to-dynamic";
|
|
14
|
+
|
|
15
|
+
const DynamicShare: FC<IDynamicItemContentProps> = ({
|
|
16
|
+
data,
|
|
17
|
+
hasDynamicOpereateAuth = false,
|
|
18
|
+
...restProps
|
|
19
|
+
}) => {
|
|
20
|
+
const { searchKeyWord } = useContext(SearchKeyContext);
|
|
21
|
+
const contentRef = useRef<any>();
|
|
22
|
+
const { feedTypeText, feedTypeColor } = getFeedTypeAndTypeColor(
|
|
23
|
+
data.feedType
|
|
24
|
+
);
|
|
25
|
+
const isPublisher = data.publishUser.userId === window.BSGlobal.loginUserInfo.Id;
|
|
26
|
+
|
|
27
|
+
const renderDesc = useMemo(() => {
|
|
28
|
+
return (
|
|
29
|
+
<Fragment>
|
|
30
|
+
<span className={prefix + "__operate-desc"}>分享了一篇文章</span>
|
|
31
|
+
<span
|
|
32
|
+
className={prefix + "-desc-operate-type"}
|
|
33
|
+
style={{ background: feedTypeColor }}
|
|
34
|
+
>
|
|
35
|
+
</span>
|
|
36
|
+
</Fragment>
|
|
37
|
+
);
|
|
38
|
+
}, []);
|
|
39
|
+
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
highLightWord({
|
|
42
|
+
parentDom: contentRef.current,
|
|
43
|
+
keyWord: searchKeyWord,
|
|
44
|
+
});
|
|
45
|
+
}, [data, searchKeyWord]);
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<div className={prefix}>
|
|
49
|
+
<DynamicItemHeader
|
|
50
|
+
data={data}
|
|
51
|
+
desc={renderDesc}
|
|
52
|
+
showDelete={hasDynamicOpereateAuth || isPublisher}
|
|
53
|
+
showTopping={hasDynamicOpereateAuth}
|
|
54
|
+
user={data.publishUser}
|
|
55
|
+
{...restProps}
|
|
56
|
+
/>
|
|
57
|
+
<div className={prefix + "__content"}>
|
|
58
|
+
<div>
|
|
59
|
+
<img
|
|
60
|
+
className={classNames(
|
|
61
|
+
prefix + "__content-quoto",
|
|
62
|
+
prefix + "__content-quoto--left"
|
|
63
|
+
)}
|
|
64
|
+
src={LeftQuotoSvg}
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
<div ref={contentRef}>
|
|
68
|
+
<DangerousHtml htmlText={"团队12312为当你把策划久别重逢后金"}/>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div className={classNames(`${prefix}__share`)}>
|
|
72
|
+
<img src={Photo} className={classNames(`${prefix}__share-img`)}/>
|
|
73
|
+
<div className={classNames(`${prefix}__share-right`)}>
|
|
74
|
+
<span className={classNames(`${prefix}__share-right-title`)}>团队如何开始 OKR 之旅?</span>
|
|
75
|
+
<span className={classNames(`${prefix}__share-right-content`)}>多年来,我有幸一直在创新和交付生命周期的所必经的阶段上工作。无论是在战略、产品还是交付阶段,我都发觉,如何确保将从最初的想法带入世界,对领导者来说是一个多么大的挑战。多年来,我有幸一直在创交ncmjdksncjndskjcndjsk无论是在战略、产品还是交付阶段,我都发觉,如何确保将无论是在战略、产品还是交付阶段,我都发觉,如何确保将无论是在战略、产品还是交付阶段,我都发觉,如何确保将无论是在战略、产品还是交付阶段,我都发觉,如何确保将无论是在战略、产品还是交付阶段,我都发觉,如何确保将无论是在战略、产品还是交付阶段,我都发觉,如何确保将无论是在战略、产品还是交付阶段,我都发觉,如何确保将如何确保将如何确保将如何确保将</span>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export default DynamicShare;
|
|
@@ -14,6 +14,7 @@ import SearchKeyHandle from "../../../search-key-handle";
|
|
|
14
14
|
import Tooltip from '../../../tooltip';
|
|
15
15
|
import { getFeedTypeAndTypeColor } from "../../util";
|
|
16
16
|
import drawerManager from "../../../drawer-manager";
|
|
17
|
+
import { htmlDecodeByRegExp } from '../../../../utils/mblog';
|
|
17
18
|
import "./index.scss";
|
|
18
19
|
|
|
19
20
|
const prefix = "titaui-dynamic-task-item";
|
|
@@ -79,7 +80,7 @@ const DynamicTask: FC<IDynamicItemContentProps> = ({ data, ...restProps }) => {
|
|
|
79
80
|
className={prefix + "__content-title-text"}
|
|
80
81
|
onClick={handleClickTaskTitle}
|
|
81
82
|
>
|
|
82
|
-
<SearchKeyHandle str={taskName} keyWord={searchKeyWord} />
|
|
83
|
+
<SearchKeyHandle str={htmlDecodeByRegExp(taskName)} keyWord={searchKeyWord} />
|
|
83
84
|
</span>
|
|
84
85
|
);
|
|
85
86
|
}, [taskName, searchKeyWord]);
|
|
@@ -22,7 +22,9 @@ const DynamicQuickOperation: FC<IDynamicQuickOperation> = ({
|
|
|
22
22
|
const hasDynamicAnnouncementAuth = new DynamicManagerAuth().hasAuth();
|
|
23
23
|
const createTaskDivRef = useRef(document.createElement("div"));
|
|
24
24
|
const isNewUI = getBSGlobal("tenantInfo").isNewIndex;
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
const newNavigation = getBSGlobal("newNavigation")||[]
|
|
27
|
+
const hasOKRApp = newNavigation.find(
|
|
26
28
|
(item) => item.appId === 113
|
|
27
29
|
);
|
|
28
30
|
|
|
@@ -57,6 +57,14 @@ export const getFeedTypeAndTypeColor = (feedType: number) => {
|
|
|
57
57
|
feedTypeText = "任务";
|
|
58
58
|
feedTypeColor = "linear-gradient(90deg, #0080FF 0%, #8FC7FF 100%)";
|
|
59
59
|
}
|
|
60
|
+
if (feedType === EFeedType.PlanCommunication) {
|
|
61
|
+
feedTypeText = "计划表";
|
|
62
|
+
feedTypeColor = "linear-gradient(90deg, #0080FF 0%, #8FC7FF 100%)";
|
|
63
|
+
}
|
|
64
|
+
if (feedType === EFeedType.OKRsCommunication) {
|
|
65
|
+
feedTypeText = "OKRs";
|
|
66
|
+
feedTypeColor = "linear-gradient(90deg, #2879FF 0%, #9FBFFF 100%)";
|
|
67
|
+
}
|
|
60
68
|
return {
|
|
61
69
|
feedTypeText,
|
|
62
70
|
feedTypeColor,
|
|
@@ -11,7 +11,8 @@ import "./index.scss";
|
|
|
11
11
|
import { rpost } from "../../utils/request";
|
|
12
12
|
import Toast from "../toast";
|
|
13
13
|
const Logo = getLogo();
|
|
14
|
-
const
|
|
14
|
+
const newNavigation = getBSGlobal("newNavigation")||[]
|
|
15
|
+
const hasOKRApp = newNavigation.find(
|
|
15
16
|
(item) => item.appId === 113
|
|
16
17
|
);
|
|
17
18
|
const preCls = "titaui-nav-top";
|
package/src/components/okr-detail/components/okr-tree/tree-node/o-child-node/weight-input.tsx
CHANGED
|
@@ -16,8 +16,9 @@ const WeightInput = (props: IProps) => {
|
|
|
16
16
|
|
|
17
17
|
const onChangeHandler = (e) => {
|
|
18
18
|
const currentValue = e.currentTarget.value;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const error = !/^(\d{1,2}(\.\d{1})?|100)$/g.test(currentValue);
|
|
20
|
+
setIsError(error);
|
|
21
|
+
onChange({ workId, value: currentValue, error });
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
const onBlurHandler = (e) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
+
import Tooltip from '../../../../tooltip';
|
|
3
4
|
import { OpenDepartmentName } from '../../../../../utils/open-data';
|
|
4
5
|
|
|
5
6
|
import './index.scss';
|
|
@@ -15,7 +16,7 @@ export default props => {
|
|
|
15
16
|
<span className="perspm-depart__icon" />
|
|
16
17
|
|
|
17
18
|
<span className="perspm-depart__name" title="">
|
|
18
|
-
<OpenDepartmentName id={data.id} name={data.name} />
|
|
19
|
+
<Tooltip.Text text={<OpenDepartmentName id={data.id} name={data.name} />} isPercent />
|
|
19
20
|
</span>
|
|
20
21
|
|
|
21
22
|
{!isSelectedPanel ? <span className={classNames(
|
|
@@ -10,7 +10,7 @@ import { getBSGlobal } from "../../utils/bs-global";
|
|
|
10
10
|
import { cancelGuide, setVersion } from "./request-api";
|
|
11
11
|
import { versionList, Versions } from "./constant";
|
|
12
12
|
import "./index.scss";
|
|
13
|
-
import { getTenantInfo } from "
|
|
13
|
+
import { getTenantInfo } from "../../utils/helpers";
|
|
14
14
|
|
|
15
15
|
const prefix = "titaui-version-change-modal";
|
|
16
16
|
|
package/src/index.js
CHANGED
|
@@ -65,6 +65,7 @@ export { default as TaskRelationModal } from "./components/task-relation-modal";
|
|
|
65
65
|
export { default as Tabs } from "./components/tabs";
|
|
66
66
|
export { default as TitaChart } from "./components/tita-chart";
|
|
67
67
|
export { default as Tooltip } from "./components/tooltip";
|
|
68
|
+
export { default as TooltipText } from './components/tooltip/tooltip-text';
|
|
68
69
|
export { default as UpdateModal } from "./components/update-modal";
|
|
69
70
|
export { default as upload } from "./components/upload";
|
|
70
71
|
export { default as Upvote } from "./components/upvote";
|
|
@@ -11,7 +11,6 @@ const Comments = (props) => {
|
|
|
11
11
|
const { OkrCommunicationPush, annualNum, cycleType, yqmNum } = useContext(
|
|
12
12
|
Context
|
|
13
13
|
);
|
|
14
|
-
|
|
15
14
|
const openComments = () => {
|
|
16
15
|
pushRef.current && pushRef.current.show();
|
|
17
16
|
};
|
|
@@ -41,7 +40,7 @@ const Comments = (props) => {
|
|
|
41
40
|
Id: userInfo.userId,
|
|
42
41
|
Name: userInfo.name,
|
|
43
42
|
Color: userInfo.avatar.color,
|
|
44
|
-
AvatarsUrl: userInfo.avatar.
|
|
43
|
+
AvatarsUrl: userInfo.avatar.original,
|
|
45
44
|
Type: 1,
|
|
46
45
|
}}
|
|
47
46
|
/>
|
package/src/utils/mblog.js
CHANGED
|
@@ -8,6 +8,7 @@ export function htmlEncodeByRegExp(str) {
|
|
|
8
8
|
temp = temp.replace(/\'/g, "'")
|
|
9
9
|
temp = temp.replace(/\"/g, """)
|
|
10
10
|
temp = temp.replace(/\n/g, "<br/>")
|
|
11
|
+
temp = temp.replace(/\+/g, "+")
|
|
11
12
|
return temp
|
|
12
13
|
}
|
|
13
14
|
|
|
@@ -20,6 +21,6 @@ export function htmlDecodeByRegExp(str) {
|
|
|
20
21
|
temp = temp.replace(/ /g, " ")
|
|
21
22
|
temp = temp.replace(/'/g, "\'")
|
|
22
23
|
temp = temp.replace(/"/g, "\"")
|
|
23
|
-
temp = temp.replace(
|
|
24
|
+
temp = temp.replace(/+/g, "+")
|
|
24
25
|
return temp
|
|
25
26
|
}
|