refactor: move createState to twenty-ui (#4716)
Split from https://github.com/twentyhq/twenty/pull/4518 Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const viewableCalendarEventIdState = createState<string | null>({
|
export const viewableCalendarEventIdState = createState<string | null>({
|
||||||
key: 'viewableCalendarEventIdState',
|
key: 'viewableCalendarEventIdState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const emailThreadIdWhenEmailThreadWasClosedState = createState<
|
export const emailThreadIdWhenEmailThreadWasClosedState = createState<
|
||||||
string | null
|
string | null
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const viewableEmailThreadIdState = createState<string | null>({
|
export const viewableEmailThreadIdState = createState<string | null>({
|
||||||
key: 'viewableEmailThreadIdState',
|
key: 'viewableEmailThreadIdState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const activityIdInDrawerState = createState<string | null>({
|
export const activityIdInDrawerState = createState<string | null>({
|
||||||
key: 'activityIdInDrawerState',
|
key: 'activityIdInDrawerState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { ActivityTargetableObject } from '../types/ActivityTargetableEntity';
|
import { ActivityTargetableObject } from '../types/ActivityTargetableEntity';
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const canCreateActivityState = createState<boolean>({
|
export const canCreateActivityState = createState<boolean>({
|
||||||
key: 'canCreateActivityState',
|
key: 'canCreateActivityState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const isActivityInCreateModeState = createState<boolean>({
|
export const isActivityInCreateModeState = createState<boolean>({
|
||||||
key: 'isActivityInCreateModeState',
|
key: 'isActivityInCreateModeState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const isUpsertingActivityInDBState = createState<boolean>({
|
export const isUpsertingActivityInDBState = createState<boolean>({
|
||||||
key: 'isUpsertingActivityInDBState',
|
key: 'isUpsertingActivityInDBState',
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { ActivityTargetableObject } from '@/activities/types/ActivityTargetableEntity';
|
import { ActivityTargetableObject } from '@/activities/types/ActivityTargetableEntity';
|
||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
|
||||||
|
|
||||||
export const targetableObjectsInDrawerState = createState<
|
export const targetableObjectsInDrawerState = createState<
|
||||||
ActivityTargetableObject[]
|
ActivityTargetableObject[]
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { ActivityForEditor } from '@/activities/types/ActivityForEditor';
|
import { ActivityForEditor } from '@/activities/types/ActivityForEditor';
|
||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
|
||||||
|
|
||||||
export const temporaryActivityForEditorState =
|
export const temporaryActivityForEditorState =
|
||||||
createState<ActivityForEditor | null>({
|
createState<ActivityForEditor | null>({
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const viewableActivityIdState = createState<string | null>({
|
export const viewableActivityIdState = createState<string | null>({
|
||||||
key: 'activities/viewable-activity-id',
|
key: 'activities/viewable-activity-id',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const currentUserDueTaskCountState = createState<number>({
|
export const currentUserDueTaskCountState = createState<number>({
|
||||||
defaultValue: 0,
|
defaultValue: 0,
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { ActivityForActivityGroup } from '@/activities/timeline/utils/groupActivitiesByMonth';
|
import { ActivityForActivityGroup } from '@/activities/timeline/utils/groupActivitiesByMonth';
|
||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
|
||||||
|
|
||||||
export const timelineActivitiesForGroupState = createState<
|
export const timelineActivitiesForGroupState = createState<
|
||||||
ActivityForActivityGroup[]
|
ActivityForActivityGroup[]
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const timelineActivitiesNetworkingState = createState<{
|
export const timelineActivitiesNetworkingState = createState<{
|
||||||
initialized: boolean;
|
initialized: boolean;
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { User } from '~/generated/graphql';
|
import { User } from '~/generated/graphql';
|
||||||
|
|
||||||
export type CurrentUser = Pick<
|
export type CurrentUser = Pick<
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { WorkspaceMember } from '@/workspace-member/types/WorkspaceMember';
|
import { WorkspaceMember } from '@/workspace-member/types/WorkspaceMember';
|
||||||
|
|
||||||
export const currentWorkspaceMemberState = createState<Omit<
|
export const currentWorkspaceMemberState = createState<Omit<
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { Workspace } from '~/generated/graphql';
|
import { Workspace } from '~/generated/graphql';
|
||||||
|
|
||||||
export type CurrentWorkspace = Pick<
|
export type CurrentWorkspace = Pick<
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const isVerifyPendingState = createState<boolean>({
|
export const isVerifyPendingState = createState<boolean>({
|
||||||
key: 'isVerifyPendingState',
|
key: 'isVerifyPendingState',
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { AuthTokenPair } from '~/generated/graphql';
|
import { AuthTokenPair } from '~/generated/graphql';
|
||||||
import { cookieStorageEffect } from '~/utils/recoil-effects';
|
import { cookieStorageEffect } from '~/utils/recoil-effects';
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { Workspace } from '~/generated/graphql';
|
import { Workspace } from '~/generated/graphql';
|
||||||
|
|
||||||
export type Workspaces = Pick<Workspace, 'id' | 'logo' | 'displayName'>;
|
export type Workspaces = Pick<Workspace, 'id' | 'logo' | 'displayName'>;
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { AuthProviders } from '~/generated/graphql';
|
import { AuthProviders } from '~/generated/graphql';
|
||||||
|
|
||||||
export const authProvidersState = createState<AuthProviders>({
|
export const authProvidersState = createState<AuthProviders>({
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { Billing } from '~/generated/graphql';
|
import { Billing } from '~/generated/graphql';
|
||||||
|
|
||||||
export const billingState = createState<Billing | null>({
|
export const billingState = createState<Billing | null>({
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const isDebugModeState = createState<boolean>({
|
export const isDebugModeState = createState<boolean>({
|
||||||
key: 'isDebugModeState',
|
key: 'isDebugModeState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const isSignInPrefilledState = createState<boolean>({
|
export const isSignInPrefilledState = createState<boolean>({
|
||||||
key: 'isSignInPrefilledState',
|
key: 'isSignInPrefilledState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const isSignUpDisabledState = createState<boolean>({
|
export const isSignUpDisabledState = createState<boolean>({
|
||||||
key: 'isSignUpDisabledState',
|
key: 'isSignUpDisabledState',
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { Sentry } from '~/generated/graphql';
|
import { Sentry } from '~/generated/graphql';
|
||||||
|
|
||||||
export const sentryConfigState = createState<Sentry | null>({
|
export const sentryConfigState = createState<Sentry | null>({
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { Support } from '~/generated/graphql';
|
import { Support } from '~/generated/graphql';
|
||||||
|
|
||||||
export const supportChatState = createState<Support>({
|
export const supportChatState = createState<Support>({
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { Telemetry } from '~/generated/graphql';
|
import { Telemetry } from '~/generated/graphql';
|
||||||
|
|
||||||
export const telemetryState = createState<Telemetry>({
|
export const telemetryState = createState<Telemetry>({
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { Command, CommandType } from '../types/Command';
|
import { Command, CommandType } from '../types/Command';
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const commandMenuSearchState = createState<string>({
|
export const commandMenuSearchState = createState<string>({
|
||||||
key: 'command-menu/commandMenuSearchState',
|
key: 'command-menu/commandMenuSearchState',
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { Favorite } from '@/favorites/types/Favorite';
|
import { Favorite } from '@/favorites/types/Favorite';
|
||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
|
||||||
|
|
||||||
export const favoritesState = createState<Favorite[]>({
|
export const favoritesState = createState<Favorite[]>({
|
||||||
key: 'favoritesState',
|
key: 'favoritesState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const currentMobileNavigationDrawerState = createState<
|
export const currentMobileNavigationDrawerState = createState<
|
||||||
'main' | 'settings'
|
'main' | 'settings'
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
|
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
|
||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
|
||||||
|
|
||||||
export const objectMetadataItemsState = createState<ObjectMetadataItem[]>({
|
export const objectMetadataItemsState = createState<ObjectMetadataItem[]>({
|
||||||
key: 'objectMetadataItemsState',
|
key: 'objectMetadataItemsState',
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { FieldMetadata } from '@/object-record/record-field/types/FieldMetadata';
|
import { FieldMetadata } from '@/object-record/record-field/types/FieldMetadata';
|
||||||
import { ColumnDefinition } from '@/object-record/record-table/types/ColumnDefinition';
|
import { ColumnDefinition } from '@/object-record/record-table/types/ColumnDefinition';
|
||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
|
||||||
|
|
||||||
export const recordIndexFieldDefinitionsState = createState<
|
export const recordIndexFieldDefinitionsState = createState<
|
||||||
ColumnDefinition<FieldMetadata>[]
|
ColumnDefinition<FieldMetadata>[]
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { Filter } from '@/object-record/object-filter-dropdown/types/Filter';
|
import { Filter } from '@/object-record/object-filter-dropdown/types/Filter';
|
||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
|
||||||
|
|
||||||
export const recordIndexFiltersState = createState<Filter[]>({
|
export const recordIndexFiltersState = createState<Filter[]>({
|
||||||
key: 'recordIndexFiltersState',
|
key: 'recordIndexFiltersState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const recordIndexIsCompactModeActiveState = createState<boolean>({
|
export const recordIndexIsCompactModeActiveState = createState<boolean>({
|
||||||
key: 'recordIndexIsCompactModeActiveState',
|
key: 'recordIndexIsCompactModeActiveState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const recordIndexKanbanFieldMetadataIdState = createState<string | null>(
|
export const recordIndexKanbanFieldMetadataIdState = createState<string | null>(
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { Sort } from '@/object-record/object-sort-dropdown/types/Sort';
|
import { Sort } from '@/object-record/object-sort-dropdown/types/Sort';
|
||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
|
||||||
|
|
||||||
export const recordIndexSortsState = createState<Sort[]>({
|
export const recordIndexSortsState = createState<Sort[]>({
|
||||||
key: 'recordIndexSortsState',
|
key: 'recordIndexSortsState',
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { ViewType } from '@/views/types/ViewType';
|
import { ViewType } from '@/views/types/ViewType';
|
||||||
|
|
||||||
export const recordIndexViewTypeState = createState<ViewType | undefined>({
|
export const recordIndexViewTypeState = createState<ViewType | undefined>({
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const isSoftFocusUsingMouseState = createState<boolean>({
|
export const isSoftFocusUsingMouseState = createState<boolean>({
|
||||||
key: 'isSoftFocusUsingMouseState',
|
key: 'isSoftFocusUsingMouseState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { SpreadsheetOptions } from '../types';
|
import { SpreadsheetOptions } from '../types';
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
|
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
|
||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
|
||||||
|
|
||||||
export const iconsState = createState<Record<string, IconComponent>>({
|
export const iconsState = createState<Record<string, IconComponent>>({
|
||||||
key: 'iconsState',
|
key: 'iconsState',
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
|
import { createState } from 'twenty-ui';
|
||||||
import { IconApps } from 'twenty-ui';
|
import { IconApps } from 'twenty-ui';
|
||||||
|
|
||||||
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
|
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
|
||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
|
||||||
|
|
||||||
type IconPickerState = {
|
type IconPickerState = {
|
||||||
Icon: IconComponent;
|
Icon: IconComponent;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const isRightDrawerExpandedState = createState<boolean>({
|
export const isRightDrawerExpandedState = createState<boolean>({
|
||||||
key: 'isRightDrawerExpandedState',
|
key: 'isRightDrawerExpandedState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const isRightDrawerOpenState = createState<boolean>({
|
export const isRightDrawerOpenState = createState<boolean>({
|
||||||
key: 'ui/layout/is-right-drawer-open',
|
key: 'ui/layout/is-right-drawer-open',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const rightDrawerCloseEventState = createState<Event | null>({
|
export const rightDrawerCloseEventState = createState<Event | null>({
|
||||||
key: 'rightDrawerCloseEventState',
|
key: 'rightDrawerCloseEventState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { RightDrawerPages } from '../types/RightDrawerPages';
|
import { RightDrawerPages } from '../types/RightDrawerPages';
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { ActionBarEntry } from '../types/ActionBarEntry';
|
import { ActionBarEntry } from '../types/ActionBarEntry';
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const actionBarOpenState = createState<boolean>({
|
export const actionBarOpenState = createState<boolean>({
|
||||||
key: 'actionBarOpenState',
|
key: 'actionBarOpenState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { ContextMenuEntry } from '../types/ContextMenuEntry';
|
import { ContextMenuEntry } from '../types/ContextMenuEntry';
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const contextMenuIsOpenState = createState<boolean>({
|
export const contextMenuIsOpenState = createState<boolean>({
|
||||||
key: 'contextMenuIsOpenState',
|
key: 'contextMenuIsOpenState',
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { PositionType } from '@/ui/navigation/context-menu/types/PositionType';
|
import { PositionType } from '@/ui/navigation/context-menu/types/PositionType';
|
||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
|
||||||
|
|
||||||
export const contextMenuPositionState = createState<PositionType>({
|
export const contextMenuPositionState = createState<PositionType>({
|
||||||
key: 'contextMenuPositionState',
|
key: 'contextMenuPositionState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const navigationMemorizedUrlState = createState<string>({
|
export const navigationMemorizedUrlState = createState<string>({
|
||||||
key: 'navigationMemorizedUrlState',
|
key: 'navigationMemorizedUrlState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export type StepsState = {
|
export type StepsState = {
|
||||||
activeStep: number;
|
activeStep: number;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { INITIAL_HOTKEYS_SCOPE } from '../../constants/InitialHotkeysScope';
|
import { INITIAL_HOTKEYS_SCOPE } from '../../constants/InitialHotkeysScope';
|
||||||
import { HotkeyScope } from '../../types/HotkeyScope';
|
import { HotkeyScope } from '../../types/HotkeyScope';
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const internalHotkeysEnabledScopesState = createState<string[]>({
|
export const internalHotkeysEnabledScopesState = createState<string[]>({
|
||||||
key: 'internalHotkeysEnabledScopesState',
|
key: 'internalHotkeysEnabledScopesState',
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { Keys } from 'react-hotkeys-hook/dist/types';
|
import { Keys } from 'react-hotkeys-hook/dist/types';
|
||||||
|
import { createState } from 'twenty-ui';
|
||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
|
||||||
|
|
||||||
export const pendingHotkeyState = createState<Keys | null>({
|
export const pendingHotkeyState = createState<Keys | null>({
|
||||||
key: 'pendingHotkeyState',
|
key: 'pendingHotkeyState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
import { HotkeyScope } from '../../types/HotkeyScope';
|
import { HotkeyScope } from '../../types/HotkeyScope';
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const currentPageLocationState = createState<string>({
|
export const currentPageLocationState = createState<string>({
|
||||||
key: 'currentPageLocationState',
|
key: 'currentPageLocationState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const lockedListenerIdState = createState<string | null>({
|
export const lockedListenerIdState = createState<string | null>({
|
||||||
key: 'lockedListenerIdState',
|
key: 'lockedListenerIdState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const scrollLeftState = createState<number>({
|
export const scrollLeftState = createState<number>({
|
||||||
key: 'scroll/scrollLeftState',
|
key: 'scroll/scrollLeftState',
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
import { createState } from 'twenty-ui';
|
||||||
|
|
||||||
export const scrollTopState = createState<number>({
|
export const scrollTopState = createState<number>({
|
||||||
key: 'scroll/scrollTopState',
|
key: 'scroll/scrollTopState',
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export * from './components';
|
export * from './components';
|
||||||
export * from './display';
|
export * from './display';
|
||||||
export * from './theme';
|
export * from './theme';
|
||||||
|
export * from './utilities';
|
||||||
|
|||||||
1
packages/twenty-ui/src/utilities/index.ts
Normal file
1
packages/twenty-ui/src/utilities/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from './state/utils/createState';
|
||||||
@ -41,7 +41,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
// External packages that should not be bundled into your library.
|
// External packages that should not be bundled into your library.
|
||||||
external: [],
|
external: ['react', 'react-dom', 'react/jsx-runtime'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user