@giteeteam/apps-team-components 1.11.19 → 1.11.20-alpha.1
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/dist/components/fields/comment/ReadView.d.ts +6 -0
- package/dist/components/fields/comment/ReadView.js +29 -0
- package/dist/components/table-components/utils.js +2 -0
- package/dist/icons/index.js +1 -1
- package/dist/icons/style/index.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lib/global.d.ts +1 -0
- package/dist/lib/global.js +1 -0
- package/dist/locales/index.d.ts +6 -0
- package/dist/locales/index.js +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
import useI18n from '../../../lib/hooks/useI18n.js';
|
|
5
|
+
import { Icons } from '../../../icons/index.js';
|
|
6
|
+
|
|
7
|
+
const CommentReadViewStyle = css `
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
&:hover {
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
color: var(--color-brand-6);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&.add-comment {
|
|
16
|
+
color: var(--color-gray-7);
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
const CommentReadView = props => {
|
|
20
|
+
const { itemValues } = props;
|
|
21
|
+
const { t } = useI18n();
|
|
22
|
+
const commentCount = (itemValues === null || itemValues === void 0 ? void 0 : itemValues.commentCount) || 0;
|
|
23
|
+
const hasComment = commentCount > 0;
|
|
24
|
+
return (jsxs("span", { css: CommentReadViewStyle, className: hasComment ? '' : 'add-comment', children: [jsx(Icons.Comment, {}), jsx("span", { style: { marginLeft: '8px' }, children: hasComment ? t('fields.comment.count', { count: commentCount }) : t('fields.comment.add') })] }));
|
|
25
|
+
};
|
|
26
|
+
CommentReadView.displayName = 'CommentReadView';
|
|
27
|
+
var CommentReadView$1 = memo(CommentReadView);
|
|
28
|
+
|
|
29
|
+
export { CommentReadView$1 as default };
|
|
@@ -6,6 +6,7 @@ import BaseLineItemVersionReadView from '../fields/baseline-item-version/ReadVie
|
|
|
6
6
|
import BindWorkspaceReadView from '../fields/bind-workspace/ReadView.js';
|
|
7
7
|
import Cascade from '../fields/cascade/ReadView.js';
|
|
8
8
|
import CheckboxReadView from '../fields/checkbox/ReadView.js';
|
|
9
|
+
import CommentReadView from '../fields/comment/ReadView.js';
|
|
9
10
|
import CreatedAtReadView from '../fields/created-at/ReadView.js';
|
|
10
11
|
import CreatedByReadView from '../fields/created-by/ReadView.js';
|
|
11
12
|
import DataQuoteReadView from '../fields/data-quote/ReadView.js';
|
|
@@ -79,6 +80,7 @@ const getStandardReadComponents = () => {
|
|
|
79
80
|
[FIELD_TYPE_KEY_MAPPINGS.Workspace]: WorkspaceReadView,
|
|
80
81
|
[FIELD_TYPE_KEY_MAPPINGS.ItemLinkedStatistics]: TextReadView,
|
|
81
82
|
[FIELD_TYPE_KEY_MAPPINGS.Actors]: ActorReadView,
|
|
83
|
+
[FIELD_TYPE_KEY_MAPPINGS.Comment]: CommentReadView,
|
|
82
84
|
};
|
|
83
85
|
return standardReadComponents;
|
|
84
86
|
};
|
package/dist/icons/index.js
CHANGED
|
@@ -307,7 +307,7 @@ const CustomIconFont = React__default.memo(props => {
|
|
|
307
307
|
CustomIconFont.displayName = 'CustomIconFont';
|
|
308
308
|
const SingleColorIcon = ({ type, ...props }) => {
|
|
309
309
|
const { antPrefix } = useAntdConfig();
|
|
310
|
-
return (jsx(ClassNames, { children: ({ css, cx }) => (jsx("i", { ...props, className: cx('icon', css(proximaSingleColor(antPrefix)), `proxima-single-color-${type}`, props.className) })) }));
|
|
310
|
+
return (jsx(ClassNames, { children: ({ css, cx }) => (jsx("i", { ...props, className: cx('icon', css(proximaSingleColor(antPrefix)), 'proxima-single-color', `proxima-single-color-${type}`, props.className) })) }));
|
|
311
311
|
};
|
|
312
312
|
const Icons = [...MULTI_COLOR_KEYS, ...SIMPLE_COLOR_KEYS, ...Object.keys(ROTATE_ICONS)].reduce((res, key) => {
|
|
313
313
|
res[key] = ({ className, ...props }) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { default as AncestorReadView } from './components/fields/ancestor/ReadVi
|
|
|
8
8
|
export { default as AssigneeReadView } from './components/fields/assignee/ReadView';
|
|
9
9
|
export { default as BindWorkspaceReadView } from './components/fields/bind-workspace/ReadView';
|
|
10
10
|
export { default as CheckboxReadView } from './components/fields/checkbox/ReadView';
|
|
11
|
+
export { default as CommentReadView } from './components/fields/comment/ReadView';
|
|
11
12
|
export { default as CreatedAtReadView } from './components/fields/created-at/ReadView';
|
|
12
13
|
export { default as CreatedByReadView } from './components/fields/created-by/ReadView';
|
|
13
14
|
export { default as DataQuoteReadView } from './components/fields/data-quote/ReadView';
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export { default as AncestorReadView } from './components/fields/ancestor/ReadVi
|
|
|
8
8
|
export { default as AssigneeReadView } from './components/fields/assignee/ReadView.js';
|
|
9
9
|
export { default as BindWorkspaceReadView } from './components/fields/bind-workspace/ReadView.js';
|
|
10
10
|
export { default as CheckboxReadView } from './components/fields/checkbox/ReadView.js';
|
|
11
|
+
export { default as CommentReadView } from './components/fields/comment/ReadView.js';
|
|
11
12
|
export { default as CreatedAtReadView } from './components/fields/created-at/ReadView.js';
|
|
12
13
|
export { default as CreatedByReadView } from './components/fields/created-by/ReadView.js';
|
|
13
14
|
export { default as DataQuoteReadView } from './components/fields/data-quote/ReadView.js';
|
package/dist/lib/global.d.ts
CHANGED
package/dist/lib/global.js
CHANGED
package/dist/locales/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export declare const en: {
|
|
|
10
10
|
'date.week': string;
|
|
11
11
|
'date.month': string;
|
|
12
12
|
'date.year': string;
|
|
13
|
+
'fields.comment.count': string;
|
|
14
|
+
'fields.comment.add': string;
|
|
13
15
|
'pages.fields.default.toWorkspacePage': string;
|
|
14
16
|
'pages.fields.default.onlyWorkspace': string;
|
|
15
17
|
'pages.fields.default.getImageError': string;
|
|
@@ -81,6 +83,8 @@ export declare const zh: {
|
|
|
81
83
|
'date.week': string;
|
|
82
84
|
'date.month': string;
|
|
83
85
|
'date.year': string;
|
|
86
|
+
'fields.comment.count': string;
|
|
87
|
+
'fields.comment.add': string;
|
|
84
88
|
'pages.fields.default.toWorkspacePage': string;
|
|
85
89
|
'pages.fields.default.onlyWorkspace': string;
|
|
86
90
|
'pages.fields.default.getImageError': string;
|
|
@@ -152,6 +156,8 @@ export declare const ru: {
|
|
|
152
156
|
'date.week': string;
|
|
153
157
|
'date.month': string;
|
|
154
158
|
'date.year': string;
|
|
159
|
+
'fields.comment.count': string;
|
|
160
|
+
'fields.comment.add': string;
|
|
155
161
|
'pages.fields.default.toWorkspacePage': string;
|
|
156
162
|
'pages.fields.default.onlyWorkspace': string;
|
|
157
163
|
'pages.fields.default.getImageError': string;
|
package/dist/locales/index.js
CHANGED
|
@@ -10,6 +10,8 @@ const en = {
|
|
|
10
10
|
'date.week': 'Week',
|
|
11
11
|
'date.month': 'Month',
|
|
12
12
|
'date.year': 'Year',
|
|
13
|
+
'fields.comment.count': '{{count}} comment(s)',
|
|
14
|
+
'fields.comment.add': 'Add comment',
|
|
13
15
|
'pages.fields.default.toWorkspacePage': 'Click to enter the workspace',
|
|
14
16
|
'pages.fields.default.onlyWorkspace': 'Current Workspace',
|
|
15
17
|
'pages.fields.default.getImageError': 'Image acquisition failure',
|
|
@@ -81,6 +83,8 @@ const zh = {
|
|
|
81
83
|
'date.week': '周',
|
|
82
84
|
'date.month': '月',
|
|
83
85
|
'date.year': '年',
|
|
86
|
+
'fields.comment.count': '{{count}} 条评论',
|
|
87
|
+
'fields.comment.add': '添加评论',
|
|
84
88
|
'pages.fields.default.toWorkspacePage': '点击进入空间',
|
|
85
89
|
'pages.fields.default.onlyWorkspace': '只显示当前空间的{{name}}',
|
|
86
90
|
'pages.fields.default.getImageError': '图片获取失败',
|
|
@@ -152,6 +156,8 @@ const ru = {
|
|
|
152
156
|
'date.week': 'Неделя',
|
|
153
157
|
'date.month': 'Месяц',
|
|
154
158
|
'date.year': 'Год',
|
|
159
|
+
'fields.comment.count': '{{count}} комментариев',
|
|
160
|
+
'fields.comment.add': 'Добавить комментарий',
|
|
155
161
|
'pages.fields.default.toWorkspacePage': 'Нажмите, чтобы войти в рабочее пространство',
|
|
156
162
|
'pages.fields.default.onlyWorkspace': 'Current Workspace',
|
|
157
163
|
'pages.fields.default.getImageError': 'Не удалось получить изображение',
|