[REFACTOR] Twenty UI multi barrel (#11301)
# Introduction closes https://github.com/twentyhq/core-team-issues/issues/591 Same than for `twenty-shared` made in https://github.com/twentyhq/twenty/pull/11083. ## TODO - [x] Manual migrate twenty-website twenty-ui imports ## What's next: - Generate barrel and migration script factorization within own package + tests - Refactoring using preconstruct ? TimeBox - Lint circular dependencies - Lint import from barrel and forbid them ### Preconstruct We need custom rollup plugins addition, but preconstruct does not expose its rollup configuration. It might be possible to handle this using the babel overrides. But was a big tunnel. We could give it a try afterwards ! ( allowing cjs interop and stuff like that ) Stuck to vite lib app Closed related PRs: - https://github.com/twentyhq/twenty/pull/11294 - https://github.com/twentyhq/twenty/pull/11203
This commit is contained in:
@ -20,7 +20,7 @@ runs:
|
|||||||
id: cache-primary-key-builder
|
id: cache-primary-key-builder
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "CACHE_PRIMARY_KEY_PREFIX=v2-${{ inputs.key }}-${{ github.ref_name }}" >> "${GITHUB_OUTPUT}"
|
echo "CACHE_PRIMARY_KEY_PREFIX=v3-${{ inputs.key }}-${{ github.ref_name }}" >> "${GITHUB_OUTPUT}"
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
id: restore-cache
|
id: restore-cache
|
||||||
|
|||||||
@ -25,8 +25,8 @@ runs:
|
|||||||
id: cache-node-modules
|
id: cache-node-modules
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
key: v2-${{ steps.globals.outputs.CACHE_KEY_PREFIX }}-${{github.sha}}
|
key: v3-${{ steps.globals.outputs.CACHE_KEY_PREFIX }}-${{github.sha}}
|
||||||
restore-keys: v2-${{ steps.globals.outputs.CACHE_KEY_PREFIX }}-
|
restore-keys: v3-${{ steps.globals.outputs.CACHE_KEY_PREFIX }}-
|
||||||
path: ${{ steps.globals.outputs.PATH_TO_CACHE }}
|
path: ${{ steps.globals.outputs.PATH_TO_CACHE }}
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' && steps.cache-node-modules.outputs.cache-matched-key == '' }}
|
if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' && steps.cache-node-modules.outputs.cache-matched-key == '' }}
|
||||||
|
|||||||
@ -3,12 +3,12 @@ import { Preview } from '@storybook/react';
|
|||||||
import { initialize, mswDecorator } from 'msw-storybook-addon';
|
import { initialize, mswDecorator } from 'msw-storybook-addon';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { useDarkMode } from 'storybook-dark-mode';
|
import { useDarkMode } from 'storybook-dark-mode';
|
||||||
import { THEME_DARK, THEME_LIGHT, ThemeContextProvider } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { RootDecorator } from '../src/testing/decorators/RootDecorator';
|
import { RootDecorator } from '../src/testing/decorators/RootDecorator';
|
||||||
import { mockedUserJWT } from '../src/testing/mock-data/jwt';
|
import { mockedUserJWT } from '../src/testing/mock-data/jwt';
|
||||||
|
|
||||||
import 'react-loading-skeleton/dist/skeleton.css';
|
import 'react-loading-skeleton/dist/skeleton.css';
|
||||||
|
import { THEME_DARK, THEME_LIGHT, ThemeContextProvider } from 'twenty-ui/theme';
|
||||||
|
|
||||||
initialize({
|
initialize({
|
||||||
onUnhandledRequest: async (request: Request) => {
|
onUnhandledRequest: async (request: Request) => {
|
||||||
|
|||||||
@ -15,12 +15,26 @@ const jestConfig: JestConfigWithTsJest = {
|
|||||||
preset: '../../jest.preset.js',
|
preset: '../../jest.preset.js',
|
||||||
setupFilesAfterEnv: ['./setupTests.ts'],
|
setupFilesAfterEnv: ['./setupTests.ts'],
|
||||||
testEnvironment: 'jsdom',
|
testEnvironment: 'jsdom',
|
||||||
transformIgnorePatterns: ['../../node_modules/'],
|
|
||||||
|
transformIgnorePatterns: [
|
||||||
|
'/node_modules/(?!(twenty-ui)/.*)',
|
||||||
|
'../../node_modules/(?!(twenty-ui)/.*)',
|
||||||
|
'../../twenty-ui/',
|
||||||
|
],
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.(ts|js|tsx|jsx)$': [
|
'^.+\\.(ts|js|tsx|jsx)$': [
|
||||||
'@swc/jest',
|
'@swc/jest',
|
||||||
{
|
{
|
||||||
jsc: {
|
jsc: {
|
||||||
|
parser: {
|
||||||
|
syntax: 'typescript',
|
||||||
|
tsx: true,
|
||||||
|
},
|
||||||
|
transform: {
|
||||||
|
react: {
|
||||||
|
runtime: 'automatic',
|
||||||
|
},
|
||||||
|
},
|
||||||
experimental: {
|
experimental: {
|
||||||
plugins: [['@lingui/swc-plugin', {}]],
|
plugins: [['@lingui/swc-plugin', {}]],
|
||||||
},
|
},
|
||||||
|
|||||||
@ -56,7 +56,8 @@
|
|||||||
"file-saver": "^2.0.5",
|
"file-saver": "^2.0.5",
|
||||||
"recoil-sync": "^0.2.0",
|
"recoil-sync": "^0.2.0",
|
||||||
"transliteration": "^2.3.5",
|
"transliteration": "^2.3.5",
|
||||||
"twenty-shared": "workspace:*"
|
"twenty-shared": "workspace:*",
|
||||||
|
"twenty-ui": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@lingui/cli": "^5.1.2",
|
"@lingui/cli": "^5.1.2",
|
||||||
|
|||||||
3
packages/twenty-front/src/emotion.d.ts
vendored
3
packages/twenty-front/src/emotion.d.ts
vendored
@ -1,5 +1,4 @@
|
|||||||
import { ThemeType } from 'twenty-ui';
|
import { ThemeType } from 'twenty-ui/theme';
|
||||||
|
|
||||||
declare module '@emotion/react' {
|
declare module '@emotion/react' {
|
||||||
export interface Theme extends ThemeType {}
|
export interface Theme extends ThemeType {}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import '@emotion/react';
|
|||||||
|
|
||||||
import { App } from '@/app/components/App';
|
import { App } from '@/app/components/App';
|
||||||
import 'react-loading-skeleton/dist/skeleton.css';
|
import 'react-loading-skeleton/dist/skeleton.css';
|
||||||
|
import 'twenty-ui/style.css';
|
||||||
import './index.css';
|
import './index.css';
|
||||||
|
|
||||||
const root = ReactDOM.createRoot(
|
const root = ReactDOM.createRoot(
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
|
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
|
||||||
import { ANIMATION } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';
|
import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';
|
||||||
import { NAV_DRAWER_WIDTHS } from '@/ui/navigation/navigation-drawer/constants/NavDrawerWidths';
|
import { NAV_DRAWER_WIDTHS } from '@/ui/navigation/navigation-drawer/constants/NavDrawerWidths';
|
||||||
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
|
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
|
||||||
import { useTheme } from '@emotion/react';
|
import { useTheme } from '@emotion/react';
|
||||||
import { MainNavigationDrawerItemsSkeletonLoader } from '~/loading/components/MainNavigationDrawerItemsSkeletonLoader';
|
import { MainNavigationDrawerItemsSkeletonLoader } from '~/loading/components/MainNavigationDrawerItemsSkeletonLoader';
|
||||||
|
import { ANIMATION } from 'twenty-ui/theme';
|
||||||
|
|
||||||
const StyledAnimatedContainer = styled(motion.div)`
|
const StyledAnimatedContainer = styled(motion.div)`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLo
|
|||||||
import { useTheme } from '@emotion/react';
|
import { useTheme } from '@emotion/react';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
|
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
|
||||||
import { BORDER_COMMON, MOBILE_VIEWPORT } from 'twenty-ui';
|
import { BORDER_COMMON, MOBILE_VIEWPORT } from 'twenty-ui/theme';
|
||||||
|
|
||||||
const StyledMainContainer = styled.div`
|
const StyledMainContainer = styled.div`
|
||||||
background: ${({ theme }) => theme.background.noisy};
|
background: ${({ theme }) => theme.background.noisy};
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { MOBILE_VIEWPORT } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { NAV_DRAWER_WIDTHS } from '@/ui/navigation/navigation-drawer/constants/NavDrawerWidths';
|
import { NAV_DRAWER_WIDTHS } from '@/ui/navigation/navigation-drawer/constants/NavDrawerWidths';
|
||||||
import { LeftPanelSkeletonLoader } from '~/loading/components/LeftPanelSkeletonLoader';
|
import { LeftPanelSkeletonLoader } from '~/loading/components/LeftPanelSkeletonLoader';
|
||||||
import { RightPanelSkeletonLoader } from '~/loading/components/RightPanelSkeletonLoader';
|
import { RightPanelSkeletonLoader } from '~/loading/components/RightPanelSkeletonLoader';
|
||||||
|
import { MOBILE_VIEWPORT } from 'twenty-ui/theme';
|
||||||
|
|
||||||
const StyledContainer = styled.div`
|
const StyledContainer = styled.div`
|
||||||
background: ${({ theme }) => theme.background.noisy};
|
background: ${({ theme }) => theme.background.noisy};
|
||||||
|
|||||||
@ -52,7 +52,7 @@ import {
|
|||||||
IconTrash,
|
IconTrash,
|
||||||
IconTrashX,
|
IconTrashX,
|
||||||
IconUser,
|
IconUser,
|
||||||
} from 'twenty-ui';
|
} from 'twenty-ui/display';
|
||||||
|
|
||||||
export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<
|
export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<
|
||||||
| NoSelectionRecordActionKeys
|
| NoSelectionRecordActionKeys
|
||||||
|
|||||||
@ -26,7 +26,7 @@ import {
|
|||||||
IconPlayerPlay,
|
IconPlayerPlay,
|
||||||
IconPower,
|
IconPower,
|
||||||
IconVersions,
|
IconVersions,
|
||||||
} from 'twenty-ui';
|
} from 'twenty-ui/display';
|
||||||
|
|
||||||
export const WORKFLOW_ACTIONS_CONFIG = inheritActionsFromDefaultConfig({
|
export const WORKFLOW_ACTIONS_CONFIG = inheritActionsFromDefaultConfig({
|
||||||
config: {
|
config: {
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import {
|
|||||||
ActionMenuEntryType,
|
ActionMenuEntryType,
|
||||||
} from '@/action-menu/types/ActionMenuEntry';
|
} from '@/action-menu/types/ActionMenuEntry';
|
||||||
import { msg } from '@lingui/core/macro';
|
import { msg } from '@lingui/core/macro';
|
||||||
import { IconSettingsAutomation, IconVersions } from 'twenty-ui';
|
import { IconSettingsAutomation, IconVersions } from 'twenty-ui/display';
|
||||||
|
|
||||||
export const WORKFLOW_RUNS_ACTIONS_CONFIG = inheritActionsFromDefaultConfig({
|
export const WORKFLOW_RUNS_ACTIONS_CONFIG = inheritActionsFromDefaultConfig({
|
||||||
config: {
|
config: {
|
||||||
|
|||||||
@ -22,7 +22,7 @@ import {
|
|||||||
IconPencil,
|
IconPencil,
|
||||||
IconSettingsAutomation,
|
IconSettingsAutomation,
|
||||||
IconVersions,
|
IconVersions,
|
||||||
} from 'twenty-ui';
|
} from 'twenty-ui/display';
|
||||||
|
|
||||||
export const WORKFLOW_VERSIONS_ACTIONS_CONFIG = inheritActionsFromDefaultConfig(
|
export const WORKFLOW_VERSIONS_ACTIONS_CONFIG = inheritActionsFromDefaultConfig(
|
||||||
{
|
{
|
||||||
|
|||||||
@ -12,8 +12,8 @@ import { useRunWorkflowVersion } from '@/workflow/hooks/useRunWorkflowVersion';
|
|||||||
import { msg } from '@lingui/core/macro';
|
import { msg } from '@lingui/core/macro';
|
||||||
|
|
||||||
import { useRecoilValue } from 'recoil';
|
import { useRecoilValue } from 'recoil';
|
||||||
import { IconSettingsAutomation } from 'twenty-ui';
|
|
||||||
import { capitalize, isDefined } from 'twenty-shared/utils';
|
import { capitalize, isDefined } from 'twenty-shared/utils';
|
||||||
|
import { IconSettingsAutomation } from 'twenty-ui/display';
|
||||||
|
|
||||||
export const useWorkflowRunRecordActions = ({
|
export const useWorkflowRunRecordActions = ({
|
||||||
objectMetadataItem,
|
objectMetadataItem,
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import {
|
|||||||
ActionMenuEntryType,
|
ActionMenuEntryType,
|
||||||
} from '@/action-menu/types/ActionMenuEntry';
|
} from '@/action-menu/types/ActionMenuEntry';
|
||||||
import { msg } from '@lingui/core/macro';
|
import { msg } from '@lingui/core/macro';
|
||||||
import { IconSearch } from 'twenty-ui';
|
import { IconSearch } from 'twenty-ui/display';
|
||||||
|
|
||||||
export const RECORD_AGNOSTIC_ACTIONS_CONFIG: Record<
|
export const RECORD_AGNOSTIC_ACTIONS_CONFIG: Record<
|
||||||
string,
|
string,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { useCommandMenu } from '@/command-menu/hooks/useCommandMenu';
|
import { useCommandMenu } from '@/command-menu/hooks/useCommandMenu';
|
||||||
import { CommandMenuPages } from '@/command-menu/types/CommandMenuPages';
|
import { CommandMenuPages } from '@/command-menu/types/CommandMenuPages';
|
||||||
import { IconSearch } from 'twenty-ui';
|
import { IconSearch } from 'twenty-ui/display';
|
||||||
|
|
||||||
export const useSearchRecordsRecordAgnosticAction = () => {
|
export const useSearchRecordsRecordAgnosticAction = () => {
|
||||||
const { navigateCommandMenu } = useCommandMenu();
|
const { navigateCommandMenu } = useCommandMenu();
|
||||||
|
|||||||
@ -7,8 +7,8 @@ import { useRunWorkflowVersion } from '@/workflow/hooks/useRunWorkflowVersion';
|
|||||||
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
||||||
import { msg } from '@lingui/core/macro';
|
import { msg } from '@lingui/core/macro';
|
||||||
import { capitalize, isDefined } from 'twenty-shared/utils';
|
import { capitalize, isDefined } from 'twenty-shared/utils';
|
||||||
import { IconSettingsAutomation } from 'twenty-ui';
|
|
||||||
import { FeatureFlagKey } from '~/generated/graphql';
|
import { FeatureFlagKey } from '~/generated/graphql';
|
||||||
|
import { IconSettingsAutomation } from 'twenty-ui/display';
|
||||||
|
|
||||||
export const useRunWorkflowActions = () => {
|
export const useRunWorkflowActions = () => {
|
||||||
const isWorkflowEnabled = useIsFeatureEnabled(
|
const isWorkflowEnabled = useIsFeatureEnabled(
|
||||||
|
|||||||
@ -6,7 +6,8 @@ import {
|
|||||||
ActionMenuEntryType,
|
ActionMenuEntryType,
|
||||||
} from '@/action-menu/types/ActionMenuEntry';
|
} from '@/action-menu/types/ActionMenuEntry';
|
||||||
import { MessageDescriptor } from '@lingui/core';
|
import { MessageDescriptor } from '@lingui/core';
|
||||||
import { IconComponent, MenuItemAccent } from 'twenty-ui';
|
import { IconComponent } from 'twenty-ui/display';
|
||||||
|
import { MenuItemAccent } from 'twenty-ui/navigation';
|
||||||
|
|
||||||
export type RecordConfigAction = {
|
export type RecordConfigAction = {
|
||||||
type: ActionMenuEntryType;
|
type: ActionMenuEntryType;
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
|
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
|
||||||
import { AppHotkeyScope } from '@/ui/utilities/hotkey/types/AppHotkeyScope';
|
import { AppHotkeyScope } from '@/ui/utilities/hotkey/types/AppHotkeyScope';
|
||||||
import { Key } from 'ts-key-enum';
|
import { Key } from 'ts-key-enum';
|
||||||
import { Button, getOsControlSymbol } from 'twenty-ui';
|
import { Button } from 'twenty-ui/input';
|
||||||
|
import { getOsControlSymbol } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
export const CmdEnterActionButton = ({
|
export const CmdEnterActionButton = ({
|
||||||
title,
|
title,
|
||||||
|
|||||||
@ -12,7 +12,9 @@ import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/com
|
|||||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||||
import { useTheme } from '@emotion/react';
|
import { useTheme } from '@emotion/react';
|
||||||
import { i18n } from '@lingui/core';
|
import { i18n } from '@lingui/core';
|
||||||
import { Button, getOsControlSymbol, MenuItem } from 'twenty-ui';
|
import { Button } from 'twenty-ui/input';
|
||||||
|
import { getOsControlSymbol } from 'twenty-ui/utilities';
|
||||||
|
import { MenuItem } from 'twenty-ui/navigation';
|
||||||
|
|
||||||
export const CommandMenuActionMenuDropdown = () => {
|
export const CommandMenuActionMenuDropdown = () => {
|
||||||
const actionMenuEntries = useRecoilComponentValueV2(
|
const actionMenuEntries = useRecoilComponentValueV2(
|
||||||
|
|||||||
@ -2,13 +2,8 @@ import { actionMenuEntriesComponentSelector } from '@/action-menu/states/actionM
|
|||||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { i18n } from '@lingui/core';
|
import { i18n } from '@lingui/core';
|
||||||
import {
|
import { AppTooltip, TooltipDelay, TooltipPosition } from 'twenty-ui/display';
|
||||||
AppTooltip,
|
import { Button, IconButton } from 'twenty-ui/input';
|
||||||
Button,
|
|
||||||
IconButton,
|
|
||||||
TooltipDelay,
|
|
||||||
TooltipPosition,
|
|
||||||
} from 'twenty-ui';
|
|
||||||
|
|
||||||
const StyledWrapper = styled.div`
|
const StyledWrapper = styled.div`
|
||||||
font-size: ${({ theme }) => theme.font.size.md};
|
font-size: ${({ theme }) => theme.font.size.md};
|
||||||
|
|||||||
@ -11,8 +11,8 @@ import { isRecordIndexLoadMoreLockedComponentState } from '@/object-record/recor
|
|||||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||||
import { useSetRecoilComponentStateV2 } from '@/ui/utilities/state/component-state/hooks/useSetRecoilComponentStateV2';
|
import { useSetRecoilComponentStateV2 } from '@/ui/utilities/state/component-state/hooks/useSetRecoilComponentStateV2';
|
||||||
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
||||||
import { useIsMobile } from 'twenty-ui';
|
|
||||||
import { FeatureFlagKey } from '~/generated/graphql';
|
import { FeatureFlagKey } from '~/generated/graphql';
|
||||||
|
import { useIsMobile } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
export const RecordIndexActionMenu = ({ indexId }: { indexId: string }) => {
|
export const RecordIndexActionMenu = ({ indexId }: { indexId: string }) => {
|
||||||
const contextStoreCurrentObjectMetadataItemId = useRecoilComponentValueV2(
|
const contextStoreCurrentObjectMetadataItemId = useRecoilComponentValueV2(
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
import { useCommandMenu } from '@/command-menu/hooks/useCommandMenu';
|
import { useCommandMenu } from '@/command-menu/hooks/useCommandMenu';
|
||||||
import { useTheme } from '@emotion/react';
|
import { useTheme } from '@emotion/react';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { IconLayoutSidebarRightExpand, getOsControlSymbol } from 'twenty-ui';
|
import { IconLayoutSidebarRightExpand } from 'twenty-ui/display';
|
||||||
|
import { getOsControlSymbol } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
const StyledButton = styled.div`
|
const StyledButton = styled.div`
|
||||||
border-radius: ${({ theme }) => theme.border.radius.sm};
|
border-radius: ${({ theme }) => theme.border.radius.sm};
|
||||||
|
|||||||
@ -17,7 +17,8 @@ import { extractComponentState } from '@/ui/utilities/state/component-state/util
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { i18n } from '@lingui/core';
|
import { i18n } from '@lingui/core';
|
||||||
import { useRecoilValue } from 'recoil';
|
import { useRecoilValue } from 'recoil';
|
||||||
import { IconLayoutSidebarRightExpand, MenuItem } from 'twenty-ui';
|
import { IconLayoutSidebarRightExpand } from 'twenty-ui/display';
|
||||||
|
import { MenuItem } from 'twenty-ui/navigation';
|
||||||
|
|
||||||
const StyledDropdownMenuContainer = styled.div`
|
const StyledDropdownMenuContainer = styled.div`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -8,8 +8,8 @@ import { contextStoreCurrentObjectMetadataItemIdComponentState } from '@/context
|
|||||||
import { contextStoreTargetedRecordsRuleComponentState } from '@/context-store/states/contextStoreTargetedRecordsRuleComponentState';
|
import { contextStoreTargetedRecordsRuleComponentState } from '@/context-store/states/contextStoreTargetedRecordsRuleComponentState';
|
||||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||||
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
||||||
import { useIsMobile } from 'twenty-ui';
|
|
||||||
import { FeatureFlagKey } from '~/generated/graphql';
|
import { FeatureFlagKey } from '~/generated/graphql';
|
||||||
|
import { useIsMobile } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
export const RecordShowActionMenu = () => {
|
export const RecordShowActionMenu = () => {
|
||||||
const contextStoreCurrentObjectMetadataItemId = useRecoilComponentValueV2(
|
const contextStoreCurrentObjectMetadataItemId = useRecoilComponentValueV2(
|
||||||
|
|||||||
@ -21,8 +21,11 @@ import { useCallback } from 'react';
|
|||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { useRecoilValue } from 'recoil';
|
import { useRecoilValue } from 'recoil';
|
||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
import { Button, IconBrowserMaximize, getOsControlSymbol } from 'twenty-ui';
|
|
||||||
import { useNavigateApp } from '~/hooks/useNavigateApp';
|
import { useNavigateApp } from '~/hooks/useNavigateApp';
|
||||||
|
import { Button } from 'twenty-ui/input';
|
||||||
|
import { IconBrowserMaximize } from 'twenty-ui/display';
|
||||||
|
import { getOsControlSymbol } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
const StyledLink = styled(Link)`
|
const StyledLink = styled(Link)`
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
`;
|
`;
|
||||||
|
|||||||
@ -14,15 +14,13 @@ import { contextStoreNumberOfSelectedRecordsComponentState } from '@/context-sto
|
|||||||
import { contextStoreTargetedRecordsRuleComponentState } from '@/context-store/states/contextStoreTargetedRecordsRuleComponentState';
|
import { contextStoreTargetedRecordsRuleComponentState } from '@/context-store/states/contextStoreTargetedRecordsRuleComponentState';
|
||||||
import { msg } from '@lingui/core/macro';
|
import { msg } from '@lingui/core/macro';
|
||||||
import { userEvent, waitFor, within } from '@storybook/test';
|
import { userEvent, waitFor, within } from '@storybook/test';
|
||||||
|
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||||
import {
|
import {
|
||||||
ComponentDecorator,
|
ComponentDecorator,
|
||||||
IconFileExport,
|
|
||||||
IconHeart,
|
|
||||||
IconTrash,
|
|
||||||
MenuItemAccent,
|
|
||||||
getCanvasElementForDropdownTesting,
|
getCanvasElementForDropdownTesting,
|
||||||
} from 'twenty-ui';
|
} from 'twenty-ui/testing';
|
||||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
import { IconFileExport, IconHeart, IconTrash } from 'twenty-ui/display';
|
||||||
|
import { MenuItemAccent } from 'twenty-ui/navigation';
|
||||||
|
|
||||||
const deleteMock = jest.fn();
|
const deleteMock = jest.fn();
|
||||||
const addToFavoritesMock = jest.fn();
|
const addToFavoritesMock = jest.fn();
|
||||||
|
|||||||
@ -7,8 +7,9 @@ import { msg } from '@lingui/core/macro';
|
|||||||
import { expect, jest } from '@storybook/jest';
|
import { expect, jest } from '@storybook/jest';
|
||||||
import { Meta, StoryObj } from '@storybook/react';
|
import { Meta, StoryObj } from '@storybook/react';
|
||||||
import { userEvent, within } from '@storybook/testing-library';
|
import { userEvent, within } from '@storybook/testing-library';
|
||||||
import { ComponentDecorator, IconCheckbox, IconTrash } from 'twenty-ui';
|
|
||||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||||
|
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||||
|
import { IconCheckbox, IconTrash } from 'twenty-ui/display';
|
||||||
|
|
||||||
const meta: Meta<typeof RecordIndexActionMenuBarEntry> = {
|
const meta: Meta<typeof RecordIndexActionMenuBarEntry> = {
|
||||||
title: 'Modules/ActionMenu/RecordIndexActionMenuBarEntry',
|
title: 'Modules/ActionMenu/RecordIndexActionMenuBarEntry',
|
||||||
|
|||||||
@ -15,13 +15,9 @@ import {
|
|||||||
import { isDropdownOpenComponentState } from '@/ui/layout/dropdown/states/isDropdownOpenComponentState';
|
import { isDropdownOpenComponentState } from '@/ui/layout/dropdown/states/isDropdownOpenComponentState';
|
||||||
import { extractComponentState } from '@/ui/utilities/state/component-state/utils/extractComponentState';
|
import { extractComponentState } from '@/ui/utilities/state/component-state/utils/extractComponentState';
|
||||||
import { msg } from '@lingui/core/macro';
|
import { msg } from '@lingui/core/macro';
|
||||||
import {
|
|
||||||
IconCheckbox,
|
|
||||||
IconHeart,
|
|
||||||
IconTrash,
|
|
||||||
getCanvasElementForDropdownTesting,
|
|
||||||
} from 'twenty-ui';
|
|
||||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||||
|
import { IconCheckbox, IconHeart, IconTrash } from 'twenty-ui/display';
|
||||||
|
import { getCanvasElementForDropdownTesting } from 'twenty-ui/testing';
|
||||||
|
|
||||||
const deleteMock = jest.fn();
|
const deleteMock = jest.fn();
|
||||||
const markAsDoneMock = jest.fn();
|
const markAsDoneMock = jest.fn();
|
||||||
|
|||||||
@ -2,7 +2,8 @@ import { ActionViewType } from '@/action-menu/actions/types/ActionViewType';
|
|||||||
import { ConfirmationModalProps } from '@/ui/layout/modal/components/ConfirmationModal';
|
import { ConfirmationModalProps } from '@/ui/layout/modal/components/ConfirmationModal';
|
||||||
import { MessageDescriptor } from '@lingui/core';
|
import { MessageDescriptor } from '@lingui/core';
|
||||||
import { MouseEvent, ReactElement } from 'react';
|
import { MouseEvent, ReactElement } from 'react';
|
||||||
import { IconComponent, MenuItemAccent } from 'twenty-ui';
|
import { IconComponent } from 'twenty-ui/display';
|
||||||
|
import { MenuItemAccent } from 'twenty-ui/navigation';
|
||||||
|
|
||||||
export enum ActionMenuEntryType {
|
export enum ActionMenuEntryType {
|
||||||
Standard = 'Standard',
|
Standard = 'Standard',
|
||||||
|
|||||||
@ -2,13 +2,13 @@ import { createReactBlockSpec } from '@blocknote/react';
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { isNonEmptyString } from '@sniptt/guards';
|
import { isNonEmptyString } from '@sniptt/guards';
|
||||||
import { ChangeEvent, useRef } from 'react';
|
import { ChangeEvent, useRef } from 'react';
|
||||||
import { Button } from 'twenty-ui';
|
|
||||||
import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';
|
import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';
|
||||||
|
|
||||||
import { AttachmentIcon } from '../../files/components/AttachmentIcon';
|
import { AttachmentIcon } from '../../files/components/AttachmentIcon';
|
||||||
import { AttachmentType } from '../../files/types/Attachment';
|
import { AttachmentType } from '../../files/types/Attachment';
|
||||||
import { getFileType } from '../../files/utils/getFileType';
|
import { getFileType } from '../../files/utils/getFileType';
|
||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
|
import { Button } from 'twenty-ui/input';
|
||||||
|
|
||||||
const StyledFileInput = styled.input`
|
const StyledFileInput = styled.input`
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
import { getDefaultReactSlashMenuItems } from '@blocknote/react';
|
import { getDefaultReactSlashMenuItems } from '@blocknote/react';
|
||||||
|
|
||||||
|
import { SuggestionItem } from '@/ui/input/editor/components/CustomSlashMenu';
|
||||||
|
|
||||||
|
import { BLOCK_SCHEMA } from '../constants/Schema';
|
||||||
import {
|
import {
|
||||||
IconCode,
|
IconCode,
|
||||||
IconComponent,
|
IconComponent,
|
||||||
@ -15,11 +19,7 @@ import {
|
|||||||
IconPilcrow,
|
IconPilcrow,
|
||||||
IconTable,
|
IconTable,
|
||||||
IconVideo,
|
IconVideo,
|
||||||
} from 'twenty-ui';
|
} from 'twenty-ui/display';
|
||||||
|
|
||||||
import { SuggestionItem } from '@/ui/input/editor/components/CustomSlashMenu';
|
|
||||||
|
|
||||||
import { BLOCK_SCHEMA } from '../constants/Schema';
|
|
||||||
|
|
||||||
const Icons: Record<string, IconComponent> = {
|
const Icons: Record<string, IconComponent> = {
|
||||||
'Heading 1': IconH1,
|
'Heading 1': IconH1,
|
||||||
|
|||||||
@ -1,15 +1,5 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { format, getYear } from 'date-fns';
|
import { format, getYear } from 'date-fns';
|
||||||
import {
|
|
||||||
AnimatedPlaceholder,
|
|
||||||
AnimatedPlaceholderEmptyContainer,
|
|
||||||
AnimatedPlaceholderEmptySubTitle,
|
|
||||||
AnimatedPlaceholderEmptyTextContainer,
|
|
||||||
AnimatedPlaceholderEmptyTitle,
|
|
||||||
EMPTY_PLACEHOLDER_TRANSITION_PROPS,
|
|
||||||
H3Title,
|
|
||||||
Section,
|
|
||||||
} from 'twenty-ui';
|
|
||||||
|
|
||||||
import { CalendarMonthCard } from '@/activities/calendar/components/CalendarMonthCard';
|
import { CalendarMonthCard } from '@/activities/calendar/components/CalendarMonthCard';
|
||||||
import { TIMELINE_CALENDAR_EVENTS_DEFAULT_PAGE_SIZE } from '@/activities/calendar/constants/Calendar';
|
import { TIMELINE_CALENDAR_EVENTS_DEFAULT_PAGE_SIZE } from '@/activities/calendar/constants/Calendar';
|
||||||
@ -23,6 +13,16 @@ import { useCustomResolver } from '@/activities/hooks/useCustomResolver';
|
|||||||
import { ActivityTargetableObject } from '@/activities/types/ActivityTargetableEntity';
|
import { ActivityTargetableObject } from '@/activities/types/ActivityTargetableEntity';
|
||||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||||
import { TimelineCalendarEventsWithTotal } from '~/generated/graphql';
|
import { TimelineCalendarEventsWithTotal } from '~/generated/graphql';
|
||||||
|
import {
|
||||||
|
AnimatedPlaceholder,
|
||||||
|
AnimatedPlaceholderEmptyContainer,
|
||||||
|
AnimatedPlaceholderEmptySubTitle,
|
||||||
|
AnimatedPlaceholderEmptyTextContainer,
|
||||||
|
AnimatedPlaceholderEmptyTitle,
|
||||||
|
EMPTY_PLACEHOLDER_TRANSITION_PROPS,
|
||||||
|
Section,
|
||||||
|
} from 'twenty-ui/layout';
|
||||||
|
import { H3Title } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledContainer = styled.div`
|
const StyledContainer = styled.div`
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import { differenceInSeconds, endOfDay, format } from 'date-fns';
|
|||||||
|
|
||||||
import { CalendarEventRow } from '@/activities/calendar/components/CalendarEventRow';
|
import { CalendarEventRow } from '@/activities/calendar/components/CalendarEventRow';
|
||||||
import { getCalendarEventStartDate } from '@/activities/calendar/utils/getCalendarEventStartDate';
|
import { getCalendarEventStartDate } from '@/activities/calendar/utils/getCalendarEventStartDate';
|
||||||
import { CardContent } from 'twenty-ui';
|
|
||||||
import { TimelineCalendarEvent } from '~/generated/graphql';
|
import { TimelineCalendarEvent } from '~/generated/graphql';
|
||||||
|
import { CardContent } from 'twenty-ui/layout';
|
||||||
|
|
||||||
type CalendarDayCardContentProps = {
|
type CalendarDayCardContentProps = {
|
||||||
calendarEvents: TimelineCalendarEvent[];
|
calendarEvents: TimelineCalendarEvent[];
|
||||||
|
|||||||
@ -1,12 +1,5 @@
|
|||||||
import { css, useTheme } from '@emotion/react';
|
import { css, useTheme } from '@emotion/react';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import {
|
|
||||||
Chip,
|
|
||||||
ChipAccent,
|
|
||||||
ChipSize,
|
|
||||||
ChipVariant,
|
|
||||||
IconCalendarEvent,
|
|
||||||
} from 'twenty-ui';
|
|
||||||
|
|
||||||
import { CalendarEventParticipantsResponseStatus } from '@/activities/calendar/components/CalendarEventParticipantsResponseStatus';
|
import { CalendarEventParticipantsResponseStatus } from '@/activities/calendar/components/CalendarEventParticipantsResponseStatus';
|
||||||
import { CalendarEvent } from '@/activities/calendar/types/CalendarEvent';
|
import { CalendarEvent } from '@/activities/calendar/types/CalendarEvent';
|
||||||
@ -20,6 +13,8 @@ import { PropertyBox } from '@/object-record/record-inline-cell/property-box/com
|
|||||||
import { getRecordFieldInputId } from '@/object-record/utils/getRecordFieldInputId';
|
import { getRecordFieldInputId } from '@/object-record/utils/getRecordFieldInputId';
|
||||||
import { mapArrayToObject } from '~/utils/array/mapArrayToObject';
|
import { mapArrayToObject } from '~/utils/array/mapArrayToObject';
|
||||||
import { beautifyPastDateRelativeToNow } from '~/utils/date-utils';
|
import { beautifyPastDateRelativeToNow } from '~/utils/date-utils';
|
||||||
|
import { Chip, ChipAccent, ChipSize, ChipVariant } from 'twenty-ui/components';
|
||||||
|
import { IconCalendarEvent } from 'twenty-ui/display';
|
||||||
|
|
||||||
type CalendarEventDetailsProps = {
|
type CalendarEventDetailsProps = {
|
||||||
calendarEvent: CalendarEvent;
|
calendarEvent: CalendarEvent;
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
import { useTheme } from '@emotion/react';
|
import { useTheme } from '@emotion/react';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
import { IconCheck, IconQuestionMark, IconX } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { CalendarEventParticipant } from '@/activities/calendar/types/CalendarEventParticipant';
|
import { CalendarEventParticipant } from '@/activities/calendar/types/CalendarEventParticipant';
|
||||||
import { ParticipantChip } from '@/activities/components/ParticipantChip';
|
import { ParticipantChip } from '@/activities/components/ParticipantChip';
|
||||||
import { PropertyBox } from '@/object-record/record-inline-cell/property-box/components/PropertyBox';
|
import { PropertyBox } from '@/object-record/record-inline-cell/property-box/components/PropertyBox';
|
||||||
import { EllipsisDisplay } from '@/ui/field/display/components/EllipsisDisplay';
|
import { EllipsisDisplay } from '@/ui/field/display/components/EllipsisDisplay';
|
||||||
import { ExpandableList } from '@/ui/layout/expandable-list/components/ExpandableList';
|
import { ExpandableList } from '@/ui/layout/expandable-list/components/ExpandableList';
|
||||||
|
import { IconCheck, IconQuestionMark, IconX } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledInlineCellBaseContainer = styled.div`
|
const StyledInlineCellBaseContainer = styled.div`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -11,19 +11,18 @@ import { getCalendarEventStartDate } from '@/activities/calendar/utils/getCalend
|
|||||||
import { hasCalendarEventEnded } from '@/activities/calendar/utils/hasCalendarEventEnded';
|
import { hasCalendarEventEnded } from '@/activities/calendar/utils/hasCalendarEventEnded';
|
||||||
import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';
|
import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';
|
||||||
import { useOpenCalendarEventInCommandMenu } from '@/command-menu/hooks/useOpenCalendarEventInCommandMenu';
|
import { useOpenCalendarEventInCommandMenu } from '@/command-menu/hooks/useOpenCalendarEventInCommandMenu';
|
||||||
import {
|
|
||||||
Avatar,
|
|
||||||
AvatarGroup,
|
|
||||||
Card,
|
|
||||||
CardContent,
|
|
||||||
IconArrowRight,
|
|
||||||
IconLock,
|
|
||||||
} from 'twenty-ui';
|
|
||||||
import {
|
import {
|
||||||
CalendarChannelVisibility,
|
CalendarChannelVisibility,
|
||||||
TimelineCalendarEvent,
|
TimelineCalendarEvent,
|
||||||
} from '~/generated-metadata/graphql';
|
} from '~/generated-metadata/graphql';
|
||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
|
import {
|
||||||
|
Avatar,
|
||||||
|
AvatarGroup,
|
||||||
|
IconArrowRight,
|
||||||
|
IconLock,
|
||||||
|
} from 'twenty-ui/display';
|
||||||
|
import { Card, CardContent } from 'twenty-ui/layout';
|
||||||
|
|
||||||
type CalendarEventRowProps = {
|
type CalendarEventRowProps = {
|
||||||
calendarEvent: TimelineCalendarEvent;
|
calendarEvent: TimelineCalendarEvent;
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { useContext } from 'react';
|
|||||||
|
|
||||||
import { CalendarDayCardContent } from '@/activities/calendar/components/CalendarDayCardContent';
|
import { CalendarDayCardContent } from '@/activities/calendar/components/CalendarDayCardContent';
|
||||||
import { CalendarContext } from '@/activities/calendar/contexts/CalendarContext';
|
import { CalendarContext } from '@/activities/calendar/contexts/CalendarContext';
|
||||||
import { Card } from 'twenty-ui';
|
import { Card } from 'twenty-ui/layout';
|
||||||
|
|
||||||
type CalendarMonthCardProps = {
|
type CalendarMonthCardProps = {
|
||||||
dayTimes: number[];
|
dayTimes: number[];
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import { getOperationName } from '@apollo/client/utilities';
|
import { getOperationName } from '@apollo/client/utilities';
|
||||||
import { Meta, StoryObj } from '@storybook/react';
|
import { Meta, StoryObj } from '@storybook/react';
|
||||||
import { HttpResponse, graphql } from 'msw';
|
import { HttpResponse, graphql } from 'msw';
|
||||||
import { ComponentDecorator } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { Calendar } from '@/activities/calendar/components/Calendar';
|
import { Calendar } from '@/activities/calendar/components/Calendar';
|
||||||
import { getTimelineCalendarEventsFromCompanyId } from '@/activities/calendar/graphql/queries/getTimelineCalendarEventsFromCompanyId';
|
import { getTimelineCalendarEventsFromCompanyId } from '@/activities/calendar/graphql/queries/getTimelineCalendarEventsFromCompanyId';
|
||||||
@ -9,6 +8,7 @@ import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadat
|
|||||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||||
import { mockedTimelineCalendarEvents } from '~/testing/mock-data/timeline-calendar-events';
|
import { mockedTimelineCalendarEvents } from '~/testing/mock-data/timeline-calendar-events';
|
||||||
|
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||||
|
|
||||||
const meta: Meta<typeof Calendar> = {
|
const meta: Meta<typeof Calendar> = {
|
||||||
title: 'Modules/Activities/Calendar/Calendar',
|
title: 'Modules/Activities/Calendar/Calendar',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { Card } from 'twenty-ui';
|
import { Card } from 'twenty-ui/layout';
|
||||||
|
|
||||||
const StyledList = styled(Card)`
|
const StyledList = styled(Card)`
|
||||||
& > :not(:last-child) {
|
& > :not(:last-child) {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { CardContent } from 'twenty-ui';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { CardContent } from 'twenty-ui/layout';
|
||||||
|
|
||||||
const StyledRowContent = styled(CardContent)<{
|
const StyledRowContent = styled(CardContent)<{
|
||||||
clickable?: boolean;
|
clickable?: boolean;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { useInView } from 'react-intersection-observer';
|
import { useInView } from 'react-intersection-observer';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { GRAY_SCALE } from 'twenty-ui';
|
import { GRAY_SCALE } from 'twenty-ui/theme';
|
||||||
|
|
||||||
type CustomResolverFetchMoreLoaderProps = {
|
type CustomResolverFetchMoreLoaderProps = {
|
||||||
loading: boolean;
|
loading: boolean;
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { Avatar } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { getDisplayNameFromParticipant } from '@/activities/emails/utils/getDisplayNameFromParticipant';
|
import { getDisplayNameFromParticipant } from '@/activities/emails/utils/getDisplayNameFromParticipant';
|
||||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||||
import { RecordChip } from '@/object-record/components/RecordChip';
|
import { RecordChip } from '@/object-record/components/RecordChip';
|
||||||
|
import { Avatar } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledAvatar = styled(Avatar)`
|
const StyledAvatar = styled(Avatar)`
|
||||||
margin-right: ${({ theme }) => theme.spacing(1)};
|
margin-right: ${({ theme }) => theme.spacing(1)};
|
||||||
|
|||||||
@ -3,8 +3,8 @@ import {
|
|||||||
AnimatedPlaceholderEmptyContainer,
|
AnimatedPlaceholderEmptyContainer,
|
||||||
AnimatedPlaceholderEmptyTextContainer,
|
AnimatedPlaceholderEmptyTextContainer,
|
||||||
AnimatedPlaceholderEmptyTitle,
|
AnimatedPlaceholderEmptyTitle,
|
||||||
Loader,
|
} from 'twenty-ui/layout';
|
||||||
} from 'twenty-ui';
|
import { Loader } from 'twenty-ui/feedback';
|
||||||
|
|
||||||
export const EmailLoader = ({ loadingText }: { loadingText?: string }) => (
|
export const EmailLoader = ({ loadingText }: { loadingText?: string }) => (
|
||||||
<AnimatedPlaceholderEmptyContainer>
|
<AnimatedPlaceholderEmptyContainer>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { Button, IconArrowBackUp, IconUserCircle } from 'twenty-ui';
|
import { Button } from 'twenty-ui/input';
|
||||||
|
import { IconArrowBackUp, IconUserCircle } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledThreadBottomBar = styled.div`
|
const StyledThreadBottomBar = styled.div`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import { AnimatedEaseInOut } from 'twenty-ui';
|
import { AnimatedEaseInOut } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
const StyledThreadMessageBody = styled(motion.div)`
|
const StyledThreadMessageBody = styled(motion.div)`
|
||||||
color: ${({ theme }) => theme.font.color.primary};
|
color: ${({ theme }) => theme.font.color.primary};
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { OverflowingTextWithTooltip } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { EmailThreadMessageParticipant } from '@/activities/emails/types/EmailThreadMessageParticipant';
|
import { EmailThreadMessageParticipant } from '@/activities/emails/types/EmailThreadMessageParticipant';
|
||||||
import { getDisplayNameFromParticipant } from '@/activities/emails/utils/getDisplayNameFromParticipant';
|
import { getDisplayNameFromParticipant } from '@/activities/emails/utils/getDisplayNameFromParticipant';
|
||||||
|
import { OverflowingTextWithTooltip } from 'twenty-ui/display';
|
||||||
|
|
||||||
type EmailThreadMessageReceiversProps = {
|
type EmailThreadMessageReceiversProps = {
|
||||||
receivers: EmailThreadMessageParticipant[];
|
receivers: EmailThreadMessageParticipant[];
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { useTheme } from '@emotion/react';
|
import { useTheme } from '@emotion/react';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { IconLock } from 'twenty-ui';
|
import { IconLock } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledContainer = styled.div`
|
const StyledContainer = styled.div`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { Avatar, GRAY_SCALE } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { ActivityRow } from '@/activities/components/ActivityRow';
|
import { ActivityRow } from '@/activities/components/ActivityRow';
|
||||||
import { EmailThreadNotShared } from '@/activities/emails/components/EmailThreadNotShared';
|
import { EmailThreadNotShared } from '@/activities/emails/components/EmailThreadNotShared';
|
||||||
import { useOpenEmailThreadInCommandMenu } from '@/command-menu/hooks/useOpenEmailThreadInCommandMenu';
|
import { useOpenEmailThreadInCommandMenu } from '@/command-menu/hooks/useOpenEmailThreadInCommandMenu';
|
||||||
import { MessageChannelVisibility, TimelineThread } from '~/generated/graphql';
|
import { MessageChannelVisibility, TimelineThread } from '~/generated/graphql';
|
||||||
import { formatToHumanReadableDate } from '~/utils/date-utils';
|
import { formatToHumanReadableDate } from '~/utils/date-utils';
|
||||||
|
import { Avatar } from 'twenty-ui/display';
|
||||||
|
import { GRAY_SCALE } from 'twenty-ui/theme';
|
||||||
|
|
||||||
const StyledHeading = styled.div<{ unread: boolean }>`
|
const StyledHeading = styled.div<{ unread: boolean }>`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -1,15 +1,4 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import {
|
|
||||||
AnimatedPlaceholder,
|
|
||||||
AnimatedPlaceholderEmptyContainer,
|
|
||||||
AnimatedPlaceholderEmptySubTitle,
|
|
||||||
AnimatedPlaceholderEmptyTextContainer,
|
|
||||||
AnimatedPlaceholderEmptyTitle,
|
|
||||||
EMPTY_PLACEHOLDER_TRANSITION_PROPS,
|
|
||||||
H1Title,
|
|
||||||
H1TitleFontColor,
|
|
||||||
Section,
|
|
||||||
} from 'twenty-ui';
|
|
||||||
|
|
||||||
import { ActivityList } from '@/activities/components/ActivityList';
|
import { ActivityList } from '@/activities/components/ActivityList';
|
||||||
import { CustomResolverFetchMoreLoader } from '@/activities/components/CustomResolverFetchMoreLoader';
|
import { CustomResolverFetchMoreLoader } from '@/activities/components/CustomResolverFetchMoreLoader';
|
||||||
@ -22,6 +11,16 @@ import { useCustomResolver } from '@/activities/hooks/useCustomResolver';
|
|||||||
import { ActivityTargetableObject } from '@/activities/types/ActivityTargetableEntity';
|
import { ActivityTargetableObject } from '@/activities/types/ActivityTargetableEntity';
|
||||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||||
import { TimelineThread, TimelineThreadsWithTotal } from '~/generated/graphql';
|
import { TimelineThread, TimelineThreadsWithTotal } from '~/generated/graphql';
|
||||||
|
import {
|
||||||
|
AnimatedPlaceholder,
|
||||||
|
AnimatedPlaceholderEmptyContainer,
|
||||||
|
AnimatedPlaceholderEmptySubTitle,
|
||||||
|
AnimatedPlaceholderEmptyTextContainer,
|
||||||
|
AnimatedPlaceholderEmptyTitle,
|
||||||
|
EMPTY_PLACEHOLDER_TRANSITION_PROPS,
|
||||||
|
Section,
|
||||||
|
} from 'twenty-ui/layout';
|
||||||
|
import { H1Title, H1TitleFontColor } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledContainer = styled.div`
|
const StyledContainer = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -2,7 +2,8 @@ import { MessageThreadSubscriber } from '@/activities/emails/types/MessageThread
|
|||||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||||
import { useCreateOneRecord } from '@/object-record/hooks/useCreateOneRecord';
|
import { useCreateOneRecord } from '@/object-record/hooks/useCreateOneRecord';
|
||||||
import { WorkspaceMember } from '@/workspace-member/types/WorkspaceMember';
|
import { WorkspaceMember } from '@/workspace-member/types/WorkspaceMember';
|
||||||
import { IconPlus, MenuItemAvatar } from 'twenty-ui';
|
import { IconPlus } from 'twenty-ui/display';
|
||||||
|
import { MenuItemAvatar } from 'twenty-ui/navigation';
|
||||||
|
|
||||||
export const MessageThreadSubscriberDropdownAddSubscriberMenuItem = ({
|
export const MessageThreadSubscriberDropdownAddSubscriberMenuItem = ({
|
||||||
workspaceMember,
|
workspaceMember,
|
||||||
|
|||||||
@ -1,14 +1,9 @@
|
|||||||
import { MessageThreadSubscriber } from '@/activities/emails/types/MessageThreadSubscriber';
|
import { MessageThreadSubscriber } from '@/activities/emails/types/MessageThreadSubscriber';
|
||||||
import { isNonEmptyString } from '@sniptt/guards';
|
import { isNonEmptyString } from '@sniptt/guards';
|
||||||
import { useContext } from 'react';
|
import { useContext } from 'react';
|
||||||
import {
|
import { Avatar, AvatarGroup, IconChevronDown } from 'twenty-ui/display';
|
||||||
Avatar,
|
import { Chip, ChipVariant } from 'twenty-ui/components';
|
||||||
AvatarGroup,
|
import { ThemeContext } from 'twenty-ui/theme';
|
||||||
Chip,
|
|
||||||
ChipVariant,
|
|
||||||
IconChevronDown,
|
|
||||||
ThemeContext,
|
|
||||||
} from 'twenty-ui';
|
|
||||||
|
|
||||||
const MAX_NUMBER_OF_AVATARS = 3;
|
const MAX_NUMBER_OF_AVATARS = 3;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { offset } from '@floating-ui/react';
|
import { offset } from '@floating-ui/react';
|
||||||
import { IconMinus, IconPlus, MenuItem, MenuItemAvatar } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { MessageThreadSubscriberDropdownAddSubscriber } from '@/activities/emails/components/MessageThreadSubscriberDropdownAddSubscriber';
|
import { MessageThreadSubscriberDropdownAddSubscriber } from '@/activities/emails/components/MessageThreadSubscriberDropdownAddSubscriber';
|
||||||
import { MessageThreadSubscribersChip } from '@/activities/emails/components/MessageThreadSubscribersChip';
|
import { MessageThreadSubscribersChip } from '@/activities/emails/components/MessageThreadSubscribersChip';
|
||||||
@ -11,6 +10,8 @@ import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownM
|
|||||||
import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown';
|
import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown';
|
||||||
import { useListenRightDrawerClose } from '@/ui/layout/right-drawer/hooks/useListenRightDrawerClose';
|
import { useListenRightDrawerClose } from '@/ui/layout/right-drawer/hooks/useListenRightDrawerClose';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
import { IconMinus, IconPlus } from 'twenty-ui/display';
|
||||||
|
import { MenuItem, MenuItemAvatar } from 'twenty-ui/navigation';
|
||||||
|
|
||||||
export const MESSAGE_THREAD_SUBSCRIBER_DROPDOWN_ID =
|
export const MESSAGE_THREAD_SUBSCRIBER_DROPDOWN_ID =
|
||||||
'message-thread-subscriber';
|
'message-thread-subscriber';
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { createState } from '@ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
export const emailThreadIdWhenEmailThreadWasClosedState = createState<
|
export const emailThreadIdWhenEmailThreadWasClosedState = createState<
|
||||||
string | null
|
string | null
|
||||||
>({
|
>({
|
||||||
|
|||||||
@ -1,15 +1,14 @@
|
|||||||
|
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
|
||||||
|
import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';
|
||||||
|
import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown';
|
||||||
import {
|
import {
|
||||||
IconDotsVertical,
|
IconDotsVertical,
|
||||||
IconDownload,
|
IconDownload,
|
||||||
IconPencil,
|
IconPencil,
|
||||||
IconTrash,
|
IconTrash,
|
||||||
LightIconButton,
|
} from 'twenty-ui/display';
|
||||||
MenuItem,
|
import { LightIconButton } from 'twenty-ui/input';
|
||||||
} from 'twenty-ui';
|
import { MenuItem } from 'twenty-ui/navigation';
|
||||||
|
|
||||||
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
|
|
||||||
import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';
|
|
||||||
import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown';
|
|
||||||
|
|
||||||
type AttachmentDropdownProps = {
|
type AttachmentDropdownProps = {
|
||||||
onDownload: () => void;
|
onDownload: () => void;
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
import { useTheme } from '@emotion/react';
|
import { useTheme } from '@emotion/react';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
|
|
||||||
|
import { AttachmentType } from '@/activities/files/types/Attachment';
|
||||||
import {
|
import {
|
||||||
IconComponent,
|
IconComponent,
|
||||||
IconFile,
|
IconFile,
|
||||||
@ -10,9 +12,7 @@ import {
|
|||||||
IconPresentation,
|
IconPresentation,
|
||||||
IconTable,
|
IconTable,
|
||||||
IconVideo,
|
IconVideo,
|
||||||
} from 'twenty-ui';
|
} from 'twenty-ui/display';
|
||||||
|
|
||||||
import { AttachmentType } from '@/activities/files/types/Attachment';
|
|
||||||
|
|
||||||
const StyledIconContainer = styled.div<{ background: string }>`
|
const StyledIconContainer = styled.div<{ background: string }>`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { lazy, ReactElement, Suspense, useState } from 'react';
|
import { lazy, ReactElement, Suspense, useState } from 'react';
|
||||||
import { IconButton, IconDownload, IconX } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { DropZone } from '@/activities/files/components/DropZone';
|
import { DropZone } from '@/activities/files/components/DropZone';
|
||||||
import { useUploadAttachmentFile } from '@/activities/files/hooks/useUploadAttachmentFile';
|
import { useUploadAttachmentFile } from '@/activities/files/hooks/useUploadAttachmentFile';
|
||||||
@ -14,6 +13,8 @@ import { useRecoilValue } from 'recoil';
|
|||||||
import { ActivityList } from '@/activities/components/ActivityList';
|
import { ActivityList } from '@/activities/components/ActivityList';
|
||||||
import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';
|
import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';
|
||||||
import { AttachmentRow } from './AttachmentRow';
|
import { AttachmentRow } from './AttachmentRow';
|
||||||
|
import { IconButton } from 'twenty-ui/input';
|
||||||
|
import { IconDownload, IconX } from 'twenty-ui/display';
|
||||||
|
|
||||||
const DocumentViewer = lazy(() =>
|
const DocumentViewer = lazy(() =>
|
||||||
import('@/activities/files/components/DocumentViewer').then((module) => ({
|
import('@/activities/files/components/DocumentViewer').then((module) => ({
|
||||||
|
|||||||
@ -16,14 +16,11 @@ import { useTheme } from '@emotion/react';
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
import {
|
|
||||||
IconCalendar,
|
|
||||||
OverflowingTextWithTooltip,
|
|
||||||
isModifiedEvent,
|
|
||||||
} from 'twenty-ui';
|
|
||||||
|
|
||||||
import { formatToHumanReadableDate } from '~/utils/date-utils';
|
import { formatToHumanReadableDate } from '~/utils/date-utils';
|
||||||
import { getFileNameAndExtension } from '~/utils/file/getFileNameAndExtension';
|
import { getFileNameAndExtension } from '~/utils/file/getFileNameAndExtension';
|
||||||
|
import { IconCalendar, OverflowingTextWithTooltip } from 'twenty-ui/display';
|
||||||
|
import { isModifiedEvent } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
const StyledLeftContent = styled.div`
|
const StyledLeftContent = styled.div`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -1,15 +1,5 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { ChangeEvent, useRef, useState } from 'react';
|
import { ChangeEvent, useRef, useState } from 'react';
|
||||||
import {
|
|
||||||
AnimatedPlaceholder,
|
|
||||||
AnimatedPlaceholderEmptyContainer,
|
|
||||||
AnimatedPlaceholderEmptySubTitle,
|
|
||||||
AnimatedPlaceholderEmptyTextContainer,
|
|
||||||
AnimatedPlaceholderEmptyTitle,
|
|
||||||
Button,
|
|
||||||
EMPTY_PLACEHOLDER_TRANSITION_PROPS,
|
|
||||||
IconPlus,
|
|
||||||
} from 'twenty-ui';
|
|
||||||
|
|
||||||
import { SkeletonLoader } from '@/activities/components/SkeletonLoader';
|
import { SkeletonLoader } from '@/activities/components/SkeletonLoader';
|
||||||
import { AttachmentList } from '@/activities/files/components/AttachmentList';
|
import { AttachmentList } from '@/activities/files/components/AttachmentList';
|
||||||
@ -19,6 +9,16 @@ import { useUploadAttachmentFile } from '@/activities/files/hooks/useUploadAttac
|
|||||||
import { ActivityTargetableObject } from '@/activities/types/ActivityTargetableEntity';
|
import { ActivityTargetableObject } from '@/activities/types/ActivityTargetableEntity';
|
||||||
import { useHasObjectReadOnlyPermission } from '@/settings/roles/hooks/useHasObjectReadOnlyPermission';
|
import { useHasObjectReadOnlyPermission } from '@/settings/roles/hooks/useHasObjectReadOnlyPermission';
|
||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
|
import {
|
||||||
|
AnimatedPlaceholder,
|
||||||
|
AnimatedPlaceholderEmptyContainer,
|
||||||
|
AnimatedPlaceholderEmptySubTitle,
|
||||||
|
AnimatedPlaceholderEmptyTextContainer,
|
||||||
|
AnimatedPlaceholderEmptyTitle,
|
||||||
|
EMPTY_PLACEHOLDER_TRANSITION_PROPS,
|
||||||
|
} from 'twenty-ui/layout';
|
||||||
|
import { Button } from 'twenty-ui/input';
|
||||||
|
import { IconPlus } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledAttachmentsContainer = styled.div`
|
const StyledAttachmentsContainer = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { useDropzone } from 'react-dropzone';
|
import { useDropzone } from 'react-dropzone';
|
||||||
import { useTheme } from '@emotion/react';
|
import { useTheme } from '@emotion/react';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { IconUpload } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal';
|
import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal';
|
||||||
|
import { IconUpload } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledContainer = styled.div`
|
const StyledContainer = styled.div`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { useContext } from 'react';
|
import { useContext } from 'react';
|
||||||
import { IconArrowUpRight, IconPencil } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { ActivityTargetChips } from '@/activities/components/ActivityTargetChips';
|
import { ActivityTargetChips } from '@/activities/components/ActivityTargetChips';
|
||||||
import { useActivityTargetObjectRecords } from '@/activities/hooks/useActivityTargetObjectRecords';
|
import { useActivityTargetObjectRecords } from '@/activities/hooks/useActivityTargetObjectRecords';
|
||||||
@ -16,6 +15,7 @@ import { RecordInlineCellContext } from '@/object-record/record-inline-cell/comp
|
|||||||
import { useInlineCell } from '@/object-record/record-inline-cell/hooks/useInlineCell';
|
import { useInlineCell } from '@/object-record/record-inline-cell/hooks/useInlineCell';
|
||||||
import { MultipleRecordPicker } from '@/object-record/record-picker/multiple-record-picker/components/MultipleRecordPicker';
|
import { MultipleRecordPicker } from '@/object-record/record-picker/multiple-record-picker/components/MultipleRecordPicker';
|
||||||
import { MultipleRecordPickerHotkeyScope } from '@/object-record/record-picker/multiple-record-picker/types/MultipleRecordPickerHotkeyScope';
|
import { MultipleRecordPickerHotkeyScope } from '@/object-record/record-picker/multiple-record-picker/types/MultipleRecordPickerHotkeyScope';
|
||||||
|
import { IconArrowUpRight, IconPencil } from 'twenty-ui/display';
|
||||||
|
|
||||||
type ActivityTargetsInlineCellProps = {
|
type ActivityTargetsInlineCellProps = {
|
||||||
activityRecordId: string;
|
activityRecordId: string;
|
||||||
|
|||||||
@ -12,10 +12,10 @@ import {
|
|||||||
AnimatedPlaceholderEmptySubTitle,
|
AnimatedPlaceholderEmptySubTitle,
|
||||||
AnimatedPlaceholderEmptyTextContainer,
|
AnimatedPlaceholderEmptyTextContainer,
|
||||||
AnimatedPlaceholderEmptyTitle,
|
AnimatedPlaceholderEmptyTitle,
|
||||||
Button,
|
|
||||||
EMPTY_PLACEHOLDER_TRANSITION_PROPS,
|
EMPTY_PLACEHOLDER_TRANSITION_PROPS,
|
||||||
IconPlus,
|
} from 'twenty-ui/layout';
|
||||||
} from 'twenty-ui';
|
import { Button } from 'twenty-ui/input';
|
||||||
|
import { IconPlus } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledNotesContainer = styled.div`
|
const StyledNotesContainer = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { createState } from '@ui/utilities/state/utils/createState';
|
|
||||||
|
|
||||||
import { ActivityTargetableObject } from '../types/ActivityTargetableEntity';
|
import { ActivityTargetableObject } from '../types/ActivityTargetableEntity';
|
||||||
|
import { createState } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
export const activityTargetableEntityArrayState = createState<
|
export const activityTargetableEntityArrayState = createState<
|
||||||
ActivityTargetableObject[]
|
ActivityTargetableObject[]
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { createState } from '@ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
export const canCreateActivityState = createState<boolean>({
|
export const canCreateActivityState = createState<boolean>({
|
||||||
key: 'canCreateActivityState',
|
key: 'canCreateActivityState',
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { createState } from '@ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
export const isActivityInCreateModeState = createState<boolean>({
|
export const isActivityInCreateModeState = createState<boolean>({
|
||||||
key: 'isActivityInCreateModeState',
|
key: 'isActivityInCreateModeState',
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { createState } from '@ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
export const isUpsertingActivityInDBState = createState<boolean>({
|
export const isUpsertingActivityInDBState = createState<boolean>({
|
||||||
key: 'isUpsertingActivityInDBState',
|
key: 'isUpsertingActivityInDBState',
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
import { isNonEmptyArray } from '@sniptt/guards';
|
import { isNonEmptyArray } from '@sniptt/guards';
|
||||||
import { Button, IconPlus } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { useOpenCreateActivityDrawer } from '@/activities/hooks/useOpenCreateActivityDrawer';
|
import { useOpenCreateActivityDrawer } from '@/activities/hooks/useOpenCreateActivityDrawer';
|
||||||
import { ActivityTargetableObject } from '@/activities/types/ActivityTargetableEntity';
|
import { ActivityTargetableObject } from '@/activities/types/ActivityTargetableEntity';
|
||||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||||
import { useHasObjectReadOnlyPermission } from '@/settings/roles/hooks/useHasObjectReadOnlyPermission';
|
import { useHasObjectReadOnlyPermission } from '@/settings/roles/hooks/useHasObjectReadOnlyPermission';
|
||||||
|
import { Button } from 'twenty-ui/input';
|
||||||
|
import { IconPlus } from 'twenty-ui/display';
|
||||||
|
|
||||||
export const AddTaskButton = ({
|
export const AddTaskButton = ({
|
||||||
activityTargetableObjects,
|
activityTargetableObjects,
|
||||||
|
|||||||
@ -1,14 +1,4 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import {
|
|
||||||
AnimatedPlaceholder,
|
|
||||||
AnimatedPlaceholderEmptyContainer,
|
|
||||||
AnimatedPlaceholderEmptySubTitle,
|
|
||||||
AnimatedPlaceholderEmptyTextContainer,
|
|
||||||
AnimatedPlaceholderEmptyTitle,
|
|
||||||
Button,
|
|
||||||
EMPTY_PLACEHOLDER_TRANSITION_PROPS,
|
|
||||||
IconPlus,
|
|
||||||
} from 'twenty-ui';
|
|
||||||
|
|
||||||
import { SkeletonLoader } from '@/activities/components/SkeletonLoader';
|
import { SkeletonLoader } from '@/activities/components/SkeletonLoader';
|
||||||
import { useOpenCreateActivityDrawer } from '@/activities/hooks/useOpenCreateActivityDrawer';
|
import { useOpenCreateActivityDrawer } from '@/activities/hooks/useOpenCreateActivityDrawer';
|
||||||
@ -22,6 +12,16 @@ import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/
|
|||||||
import groupBy from 'lodash.groupby';
|
import groupBy from 'lodash.groupby';
|
||||||
import { AddTaskButton } from './AddTaskButton';
|
import { AddTaskButton } from './AddTaskButton';
|
||||||
import { TaskList } from './TaskList';
|
import { TaskList } from './TaskList';
|
||||||
|
import {
|
||||||
|
AnimatedPlaceholder,
|
||||||
|
AnimatedPlaceholderEmptyContainer,
|
||||||
|
AnimatedPlaceholderEmptySubTitle,
|
||||||
|
AnimatedPlaceholderEmptyTextContainer,
|
||||||
|
AnimatedPlaceholderEmptyTitle,
|
||||||
|
EMPTY_PLACEHOLDER_TRANSITION_PROPS,
|
||||||
|
} from 'twenty-ui/layout';
|
||||||
|
import { Button } from 'twenty-ui/input';
|
||||||
|
import { IconPlus } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledContainer = styled.div`
|
const StyledContainer = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -1,11 +1,5 @@
|
|||||||
import { useTheme } from '@emotion/react';
|
import { useTheme } from '@emotion/react';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import {
|
|
||||||
Checkbox,
|
|
||||||
CheckboxShape,
|
|
||||||
IconCalendar,
|
|
||||||
OverflowingTextWithTooltip,
|
|
||||||
} from 'twenty-ui';
|
|
||||||
|
|
||||||
import { ActivityTargetsInlineCell } from '@/activities/inline-cell/components/ActivityTargetsInlineCell';
|
import { ActivityTargetsInlineCell } from '@/activities/inline-cell/components/ActivityTargetsInlineCell';
|
||||||
import { getActivitySummary } from '@/activities/utils/getActivitySummary';
|
import { getActivitySummary } from '@/activities/utils/getActivitySummary';
|
||||||
@ -17,6 +11,8 @@ import { useOpenRecordInCommandMenu } from '@/command-menu/hooks/useOpenRecordIn
|
|||||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||||
import { FieldContextProvider } from '@/object-record/record-field/components/FieldContextProvider';
|
import { FieldContextProvider } from '@/object-record/record-field/components/FieldContextProvider';
|
||||||
import { useCompleteTask } from '../hooks/useCompleteTask';
|
import { useCompleteTask } from '../hooks/useCompleteTask';
|
||||||
|
import { Checkbox, CheckboxShape } from 'twenty-ui/input';
|
||||||
|
import { IconCalendar, OverflowingTextWithTooltip } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledTaskBody = styled.div`
|
const StyledTaskBody = styled.div`
|
||||||
color: ${({ theme }) => theme.font.color.tertiary};
|
color: ${({ theme }) => theme.font.color.tertiary};
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { Meta, StoryObj } from '@storybook/react';
|
import { Meta, StoryObj } from '@storybook/react';
|
||||||
import { ComponentDecorator } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { TaskList } from '@/activities/tasks/components/TaskList';
|
import { TaskList } from '@/activities/tasks/components/TaskList';
|
||||||
import { ContextStoreDecorator } from '~/testing/decorators/ContextStoreDecorator';
|
import { ContextStoreDecorator } from '~/testing/decorators/ContextStoreDecorator';
|
||||||
@ -9,6 +8,7 @@ import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadat
|
|||||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||||
import { mockedTasks } from '~/testing/mock-data/tasks';
|
import { mockedTasks } from '~/testing/mock-data/tasks';
|
||||||
|
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||||
|
|
||||||
const meta: Meta<typeof TaskList> = {
|
const meta: Meta<typeof TaskList> = {
|
||||||
title: 'Modules/Activity/TaskList',
|
title: 'Modules/Activity/TaskList',
|
||||||
|
|||||||
@ -13,8 +13,8 @@ import {
|
|||||||
AnimatedPlaceholderEmptyTextContainer,
|
AnimatedPlaceholderEmptyTextContainer,
|
||||||
AnimatedPlaceholderEmptyTitle,
|
AnimatedPlaceholderEmptyTitle,
|
||||||
EMPTY_PLACEHOLDER_TRANSITION_PROPS,
|
EMPTY_PLACEHOLDER_TRANSITION_PROPS,
|
||||||
MOBILE_VIEWPORT,
|
} from 'twenty-ui/layout';
|
||||||
} from 'twenty-ui';
|
import { MOBILE_VIEWPORT } from 'twenty-ui/theme';
|
||||||
|
|
||||||
const StyledMainContainer = styled.div`
|
const StyledMainContainer = styled.div`
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
import { Meta, StoryObj } from '@storybook/react';
|
import { Meta, StoryObj } from '@storybook/react';
|
||||||
import { HttpResponse, graphql } from 'msw';
|
import { HttpResponse, graphql } from 'msw';
|
||||||
import { ComponentDecorator } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { TimelineActivities } from '@/activities/timeline-activities/components/TimelineActivities';
|
import { TimelineActivities } from '@/activities/timeline-activities/components/TimelineActivities';
|
||||||
import { TimelineActivityContext } from '@/activities/timeline-activities/contexts/TimelineActivityContext';
|
import { TimelineActivityContext } from '@/activities/timeline-activities/contexts/TimelineActivityContext';
|
||||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||||
import { mockedTimelineActivities } from '~/testing/mock-data/timeline-activities';
|
import { mockedTimelineActivities } from '~/testing/mock-data/timeline-activities';
|
||||||
|
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||||
|
|
||||||
const meta: Meta<typeof TimelineActivities> = {
|
const meta: Meta<typeof TimelineActivities> = {
|
||||||
title: 'Modules/TimelineActivities/TimelineActivities',
|
title: 'Modules/TimelineActivities/TimelineActivities',
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import { useOpenRecordInCommandMenu } from '@/command-menu/hooks/useOpenRecordIn
|
|||||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||||
import { useGetRecordFromCache } from '@/object-record/cache/hooks/useGetRecordFromCache';
|
import { useGetRecordFromCache } from '@/object-record/cache/hooks/useGetRecordFromCache';
|
||||||
import { isNonEmptyString } from '@sniptt/guards';
|
import { isNonEmptyString } from '@sniptt/guards';
|
||||||
import { MOBILE_VIEWPORT, OverflowingTextWithTooltip } from 'twenty-ui';
|
import { MOBILE_VIEWPORT } from 'twenty-ui/theme';
|
||||||
|
import { OverflowingTextWithTooltip } from 'twenty-ui/display';
|
||||||
|
|
||||||
type EventRowActivityProps = EventRowDynamicComponentProps;
|
type EventRowActivityProps = EventRowDynamicComponentProps;
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import { Meta, StoryObj } from '@storybook/react';
|
import { Meta, StoryObj } from '@storybook/react';
|
||||||
import { HttpResponse, graphql } from 'msw';
|
import { HttpResponse, graphql } from 'msw';
|
||||||
import { ComponentDecorator } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { EventCardCalendarEvent } from '@/activities/timeline-activities/rows/calendar/components/EventCardCalendarEvent';
|
import { EventCardCalendarEvent } from '@/activities/timeline-activities/rows/calendar/components/EventCardCalendarEvent';
|
||||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||||
|
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||||
|
|
||||||
const meta: Meta<typeof EventCardCalendarEvent> = {
|
const meta: Meta<typeof EventCardCalendarEvent> = {
|
||||||
title: 'Modules/TimelineActivities/Rows/CalendarEvent/EventCardCalendarEvent',
|
title: 'Modules/TimelineActivities/Rows/CalendarEvent/EventCardCalendarEvent',
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
|
import { Card } from 'twenty-ui/layout';
|
||||||
import { Card, MOBILE_VIEWPORT } from 'twenty-ui';
|
import { MOBILE_VIEWPORT } from 'twenty-ui/theme';
|
||||||
|
|
||||||
type EventCardProps = {
|
type EventCardProps = {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { IconButton, IconChevronDown, IconChevronUp } from 'twenty-ui';
|
import { IconButton } from 'twenty-ui/input';
|
||||||
|
import { IconChevronDown, IconChevronUp } from 'twenty-ui/display';
|
||||||
|
|
||||||
type EventCardToggleButtonProps = {
|
type EventCardToggleButtonProps = {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
import { IconCirclePlus, IconEditCircle, IconTrash, useIcons } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { TimelineActivity } from '@/activities/timeline-activities/types/TimelineActivity';
|
import { TimelineActivity } from '@/activities/timeline-activities/types/TimelineActivity';
|
||||||
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
|
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
|
||||||
|
import {
|
||||||
|
IconCirclePlus,
|
||||||
|
IconEditCircle,
|
||||||
|
IconTrash,
|
||||||
|
useIcons,
|
||||||
|
} from 'twenty-ui/display';
|
||||||
|
|
||||||
export const EventIconDynamicComponent = ({
|
export const EventIconDynamicComponent = ({
|
||||||
event,
|
event,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { Icon123, useIcons } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
|
import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
|
||||||
|
import { Icon123, useIcons } from 'twenty-ui/display';
|
||||||
|
|
||||||
type EventFieldDiffLabelProps = {
|
type EventFieldDiffLabelProps = {
|
||||||
fieldMetadataItem: FieldMetadataItem;
|
fieldMetadataItem: FieldMetadataItem;
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import {
|
|||||||
} from '@/activities/timeline-activities/rows/components/EventRowDynamicComponent';
|
} from '@/activities/timeline-activities/rows/components/EventRowDynamicComponent';
|
||||||
import { EventRowMainObjectUpdated } from '@/activities/timeline-activities/rows/main-object/components/EventRowMainObjectUpdated';
|
import { EventRowMainObjectUpdated } from '@/activities/timeline-activities/rows/main-object/components/EventRowMainObjectUpdated';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { MOBILE_VIEWPORT } from 'twenty-ui';
|
import { MOBILE_VIEWPORT } from 'twenty-ui/theme';
|
||||||
|
|
||||||
type EventRowMainObjectProps = EventRowDynamicComponentProps;
|
type EventRowMainObjectProps = EventRowDynamicComponentProps;
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import { EventFieldDiffContainer } from '@/activities/timeline-activities/rows/m
|
|||||||
import { TimelineActivity } from '@/activities/timeline-activities/types/TimelineActivity';
|
import { TimelineActivity } from '@/activities/timeline-activities/types/TimelineActivity';
|
||||||
import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
|
import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
|
||||||
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
|
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
|
||||||
import { MOBILE_VIEWPORT } from 'twenty-ui';
|
import { MOBILE_VIEWPORT } from 'twenty-ui/theme';
|
||||||
|
|
||||||
type EventRowMainObjectUpdatedProps = {
|
type EventRowMainObjectUpdatedProps = {
|
||||||
mainObjectMetadataItem: ObjectMetadataItem;
|
mainObjectMetadataItem: ObjectMetadataItem;
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
import { EventRowMainObjectUpdated } from '@/activities/timeline-activities/rows/main-object/components/EventRowMainObjectUpdated';
|
import { EventRowMainObjectUpdated } from '@/activities/timeline-activities/rows/main-object/components/EventRowMainObjectUpdated';
|
||||||
import { TimelineActivity } from '@/activities/timeline-activities/types/TimelineActivity';
|
import { TimelineActivity } from '@/activities/timeline-activities/types/TimelineActivity';
|
||||||
import { Meta, StoryObj } from '@storybook/react';
|
import { Meta, StoryObj } from '@storybook/react';
|
||||||
import { ComponentDecorator, RouterDecorator } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||||
import { generatedMockObjectMetadataItems } from '~/testing/mock-data/generatedMockObjectMetadataItems';
|
import { generatedMockObjectMetadataItems } from '~/testing/mock-data/generatedMockObjectMetadataItems';
|
||||||
|
import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';
|
||||||
|
|
||||||
const meta: Meta<typeof EventRowMainObjectUpdated> = {
|
const meta: Meta<typeof EventRowMainObjectUpdated> = {
|
||||||
title: 'Modules/TimelineActivities/Rows/MainObject/EventRowMainObjectUpdated',
|
title: 'Modules/TimelineActivities/Rows/MainObject/EventRowMainObjectUpdated',
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { isUndefined } from '@sniptt/guards';
|
import { isUndefined } from '@sniptt/guards';
|
||||||
import { OverflowingTextWithTooltip } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { EmailThreadMessage } from '@/activities/emails/types/EmailThreadMessage';
|
import { EmailThreadMessage } from '@/activities/emails/types/EmailThreadMessage';
|
||||||
import { EventCardMessageNotShared } from '@/activities/timeline-activities/rows/message/components/EventCardMessageNotShared';
|
import { EventCardMessageNotShared } from '@/activities/timeline-activities/rows/message/components/EventCardMessageNotShared';
|
||||||
@ -8,6 +7,7 @@ import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSi
|
|||||||
import { useFindOneRecord } from '@/object-record/hooks/useFindOneRecord';
|
import { useFindOneRecord } from '@/object-record/hooks/useFindOneRecord';
|
||||||
import { useUpsertRecordsInStore } from '@/object-record/record-store/hooks/useUpsertRecordsInStore';
|
import { useUpsertRecordsInStore } from '@/object-record/record-store/hooks/useUpsertRecordsInStore';
|
||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
|
import { OverflowingTextWithTooltip } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledEventCardMessageContainer = styled.div`
|
const StyledEventCardMessageContainer = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { IconLock } from 'twenty-ui';
|
import { IconLock } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledEventCardMessageContainer = styled.div`
|
const StyledEventCardMessageContainer = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
import { Meta, StoryObj } from '@storybook/react';
|
import { Meta, StoryObj } from '@storybook/react';
|
||||||
import { HttpResponse, graphql } from 'msw';
|
import { HttpResponse, graphql } from 'msw';
|
||||||
import { ComponentDecorator } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { TimelineActivityContext } from '@/activities/timeline-activities/contexts/TimelineActivityContext';
|
import { TimelineActivityContext } from '@/activities/timeline-activities/contexts/TimelineActivityContext';
|
||||||
import { EventCardMessage } from '@/activities/timeline-activities/rows/message/components/EventCardMessage';
|
import { EventCardMessage } from '@/activities/timeline-activities/rows/message/components/EventCardMessage';
|
||||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||||
|
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||||
|
|
||||||
const meta: Meta<typeof EventCardMessage> = {
|
const meta: Meta<typeof EventCardMessage> = {
|
||||||
title: 'Modules/TimelineActivities/Rows/Message/EventCardMessage',
|
title: 'Modules/TimelineActivities/Rows/Message/EventCardMessage',
|
||||||
|
|||||||
@ -10,8 +10,8 @@ import { I18nProvider } from '@lingui/react';
|
|||||||
import { HelmetProvider } from 'react-helmet-async';
|
import { HelmetProvider } from 'react-helmet-async';
|
||||||
import { RecoilRoot } from 'recoil';
|
import { RecoilRoot } from 'recoil';
|
||||||
import { RecoilURLSyncJSON } from 'recoil-sync';
|
import { RecoilURLSyncJSON } from 'recoil-sync';
|
||||||
import { IconsProvider } from 'twenty-ui';
|
|
||||||
import { initialI18nActivate } from '~/utils/i18n/initialI18nActivate';
|
import { initialI18nActivate } from '~/utils/i18n/initialI18nActivate';
|
||||||
|
import { IconsProvider } from 'twenty-ui/display';
|
||||||
|
|
||||||
initialI18nActivate();
|
initialI18nActivate();
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { AnimatedEaseIn } from 'twenty-ui';
|
import { AnimatedEaseIn } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
type TitleProps = React.PropsWithChildren & {
|
type TitleProps = React.PropsWithChildren & {
|
||||||
animate?: boolean;
|
animate?: boolean;
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import { expect } from '@storybook/test';
|
|||||||
import { ReactNode, act } from 'react';
|
import { ReactNode, act } from 'react';
|
||||||
import { MemoryRouter } from 'react-router-dom';
|
import { MemoryRouter } from 'react-router-dom';
|
||||||
import { RecoilRoot, useRecoilValue } from 'recoil';
|
import { RecoilRoot, useRecoilValue } from 'recoil';
|
||||||
import { iconsState } from 'twenty-ui';
|
|
||||||
import { useAuth } from '@/auth/hooks/useAuth';
|
import { useAuth } from '@/auth/hooks/useAuth';
|
||||||
import { billingState } from '@/client-config/states/billingState';
|
import { billingState } from '@/client-config/states/billingState';
|
||||||
import { isDebugModeState } from '@/client-config/states/isDebugModeState';
|
import { isDebugModeState } from '@/client-config/states/isDebugModeState';
|
||||||
@ -15,6 +14,7 @@ import { workspaceAuthProvidersState } from '@/workspace/states/workspaceAuthPro
|
|||||||
import { isMultiWorkspaceEnabledState } from '@/client-config/states/isMultiWorkspaceEnabledState';
|
import { isMultiWorkspaceEnabledState } from '@/client-config/states/isMultiWorkspaceEnabledState';
|
||||||
import { renderHook } from '@testing-library/react';
|
import { renderHook } from '@testing-library/react';
|
||||||
import { email, mocks, password, results, token } from '../__mocks__/useAuth';
|
import { email, mocks, password, results, token } from '../__mocks__/useAuth';
|
||||||
|
import { iconsState } from 'twenty-ui/display';
|
||||||
|
|
||||||
const redirectSpy = jest.fn();
|
const redirectSpy = jest.fn();
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,6 @@ import {
|
|||||||
useRecoilValue,
|
useRecoilValue,
|
||||||
useSetRecoilState,
|
useSetRecoilState,
|
||||||
} from 'recoil';
|
} from 'recoil';
|
||||||
import { iconsState } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';
|
import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';
|
||||||
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
|
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
|
||||||
@ -65,6 +64,7 @@ import { APP_LOCALES } from 'twenty-shared/translations';
|
|||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
import { getWorkspaceUrl } from '~/utils/getWorkspaceUrl';
|
import { getWorkspaceUrl } from '~/utils/getWorkspaceUrl';
|
||||||
import { dynamicActivate } from '~/utils/i18n/dynamicActivate';
|
import { dynamicActivate } from '~/utils/i18n/dynamicActivate';
|
||||||
|
import { iconsState } from 'twenty-ui/display';
|
||||||
|
|
||||||
export const useAuth = () => {
|
export const useAuth = () => {
|
||||||
const setTokenPair = useSetRecoilState(tokenPairState);
|
const setTokenPair = useSetRecoilState(tokenPairState);
|
||||||
|
|||||||
@ -4,7 +4,11 @@ import { SubTitle } from '@/auth/components/SubTitle';
|
|||||||
import { Title } from '@/auth/components/Title';
|
import { Title } from '@/auth/components/Title';
|
||||||
import { useHandleResendEmailVerificationToken } from '@/auth/sign-in-up/hooks/useHandleResendEmailVerificationToken';
|
import { useHandleResendEmailVerificationToken } from '@/auth/sign-in-up/hooks/useHandleResendEmailVerificationToken';
|
||||||
import { useTheme } from '@emotion/react';
|
import { useTheme } from '@emotion/react';
|
||||||
import { AnimatedEaseIn, IconMail, Loader, MainButton, RGBA } from 'twenty-ui';
|
import { AnimatedEaseIn } from 'twenty-ui/utilities';
|
||||||
|
import { IconMail } from 'twenty-ui/display';
|
||||||
|
import { Loader } from 'twenty-ui/feedback';
|
||||||
|
import { MainButton } from 'twenty-ui/input';
|
||||||
|
import { RGBA } from 'twenty-ui/theme';
|
||||||
|
|
||||||
const StyledMailContainer = styled.div`
|
const StyledMailContainer = styled.div`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import { useState } from 'react';
|
|||||||
import { FormProvider } from 'react-hook-form';
|
import { FormProvider } from 'react-hook-form';
|
||||||
import { useLocation } from 'react-router-dom';
|
import { useLocation } from 'react-router-dom';
|
||||||
import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil';
|
import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil';
|
||||||
import { HorizontalSeparator, Loader, MainButton } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { useAuth } from '@/auth/hooks/useAuth';
|
import { useAuth } from '@/auth/hooks/useAuth';
|
||||||
import { SignInUpEmailField } from '@/auth/sign-in-up/components/SignInUpEmailField';
|
import { SignInUpEmailField } from '@/auth/sign-in-up/components/SignInUpEmailField';
|
||||||
@ -28,6 +27,9 @@ import { SnackBarVariant } from '@/ui/feedback/snack-bar-manager/components/Snac
|
|||||||
import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
|
import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
|
||||||
import { getWorkspaceUrl } from '~/utils/getWorkspaceUrl';
|
import { getWorkspaceUrl } from '~/utils/getWorkspaceUrl';
|
||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
|
import { HorizontalSeparator } from 'twenty-ui/display';
|
||||||
|
import { Loader } from 'twenty-ui/feedback';
|
||||||
|
import { MainButton } from 'twenty-ui/input';
|
||||||
|
|
||||||
const StyledContentContainer = styled(motion.div)`
|
const StyledContentContainer = styled(motion.div)`
|
||||||
margin-bottom: ${({ theme }) => theme.spacing(8)};
|
margin-bottom: ${({ theme }) => theme.spacing(8)};
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import styled from '@emotion/styled';
|
|||||||
import { useLingui } from '@lingui/react/macro';
|
import { useLingui } from '@lingui/react/macro';
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import { Controller, useFormContext } from 'react-hook-form';
|
import { Controller, useFormContext } from 'react-hook-form';
|
||||||
import { StyledText } from 'twenty-ui';
|
import { StyledText } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledFullWidthMotionDiv = styled(motion.div)`
|
const StyledFullWidthMotionDiv = styled(motion.div)`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -4,11 +4,12 @@ import { useSSO } from '@/auth/sign-in-up/hooks/useSSO';
|
|||||||
import { guessSSOIdentityProviderIconByUrl } from '@/settings/security/utils/guessSSOIdentityProviderIconByUrl';
|
import { guessSSOIdentityProviderIconByUrl } from '@/settings/security/utils/guessSSOIdentityProviderIconByUrl';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { useRecoilValue } from 'recoil';
|
import { useRecoilValue } from 'recoil';
|
||||||
import { HorizontalSeparator, MainButton } from 'twenty-ui';
|
|
||||||
|
|
||||||
import { workspaceAuthProvidersState } from '@/workspace/states/workspaceAuthProvidersState';
|
import { workspaceAuthProvidersState } from '@/workspace/states/workspaceAuthProvidersState';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
|
import { HorizontalSeparator } from 'twenty-ui/display';
|
||||||
|
import { MainButton } from 'twenty-ui/input';
|
||||||
|
|
||||||
const StyledContentContainer = styled.div`
|
const StyledContentContainer = styled.div`
|
||||||
margin-bottom: ${({ theme }) => theme.spacing(8)};
|
margin-bottom: ${({ theme }) => theme.spacing(8)};
|
||||||
|
|||||||
@ -15,8 +15,9 @@ import { useLingui } from '@lingui/react/macro';
|
|||||||
import { useMemo, useState } from 'react';
|
import { useMemo, useState } from 'react';
|
||||||
import { useFormContext } from 'react-hook-form';
|
import { useFormContext } from 'react-hook-form';
|
||||||
import { useRecoilState, useRecoilValue } from 'recoil';
|
import { useRecoilState, useRecoilValue } from 'recoil';
|
||||||
import { Loader, MainButton } from 'twenty-ui';
|
|
||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
|
import { Loader } from 'twenty-ui/feedback';
|
||||||
|
import { MainButton } from 'twenty-ui/input';
|
||||||
|
|
||||||
const StyledForm = styled.form`
|
const StyledForm = styled.form`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -7,7 +7,8 @@ import { useTheme } from '@emotion/react';
|
|||||||
import { useLingui } from '@lingui/react/macro';
|
import { useLingui } from '@lingui/react/macro';
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import { useRecoilValue } from 'recoil';
|
import { useRecoilValue } from 'recoil';
|
||||||
import { HorizontalSeparator, IconGoogle, MainButton } from 'twenty-ui';
|
import { HorizontalSeparator, IconGoogle } from 'twenty-ui/display';
|
||||||
|
import { MainButton } from 'twenty-ui/input';
|
||||||
|
|
||||||
const GoogleIcon = memo(() => {
|
const GoogleIcon = memo(() => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|||||||
@ -6,7 +6,8 @@ import {
|
|||||||
import { useTheme } from '@emotion/react';
|
import { useTheme } from '@emotion/react';
|
||||||
import { useLingui } from '@lingui/react/macro';
|
import { useLingui } from '@lingui/react/macro';
|
||||||
import { useRecoilValue } from 'recoil';
|
import { useRecoilValue } from 'recoil';
|
||||||
import { HorizontalSeparator, IconMicrosoft, MainButton } from 'twenty-ui';
|
import { HorizontalSeparator, IconMicrosoft } from 'twenty-ui/display';
|
||||||
|
import { MainButton } from 'twenty-ui/input';
|
||||||
|
|
||||||
export const SignInUpWithMicrosoft = () => {
|
export const SignInUpWithMicrosoft = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|||||||
@ -7,8 +7,9 @@ import { workspaceAuthProvidersState } from '@/workspace/states/workspaceAuthPro
|
|||||||
import { useTheme } from '@emotion/react';
|
import { useTheme } from '@emotion/react';
|
||||||
import { useLingui } from '@lingui/react/macro';
|
import { useLingui } from '@lingui/react/macro';
|
||||||
import { useRecoilValue, useSetRecoilState } from 'recoil';
|
import { useRecoilValue, useSetRecoilState } from 'recoil';
|
||||||
import { HorizontalSeparator, IconLock, MainButton } from 'twenty-ui';
|
|
||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
|
import { HorizontalSeparator, IconLock } from 'twenty-ui/display';
|
||||||
|
import { MainButton } from 'twenty-ui/input';
|
||||||
|
|
||||||
export const SignInUpWithSSO = () => {
|
export const SignInUpWithSSO = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|||||||
@ -11,7 +11,8 @@ import styled from '@emotion/styled';
|
|||||||
import { Trans } from '@lingui/react/macro';
|
import { Trans } from '@lingui/react/macro';
|
||||||
import { FormProvider } from 'react-hook-form';
|
import { FormProvider } from 'react-hook-form';
|
||||||
import { useRecoilValue } from 'recoil';
|
import { useRecoilValue } from 'recoil';
|
||||||
import { ActionLink, HorizontalSeparator } from 'twenty-ui';
|
import { ActionLink } from 'twenty-ui/navigation';
|
||||||
|
import { HorizontalSeparator } from 'twenty-ui/display';
|
||||||
|
|
||||||
const StyledContentContainer = styled.div`
|
const StyledContentContainer = styled.div`
|
||||||
margin-bottom: ${({ theme }) => theme.spacing(8)};
|
margin-bottom: ${({ theme }) => theme.spacing(8)};
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { createState } from '@ui/utilities/state/utils/createState';
|
|
||||||
import { UserExists } from '~/generated/graphql';
|
import { UserExists } from '~/generated/graphql';
|
||||||
|
import { createState } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
export const availableSSOIdentityProvidersForAuthState = createState<
|
export const availableSSOIdentityProvidersForAuthState = createState<
|
||||||
NonNullable<UserExists['availableWorkspaces']>[0]['sso']
|
NonNullable<UserExists['availableWorkspaces']>[0]['sso']
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { BillingCheckoutSession } from '@/auth/types/billingCheckoutSession.type';
|
import { BillingCheckoutSession } from '@/auth/types/billingCheckoutSession.type';
|
||||||
import { BILLING_CHECKOUT_SESSION_DEFAULT_VALUE } from '@/billing/constants/BillingCheckoutSessionDefaultValue';
|
import { BILLING_CHECKOUT_SESSION_DEFAULT_VALUE } from '@/billing/constants/BillingCheckoutSessionDefaultValue';
|
||||||
import { createState } from '@ui/utilities/state/utils/createState';
|
|
||||||
import { syncEffect } from 'recoil-sync';
|
import { syncEffect } from 'recoil-sync';
|
||||||
|
import { createState } from 'twenty-ui/utilities';
|
||||||
|
|
||||||
export const billingCheckoutSessionState = createState<BillingCheckoutSession>({
|
export const billingCheckoutSessionState = createState<BillingCheckoutSession>({
|
||||||
key: 'billingCheckoutSessionState',
|
key: 'billingCheckoutSessionState',
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user