@giteeteam/apps-team-components 1.0.1 → 1.0.2-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.
Files changed (83) hide show
  1. package/dist/components/common/EmptyField.js +1 -1
  2. package/dist/components/common/overflow-tooltip/BaseOverflowTooltip.js +10 -9
  3. package/dist/components/common/overflow-tooltip/SimpleOverflowToolTip.js +10 -9
  4. package/dist/components/common/overflow-tooltip/style/index.d.ts +2 -2
  5. package/dist/components/common/overflow-tooltip/style/index.js +3 -4
  6. package/dist/components/common/style/global.d.ts +1 -1
  7. package/dist/components/common/style/global.js +1 -2
  8. package/dist/components/common/user-field/UserAvatar.js +5 -3
  9. package/dist/components/common/user-field/style/index.d.ts +3 -3
  10. package/dist/components/common/user-field/style/index.js +3 -4
  11. package/dist/components/fields/actors/ReadView.js +1 -1
  12. package/dist/components/fields/assignee/ReadView.js +6 -6
  13. package/dist/components/fields/bind-workspace/ReadView.js +5 -3
  14. package/dist/components/fields/bind-workspace/style/index.d.ts +1 -1
  15. package/dist/components/fields/bind-workspace/style/index.js +1 -2
  16. package/dist/components/fields/checkbox/ReadView.js +1 -1
  17. package/dist/components/fields/created-at/ReadView.js +1 -1
  18. package/dist/components/fields/created-by/ReadView.d.ts +1 -1
  19. package/dist/components/fields/created-by/ReadView.js +3 -6
  20. package/dist/components/fields/data-quote/ReadView.js +3 -2
  21. package/dist/components/fields/date/ReadView.js +1 -1
  22. package/dist/components/fields/dropdown/ReadView.js +1 -1
  23. package/dist/components/fields/file/ReadView.js +1 -1
  24. package/dist/components/fields/formula/ReadView.js +1 -1
  25. package/dist/components/fields/hyper-link/ReadView.js +4 -3
  26. package/dist/components/fields/hyper-link/style/index.d.ts +3 -3
  27. package/dist/components/fields/hyper-link/style/index.js +3 -4
  28. package/dist/components/fields/item-group/ReadView.js +1 -1
  29. package/dist/components/fields/item-type/ReadView.js +1 -1
  30. package/dist/components/fields/key/ReadView.js +1 -1
  31. package/dist/components/fields/long-text/ReadView.js +3 -2
  32. package/dist/components/fields/long-text/style/index.d.ts +1 -1
  33. package/dist/components/fields/long-text/style/index.js +1 -2
  34. package/dist/components/fields/number/ReadView.js +1 -1
  35. package/dist/components/fields/priority/ReadView.js +3 -2
  36. package/dist/components/fields/priority/style/index.d.ts +3 -3
  37. package/dist/components/fields/priority/style/index.js +3 -4
  38. package/dist/components/fields/radio/ReadView.js +1 -1
  39. package/dist/components/fields/reporter/ReadView.d.ts +1 -1
  40. package/dist/components/fields/reporter/ReadView.js +3 -6
  41. package/dist/components/fields/script/ReadView.js +1 -1
  42. package/dist/components/fields/sprint/ReadView.js +1 -1
  43. package/dist/components/fields/status/Cell.js +3 -4
  44. package/dist/components/fields/status/ReadView.js +3 -2
  45. package/dist/components/fields/status/Transition.js +16 -14
  46. package/dist/components/fields/status/TransitionButton.js +11 -9
  47. package/dist/components/fields/status/TransitionPanel.js +8 -8
  48. package/dist/components/fields/status/View.js +8 -11
  49. package/dist/components/fields/status/style/index.d.ts +19 -19
  50. package/dist/components/fields/status/style/index.js +36 -39
  51. package/dist/components/fields/story-point/ReadView.js +1 -1
  52. package/dist/components/fields/tag/ReadView.js +3 -2
  53. package/dist/components/fields/tag/style/index.d.ts +1 -1
  54. package/dist/components/fields/tag/style/index.js +1 -2
  55. package/dist/components/fields/team/ReadView.js +3 -2
  56. package/dist/components/fields/team/style/index.d.ts +2 -2
  57. package/dist/components/fields/team/style/index.js +1 -2
  58. package/dist/components/fields/text/ReadView.js +1 -1
  59. package/dist/components/fields/tree/ReadView.js +1 -1
  60. package/dist/components/fields/updated-at/ReadView.js +1 -1
  61. package/dist/components/fields/updated-by/ReadView.d.ts +1 -1
  62. package/dist/components/fields/updated-by/ReadView.js +3 -6
  63. package/dist/components/fields/user/ReadView.js +3 -3
  64. package/dist/components/fields/user/style/index.d.ts +3 -3
  65. package/dist/components/fields/user/style/index.js +3 -4
  66. package/dist/components/fields/user-group/ReadView.js +1 -1
  67. package/dist/components/fields/version/ReadView.js +1 -1
  68. package/dist/components/fields/workspace/ReadView.js +1 -1
  69. package/dist/components/table-components/EditTableCell.js +1 -1
  70. package/dist/components/table-components/index.js +9 -9
  71. package/dist/components/table-components/style/index.d.ts +1 -1
  72. package/dist/components/table-components/style/index.js +6 -9
  73. package/dist/icons/index.js +1 -1
  74. package/dist/lib/contexts/antdConfig.js +1 -1
  75. package/dist/lib/contexts/currentUser.js +1 -1
  76. package/dist/lib/contexts/currentWorkspace.js +1 -1
  77. package/dist/lib/contexts/datetimeFormat.js +1 -1
  78. package/dist/lib/contexts/index.js +1 -1
  79. package/dist/lib/contexts/itemConfig.js +1 -1
  80. package/dist/lib/contexts/teamConfig.js +1 -1
  81. package/dist/lib/contexts/tenant.js +1 -1
  82. package/dist/lib/contexts/workflowConfig.js +1 -1
  83. package/package.json +3 -2
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
2
  import { i18n } from '../../lib/i18n';
3
3
  import { gray6 } from '../../style/common';
4
4
  const EmptyField = props => {
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
2
  import { cloneElement, memo, useRef } from 'react';
3
- import { cx } from '@emotion/css';
3
+ import { ClassNames } from '@emotion/react';
4
4
  import { getTooltipMaxlineStyle, tooltipOverflowStyle } from './style';
5
5
  const BaseOverflowTooltip = props => {
6
6
  const { className, title, children, maxline, style } = props;
@@ -9,13 +9,14 @@ const BaseOverflowTooltip = props => {
9
9
  return null;
10
10
  }
11
11
  const childElement = _jsx("span", { children: children });
12
- const content = cloneElement(childElement, {
13
- ref: elRef,
14
- className: cx(tooltipOverflowStyle, getTooltipMaxlineStyle(maxline), className),
15
- style,
16
- title: title || '',
17
- });
18
- return content;
12
+ return (_jsx(ClassNames, { children: ({ cx, css }) => {
13
+ return cloneElement(childElement, {
14
+ ref: elRef,
15
+ className: cx(css(tooltipOverflowStyle), css(getTooltipMaxlineStyle(maxline)), className),
16
+ style,
17
+ title: title || '',
18
+ });
19
+ } }));
19
20
  };
20
21
  BaseOverflowTooltip.defaultProps = {
21
22
  className: '',
@@ -1,14 +1,15 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { cx } from '@emotion/css';
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
+ import React, { cloneElement } from 'react';
3
+ import { ClassNames } from '@emotion/react';
4
4
  import { simpleTooltipStyle } from './style';
5
5
  const SimpleOverflowToolTip = ({ title, children, className }) => {
6
6
  const contentRef = React.useRef();
7
- const content = React.cloneElement(_jsx("span", { children: children }), {
8
- ref: contentRef,
9
- className: cx(simpleTooltipStyle, className),
10
- title,
11
- });
12
- return content;
7
+ return (_jsx(ClassNames, { children: ({ cx, css }) => {
8
+ return cloneElement(_jsx("span", { children: children }), {
9
+ ref: contentRef,
10
+ className: cx(css(simpleTooltipStyle), className),
11
+ title: title || '',
12
+ });
13
+ } }));
13
14
  };
14
15
  export default React.memo(SimpleOverflowToolTip);
@@ -1,3 +1,3 @@
1
- export declare const tooltipOverflowStyle: string;
2
- export declare const simpleTooltipStyle: string;
1
+ export declare const tooltipOverflowStyle = "\n display: -webkit-box;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-all;\n white-space: pre-line !important;\n -webkit-box-orient: vertical;\n";
2
+ export declare const simpleTooltipStyle = "\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n";
3
3
  export declare const getTooltipMaxlineStyle: (n: number) => string;
@@ -1,5 +1,4 @@
1
- import { css } from '@emotion/css';
2
- export const tooltipOverflowStyle = css `
1
+ export const tooltipOverflowStyle = `
3
2
  display: -webkit-box;
4
3
  overflow: hidden;
5
4
  text-overflow: ellipsis;
@@ -7,13 +6,13 @@ export const tooltipOverflowStyle = css `
7
6
  white-space: pre-line !important;
8
7
  -webkit-box-orient: vertical;
9
8
  `;
10
- export const simpleTooltipStyle = css `
9
+ export const simpleTooltipStyle = `
11
10
  overflow: hidden;
12
11
  text-overflow: ellipsis;
13
12
  white-space: nowrap;
14
13
  `;
15
14
  export const getTooltipMaxlineStyle = (n) => {
16
- return css `
15
+ return `
17
16
  -webkit-line-clamp: ${n};
18
17
  `;
19
18
  };
@@ -1 +1 @@
1
- export declare const fieldValueOverlayStyle: string;
1
+ export declare const fieldValueOverlayStyle = "\n width: 100%;\n";
@@ -1,4 +1,3 @@
1
- import { css } from '@emotion/css';
2
- export const fieldValueOverlayStyle = css `
1
+ export const fieldValueOverlayStyle = `
3
2
  width: 100%;
4
3
  `;
@@ -1,13 +1,15 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
2
  import React, { useMemo } from 'react';
3
- import { cx } from '@emotion/css';
3
+ import { ClassNames } from '@emotion/react';
4
4
  import { getBackgroundColor, getNameBadge } from '../utils';
5
5
  import { avatarItemStyle, avatarStyle, defaultAvatarStyle } from './style';
6
6
  const UserAvatar = React.memo(({ user, className }) => {
7
7
  const avatarUrl = useMemo(() => { var _a; return (_a = user === null || user === void 0 ? void 0 : user.avatar) === null || _a === void 0 ? void 0 : _a.url; }, [user]);
8
8
  const displayName = useMemo(() => (user === null || user === void 0 ? void 0 : user.name) || (user === null || user === void 0 ? void 0 : user.username), [user]);
9
9
  const userBadge = useMemo(() => getNameBadge(displayName), [displayName]);
10
- return (_jsx(_Fragment, { children: avatarUrl ? (_jsx("span", { className: cx('avatar-item', avatarItemStyle, avatarStyle, className), style: { backgroundImage: `url(${avatarUrl})` } })) : (_jsx("span", { className: cx('avatar-item', avatarItemStyle, defaultAvatarStyle, className), style: getBackgroundColor(userBadge), children: userBadge })) }));
10
+ return (_jsx(ClassNames, { children: ({ cx, css }) => {
11
+ return avatarUrl ? (_jsx("span", { className: cx('avatar-item', css(avatarItemStyle), css(avatarStyle), css(className)), style: { backgroundImage: `url(${avatarUrl})` } })) : (_jsx("span", { className: cx('avatar-item', css(avatarItemStyle), css(defaultAvatarStyle), css(className)), style: getBackgroundColor(userBadge), children: userBadge }));
12
+ } }));
11
13
  });
12
14
  UserAvatar.displayName = 'UserAvatar';
13
15
  export default UserAvatar;
@@ -1,3 +1,3 @@
1
- export declare const avatarItemStyle: string;
2
- export declare const avatarStyle: string;
3
- export declare const defaultAvatarStyle: string;
1
+ export declare const avatarItemStyle = "\n flex-shrink: 0;\n";
2
+ export declare const avatarStyle = "\n display: inline-block;\n width: 20px;\n height: 20px;\n margin-right: 3px;\n vertical-align: middle;\n background: #fff center/contain no-repeat;\n border-radius: 50%;\n";
3
+ export declare const defaultAvatarStyle = "\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n margin-right: 6px;\n font-size: 12px;\n color: #fff;\n background: #5243aa;\n border-radius: 50%;\n";
@@ -1,9 +1,8 @@
1
- import { css } from '@emotion/css';
2
1
  const avatarSize = '20px';
3
- export const avatarItemStyle = css `
2
+ export const avatarItemStyle = `
4
3
  flex-shrink: 0;
5
4
  `;
6
- export const avatarStyle = css `
5
+ export const avatarStyle = `
7
6
  display: inline-block;
8
7
  width: ${avatarSize};
9
8
  height: ${avatarSize};
@@ -12,7 +11,7 @@ export const avatarStyle = css `
12
11
  background: #fff center/contain no-repeat;
13
12
  border-radius: 50%;
14
13
  `;
15
- export const defaultAvatarStyle = css `
14
+ export const defaultAvatarStyle = `
16
15
  display: inline-flex;
17
16
  align-items: center;
18
17
  justify-content: center;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  import { memo, useMemo } from 'react';
3
3
  import EmptyField from '../../common/EmptyField';
4
4
  import SimpleOverflowToolTip from '../../common/overflow-tooltip/SimpleOverflowToolTip';
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
2
  import { Fragment, memo } from 'react';
3
- import { cx } from '@emotion/css';
3
+ import { ClassNames } from '@emotion/react';
4
4
  import { getArrayValue } from '../../../lib/array';
5
5
  import { isUserDeleted, isUserDisabled, userDataFormat } from '../../../lib/useUser';
6
6
  import EmptyField from '../../common/EmptyField';
@@ -12,10 +12,10 @@ const AssigneeReadView = memo(({ value, readonly }) => {
12
12
  if (!(users === null || users === void 0 ? void 0 : users.length))
13
13
  return _jsx(EmptyField, { readonly: readonly, isUser: true });
14
14
  const title = users.map(user => user === null || user === void 0 ? void 0 : user.label).join(',');
15
- return (_jsx("span", { className: cx(tooltipOverflowStyle, getTooltipMaxlineStyle(1)), title: title, children: users.reduce((prev, user, index) => {
16
- const el = (_jsxs(Fragment, { children: [index ? ',' : '', _jsx("span", { className: cx({ [userDeletedStyle]: isUserDeleted(user) }, { [userDisabledStyle]: isUserDisabled(user) }), children: user === null || user === void 0 ? void 0 : user.label })] }, index));
17
- return prev.concat(el);
18
- }, []) }));
15
+ return (_jsx(ClassNames, { children: ({ cx, css }) => (_jsx("span", { className: cx(css(tooltipOverflowStyle), css(getTooltipMaxlineStyle(1))), title: title, children: users.reduce((prev, user, index) => {
16
+ const el = (_jsxs(Fragment, { children: [index ? ',' : '', _jsx("span", { className: cx({ [css(userDeletedStyle)]: isUserDeleted(user) }, { [css(userDisabledStyle)]: isUserDisabled(user) }), children: user === null || user === void 0 ? void 0 : user.label })] }, index));
17
+ return prev.concat(el);
18
+ }, []) })) }));
19
19
  });
20
20
  AssigneeReadView.displayName = 'AssigneeReadView';
21
21
  export default AssigneeReadView;
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
2
  import { memo } from 'react';
3
- import { cx } from '@emotion/css';
3
+ import { ClassNames } from '@emotion/react';
4
4
  import useI18n from '../../../lib/hooks/useI18n';
5
5
  import EmptyField from '../../common/EmptyField';
6
6
  import { getTooltipMaxlineStyle, tooltipOverflowStyle } from '../../common/overflow-tooltip/style';
@@ -12,7 +12,9 @@ const BindWorkspaceReadView = memo(props => {
12
12
  const { t } = useI18n();
13
13
  const { toWorkspacePage } = useToWorkspacePage();
14
14
  const [, name, key] = value || defaultValue;
15
- return (_jsx(_Fragment, { children: name ? (_jsx("span", { className: cx(tooltipOverflowStyle, getTooltipMaxlineStyle(1), pointerStyle), title: t('pages.fields.default.toWorkspacePage'), onClick: () => toWorkspacePage(key), children: name })) : (_jsx(EmptyField, { readonly: true })) }));
15
+ return (_jsx(ClassNames, { children: ({ cx, css }) => {
16
+ return name ? (_jsx("span", { className: cx(css(tooltipOverflowStyle), css(getTooltipMaxlineStyle(1)), css(pointerStyle)), title: t('pages.fields.default.toWorkspacePage'), onClick: () => toWorkspacePage(key), children: name })) : (_jsx(EmptyField, { readonly: true }));
17
+ } }));
16
18
  });
17
19
  BindWorkspaceReadView.displayName = 'BindWorkspaceReadView';
18
20
  export default BindWorkspaceReadView;
@@ -1 +1 @@
1
- export declare const pointerStyle: string;
1
+ export declare const pointerStyle = "\n color: #0c62ff;\n cursor: pointer;\n";
@@ -1,5 +1,4 @@
1
- import { css } from '@emotion/css';
2
- export const pointerStyle = css `
1
+ export const pointerStyle = `
3
2
  color: #0c62ff;
4
3
  cursor: pointer;
5
4
  `;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  import { memo, useMemo } from 'react';
3
3
  import EmptyField from '../../common/EmptyField';
4
4
  import SimpleOverflowToolTip from '../../common/overflow-tooltip/SimpleOverflowToolTip';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
2
  import { memo, useMemo } from 'react';
3
3
  import useDateTimeFormatType from '../../../lib/hooks/useDateTimeFormatType';
4
4
  import EmptyField from '../../common/EmptyField';
@@ -2,5 +2,5 @@
2
2
  import { User as UserTyped } from '../../../lib/types/models';
3
3
  declare const CreatedByReadView: import("react").MemoExoticComponent<({ value }: {
4
4
  value: UserTyped;
5
- }) => import("react/jsx-runtime").JSX.Element>;
5
+ }) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element>;
6
6
  export default CreatedByReadView;
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
2
  import { memo, useMemo } from 'react';
3
- import { cx } from '@emotion/css';
3
+ import { ClassNames } from '@emotion/react';
4
4
  import { generateUserDisplayName, isUserDeleted, isUserDisabled } from '../../../lib/useUser';
5
5
  import EmptyField from '../../common/EmptyField';
6
6
  import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
@@ -13,13 +13,10 @@ const CreatedByReadView = memo(({ value }) => {
13
13
  }
14
14
  return '';
15
15
  }, [value]);
16
- const className = useMemo(() => {
17
- return cx(usernameStyle, isUserDeleted(value) ? userDeletedStyle : '', isUserDisabled(value) ? userDisabledStyle : '');
18
- }, [value]);
19
16
  if (!showValue) {
20
17
  return _jsx(EmptyField, { readonly: true });
21
18
  }
22
- return (_jsxs(BaseOverflowTooltip, { title: showValue, maxline: 1, children: [_jsx(UserAvatar, { user: value }), _jsx("span", { className: className, children: showValue })] }));
19
+ return (_jsx(ClassNames, { children: ({ cx, css }) => (_jsxs(BaseOverflowTooltip, { title: showValue, maxline: 1, children: [_jsx(UserAvatar, { user: value }), _jsx("span", { className: cx(css(usernameStyle), isUserDeleted(value) ? css(userDeletedStyle) : '', isUserDisabled(value) ? css(userDisabledStyle) : ''), children: showValue })] })) }));
23
20
  });
24
21
  CreatedByReadView.displayName = 'CreatedByReadView';
25
22
  export default CreatedByReadView;
@@ -1,5 +1,6 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsxs as _jsxs, jsx as _jsx } from "@emotion/react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
+ import { css } from '@emotion/react';
3
4
  import { useRecoilValue } from 'recoil';
4
5
  import { currentDeleteState, dataQuoteState } from '../../../lib/store/dataQuoteStore';
5
6
  import EmptyField from '../../common/EmptyField';
@@ -16,7 +17,7 @@ const DataQuoteReadView = ({ value, userData }) => {
16
17
  }
17
18
  }, [dataQuoteList, userData === null || userData === void 0 ? void 0 : userData.display, value, currentDeleteItem]);
18
19
  const cellDisplay = (dataList === null || dataList === void 0 ? void 0 : dataList.length) ? (dataList.map((item, index) => (_jsxs("span", { children: [item.label, " ", index === dataList.length - 1 ? '' : '、'] }, item.value)))) : (_jsx(EmptyField, { readonly: true }));
19
- return (_jsx("div", { className: fieldValueOverlayStyle, children: _jsx(BaseOverflowTooltip, { maxline: 1, children: cellDisplay }) }));
20
+ return (_jsx("div", { css: css(fieldValueOverlayStyle), children: _jsx(BaseOverflowTooltip, { maxline: 1, children: cellDisplay }) }));
20
21
  };
21
22
  DataQuoteReadView.displayName = 'DataQuoteReadView';
22
23
  export default DataQuoteReadView;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  import { memo, useMemo } from 'react';
3
3
  import { getDateType, getFormat } from '../../../lib/date';
4
4
  import EmptyField from '../../common/EmptyField';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  import { memo, useMemo } from 'react';
3
3
  import EmptyField from '../../common/EmptyField';
4
4
  import SimpleOverflowToolTip from '../../common/overflow-tooltip/SimpleOverflowToolTip';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  import { memo } from 'react';
3
3
  import EmptyField from '../../common/EmptyField';
4
4
  import SimpleOverflowToolTip from '../../common/overflow-tooltip/SimpleOverflowToolTip';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  import { memo, useMemo } from 'react';
3
3
  import EmptyField from '../../common/EmptyField';
4
4
  import SimpleOverflowToolTip from '../../common/overflow-tooltip/SimpleOverflowToolTip';
@@ -1,5 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
2
  import { memo, useMemo } from 'react';
3
+ import { css } from '@emotion/react';
3
4
  import { Popover } from 'antd';
4
5
  import EmptyField from '../../common/EmptyField';
5
6
  import { hyperLinkItemStyle, hyperLinkListStyle, hyperLinkTipItem } from './style';
@@ -9,8 +10,8 @@ const HyperLinkCell = memo(props => {
9
10
  return value === null || value === void 0 ? void 0 : value.filter(item => item === null || item === void 0 ? void 0 : item.value);
10
11
  }, [value]);
11
12
  const content = useMemo(() => {
12
- return list === null || list === void 0 ? void 0 : list.map(item => (_jsx("a", { href: item.value, target: "_blank", rel: "noreferrer", className: hyperLinkTipItem, children: item.label }, item.id)));
13
+ return list === null || list === void 0 ? void 0 : list.map(item => (_jsx("a", { href: item.value, target: "_blank", rel: "noreferrer", css: css(hyperLinkTipItem), children: item.label }, item.id)));
13
14
  }, [list]);
14
- return (list === null || list === void 0 ? void 0 : list.length) > 0 ? (_jsx(Popover, { content: content, destroyTooltipOnHide: true, children: _jsx("div", { className: hyperLinkListStyle, children: list.map((item, index) => (_jsxs("a", { href: item.value, target: "_blank", rel: "noreferrer", className: hyperLinkItemStyle, children: [item.label, index + 1 !== list.length && _jsx("span", { children: ",\u00A0" })] }, item.id))) }) })) : (_jsx(EmptyField, { readonly: true }));
15
+ return (list === null || list === void 0 ? void 0 : list.length) > 0 ? (_jsx(Popover, { content: content, destroyTooltipOnHide: true, children: _jsx("div", { css: css(hyperLinkListStyle), children: list.map((item, index) => (_jsxs("a", { href: item.value, target: "_blank", rel: "noreferrer", css: css(hyperLinkItemStyle), children: [item.label, index + 1 !== list.length && _jsx("span", { children: ",\u00A0" })] }, item.id))) }) })) : (_jsx(EmptyField, { readonly: true }));
15
16
  });
16
17
  export default HyperLinkCell;
@@ -1,3 +1,3 @@
1
- export declare const hyperLinkListStyle: string;
2
- export declare const hyperLinkItemStyle: string;
3
- export declare const hyperLinkTipItem: string;
1
+ export declare const hyperLinkListStyle = "\n display: flex;\n width: 100%;\n";
2
+ export declare const hyperLinkItemStyle = "\n \n display: flex;\n width: 100%;\n & {\n overflow: hidden;\n color: @blue-6;\n text-overflow: ellipsis;\n white-space: nowrap;\n -webkit-line-clamp: 1;\n }\n";
3
+ export declare const hyperLinkTipItem = "\n display: block;\n color: #0c62ff;\n";
@@ -1,10 +1,9 @@
1
- import { css } from '@emotion/css';
2
1
  import { blue6 } from '../../../../style/common';
3
- export const hyperLinkListStyle = css `
2
+ export const hyperLinkListStyle = `
4
3
  display: flex;
5
4
  width: 100%;
6
5
  `;
7
- export const hyperLinkItemStyle = css `
6
+ export const hyperLinkItemStyle = `
8
7
  ${hyperLinkListStyle} & {
9
8
  overflow: hidden;
10
9
  color: @blue-6;
@@ -13,7 +12,7 @@ export const hyperLinkItemStyle = css `
13
12
  -webkit-line-clamp: 1;
14
13
  }
15
14
  `;
16
- export const hyperLinkTipItem = css `
15
+ export const hyperLinkTipItem = `
17
16
  display: block;
18
17
  color: ${blue6};
19
18
  `;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  import EmptyField from '../../common/EmptyField';
3
3
  const ItemGroupReadView = ({ value }) => {
4
4
  return _jsx(_Fragment, { children: (value === null || value === void 0 ? void 0 : value.name) || _jsx(EmptyField, { readonly: true }) });
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  import { memo } from 'react';
3
3
  import EmptyField from '../../common/EmptyField';
4
4
  import SimpleOverflowToolTip from '../../common/overflow-tooltip/SimpleOverflowToolTip';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  import { memo } from 'react';
3
3
  import EmptyField from '../../common/EmptyField';
4
4
  import SimpleOverflowToolTip from '../../common/overflow-tooltip/SimpleOverflowToolTip';
@@ -1,10 +1,11 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  import { memo } from 'react';
3
+ import { css } from '@emotion/react';
3
4
  import EmptyField from '../../common/EmptyField';
4
5
  import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
5
6
  import { whiteSpacePreStyle } from './style';
6
7
  const LongTextReadView = memo(({ value, readonly }) => {
7
- return (_jsx(_Fragment, { children: value ? (_jsx(BaseOverflowTooltip, { maxline: 1, children: _jsx("span", { className: whiteSpacePreStyle, dangerouslySetInnerHTML: { __html: value } }) })) : (_jsx(EmptyField, { readonly: readonly })) }));
8
+ return (_jsx(_Fragment, { children: value ? (_jsx(BaseOverflowTooltip, { maxline: 1, children: _jsx("span", { css: css(whiteSpacePreStyle), dangerouslySetInnerHTML: { __html: value } }) })) : (_jsx(EmptyField, { readonly: readonly })) }));
8
9
  });
9
10
  LongTextReadView.displayName = 'LongTextReadView';
10
11
  export default LongTextReadView;
@@ -1 +1 @@
1
- export declare const whiteSpacePreStyle: string;
1
+ export declare const whiteSpacePreStyle = "\n padding-top: 5px;\n padding-bottom: 5px;\n word-break: break-all;\n white-space: pre-wrap;\n";
@@ -1,5 +1,4 @@
1
- import { css } from '@emotion/css';
2
- export const whiteSpacePreStyle = css `
1
+ export const whiteSpacePreStyle = `
3
2
  padding-top: 5px;
4
3
  padding-bottom: 5px;
5
4
  word-break: break-all;
@@ -1,4 +1,4 @@
1
- import { Fragment as _Fragment, jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsxs as _jsxs, jsx as _jsx } from "@emotion/react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
3
  import { isNil } from 'lodash-es';
4
4
  import EmptyField from '../../common/EmptyField';
@@ -1,5 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  import { memo, useCallback, useMemo } from 'react';
3
+ import { css } from '@emotion/react';
3
4
  import { HollowCircleIcon } from '../../../icons';
4
5
  import EmptyField from '../../common/EmptyField';
5
6
  import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
@@ -11,7 +12,7 @@ const PriorityReadView = memo(({ value, options, readonly }) => {
11
12
  });
12
13
  }, []);
13
14
  const showData = useMemo(() => { var _a; return (_a = filterData(options, value)) === null || _a === void 0 ? void 0 : _a[0]; }, [filterData, options, value]);
14
- return (_jsx(_Fragment, { children: showData ? (_jsxs("div", { className: cellBoxStyle, children: [_jsx(HollowCircleIcon, { className: colorIconStyle, style: { color: showData.color } }), _jsx(BaseOverflowTooltip, { title: showData.name, children: showData.name })] })) : (_jsx("div", { className: emptyTextStyle, children: _jsx(EmptyField, { readonly: readonly }) })) }));
15
+ return (_jsx(_Fragment, { children: showData ? (_jsxs("div", { css: css(cellBoxStyle), children: [_jsx(HollowCircleIcon, { css: css(colorIconStyle), style: { color: showData.color } }), _jsx(BaseOverflowTooltip, { title: showData.name, children: showData.name })] })) : (_jsx("div", { css: css(emptyTextStyle), children: _jsx(EmptyField, { readonly: readonly }) })) }));
15
16
  });
16
17
  PriorityReadView.displayName = 'PriorityReadView';
17
18
  export default PriorityReadView;
@@ -1,3 +1,3 @@
1
- export declare const cellBoxStyle: string;
2
- export declare const emptyTextStyle: string;
3
- export declare const colorIconStyle: string;
1
+ export declare const cellBoxStyle = "\n display: flex;\n align-items: center;\n line-height: unset;\n\n .ant-dropdown-menu-title-content {\n display: flex;\n align-items: center;\n max-width: 150px;\n\n .anticon {\n flex-shrink: 0;\n }\n\n & > span {\n white-space: pre-line;\n }\n }\n";
2
+ 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: 12px;\n";
@@ -1,5 +1,4 @@
1
- import { css } from '@emotion/css';
2
- export const cellBoxStyle = css `
1
+ export const cellBoxStyle = `
3
2
  display: flex;
4
3
  align-items: center;
5
4
  line-height: unset;
@@ -18,13 +17,13 @@ export const cellBoxStyle = css `
18
17
  }
19
18
  }
20
19
  `;
21
- export const emptyTextStyle = css `
20
+ export const emptyTextStyle = `
22
21
  display: flex;
23
22
  align-items: center;
24
23
  width: 100%;
25
24
  height: 100%;
26
25
  `;
27
- export const colorIconStyle = css `
26
+ export const colorIconStyle = `
28
27
  margin-right: 5px;
29
28
  font-size: 12px;
30
29
  `;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
2
  import { memo, useMemo } from 'react';
3
3
  import EmptyField from '../../common/EmptyField';
4
4
  import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
@@ -3,5 +3,5 @@ import { User as UserTyped } from '../../../lib/types/models';
3
3
  declare const ReporterReadView: import("react").MemoExoticComponent<({ value, readonly }: {
4
4
  value: UserTyped;
5
5
  readonly?: boolean;
6
- }) => import("react/jsx-runtime").JSX.Element>;
6
+ }) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element>;
7
7
  export default ReporterReadView;
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
2
  import { memo, useMemo } from 'react';
3
- import { cx } from '@emotion/css';
3
+ import { ClassNames } from '@emotion/react';
4
4
  import { generateUserDisplayName, isUserDeleted, isUserDisabled } from '../../../lib/useUser';
5
5
  import EmptyField from '../../common/EmptyField';
6
6
  import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
@@ -13,13 +13,10 @@ const ReporterReadView = memo(({ value, readonly }) => {
13
13
  }
14
14
  return '';
15
15
  }, [value]);
16
- const className = useMemo(() => {
17
- return cx(usernameStyle, isUserDeleted(value) ? userDeletedStyle : '', isUserDisabled(value) ? userDisabledStyle : '');
18
- }, [value]);
19
16
  if (!showValue) {
20
17
  return _jsx(EmptyField, { readonly: readonly });
21
18
  }
22
- return (_jsxs(BaseOverflowTooltip, { title: showValue, maxline: 1, children: [_jsx(UserAvatar, { user: value }), _jsx("span", { className: className, children: showValue })] }));
19
+ return (_jsx(ClassNames, { children: ({ cx, css }) => (_jsxs(BaseOverflowTooltip, { title: showValue, maxline: 1, children: [_jsx(UserAvatar, { user: value }), _jsx("span", { className: cx(css(usernameStyle), isUserDeleted(value) ? css(userDeletedStyle) : '', isUserDisabled(value) ? css(userDisabledStyle) : ''), children: showValue })] })) }));
23
20
  });
24
21
  ReporterReadView.displayName = 'ReporterReadView';
25
22
  export default ReporterReadView;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  import { memo, useMemo } from 'react';
3
3
  import EmptyField from '../../common/EmptyField';
4
4
  import { translateScript } from './BaseField';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  import { useMemo } from 'react';
3
3
  import EmptyField from '../../common/EmptyField';
4
4
  const SprintReadView = ({ value, readonly }) => {
@@ -1,10 +1,9 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
2
  import React, { useCallback, useEffect, useState } from 'react';
3
- import { cx } from '@emotion/css';
4
3
  import ReadView from './ReadView';
5
4
  import Transition from './Transition';
6
5
  const StatusCell = React.memo(props => {
7
- const { overlayClsName, itemId, readonly, value, workspaceId, itemTypeId, onChange } = props;
6
+ const { overlayClsName = '', itemId, readonly, value, workspaceId, itemTypeId, onChange } = props;
8
7
  const [showData, setShowData] = useState(value);
9
8
  useEffect(() => {
10
9
  setShowData(value);
@@ -13,7 +12,7 @@ const StatusCell = React.memo(props => {
13
12
  setShowData({ objectId, name, type });
14
13
  onChange === null || onChange === void 0 ? void 0 : onChange({ objectId, name, type });
15
14
  }, [onChange]);
16
- return (_jsx("div", { className: cx(overlayClsName, 'field-cell-layout', 'field-layout', { pointer: !readonly }), children: readonly ? (_jsx(ReadView, { value: showData, readonly: true })) : (_jsx(Transition, { itemId: itemId, ...showData, apply: "cell", workspace: workspaceId, itemType: itemTypeId, onTransitionSuccess: handleChange })) }));
15
+ return (_jsx("div", { className: `${overlayClsName} field-cell-layout field-layout ${!readonly ? 'pointer' : ''}`, children: readonly ? (_jsx(ReadView, { value: showData, readonly: true })) : (_jsx(Transition, { itemId: itemId, ...showData, apply: "cell", workspace: workspaceId, itemType: itemTypeId, onTransitionSuccess: handleChange })) }));
17
16
  });
18
17
  StatusCell.displayName = 'StatusCell';
19
18
  export default StatusCell;
@@ -1,5 +1,6 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
2
  import React, { useMemo } from 'react';
3
+ import { css } from '@emotion/react';
3
4
  import { WorkFlowStatusColor } from '../../../lib/global';
4
5
  import EmptyField from '../../common/EmptyField';
5
6
  import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
@@ -16,7 +17,7 @@ const StatusReadView = React.memo(({ value: showData, readonly }) => {
16
17
  if (!showValue) {
17
18
  return _jsx(EmptyField, { readonly: readonly });
18
19
  }
19
- return (_jsx(BaseOverflowTooltip, { style: style, title: showValue, className: readViewWrapper, maxline: 1, children: showValue }));
20
+ return (_jsx(BaseOverflowTooltip, { style: style, title: showValue, css: css(readViewWrapper), maxline: 1, children: showValue }));
20
21
  });
21
22
  StatusReadView.displayName = 'StatusReadView';
22
23
  export default StatusReadView;