@giteeteam/apps-team-components 1.0.1 → 1.0.2-alpha.2

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 (84) 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.d.ts +2 -0
  79. package/dist/lib/contexts/index.js +12 -4
  80. package/dist/lib/contexts/itemConfig.js +1 -1
  81. package/dist/lib/contexts/teamConfig.js +1 -1
  82. package/dist/lib/contexts/tenant.js +1 -1
  83. package/dist/lib/contexts/workflowConfig.js +1 -1
  84. package/package.json +3 -2
@@ -1,9 +1,6 @@
1
- import { injectGlobal } from '@emotion/css';
2
- export const injectFieldCellGlobalStyle = () => {
3
- injectGlobal `
4
- .field-cell-layout {
5
- align-items: center;
6
- width: 100%;
7
- }
8
- `;
9
- };
1
+ export const fieldCellGlobalStyle = `
2
+ .field-cell-layout {
3
+ align-items: center;
4
+ width: 100%;
5
+ }
6
+ `;
@@ -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 AntdIcon from '@ant-design/icons';
3
3
  import HollowCircle from './svg/HollowCircle.svg';
4
4
  import Workflow from './svg/Workflow.svg';
@@ -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 { createContext } from 'react';
3
3
  const defaultContext = {};
4
4
  const defaultAntPrefix = 'ant';
@@ -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 { createContext } from 'react';
3
3
  const defaultContext = {};
4
4
  export const CurrentUserContext = createContext(defaultContext);
@@ -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 { createContext } from 'react';
3
3
  const defaultContext = {};
4
4
  export const CurrentWorkspaceContext = createContext(defaultContext);
@@ -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 { createContext } from 'react';
3
3
  const defaultContext = {};
4
4
  export const DatetimeFormatContext = createContext(defaultContext);
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { Options as CacheOptions } from '@emotion/cache';
2
3
  import { IAntdConfigContext } from './antdConfig';
3
4
  import { ICurrentUserContext } from './currentUser';
4
5
  import { ICurrentWorkspaceContext } from './currentWorkspace';
@@ -9,5 +10,6 @@ import { ITenantContext } from './tenant';
9
10
  import { IWorkflowConfigContext } from './workflowConfig';
10
11
  export interface LibraryProviderProps extends React.PropsWithChildren, IAntdConfigContext, ITeamConfigContext, ITenantContext, IDatetimeFormatContext, ICurrentWorkspaceContext, IWorkflowConfigContext, IItemConfigContext, ICurrentUserContext {
11
12
  locale?: string;
13
+ emotionCacheOptions?: CacheOptions;
12
14
  }
13
15
  export declare const LibraryProvider: React.FC<LibraryProviderProps>;
@@ -1,5 +1,7 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useEffect } from 'react';
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
+ import { useEffect, useMemo } from 'react';
3
+ import createCache from '@emotion/cache';
4
+ import { CacheProvider } from '@emotion/react';
3
5
  import { i18n } from '../i18n';
4
6
  import { AntdConfigProvider } from './antdConfig';
5
7
  import { CurrentUserProvider } from './currentUser';
@@ -9,9 +11,15 @@ import { ItemConfigProvider } from './itemConfig';
9
11
  import { TeamConfigProvider } from './teamConfig';
10
12
  import { TenantProvider } from './tenant';
11
13
  import { WorkflowConfigProvider } from './workflowConfig';
12
- export const LibraryProvider = ({ getPopupContainer, locale, tenant, datetimeFormat, teamBasePath, teamGateway, workspaceKey, workflow, item, currentUser, children, }) => {
14
+ export const LibraryProvider = ({ getPopupContainer, locale, tenant, datetimeFormat, teamBasePath, teamGateway, workspaceKey, workflow, item, currentUser, emotionCacheOptions, children, }) => {
15
+ const emotionCache = useMemo(() => {
16
+ return createCache({
17
+ key: '',
18
+ ...emotionCacheOptions,
19
+ });
20
+ }, [emotionCacheOptions]);
13
21
  useEffect(() => {
14
22
  i18n.setLocale(locale);
15
23
  }, [locale]);
16
- return (_jsx(AntdConfigProvider, { getPopupContainer: getPopupContainer, children: _jsx(TeamConfigProvider, { teamBasePath: teamBasePath, teamGateway: teamGateway, children: _jsx(TenantProvider, { tenant: tenant, children: _jsx(CurrentWorkspaceProvider, { workspaceKey: workspaceKey, children: _jsx(DatetimeFormatProvider, { datetimeFormat: datetimeFormat, children: _jsx(CurrentUserProvider, { currentUser: currentUser, children: _jsx(WorkflowConfigProvider, { workflow: workflow, children: _jsx(ItemConfigProvider, { item: item, children: children }) }) }) }) }) }) }) }));
24
+ return (_jsx(CacheProvider, { value: emotionCache, children: _jsx(AntdConfigProvider, { getPopupContainer: getPopupContainer, children: _jsx(TeamConfigProvider, { teamBasePath: teamBasePath, teamGateway: teamGateway, children: _jsx(TenantProvider, { tenant: tenant, children: _jsx(CurrentWorkspaceProvider, { workspaceKey: workspaceKey, children: _jsx(DatetimeFormatProvider, { datetimeFormat: datetimeFormat, children: _jsx(CurrentUserProvider, { currentUser: currentUser, children: _jsx(WorkflowConfigProvider, { workflow: workflow, children: _jsx(ItemConfigProvider, { item: item, children: children }) }) }) }) }) }) }) }) }));
17
25
  };
@@ -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 { createContext } from 'react';
3
3
  const defaultContext = {};
4
4
  export const ItemConfigContext = createContext(defaultContext);
@@ -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 { createContext } from 'react';
3
3
  const defaultContext = {};
4
4
  export const TeamConfigContext = createContext(defaultContext);
@@ -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 { createContext } from 'react';
3
3
  const defaultContext = {};
4
4
  export const TenantContext = createContext(defaultContext);
@@ -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 { createContext } from 'react';
3
3
  const defaultContext = {};
4
4
  export const WorkflowConfigContext = createContext(defaultContext);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giteeteam/apps-team-components",
3
- "version": "1.0.1",
3
+ "version": "1.0.2-alpha.2",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -47,7 +47,8 @@
47
47
  "swr": "^1.1.0"
48
48
  },
49
49
  "dependencies": {
50
- "@emotion/css": "^11.11.2",
50
+ "@emotion/cache": "^11.11.0",
51
+ "@emotion/react": "^11.11.1",
51
52
  "debug": "^4.3.4",
52
53
  "lodash-es": "^4.17.21"
53
54
  }