@titaui/pc 1.9.78 → 1.9.80
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/.eslintrc.js +6 -4
- package/lib/components/change-okr-modal/Filter.js +1 -1
- package/lib/components/change-okr-modal/Item.js +27 -25
- package/lib/components/change-okr-modal/filterTab.js +1 -1
- package/lib/components/change-okr-modal/index.js +1 -1
- package/lib/components/change-okr-modal/styledComponents.js +5 -5
- package/lib/components/communication/CommunicationAttachments.js +1 -1
- package/lib/components/communication/ConvertUserName.js +1 -1
- package/lib/components/communication/index.js +1 -1
- package/lib/components/create-okr-modal/objectType.js +1 -1
- package/lib/components/date-picker/BodyItem.js +1 -1
- package/lib/components/date-picker/CalendarBody.js +1 -1
- package/lib/components/date-picker/CalendarHeader.js +1 -1
- package/lib/components/date-picker/index.js +1 -1
- package/lib/components/date-range-picker/index.js +1 -1
- package/lib/components/delete-confirm-pop/ConfirmPop.js +1 -1
- package/lib/components/eReport/eReportListEmpty.js +1 -1
- package/lib/components/eReport/eReportLists/reportList.js +1 -1
- package/lib/components/eReport/eReportShare/index.js +1 -1
- package/lib/components/eReport/eReportShare/toast/index.js +1 -1
- package/lib/components/edit-kr-wight/EditKrWightModal.js +1 -1
- package/lib/components/edit-kr-wight/FormItemV2.js +1 -1
- package/lib/components/emotions-selector/selector-content.js +1 -1
- package/lib/components/emotions-selector/selector-pop.js +1 -1
- package/lib/components/ereport-list/index.js +1 -1
- package/lib/components/error-boundary/index.js +1 -1
- package/lib/components/mblog/components/ConfirmPop.js +1 -1
- package/lib/components/mblog/components/MblogAction.js +1 -1
- package/lib/components/mblog/components/MblogContent.js +1 -1
- package/lib/components/mblog/index.js +1 -1
- package/lib/components/mblog/style.js +2 -2
- package/lib/components/okr-detail/auth.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/confirm/buttonv2.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/object-type.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +1 -1
- package/lib/components/okr-detail/detail-header/confirm.js +2 -1
- package/lib/components/okr-detail/detail-header/index.js +13 -10
- package/lib/components/okr-flow/export-modal/index.js +38 -62
- package/lib/components/okr-progress-modal/helper.js +59 -45
- package/lib/components/okr-progress-modal/index.js +19 -14
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +1 -1
- package/lib/components/okr-review/ReviewPop/components/Toast/index.js +1 -1
- package/lib/components/okr-review/ReviewPop/index.js +1 -1
- package/lib/components/okr-review/components/ReviewItem/index.js +1 -1
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +1 -1
- package/lib/components/okr-review/index.js +1 -1
- package/lib/components/okr-share/index.js +7 -2
- package/lib/components/operation-records/OperationRecordItem.js +1 -1
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/point-demo/input/index.js +1 -1
- package/lib/components/praise-record/PraiseRecordItem.js +1 -1
- package/lib/components/praise-record/index.js +1 -1
- package/lib/components/range-picker-pop/index.js +1 -1
- package/lib/components/range-selector-pop/RangeList.js +1 -1
- package/lib/components/range-selector-pop/RangeSelectorPop.js +1 -1
- package/lib/components/select/Option.js +1 -1
- package/lib/components/select/index.js +1 -1
- package/lib/components/tita-chart/errorBoundary/index.js +1 -1
- package/lib/components/upload/components/uploadedPreview.js +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/viewer/ImageListRender.js +1 -1
- package/lib/components/viewer/index.js +1 -1
- package/lib/components-v1/animate/AnimateChild.js +1 -1
- package/lib/components-v1/animate/animate.js +1 -1
- package/lib/components-v1/avatar/index.js +1 -1
- package/lib/components-v1/buttonv2/ButtonOutlined.js +1 -1
- package/lib/components-v1/buttonv2/ButtonRounded.js +1 -1
- package/lib/components-v1/buttonv2/DefaultButton.js +1 -1
- package/lib/components-v1/confirm/index.js +1 -1
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +1 -1
- package/lib/components-v1/dropDownSelector/dropDownSelector.js +1 -1
- package/lib/components-v1/input/Input.js +1 -1
- package/lib/components-v1/input/InputNumber.js +1 -1
- package/lib/components-v1/placement/placement.js +1 -1
- package/lib/components-v1/placement/placementInner.js +1 -1
- package/lib/components-v1/pop/Pop.js +1 -1
- package/lib/components-v1/pop/PopInner.js +1 -1
- package/lib/components-v1/portals/Portals.js +1 -1
- package/lib/components-v1/progress/CircleProgress.js +1 -1
- package/lib/components-v1/progress/LineProgress.js +1 -1
- package/lib/components-v1/progress/index.js +1 -1
- package/lib/components-v1/radio/radio.js +1 -1
- package/lib/components-v1/radio/radioGroup.js +1 -1
- package/lib/components-v1/search/index.js +1 -1
- package/lib/components-v1/select/Option.js +1 -1
- package/lib/components-v1/select/index.js +1 -1
- package/lib/components-v1/tabs/index.js +1 -1
- package/lib/components-v1/textarea/index.js +1 -1
- package/lib/components-v1/transition/index.js +1 -1
- package/lib/components-v1/userSelector/UserSelectorPop.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentTree.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/index.js +1 -1
- package/lib/components-v1/userSelector/components/SearchBar.js +1 -1
- package/lib/components-v1/userSelector/components/SingleMode.js +1 -1
- package/lib/components-v1/userSelector/components/UserItem.js +1 -1
- package/lib/components-v1/userSelector/index.js +1 -1
- package/lib/pages/appointment-demo/input/index.js +1 -1
- package/lib/pages/group-management/components/input-form/index.js +1 -1
- package/lib/utils/auth.js +1 -1
- package/package.json +2 -1
- package/src/components/change-okr-modal/Item.tsx +22 -22
- package/src/components/change-okr-modal/styledComponents.ts +11 -5
- package/src/components/mblog/style.ts +4 -1
- package/src/components/okr-detail/detail-header/confirm.tsx +1 -1
- package/src/components/okr-detail/detail-header/index.tsx +19 -13
- package/src/components/okr-flow/export-modal/index.tsx +37 -50
- package/src/components/okr-progress-modal/helper.js +49 -41
- package/src/components/okr-progress-modal/index.tsx +17 -16
- package/src/components/okr-share/index.tsx +9 -4
- package/yarn-error.log +103 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React, { useEffect, useState } from "react";
|
|
1
|
+
import React, { useEffect, useState, FC } from "react";
|
|
2
2
|
import { Input, Modal, Tooltip } from "tita-ui";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { getKrRecommandProgress, getORecommandProgress } from "./request-apis";
|
|
5
5
|
import Switch from "../switch";
|
|
6
6
|
import Textarea from "./textarea";
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
getOSetting, getKrSetting, transProgress, getKrOptions, getOptions,
|
|
9
9
|
} from "./helper";
|
|
10
10
|
import {
|
|
11
11
|
ErrorTip, List, Item, Icon, Options, OptionsWrapper,
|
|
@@ -15,12 +15,12 @@ import { getLocale } from "../../utils/getLocale";
|
|
|
15
15
|
import { inputWordTrans } from "../../utils/i18n-front-translate";
|
|
16
16
|
import "./index.scss";
|
|
17
17
|
|
|
18
|
-
const ProgressModal:
|
|
18
|
+
const ProgressModal: FC<IProgressModalProps> = (props:IProgressModalProps) => {
|
|
19
19
|
const {
|
|
20
20
|
maxLength, okrInfo, onClose, onOk, title = window.getLocale("OKR_MyO_Prog_Butt_Update"), visible, isKr,
|
|
21
21
|
} = props;
|
|
22
22
|
|
|
23
|
-
const configure = isKr ?
|
|
23
|
+
const configure = isKr ? getKrSetting() : getOSetting();
|
|
24
24
|
|
|
25
25
|
const reg = /^[0-9]*[1-9][0-9]*$/;
|
|
26
26
|
const [errorProgress, setErrorProgress] = useState(false);
|
|
@@ -34,10 +34,7 @@ const ProgressModal: React.FC<IProgressModalProps> = (props) => {
|
|
|
34
34
|
const [selected, setSelected] = useState<number>(
|
|
35
35
|
isKr ? okrInfo.riskLevel : okrInfo.manualRiskLevel,
|
|
36
36
|
);
|
|
37
|
-
const [ShowKrProgress] = useState(
|
|
38
|
-
// @ts-ignore
|
|
39
|
-
window.BSGlobal.OkrAdvancedSetting.KRSetting.ShowKrProgress);
|
|
40
|
-
|
|
37
|
+
const [ShowKrProgress] = useState(window?.BSGlobal?.OkrAdvancedSetting?.KRSetting?.ShowKrProgress);
|
|
41
38
|
const [autoUpdate, setUpdate] = useState(true); // 设置自动更新
|
|
42
39
|
const [updateWay, setUpdateWay] = useState(0); // 自动更新方式 0: 关闭, 1: 根据关见成果, 2: 子目标
|
|
43
40
|
const [settingFolded, setSettingFold] = useState(false);
|
|
@@ -46,11 +43,11 @@ const ProgressModal: React.FC<IProgressModalProps> = (props) => {
|
|
|
46
43
|
const getRecommendProgress = async () => {
|
|
47
44
|
const getRecommandHandler = isKr ? getKrRecommandProgress : getORecommandProgress;
|
|
48
45
|
const data = await getRecommandHandler(isKr ? okrInfo.mileStoneId : okrInfo.workId);
|
|
49
|
-
if (data.Code
|
|
46
|
+
if (data.Code === 1) {
|
|
50
47
|
const { UpdateProgressWay, Progress } = data.Data;
|
|
51
48
|
setRecommandProgressObj(data.Data);
|
|
52
|
-
setUpdate(UpdateProgressWay
|
|
53
|
-
setUpdateWay(UpdateProgressWay
|
|
49
|
+
setUpdate(UpdateProgressWay !== 0);
|
|
50
|
+
setUpdateWay(UpdateProgressWay === 0 ? 1 : UpdateProgressWay);
|
|
54
51
|
setProgress(Progress);
|
|
55
52
|
}
|
|
56
53
|
};
|
|
@@ -66,9 +63,12 @@ const ProgressModal: React.FC<IProgressModalProps> = (props) => {
|
|
|
66
63
|
useEffect(() => {
|
|
67
64
|
if (!autoUpdate) return;
|
|
68
65
|
const { childOkrProgress, childkrProgress, childEProgress } = recommandProgressObj;
|
|
69
|
-
updateWay
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
if (updateWay === 1) {
|
|
67
|
+
setProgress(isKr ? transProgress(childEProgress) : transProgress(childkrProgress));
|
|
68
|
+
}
|
|
69
|
+
if (updateWay === 2) {
|
|
70
|
+
setProgress(transProgress(childOkrProgress));
|
|
71
|
+
}
|
|
72
72
|
}, [updateWay, autoUpdate, recommandProgressObj]);
|
|
73
73
|
|
|
74
74
|
let descriptionText = (
|
|
@@ -131,6 +131,7 @@ const ProgressModal: React.FC<IProgressModalProps> = (props) => {
|
|
|
131
131
|
title={title}
|
|
132
132
|
visible={visible}
|
|
133
133
|
width={600}
|
|
134
|
+
zIndex={2400}
|
|
134
135
|
>
|
|
135
136
|
<List>
|
|
136
137
|
<Item>
|
|
@@ -165,7 +166,7 @@ const ProgressModal: React.FC<IProgressModalProps> = (props) => {
|
|
|
165
166
|
<Icon
|
|
166
167
|
color={option.color}
|
|
167
168
|
className={
|
|
168
|
-
selected
|
|
169
|
+
selected === option.id ? "tu-icon-singlebox-avtive" : "tu-icon-singlebox-have"
|
|
169
170
|
}
|
|
170
171
|
/>
|
|
171
172
|
<p>{option.text}</p>
|
|
@@ -195,7 +196,7 @@ const ProgressModal: React.FC<IProgressModalProps> = (props) => {
|
|
|
195
196
|
<span
|
|
196
197
|
className={classNames(
|
|
197
198
|
"auto-update-setting__radio",
|
|
198
|
-
`auto-update-setting__radio${updateWay
|
|
199
|
+
`auto-update-setting__radio${updateWay === option.key ? "--selected" : ""
|
|
199
200
|
}`,
|
|
200
201
|
)}
|
|
201
202
|
/>
|
|
@@ -11,7 +11,7 @@ interface Props {
|
|
|
11
11
|
data: any;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const ShareContent =
|
|
14
|
+
const ShareContent = ({ closeModal, getModalRef, data }: Props) => {
|
|
15
15
|
const [shareImg, setShareImg] = useState<string>();
|
|
16
16
|
const [showPublish, setShowPublish] = useState(false);
|
|
17
17
|
return (
|
|
@@ -43,12 +43,14 @@ const ShareContent = function ({ closeModal, getModalRef, data }: Props) {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
interface ShareProps {
|
|
46
|
-
shareComponent
|
|
47
46
|
data: any;
|
|
48
47
|
visible:boolean;
|
|
48
|
+
zIndex?: number;
|
|
49
49
|
onClose: () => void
|
|
50
50
|
}
|
|
51
|
-
const OkrShare: React.FC<ShareProps> = ({
|
|
51
|
+
const OkrShare: React.FC<ShareProps> = ({
|
|
52
|
+
data, visible, onClose, zIndex,
|
|
53
|
+
}) => {
|
|
52
54
|
const modalRef = useRef<any>();
|
|
53
55
|
|
|
54
56
|
return (
|
|
@@ -60,6 +62,7 @@ const OkrShare: React.FC<ShareProps> = ({ data, visible, onClose }) => {
|
|
|
60
62
|
// maskClosable
|
|
61
63
|
onCancel={() => onClose()}
|
|
62
64
|
ref={modalRef}
|
|
65
|
+
zIndex={zIndex}
|
|
63
66
|
>
|
|
64
67
|
{visible ? (
|
|
65
68
|
<ShareContent
|
|
@@ -71,5 +74,7 @@ const OkrShare: React.FC<ShareProps> = ({ data, visible, onClose }) => {
|
|
|
71
74
|
</Modal>
|
|
72
75
|
);
|
|
73
76
|
};
|
|
74
|
-
|
|
77
|
+
OkrShare.defaultProps = {
|
|
78
|
+
zIndex: 1300,
|
|
79
|
+
};
|
|
75
80
|
export default OkrShare;
|
package/yarn-error.log
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
Arguments:
|
|
2
|
+
/usr/local/bin/node /usr/local/bin/yarn
|
|
3
|
+
|
|
4
|
+
PATH:
|
|
5
|
+
/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/opt/homebrew/bin:/opt/homebrew/sbin
|
|
6
|
+
|
|
7
|
+
Yarn version:
|
|
8
|
+
1.22.10
|
|
9
|
+
|
|
10
|
+
Node version:
|
|
11
|
+
12.22.1
|
|
12
|
+
|
|
13
|
+
Platform:
|
|
14
|
+
darwin x64
|
|
15
|
+
|
|
16
|
+
Trace:
|
|
17
|
+
SyntaxError: /Users/yang/tita/titaui-pc/package.json: Unexpected token < in JSON at position 26
|
|
18
|
+
at JSON.parse (<anonymous>)
|
|
19
|
+
at /usr/local/lib/node_modules/yarn/lib/cli.js:1625:59
|
|
20
|
+
at Generator.next (<anonymous>)
|
|
21
|
+
at step (/usr/local/lib/node_modules/yarn/lib/cli.js:310:30)
|
|
22
|
+
at /usr/local/lib/node_modules/yarn/lib/cli.js:321:13
|
|
23
|
+
|
|
24
|
+
npm manifest:
|
|
25
|
+
{
|
|
26
|
+
"name": "@titaui/pc",
|
|
27
|
+
<<<<<<< HEAD
|
|
28
|
+
"version": "1.2.22",
|
|
29
|
+
=======
|
|
30
|
+
"version": "1.2.13",
|
|
31
|
+
>>>>>>> master
|
|
32
|
+
"nameCN": "",
|
|
33
|
+
"description": "",
|
|
34
|
+
"main": "src/index.js",
|
|
35
|
+
"scripts": {
|
|
36
|
+
"storybook": "start-storybook -p 6006 --no-dll",
|
|
37
|
+
"start": "dev_server=on webpack-dev-server --disableHostCheck=true --progress --colors --config webpack-stories.config.js",
|
|
38
|
+
"build-storybook": "build-storybook --docs --no-dll",
|
|
39
|
+
"build:es": "babel src -d es --ignore **/__tests__",
|
|
40
|
+
"build:lib": "cross-env OUTPUT_MODULE=commonjs babel src -d lib --ignore **/__tests__",
|
|
41
|
+
"build:umd": "webpack --config ./.scripts/webpack.umd.js",
|
|
42
|
+
"build": "npm run build:lib && npm run build:es && npm run build:umd"
|
|
43
|
+
},
|
|
44
|
+
"author": "",
|
|
45
|
+
"license": "ISC",
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"del": "^6.0.0",
|
|
48
|
+
"gulp": "^3.x",
|
|
49
|
+
"gulp-autoprefixer": "^7.0.1",
|
|
50
|
+
"gulp-babel": "^8.0.0",
|
|
51
|
+
"gulp-concat": "^2.6.1",
|
|
52
|
+
"gulp-cssbeautify": "^3.0.0",
|
|
53
|
+
"gulp-cssnano": "^2.1.3",
|
|
54
|
+
"gulp-filesize": "0.0.6",
|
|
55
|
+
"gulp-postcss": "^9.0.0",
|
|
56
|
+
"gulp-rename": "^2.0.0",
|
|
57
|
+
"gulp-replace": "^1.0.0",
|
|
58
|
+
"gulp-sass": "^4.1.0",
|
|
59
|
+
"gulp-sourcemaps": "^2.6.5",
|
|
60
|
+
"sass-resources-loader": "^2.2.1"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@titaui/dagre": "^0.8.8-pre",
|
|
64
|
+
"@titaui/rc-tree2": "^4.1.15",
|
|
65
|
+
"@titaui/rc-trigger": "^5.2.5",
|
|
66
|
+
"@titaui/react-flow-renderer": "9.5.4",
|
|
67
|
+
"@titaui/toast": "^1.0.0",
|
|
68
|
+
"axios": "^0.21.1",
|
|
69
|
+
"classnames": "^2.2.6",
|
|
70
|
+
"clone-deep": "^4.0.1",
|
|
71
|
+
"d3-cloud": "^1.2.5",
|
|
72
|
+
"dayjs": "^1.10.4",
|
|
73
|
+
"html2canvas": "^1.0.0-rc.7",
|
|
74
|
+
"moment": "^2.29.1",
|
|
75
|
+
"qs": "^6.10.1",
|
|
76
|
+
"rc-checkbox": "^2.3.2",
|
|
77
|
+
"rc-dialog": "8.5.2",
|
|
78
|
+
"rc-drawer": "^4.3.1",
|
|
79
|
+
"rc-input-number": "^5.0.0",
|
|
80
|
+
"rc-pagination": "^3.1.6",
|
|
81
|
+
"rc-queue-anim": "1.4.1",
|
|
82
|
+
"rc-select": "^12.1.7",
|
|
83
|
+
"rc-switch": "^3.2.2",
|
|
84
|
+
"rc-table": "^7.13.2",
|
|
85
|
+
"rc-tabs": "^11.7.3",
|
|
86
|
+
"rc-tooltip": "^5.1.1",
|
|
87
|
+
"rc-tree": "^4.1.5",
|
|
88
|
+
"rc-trigger": "^5.2.3",
|
|
89
|
+
"rc-upload": "^4.2.0-alpha.0",
|
|
90
|
+
"rc-util": "^5.13.1",
|
|
91
|
+
"react-collapse": "^5.1.0",
|
|
92
|
+
"react-perfect-scrollbar": "^1.5.2",
|
|
93
|
+
"url-parse": "^1.5.1",
|
|
94
|
+
"uuid": "^3.1.0",
|
|
95
|
+
"wordcloud": "^1.2.2"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
yarn manifest:
|
|
100
|
+
No manifest
|
|
101
|
+
|
|
102
|
+
Lockfile:
|
|
103
|
+
No lockfile
|