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/ui/utilities/dimensions | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/dimensions/components/ComputeNodeDimensions.tsx | import { ReactNode, useEffect, useRef, useState } from 'react';
import styled from '@emotion/styled';
type ComputeNodeDimensionsProps = {
children: (
dimensions: { height: number; width: number } | undefined,
) => ReactNode;
node?: ReactNode;
};
const StyledNodeWrapper = styled.span`
pointer-events: none;... | 2,600 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/drag-select | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/drag-select/components/DragSelect.tsx | import { RefObject } from 'react';
import {
boxesIntersect,
useSelectionContainer,
} from '@air/react-drag-to-select';
import { useTheme } from '@emotion/react';
import { rgba } from '@/ui/theme/constants/colors';
import { useDragSelect } from '../hooks/useDragSelect';
type DragSelectProps = {
dragSelectable: ... | 2,601 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/drag-select | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/drag-select/hooks/useDragSelect.ts | import { useRecoilCallback, useSetRecoilState } from 'recoil';
import { isDragSelectionStartEnabledState } from '../states/internal/isDragSelectionStartEnabledState';
export const useDragSelect = () => {
const setIsDragSelectionStartEnabled = useSetRecoilState(
isDragSelectionStartEnabledState,
);
const se... | 2,602 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/drag-select/states | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/drag-select/states/internal/isDragSelectionStartEnabledState.ts | import { atom } from 'recoil';
export const isDragSelectionStartEnabledState = atom({
key: 'drag-select/isDragSelectionStartEnabledState',
default: true,
});
| 2,603 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/components/HotkeyEffect.tsx | import { Keys } from 'react-hotkeys-hook';
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
type HotkeyEffectProps = {
hotkey: {
key: Keys;
scope: string;
};
onHotkeyTriggered: () => void;
};
export const HotkeyEffect = ({
hotkey,
onHotkeyTriggered,
}: HotkeyEffectPr... | 2,604 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/constants/index.ts | import { AppHotkeyScope } from '../types/AppHotkeyScope';
import { CustomHotkeyScopes } from '../types/CustomHotkeyScope';
import { HotkeyScope } from '../types/HotkeyScope';
export const DEFAULT_HOTKEYS_SCOPE_CUSTOM_SCOPES: CustomHotkeyScopes = {
commandMenu: true,
goto: false,
keyboardShortcutMenu: false,
};
... | 2,605 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/hooks/useGoToHotkeys.ts | import { Keys } from 'react-hotkeys-hook/dist/types';
import { useNavigate } from 'react-router-dom';
import { AppHotkeyScope } from '../types/AppHotkeyScope';
import { useSequenceHotkeys } from './useSequenceScopedHotkeys';
export const useGoToHotkeys = (key: Keys, location: string) => {
const navigate = useNavig... | 2,606 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/hooks/usePreviousHotkeyScope.ts | import { useRecoilCallback } from 'recoil';
import { currentHotkeyScopeState } from '../states/internal/currentHotkeyScopeState';
import { previousHotkeyScopeState } from '../states/internal/previousHotkeyScopeState';
import { CustomHotkeyScopes } from '../types/CustomHotkeyScope';
import { useSetHotkeyScope } from '... | 2,607 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/hooks/useScopedHotkeyCallback.ts | import { Hotkey } from 'react-hotkeys-hook/dist/types';
import { useRecoilCallback } from 'recoil';
import { logDebug } from '~/utils/logDebug';
import { internalHotkeysEnabledScopesState } from '../states/internal/internalHotkeysEnabledScopesState';
const DEBUG_HOTKEY_SCOPE = true;
export const useScopedHotkeyCall... | 2,608 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/hooks/useScopedHotkeys.ts | // eslint-disable-next-line no-restricted-imports
import { useHotkeys } from 'react-hotkeys-hook';
import {
HotkeyCallback,
Keys,
Options,
OptionsOrDependencyArray,
} from 'react-hotkeys-hook/dist/types';
import { useRecoilState } from 'recoil';
import { pendingHotkeyState } from '../states/internal/pendingHot... | 2,609 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/hooks/useSequenceScopedHotkeys.ts | // eslint-disable-next-line no-restricted-imports
import { Options, useHotkeys } from 'react-hotkeys-hook';
import { Keys } from 'react-hotkeys-hook/dist/types';
import { useRecoilState } from 'recoil';
import { pendingHotkeyState } from '../states/internal/pendingHotkeysState';
import { useScopedHotkeyCallback } fro... | 2,610 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/hooks/useSetHotkeyScope.ts | import { useRecoilCallback } from 'recoil';
import { isDefined } from '~/utils/isDefined';
import { DEFAULT_HOTKEYS_SCOPE_CUSTOM_SCOPES } from '../constants';
import { currentHotkeyScopeState } from '../states/internal/currentHotkeyScopeState';
import { internalHotkeysEnabledScopesState } from '../states/internal/int... | 2,611 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/states | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/states/internal/currentHotkeyScopeState.ts | import { atom } from 'recoil';
import { INITIAL_HOTKEYS_SCOPE } from '../../constants';
import { HotkeyScope } from '../../types/HotkeyScope';
export const currentHotkeyScopeState = atom<HotkeyScope>({
key: 'currentHotkeyScopeState',
default: INITIAL_HOTKEYS_SCOPE,
});
| 2,612 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/states | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/states/internal/internalHotkeysEnabledScopesState.ts | import { atom } from 'recoil';
export const internalHotkeysEnabledScopesState = atom<string[]>({
key: 'internalHotkeysEnabledScopesState',
default: [],
});
| 2,613 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/states | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/states/internal/pendingHotkeysState.ts | import { Keys } from 'react-hotkeys-hook/dist/types';
import { atom } from 'recoil';
export const pendingHotkeyState = atom<Keys | null>({
key: 'pendingHotkeyState',
default: null,
});
| 2,614 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/states | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/states/internal/previousHotkeyScopeState.ts | import { atom } from 'recoil';
import { HotkeyScope } from '../../types/HotkeyScope';
export const previousHotkeyScopeState = atom<HotkeyScope | null>({
key: 'previousHotkeyScopeState',
default: null,
});
| 2,615 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/types/AppHotkeyScope.ts | export enum AppHotkeyScope {
App = 'app',
Goto = 'goto',
CommandMenu = 'command-menu',
KeyboardShortcutMenu = 'keyboard-shortcut-menu',
}
| 2,616 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/types/CustomHotkeyScope.ts | export type CustomHotkeyScopes = {
goto?: boolean;
commandMenu?: boolean;
keyboardShortcutMenu?: boolean;
};
| 2,617 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/types/HotkeyScope.ts | import { CustomHotkeyScopes } from './CustomHotkeyScope';
export type HotkeyScope = {
scope: string;
customScopes?: CustomHotkeyScopes;
};
| 2,618 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/hotkey/utils/isNonTextWritingKey.ts | export const isNonTextWritingKey = (key: string) => {
const nonTextWritingKeys = [
'Enter',
'Tab',
'Shift',
'Escape',
'ArrowUp',
'ArrowDown',
'ArrowLeft',
'ArrowRight',
'Delete',
'Backspace',
'F1',
'F2',
'F3',
'F4',
'F5',
'F6',
'F7',
'F8',
'F... | 2,619 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/loading-state | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/loading-state/states/currentPageLocationState.ts | import { atom } from 'recoil';
export const currentPageLocationState = atom<string>({
key: 'currentPageLocationState',
default: '',
});
| 2,620 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/page-title/PageTitle.tsx | import { Helmet } from 'react-helmet-async';
type PageTitleProps = {
title: string;
};
export const PageTitle = (props: PageTitleProps) => {
return (
<Helmet>
<title>{props.title}</title>
</Helmet>
);
};
| 2,621 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/pointer-event | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/pointer-event/hooks/useListenClickOutside.ts | import React, { useEffect, useState } from 'react';
export enum ClickOutsideMode {
comparePixels = 'comparePixels',
compareHTMLRef = 'compareHTMLRef',
}
export const useListenClickOutside = <T extends Element>({
refs,
callback,
mode = ClickOutsideMode.compareHTMLRef,
enabled = true,
}: {
refs: Array<Rea... | 2,622 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/pointer-event | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/pointer-event/hooks/useTrackPointer.ts | import { useCallback, useEffect } from 'react';
type MouseListener = (positionX: number, positionY: number) => void;
export const useTrackPointer = ({
shouldTrackPointer = true,
onMouseMove,
onMouseDown,
onMouseUp,
}: {
shouldTrackPointer?: boolean;
onMouseMove?: MouseListener;
onMouseDown?: MouseListen... | 2,623 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/pointer-event/hooks | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/pointer-event/hooks/__tests__/useListenClickOutsideArrayOfRef.test.tsx | import { useRef } from 'react';
import { fireEvent, render } from '@testing-library/react';
import { useListenClickOutside } from '../useListenClickOutside';
const onOutsideClick = jest.fn();
const TestComponentDomMode = () => {
const buttonRef = useRef<HTMLButtonElement>(null);
const buttonRef2 = useRef<HTMLBut... | 2,624 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/components/RecoilScope.tsx | import { useRef } from 'react';
import { v4 } from 'uuid';
import { RecoilScopeContext as RecoilScopeContextType } from '@/types/RecoilScopeContext';
import { RecoilScopeContext } from '../states/RecoilScopeContext';
/**
*
* @deprecated Use a custom scope context instead, see example with DropdownScope
*/
export ... | 2,625 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/hooks/useContextScopeId.ts | import { Context, useContext } from 'react';
/**
* @deprecated use a custom scope instead and desctructure the scope id from the scope context
* Get the scope context with useScopeInternalContext
*/
export const useContextScopeId = (SpecificContext: Context<string | null>) => {
const recoilScopeId = useContext(Sp... | 2,626 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/hooks/useRecoilScopeId.ts | import { useContext } from 'react';
import { RecoilScopeContext } from '@/types/RecoilScopeContext';
/**
* @deprecated Use a custom scope instead and desctructure the scope id from the scope context
*/
export const useRecoilScopeId = (RecoilScopeContext: RecoilScopeContext) => {
const recoilScopeId = useContext(R... | 2,627 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/hooks/useRecoilScopedFamilyState.ts | import { RecoilState, SerializableParam, useRecoilState } from 'recoil';
import { ScopedFamilyStateKey } from '../scopes-internal/types/ScopedFamilyStateKey';
export const useRecoilScopedFamilyState = <
StateType,
FamilyKey extends SerializableParam,
>(
recoilState: (
scopedFamilyKey: ScopedFamilyStateKey<F... | 2,628 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/hooks/useRecoilScopedState.ts | import { Context, useContext } from 'react';
import { RecoilState, useRecoilState } from 'recoil';
import { RecoilScopeContext } from '../states/RecoilScopeContext';
export const useRecoilScopedState = <StateType>(
recoilState: (param: string) => RecoilState<StateType>,
CustomRecoilScopeContext?: Context<string |... | 2,629 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/hooks/useRecoilScopedStateV2.ts | import { RecoilState, useRecoilState } from 'recoil';
import { ScopedStateKey } from '../scopes-internal/types/ScopedStateKey';
export const useRecoilScopedStateV2 = <StateType>(
recoilState: (scopedKey: ScopedStateKey) => RecoilState<StateType>,
scopeId: string,
) => {
return useRecoilState<StateType>(
rec... | 2,630 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/hooks/useRecoilScopedValue.ts | import { Context, useContext } from 'react';
import { RecoilState, RecoilValueReadOnly, useRecoilValue } from 'recoil';
import { RecoilScopeContext } from '../states/RecoilScopeContext';
/**
* @deprecated use useRecoilScopedStateV2 instead
*/
export const useRecoilScopedValue = <T>(
recoilState: (param: string) =... | 2,631 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/hooks/useRecoilScopedValueV2.ts | import { RecoilState, useRecoilValue } from 'recoil';
import { ScopedStateKey } from '../scopes-internal/types/ScopedStateKey';
export const useRecoilScopedValueV2 = <StateType>(
recoilState: (scopedKey: ScopedStateKey) => RecoilState<StateType>,
scopeId: string,
) => {
return useRecoilValue<StateType>(
rec... | 2,632 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/hooks/useSetRecoilScopedFamilyState.ts | import { RecoilState, SerializableParam, useSetRecoilState } from 'recoil';
import { ScopedFamilyStateKey } from '../scopes-internal/types/ScopedFamilyStateKey';
export const useSetRecoilScopedFamilyState = <
StateType,
FamilyKey extends SerializableParam,
>(
recoilState: (
scopedFamilyKey: ScopedFamilyStat... | 2,633 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/hooks/useSetRecoilScopedStateV2.ts | import { RecoilState, useSetRecoilState } from 'recoil';
import { ScopedStateKey } from '../scopes-internal/types/ScopedStateKey';
export const useSetRecoilScopedStateV2 = <StateType>(
recoilState: (scopedKey: ScopedStateKey) => RecoilState<StateType>,
scopeId: string,
) => {
return useSetRecoilState<StateType>... | 2,634 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/scopes-internal | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/scopes-internal/hooks/useAvailableScopeId.ts | import { ScopeInternalContext } from '../types/ScopeInternalContext';
import { useScopeInternalContext } from './useScopeInternalContext';
export const useAvailableScopeIdOrThrow = <T extends { scopeId: string }>(
Context: ScopeInternalContext<T>,
scopeIdFromProps?: string,
): string => {
const scopeInternalCon... | 2,635 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/scopes-internal | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/scopes-internal/hooks/useScopeInternalContext.ts | import { useContext } from 'react';
import { ScopeInternalContext } from '../types/ScopeInternalContext';
export const useScopeInternalContext = <T extends { scopeId: string }>(
Context: ScopeInternalContext<T>,
) => {
const context = useContext(Context);
return context;
};
| 2,636 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/scopes-internal | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/scopes-internal/hooks/useScopeInternalContextOrThrow.ts | import { useContext } from 'react';
import { isDefined } from '~/utils/isDefined';
import { ScopeInternalContext } from '../types/ScopeInternalContext';
export const useScopeInternalContextOrThrow = <T extends { scopeId: string }>(
Context: ScopeInternalContext<T>,
) => {
const context = useContext(Context);
... | 2,637 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/scopes-internal | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/scopes-internal/types/ScopeInternalContext.ts | import { Context } from 'react';
export type ScopeInternalContext<T extends { scopeId: string }> =
Context<T | null>;
| 2,638 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/scopes-internal | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/scopes-internal/types/ScopedFamilyStateKey.ts | import { SerializableParam } from 'recoil';
export type ScopedFamilyStateKey<FamilyKey extends SerializableParam> = {
scopeId: string;
familyKey: FamilyKey;
};
| 2,639 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/scopes-internal | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/scopes-internal/types/ScopedStateKey.ts | export type ScopedStateKey = {
scopeId: string;
};
| 2,640 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/scopes-internal | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/scopes-internal/utils/createScopeInternalContext.ts | import { Context, createContext } from 'react';
import { ScopedStateKey } from '../types/ScopedStateKey';
type ScopeInternalContext<T extends ScopedStateKey> = Context<T | null>;
export const createScopeInternalContext = <T extends ScopedStateKey>(
initialValue?: T,
) => {
return createContext<T | null>(
ini... | 2,641 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/states/RecoilScopeContext.ts | import { createContext } from 'react';
export const RecoilScopeContext = createContext<string | null>(null);
| 2,642 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/types/RecoilScopedSelector.ts | import { RecoilValueReadOnly } from 'recoil';
import { ScopedStateKey } from '../scopes-internal/types/ScopedStateKey';
export type RecoilScopedSelector<StateType> = (
scopedKey: ScopedStateKey,
) => RecoilValueReadOnly<StateType>;
| 2,643 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/types/RecoilScopedState.ts | import { RecoilState } from 'recoil';
import { ScopedStateKey } from '../scopes-internal/types/ScopedStateKey';
export type RecoilScopedState<StateType> = (
scopedKey: ScopedStateKey,
) => RecoilState<StateType>;
| 2,644 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/utils/createScopedFamilyState.ts | import { atomFamily, SerializableParam } from 'recoil';
import { ScopedFamilyStateKey } from '../scopes-internal/types/ScopedFamilyStateKey';
export const createScopedFamilyState = <
ValueType,
FamilyKey extends SerializableParam,
>({
key,
defaultValue,
}: {
key: string;
defaultValue: ValueType;
}) => {
... | 2,645 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/utils/createScopedSelector.ts | import {
GetCallback,
GetRecoilValue,
Loadable,
RecoilValue,
selectorFamily,
WrappedValue,
} from 'recoil';
import { ScopedStateKey } from '../scopes-internal/types/ScopedStateKey';
type SelectorGetter<T, P> = (
param: P,
) => (opts: {
get: GetRecoilValue;
getCallback: GetCallback;
}) => Promise<T> ... | 2,646 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/utils/createScopedState.ts | import { atomFamily } from 'recoil';
export const createScopedState = <ValueType>({
key,
defaultValue,
}: {
key: string;
defaultValue: ValueType;
}) => {
return atomFamily<ValueType, { scopeId: string }>({
key,
default: defaultValue,
});
};
| 2,647 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/utils/getScopedFamilyState.ts | import { RecoilState, SerializableParam } from 'recoil';
import { ScopedFamilyStateKey } from '../scopes-internal/types/ScopedFamilyStateKey';
export const getScopedFamilyState = <
StateType,
FamilyKey extends SerializableParam,
>(
recoilState: (
scopedFamilyKey: ScopedFamilyStateKey<FamilyKey>,
) => Reco... | 2,648 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/utils/getScopedSelector.ts | import { RecoilScopedSelector } from '../types/RecoilScopedSelector';
export const getScopedSelector = <StateType>(
recoilScopedState: RecoilScopedSelector<StateType>,
scopeId: string,
) => {
return recoilScopedState({
scopeId,
});
};
| 2,649 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/utils/getScopedState.ts | import { RecoilScopedState } from '../types/RecoilScopedState';
export const getScopedState = <StateType>(
recoilScopedState: RecoilScopedState<StateType>,
scopeId: string,
) => {
return recoilScopedState({
scopeId,
});
};
| 2,650 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/utils/getSnapshotScopedSelector.ts | import { Snapshot } from 'recoil';
import { RecoilScopedSelector } from '../types/RecoilScopedSelector';
import { getScopedSelector } from './getScopedSelector';
export const getSnapshotScopedSelector = <StateType>(
snapshot: Snapshot,
scopedState: RecoilScopedSelector<StateType>,
scopeId: string,
) => {
ret... | 2,651 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/utils/getSnapshotScopedValue.ts | import { Snapshot } from 'recoil';
import { RecoilScopedState } from '../types/RecoilScopedState';
import { getScopedState } from './getScopedState';
export const getSnapshotScopedValue = <StateType>(
snapshot: Snapshot,
scopedState: RecoilScopedState<StateType>,
scopeId: string,
) => {
return snapshot.getLo... | 2,652 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/recoil-scope/utils/getSnapshotValue.ts | import { RecoilState, RecoilValueReadOnly, Snapshot } from 'recoil';
export const getSnapshotValue = <StateType>(
snapshot: Snapshot,
state: RecoilState<StateType> | RecoilValueReadOnly<StateType>,
) => {
return snapshot.getLoadable(state).getValue();
};
| 2,653 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/responsive | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/responsive/hooks/useIsMobile.ts | import { useMediaQuery } from 'react-responsive';
import { MOBILE_VIEWPORT } from '@/ui/theme/constants/theme';
export const useIsMobile = () =>
useMediaQuery({ query: `(max-width: ${MOBILE_VIEWPORT}px)` });
| 2,654 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/scroll | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/scroll/components/ScrollWrapper.tsx | import { createContext, RefObject, useRef } from 'react';
import styled from '@emotion/styled';
import { useListenScroll } from '../hooks/useListenScroll';
export const ScrollWrapperContext = createContext<RefObject<HTMLDivElement>>({
current: null,
});
const StyledScrollWrapper = styled.div`
display: flex;
he... | 2,655 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/scroll | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/scroll/hooks/useListenScroll.ts | import { useEffect } from 'react';
import debounce from 'lodash.debounce';
import { useRecoilCallback } from 'recoil';
import { isScrollingState } from '../states/isScrollingState';
export const useListenScroll = <T extends Element>({
scrollableRef,
}: {
scrollableRef: React.RefObject<T>;
}) => {
const hideScro... | 2,656 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/scroll | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/scroll/hooks/useScrollWrapperScopedRef.ts | import { useContext } from 'react';
import { ScrollWrapperContext } from '../components/ScrollWrapper';
export const useScrollWrapperScopedRef = () => {
const scrollWrapperRef = useContext(ScrollWrapperContext);
if (!scrollWrapperRef)
throw new Error(
`Using a scoped ref without a ScrollWrapper : verif... | 2,657 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/scroll | petrpan-code/twentyhq/twenty/front/src/modules/ui/utilities/scroll/states/isScrollingState.ts | import { atom } from 'recoil';
export const isScrollingState = atom({
key: 'scroll/isScollingState',
default: false,
});
| 2,658 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/users | petrpan-code/twentyhq/twenty/front/src/modules/users/components/Avatar.tsx | import { useEffect, useState } from 'react';
import styled from '@emotion/styled';
import { isNonEmptyString } from '@sniptt/guards';
import { stringToHslColor } from '~/utils/string-to-hsl';
import { getImageAbsoluteURIOrBase64 } from '../utils/getProfilePictureAbsoluteURI';
export type AvatarType = 'squared' | 'ro... | 2,659 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/users | petrpan-code/twentyhq/twenty/front/src/modules/users/components/UserChip.tsx | import { EntityChip } from '@/ui/display/chip/components/EntityChip';
export type UserChipProps = {
id: string;
name: string;
avatarUrl?: string;
};
export const UserChip = ({ id, name, avatarUrl }: UserChipProps) => (
<EntityChip
entityId={id}
name={name}
avatarType="rounded"
avatarUrl={avata... | 2,660 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/users | petrpan-code/twentyhq/twenty/front/src/modules/users/components/UserProvider.tsx | import { useEffect, useState } from 'react';
import { useSetRecoilState } from 'recoil';
import { currentUserState } from '@/auth/states/currentUserState';
import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState... | 2,661 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/users/components | petrpan-code/twentyhq/twenty/front/src/modules/users/components/__stories__/Avatar.stories.tsx | import { Meta, StoryObj } from '@storybook/react';
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
import { avatarUrl } from '~/testing/mock-data/users';
import { Avatar } from '../Avatar';
const meta: Meta<typeof Avatar> = {
title: 'Modules/Users/Avatar',
component: Avatar,
decor... | 2,662 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/users/graphql | petrpan-code/twentyhq/twenty/front/src/modules/users/graphql/fragments/userQueryFragment.ts | import { gql } from '@apollo/client';
export const USER_QUERY_FRAGMENT = gql`
fragment UserQueryFragment on User {
id
firstName
lastName
email
canImpersonate
supportUserHash
workspaceMember {
id
name {
firstName
lastName
}
colorScheme
avatarUr... | 2,663 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/users/graphql | petrpan-code/twentyhq/twenty/front/src/modules/users/graphql/mutations/deleteUserAccount.ts | import { gql } from '@apollo/client';
export const DELETE_USER_ACCOUNT = gql`
mutation DeleteUserAccount {
deleteUser {
id
}
}
`;
| 2,664 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/users/graphql | petrpan-code/twentyhq/twenty/front/src/modules/users/graphql/mutations/uploadProfilePicture.ts | import { gql } from '@apollo/client';
export const UPLOAD_PROFILE_PICTURE = gql`
mutation UploadProfilePicture($file: Upload!) {
uploadProfilePicture(file: $file)
}
`;
| 2,665 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/users/graphql | petrpan-code/twentyhq/twenty/front/src/modules/users/graphql/queries/getCurrentUser.ts | import { gql } from '@apollo/client';
export const GET_CURRENT_USER = gql`
query GetCurrentUser {
currentUser {
id
firstName
lastName
email
canImpersonate
supportUserHash
workspaceMember {
id
name {
firstName
lastName
}
... | 2,666 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/users | petrpan-code/twentyhq/twenty/front/src/modules/users/utils/getProfilePictureAbsoluteURI.ts | import { REACT_APP_SERVER_FILES_URL } from '~/config';
export const getImageAbsoluteURIOrBase64 = (imageUrl?: string | null) => {
if (!imageUrl) {
return null;
}
if (imageUrl?.startsWith('data:')) {
return imageUrl;
}
if (imageUrl?.startsWith('https:')) {
return imageUrl;
}
const serverFil... | 2,667 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/components/SortOrFilterChip.tsx | import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { IconX } from '@/ui/display/icon/index';
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
type SortOrFilterChipProps = {
labelKey?: string;
labelValue: string;
Icon?: IconComponent;
onRemove: () => v... | 2,668 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/components/UpdateViewButtonGroup.tsx | import { useCallback, useState } from 'react';
import styled from '@emotion/styled';
import { useRecoilValue } from 'recoil';
import { Key } from 'ts-key-enum';
import { IconChevronDown, IconPlus } from '@/ui/display/icon';
import { Button } from '@/ui/input/button/components/Button';
import { ButtonGroup } from '@/ui... | 2,669 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/components/ViewBar.tsx | import { ReactNode } from 'react';
import { useRecoilValue } from 'recoil';
import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown';
import { TopBar } from '@/ui/layout/top-bar/TopBar';
import { ObjectFilterDropdownButton } from '@/ui/object/object-filter-dropdown/components/ObjectFilterDropdownButton';
i... | 2,670 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/components/ViewBarDetails.tsx | import { ReactNode } from 'react';
import styled from '@emotion/styled';
import { useRecoilValue } from 'recoil';
import { IconArrowDown, IconArrowUp } from '@/ui/display/icon/index';
import { useLazyLoadIcons } from '@/ui/input/hooks/useLazyLoadIcons';
import { AddObjectFilterFromDetailsButton } from '@/ui/object/obj... | 2,671 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/components/ViewBarEffect.tsx | import { useEffect } from 'react';
import { useSearchParams } from 'react-router-dom';
import { useRecoilCallback, useRecoilValue } from 'recoil';
import { useFindManyObjectRecords } from '@/object-record/hooks/useFindManyObjectRecords';
import { PaginatedObjectTypeResults } from '@/object-record/types/PaginatedObject... | 2,672 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/components/ViewFieldsVisibilityDropdownSection.tsx | import { useRef, useState } from 'react';
import { createPortal } from 'react-dom';
import {
DropResult,
OnDragEndResponder,
ResponderProvided,
} from '@hello-pangea/dnd';
import { IconMinus, IconPlus } from '@/ui/display/icon';
import { AppTooltip } from '@/ui/display/tooltip/AppTooltip';
import { IconInfoCircl... | 2,673 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/components/ViewsDropdownButton.tsx | import { MouseEvent } from 'react';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { useRecoilCallback, useRecoilValue } from 'recoil';
import {
IconChevronDown,
IconList,
IconPencil,
IconPlus,
IconTrash,
} from '@/ui/display/icon';
import { Dropdown } from '@/ui/layo... | 2,674 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/constants/ViewsDropdownId.ts | export const ViewsDropdownId = 'views';
| 2,675 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/constants/index.ts | // TODO: find a better pattern than using '' as a fallback
export const UNDEFINED_FAMILY_ITEM_ID = '';
| 2,676 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/hooks/useMoveViewColumns.ts | export const useMoveViewColumns = () => {
const handleColumnMove = <T extends { position: number }>(
direction: 'left' | 'right',
currentArrayindex: number,
targetArray: T[],
) => {
const targetArrayIndex =
direction === 'left' ? currentArrayindex - 1 : currentArrayindex + 1;
const targetA... | 2,677 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/hooks/useView.ts | import { useCallback } from 'react';
import { useSearchParams } from 'react-router-dom';
import { useRecoilCallback, useRecoilState, useSetRecoilState } from 'recoil';
import { v4 } from 'uuid';
import { useAvailableScopeIdOrThrow } from '@/ui/utilities/recoil-scope/scopes-internal/hooks/useAvailableScopeId';
import ... | 2,678 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views/hooks | petrpan-code/twentyhq/twenty/front/src/modules/views/hooks/internal/useViewFields.ts | import { useApolloClient } from '@apollo/client';
import { getOperationName } from '@apollo/client/utilities';
import { useRecoilCallback } from 'recoil';
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
import { ViewField } from '@/views/types/ViewField';
import { getViewScopedSt... | 2,679 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views/hooks | petrpan-code/twentyhq/twenty/front/src/modules/views/hooks/internal/useViewFilters.ts | import { useApolloClient } from '@apollo/client';
import { produce } from 'immer';
import { useRecoilCallback } from 'recoil';
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
import { Filter } from '@/ui/object/object-filter-dropdown/types/Filter';
import { savedViewFiltersScoped... | 2,680 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views/hooks | petrpan-code/twentyhq/twenty/front/src/modules/views/hooks/internal/useViewScopedStates.ts | import { useRecoilState } from 'recoil';
import { useAvailableScopeIdOrThrow } from '@/ui/utilities/recoil-scope/scopes-internal/hooks/useAvailableScopeId';
import { getScopedState } from '@/ui/utilities/recoil-scope/utils/getScopedState';
import { UNDEFINED_FAMILY_ITEM_ID } from '../../constants';
import { ViewScope... | 2,681 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views/hooks | petrpan-code/twentyhq/twenty/front/src/modules/views/hooks/internal/useViewSorts.ts | import { useApolloClient } from '@apollo/client';
import { produce } from 'immer';
import { useRecoilCallback } from 'recoil';
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
import { Sort } from '@/ui/object/object-sort-dropdown/types/Sort';
import { savedViewSortsScopedFamilySt... | 2,682 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views/hooks | petrpan-code/twentyhq/twenty/front/src/modules/views/hooks/internal/useViews.ts | import { useApolloClient } from '@apollo/client';
import { useRecoilCallback } from 'recoil';
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
import { View } from '@/views/types/View';
import { getViewScopedStateValuesFromSnapshot } from '@/views/utils/getViewScopedStateValuesFro... | 2,683 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/scopes/ViewScope.tsx | import { ReactNode } from 'react';
import { ViewFilter } from '@/views/types/ViewFilter';
import { ViewSort } from '@/views/types/ViewSort';
import { ViewField } from '../types/ViewField';
import { ViewScopeInitEffect } from './init-effect/ViewScopeInitEffect';
import { ViewScopeInternalContext } from './scope-inter... | 2,684 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views/scopes | petrpan-code/twentyhq/twenty/front/src/modules/views/scopes/init-effect/ViewScopeInitEffect.tsx | import { useEffect } from 'react';
import { useSetRecoilState } from 'recoil';
import { useViewScopedStates } from '@/views/hooks/internal/useViewScopedStates';
import { ViewField } from '@/views/types/ViewField';
import { ViewFilter } from '@/views/types/ViewFilter';
import { ViewSort } from '@/views/types/ViewSort';... | 2,685 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views/scopes | petrpan-code/twentyhq/twenty/front/src/modules/views/scopes/scope-internal-context/ViewScopeInternalContext.ts | import { ScopedStateKey } from '@/ui/utilities/recoil-scope/scopes-internal/types/ScopedStateKey';
import { createScopeInternalContext } from '@/ui/utilities/recoil-scope/scopes-internal/utils/createScopeInternalContext';
type ViewScopeInternalContextProps = ScopedStateKey;
export const ViewScopeInternalContext =
c... | 2,686 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/states/availableFieldDefinitionsScopedState.ts | import { FieldMetadata } from '@/ui/object/field/types/FieldMetadata';
import { ColumnDefinition } from '@/ui/object/record-table/types/ColumnDefinition';
import { createScopedState } from '@/ui/utilities/recoil-scope/utils/createScopedState';
export const availableFieldDefinitionsScopedState = createScopedState<
Co... | 2,687 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/states/availableFilterDefinitionsScopedState.ts | import { FilterDefinition } from '@/ui/object/object-filter-dropdown/types/FilterDefinition';
import { createScopedState } from '@/ui/utilities/recoil-scope/utils/createScopedState';
export const availableFilterDefinitionsScopedState = createScopedState<
FilterDefinition[]
>({
key: 'availableFilterDefinitionsScope... | 2,688 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/states/availableSortDefinitionsScopedState.ts | import { SortDefinition } from '@/ui/object/object-sort-dropdown/types/SortDefinition';
import { createScopedState } from '@/ui/utilities/recoil-scope/utils/createScopedState';
export const availableSortDefinitionsScopedState = createScopedState<
SortDefinition[]
>({
key: 'availableSortDefinitionsScopedState',
d... | 2,689 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/states/currentViewFieldsScopedFamilyState.ts | import { createScopedFamilyState } from '@/ui/utilities/recoil-scope/utils/createScopedFamilyState';
import { ViewField } from '../types/ViewField';
export const currentViewFieldsScopedFamilyState = createScopedFamilyState<
ViewField[],
string
>({
key: 'currentViewFieldsScopedFamilyState',
defaultValue: [],
}... | 2,690 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/states/currentViewFiltersScopedFamilyState.ts | import { createScopedFamilyState } from '@/ui/utilities/recoil-scope/utils/createScopedFamilyState';
import { ViewFilter } from '../types/ViewFilter';
export const currentViewFiltersScopedFamilyState = createScopedFamilyState<
ViewFilter[],
string
>({
key: 'currentViewFiltersScopedFamilyState',
defaultValue: ... | 2,691 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/states/currentViewIdScopedState.ts | import { createScopedState } from '@/ui/utilities/recoil-scope/utils/createScopedState';
export const currentViewIdScopedState = createScopedState<string | undefined>({
key: 'currentViewIdScopedState',
defaultValue: undefined,
});
| 2,692 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/states/currentViewSortsScopedFamilyState.ts | import { createScopedFamilyState } from '@/ui/utilities/recoil-scope/utils/createScopedFamilyState';
import { ViewSort } from '../types/ViewSort';
export const currentViewSortsScopedFamilyState = createScopedFamilyState<
ViewSort[],
string
>({
key: 'currentViewSortsScopedFamilyState',
defaultValue: [],
});
| 2,693 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/states/entityCountInCurrentViewScopedState.ts | import { createScopedState } from '@/ui/utilities/recoil-scope/utils/createScopedState';
export const entityCountInCurrentViewScopedState = createScopedState<number>({
key: 'entityCountInCurrentViewScopedState',
defaultValue: 0,
});
| 2,694 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/states/isPersistingViewScopedState.ts | import { createScopedState } from '@/ui/utilities/recoil-scope/utils/createScopedState';
export const isPersistingViewScopedState = createScopedState<boolean>({
key: 'isPersistingViewScopedState',
defaultValue: false,
});
| 2,695 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/states/isViewBarExpandedScopedState.ts | import { createScopedState } from '@/ui/utilities/recoil-scope/utils/createScopedState';
export const isViewBarExpandedScopedState = createScopedState<boolean>({
key: 'isViewBarExpandedScopedState',
defaultValue: true,
});
| 2,696 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/states/noneScopedFamilyState.ts | import { createScopedFamilyState } from '@/ui/utilities/recoil-scope/utils/createScopedFamilyState';
export const noneScopedFamilyState = createScopedFamilyState<any, string>({
key: 'noneScopedFamilyState',
defaultValue: null,
});
| 2,697 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/states/onViewFieldsChangeScopedState.ts | import { createScopedState } from '@/ui/utilities/recoil-scope/utils/createScopedState';
import { ViewField } from '../types/ViewField';
export const onViewFieldsChangeScopedState = createScopedState<
((fields: ViewField[]) => void | Promise<void>) | undefined
>({
key: 'onViewFieldsChangeScopedState',
defaultVa... | 2,698 |
0 | petrpan-code/twentyhq/twenty/front/src/modules/views | petrpan-code/twentyhq/twenty/front/src/modules/views/states/onViewFiltersChangeScopedState.ts | import { createScopedState } from '@/ui/utilities/recoil-scope/utils/createScopedState';
import { ViewFilter } from '@/views/types/ViewFilter';
export const onViewFiltersChangeScopedState = createScopedState<
((filters: ViewFilter[]) => void | Promise<void>) | undefined
>({
key: 'onViewFiltersChangeScopedState',
... | 2,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.