index
int64
0
0
repo_id
stringlengths
16
181
file_path
stringlengths
28
270
content
stringlengths
1
11.6M
__index_level_0__
int64
0
10k
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers/hooks/useGeneratedApiKeys.ts
import { useRecoilCallback } from 'recoil'; import { generatedApiKeyFamilyState } from '@/settings/developers/states/generatedApiKeyFamilyState'; export const useGeneratedApiKeys = () => { return useRecoilCallback( ({ set }) => (apiKeyId: string, apiKey: string | null) => { set(generatedApiKeyFami...
1,900
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers/states/generatedApiKeyFamilyState.ts
import { atomFamily } from 'recoil'; export const generatedApiKeyFamilyState = atomFamily< string | null | undefined, string >({ key: 'generatedApiKeyFamilyState', default: null, });
1,901
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers/types/ApiFieldItem.ts
export type ApiFieldItem = { id: string; name: string; type: 'internal' | 'published'; expiration: string; };
1,902
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers/types/ApiKey.ts
export type ApiKey = { id: string; createdAt: string; updatedAt: string; deletedAt: string | null; name: string; expiresAt: string; };
1,903
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers/utils/compute-new-expiration-date.ts
import { DateTime } from 'luxon'; export const computeNewExpirationDate = ( expiresAt: string | null | undefined, createdAt: string, ): string | null => { if (!expiresAt) { return null; } const days = DateTime.fromISO(expiresAt).diff(DateTime.fromISO(createdAt), [ 'days', ]).days; return DateTime...
1,904
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers/utils/format-expiration.ts
import { ApiFieldItem } from '@/settings/developers/types/ApiFieldItem'; import { ApiKey } from '@/settings/developers/types/ApiKey'; import { beautifyDateDiff } from '~/utils/date-utils'; export const formatExpiration = ( expiresAt: string | null, withExpiresMention: boolean = false, short: boolean = true, ) =>...
1,905
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers/utils
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers/utils/__tests__/compute-new-expiration-date.test.ts
import { computeNewExpirationDate } from '@/settings/developers/utils/compute-new-expiration-date'; jest.useFakeTimers().setSystemTime(new Date('2024-01-01T00:00:00.000Z')); describe('computeNewExpirationDate', () => { it('should compute properly', () => { const expiresAt = '2023-01-10T00:00:00.000Z'; const...
1,906
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers/utils
petrpan-code/twentyhq/twenty/front/src/modules/settings/developers/utils/__tests__/format-expiration.test.ts
import { formatExpiration } from '@/settings/developers/utils/format-expiration'; jest.useFakeTimers().setSystemTime(new Date('2024-01-01T00:00:00.000Z')); describe('formatExpiration', () => { it('should format properly when expiresAt is null', () => { const expiresAt = null; const result = formatExpiration...
1,907
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/profile
petrpan-code/twentyhq/twenty/front/src/modules/settings/profile/components/DeleteAccount.tsx
import { useCallback, useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { useRecoilValue } from 'recoil'; import { useAuth } from '@/auth/hooks/useAuth'; import { currentUserState } from '@/auth/states/currentUserState'; import { AppPath } from '@/types/AppPath'; import { H2Title } from '...
1,908
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/profile
petrpan-code/twentyhq/twenty/front/src/modules/settings/profile/components/DeleteWorkspace.tsx
import { useCallback, useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { useRecoilValue } from 'recoil'; import { useAuth } from '@/auth/hooks/useAuth'; import { currentUserState } from '@/auth/states/currentUserState'; import { AppPath } from '@/types/AppPath'; import { H2Title } from '...
1,909
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/profile
petrpan-code/twentyhq/twenty/front/src/modules/settings/profile/components/EmailField.tsx
import { useRecoilValue } from 'recoil'; import { currentUserState } from '@/auth/states/currentUserState'; import { TextInput } from '@/ui/input/components/TextInput'; export const EmailField = () => { const currentUser = useRecoilValue(currentUserState); return ( <TextInput value={currentUser?.email}...
1,910
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/profile
petrpan-code/twentyhq/twenty/front/src/modules/settings/profile/components/NameFields.tsx
import { useEffect, useState } from 'react'; import styled from '@emotion/styled'; import debounce from 'lodash.debounce'; import { useRecoilState, useRecoilValue } from 'recoil'; import { currentUserState } from '@/auth/states/currentUserState'; import { currentWorkspaceMemberState } from '@/auth/states/currentWorksp...
1,911
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/profile
petrpan-code/twentyhq/twenty/front/src/modules/settings/profile/components/ProfilePictureUploader.tsx
import { useState } from 'react'; import { useRecoilState } from 'recoil'; import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState'; import { useUpdateOneObjectRecord } from '@/object-record/hooks/useUpdateOneObjectRecord'; import { ImageInput } from '@/ui/input/components/ImageInput'; i...
1,912
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/workspace
petrpan-code/twentyhq/twenty/front/src/modules/settings/workspace/components/NameField.tsx
import { useCallback, useEffect, useState } from 'react'; import styled from '@emotion/styled'; import debounce from 'lodash.debounce'; import { useRecoilValue } from 'recoil'; import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState'; import { TextInput } from '@/ui/input/components/TextInput'; impo...
1,913
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/workspace
petrpan-code/twentyhq/twenty/front/src/modules/settings/workspace/components/ToggleImpersonate.tsx
import { useRecoilState } from 'recoil'; import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState'; import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; import { Toggle } from '@/ui/input/components/Toggle'; import { useUpdateWorkspaceMutation } from '~/generated/graphql';...
1,914
0
petrpan-code/twentyhq/twenty/front/src/modules/settings/workspace
petrpan-code/twentyhq/twenty/front/src/modules/settings/workspace/components/WorkspaceLogoUploader.tsx
import { useRecoilState } from 'recoil'; import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState'; import { ImageInput } from '@/ui/input/components/ImageInput'; import { getImageAbsoluteURIOrBase64 } from '@/users/utils/getProfilePictureAbsoluteURI'; import { useUpdateWorkspaceMutation, useUplo...
1,915
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/components/ContinueButton.tsx
import styled from '@emotion/styled'; import { CircularProgressBar } from '@/ui/feedback/progress-bar/components/CircularProgressBar'; import { MainButton } from '@/ui/input/button/components/MainButton'; import { Modal } from '@/ui/layout/modal/components/Modal'; const StyledFooter = styled(Modal.Footer)` height: ...
1,916
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/components/Heading.tsx
import React from 'react'; import styled from '@emotion/styled'; export type HeadingProps = { title: string; description?: string; }; const StyledContainer = styled.div` align-items: center; display: flex; flex-direction: column; `; const StyledTitle = styled.span` color: ${({ theme }) => theme.font.colo...
1,917
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/components/MatchColumnSelect.tsx
import React, { useCallback, useRef, useState } from 'react'; import { createPortal } from 'react-dom'; import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { autoUpdate, flip, offset, size, useFloating, } from '@floating-ui/react'; import debounce from 'lodash.debounce'; im...
1,918
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/components/ModalCloseButton.tsx
import styled from '@emotion/styled'; import { useSpreadsheetImportInitialStep } from '@/spreadsheet-import/hooks/useSpreadsheetImportInitialStep'; import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal'; import { IconX } from '@/ui/display/icon/index'; import { useDialog...
1,919
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/components/ModalWrapper.tsx
import styled from '@emotion/styled'; import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal'; import { Modal } from '@/ui/layout/modal/components/Modal'; import { MOBILE_VIEWPORT } from '@/ui/theme/constants/theme'; import { ModalCloseButton } from './ModalCloseButton';...
1,920
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/components/Providers.tsx
import { createContext } from 'react'; import { SpreadsheetOptions } from '@/spreadsheet-import/types'; export const RsiContext = createContext({} as any); type ProvidersProps<T extends string> = { children: React.ReactNode; values: SpreadsheetOptions<T>; }; export const Providers = <T extends string>({ child...
1,921
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/components/Table.tsx
import DataGrid, { DataGridProps } from 'react-data-grid'; import styled from '@emotion/styled'; import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal'; import { rgba } from '@/ui/theme/constants/colors'; const StyledDataGrid = styled(DataGrid)` --rdg-background-color...
1,922
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/hooks/useSpreadsheetImport.tsx
import { useSetRecoilState } from 'recoil'; import { spreadsheetImportState } from '@/spreadsheet-import/states/spreadsheetImportState'; import { SpreadsheetOptions } from '@/spreadsheet-import/types'; export const useSpreadsheetImport = <T extends string>() => { const setSpreadSheetImport = useSetRecoilState(sprea...
1,923
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/hooks/useSpreadsheetImportInitialStep.ts
import { useMemo } from 'react'; import { StepType } from '@/spreadsheet-import/steps/components/UploadFlow'; export const useSpreadsheetImportInitialStep = (initialStep?: StepType) => { const steps = ['uploadStep', 'matchColumnsStep', 'validationStep'] as const; const initialStepNumber = useMemo(() => { swi...
1,924
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/hooks/useSpreadsheetImportInternal.ts
import { useContext } from 'react'; import { SetRequired } from 'type-fest'; import { RsiContext } from '@/spreadsheet-import/components/Providers'; import { defaultSpreadsheetImportProps } from '@/spreadsheet-import/provider/components/SpreadsheetImport'; import { SpreadsheetOptions } from '@/spreadsheet-import/types...
1,925
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/provider
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/provider/components/SpreadsheetImport.tsx
import { ModalWrapper } from '@/spreadsheet-import/components/ModalWrapper'; import { Providers } from '@/spreadsheet-import/components/Providers'; import { Steps } from '@/spreadsheet-import/steps/components/Steps'; import { SpreadsheetOptions } from '@/spreadsheet-import/types'; export const defaultSpreadsheetImport...
1,926
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/provider
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/provider/components/SpreadsheetImportProvider.tsx
import React from 'react'; import { useRecoilState } from 'recoil'; import { spreadsheetImportState } from '@/spreadsheet-import/states/spreadsheetImportState'; import { SpreadsheetImport } from './SpreadsheetImport'; type SpreadsheetImportProviderProps = React.PropsWithChildren; export const SpreadsheetImportProvi...
1,927
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/states/spreadsheetImportState.ts
import { atom } from 'recoil'; import { SpreadsheetOptions } from '../types'; export type SpreadsheetImportState<T extends string> = { isOpen: boolean; options: Omit<SpreadsheetOptions<T>, 'isOpen' | 'onClose'> | null; }; export const spreadsheetImportState = atom<SpreadsheetImportState<any>>({ key: 'spreadshe...
1,928
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/Steps.tsx
import styled from '@emotion/styled'; import { useSpreadsheetImportInitialStep } from '@/spreadsheet-import/hooks/useSpreadsheetImportInitialStep'; import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal'; import { Modal } from '@/ui/layout/modal/components/Modal'; import ...
1,929
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/UploadFlow.tsx
import { useCallback, useState } from 'react'; import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { WorkBook } from 'xlsx-ugnis'; import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal'; import { RawData } from '@/spreadsheet-import/ty...
1,930
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep.tsx
import { useCallback, useEffect, useMemo, useState } from 'react'; import styled from '@emotion/styled'; import { ContinueButton } from '@/spreadsheet-import/components/ContinueButton'; import { Heading } from '@/spreadsheet-import/components/Heading'; import { useSpreadsheetImportInternal } from '@/spreadsheet-import...
1,931
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/ColumnGrid.tsx
import React from 'react'; import styled from '@emotion/styled'; import { Columns } from '../MatchColumnsStep'; const StyledGridContainer = styled.div` align-items: center; display: flex; flex-direction: column; flex-grow: 1; height: 0px; width: 100%; `; const StyledGrid = styled.div` border: 1px solid...
1,932
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelect.tsx
import styled from '@emotion/styled'; import { MatchColumnSelect } from '@/spreadsheet-import/components/MatchColumnSelect'; import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal'; import { SelectOption } from '@/spreadsheet-import/types'; import { getFieldOptions } from...
1,933
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/TemplateColumn.tsx
// TODO: We should create our own accordion component import { Accordion, AccordionButton as ChakraAccordionButton, AccordionIcon, AccordionItem, AccordionPanel, } from '@chakra-ui/accordion'; import styled from '@emotion/styled'; import { MatchColumnSelect } from '@/spreadsheet-import/components/MatchColumn...
1,934
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UserTableColumn.tsx
import styled from '@emotion/styled'; import { RawData } from '@/spreadsheet-import/types'; import { assertNotNull } from '~/utils/assert'; import { Column } from '../MatchColumnsStep'; const StyledContainer = styled.div` display: flex; flex-direction: column; width: 100%; `; const StyledValue = styled.span` ...
1,935
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/SelectHeaderStep/SelectHeaderStep.tsx
import { useCallback, useState } from 'react'; import styled from '@emotion/styled'; import { ContinueButton } from '@/spreadsheet-import/components/ContinueButton'; import { Heading } from '@/spreadsheet-import/components/Heading'; import { RawData } from '@/spreadsheet-import/types'; import { Modal } from '@/ui/layo...
1,936
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/SelectHeaderStep
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/SelectHeaderStep/components/SelectColumn.tsx
import { Column, FormatterProps, useRowSelection } from 'react-data-grid'; import { RawData } from '@/spreadsheet-import/types'; import { Radio } from '@/ui/input/components/Radio'; const SELECT_COLUMN_KEY = 'select-row'; type SelectFormatterProps = FormatterProps<unknown>; const SelectFormatter = (props: SelectFor...
1,937
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/SelectHeaderStep
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/SelectHeaderStep/components/SelectHeaderTable.tsx
import { useMemo } from 'react'; import { Table } from '@/spreadsheet-import/components/Table'; import { RawData } from '@/spreadsheet-import/types'; import { generateSelectionColumns } from './SelectColumn'; interface SelectHeaderTableProps { data: RawData[]; selectedRows: ReadonlySet<number>; setSelectedRows...
1,938
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/SelectSheetStep/SelectSheetStep.tsx
import { useCallback, useState } from 'react'; import styled from '@emotion/styled'; import { ContinueButton } from '@/spreadsheet-import/components/ContinueButton'; import { Heading } from '@/spreadsheet-import/components/Heading'; import { Radio } from '@/ui/input/components/Radio'; import { RadioGroup } from '@/ui/...
1,939
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/UploadStep/UploadStep.tsx
import { useCallback, useState } from 'react'; import styled from '@emotion/styled'; import { WorkBook } from 'xlsx-ugnis'; import { Modal } from '@/ui/layout/modal/components/Modal'; import { DropZone } from './components/DropZone'; const StyledContent = styled(Modal.Content)` padding: ${({ theme }) => theme.spac...
1,940
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/UploadStep
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/UploadStep/components/DropZone.tsx
import { useState } from 'react'; import { useDropzone } from 'react-dropzone'; import styled from '@emotion/styled'; import * as XLSX from 'xlsx-ugnis'; import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal'; import { readFileAsync } from '@/spreadsheet-import/utils/rea...
1,941
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/UploadStep
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/UploadStep/components/ExampleTable.tsx
import { useMemo } from 'react'; import { Table } from '@/spreadsheet-import/components/Table'; import { Fields } from '@/spreadsheet-import/types'; import { generateExampleRow } from '@/spreadsheet-import/utils/generateExampleRow'; import { generateColumns } from './columns'; interface ExampleTableProps<T extends s...
1,942
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/UploadStep
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/UploadStep/components/columns.tsx
import { Column } from 'react-data-grid'; import { createPortal } from 'react-dom'; import styled from '@emotion/styled'; import { Fields } from '@/spreadsheet-import/types'; import { AppTooltip } from '@/ui/display/tooltip/AppTooltip'; const StyledHeaderContainer = styled.div` align-items: center; display: flex;...
1,943
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/ValidationStep/ValidationStep.tsx
import { useCallback, useMemo, useState } from 'react'; import { RowsChangeData } from 'react-data-grid'; import styled from '@emotion/styled'; import { ContinueButton } from '@/spreadsheet-import/components/ContinueButton'; import { Heading } from '@/spreadsheet-import/components/Heading'; import { Table } from '@/sp...
1,944
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/ValidationStep/types.ts
import { Info } from '@/spreadsheet-import/types'; export type Meta = { __index: string; __errors?: Error | null }; export type Error = { [key: string]: Info }; export type Errors = { [id: string]: Error };
1,945
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/ValidationStep
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/ValidationStep/components/columns.tsx
import { Column, useRowSelection } from 'react-data-grid'; import { createPortal } from 'react-dom'; import styled from '@emotion/styled'; import { MatchColumnSelect } from '@/spreadsheet-import/components/MatchColumnSelect'; import { Data, Fields } from '@/spreadsheet-import/types'; import { AppTooltip } from '@/ui/d...
1,946
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/__stories__/MatchColumns.stories.tsx
import { Meta } from '@storybook/react'; import { ModalWrapper } from '@/spreadsheet-import/components/ModalWrapper'; import { Providers } from '@/spreadsheet-import/components/Providers'; import { MatchColumnsStep } from '@/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep'; import { mockRsiValues...
1,947
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/__stories__/SelectHeader.stories.tsx
import { Meta } from '@storybook/react'; import { ModalWrapper } from '@/spreadsheet-import/components/ModalWrapper'; import { Providers } from '@/spreadsheet-import/components/Providers'; import { SelectHeaderStep } from '@/spreadsheet-import/steps/components/SelectHeaderStep/SelectHeaderStep'; import { headerSelec...
1,948
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/__stories__/SelectSheet.stories.tsx
import { Meta } from '@storybook/react'; import { ModalWrapper } from '@/spreadsheet-import/components/ModalWrapper'; import { Providers } from '@/spreadsheet-import/components/Providers'; import { SelectSheetStep } from '@/spreadsheet-import/steps/components/SelectSheetStep/SelectSheetStep'; import { mockRsiValues } ...
1,949
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/__stories__/Upload.stories.tsx
import { Meta } from '@storybook/react'; import { ModalWrapper } from '@/spreadsheet-import/components/ModalWrapper'; import { Providers } from '@/spreadsheet-import/components/Providers'; import { UploadStep } from '@/spreadsheet-import/steps/components/UploadStep/UploadStep'; import { mockRsiValues } from '@/spreads...
1,950
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/steps/components/__stories__/Validation.stories.tsx
import { Meta } from '@storybook/react'; import { ModalWrapper } from '@/spreadsheet-import/components/ModalWrapper'; import { Providers } from '@/spreadsheet-import/components/Providers'; import { ValidationStep } from '@/spreadsheet-import/steps/components/ValidationStep/ValidationStep'; import { editableTableInit...
1,951
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/tests/mockRsiValues.ts
import { defaultSpreadsheetImportProps } from '@/spreadsheet-import/provider/components/SpreadsheetImport'; import { Fields, SpreadsheetOptions } from '@/spreadsheet-import/types'; const fields = [ { icon: null, label: 'Name', key: 'name', alternateMatches: ['first name', 'first'], fieldType: { ...
1,952
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/types/index.ts
import { ReadonlyDeep } from 'type-fest'; import { Columns } from '@/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep'; import { StepState } from '@/spreadsheet-import/steps/components/UploadFlow'; import { Meta } from '@/spreadsheet-import/steps/components/ValidationStep/types'; import { IconComp...
1,953
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/dataMutations.ts
import { v4 } from 'uuid'; import { Errors, Meta, } from '@/spreadsheet-import/steps/components/ValidationStep/types'; import { Data, Fields, Info, RowHook, TableHook, } from '@/spreadsheet-import/types'; export const addErrorsAndRunHooks = <T extends string>( data: (Data<T> & Partial<Meta>)[], fiel...
1,954
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/exceedsMaxRecords.ts
import { WorkSheet } from 'xlsx-ugnis'; export const exceedsMaxRecords = (workSheet: WorkSheet, maxRecords: number) => { const [top, bottom] = workSheet['!ref'] ?.split(':') .map((position) => parseInt(position.replace(/\D/g, ''), 10)) || []; return bottom - top > maxRecords; };
1,955
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/findMatch.ts
import lavenstein from 'js-levenshtein'; import { Fields } from '@/spreadsheet-import/types'; type AutoMatchAccumulator<T> = { distance: number; value: T; }; export const findMatch = <T extends string>( header: string, fields: Fields<T>, autoMapDistance: number, ): T | undefined => { const smallestValue ...
1,956
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/findUnmatchedRequiredFields.ts
import { Columns } from '@/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep'; import { Fields } from '@/spreadsheet-import/types'; export const findUnmatchedRequiredFields = <T extends string>( fields: Fields<T>, columns: Columns<T>, ) => fields .filter((field) => field.validations...
1,957
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/generateExampleRow.ts
import { Field, Fields } from '@/spreadsheet-import/types'; const titleMap: Record<Field<string>['fieldType']['type'], string> = { checkbox: 'Boolean', select: 'Options', input: 'Text', }; export const generateExampleRow = <T extends string>(fields: Fields<T>) => [ fields.reduce((acc, field) => { acc[fiel...
1,958
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/getFieldOptions.ts
import { Fields } from '@/spreadsheet-import/types'; export const getFieldOptions = <T extends string>( fields: Fields<T>, fieldKey: string, ) => { const field = fields.find(({ key }) => fieldKey === key); if (!field) { return []; } return field.fieldType.type === 'select' ? field.fieldType.options : [...
1,959
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/getMatchedColumns.ts
import lavenstein from 'js-levenshtein'; import { Column, Columns, MatchColumnsStepProps, } from '@/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep'; import { Field, Fields } from '@/spreadsheet-import/types'; import { findMatch } from './findMatch'; import { setColumn } from './setColumn'...
1,960
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/mapWorkbook.ts
import * as XLSX from 'xlsx-ugnis'; export const mapWorkbook = (workbook: XLSX.WorkBook, sheetName?: string) => { const worksheet = workbook.Sheets[sheetName || workbook.SheetNames[0]]; const data = XLSX.utils.sheet_to_json(worksheet, { header: 1, blankrows: false, raw: false, }); return data as st...
1,961
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/normalizeCheckboxValue.ts
const booleanWhitelist: Record<string, boolean> = { yes: true, no: false, true: true, false: false, }; export const normalizeCheckboxValue = (value: string | undefined): boolean => { if (value && value.toLowerCase() in booleanWhitelist) { return booleanWhitelist[value.toLowerCase()]; } return false; ...
1,962
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/normalizeTableData.ts
import { Columns, ColumnType, } from '@/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep'; import { Data, Fields, RawData } from '@/spreadsheet-import/types'; import { normalizeCheckboxValue } from './normalizeCheckboxValue'; export const normalizeTableData = <T extends string>( columns: Co...
1,963
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/readFilesAsync.ts
export const readFileAsync = (file: File) => { return new Promise((resolve, reject) => { const reader = new FileReader(); reader.onload = () => { resolve(reader.result); }; reader.onerror = reject; reader.readAsArrayBuffer(file); }); };
1,964
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/setColumn.ts
import { Column, ColumnType, MatchColumnsStepProps, } from '@/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep'; import { Field } from '@/spreadsheet-import/types'; import { uniqueEntries } from './uniqueEntries'; export const setColumn = <T extends string>( oldColumn: Column<T>, field?...
1,965
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/setIgnoreColumn.ts
import { Column, ColumnType, } from '@/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep'; export const setIgnoreColumn = <T extends string>({ header, index, }: Column<T>): Column<T> => ({ header, index, type: ColumnType.ignored, });
1,966
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/setSubColumn.ts
import { ColumnType, MatchedOptions, MatchedSelectColumn, MatchedSelectOptionsColumn, } from '@/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep'; export const setSubColumn = <T>( oldColumn: MatchedSelectColumn<T> | MatchedSelectOptionsColumn<T>, entry: string, value: string, ): Matc...
1,967
0
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import
petrpan-code/twentyhq/twenty/front/src/modules/spreadsheet-import/utils/uniqueEntries.ts
import uniqBy from 'lodash/uniqBy'; import { MatchColumnsStepProps, MatchedOptions, } from '@/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep'; export const uniqueEntries = <T extends string>( data: MatchColumnsStepProps<T>['data'], index: number, ): Partial<MatchedOptions<T>>[] => uni...
1,968
0
petrpan-code/twentyhq/twenty/front/src/modules
petrpan-code/twentyhq/twenty/front/src/modules/types/AppBasePath.ts
export enum AppBasePath { Auth = '/auth', Settings = '/settings', Root = '/', }
1,969
0
petrpan-code/twentyhq/twenty/front/src/modules
petrpan-code/twentyhq/twenty/front/src/modules/types/AppPath.ts
export enum AppPath { // Not logged-in Verify = '/verify', SignIn = '/sign-in', SignUp = '/sign-up', Invite = '/invite/:workspaceInviteHash', // Onboarding CreateWorkspace = '/create/workspace', CreateProfile = '/create/profile', // Onboarded Index = '/', TasksPage = '/tasks', OpportunitiesPag...
1,970
0
petrpan-code/twentyhq/twenty/front/src/modules
petrpan-code/twentyhq/twenty/front/src/modules/types/PageHotkeyScope.ts
export enum PageHotkeyScope { Settings = 'settings', CreateWokspace = 'create-workspace', SignInUp = 'sign-in-up', CreateProfile = 'create-profile', ShowPage = 'show-page', PersonShowPage = 'person-show-page', CompanyShowPage = 'company-show-page', CompaniesPage = 'companies-page', PeoplePage = 'peopl...
1,971
0
petrpan-code/twentyhq/twenty/front/src/modules
petrpan-code/twentyhq/twenty/front/src/modules/types/RecoilScopeContext.ts
import { Context } from 'react'; export type RecoilScopeContext = Context<string | null>;
1,972
0
petrpan-code/twentyhq/twenty/front/src/modules
petrpan-code/twentyhq/twenty/front/src/modules/types/SettingsPath.ts
export enum SettingsPath { ProfilePage = 'profile', Experience = 'profile/experience', Objects = 'objects', ObjectDetail = 'objects/:objectSlug', ObjectEdit = 'objects/:objectSlug/edit', ObjectNewFieldStep1 = 'objects/:objectSlug/new-field/step-1', ObjectNewFieldStep2 = 'objects/:objectSlug/new-field/step...
1,973
0
petrpan-code/twentyhq/twenty/front/src/modules
petrpan-code/twentyhq/twenty/front/src/modules/types/custom.d.ts
declare interface Window { FrontChat?: (method: string, ...args: any[]) => void; }
1,974
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/checkmark
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/checkmark/components/AnimatedCheckmark.tsx
import { useTheme } from '@emotion/react'; import { motion } from 'framer-motion'; export type AnimatedCheckmarkProps = React.ComponentProps< typeof motion.path > & { isAnimating?: boolean; color?: string; duration?: number; size?: number; }; export const AnimatedCheckmark = ({ isAnimating = false, colo...
1,975
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/checkmark
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/checkmark/components/Checkmark.tsx
import React from 'react'; import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { IconCheck } from '@/ui/display/icon'; const StyledContainer = styled.div` align-items: center; background-color: ${({ theme }) => theme.color.blue}; border-radius: 50%; display: flex; height:...
1,976
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/checkmark/components
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/checkmark/components/__stories__/Checkmark.stories.tsx
import { Meta, StoryObj } from '@storybook/react'; import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator'; import { Checkmark } from '../Checkmark'; const meta: Meta<typeof Checkmark> = { title: 'UI/Display/Checkmark/Checkmark', component: Checkmark, decorators: [ComponentDecorator], }; ...
1,977
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/chip
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/chip/components/Chip.tsx
import { MouseEvent, ReactNode } from 'react'; import styled from '@emotion/styled'; import { OverflowingTextWithTooltip } from '../../tooltip/OverflowingTextWithTooltip'; export enum ChipSize { Large = 'large', Small = 'small', } export enum ChipAccent { TextPrimary = 'text-primary', TextSecondary = 'text-s...
1,978
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/chip
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/chip/components/EntityChip.tsx
import * as React from 'react'; import { useNavigate } from 'react-router-dom'; import { useTheme } from '@emotion/react'; import { isNonEmptyString } from '@sniptt/guards'; import { IconComponent } from '@/ui/display/icon/types/IconComponent'; import { Avatar, AvatarType } from '@/users/components/Avatar'; import { ...
1,979
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/chip/components
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/chip/components/__stories__/Chip.stories.tsx
import { Meta, StoryObj } from '@storybook/react'; import { CatalogDecorator } from '~/testing/decorators/CatalogDecorator'; import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator'; import { CatalogStory } from '~/testing/types'; import { Chip, ChipAccent, ChipSize, ChipVariant } from '../Chip'; ...
1,980
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/chip/components
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/chip/components/__stories__/EntityChip.stories.tsx
import { Meta, StoryObj } from '@storybook/react'; import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator'; import { EntityChip } from '../EntityChip'; const meta: Meta<typeof EntityChip> = { title: 'UI/Display/Chip/EntityChip', component: EntityChip, decorators: [Compo...
1,981
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/icon/index.ts
/* eslint-disable no-restricted-imports */ export type { TablerIconsProps } from '@tabler/icons-react'; export { IconAlertCircle, IconAlertTriangle, IconArchive, IconArchiveOff, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowUp, IconArrowUpRight, IconBaselineDensitySmall, IconBell, IconB...
1,982
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/icon
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/icon/assets/address-book.svg
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-address-book" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path d="M20 6v12a2 2 0 0 1 -2 2...
1,983
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/icon
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/icon/components/IconAddressBook.tsx
import { TablerIconsProps } from '@/ui/display/icon'; import { ReactComponent as IconAddressBookRaw } from '../assets/address-book.svg'; type IconAddressBookProps = TablerIconsProps; export const IconAddressBook = (props: IconAddressBookProps): JSX.Element => { const size = props.size ?? 24; const stroke = props...
1,984
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/icon
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/icon/types/IconComponent.ts
import { FunctionComponent } from 'react'; export type IconComponent = FunctionComponent<{ className?: string; color?: string; size?: number; stroke?: number; }>;
1,985
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/pill
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/pill/components/SoonPill.tsx
import styled from '@emotion/styled'; const StyledSoonPill = styled.span` align-items: center; background: ${({ theme }) => theme.background.transparent.light}; border-radius: 50px; color: ${({ theme }) => theme.font.color.light}; display: inline-block; font-size: ${({ theme }) => theme.font.size.xs}; fo...
1,986
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/pill/components
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/pill/components/__stories__/SoonPill.stories.tsx
import { Meta, StoryObj } from '@storybook/react'; import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator'; import { SoonPill } from '../SoonPill'; const meta: Meta<typeof SoonPill> = { title: 'UI/Display/Pill/SoonPill', component: SoonPill, decorators: [ComponentDecorator], }; export def...
1,987
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/tag
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/tag/components/Tag.tsx
import styled from '@emotion/styled'; import { ThemeColor } from '@/ui/theme/constants/colors'; const tagColors = [ 'green', 'turquoise', 'sky', 'blue', 'purple', 'pink', 'red', 'orange', 'yellow', 'gray', ]; export type TagColor = (typeof tagColors)[number]; export const castToTagColor = (color...
1,988
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/tag/components
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/tag/components/__stories__/Tag.stories.tsx
import { expect } from '@storybook/jest'; import { Meta, StoryObj } from '@storybook/react'; import { userEvent } from '@storybook/testing-library'; import { ThemeColor } from '@/ui/theme/constants/colors'; import { CatalogDecorator } from '~/testing/decorators/CatalogDecorator'; import { ComponentDecorator } from '~/...
1,989
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/tooltip/AppTooltip.tsx
import { PlacesType, PositionStrategy, Tooltip } from 'react-tooltip'; import styled from '@emotion/styled'; import { rgba } from '../../theme/constants/colors'; export enum TooltipPosition { Top = 'top', Left = 'left', Right = 'right', Bottom = 'bottom', } const StyledAppTooltip = styled(Tooltip)` backdro...
1,990
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/tooltip/OverflowingTextWithTooltip.tsx
import { useEffect, useRef, useState } from 'react'; import { createPortal } from 'react-dom'; import styled from '@emotion/styled'; import { v4 as uuidV4 } from 'uuid'; import { AppTooltip } from './AppTooltip'; const StyledOverflowingText = styled.div<{ cursorPointer: boolean }>` cursor: ${({ cursorPointer }) => ...
1,991
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/tooltip
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/tooltip/__stories__/OverflowTextWithTooltip.stories.tsx
import { Meta, StoryObj } from '@storybook/react'; import { userEvent, within } from '@storybook/testing-library'; import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator'; import { OverflowingTextWithTooltip } from '../OverflowingTextWithTooltip'; const placeholderText = 'Lorem ipsum dolor sit...
1,992
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/tooltip
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/tooltip/__stories__/Tooltip.stories.tsx
import { Meta, StoryObj } from '@storybook/react'; import { CatalogDecorator } from '~/testing/decorators/CatalogDecorator'; import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator'; import { CatalogStory } from '~/testing/types'; import { AppTooltip as Tooltip, TooltipPosition } from '../AppToolt...
1,993
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/typography
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/typography/components/H1Title.tsx
import styled from '@emotion/styled'; type H1TitleProps = { title: string; fontColor?: H1TitleFontColor; className?: string; }; export enum H1TitleFontColor { Primary = 'primary', Secondary = 'secondary', Tertiary = 'tertiary', } const StyledTitle = styled.h2<{ fontColor: H1TitleFontColor; }>` color:...
1,994
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/typography
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/typography/components/H2Title.tsx
import styled from '@emotion/styled'; type H2TitleProps = { title: string; description?: string; addornment?: React.ReactNode; }; const StyledContainer = styled.div` display: flex; flex-direction: column; margin-bottom: ${({ theme }) => theme.spacing(4)}; `; const StyledTitleContainer = styled.div` ali...
1,995
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/typography/components
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/typography/components/__stories__/H1Title.stories.tsx
import { Meta, StoryObj } from '@storybook/react'; import { CatalogDecorator } from '~/testing/decorators/CatalogDecorator'; import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator'; import { CatalogStory } from '~/testing/types'; import { H1Title, H1TitleFontColor } from '../H1Title'; const meta...
1,996
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/typography/components
petrpan-code/twentyhq/twenty/front/src/modules/ui/display/typography/components/__stories__/H2Title.stories.tsx
import { Meta, StoryObj } from '@storybook/react'; import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator'; import { H2Title } from '../H2Title'; const args = { title: 'Sub title', description: 'Lorem ipsum dolor sit amet', }; const meta: Meta<typeof H2Title> = { title: 'UI/Display/Typogr...
1,997
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/feedback/dialog-manager
petrpan-code/twentyhq/twenty/front/src/modules/ui/feedback/dialog-manager/components/Dialog.tsx
import { useCallback } from 'react'; import styled from '@emotion/styled'; import { motion } from 'framer-motion'; import { Key } from 'ts-key-enum'; import { Button } from '@/ui/input/button/components/Button'; import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys'; import { DialogHotkeyScop...
1,998
0
petrpan-code/twentyhq/twenty/front/src/modules/ui/feedback/dialog-manager
petrpan-code/twentyhq/twenty/front/src/modules/ui/feedback/dialog-manager/components/DialogManager.tsx
import { useDialogManagerScopedStates } from '../hooks/internal/useDialogManagerScopedStates'; import { useDialogManager } from '../hooks/useDialogManager'; import { Dialog } from './Dialog'; import { DialogManagerEffect } from './DialogManagerEffect'; export const DialogManager = ({ children }: React.PropsWithChildr...
1,999