@giteeteam/apps-team-components 1.0.20 → 1.0.22
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.
|
@@ -7,7 +7,7 @@ import useAntdConfig from '../../../lib/hooks/useAntdConfig';
|
|
|
7
7
|
import useI18n from '../../../lib/hooks/useI18n';
|
|
8
8
|
import EmptyField from '../../common/EmptyField';
|
|
9
9
|
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
|
|
10
|
-
import { cellBoxStyle, colorIconStyle, downIconStyle, emptyIconStyle, emptyStyle, emptyTextStyle } from './style';
|
|
10
|
+
import { cellBoxStyle, colorIconStyle, downIconStyle, emptyIconStyle, emptyStyle, emptyTextStyle, headerCellStyle, } from './style';
|
|
11
11
|
const PriorityReadView = memo(({ value, options, readonly, apply }) => {
|
|
12
12
|
const { t } = useI18n();
|
|
13
13
|
const { antPrefix } = useAntdConfig();
|
|
@@ -18,7 +18,7 @@ const PriorityReadView = memo(({ value, options, readonly, apply }) => {
|
|
|
18
18
|
});
|
|
19
19
|
}, []);
|
|
20
20
|
const showData = useMemo(() => { var _a; return (_a = filterData(options, value)) === null || _a === void 0 ? void 0 : _a[0]; }, [filterData, options, value]);
|
|
21
|
-
return (_jsx(_Fragment, { children: showData ? (_jsxs("div", { css: css(cellBoxStyle(antPrefix)), children: [_jsx(HollowCircleIcon, { css: css(colorIconStyle), style: { color: showData.color } }), _jsx(BaseOverflowTooltip, { title: showData.name, children: showData.name }), isFromHeader && _jsx(CaretDownOutlined, { css: css(downIconStyle) })] })) : !isFromHeader ? (_jsx("div", { css: css(emptyTextStyle), children: _jsx(EmptyField, { readonly: readonly }) })) : (_jsxs("div", { css: css(emptyStyle), children: [_jsx(DottedCircleIcon, { css: css(emptyIconStyle) }), t('pages.fields.view.noPriority')] })) }));
|
|
21
|
+
return (_jsx(_Fragment, { children: showData ? (_jsxs("div", { css: css(cellBoxStyle(antPrefix), headerCellStyle), children: [_jsx(HollowCircleIcon, { css: css(colorIconStyle), style: { color: showData.color } }), _jsx(BaseOverflowTooltip, { title: showData.name, children: showData.name }), isFromHeader && _jsx(CaretDownOutlined, { css: css(downIconStyle) })] })) : !isFromHeader ? (_jsx("div", { css: css(emptyTextStyle), children: _jsx(EmptyField, { readonly: readonly }) })) : (_jsxs("div", { css: css(emptyStyle), children: [_jsx(DottedCircleIcon, { css: css(emptyIconStyle) }), t('pages.fields.view.noPriority')] })) }));
|
|
22
22
|
});
|
|
23
23
|
PriorityReadView.displayName = 'PriorityReadView';
|
|
24
24
|
export default PriorityReadView;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const cellBoxStyle: (antPrefix: string) => string;
|
|
2
|
+
export declare const headerCellStyle = "\n max-width: 120px;\n height: 24px;\n padding: 0 8px;\n font-size: 12px;\n font-weight: 600;\n line-height: 24px;\n color: #213053;\n text-align: center;\n background-color: #f5f6f8;\n border-radius: 4px;\n";
|
|
2
3
|
export declare const emptyTextStyle = "\n display: flex;\n align-items: center;\n width: 100%;\n height: 100%;\n";
|
|
3
|
-
export declare const colorIconStyle = "\n margin-right: 5px;\n font-size:
|
|
4
|
+
export declare const colorIconStyle = "\n margin-right: 5px;\n font-size: 10px;\n";
|
|
4
5
|
export declare const emptyStyle = "\n color: #909aaa;\n";
|
|
5
|
-
export declare const emptyIconStyle = "\n margin-right: 5px;\n font-size: 12px;\n";
|
|
6
|
+
export declare const emptyIconStyle = "\n margin-right: 5px;\n font-size: 12px!important;\n width: 12px!important;\n margin-left: 0!important;\n";
|
|
6
7
|
export declare const downIconStyle = "\n margin-left: 2px;\n\n svg {\n vertical-align: inherit;\n }\n";
|
|
@@ -18,6 +18,18 @@ export const cellBoxStyle = (antPrefix) => `
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
`;
|
|
21
|
+
export const headerCellStyle = `
|
|
22
|
+
max-width: 120px;
|
|
23
|
+
height: 24px;
|
|
24
|
+
padding: 0 8px;
|
|
25
|
+
font-size: 12px;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
line-height: 24px;
|
|
28
|
+
color: #213053;
|
|
29
|
+
text-align: center;
|
|
30
|
+
background-color: #f5f6f8;
|
|
31
|
+
border-radius: 4px;
|
|
32
|
+
`;
|
|
21
33
|
export const emptyTextStyle = `
|
|
22
34
|
display: flex;
|
|
23
35
|
align-items: center;
|
|
@@ -26,14 +38,16 @@ export const emptyTextStyle = `
|
|
|
26
38
|
`;
|
|
27
39
|
export const colorIconStyle = `
|
|
28
40
|
margin-right: 5px;
|
|
29
|
-
font-size:
|
|
41
|
+
font-size: 10px;
|
|
30
42
|
`;
|
|
31
43
|
export const emptyStyle = `
|
|
32
44
|
color: ${fieldLabelColor};
|
|
33
45
|
`;
|
|
34
46
|
export const emptyIconStyle = `
|
|
35
47
|
margin-right: 5px;
|
|
36
|
-
font-size: 12px;
|
|
48
|
+
font-size: 12px!important;
|
|
49
|
+
width: 12px!important;
|
|
50
|
+
margin-left: 0!important;
|
|
37
51
|
`;
|
|
38
52
|
export const downIconStyle = `
|
|
39
53
|
margin-left: 2px;
|
|
@@ -130,7 +130,12 @@ const TransitionPanel = ({ itemId, itemType, workspace, objectId, onTransitionSu
|
|
|
130
130
|
let messageText = '';
|
|
131
131
|
try {
|
|
132
132
|
const data = JSON.parse(e.message);
|
|
133
|
-
|
|
133
|
+
if (typeof data === 'string' || typeof data === 'number') {
|
|
134
|
+
messageText = `, ${data}`;
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
Object.keys(data).forEach(k => (messageText += `, ${data[k]}`));
|
|
138
|
+
}
|
|
134
139
|
}
|
|
135
140
|
catch (pe) {
|
|
136
141
|
messageText = ', ' + e.message;
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@giteeteam/apps-team-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22",
|
|
4
4
|
"description": "Gitee team components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"prepare": "husky install",
|
|
8
|
+
"prepare": "husky install && pnpm build",
|
|
9
9
|
"build": "rm -rf dist && tsc && cp -r src/icons/svg dist/icons/svg",
|
|
10
10
|
"publish:alpha": "pnpm prepublish && npm publish --tag alpha",
|
|
11
11
|
"prepack": "pnpm build",
|
|
12
12
|
"prepublish": "pnpm build",
|
|
13
|
+
"prepublishOnly": "pnpm build",
|
|
13
14
|
"lint": "eslint . --ext ts --ext tsx --ext js --ext json",
|
|
14
15
|
"pre-commit": "lint-staged",
|
|
15
16
|
"husky": "husky"
|